mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-11 13:04:03 +08:00
scsi: smartpqi: Fix byte aligned writew for ARM servers
Correct OOPs on ARM servers during driver init. The driver attempts to update FW with max_feature_supported value using a writew() kernel call using a byte aligned address. This fails on some ARM systems. Change the writew() to two writeb() calls to update this value. Reviewed-by: Scott Benesh <scott.benesh@microchip.com> Reviewed-by: Scott Teel <scott.teel@microchip.com> Reviewed-by: Mike McGowen <mike.mcgowen@microchip.com> Signed-off-by: Don Brace <don.brace@microchip.com> Link: https://lore.kernel.org/r/20230428153712.297638-9-don.brace@microchip.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
68f7920492
commit
c23efd9ead
@ -7718,8 +7718,8 @@ static int pqi_enable_firmware_features(struct pqi_ctrl_info *ctrl_info,
|
||||
features_requested_iomem_addr +
|
||||
(le16_to_cpu(firmware_features->num_elements) * 2) +
|
||||
sizeof(__le16);
|
||||
writew(PQI_FIRMWARE_FEATURE_MAXIMUM,
|
||||
host_max_known_feature_iomem_addr);
|
||||
writeb(PQI_FIRMWARE_FEATURE_MAXIMUM & 0xFF, host_max_known_feature_iomem_addr);
|
||||
writeb((PQI_FIRMWARE_FEATURE_MAXIMUM & 0xFF00) >> 8, host_max_known_feature_iomem_addr + 1);
|
||||
}
|
||||
|
||||
return pqi_config_table_update(ctrl_info,
|
||||
|
Loading…
Reference in New Issue
Block a user