diff options
author | Michael Chan <mchan@broadcom.com> | 2006-01-23 19:08:14 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-01-23 19:08:14 -0500 |
commit | dda1e390bf9e2889a3abc48590a015b307637753 (patch) | |
tree | e9ea7ec2efd00dada467d3ba2ec959138bffa5b7 | |
parent | b090ae2b59f3db57732340c6af3beceec8d6c148 (diff) |
[BNX2]: Misc. fixes
Some misc. fixes for WoL, 5708 B1, and a typo '=' instead of '=='.
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/bnx2.c | 20 | ||||
-rw-r--r-- | drivers/net/bnx2.h | 1 |
2 files changed, 15 insertions, 6 deletions
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index 3486324b6919..60ff9b6c929d 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c | |||
@@ -1171,7 +1171,8 @@ bnx2_init_5708s_phy(struct bnx2 *bp) | |||
1171 | } | 1171 | } |
1172 | 1172 | ||
1173 | if ((CHIP_ID(bp) == CHIP_ID_5708_A0) || | 1173 | if ((CHIP_ID(bp) == CHIP_ID_5708_A0) || |
1174 | (CHIP_ID(bp) == CHIP_ID_5708_B0)) { | 1174 | (CHIP_ID(bp) == CHIP_ID_5708_B0) || |
1175 | (CHIP_ID(bp) == CHIP_ID_5708_B1)) { | ||
1175 | /* increase tx signal amplitude */ | 1176 | /* increase tx signal amplitude */ |
1176 | bnx2_write_phy(bp, BCM5708S_BLK_ADDR, | 1177 | bnx2_write_phy(bp, BCM5708S_BLK_ADDR, |
1177 | BCM5708S_BLK_ADDR_TX_MISC); | 1178 | BCM5708S_BLK_ADDR_TX_MISC); |
@@ -2340,7 +2341,6 @@ bnx2_set_power_state(struct bnx2 *bp, pci_power_t state) | |||
2340 | val |= BNX2_EMAC_MODE_PORT_MII | | 2341 | val |= BNX2_EMAC_MODE_PORT_MII | |
2341 | BNX2_EMAC_MODE_MPKT_RCVD | | 2342 | BNX2_EMAC_MODE_MPKT_RCVD | |
2342 | BNX2_EMAC_MODE_ACPI_RCVD | | 2343 | BNX2_EMAC_MODE_ACPI_RCVD | |
2343 | BNX2_EMAC_MODE_FORCE_LINK | | ||
2344 | BNX2_EMAC_MODE_MPKT; | 2344 | BNX2_EMAC_MODE_MPKT; |
2345 | 2345 | ||
2346 | REG_WR(bp, BNX2_EMAC_MODE, val); | 2346 | REG_WR(bp, BNX2_EMAC_MODE, val); |
@@ -2376,7 +2376,8 @@ bnx2_set_power_state(struct bnx2 *bp, pci_power_t state) | |||
2376 | wol_msg = BNX2_DRV_MSG_CODE_SUSPEND_NO_WOL; | 2376 | wol_msg = BNX2_DRV_MSG_CODE_SUSPEND_NO_WOL; |
2377 | } | 2377 | } |
2378 | 2378 | ||
2379 | bnx2_fw_sync(bp, BNX2_DRV_MSG_DATA_WAIT3 | wol_msg, 0); | 2379 | if (!(bp->flags & NO_WOL_FLAG)) |
2380 | bnx2_fw_sync(bp, BNX2_DRV_MSG_DATA_WAIT3 | wol_msg, 0); | ||
2380 | 2381 | ||
2381 | pmcsr &= ~PCI_PM_CTRL_STATE_MASK; | 2382 | pmcsr &= ~PCI_PM_CTRL_STATE_MASK; |
2382 | if ((CHIP_ID(bp) == CHIP_ID_5706_A0) || | 2383 | if ((CHIP_ID(bp) == CHIP_ID_5706_A0) || |
@@ -3099,7 +3100,7 @@ bnx2_init_chip(struct bnx2 *bp) | |||
3099 | 3100 | ||
3100 | val |= (0x2 << 20) | (1 << 11); | 3101 | val |= (0x2 << 20) | (1 << 11); |
3101 | 3102 | ||
3102 | if ((bp->flags & PCIX_FLAG) && (bp->bus_speed_mhz = 133)) | 3103 | if ((bp->flags & PCIX_FLAG) && (bp->bus_speed_mhz == 133)) |
3103 | val |= (1 << 23); | 3104 | val |= (1 << 23); |
3104 | 3105 | ||
3105 | if ((CHIP_NUM(bp) == CHIP_NUM_5706) && | 3106 | if ((CHIP_NUM(bp) == CHIP_NUM_5706) && |
@@ -4473,7 +4474,9 @@ bnx2_close(struct net_device *dev) | |||
4473 | 4474 | ||
4474 | bnx2_netif_stop(bp); | 4475 | bnx2_netif_stop(bp); |
4475 | del_timer_sync(&bp->timer); | 4476 | del_timer_sync(&bp->timer); |
4476 | if (bp->wol) | 4477 | if (bp->flags & NO_WOL_FLAG) |
4478 | reset_code = BNX2_DRV_MSG_CODE_UNLOAD; | ||
4479 | else if (bp->wol) | ||
4477 | reset_code = BNX2_DRV_MSG_CODE_SUSPEND_WOL; | 4480 | reset_code = BNX2_DRV_MSG_CODE_SUSPEND_WOL; |
4478 | else | 4481 | else |
4479 | reset_code = BNX2_DRV_MSG_CODE_SUSPEND_NO_WOL; | 4482 | reset_code = BNX2_DRV_MSG_CODE_SUSPEND_NO_WOL; |
@@ -5635,6 +5638,9 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev) | |||
5635 | } | 5638 | } |
5636 | } | 5639 | } |
5637 | 5640 | ||
5641 | if (CHIP_NUM(bp) == CHIP_NUM_5708) | ||
5642 | bp->flags |= NO_WOL_FLAG; | ||
5643 | |||
5638 | if (CHIP_ID(bp) == CHIP_ID_5706_A0) { | 5644 | if (CHIP_ID(bp) == CHIP_ID_5706_A0) { |
5639 | bp->tx_quick_cons_trip_int = | 5645 | bp->tx_quick_cons_trip_int = |
5640 | bp->tx_quick_cons_trip; | 5646 | bp->tx_quick_cons_trip; |
@@ -5818,7 +5824,9 @@ bnx2_suspend(struct pci_dev *pdev, pm_message_t state) | |||
5818 | bnx2_netif_stop(bp); | 5824 | bnx2_netif_stop(bp); |
5819 | netif_device_detach(dev); | 5825 | netif_device_detach(dev); |
5820 | del_timer_sync(&bp->timer); | 5826 | del_timer_sync(&bp->timer); |
5821 | if (bp->wol) | 5827 | if (bp->flags & NO_WOL_FLAG) |
5828 | reset_code = BNX2_DRV_MSG_CODE_UNLOAD; | ||
5829 | else if (bp->wol) | ||
5822 | reset_code = BNX2_DRV_MSG_CODE_SUSPEND_WOL; | 5830 | reset_code = BNX2_DRV_MSG_CODE_SUSPEND_WOL; |
5823 | else | 5831 | else |
5824 | reset_code = BNX2_DRV_MSG_CODE_SUSPEND_NO_WOL; | 5832 | reset_code = BNX2_DRV_MSG_CODE_SUSPEND_NO_WOL; |
diff --git a/drivers/net/bnx2.h b/drivers/net/bnx2.h index a99b04143f69..95d7f3b2ee77 100644 --- a/drivers/net/bnx2.h +++ b/drivers/net/bnx2.h | |||
@@ -3987,6 +3987,7 @@ struct bnx2 { | |||
3987 | #define CHIP_ID_5706_A2 0x57060020 | 3987 | #define CHIP_ID_5706_A2 0x57060020 |
3988 | #define CHIP_ID_5708_A0 0x57080000 | 3988 | #define CHIP_ID_5708_A0 0x57080000 |
3989 | #define CHIP_ID_5708_B0 0x57081000 | 3989 | #define CHIP_ID_5708_B0 0x57081000 |
3990 | #define CHIP_ID_5708_B1 0x57081010 | ||
3990 | 3991 | ||
3991 | #define CHIP_BOND_ID(bp) (((bp)->chip_id) & 0xf) | 3992 | #define CHIP_BOND_ID(bp) (((bp)->chip_id) & 0xf) |
3992 | 3993 | ||