Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 13533
b: refs/heads/master
c: adba9e2
h: refs/heads/master
i:
  13531: 00241d7
v: v3
  • Loading branch information
Stephen Hemminger authored and Jeff Garzik committed Nov 9, 2005
1 parent dcef391 commit 6cbf24c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3133c5e896c0b2509e72ae0c2cb9452c80d47f46
refs/heads/master: adba9e23b4066f1d741a2076fc6ad18b6c0cea44
10 changes: 10 additions & 0 deletions trunk/drivers/net/skge.c
Original file line number Diff line number Diff line change
Expand Up @@ -2893,6 +2893,7 @@ static const char *skge_board_name(const struct skge_hw *hw)
*/
static int skge_reset(struct skge_hw *hw)
{
u32 reg;
u16 ctst;
u8 t8, mac_cfg, pmd_type, phy_type;
int i;
Expand Down Expand Up @@ -2971,13 +2972,22 @@ static int skge_reset(struct skge_hw *hw)
/* switch power to VCC (WA for VAUX problem) */
skge_write8(hw, B0_POWER_CTRL,
PC_VAUX_ENA | PC_VCC_ENA | PC_VAUX_OFF | PC_VCC_ON);

/* avoid boards with stuck Hardware error bits */
if ((skge_read32(hw, B0_ISRC) & IS_HW_ERR) &&
(skge_read32(hw, B0_HWE_ISRC) & IS_IRQ_SENSOR)) {
printk(KERN_WARNING PFX "stuck hardware sensor bit\n");
hw->intr_mask &= ~IS_HW_ERR;
}

/* Clear PHY COMA */
skge_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_ON);
pci_read_config_dword(hw->pdev, PCI_DEV_REG1, &reg);
reg &= ~PCI_PHY_COMA;
pci_write_config_dword(hw->pdev, PCI_DEV_REG1, reg);
skge_write8(hw, B2_TST_CTRL1, TST_CFG_WRITE_OFF);


for (i = 0; i < hw->ports; i++) {
skge_write16(hw, SK_REG(i, GMAC_LINK_CTRL), GMLC_RST_SET);
skge_write16(hw, SK_REG(i, GMAC_LINK_CTRL), GMLC_RST_CLR);
Expand Down
2 changes: 2 additions & 0 deletions trunk/drivers/net/skge.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

/* PCI config registers */
#define PCI_DEV_REG1 0x40
#define PCI_PHY_COMA 0x8000000
#define PCI_VIO 0x2000000
#define PCI_DEV_REG2 0x44
#define PCI_REV_DESC 0x4

Expand Down

0 comments on commit 6cbf24c

Please sign in to comment.