aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2020-09-15scsi: myrs: Make some symbols staticJason Yan1-4/+4
This addresses the following sparse warning: drivers/scsi/myrs.c:1532:5: warning: symbol 'myrs_host_reset' was not declared. Should it be static? drivers/scsi/myrs.c:1922:27: warning: symbol 'myrs_template' was not declared. Should it be static? drivers/scsi/myrs.c:2036:31: warning: symbol 'myrs_raid_functions' was not declared. Should it be static? drivers/scsi/myrs.c:2046:6: warning: symbol 'myrs_flush_cache' was not declared. Should it be static? Link: https://lore.kernel.org/r/[email protected] Reported-by: Hulk Robot <[email protected]> Signed-off-by: Jason Yan <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-15scsi: isci: Make scu_link_layer_set_txcomsas_timeout() staticJason Yan1-1/+1
This addresses the following sparse warning: drivers/scsi/isci/phy.c:672:6: warning: symbol 'scu_link_layer_set_txcomsas_timeout' was not declared. Should it be static? Link: https://lore.kernel.org/r/[email protected] Reported-by: Hulk Robot <[email protected]> Signed-off-by: Jason Yan <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-15scsi: bnx2fc: Make a bunch of symbols static in bnx2fc_fcoe.cJason Yan1-5/+5
This eliminates the following sparse warning: drivers/scsi/bnx2fc/bnx2fc_fcoe.c:53:1: warning: symbol 'bnx2fc_global_lock' was not declared. Should it be static? drivers/scsi/bnx2fc/bnx2fc_fcoe.c:111:6: warning: symbol 'bnx2fc_devloss_tmo' was not declared. Should it be static? drivers/scsi/bnx2fc/bnx2fc_fcoe.c:116:6: warning: symbol 'bnx2fc_max_luns' was not declared. Should it be static? drivers/scsi/bnx2fc/bnx2fc_fcoe.c:121:6: warning: symbol 'bnx2fc_queue_depth' was not declared. Should it be static? drivers/scsi/bnx2fc/bnx2fc_fcoe.c:126:6: warning: symbol 'bnx2fc_log_fka' was not declared. Should it be static? Link: https://lore.kernel.org/r/[email protected] Reported-by: Hulk Robot <[email protected]> Signed-off-by: Jason Yan <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-15scsi: isci: Make isci_host_attrs staticJason Yan1-1/+1
This eliminates the following sparse warning: drivers/scsi/isci/init.c:145:25: warning: symbol 'isci_host_attrs' was not declared. Should it be static? Link: https://lore.kernel.org/r/[email protected] Reported-by: Hulk Robot <[email protected]> Signed-off-by: Jason Yan <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-15scsi: aacraid: Make some symbols static in aachba.cJason Yan1-3/+3
This eliminates the following sparse warning: drivers/scsi/aacraid/aachba.c:245:5: warning: symbol 'aac_convert_sgl' was not declared. Should it be static? drivers/scsi/aacraid/aachba.c:293:5: warning: symbol 'acbsize' was not declared. Should it be static? drivers/scsi/aacraid/aachba.c:324:5: warning: symbol 'aac_wwn' was not declared. Should it be static? Link: https://lore.kernel.org/r/[email protected] Reported-by: Hulk Robot <[email protected]> Signed-off-by: Jason Yan <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-15scsi: sym53c8xx_2: Delete unnecessary else-if in sym_xerr_cam_status()Ye Bin1-5/+1
If (x_status & XE_PARITY_ERR) is true we set cam_status = DID_PARITY, othervise cam_status always ends up being DID_ERROR. Delete superfluous else-if statements. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ye Bin <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-15scsi: ibmvfc: Avoid link down on FS9100 canister rebootBrian King2-17/+247
When a canister on a FS9100, or similar storage, running in NPIV mode, is rebooted, its WWPNs will fail over to another canister. When this occurs, we see a WWPN going away from the fabric at one N-Port ID, and, a short time later, the same WWPN appears at a different N-Port ID. When the canister is fully operational again, the WWPNs fail back to the original canister. If there is any I/O outstanding to the target when this occurs, it will result in the implicit logout the ibmvfc driver issues before removing the rport to fail. When the WWPN then shows up at a different N-Port ID, and we issue a PLOGI to it, the VIOS will see that it still has a login for this WWPN at the old N-Port ID, which results in the VIOS simulating a link down / link up sequence to the client, in order to get the VIOS and client LPAR in sync. The patch below improves the way we handle this scenario so as to avoid the link bounce, which affects all targets under the virtual host adapter. The change is to utilize the Move Login MAD, which will work even when I/O is outstanding to the target. The change only alters the target state machine for the case where the implicit logout fails prior to deleting the rport. If this implicit logout fails, we defer deleting the ibmvfc_target object after calling fc_remote_port_delete. This enables us to later retry the implicit logout after terminate_rport_io occurs, or to issue the Move Login request if a WWPN shows up at a new N-Port ID prior to this occurring. This has been tested by IBM's storage interoperability team on a FS9100, forcing the failover to occur. With debug tracing enabled in the ibmvfc driver, we confirmed the move login was sent in this scenario and confirmed the link bounce no longer occurred. [mkp: fix checkpatch warnings] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Brian King <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-15scsi: core: Update additional sense codes listDamien Le Moal1-1/+53
Add missing Additional Sense Codes listed in http://www.t10.org/lists/asc-num.txt. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Himanshu Madhani <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Signed-off-by: Damien Le Moal <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-15scsi: core: Clean up scsi_noretry_cmd()Damien Le Moal1-2/+2
No need for else after return. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Himanshu Madhani <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Signed-off-by: Damien Le Moal <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-15scsi: target: tcmu: Add missing newline when printing parametersXiongfeng Wang1-1/+1
The tcmu 'global_max_data_area_mb' parameter in sysfs is missing a newline. Add it. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Xiongfeng Wang <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-15scsi: ufs: Fix NOP OUT timeout valueDaejun Park1-2/+2
Boot occasionally fails with some Samsung low-power UFS devices. The reason is that these devices have a little bit higher latency for NOP OUT responses. This causes boot to fail because the NOP OUT command is issued during initialization to check whether the device transport protocol is ready or not. Increase NOP_OUT_TIMEOUT value from 30 to 50ms. Link: https://lore.kernel.org/r/231786897.01599016081767.JavaMail.epsvc@epcpadp2 Acked-by: Avri Altman <[email protected]> Signed-off-by: Daejun Park <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-15scsi: mpt3sas: A small correction in _base_process_reply_queueTomas Henzl1-1/+1
There is no need to compute modulo. A simple comparison is good enough. Link: https://lore.kernel.org/r/[email protected] Acked-by: sreekanth reddy <[email protected]> Signed-off-by: Tomas Henzl <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-15scsi: mpt3sas: Fix sync irqsTomas Henzl1-5/+9
_base_process_reply_queue() called from _base_interrupt() may schedule a new irq poll. Fix this by calling synchronize_irq() first. Also ensure that enable_irq() is called only when necessary to avoid "Unbalanced enable for IRQ..." errors. Link: https://lore.kernel.org/r/[email protected] Fixes: 320e77acb327 ("scsi: mpt3sas: Irq poll to avoid CPU hard lockups") Acked-by: Sreekanth Reddy <[email protected]> Signed-off-by: Tomas Henzl <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-15scsi: mpt3sas: Detect tampered Aero and Sea adaptersSreekanth Reddy1-16/+105
The driver will throw an error message when a tampered type controller is detected. The intent is to avoid interacting with any firmware which is not secured/signed by Broadcom. Any tampering on firmware component will be detected by hardware and it will be communicated to the driver to avoid any further interaction with that component. [mkp: switched back to dev_err] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sreekanth Reddy <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-15scsi: megaraid: Make smp_affinity_enable staticJason Yan1-1/+1
This addresses the following sparse warning: drivers/scsi/megaraid/megaraid_sas_base.c:80:5: warning: symbol 'smp_affinity_enable' was not declared. Should it be static? Link: https://lore.kernel.org/r/[email protected] Reported-by: Hulk Robot <[email protected]> Reviewed-by: Damien Le Moal <[email protected]> Signed-off-by: Jason Yan <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-15scsi: target: Remove redundant assignment to variable 'ret'Jing Xiangfeng1-2/+0
The variable ret has been initialized with a value '0'. The assignment in switch-case is redundant. Remove it. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Maurizio Lombardi <[email protected]> Signed-off-by: Jing Xiangfeng <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-15scsi: zfcp: Clarify access to erp_action in zfcp_fsf_req_complete()Julian Wiedmann1-2/+8
While reviewing commit 936e6b85da04 ("scsi: zfcp: Fix panic on ERP timeout for previously dismissed ERP action"), I stumbled over zfcp_fsf_req_complete() and wondered whether it has similar issues wrt concurrent modification of req->erp_action by zfcp_erp_strategy_check_fsfreq(). But a closer look shows that both its two callers [zfcp_fsf_reqid_check(), zfcp_fsf_req_dismiss_all()] remove the request from the adapter's req_list under the req_list's lock. Hence we can trust that if zfcp_erp_strategy_check_fsfreq() concurrently looks up the corresponding req_id, it won't find this request and is thus unable to modify it while it's being processed by zfcp_fsf_req_complete(). Add a code comment that hopefully makes this easier for future readers, and condense the two accesses to ->erp_action that made me trip over this code path in the first place. Link: https://lore.kernel.org/r/c500eac301fcbba5af942bbd200f2d6b14e46994.1599765652.git.bblock@linux.ibm.com Reviewed-by: Steffen Maier <[email protected]> Reviewed-by: Benjamin Block <[email protected]> Signed-off-by: Julian Wiedmann <[email protected]> Signed-off-by: Benjamin Block <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-15scsi: zfcp: Use list_first_entry_or_null() in zfcp_erp_thread()Julian Wiedmann1-5/+3
Use the right helper to avoid poking around in the list's internals. Link: https://lore.kernel.org/r/ed669555c73aab95b29444c10066f492c0c43391.1599765652.git.bblock@linux.ibm.com Reviewed-by: Steffen Maier <[email protected]> Reviewed-by: Benjamin Block <[email protected]> Signed-off-by: Julian Wiedmann <[email protected]> Signed-off-by: Benjamin Block <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-15scsi: aic94xx: Remove unused inline functionYueHaibing1-8/+0
There is no caller in tree. Remove it. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: YueHaibing <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-15scsi: libfc: Fix passing zero to 'PTR_ERR' warningYueHaibing1-2/+2
drivers/scsi/libfc/fc_disc.c:304 fc_disc_error() warn: passing zero to 'PTR_ERR' fp may be NULL in fc_disc_error(), use PTR_ERR_OR_ZERO to handle this. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: YueHaibing <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-15scsi: fnic: Remove unneeded semicolonJason Yan1-1/+1
This addresses the following coccinelle warning: drivers/scsi/fnic/fnic_main.c:446:2-3: Unneeded semicolon Link: https://lore.kernel.org/r/[email protected] Reported-by: Hulk Robot <[email protected]> Signed-off-by: Jason Yan <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-15scsi: nsp32: Remove unneeded semicolonJason Yan1-2/+2
This addresses the following coccinelle warning: drivers/scsi/nsp32.c:1250:4-5: Unneeded semicolon drivers/scsi/nsp32.c:1842:2-3: Unneeded semicolon Link: https://lore.kernel.org/r/[email protected] Reported-by: Hulk Robot <[email protected]> Signed-off-by: Jason Yan <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-15scsi: sym53c8xx_2: Remove unneeded semicolonJason Yan1-3/+3
This addresses the following coccinelle warning: drivers/scsi/sym53c8xx_2/sym_fw.c:372:3-4: Unneeded semicolon drivers/scsi/sym53c8xx_2/sym_fw.c:480:3-4: Unneeded semicolon drivers/scsi/sym53c8xx_2/sym_fw.c:536:2-3: Unneeded semicolon Link: https://lore.kernel.org/r/[email protected] Reported-by: Hulk Robot <[email protected]> Signed-off-by: Jason Yan <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-15scsi: qla2xxx: Remove unneeded variable 'rval'Jason Yan1-3/+2
This addresses the following coccinelle warning: drivers/scsi/qla2xxx/qla_init.c:7112:5-9: Unneeded variable: "rval". Return "QLA_SUCCESS" on line 7115 Link: https://lore.kernel.org/r/[email protected] Reported-by: Hulk Robot <[email protected]> Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Jason Yan <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-15scsi: ufs-pci: Add LTR support for Intel controllersAdrian Hunter1-2/+125
Intel host controllers support the setting of latency tolerance. Accordingly, implement the PM QoS ->set_latency_tolerance() callback. The raw register values are also exposed via debugfs. Link: https://lore.kernel.org/r/[email protected] Fixes: 8c09d7527697 ("scsi: ufshdc-pci: Add Intel PCI IDs for EHL") Fixes: 1ab27c9cf8b6 ("ufs: Add support for clock gating") Reviewed-by: Avri Altman <[email protected]> Acked-by: Stanley Chu <[email protected]> Signed-off-by: Adrian Hunter <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-15Merge branch '5.9/scsi-fixes' into 5.10/scsi-ufsMartin K. Petersen33-92/+170
Resolve UFS discrepancies between fixes and queue. Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-09scsi: lpfc: Remove set but not used 'qp'Ye Bin1-3/+0
This addresses the following gcc warning with "make W=1": not used [-Wunused-but-set-variable] struct lpfc_sli4_hdw_queue *qp; ^ Link: https://lore.kernel.org/r/[email protected] Reported-by: Hulk Robot <[email protected]> Signed-off-by: Ye Bin <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]> drivers/scsi/lpfc/lpfc_debugfs.c: In function ‘lpfc_debugfs_hdwqstat_data’: drivers/scsi/lpfc/lpfc_debugfs.c:1699:30: warning: variable ‘qp’ set but
2020-09-09scsi: gdth: Remove set but used 'cmd_index'Ye Bin1-2/+0
This addresses the following gcc warning with "make W=1": drivers/scsi/gdth.c: In function ‘gdth_async_event’: drivers/scsi/gdth.c:3010:9: warning: variable ‘cmd_index’ set but not used [-Wunused-but-set-variable] int cmd_index; Link: https://lore.kernel.org/r/[email protected] Reported-by: Hulk Robot <[email protected]> Signed-off-by: Ye Bin <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-09scsi: pmcraid: Remove set but not used 'res'Ye Bin1-2/+0
This addresses the following gcc warning with "make W=1": drivers/scsi/pmcraid.c: In function ‘pmcraid_abort_cmd’: drivers/scsi/pmcraid.c:2863:33: warning: variable ‘res’ set but not used [-Wunused-but-set-variable] struct pmcraid_resource_entry *res; ^ Link: https://lore.kernel.org/r/[email protected] Reported-by: Hulk Robot <[email protected]> Signed-off-by: Ye Bin <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-09scsi: qla1280: Remove set but not used variable in qla1280_status_entry()Jason Yan1-7/+2
This addresses the following gcc warning with "make W=1": drivers/scsi/qla1280.c: In function ‘qla1280_status_entry’: drivers/scsi/qla1280.c:3607:28: warning: variable ‘lun’ set but not used [-Wunused-but-set-variable] 3607 | unsigned int bus, target, lun; | ^~~ drivers/scsi/qla1280.c:3607:20: warning: variable ‘target’ set but not used [-Wunused-but-set-variable] 3607 | unsigned int bus, target, lun; | ^~~~~~ drivers/scsi/qla1280.c:3607:15: warning: variable ‘bus’ set but not used [-Wunused-but-set-variable] 3607 | unsigned int bus, target, lun; | ^~~ Link: https://lore.kernel.org/r/[email protected] Reported-by: Hulk Robot <[email protected]> Signed-off-by: Jason Yan <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-09scsi: qla1280: Remove set but not used variable in qla1280_mailbox_command()Jason Yan1-2/+1
This addresses the following gcc warning with "make W=1": drivers/scsi/qla1280.c: In function ‘qla1280_mailbox_command’: drivers/scsi/qla1280.c:2430:11: warning: variable ‘data’ set but not used [-Wunused-but-set-variable] 2430 | uint16_t data; | ^~~~ Link: https://lore.kernel.org/r/[email protected] Reported-by: Hulk Robot <[email protected]> Signed-off-by: Jason Yan <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-09scsi: qla1280: Remove set but not used variable in qla1280_nvram_config()Jason Yan1-2/+1
This addresses the following gcc warning with "make W=1": drivers/scsi/qla1280.c: In function ‘qla1280_nvram_config’: drivers/scsi/qla1280.c:2188:36: warning: variable ‘ddma_conf’ set but not used [-Wunused-but-set-variable] 2188 | uint16_t hwrev, cfg1, cdma_conf, ddma_conf; | ^~~~~~~~~ Link: https://lore.kernel.org/r/[email protected] Reported-by: Hulk Robot <[email protected]> Signed-off-by: Jason Yan <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-09scsi: qla1280: Remove set but not used variable in qla1280_done()Jason Yan1-2/+1
This addresses the following gcc warning with "make W=1": drivers/scsi/qla1280.c: In function ‘qla1280_done’: drivers/scsi/qla1280.c:1244:19: warning: variable ‘lun’ set but not used [-Wunused-but-set-variable] 1244 | int bus, target, lun; | ^~~ Link: https://lore.kernel.org/r/[email protected] Reported-by: Hulk Robot <[email protected]> Signed-off-by: Jason Yan <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-09scsi: ufs: Fix 'unmet direct dependencies' config warningAlim Akhtar1-1/+0
With !CONFIG_OF and SCSI_UFS_EXYNOS selected, the below warning is given: WARNING: unmet direct dependencies detected for PHY_SAMSUNG_UFS Depends on [n]: OF [=n] && (ARCH_EXYNOS || COMPILE_TEST [=y]) Selected by [y]: - SCSI_UFS_EXYNOS [=y] && SCSI_LOWLEVEL [=y] && SCSI [=y] && SCSI_UFSHCD_PLATFORM [=y] && (ARCH_EXYNOS || COMPILE_TEST [=y]) Fix it by removing PHY_SAMSUNG_UFS dependency. Link: https://lore.kernel.org/r/[email protected] Reported-by: Randy Dunlap <[email protected]> Acked-by: Randy Dunlap <[email protected]> Signed-off-by: Alim Akhtar <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-09scsi: ibmvfc: Fix error return in ibmvfc_probe()Jing Xiangfeng1-0/+1
Fix to return error code PTR_ERR() from the error handling case instead of 0. Link: https://lore.kernel.org/r/[email protected] Acked-by: Tyrel Datwyler <[email protected]> Signed-off-by: Jing Xiangfeng <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-09scsi: ufs: ufs-mediatek: Fix build warnings with make W=1Stanley Chu1-3/+3
Fix build warnings with make W=1 as below, 1. >> drivers/scsi/ufs/ufs-mediatek.c:116:22: warning: format '%d' expects >> argument of type 'int', but argument 4 has type 'long int' 2. CC [M] drivers/scsi/ufs/ufs-mediatek.o ../drivers/scsi/ufs/ufs-mediatek.c:749: error: Cannot parse struct or union! /** is used specifically with kernel-doc tool. As a quick fix by removing dubious /** in the comment block of struct ufs_hba_variant_ops ufs_hba_mtk_vops. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Stanley Chu <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-09scsi: qla2xxx: Handle incorrect entry_type entriesDaniel Wagner1-2/+27
It was observed on an ISP8324 16Gb HBA with fw=8.08.203 (d0d5) in a PowerPC64 machine that pkt->entry_type was MBX_IOCB_TYPE/0x39 with an sp->type SRB_SCSI_CMD which is invalid and should not be possible. Reading the entry_type from the crash dump shows the expected value of STATUS_TYPE/0x03 but the call trace shows that qla24xx_mbx_iocb_entry() is used. Add a check to verify for consistency and reset the HBA if an invalid state is reached. Obviously, this is only a workaround until the real problem is solved. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Arun Easi <[email protected]> Signed-off-by: Daniel Wagner <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-09scsi: qla2xxx: Log calling function name in qla2x00_get_sp_from_handle()Daniel Wagner1-4/+6
Commit 7c3df1320e5e ("[SCSI] qla2xxx: Code changes to support new dynamic logging infrastructure.") removed the use of the func argument. Let's add it back. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Arun Easi <[email protected]> Signed-off-by: Daniel Wagner <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-09scsi: qla2xxx: Simplify return value logic in qla2x00_get_sp_from_handle()Daniel Wagner1-5/+3
Refactor qla2x00_get_sp_from_handle() to avoid the unnecessary goto if early returns are used. With this we can also avoid preinitialzing the sp pointer. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Martin Wilck <[email protected]> Reviewed-by: Arun Easi <[email protected]> Signed-off-by: Daniel Wagner <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-09scsi: qla2xxx: Warn if done() or free() are called on an already freed srbDaniel Wagner2-0/+15
Emit a warning when ->done or ->free are called on an already freed srb. There is a hidden use-after-free bug in the driver which corrupts the srb memory pool which originates from the cleanup callbacks. An extensive search didn't bring any lights on the real problem. The initial fix was to set both pointers to NULL and try to catch invalid accesses. But instead the memory corruption was gone and the driver didn't crash. Since not all calling places check for NULL pointer, add explicitly default handlers. With this we workaround the memory corruption and add a debug help. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Martin Wilck <[email protected]> Reviewed-by: Arun Easi <[email protected]> Signed-off-by: Daniel Wagner <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-09scsi: libsas: Fix error path in sas_notify_lldd_dev_found()Dan Carpenter1-1/+2
In sas_notify_lldd_dev_found(), if we can't allocate the necessary resources, then it seems like the wrong thing to mark the device as found and to increment the reference count. None of the callers ever drop the reference in that situation. [mkp: tweaked commit desc based on feedback from John] Link: https://lore.kernel.org/r/20200905125836.GF183976@mwanda Fixes: 735f7d2fedf5 ("[SCSI] libsas: fix domain_device leak") Reviewed-by: Jason Yan <[email protected]> Acked-by: John Garry <[email protected]> Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-08scsi: qedf: Retry qed->probe during recoverySaurav Kashyap1-0/+11
During recovery due to FCoE fn ramrod failure we wait for 2 sec and then call qed->probe. If probe fails then retry max 10 times. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Saurav Kashyap <[email protected]> Signed-off-by: Javed Hasan <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-08scsi: qedf: Add schedule_hw_err_handler callback for fan failureSaurav Kashyap2-0/+49
On fan failure, disable the PCI function and initiate recovery for ramrod failure. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Saurav Kashyap <[email protected]> Signed-off-by: Javed Hasan <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-08scsi: qedf: Return SUCCESS if stale rport is encounteredSaurav Kashyap1-1/+1
If SUCCESS is not returned, error handling will escalate. Return SUCCESS similar to other conditions in this function. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Saurav Kashyap <[email protected]> Signed-off-by: Javed Hasan <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-08scsi: qedf: FDMI attributes correctionJaved Hasan2-25/+58
Correction in the FDMI attributes required for RHBA and RPA registration. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Javed Hasan <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-08scsi: qedf: Fix for the session’s E_D_TOV valueJaved Hasan1-1/+1
Firmware expects E_D_TOV field in connection offload parameters as “msec”. Earlier incorrect value (100ms), was leading to abort from driver in the case when data frames for read take more than 100ms from target side, resulting in firmware reporting E_D_TOV expiration. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Javed Hasan <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-08scsi: qedf: Correct the comment in qedf_initiate_elsSaurav Kashyap1-1/+1
Correct the misleading comment in qedf_initiate_els(). Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Saurav Kashyap <[email protected]> Signed-off-by: Javed Hasan <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-08scsi: qedf: Change the debug parameter permission to read & writeJaved Hasan1-1/+1
Change the debug parameter permission to read & write. Gives flexibility to change the debug verbosity dynamically. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Javed Hasan <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-08scsi: ufs: ufs-mediatek: Add host reset mechanismStanley Chu2-2/+49
Add host reset mechanism to try to recover host-side errors during recovery flow. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Stanley Chu <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-08scsi: ufs: ufs-mediatek: Fix flag of unipro low-power modeStanley Chu1-6/+14
Forcibly leave UniPro low-power mode if UIC commands failed. This makes hba_enable_delay_us as correct (default) value for re-enabling the host. At the same time, change type of parameter "lpm" in function ufs_mtk_unipro_set_pm() to "bool". Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Stanley Chu <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>