Re: [PATCH] usb: gadget: net22xx: fix ->disconnect reporting

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

 



Hello.

On 20-03-2013 17:55, Felipe Balbi wrote:

with the latest udc_start/udc_stop conversion,
too much code was deleted which ended up creating
a regression in net2272 and net2280 drivers.

To fix the regression we revert one hunk of the
original commits.

Signed-off-by: Felipe Balbi <balbi@xxxxxx>
---
  drivers/usb/gadget/net2272.c | 7 +++++++
  drivers/usb/gadget/net2280.c | 7 +++++++
  2 files changed, 14 insertions(+)

[...]
diff --git a/drivers/usb/gadget/net2280.c b/drivers/usb/gadget/net2280.c
index a1b650e..3665e5e 100644
--- a/drivers/usb/gadget/net2280.c
+++ b/drivers/usb/gadget/net2280.c
@@ -1946,6 +1946,13 @@ stop_activity (struct net2280 *dev, struct usb_gadget_driver *driver)
  	for (i = 0; i < 7; i++)
  		nuke (&dev->ep [i]);

+	/* report disconnect; the driver is already quiesced */
+	if (driver) {
+		spin_unlock (&dev->lock);
+		driver->disconnect (&dev->gadget);
+		spin_lock (&dev->lock);

    Spaces befere ( not allowed by scripts/checkpatch.pl.

Thanks, I have fixed it in the branch, here's newer version:

commit c934fb9e86332e596b571954171a238bf7c93561
Author: Felipe Balbi <balbi@xxxxxx>
Date:   Mon Mar 18 10:14:47 2013 +0200

     usb: gadget: net22xx: fix ->disconnect reporting

     with the latest udc_start/udc_stop conversion,
     too much code was deleted which ended up creating
     a regression in net2272 and net2280 drivers.

     To fix the regression we revert one hunk of the
     original commits.

     Signed-off-by: Felipe Balbi <balbi@xxxxxx>

[...]
diff --git a/drivers/usb/gadget/net2280.c b/drivers/usb/gadget/net2280.c
index a1b650e..3665e5e 100644
--- a/drivers/usb/gadget/net2280.c
+++ b/drivers/usb/gadget/net2280.c
@@ -1946,6 +1946,13 @@ stop_activity (struct net2280 *dev, struct usb_gadget_driver *driver)
  	for (i = 0; i < 7; i++)
  		nuke (&dev->ep [i]);

+	/* report disconnect; the driver is already quiesced */
+	if (driver) {
+		spin_unlock (&dev->lock);
+		driver->disconnect (&dev->gadget);
+		spin_lock (&dev->lock);

   Frankly speaking, I don't see any changes. :-P

WBR, Sergei

--
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