Re: eepro100.c

From: Andrew Morton (andrewm@uow.edu.au)
Date: Sat Mar 25 2000 - 10:05:50 EST

  • Next message: Russell King: "2.3.99pre3: multiple IP packets sent with ID 0"

    Andrey Savochkin wrote:
    >
    > Alan,
    >
    > I've applied the essential portion of this patch to the driver with some
    > other fixes:

    From a quick peek at eepro100:

    Is wait_for_cmd_done() racy? It is called from hard_start_xmit()
    outside the spinlock as well as from get_stats(). set_multicast_list()
    also.

    mdio_read() is called from various unprotected contexts, one of which is
    a bh. Confident about this?

    mdio_read() and write() use a self-timed timeout which will get 30%
    shorter each year (Moore's law should be repealed).

    tx_timeout() appears to be unprotected from the ISR.

    Then there's this magical construct which also appears in 3c59x's ioctl:

        switch(cmd) {
            case SIOCDEVPRIVATE: /* Get the address of the PHY in
    use. */
                    data[0] = phy;
            case SIOCDEVPRIVATE+1: /* Read the specified MII
    register. */
                    saved_acpi = pci_set_power_state (sp->pdev, 0);
                    data[3] = mdio_read (ioaddr, data[0], data[1]);

    This makes my brain hurt. data[0] is an output, data[1] is an input,
    data[2] is unused, data[3] is an output.

    Is this right?

    -- 
    -akpm-
    

    - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



    This archive was generated by hypermail 2b29 : Sat Mar 25 2000 - 10:38:23 EST