sfc: Initialise MCDI buffers to 0 on declaration.
In order to avoid MC bugs the flags field needs to be set to 0. Instead of explicitly clearing out the flags individually, a better way to do this is to memset the MCDI_BUF to 0. Signed-off-by: Shradha Shah <sshah@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
0d5e0fbba0
commit
aa09a3da70
@@ -306,7 +306,7 @@ struct efx_ptp_data {
|
||||
struct work_struct pps_work;
|
||||
struct workqueue_struct *pps_workwq;
|
||||
bool nic_ts_enabled;
|
||||
MCDI_DECLARE_BUF(txbuf, MC_CMD_PTP_IN_TRANSMIT_LENMAX);
|
||||
_MCDI_DECLARE_BUF(txbuf, MC_CMD_PTP_IN_TRANSMIT_LENMAX);
|
||||
|
||||
unsigned int good_syncs;
|
||||
unsigned int fast_syncs;
|
||||
@@ -573,7 +573,7 @@ static int efx_ptp_get_timestamp_corrections(struct efx_nic *efx)
|
||||
static int efx_ptp_enable(struct efx_nic *efx)
|
||||
{
|
||||
MCDI_DECLARE_BUF(inbuf, MC_CMD_PTP_IN_ENABLE_LEN);
|
||||
MCDI_DECLARE_BUF_OUT_OR_ERR(outbuf, 0);
|
||||
MCDI_DECLARE_BUF_ERR(outbuf);
|
||||
int rc;
|
||||
|
||||
MCDI_SET_DWORD(inbuf, PTP_IN_OP, MC_CMD_PTP_OP_ENABLE);
|
||||
@@ -601,7 +601,7 @@ static int efx_ptp_enable(struct efx_nic *efx)
|
||||
static int efx_ptp_disable(struct efx_nic *efx)
|
||||
{
|
||||
MCDI_DECLARE_BUF(inbuf, MC_CMD_PTP_IN_DISABLE_LEN);
|
||||
MCDI_DECLARE_BUF_OUT_OR_ERR(outbuf, 0);
|
||||
MCDI_DECLARE_BUF_ERR(outbuf);
|
||||
int rc;
|
||||
|
||||
MCDI_SET_DWORD(inbuf, PTP_IN_OP, MC_CMD_PTP_OP_DISABLE);
|
||||
|
Reference in New Issue
Block a user