Commit 5676cc7b authored by stephen hemminger's avatar stephen hemminger Committed by David S. Miller

sky2: override for PCI legacy power management

Some BIOS's don't setup power management correctly (what else is
new) and don't allow use of PCI Express power control. Add a special
exception module parameter to allow working around this issue.
Based on slightly different patch by Knut Petersen.
Reported-by: default avatarArkadiusz Miskiewicz <arekm@maven.pl>
Signed-off-by: default avatarStephen Hemminger <shemminger@vyatta.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2a2a459e
...@@ -95,6 +95,10 @@ static int disable_msi = 0; ...@@ -95,6 +95,10 @@ static int disable_msi = 0;
module_param(disable_msi, int, 0); module_param(disable_msi, int, 0);
MODULE_PARM_DESC(disable_msi, "Disable Message Signaled Interrupt (MSI)"); MODULE_PARM_DESC(disable_msi, "Disable Message Signaled Interrupt (MSI)");
static int legacy_pme = 0;
module_param(legacy_pme, int, 0);
MODULE_PARM_DESC(legacy_pme, "Legacy power management");
static DEFINE_PCI_DEVICE_TABLE(sky2_id_table) = { static DEFINE_PCI_DEVICE_TABLE(sky2_id_table) = {
{ PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, 0x9000) }, /* SK-9Sxx */ { PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, 0x9000) }, /* SK-9Sxx */
{ PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, 0x9E00) }, /* SK-9Exx */ { PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, 0x9E00) }, /* SK-9Exx */
...@@ -867,6 +871,13 @@ static void sky2_wol_init(struct sky2_port *sky2) ...@@ -867,6 +871,13 @@ static void sky2_wol_init(struct sky2_port *sky2)
/* Disable PiG firmware */ /* Disable PiG firmware */
sky2_write16(hw, B0_CTST, Y2_HW_WOL_OFF); sky2_write16(hw, B0_CTST, Y2_HW_WOL_OFF);
/* Needed by some broken BIOSes, use PCI rather than PCI-e for WOL */
if (legacy_pme) {
u32 reg1 = sky2_pci_read32(hw, PCI_DEV_REG1);
reg1 |= PCI_Y2_PME_LEGACY;
sky2_pci_write32(hw, PCI_DEV_REG1, reg1);
}
/* block receiver */ /* block receiver */
sky2_write8(hw, SK_REG(port, RX_GMF_CTRL_T), GMF_RST_SET); sky2_write8(hw, SK_REG(port, RX_GMF_CTRL_T), GMF_RST_SET);
sky2_read32(hw, B0_CTST); sky2_read32(hw, B0_CTST);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment