Re: Oops in CDC ACM after an Openmoko phone (neo1973) changes its usb interface from ACM to Ethernet

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

 



> The instrumentation patch:

Please test this patch.

	Regards
		Oliver

--

commit 48b7a75466ec184adde7ff58ea3d991cd1c1e8c8
Author: Oliver Neukum <oliver@xxxxxxxxxx>
Date:   Mon Aug 3 22:50:46 2009 +0200

    usb: cdc-acm: catch usb_enable_endpoint nulling the array of endpoints

diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c
index e1f8941..d9508e9 100644
--- a/drivers/usb/class/cdc-acm.c
+++ b/drivers/usb/class/cdc-acm.c
@@ -465,6 +465,14 @@ urbs:
 
 		ep = (usb_pipein(acm->rx_endpoint) ? acm->dev->ep_in : acm->dev->ep_out)
 				[usb_pipeendpoint(acm->rx_endpoint)];
+		if (!ep) { /* disconnected ? */
+			usb_free_urb(rcv->urb);
+			spin_lock_irqsave(&acm->read_lock, flags);
+			list_add(&buf->list, &acm->spare_read_bufs);
+			acm->processing = 0;
+			spin_unlock_irqrestore(&acm->read_lock, flags);
+			return;
+		}
 		if (usb_endpoint_xfer_int(&ep->desc))
 			usb_fill_int_urb(rcv->urb, acm->dev,
 					 acm->rx_endpoint,

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

  Powered by Linux