Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 289796
b: refs/heads/master
c: 1daf417
h: refs/heads/master
v: v3
  • Loading branch information
Ben Hutchings committed Jan 27, 2012
1 parent 0eeb785 commit c4737ef
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 19 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 710b208dc2687fdb3370110d54a67fb2288835eb
refs/heads/master: 1daf417029ddc10b7854430c1e1118df791d0eaf
25 changes: 7 additions & 18 deletions trunk/drivers/net/ethernet/sfc/mcdi_mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ static int efx_mcdi_set_mac(struct efx_nic *efx)
NULL, 0, NULL);
}

static int efx_mcdi_get_mac_faults(struct efx_nic *efx, u32 *faults)
bool efx_mcdi_mac_check_fault(struct efx_nic *efx)
{
u8 outbuf[MC_CMD_GET_LINK_OUT_LEN];
size_t outlength;
Expand All @@ -61,16 +61,13 @@ static int efx_mcdi_get_mac_faults(struct efx_nic *efx, u32 *faults)

rc = efx_mcdi_rpc(efx, MC_CMD_GET_LINK, NULL, 0,
outbuf, sizeof(outbuf), &outlength);
if (rc)
goto fail;

*faults = MCDI_DWORD(outbuf, GET_LINK_OUT_MAC_FAULT);
return 0;
if (rc) {
netif_err(efx, hw, efx->net_dev, "%s: failed rc=%d\n",
__func__, rc);
return true;
}

fail:
netif_err(efx, hw, efx->net_dev, "%s: failed rc=%d\n",
__func__, rc);
return rc;
return MCDI_DWORD(outbuf, GET_LINK_OUT_MAC_FAULT) != 0;
}

int efx_mcdi_mac_stats(struct efx_nic *efx, dma_addr_t dma_addr,
Expand Down Expand Up @@ -127,11 +124,3 @@ int efx_mcdi_mac_reconfigure(struct efx_nic *efx)

return 0;
}


bool efx_mcdi_mac_check_fault(struct efx_nic *efx)
{
u32 faults;
int rc = efx_mcdi_get_mac_faults(efx, &faults);
return (rc != 0) || (faults != 0);
}

0 comments on commit c4737ef

Please sign in to comment.