The patch titled 8139cp: pci_get_drvdata(pdev) can not be NULL in suspend handler has been added to the -mm tree. Its filename is 8139cp-pci_get_drvdatapdev-can-not-be-null-in-suspend-handler.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: 8139cp: pci_get_drvdata(pdev) can not be NULL in suspend handler From: Francois Romieu <romieu@xxxxxxxxxxxxx> 1) pci_set_drvdata() is used in cp_{init/remove}_one to initialize/reset driver_data to the relevant value (resp. net_device * and NULL). 2) each of the 3 relevant functions is issued under (device *)->sem: 2.1) pci_unregister_driver -> driver_unregister -> bus_remove_driver -> driver_detach (takes (device *)->sem) -> __device_release_driver(dev) -> dev->bus-remove(dev) (== pci_device_remove) -> drv->remove(pdev) (== cp_remove_one) [...] pci_dev->driver = NULL; 2.2) pci_register_driver -> __pci_register_driver -> driver_register -> bus_add_driver -> driver_attach -> __driver_attach (takes (device *)->sem) -> driver_probe_device(drv, dev) -> dev->bus->probe(dev) (== pci_device_probe) -> _pci_device_probe(drv, pci_dev) -> pci_call_probe(drv, pci_dev, id) -> drv->probe(dev, id) (== cp_init_one) [...] pci_dev->driver = drv; 2.3) suspend_device (takes (device *)->sem) -> dev->bus->suspend(dev) (== pci_device_suspend) checking for drv = pci_dev->driver != NULL [...] -> drv->suspend(pci_dev, state) (== cp_suspend) dev->sem and the state of pci_dev->driver provide the expected result. St Mary's day was a bit rainy here. Signed-off-by: Francois Romieu <romieu@xxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- drivers/net/8139cp.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff -puN drivers/net/8139cp.c~8139cp-pci_get_drvdatapdev-can-not-be-null-in-suspend-handler drivers/net/8139cp.c --- a/drivers/net/8139cp.c~8139cp-pci_get_drvdatapdev-can-not-be-null-in-suspend-handler +++ a/drivers/net/8139cp.c @@ -2023,14 +2023,12 @@ static void cp_remove_one (struct pci_de #ifdef CONFIG_PM static int cp_suspend (struct pci_dev *pdev, pm_message_t state) { - struct net_device *dev; - struct cp_private *cp; + struct net_device *dev = pci_get_drvdata(pdev); + struct cp_private *cp = netdev_priv(dev); unsigned long flags; - dev = pci_get_drvdata (pdev); - cp = netdev_priv(dev); - - if (!dev || !netif_running (dev)) return 0; + if (!netif_running(dev)) + return 0; netif_device_detach (dev); netif_stop_queue (dev); _ Patches currently in -mm which might be from romieu@xxxxxxxxxxxxx are 8139cp-trim-ring_info.patch 8139cp-remove-gratuitous-indirection.patch 8139cp-ring_info-removal-for-the-receive-path.patch 8139cp-sync-the-device-private-data-with-its-r8169-counterpart.patch 8139cp-removal-of-useless-bug_on-check.patch 8139cp-pci_get_drvdatapdev-can-not-be-null-in-suspend-handler.patch 8139cp-use-pci_device-to-shorten-the-pci-device-table.patch git-r8169.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html