diff options
author | Prashant Sreedharan <prashant.sreedharan@broadcom.com> | 2018-02-19 12:27:04 +0530 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-02-19 14:16:52 -0500 |
commit | 506b0a395f26e52b3f18827e0de1be051acb77ab (patch) | |
tree | 3b7c93d16550063c81359b9c8a383e1fc7269c69 /drivers/net/ethernet/broadcom/tg3.h | |
parent | d1c95af366961101819f07e3c64d44f3be7f0367 (diff) | |
download | linux-506b0a395f26e52b3f18827e0de1be051acb77ab.tar.gz linux-506b0a395f26e52b3f18827e0de1be051acb77ab.tar.bz2 linux-506b0a395f26e52b3f18827e0de1be051acb77ab.zip |
tg3: APE heartbeat changes
In ungraceful host shutdown or driver crash case BMC connectivity is
lost. APE firmware is missing the driver state in this
case to keep the BMC connectivity alive.
This patch has below change to address this issue.
Heartbeat mechanism with APE firmware. This heartbeat mechanism
is needed to notify the APE firmware about driver state.
This patch also has the change in wait time for APE event from
1ms to 20ms as there can be some delay in getting response.
v2: Drop inline keyword as per David suggestion.
Signed-off-by: Prashant Sreedharan <prashant.sreedharan@broadcom.com>
Signed-off-by: Satish Baddipadige <satish.baddipadige@broadcom.com>
Signed-off-by: Siva Reddy Kallam <siva.kallam@broadcom.com>
Acked-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom/tg3.h')
-rw-r--r-- | drivers/net/ethernet/broadcom/tg3.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/ethernet/broadcom/tg3.h b/drivers/net/ethernet/broadcom/tg3.h index 47f51cc0566d..1d61aa3efda1 100644 --- a/drivers/net/ethernet/broadcom/tg3.h +++ b/drivers/net/ethernet/broadcom/tg3.h @@ -2508,6 +2508,7 @@ #define TG3_APE_LOCK_PHY3 5 #define TG3_APE_LOCK_GPIO 7 +#define TG3_APE_HB_INTERVAL (tp->ape_hb_interval) #define TG3_EEPROM_SB_F1R2_MBA_OFF 0x10 @@ -3423,6 +3424,10 @@ struct tg3 { struct device *hwmon_dev; bool link_up; bool pcierr_recovery; + + u32 ape_hb; + unsigned long ape_hb_interval; + unsigned long ape_hb_jiffies; }; /* Accessor macros for chip and asic attributes |