Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 33510
b: refs/heads/master
c: b933b4d
h: refs/heads/master
v: v3
  • Loading branch information
Roger Luethi authored and Jeff Garzik committed Aug 19, 2006
1 parent 0ea4843 commit ffe4c43
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 76cb4fe7c0926c2c59f4a36ab169aa2d547c93d1
refs/heads/master: b933b4d93888b584eda826bffa68a3a1283f8411
12 changes: 11 additions & 1 deletion trunk/drivers/net/via-rhine.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ static int max_interrupt_work = 20;
Setting to > 1518 effectively disables this feature. */
static int rx_copybreak;

/* Work-around for broken BIOSes: they are unable to get the chip back out of
power state D3 so PXE booting fails. bootparam(7): via-rhine.avoid_D3=1 */
static int avoid_D3;

/*
* In case you are looking for 'options[]' or 'full_duplex[]', they
* are gone. Use ethtool(8) instead.
Expand Down Expand Up @@ -120,9 +124,11 @@ MODULE_LICENSE("GPL");
module_param(max_interrupt_work, int, 0);
module_param(debug, int, 0);
module_param(rx_copybreak, int, 0);
module_param(avoid_D3, bool, 0);
MODULE_PARM_DESC(max_interrupt_work, "VIA Rhine maximum events handled per interrupt");
MODULE_PARM_DESC(debug, "VIA Rhine debug level (0-7)");
MODULE_PARM_DESC(rx_copybreak, "VIA Rhine copy breakpoint for copy-only-tiny-frames");
MODULE_PARM_DESC(avoid_D3, "Avoid power state D3 (work-around for broken BIOSes)");

/*
Theory of Operation
Expand Down Expand Up @@ -823,6 +829,9 @@ static int __devinit rhine_init_one(struct pci_dev *pdev,
}
}
rp->mii_if.phy_id = phy_id;
if (debug > 1 && avoid_D3)
printk(KERN_INFO "%s: No D3 power state at shutdown.\n",
dev->name);

return 0;

Expand Down Expand Up @@ -1911,7 +1920,8 @@ static void rhine_shutdown (struct pci_dev *pdev)
}

/* Hit power state D3 (sleep) */
iowrite8(ioread8(ioaddr + StickyHW) | 0x03, ioaddr + StickyHW);
if (!avoid_D3)
iowrite8(ioread8(ioaddr + StickyHW) | 0x03, ioaddr + StickyHW);

/* TODO: Check use of pci_enable_wake() */

Expand Down

0 comments on commit ffe4c43

Please sign in to comment.