Bug 60521
Summary: | [PATCH]usbnet changes in 3.10 stop use of sierra_net devices | ||
---|---|---|---|
Product: | Drivers | Reporter: | Ryley Angus (ryleyjangus) |
Component: | Network | Assignee: | drivers_network (drivers_network) |
Status: | RESOLVED CODE_FIX | ||
Severity: | blocking | CC: | alan, chris, kernel-bugzilla, ryleyjangus |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 3.10 | Subsystem: | |
Regression: | Yes | Bisected commit-id: | |
Attachments: |
3.10 patch for sierra modems
sierra_net 3.10 patch v2 Fix usbnet_status_start behaviour Fix usbnet behaviour v3 Fix for usbnet when using sierra_net |
So after testing (rebooting, suspending etc) that change to the sierra_net driver, I realized that it didn't work all the time. Or even most of the time. The same issue persisted. I tried reverting the the sierra_net.c file to its pre-3.10 state and this has been working all day. No other files had to be modified. Cold-reboots, warm-reboots and suspending haven't caused the behavior to regress. I've attached a patch reflecting this change (I manually reverted the changes in 3.10). Could someone with a Sierra 3G/4G modem please test it? ryley Created attachment 106817 [details]
sierra_net 3.10 patch v2
Revert most (all?) changes to the sierra_net driver after kernel 3.9 to restore normal functionality
Looking into this a bit more, I found my issue stemmed from the change in sierra_net.c to use sierra_net_probe instead of usbnet_probe (From http://patchwork.ozlabs.org/patch/241796/ ). I looked at the sierra_net_probe function within sierra_net.c and I found my problem was with the usbnet_status_start function from usbnet.c (Introduced in http://patchwork.ozlabs.org/patch/241793/ ). After removing the single reference to this function, my modem worked without issue. I then followed the usbnet_status_start function to see where it was stuffing me up. I found that replacing "if (++dev->interrupt_count == 1)" with "if (dev->interrupt_count == 0)" within usbnet.c fixed my issue without any modifications to the sierra_net driver. I think some changes may have to be made to the usbnet_status_stop function, but I'm not too sure about what I'd have to change exactly. If someone could please respond to me about this it'd be great. I've tried emailing the aforementioned patches author (Dan Williams) without any response so far. Created attachment 106955 [details]
Fix usbnet_status_start behaviour
The usbnet_status_start function in usbnet.c does not properly function. It prevents mine (and I think all other) Sierra 3G/4G modems from functioning in kernels > 3.10.0. The Sierra devices are the only ones which actually utilise this function. This patch tries to fix the logic within usbnet_status_start. It has been tested without issue for several days.
Similar effect but possibly different reason filed in bug #60662. After playing around with the previous changes I'd made, I found "dev->interrupt_count == 0" was causing error messages in dmesg after removing the device. If I reattached it, it still worked without issue. By instead replacing "dev->interrupt_count == 1" with "dev->interrupt_count == 2", I get both a proper connection and a lack of any error messages in dmesg after removal/insertion of the device. Created attachment 107080 [details]
Fix usbnet behaviour v3
@Till Schmalmack: Could apply my latest change to usbnet.c and rebuild the usbnet module/your current kernel? I think you may have a similar issue to me and I'd like to know if it fixes your problem. (In reply to Ryley Angus from comment #8) I did, didn't help. It seems that we are indeed facing different problems. Hi, today we found the real issue regarding usbnet + sierra_net. Withou applying your patch, but using the patch that is posted here: http://thread.gmane.org/gmane.linux.usb.general/97907 It resolves our problems using MC7710, MC8705, MC8700 with directip. Have fun Created attachment 114401 [details]
Fix for usbnet when using sierra_net
|
Created attachment 106810 [details] 3.10 patch for sierra modems Hopefully this is the right section, sorry in advance if not. I'm using Arch Linux and my system is completely up to date. After upgrading to linux-3.10.0-1-ARCH, my Sierra 320U modem is no longer working correctly. It will repeatedly try and fail to connect properly . Until this, I had never had any issues connecting. This modem uses the mainline sierra and sierra_net modules. I don't have any other UMTS/HSDPA/CDMA modems to test to see if any other devices display similar behavior. If I boot into linux-3.9.9 it will connect without issue. Using both 3.9.9 and 3.10, my WLAN works perfectly with all adapters and networks I have available, as does Ethernet (that's why I thought this might be specific to the sierra driver). From the status LED's on the modem I can see it connects to the 3G network, but the issue seems to be getting an IP address. The only relevant output in dmesg under 3.10 is "IPv6: ADDRCONF(NETDEV_UP): <interface>: link is not ready". I usually use Network Manager to manage my connections, but I can also manually connect using minicom to control the modem and "dhcpcd -nw <interface>" to get an IP and bring the interface up. The behavior is same regardless, with dhcpcd outputting "<interface>: waiting for carrier" before timing out. I looked at the changes to the sierra_net module from kernel 3.9 to 3.10 and changing "sierra_net_probe" to "usbnet_probe" restored the previous behavior exactly (for both Network Manager and minicom/dhcpcd). I have no idea why this fixed it or if it has broken anything else that I haven't noticed. I've attached a patch containing this change, but I'm pretty sure it's not the same layout patches usually are. Please let me know if my fix was incorrect/dangerous/a coincidence, ryley.