Commit a524ef77 authored by Michal Schmidt's avatar Michal Schmidt Committed by David S. Miller

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: default avatarMichal Schmidt <mschmidt@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5cc5c2d2
......@@ -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;
};
/*
......
......@@ -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);
......
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