aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/via-rhine.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/net/via-rhine.c b/drivers/net/via-rhine.c
index fda367b92a28..ae971080e2e4 100644
--- a/drivers/net/via-rhine.c
+++ b/drivers/net/via-rhine.c
@@ -44,6 +44,10 @@ static int max_interrupt_work = 20;
44 Setting to > 1518 effectively disables this feature. */ 44 Setting to > 1518 effectively disables this feature. */
45static int rx_copybreak; 45static int rx_copybreak;
46 46
47/* Work-around for broken BIOSes: they are unable to get the chip back out of
48 power state D3 so PXE booting fails. bootparam(7): via-rhine.avoid_D3=1 */
49static int avoid_D3;
50
47/* 51/*
48 * In case you are looking for 'options[]' or 'full_duplex[]', they 52 * In case you are looking for 'options[]' or 'full_duplex[]', they
49 * are gone. Use ethtool(8) instead. 53 * are gone. Use ethtool(8) instead.
@@ -120,9 +124,11 @@ MODULE_LICENSE("GPL");
120module_param(max_interrupt_work, int, 0); 124module_param(max_interrupt_work, int, 0);
121module_param(debug, int, 0); 125module_param(debug, int, 0);
122module_param(rx_copybreak, int, 0); 126module_param(rx_copybreak, int, 0);
127module_param(avoid_D3, bool, 0);
123MODULE_PARM_DESC(max_interrupt_work, "VIA Rhine maximum events handled per interrupt"); 128MODULE_PARM_DESC(max_interrupt_work, "VIA Rhine maximum events handled per interrupt");
124MODULE_PARM_DESC(debug, "VIA Rhine debug level (0-7)"); 129MODULE_PARM_DESC(debug, "VIA Rhine debug level (0-7)");
125MODULE_PARM_DESC(rx_copybreak, "VIA Rhine copy breakpoint for copy-only-tiny-frames"); 130MODULE_PARM_DESC(rx_copybreak, "VIA Rhine copy breakpoint for copy-only-tiny-frames");
131MODULE_PARM_DESC(avoid_D3, "Avoid power state D3 (work-around for broken BIOSes)");
126 132
127/* 133/*
128 Theory of Operation 134 Theory of Operation
@@ -823,6 +829,9 @@ static int __devinit rhine_init_one(struct pci_dev *pdev,
823 } 829 }
824 } 830 }
825 rp->mii_if.phy_id = phy_id; 831 rp->mii_if.phy_id = phy_id;
832 if (debug > 1 && avoid_D3)
833 printk(KERN_INFO "%s: No D3 power state at shutdown.\n",
834 dev->name);
826 835
827 return 0; 836 return 0;
828 837
@@ -1911,7 +1920,8 @@ static void rhine_shutdown (struct pci_dev *pdev)
1911 } 1920 }
1912 1921
1913 /* Hit power state D3 (sleep) */ 1922 /* Hit power state D3 (sleep) */
1914 iowrite8(ioread8(ioaddr + StickyHW) | 0x03, ioaddr + StickyHW); 1923 if (!avoid_D3)
1924 iowrite8(ioread8(ioaddr + StickyHW) | 0x03, ioaddr + StickyHW);
1915 1925
1916 /* TODO: Check use of pci_enable_wake() */ 1926 /* TODO: Check use of pci_enable_wake() */
1917 1927