qla2xxx: Fixes for the driver
Subsystems (2)
cover qla2xxx: Fixes for the driver
Hi Martin,
This series has couple bug fixes for the driver.
First patch addresses initialization error with the newer adapter on a blade systems.
Second patch adds protection for accidental flash corruption using SysFS path.
Please apply them to 5.4/scsi-fixes branch for inclusion in 5.4-rc5.
Thanks,
Himanshu
Himanshu Madhani (1):
qla2xxx: Initialized mailbox to prevent driver load failure
Quinn Tran (1):
qla2xxx: Fix partial flash write of MBI
drivers/scsi/qla2xxx/qla_attr.c | 7 +++---- drivers/scsi/qla2xxx/qla_mbx.c | 3 ++- 2 files changed, 5 insertions(+), 5 deletions(-)
Signature · 1 line
2.12.0
PATCH 1/2 qla2xxx: Initialized mailbox to prevent driver load failure
This patch fixes issue with Gen7 adapter in a blade enviornment, where one of the port will not be detected by driver. Firmware expectes mailbox 11 to be set or clear by driver for newer ISP.
Following message is seen in the log file
[ 18.810892] qla2xxx [0000:d8:00.0]-1820:1: **** Failed=102 mb[0]=4005 mb[1]=37 mb[2]=20 mb[3]=8 [ 18.819596] cmd=2 ****
--- drivers/scsi/qla2xxx/qla_mbx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/scsi/qla2xxx/qla_mbx.c +2 -1
@@ -702,6 +702,7 @@ qla2x00_execute_fw(scsi_qla_host_t *vha, uint32_t risc_addr) mcp->mb[2 ] =LSW (risc_addr); mcp->mb[3 ] =0 ; mcp->mb[4 ] =0 ; + mcp->mb[11 ] =0 ; ha->flags.using_lr_setting =0 ;if (IS_QLA25XX (ha) ||IS_QLA81XX (ha) ||IS_QLA83XX (ha) ||IS_QLA27XX (ha) ||IS_QLA28XX (ha)) {
@@ -746,7 +747,7 @@ qla2x00_execute_fw(scsi_qla_host_t *vha, uint32_t risc_addr)if (ha->flags.exchoffld_enabled) mcp->mb[4 ] |=ENABLE_EXCHANGE_OFFLD ; - mcp->out_mb |=MBX_4 |MBX_3 |MBX_2 |MBX_1 ; + mcp->out_mb |=MBX_4 |MBX_3 |MBX_2 |MBX_1 |MBX_11 ; mcp->in_mb |=MBX_3 |MBX_2 |MBX_1 ; }else { mcp->mb[1 ] =LSW (risc_addr);
Signature · 1 line
2.12.0
PATCH 2/2 qla2xxx: Fix partial flash write of MBI
In reply to Himanshu MadhaniFrom: Quinn Tran <[email protected]>
For new adapter with multiple flash regions to write to, current code allows FW & Boot regions to be written, while other regions are blocked via sysfs. The fix is to block all flash read/write through sysfs interface.
--- drivers/scsi/qla2xxx/qla_attr.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/scsi/qla2xxx/qla_attr.c +3 -4
@@ -440,9 +440,6 @@ qla2x00_sysfs_write_optrom_ctl(struct file *filp, struct kobject *kobj, valid =0 ;if (ha->optrom_size ==OPTROM_SIZE_2300 && start ==0 ) valid =1 ; -else if (start == (ha->flt_region_boot *4 ) || - start == (ha->flt_region_fw *4 )) - valid =1 ;else if (IS_QLA24XX_TYPE (ha) ||IS_QLA25XX (ha)) valid =1 ;if (!valid) {
@@ -489,8 +486,10 @@ qla2x00_sysfs_write_optrom_ctl(struct file *filp, struct kobject *kobj,"Writing flash region -- 0x%x/0x%x.\n" , ha->optrom_region_start, ha->optrom_region_size); - ha->isp_ops->write_optrom (vha, ha->optrom_buffer, + rval = ha->isp_ops->write_optrom (vha, ha->optrom_buffer, ha->optrom_region_start, ha->optrom_region_size); +if (rval) + rval = -EIO ;break ;default : rval = -EINVAL ;
Signature · 1 line
2.12.0
Martin K. Petersen
AppliedHimanshu,
Quoted 6 lines
This series has couple bug fixes for the driver.
First patch addresses initialization error with the newer adapter on a blade systems.
Second patch adds protection for accidental flash corruption using SysFS path.
Applied to 5.4/scsi-fixes, thanks!
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering