Commit cbbf77de authored by Ariel Elior's avatar Ariel Elior Committed by David S. Miller

bnx2x: handle known but unsupported VF messages

Commit b9871bcf "bnx2x: VF RSS support - PF side" has deprecated one of
the previous existing messages. If an old VF driver were to send this message
to the PF then the PF will not reply and leave the mailbox in an unsteady
state (and cause a timeout on the VF side).

Wait until firmware ack is written before unlocking channel
Signed-off-by: default avatarAriel Elior <ariele@broadcom.com>
Signed-off-by: default avatarYuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: default avatarEilon Greenstein <eilong@broadcom.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0a5ccb75
...@@ -1765,28 +1765,28 @@ static void bnx2x_vf_mbx_request(struct bnx2x *bp, struct bnx2x_virtf *vf, ...@@ -1765,28 +1765,28 @@ static void bnx2x_vf_mbx_request(struct bnx2x *bp, struct bnx2x_virtf *vf,
switch (mbx->first_tlv.tl.type) { switch (mbx->first_tlv.tl.type) {
case CHANNEL_TLV_ACQUIRE: case CHANNEL_TLV_ACQUIRE:
bnx2x_vf_mbx_acquire(bp, vf, mbx); bnx2x_vf_mbx_acquire(bp, vf, mbx);
break; return;
case CHANNEL_TLV_INIT: case CHANNEL_TLV_INIT:
bnx2x_vf_mbx_init_vf(bp, vf, mbx); bnx2x_vf_mbx_init_vf(bp, vf, mbx);
break; return;
case CHANNEL_TLV_SETUP_Q: case CHANNEL_TLV_SETUP_Q:
bnx2x_vf_mbx_setup_q(bp, vf, mbx); bnx2x_vf_mbx_setup_q(bp, vf, mbx);
break; return;
case CHANNEL_TLV_SET_Q_FILTERS: case CHANNEL_TLV_SET_Q_FILTERS:
bnx2x_vf_mbx_set_q_filters(bp, vf, mbx); bnx2x_vf_mbx_set_q_filters(bp, vf, mbx);
break; return;
case CHANNEL_TLV_TEARDOWN_Q: case CHANNEL_TLV_TEARDOWN_Q:
bnx2x_vf_mbx_teardown_q(bp, vf, mbx); bnx2x_vf_mbx_teardown_q(bp, vf, mbx);
break; return;
case CHANNEL_TLV_CLOSE: case CHANNEL_TLV_CLOSE:
bnx2x_vf_mbx_close_vf(bp, vf, mbx); bnx2x_vf_mbx_close_vf(bp, vf, mbx);
break; return;
case CHANNEL_TLV_RELEASE: case CHANNEL_TLV_RELEASE:
bnx2x_vf_mbx_release_vf(bp, vf, mbx); bnx2x_vf_mbx_release_vf(bp, vf, mbx);
break; return;
case CHANNEL_TLV_UPDATE_RSS: case CHANNEL_TLV_UPDATE_RSS:
bnx2x_vf_mbx_update_rss(bp, vf, mbx); bnx2x_vf_mbx_update_rss(bp, vf, mbx);
break; return;
} }
} else { } else {
...@@ -1802,10 +1802,9 @@ static void bnx2x_vf_mbx_request(struct bnx2x *bp, struct bnx2x_virtf *vf, ...@@ -1802,10 +1802,9 @@ static void bnx2x_vf_mbx_request(struct bnx2x *bp, struct bnx2x_virtf *vf,
for (i = 0; i < 20; i++) for (i = 0; i < 20; i++)
DP_CONT(BNX2X_MSG_IOV, "%x ", DP_CONT(BNX2X_MSG_IOV, "%x ",
mbx->msg->req.tlv_buf_size.tlv_buffer[i]); mbx->msg->req.tlv_buf_size.tlv_buffer[i]);
}
/* test whether we can respond to the VF (do we have an address /* can we respond to VF (do we have an address for it?) */
* for it?)
*/
if (vf->state == VF_ACQUIRED || vf->state == VF_ENABLED) { if (vf->state == VF_ACQUIRED || vf->state == VF_ENABLED) {
/* mbx_resp uses the op_rc of the VF */ /* mbx_resp uses the op_rc of the VF */
vf->op_rc = PFVF_STATUS_NOT_SUPPORTED; vf->op_rc = PFVF_STATUS_NOT_SUPPORTED;
...@@ -1818,10 +1817,9 @@ static void bnx2x_vf_mbx_request(struct bnx2x *bp, struct bnx2x_virtf *vf, ...@@ -1818,10 +1817,9 @@ static void bnx2x_vf_mbx_request(struct bnx2x *bp, struct bnx2x_virtf *vf,
* the channel. * the channel.
*/ */
storm_memset_vf_mbx_ack(bp, vf->abs_vfid); storm_memset_vf_mbx_ack(bp, vf->abs_vfid);
/* Firmware ack should be written before unlocking channel */
mmiowb(); mmiowb();
bnx2x_unlock_vf_pf_channel(bp, vf, bnx2x_unlock_vf_pf_channel(bp, vf, mbx->first_tlv.tl.type);
mbx->first_tlv.tl.type);
}
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment