Skip to content

Commit

Permalink
amd-xgbe: Guard against incorrectly generated interrupts
Browse files Browse the repository at this point in the history
Due to a hardware issue, it is possible for interrupt events to be
incorrectly generated when performing a soft reset.  To guard against
this, perform the soft reset twice.

Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Lendacky, Thomas authored and David S. Miller committed Nov 13, 2016
1 parent f0a4040 commit 5ffc033
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion drivers/net/ethernet/amd/xgbe/xgbe-dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -1897,7 +1897,7 @@ static int xgbe_disable_int(struct xgbe_channel *channel,
return 0;
}

static int xgbe_exit(struct xgbe_prv_data *pdata)
static int __xgbe_exit(struct xgbe_prv_data *pdata)
{
unsigned int count = 2000;

Expand All @@ -1919,6 +1919,20 @@ static int xgbe_exit(struct xgbe_prv_data *pdata)
return 0;
}

static int xgbe_exit(struct xgbe_prv_data *pdata)
{
int ret;

/* To guard against possible incorrectly generated interrupts,
* issue the software reset twice.
*/
ret = __xgbe_exit(pdata);
if (ret)
return ret;

return __xgbe_exit(pdata);
}

static int xgbe_flush_tx_queues(struct xgbe_prv_data *pdata)
{
unsigned int i, count;
Expand Down

0 comments on commit 5ffc033

Please sign in to comment.