aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sky2.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@linux-foundation.org>2007-08-29 15:58:13 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:50:52 -0400
commit8c4c00f3710f9e5653ed465e88271664f3163930 (patch)
tree09d73a2ed369a164e7dec62aff28448b3a4d0239 /drivers/net/sky2.c
parentefcf6e2febbfe5b2ab497421e2f7f188e1741cf9 (diff)
sky2: dont restrict config space access
Take out the code that protects driver from accessing the PCI config space. We are old enough to run with scissors now. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/sky2.c')
-rw-r--r--drivers/net/sky2.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index d10af8ed93df..77bfcf0dda3b 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -610,7 +610,6 @@ static void sky2_phy_power(struct sky2_hw *hw, unsigned port, int onoff)
610 if (hw->chip_id == CHIP_ID_YUKON_XL && hw->chip_rev > 1) 610 if (hw->chip_id == CHIP_ID_YUKON_XL && hw->chip_rev > 1)
611 onoff = !onoff; 611 onoff = !onoff;
612 612
613 sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_ON);
614 reg1 = sky2_pci_read32(hw, PCI_DEV_REG1); 613 reg1 = sky2_pci_read32(hw, PCI_DEV_REG1);
615 if (onoff) 614 if (onoff)
616 /* Turn off phy power saving */ 615 /* Turn off phy power saving */
@@ -620,7 +619,6 @@ static void sky2_phy_power(struct sky2_hw *hw, unsigned port, int onoff)
620 619
621 sky2_pci_write32(hw, PCI_DEV_REG1, reg1); 620 sky2_pci_write32(hw, PCI_DEV_REG1, reg1);
622 sky2_pci_read32(hw, PCI_DEV_REG1); 621 sky2_pci_read32(hw, PCI_DEV_REG1);
623 sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_OFF);
624 udelay(100); 622 udelay(100);
625} 623}
626 624
@@ -688,11 +686,9 @@ static void sky2_wol_init(struct sky2_port *sky2)
688 sky2_write16(hw, WOL_REGS(port, WOL_CTRL_STAT), ctrl); 686 sky2_write16(hw, WOL_REGS(port, WOL_CTRL_STAT), ctrl);
689 687
690 /* Turn on legacy PCI-Express PME mode */ 688 /* Turn on legacy PCI-Express PME mode */
691 sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_ON);
692 reg1 = sky2_pci_read32(hw, PCI_DEV_REG1); 689 reg1 = sky2_pci_read32(hw, PCI_DEV_REG1);
693 reg1 |= PCI_Y2_PME_LEGACY; 690 reg1 |= PCI_Y2_PME_LEGACY;
694 sky2_pci_write32(hw, PCI_DEV_REG1, reg1); 691 sky2_pci_write32(hw, PCI_DEV_REG1, reg1);
695 sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_OFF);
696 692
697 /* block receiver */ 693 /* block receiver */
698 sky2_write8(hw, SK_REG(port, RX_GMF_CTRL_T), GMF_RST_SET); 694 sky2_write8(hw, SK_REG(port, RX_GMF_CTRL_T), GMF_RST_SET);
@@ -2438,10 +2434,8 @@ static void sky2_hw_intr(struct sky2_hw *hw)
2438 dev_err(&hw->pdev->dev, "PCI hardware error (0x%x)\n", 2434 dev_err(&hw->pdev->dev, "PCI hardware error (0x%x)\n",
2439 pci_err); 2435 pci_err);
2440 2436
2441 sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_ON);
2442 sky2_pci_write16(hw, PCI_STATUS, 2437 sky2_pci_write16(hw, PCI_STATUS,
2443 pci_err | PCI_STATUS_ERROR_BITS); 2438 pci_err | PCI_STATUS_ERROR_BITS);
2444 sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_OFF);
2445 } 2439 }
2446 2440
2447 if (status & Y2_IS_PCI_EXP) { 2441 if (status & Y2_IS_PCI_EXP) {
@@ -2455,11 +2449,8 @@ static void sky2_hw_intr(struct sky2_hw *hw)
2455 pex_err); 2449 pex_err);
2456 2450
2457 /* clear the interrupt */ 2451 /* clear the interrupt */
2458 sky2_write32(hw, B2_TST_CTRL1, TST_CFG_WRITE_ON);
2459 sky2_pci_write32(hw, PEX_UNC_ERR_STAT, 2452 sky2_pci_write32(hw, PEX_UNC_ERR_STAT,
2460 0xffffffffUL); 2453 0xffffffffUL);
2461 sky2_write32(hw, B2_TST_CTRL1, TST_CFG_WRITE_OFF);
2462
2463 if (pex_err & PEX_FATAL_ERRORS) { 2454 if (pex_err & PEX_FATAL_ERRORS) {
2464 u32 hwmsk = sky2_read32(hw, B0_HWE_IMSK); 2455 u32 hwmsk = sky2_read32(hw, B0_HWE_IMSK);
2465 hwmsk &= ~Y2_IS_PCI_EXP; 2456 hwmsk &= ~Y2_IS_PCI_EXP;
@@ -2804,7 +2795,6 @@ static void sky2_reset(struct sky2_hw *hw)
2804 /* clear PCI errors, if any */ 2795 /* clear PCI errors, if any */
2805 status = sky2_pci_read16(hw, PCI_STATUS); 2796 status = sky2_pci_read16(hw, PCI_STATUS);
2806 2797
2807 sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_ON);
2808 sky2_pci_write16(hw, PCI_STATUS, status | PCI_STATUS_ERROR_BITS); 2798 sky2_pci_write16(hw, PCI_STATUS, status | PCI_STATUS_ERROR_BITS);
2809 2799
2810 2800
@@ -2827,8 +2817,6 @@ static void sky2_reset(struct sky2_hw *hw)
2827 | GMC_BYP_RETR_ON); 2817 | GMC_BYP_RETR_ON);
2828 } 2818 }
2829 2819
2830 sky2_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_OFF);
2831
2832 /* Clear I2C IRQ noise */ 2820 /* Clear I2C IRQ noise */
2833 sky2_write32(hw, B2_I2C_IRQ, 1); 2821 sky2_write32(hw, B2_I2C_IRQ, 1);
2834 2822