Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 144662 - Problems with the sky2 driver: Hang on upload
Summary: Problems with the sky2 driver: Hang on upload
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Daniel Drake (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-21 10:09 UTC by justforkix
Modified: 2006-11-08 08:49 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge_info.txt,2.57 KB, text/plain)
2006-08-21 10:12 UTC, justforkix
Details
lspci -v -v (lspci.txt,1.67 KB, text/plain)
2006-08-21 10:13 UTC, justforkix
Details
cat /proc/interrupts (interrupts.txt,697 bytes, text/plain)
2006-08-21 10:20 UTC, justforkix
Details
patch (sky2-tx.patch,7.39 KB, patch)
2006-09-11 19:20 UTC, Daniel Drake (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description justforkix 2006-08-21 10:09:25 UTC
I have a core duo laptop with Marvell 88E8036 chipset. I'm able to consistently download any number of files via this ethernet controller. In particular, emerge --sync, emerge -uD world work without a problem. 

However, syncing up from the laptop, i.e., rsync -auv some_dir user@server:some_other_dir hangs. At that point, eth0 seems to hang completely. Even ping stops responding.

I have tried linux-2.6.16-suspend2-r7, linux-2.6.17-suspend2-r3 and vanilla sources linux-2.6.18-rc4. I even downloaded the latest sky2.c from netdev repository (sky2.c version1.6). Problem persists.
Comment 1 justforkix 2006-08-21 10:12:38 UTC
Created attachment 94781 [details]
emerge --info
Comment 2 justforkix 2006-08-21 10:13:03 UTC
Created attachment 94782 [details]
lspci -v -v
Comment 3 justforkix 2006-08-21 10:20:36 UTC
Created attachment 94783 [details]
cat /proc/interrupts
Comment 4 Daniel Drake (RETIRED) gentoo-dev 2006-08-27 09:08:15 UTC
Please retest with gentoo-sources-2.6.17-r6
Comment 5 justforkix 2006-08-28 06:09:17 UTC
(In reply to comment #4)
> Please retest with gentoo-sources-2.6.17-r6
> 
Daniel,
I have already tested sky2.c v1.6 with linux-2.6.18-rc4 (vanilla). Any reason to expect that results will be different with gentoo-sources?

I have recently found a work around. I emerged ethtool and manually turned on flow control. 
ethtool -A autoneg off rx on tx on

After this, uploads from my laptop do not "hang". This has worked for atleast one another sky2 user. Please see my comment and the response at
http://bugzilla.kernel.org/show_bug.cgi?id=6839#c12
 
Comment 7 justforkix 2006-09-06 10:38:06 UTC
No luck. Didn't apply all of them, only the flow control and the forced pause patch. 

I've been playing with netcat. Interestingly, the RX part is always working! It is only the TX channel which "hangs"! 

Also wanted to note that sk98lin patch with suspend2-sources 2.6.17-r3  works for me. Perhaps we should include it with gentoo-patches as a viable alternative?

(In reply to comment #6)
> Here are some new patches for you to try, at least one of which looks very
> promising (related to flow control):
> 
> http://marc.theaimsgroup.com/?l=linux-netdev&m=115749581319113&w=2
> http://marc.theaimsgroup.com/?l=linux-netdev&m=115749590030341&w=2
> http://marc.theaimsgroup.com/?l=linux-netdev&m=115749581308810&w=2
> http://marc.theaimsgroup.com/?l=linux-netdev&m=115749568622871&w=2
> http://marc.theaimsgroup.com/?l=linux-netdev&m=115749601124384&w=2
> http://marc.theaimsgroup.com/?l=linux-netdev&m=115749566305853&w=2
> 
Comment 8 Daniel Drake (RETIRED) gentoo-dev 2006-09-09 19:44:06 UTC
Please retest with gentoo-sources-2.6.17-r8
Comment 9 justforkix 2006-09-11 09:23:11 UTC
Problem persists.

BTW, I can confirm that while TX (from laptop to other machine) hangs, RX part works fine. Here is how.
Run netcat in udp-listen mode on laptop. 
laptop# nc -l -n -u -p 12345
On the server, use netcat to connect to laptop. 
server# nc -n -u laptop.local.net 12345
rsync some_dir to server
laptop# rsync -auv some_dir server.local.net:tmp/
        ^^^
This hangs.
However, when I type random garbage on server's netcat, it is recieved just fine on the laptop.
Perhaps you could pass it along to upstream.

Meanwhilw, what do you think of keeping sk98lin synced with it's upstream? 
-manuj
(In reply to comment #8)
> Please retest with gentoo-sources-2.6.17-r8
> 
Comment 10 Daniel Drake (RETIRED) gentoo-dev 2006-09-11 11:43:26 UTC
We won't ship sk98lin because it includes many bugs not present in sky2 and including that would slow down the fixing of sky2. Later on I will post another patch for you to try, which looks promising...
Comment 11 Daniel Drake (RETIRED) gentoo-dev 2006-09-11 19:20:53 UTC
Created attachment 96764 [details, diff]
patch

Please apply this onto gentoo-sources-2.6.17-r8
Comment 12 justforkix 2006-09-14 13:42:48 UTC
Problem persists. 

Earlier I had  applied this earlier to vanilla-2.6.17.13 to noavail. 

I don't think this is due to flow-control. Even when auto-neg establishes a connection with flow control, I have the same problem.
Turning autoneg off with ethtool forces the link partner, which is a linksys switch, into half duplex mode. Additionally, when I connect the laptop directly to the server, everything works fine as long as the server is in 100baseT/Half. When I switch the server to 100baseT/Full, the laptop "hangs" as before.

(In reply to comment #11)
> Created an attachment (id=96764) [edit]
> patch
> 
> Please apply this onto gentoo-sources-2.6.17-r8
> 

Comment 13 Daniel Drake (RETIRED) gentoo-dev 2006-10-15 16:39:44 UTC
Please retest with gentoo-sources-2.6.18-r1
Comment 14 Daniel Drake (RETIRED) gentoo-dev 2006-10-20 19:53:58 UTC
Add this patch as well: http://marc.theaimsgroup.com/?l=linux-netdev&m=116138920228073&q=raw
Comment 15 Charlie Brackett 2006-10-20 21:07:08 UTC
I just tested with 2.6.18.1 vanilla + the 4005_sky2-v1.9.patch from gentoo-sources-2.6.18-r1 + the patch you just linked to.  It looks like this fixes things for me.

I was able to transfer about a gig to an nfs share without a problem while simultaneously receiving about 1.8 gigs from another share.
Comment 16 justforkix 2006-10-23 07:53:52 UTC
(In reply to comment #14)
> Add this patch as well:
> http://marc.theaimsgroup.com/?l=linux-netdev&m=116138920228073&q=raw
> 

This seems to have fixed the issue. Should I mark this bug as fixed?

Thanks
-manuj
Comment 17 Daniel Drake (RETIRED) gentoo-dev 2006-10-23 08:08:22 UTC
THanks for testing. Leave this bug open until it is fixed in portage.
Comment 18 Daniel Drake (RETIRED) gentoo-dev 2006-11-08 08:49:11 UTC
Fixed in gentoo-sources-2.6.18-r2