Bug 5624 - (net b44) FR: Clean up the fix for: Lockup on 'mii-tool ethX' when 'ifconfig ethX up' is not yet done
Summary: (net b44) FR: Clean up the fix for: Lockup on 'mii-tool ethX' when 'ifconfig ...
Status: CLOSED OBSOLETE
Alias: None
Product: Drivers
Classification: Unclassified
Component: Network (show other bugs)
Hardware: i386 Linux
: P2 high
Assignee: drivers_network@kernel-bugs.osdl.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-17 14:37 UTC by Remko Bijker
Modified: 2012-05-12 01:33 UTC (History)
4 users (show)

See Also:
Kernel Version: 2.6.15-rc1
Subsystem:
Regression: No
Bisected commit-id:


Attachments
complete dmesg output (13.99 KB, text/plain)
2005-11-17 14:50 UTC, Remko Bijker
Details
complete lspci output (10.16 KB, text/plain)
2005-11-17 14:51 UTC, Remko Bijker
Details
output of ver_linux (692 bytes, text/plain)
2005-11-17 14:52 UTC, Remko Bijker
Details
early return in dev->do_ioctl when the device is not up (876 bytes, patch)
2005-11-21 14:43 UTC, Francois Romieu
Details | Diff

Description Remko Bijker 2005-11-17 14:37:29 UTC
Most recent kernel where this bug did not occur:
do not know, can only test fairly recent kernels (drivers of IDE/SATA
controller), but I think I had this problem before on a 2.6.12 kernel, but am
not 100% sure.

Distribution:
Debian Unstable

Hardware Environment:
lspci -vvv (of network card):
0000:03:00.0 Ethernet controller: Broadcom Corporation BCM4401-B0 100Base-TX
(rev 02)
        Subsystem: Dell Inspiron 6000 laptop
        Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR+ FastB2B-
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort-
<MAbort- >SERR- <PERR-
        Latency: 64
        Interrupt: pin A routed to IRQ 9
        Region 0: Memory at dfdfe000 (32-bit, non-prefetchable) [size=8K]
        Capabilities: [40] Power Management version 2
                Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA
PME(D0+,D1+,D2+,D3hot+,D3cold+)
                Status: D0 PME-Enable- DSel=0 DScale=2 PME-

Software Environment:
mii-tool.c 1.9 2000/04/28 00:56:08 (David Hinds)
ifconfig 1.42 (2001-04-13)
gcc (GCC) 4.0.3 20051111 (prerelease) (Debian 4.0.2-4)

Problem Description:
Computer/kernel freezes/locks up solid every time when 'mii-tool ethX' is done,
while no 'ifconfig ethX up' is done. It works properly when ifconfig is done
before mii-tool.
After some 'research' with printk's I found out that it happens when a
SIOCGMIIPHY is sent to the ioctl. It finally freezes over 'u32 val = br32(bp,
reg);' in b44_wait_bit.
I presume that the hardware is not brought up properly, as I see

Steps to reproduce:
- start computer, but do not run 'ifconfig ethX up' (i.e. disable network scripts)
- mii-tool ethX
=== computer freezes ===
Comment 1 Remko Bijker 2005-11-17 14:50:42 UTC
Created attachment 6608 [details]
complete dmesg output
Comment 2 Remko Bijker 2005-11-17 14:51:56 UTC
Created attachment 6609 [details]
complete lspci output
Comment 3 Remko Bijker 2005-11-17 14:52:45 UTC
Created attachment 6610 [details]
output of ver_linux
Comment 4 Francois Romieu 2005-11-21 14:43:30 UTC
Created attachment 6641 [details]
early return in dev->do_ioctl when the device is not up

It's probably a bit late in the 2.6.15-rcX cycle to try to move the
init sequence from the device open routine to the PCI probe one.

--
Ueimor
Comment 5 Remko Bijker 2005-11-30 11:16:27 UTC
The patch solves the freeze, although "SIOCGMIIPHY on 'eth0' failed: Invalid
argument" is not a very clear explanation.
I think it would be usefull to start the device, i.e. run the init sequence,
when mii-tool is run, but the interface is still down.
Comment 6 Andrew Morton 2006-01-19 02:08:56 UTC
Francois, did a patch get merged up for this?
Comment 7 Francois Romieu 2006-01-19 04:28:51 UTC
> Francois, did a patch get merged up for this?

Yes. It is gross but it works.

I would not mind an extra state in bugzilla to turn the PR
into a feature request (the patch is _really_ gross).

--
Ueimor
Comment 8 Natalie Protasevich 2008-03-10 20:59:27 UTC
But having such resolution type would be really helpful, I'll work on that. 
Was the problem resolved, should it be closed?
Thanks.
Comment 9 Natalie Protasevich 2008-03-10 20:59:52 UTC
Sorry, I closed it prematurely.

Note You need to log in before you can comment on or make changes to this bug.