• Olof Johansson's avatar
    [PATCH] [VIA RHINE] older chips oops on shutdown · a176beea
    Olof Johansson authored
    I'm oopsing on shutdown on a machine that has a Via Rhine adapter in it:
    
    Unable to handle kernel paging request at virtual address e0803003
    [...]
    EIP is at ioread8+0x2c/0x40
    Call Trace:
     [<c0103d5f>] show_stack+0x7f/0xa0
     [<c0103efa>] show_registers+0x15a/0x1c0
     [<c01040ce>] die+0xce/0x150
     [<c0113406>] do_page_fault+0x356/0x692
     [<c01039ff>] error_code+0x2b/0x30
     [<c026b490>] rhine_shutdown+0x60/0x140
     [<c0253ad9>] device_shutdown+0x89/0x8b
     [<c012461c>] sys_reboot+0xac/0x200
     [<c0102f71>] sysenter_past_esp+0x52/0x75
    
    
    Seems like it is the ioread8 in:
    
            /* Hit power state D3 (sleep) */
            iowrite8(ioread8(ioaddr + StickyHW) | 0x03, ioaddr + StickyHW);
    
    that fails. StickyHW is 0x83. lspci says:
    
    0000:00:07.0 Ethernet controller: VIA Technologies, Inc. VT86C100A [Rhine] (rev 06)
            Flags: bus master, medium devsel, latency 32, IRQ 18
            I/O ports at ec00 [size=128]
            Memory at dfffff80 (32-bit, non-prefetchable) [size=128]
    
    In other words, it's trying to read outside of the I/O range (0x80),
    which matches the fauling address.
    
    I'm guessing my chip revision doesn't support WOL, it's a crappy noname
    card.
    
    It does seem as if rhine_power_init checks quirks for rqWOL before
    touching any registers. Should rhine_shutdown do the same? Proposed
    patch below, which resolves the problem on my system.
    Signed-off-by: default avatarJeff Garzik <jgarzik@pobox.com>
    a176beea
via-rhine.c 56.4 KB