[Prism54-devel] [PATCH] handle mgmt timeouts by resetting hardware

Mike Snitzer snitzer at gmail.com
Mon Aug 2 20:57:55 UTC 2004


With this reset.patch applied to today's (cvs20040802) tarball I get a
panic with my WG511 when I insert the card; without the patch no
panic.  I'm using 2.6.8-rc2-bk1, please see attached log.

On Sun, 1 Aug 2004 11:54:58 +0300, Denis Vlasenko
<vda at port.imtp.ilyichevsk.odessa.ua> wrote:
> Patch is against cvs 20040801 + my set_rates patch,
> however, I think they do not intersect.
> 
> Highlights:
> * islpci_mgt_transaction() will reset hardware if mgmt transaction
>   times out. It takes care not to race with tx timeout reset and
>   also to not go into endless recursion. Atomic counters and bit ops
>   are used to guarantee that.
> * A watchdog timer is added which wakes up every 2 seconds.
>   It is an empty function now. The plan is to poll hardware,
>   probing for hangups. Currently, I still can hit a case when
>   'iwconfig ethN' is needed to trigger islpci_mgt_transaction()
>   which times out and triggers reset.
> * Reset code mabe a bit more verbose about success/failure.
> * Superfluous NULLs killed. Not needed since islpci_mgt_transaction()
>   sets response to NULL as a first step.
> 
> TODO after this patch got merged:
> 
> * islpci_mgt_transaction() shall retry transaction after reset.
> * make watchdog do lockup detection, maybe by execute some
>   innocuous mgt transaction.
> * look here at current function tree:
> islpci_reset(int needed):
>     clean up rx and mgt rings
>     if(needed)
>         islpci_upload_fw()
>     islpci_reset_if()
> islpci_reset_if:
>     isl38xx_interface_reset()
>     [waits on waitqueue, which is awakened in irq handler]
>     if(did not timeout)
>         isl38xx_enable_common_interrupts()
>         mgt_commit(priv)
> isl38xx_interface_reset:
>     pokes registers, initiating reset
>     enables INIT intr
> Note that 'clean up rx and mgt rings' stage is run BEFORE
> we told hardware to reset itself. Hell knows what it is doing
> there. We must make sure it does not interfere with
> our cleanups and fw upload.
> 
> Patch is tested with heavy pinging across weak link
> for several hours.
> 
> While it is not 'rock stable' yet, it is much better
> than before.
> 
> Please apply.
> --
> vda
> 
> 
>
-------------- next part --------------
Loaded prism54 driver, version 1.2
PCI: Enabling device 0000:02:00.0 (0000 -> 0002)
ACPI: PCI interrupt 0000:02:00.0[A] -> GSI 11 (level, low) -> IRQ 11
Unable to handle kernel paging request at virtual address ffbbf003
 printing eip:
c013b71c
*pde = 00000000
Oops: 0000 [#1]
PREEMPT 
Modules linked in: prism54 firmware_class ds yenta_socket pcmcia_core e100 mii microcode uhci_hcd usbcore thermal processor fan button battery ac rtc
CPU:    0
EIP:    0060:[<c013b71c>]    Not tainted
EFLAGS: 00010006   (2.6.8-rc2-bk1) 
EIP is at free_block+0x4c/0xe0
eax: 00800000   ebx: ffbbefff   ecx: 00000000   edx: c1000000
esi: c102ba38   edi: 00000000   ebp: ecaf9e24   esp: ecaf9e08
ds: 007b   es: 007b   ss: 0068
Process iwconfig (pid: 2183, threadinfo=ecaf9000 task=ee326d70)
Stack: 00000000 c03ab874 c102ba44 c102ba54 c102ba48 20000800 00000282 ecaf9e4c 
       c013b7fd c102ba38 c102ba48 20000800 00000000 20000800 c102ba38 c15d1b20 
       00000282 ecaf9e68 c013bbf9 c102ba38 c102ba38 ecb98a28 17000007 0000002b 
Call Trace:
 [<c01050ff>] show_stack+0x7f/0xa0
 [<c01052a6>] show_registers+0x156/0x1b0
 [<c0105449>] die+0x89/0x100
 [<c01135b6>] do_page_fault+0x1f6/0x5be
 [<c0104d85>] error_code+0x2d/0x38
 [<c013b7fd>] cache_flusharray+0x4d/0xd0
 [<c013bbf9>] kfree+0x59/0x60
 [<f01a9bce>] mgt_get_request+0x1ae/0x2c0 [prism54]
 [<f01a4e39>] prism54_get_freq+0x39/0x50 [prism54]
 [<c027631a>] wireless_process_ioctl+0xea/0x710
 [<c026cee9>] dev_ioctl+0x239/0x350
 [<c0262aaf>] sock_ioctl+0x2df/0x310
 [<c0162df0>] sys_ioctl+0x100/0x270
 [<c0104329>] sysenter_past_esp+0x52/0x71
Code: 8b 53 04 8b 03 89 50 04 89 02 8b 43 0c 31 d2 c7 03 00 01 10 
 <6>note: iwconfig[2183] exited with preempt_count 1
Debug: sleeping function called from invalid context at include/linux/rwsem.h:43
in_atomic():1, irqs_disabled():0
 [<c010513e>] dump_stack+0x1e/0x30
 [<c0115fb7>] __might_sleep+0xb7/0xe0
 [<c011a9b6>] do_exit+0xa6/0x460
 [<c01054b9>] die+0xf9/0x100
 [<c01135b6>] do_page_fault+0x1f6/0x5be
 [<c0104d85>] error_code+0x2d/0x38
 [<c013b7fd>] cache_flusharray+0x4d/0xd0
 [<c013bbf9>] kfree+0x59/0x60
 [<f01a9bce>] mgt_get_request+0x1ae/0x2c0 [prism54]
 [<f01a4e39>] prism54_get_freq+0x39/0x50 [prism54]
 [<c027631a>] wireless_process_ioctl+0xea/0x710
 [<c026cee9>] dev_ioctl+0x239/0x350
 [<c0262aaf>] sock_ioctl+0x2df/0x310
 [<c0162df0>] sys_ioctl+0x100/0x270
 [<c0104329>] sysenter_past_esp+0x52/0x71


More information about the Prism54-devel mailing list