aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/tg3.c15
-rw-r--r--drivers/net/tg3.h1
2 files changed, 15 insertions, 1 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index e129a6a581f6..e04cd9814e85 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -2156,8 +2156,14 @@ static int tg3_set_power_state(struct tg3 *tp, pci_power_t state)
2156 tw32(MAC_LED_CTRL, tp->led_ctrl); 2156 tw32(MAC_LED_CTRL, tp->led_ctrl);
2157 2157
2158 if (pci_pme_capable(tp->pdev, state) && 2158 if (pci_pme_capable(tp->pdev, state) &&
2159 (tp->tg3_flags & TG3_FLAG_WOL_ENABLE)) 2159 (tp->tg3_flags & TG3_FLAG_WOL_ENABLE)) {
2160 mac_mode |= MAC_MODE_MAGIC_PKT_ENABLE; 2160 mac_mode |= MAC_MODE_MAGIC_PKT_ENABLE;
2161 if (((tp->tg3_flags2 & TG3_FLG2_5705_PLUS) &&
2162 !(tp->tg3_flags2 & TG3_FLG2_5780_CLASS)) &&
2163 ((tp->tg3_flags & TG3_FLAG_ENABLE_ASF) ||
2164 (tp->tg3_flags3 & TG3_FLG3_ENABLE_APE)))
2165 mac_mode |= MAC_MODE_KEEP_FRAME_IN_WOL;
2166 }
2161 2167
2162 if (tp->tg3_flags3 & TG3_FLG3_ENABLE_APE) { 2168 if (tp->tg3_flags3 & TG3_FLG3_ENABLE_APE) {
2163 mac_mode |= tp->mac_mode & 2169 mac_mode |= tp->mac_mode &
@@ -5562,6 +5568,13 @@ static void tg3_ape_driver_state_change(struct tg3 *tp, int kind)
5562 event = APE_EVENT_STATUS_STATE_START; 5568 event = APE_EVENT_STATUS_STATE_START;
5563 break; 5569 break;
5564 case RESET_KIND_SHUTDOWN: 5570 case RESET_KIND_SHUTDOWN:
5571 /* With the interface we are currently using,
5572 * APE does not track driver state. Wiping
5573 * out the HOST SEGMENT SIGNATURE forces
5574 * the APE to assume OS absent status.
5575 */
5576 tg3_ape_write32(tp, TG3_APE_HOST_SEG_SIG, 0x0);
5577
5565 event = APE_EVENT_STATUS_STATE_UNLOAD; 5578 event = APE_EVENT_STATUS_STATE_UNLOAD;
5566 break; 5579 break;
5567 case RESET_KIND_SUSPEND: 5580 case RESET_KIND_SUSPEND:
diff --git a/drivers/net/tg3.h b/drivers/net/tg3.h
index 66055a9d98c3..65b5ff45d201 100644
--- a/drivers/net/tg3.h
+++ b/drivers/net/tg3.h
@@ -327,6 +327,7 @@
327#define MAC_MODE_TDE_ENABLE 0x00200000 327#define MAC_MODE_TDE_ENABLE 0x00200000
328#define MAC_MODE_RDE_ENABLE 0x00400000 328#define MAC_MODE_RDE_ENABLE 0x00400000
329#define MAC_MODE_FHDE_ENABLE 0x00800000 329#define MAC_MODE_FHDE_ENABLE 0x00800000
330#define MAC_MODE_KEEP_FRAME_IN_WOL 0x01000000
330#define MAC_MODE_APE_RX_EN 0x08000000 331#define MAC_MODE_APE_RX_EN 0x08000000
331#define MAC_MODE_APE_TX_EN 0x10000000 332#define MAC_MODE_APE_TX_EN 0x10000000
332#define MAC_STATUS 0x00000404 333#define MAC_STATUS 0x00000404