Re: pxa27x_udc: Oops on probe with usb cable connected.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Antonio Ospite <ospite@xxxxxxxxxxxxxxxxx> writes:

> Done that as well this time. See
> http://people.openezx.org/ao2/tmp/pxa27x-udc_BUG/
> I replaced the old files with the new ones as per your instructions.
>
> Thanks,
>    Antonio

Nice.

Now, would you test the patch attached in this mail to see if :
 - it fixes your Oops
 - the UDC is usable after you attach a gadget driver to pxa27x_udc

Cheers.

--
Robert

---
diff --git a/drivers/usb/gadget/pxa27x_udc.c b/drivers/usb/gadget/pxa27x_udc.c
index 85b0d89..d76d9ee 100644
--- a/drivers/usb/gadget/pxa27x_udc.c
+++ b/drivers/usb/gadget/pxa27x_udc.c
@@ -1938,6 +1938,9 @@ static void handle_ep0_ctrl_req(struct pxa_udc *udc,
 	nuke(ep, -EPROTO);
 	spin_lock_irqsave(&ep->lock, flags);
 
+	if (!udc->driver)
+		goto stall;
+
 	/*
 	 * In the PXA320 manual, in the section about Back-to-Back setup
 	 * packets, it describes this situation.  The solution is to set OPC to

diff --git a/drivers/usb/gadget/pxa27x_udc.c b/drivers/usb/gadget/pxa27x_udc.c
index 85b0d89..d76d9ee 100644
--- a/drivers/usb/gadget/pxa27x_udc.c
+++ b/drivers/usb/gadget/pxa27x_udc.c
@@ -1938,6 +1938,9 @@ static void handle_ep0_ctrl_req(struct pxa_udc *udc,
 	nuke(ep, -EPROTO);
 	spin_lock_irqsave(&ep->lock, flags);
 
+	if (!udc->driver)
+		goto stall;
+
 	/*
 	 * In the PXA320 manual, in the section about Back-to-Back setup
 	 * packets, it describes this situation.  The solution is to set OPC to

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux