lkml.org 
[lkml]   [2007]   [Aug]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Date
    Subject[2.6.20.16 review 06/28] e1000: disable polling before registering netdevice
    To assure the symmetry of poll enable/disable in up/down, we should
    initialize the netdevice to be poll_disabled at load time. Doing
    this after register_netdevice leaves us open to another race, so
    lets move all the netif_* calls above register_netdevice so the
    stack starts out how we expect it to be.

    Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
    Cc: Herbert Xu <herbert@gondor.apana.org.au>
    Cc: Doug Chapman <doug.chapman@hp.com>
    Signed-off-by: Jeff Garzik <jeff@garzik.org>
    Signed-off-by: Chris Wright <chrisw@sous-sol.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
    ---
    drivers/net/e1000/e1000_main.c | 11 +++++++----
    1 files changed, 7 insertions(+), 4 deletions(-)

    diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
    index c6259c7..40bdcf9 100644
    --- a/drivers/net/e1000/e1000_main.c
    +++ b/drivers/net/e1000/e1000_main.c
    @@ -1157,13 +1157,16 @@ e1000_probe(struct pci_dev *pdev,
    !e1000_check_mng_mode(&adapter->hw))
    e1000_get_hw_control(adapter);

    - strcpy(netdev->name, "eth%d");
    - if ((err = register_netdev(netdev)))
    - goto err_register;
    -
    /* tell the stack to leave us alone until e1000_open() is called */
    netif_carrier_off(netdev);
    netif_stop_queue(netdev);
    +#ifdef CONFIG_E1000_NAPI
    + netif_poll_disable(netdev);
    +#endif
    +
    + strcpy(netdev->name, "eth%d");
    + if ((err = register_netdev(netdev)))
    + goto err_register;

    DPRINTK(PROBE, INFO, "Intel(R) PRO/1000 Network Connection
    ");

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

    \
     
     \ /
      Last update: 2007-08-11 21:09    [W:0.020 / U:0.060 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site