summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@linux-foundation.org>2008-01-10 16:14:13 -0800
committerJeff Garzik <jeff@garzik.org>2008-01-12 17:49:10 -0500
commit84cd2dfb04d23a961c5f537baa243fa54d0987ac (patch)
tree431af8150d569fd58f22547d500db6595ff2697c /drivers
parent86c6887e6fea0b395dc939174ac80ad0ae88288c (diff)
downloadblackbird-op-linux-84cd2dfb04d23a961c5f537baa243fa54d0987ac.tar.gz
blackbird-op-linux-84cd2dfb04d23a961c5f537baa243fa54d0987ac.zip
sky2: remove check for PCI wakeup setting from BIOS
The driver checks status of PCI power management to mark default setting of Wake On Lan. On some systems this works, but often it reports a that WOL is disabled when it isn't. This patch gets rid of that check and just reports the wake on lan status based on the hardware capablity. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/sky2.c24
1 files changed, 5 insertions, 19 deletions
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index bc15940ce1bc..7023bbe545ee 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -3949,7 +3949,7 @@ static __exit void sky2_debug_cleanup(void)
/* Initialize network device */
static __devinit struct net_device *sky2_init_netdev(struct sky2_hw *hw,
unsigned port,
- int highmem, int wol)
+ int highmem)
{
struct sky2_port *sky2;
struct net_device *dev = alloc_etherdev(sizeof(*sky2));
@@ -3989,7 +3989,7 @@ static __devinit struct net_device *sky2_init_netdev(struct sky2_hw *hw,
sky2->speed = -1;
sky2->advertising = sky2_supported_modes(hw);
sky2->rx_csum = (hw->chip_id != CHIP_ID_YUKON_XL);
- sky2->wol = wol;
+ sky2->wol = sky2_wol_supported(hw) & WAKE_MAGIC;
spin_lock_init(&sky2->phy_lock);
sky2->tx_pending = TX_DEF_PENDING;
@@ -4086,24 +4086,12 @@ static int __devinit sky2_test_msi(struct sky2_hw *hw)
return err;
}
-static int __devinit pci_wake_enabled(struct pci_dev *dev)
-{
- int pm = pci_find_capability(dev, PCI_CAP_ID_PM);
- u16 value;
-
- if (!pm)
- return 0;
- if (pci_read_config_word(dev, pm + PCI_PM_CTRL, &value))
- return 0;
- return value & PCI_PM_CTRL_PME_ENABLE;
-}
-
static int __devinit sky2_probe(struct pci_dev *pdev,
const struct pci_device_id *ent)
{
struct net_device *dev;
struct sky2_hw *hw;
- int err, using_dac = 0, wol_default;
+ int err, using_dac = 0;
err = pci_enable_device(pdev);
if (err) {
@@ -4136,8 +4124,6 @@ static int __devinit sky2_probe(struct pci_dev *pdev,
}
}
- wol_default = pci_wake_enabled(pdev) ? WAKE_MAGIC : 0;
-
err = -ENOMEM;
hw = kzalloc(sizeof(*hw), GFP_KERNEL);
if (!hw) {
@@ -4181,7 +4167,7 @@ static int __devinit sky2_probe(struct pci_dev *pdev,
sky2_reset(hw);
- dev = sky2_init_netdev(hw, 0, using_dac, wol_default);
+ dev = sky2_init_netdev(hw, 0, using_dac);
if (!dev) {
err = -ENOMEM;
goto err_out_free_pci;
@@ -4218,7 +4204,7 @@ static int __devinit sky2_probe(struct pci_dev *pdev,
if (hw->ports > 1) {
struct net_device *dev1;
- dev1 = sky2_init_netdev(hw, 1, using_dac, wol_default);
+ dev1 = sky2_init_netdev(hw, 1, using_dac);
if (!dev1)
dev_warn(&pdev->dev, "allocation for second device failed\n");
else if ((err = register_netdev(dev1))) {
OpenPOWER on IntegriCloud