Commit 8487b4af authored by Hayes Wang's avatar Hayes Wang Committed by Jakub Kicinski
Browse files

r8152: fix the firmware doesn't work



generic_ocp_write() asks the parameter "size" must be 4 bytes align.
Therefore, write the bp would fail, if the mac->bp_num is odd. Align the
size to 4 for fixing it. The way may write an extra bp, but the
rtl8152_is_fw_mac_ok() makes sure the value must be 0 for the bp whose
index is more than mac->bp_num. That is, there is no influence for the
firmware.

Besides, I check the return value of generic_ocp_write() to make sure
everything is correct.

Fixes: e5c266a6 ("r8152: set bp in bulk")
Signed-off-by: default avatarHayes Wang <hayeswang@realtek.com>
Link: https://patch.msgid.link/20240903063333.4502-1-hayeswang@realtek.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 7e419693
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment