Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 155888
b: refs/heads/master
c: ca52efd
h: refs/heads/master
v: v3
  • Loading branch information
françois romieu authored and David S. Miller committed Jul 27, 2009
1 parent fdb0b48 commit f39c399
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 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: c8a5a658b826508c7c61b57e9a590f7b8760fb51
refs/heads/master: ca52efd5490f97f396d3c5863ba714624f272033
13 changes: 11 additions & 2 deletions trunk/drivers/net/r8169.c
Original file line number Diff line number Diff line change
Expand Up @@ -2060,8 +2060,6 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
}
}

pci_set_master(pdev);

/* ioremap MMIO region */
ioaddr = ioremap(pci_resource_start(pdev, region), R8169_REGS_SIZE);
if (!ioaddr) {
Expand Down Expand Up @@ -2089,6 +2087,8 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)

RTL_W16(IntrStatus, 0xffff);

pci_set_master(pdev);

/* Identify chip attached to board */
rtl8169_get_mac_version(tp, ioaddr);

Expand Down Expand Up @@ -3874,6 +3874,15 @@ static void rtl_shutdown(struct pci_dev *pdev)
spin_unlock_irq(&tp->lock);

if (system_state == SYSTEM_POWER_OFF) {
/* WoL fails with some 8168 when the receiver is disabled. */
if (tp->features & RTL_FEATURE_WOL) {
pci_clear_master(pdev);

RTL_W8(ChipCmd, CmdRxEnb);
/* PCI commit */
RTL_R8(ChipCmd);
}

pci_wake_from_d3(pdev, true);
pci_set_power_state(pdev, PCI_D3hot);
}
Expand Down

0 comments on commit f39c399

Please sign in to comment.