mirror of https://gitee.com/openkylin/linux.git
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:
parent
5cc5c2d2e5
commit
a524ef77d5
|
@ -5213,9 +5213,9 @@ struct eth_event_data {
|
||||||
struct vf_pf_event_data {
|
struct vf_pf_event_data {
|
||||||
u8 vf_id;
|
u8 vf_id;
|
||||||
u8 reserved0;
|
u8 reserved0;
|
||||||
u16 reserved1;
|
__le16 reserved1;
|
||||||
u32 msg_addr_lo;
|
__le32 msg_addr_lo;
|
||||||
u32 msg_addr_hi;
|
__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 */
|
/* Update VFDB with current message and schedule its handling */
|
||||||
mutex_lock(&BP_VFDB(bp)->event_mutex);
|
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_hi =
|
||||||
BP_VF_MBX(bp, vf_idx)->vf_addr_lo = vfpf_event->msg_addr_lo;
|
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);
|
BP_VFDB(bp)->event_occur |= (1ULL << vf_idx);
|
||||||
mutex_unlock(&BP_VFDB(bp)->event_mutex);
|
mutex_unlock(&BP_VFDB(bp)->event_mutex);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue