freeipmi-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Freeipmi-devel] IPMI not available after shutdown -h


From: Jeffrey Wong
Subject: [Freeipmi-devel] IPMI not available after shutdown -h
Date: Thu, 3 Mar 2005 18:08:42 -0800

Here's the solution to this problem for people using the e1000 driver.

Some linux systems, Gentoo in particular, will turn off the network
interfaces during the shutdown process.  This causes commands to be
sent to the interface instructing it to power down completely.  What
happens is the interface shuts down, preventing the IPMI controller
from connecting.  The solution is fairly simple, remove these shutdown
instructions from the driver.

Edit the e1000_main.c file in your kernel. 
(/usr/src/linux/drivers/net/e1000/e1000_main.c)
Add the lines marked with a +.
-----
void
e1000_down(struct e1000_adapter *adapter)
{
        struct net_device *netdev = adapter->netdev;

        e1000_irq_disable(adapter);
        free_irq(adapter->pdev->irq, netdev);
        del_timer_sync(&adapter->tx_fifo_stall_timer);
        del_timer_sync(&adapter->watchdog_timer);
        del_timer_sync(&adapter->phy_info_timer);
        adapter->link_speed = 0;
        adapter->link_duplex = 0;
        netif_carrier_off(netdev);
        netif_stop_queue(netdev);

        e1000_reset(adapter);
        e1000_clean_tx_ring(adapter);
        e1000_clean_rx_ring(adapter);

        /* If WoL is not enabled
         * Power down the PHY so no link is implied when interface is down */
+#if 0
        if(!adapter->wol && adapter->hw.media_type == e1000_media_type_copper) {
                uint16_t mii_reg;
                e1000_read_phy_reg(&adapter->hw, PHY_CTRL, &mii_reg);
                mii_reg |= MII_CR_POWER_DOWN;
                e1000_write_phy_reg(&adapter->hw, PHY_CTRL, mii_reg);
        }
+#endif
}
------
static int
e1000_notify_reboot(struct notifier_block *nb, unsigned long event, void *p)
{
        struct pci_dev *pdev = NULL;

        switch(event) {
        case SYS_DOWN:
        case SYS_HALT:
        case SYS_POWER_OFF:
                while((pdev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pdev))) {
+#if 0
                        if(pci_dev_driver(pdev) == &e1000_driver)
                                e1000_suspend(pdev, 3);
+#endif
                }
        }
       return NOTIFY_DONE;
}
-----


Much thanks to Albert Chu for pointing me in the right direction.

Good luck!
-jw




reply via email to

[Prev in Thread] Current Thread [Next in Thread]