diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-27 17:55:50 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-27 17:55:50 -0400 |
commit | 61cca8c72eb284e80876bafdea057055f6e793e4 (patch) | |
tree | 5bb92477b811e64e88c9f0c119acb2c9e9804c91 /drivers/net/e100.c | |
parent | e494f6333bef20fd9d8689062260c5d0136a3ea0 (diff) | |
parent | e254e9bff5283aad1af6d74d2a312ee011b84d61 (diff) |
Merge 'upstream' branch of rsync://rsync.kernel.org/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
Diffstat (limited to 'drivers/net/e100.c')
-rw-r--r-- | drivers/net/e100.c | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/drivers/net/e100.c b/drivers/net/e100.c index cfaa6b2bf345..1e56c8eea35f 100644 --- a/drivers/net/e100.c +++ b/drivers/net/e100.c | |||
@@ -1093,11 +1093,16 @@ static int e100_phy_init(struct nic *nic) | |||
1093 | } | 1093 | } |
1094 | 1094 | ||
1095 | if((nic->mac >= mac_82550_D102) || ((nic->flags & ich) && | 1095 | if((nic->mac >= mac_82550_D102) || ((nic->flags & ich) && |
1096 | (mdio_read(netdev, nic->mii.phy_id, MII_TPISTATUS) & 0x8000) && | 1096 | (mdio_read(netdev, nic->mii.phy_id, MII_TPISTATUS) & 0x8000))) { |
1097 | (nic->eeprom[eeprom_cnfg_mdix] & eeprom_mdix_enabled))) | 1097 | /* enable/disable MDI/MDI-X auto-switching. |
1098 | /* enable/disable MDI/MDI-X auto-switching */ | 1098 | MDI/MDI-X auto-switching is disabled for 82551ER/QM chips */ |
1099 | mdio_write(netdev, nic->mii.phy_id, MII_NCONFIG, | 1099 | if((nic->mac == mac_82551_E) || (nic->mac == mac_82551_F) || |
1100 | nic->mii.force_media ? 0 : NCONFIG_AUTO_SWITCH); | 1100 | (nic->mac == mac_82551_10) || (nic->mii.force_media) || |
1101 | !(nic->eeprom[eeprom_cnfg_mdix] & eeprom_mdix_enabled)) | ||
1102 | mdio_write(netdev, nic->mii.phy_id, MII_NCONFIG, 0); | ||
1103 | else | ||
1104 | mdio_write(netdev, nic->mii.phy_id, MII_NCONFIG, NCONFIG_AUTO_SWITCH); | ||
1105 | } | ||
1101 | 1106 | ||
1102 | return 0; | 1107 | return 0; |
1103 | } | 1108 | } |
@@ -1666,8 +1671,10 @@ static irqreturn_t e100_intr(int irq, void *dev_id, struct pt_regs *regs) | |||
1666 | if(stat_ack & stat_ack_rnr) | 1671 | if(stat_ack & stat_ack_rnr) |
1667 | nic->ru_running = RU_SUSPENDED; | 1672 | nic->ru_running = RU_SUSPENDED; |
1668 | 1673 | ||
1669 | e100_disable_irq(nic); | 1674 | if(likely(netif_rx_schedule_prep(netdev))) { |
1670 | netif_rx_schedule(netdev); | 1675 | e100_disable_irq(nic); |
1676 | __netif_rx_schedule(netdev); | ||
1677 | } | ||
1671 | 1678 | ||
1672 | return IRQ_HANDLED; | 1679 | return IRQ_HANDLED; |
1673 | } | 1680 | } |
@@ -2335,11 +2342,11 @@ static int __devinit e100_probe(struct pci_dev *pdev, | |||
2335 | goto err_out_iounmap; | 2342 | goto err_out_iounmap; |
2336 | } | 2343 | } |
2337 | 2344 | ||
2338 | e100_phy_init(nic); | ||
2339 | |||
2340 | if((err = e100_eeprom_load(nic))) | 2345 | if((err = e100_eeprom_load(nic))) |
2341 | goto err_out_free; | 2346 | goto err_out_free; |
2342 | 2347 | ||
2348 | e100_phy_init(nic); | ||
2349 | |||
2343 | memcpy(netdev->dev_addr, nic->eeprom, ETH_ALEN); | 2350 | memcpy(netdev->dev_addr, nic->eeprom, ETH_ALEN); |
2344 | if(!is_valid_ether_addr(netdev->dev_addr)) { | 2351 | if(!is_valid_ether_addr(netdev->dev_addr)) { |
2345 | DPRINTK(PROBE, ERR, "Invalid MAC address from " | 2352 | DPRINTK(PROBE, ERR, "Invalid MAC address from " |