From: David S. Miller Date: Thu, 7 Apr 2011 21:05:23 +0000 (-0700) Subject: Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 X-Git-Tag: firefly_0821_release~3680^2~5008^2~646 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=c1e48efc701b79ee4367c9a1a4e8bbc7c3586e02;p=firefly-linux-kernel-4.4.55.git Merge branch 'master' of /linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/benet/be_main.c --- c1e48efc701b79ee4367c9a1a4e8bbc7c3586e02 diff --cc drivers/net/benet/be_main.c index a24fb45c0f71,88d4c8038be4..2c3685389485 --- a/drivers/net/benet/be_main.c +++ b/drivers/net/benet/be_main.c @@@ -3152,11 -3142,14 +3153,13 @@@ static int be_resume(struct pci_dev *pd static void be_shutdown(struct pci_dev *pdev) { struct be_adapter *adapter = pci_get_drvdata(pdev); - struct net_device *netdev = adapter->netdev; + + if (!adapter) + return; - if (netif_running(adapter->netdev)) - cancel_delayed_work_sync(&adapter->work); + cancel_delayed_work_sync(&adapter->work); - netif_device_detach(netdev); + netif_device_detach(adapter->netdev); be_cmd_reset_function(adapter); diff --cc drivers/net/smsc911x.c index 8b501d53063f,4747846eb4f2..05a882e6e139 --- a/drivers/net/smsc911x.c +++ b/drivers/net/smsc911x.c @@@ -1811,16 -1811,17 +1811,17 @@@ static int __devinit smsc911x_init(stru struct smsc911x_data *pdata = netdev_priv(dev); unsigned int byte_test; - SMSC_TRACE(PROBE, "Driver Parameters:"); - SMSC_TRACE(PROBE, "LAN base: 0x%08lX", - (unsigned long)pdata->ioaddr); - SMSC_TRACE(PROBE, "IRQ: %d", dev->irq); - SMSC_TRACE(PROBE, "PHY will be autodetected."); + SMSC_TRACE(pdata, probe, "Driver Parameters:"); + SMSC_TRACE(pdata, probe, "LAN base: 0x%08lX", + (unsigned long)pdata->ioaddr); + SMSC_TRACE(pdata, probe, "IRQ: %d", dev->irq); + SMSC_TRACE(pdata, probe, "PHY will be autodetected."); spin_lock_init(&pdata->dev_lock); + spin_lock_init(&pdata->mac_lock); if (pdata->ioaddr == 0) { - SMSC_WARNING(PROBE, "pdata->ioaddr: 0x00000000"); + SMSC_WARN(pdata, probe, "pdata->ioaddr: 0x00000000"); return -ENODEV; } @@@ -2051,18 -2056,17 +2055,16 @@@ static int __devinit smsc911x_drv_probe retval = register_netdev(dev); if (retval) { - SMSC_WARNING(PROBE, - "Error %i registering device", retval); + SMSC_WARN(pdata, probe, "Error %i registering device", retval); goto out_unset_drvdata_4; } else { - SMSC_TRACE(PROBE, "Network interface: \"%s\"", dev->name); + SMSC_TRACE(pdata, probe, + "Network interface: \"%s\"", dev->name); } - spin_lock_init(&pdata->mac_lock); - retval = smsc911x_mii_init(pdev, dev); if (retval) { - SMSC_WARNING(PROBE, - "Error %i initialising mii", retval); + SMSC_WARN(pdata, probe, "Error %i initialising mii", retval); goto out_unregister_netdev_5; }