Skip to contentSkip to conversation

issues with commit usbnet: mcs7830: apply usbnet_link_change

DISCUSSION Ming Lei 1 participant 2 messages Jul 31, 2013 1 message not in the archive

Subsystems (4)
lore
Share & tools
lore

Ming Lei

author
#1 lore raw
In reply to a message not in the archive
Quoted 10 lines · Till Schmalmack

Hello Ming,

I am experiencing issues with the usbnet commits you did for the 3.10 kernel, in particular with

4be74c13 usbnet: mcs7830: apply usbnet_link_change

I filed this bug

https://bugzilla.kernel.org/show_bug.cgi?id=60662

Thanks for the report.

Looks you didn't provide any debug info, could you apply the attachment patch and post the 'dmesg' info when you reproduce the bug.

Thanks,
--
Ming Lei

drivers/net/usb/usbnet.c +7 -0
index 06ee82f..1420418 100644
@@ -1004,6 +1004,8 @@ static const struct ethtool_ops usbnet_ethtool_ops = {
 
 static void __handle_link_change(struct usbnet *dev)
 {
+	int link;
+
 	if (!test_bit(EVENT_DEV_OPEN, &dev->flags))
 		return;
 
@@ -1015,12 +1017,15 @@ static void __handle_link_change(struct usbnet *dev)
 		 * tx_timeout will unlink URBs for sending packets and
 		 * tx queue is stopped by netcore after link becomes off
 		 */
+		link = 0;
 	} else {
 		/* submitting URBs for reading packets */
 		tasklet_schedule(&dev->bh);
+		link = 1;
 	}
 
 	clear_bit(EVENT_LINK_CHANGE, &dev->flags);
+	dev_info(&dev->udev->dev, "%s link=%d\n", __func__, link);
 }
 
 /* work that cannot be done in interrupt context uses keventd.
@@ -1748,6 +1753,8 @@ EXPORT_SYMBOL(usbnet_manage_power);
 
 void usbnet_link_change(struct usbnet *dev, bool link, bool need_reset)
 {
+	dev_info(&dev->udev->dev, "%s link=%d reset=%d\n", __func__, link,
+			need_reset);
 	/* update link after link is reseted */
 	if (link && !need_reset)
 		netif_carrier_on(dev->net);
author
#2 lore raw
Quoted 8 lines · Ming Lei
Quoted 7 lines · Till Schmalmack

Hello Ming,

I am experiencing issues with the usbnet commits you did for the 3.10 kernel, in particular with

4be74c13 usbnet: mcs7830: apply usbnet_link_change

Quoted 8 lines
Quoted 3 lines

I filed this bug

https://bugzilla.kernel.org/show_bug.cgi?id=60662

Thanks for the report.

Looks you didn't provide any debug info, could you apply the attachment patch and post the 'dmesg' info when you reproduce the bug.

Also I am wondering the commit 4be74c13(usbnet: mcs7830: apply usbnet_link_change) may cause the regression.

If you look at commit 4be74c13(usbnet: mcs7830: apply usbnet_link_change) and commit ac64995da(usbnet: introduce usbnet_link_change API),
you may find basically no real code changes on msc7830 drivers, and only the below code is moved into usbnet_link_change() from mcs7830_status, isn't it?

       if (link)
               netif_carrier_on(dev->net);
       else
               netif_carrier_off(dev->net);

Thanks,
--
Ming Lei