• Jeff Garzik's avatar
    [netdrvr] ewrk3: correct card detection bug · 991b5557
    Jeff Garzik authored
    Arwin Vosselman pointed out:
    > The ewrk3-driver doesn't function with 2.6.16-kernels (used 2.6.16.41 for
    > my tests). Cards will never be detected due to this bug.
    >
    > drivers/net/ewrks3.c:
    > Line 417 reads:
    >
    > if (nicsr == (CSR_TXD | CSR_RXD))
    >
    > that should be:
    >
    > if (nicsr != (CSR_TXD | CSR_RXD))
    >
    > Comparison with the same line in v2.4 shows why:
    >
    > 2.4:
    > if (nicsr == (CSR_TXD | CSR_RXD)){
    >
    > blah, blah
    > ==========
    > 2.6:
    > if (nicsr == (CSR_TXD | CSR_RXD))
    >     return -ENXIO;
    >
    > blah, blah
    > ==========
    >
    > blah,blah will not, but should, be executed in 2.6 with a card being present.
    >
    > The fix mentioned above solves this bug.
    Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
    991b5557
ewrk3.c 52.4 KB