Commit e671d820 authored by Jie Wang's avatar Jie Wang Committed by Greg Kroah-Hartman
Browse files

net: hns3: add byte order conversion for PF to VF mailbox message



[ Upstream commit 767975e5 ]

Currently, hns3 mailbox processing between PF and VF missed to convert
message byte order and use data type u16 instead of __le16 for mailbox
data process. These processes may cause problems between different
architectures.

So this patch uses __le16/__le32 data type to define mailbox data
structures. To be compatible with old hns3 driver, these structures use
one-byte alignment. Then byte order conversions are added to mailbox
messages from PF to VF.

Signed-off-by: default avatarJie Wang <wangjie125@huawei.com>
Signed-off-by: default avatarGuangbin Huang <huangguangbin2@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Stable-dep-of: ac92c0a9 ("net: hns3: add barrier in vf mailbox reply process")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent bb0f1425
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment