bnx2x: fix receive of VF->PF mailbox messages by the PF on big-endian

On ppc64 the PF did not receive messages from VFs correctly.

Fields of struct vf_pf_event_data are little-endian.

Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Michal Schmidt 2016-03-02 13:47:07 +01:00 committed by David S. Miller
parent 5cc5c2d2e5
commit a524ef77d5
2 changed files with 7 additions and 5 deletions

View File

@ -5213,9 +5213,9 @@ struct eth_event_data {
struct vf_pf_event_data {
u8 vf_id;
u8 reserved0;
u16 reserved1;
u32 msg_addr_lo;
u32 msg_addr_hi;
__le16 reserved1;
__le32 msg_addr_lo;
__le32 msg_addr_hi;
};
/*

View File

@ -2187,8 +2187,10 @@ void bnx2x_vf_mbx_schedule(struct bnx2x *bp,
/* Update VFDB with current message and schedule its handling */
mutex_lock(&BP_VFDB(bp)->event_mutex);
BP_VF_MBX(bp, vf_idx)->vf_addr_hi = vfpf_event->msg_addr_hi;
BP_VF_MBX(bp, vf_idx)->vf_addr_lo = vfpf_event->msg_addr_lo;
BP_VF_MBX(bp, vf_idx)->vf_addr_hi =
le32_to_cpu(vfpf_event->msg_addr_hi);
BP_VF_MBX(bp, vf_idx)->vf_addr_lo =
le32_to_cpu(vfpf_event->msg_addr_lo);
BP_VFDB(bp)->event_occur |= (1ULL << vf_idx);
mutex_unlock(&BP_VFDB(bp)->event_mutex);