aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2020-11-25scsi: arcmsr: Drop PCI wakeup calls from .resumeVaibhav Gupta1-1/+0
The driver calls pci_enable_wake(...., false) in arcmsr_resume(), and there is no corresponding pci_enable_wake(...., true) in arcmsr_suspend(). Either it should do enable-wake the device in .suspend() or should not invoke pci_enable_wake() at all. Concluding that this driver doesn't support enable-wake and PCI core calls pci_enable_wake(pci_dev, PCI_D0, false) during resume, drop it from arcmsr_resume(). Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vaibhav Gupta <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-11-25scsi: aic79xx: Use generic power managementVaibhav Gupta4-49/+20
Drivers should do only device-specific jobs. But in general, drivers using legacy PCI PM framework for .suspend()/.resume() have to manage many PCI PM-related tasks themselves which can be done by PCI Core itself. This brings extra load on the driver and it directly calls PCI helper functions to handle them. Switch to the new generic framework by updating function signatures and define a "struct dev_pm_ops" variable to bind PM callbacks. Also, remove unnecessary calls to the PCI Helper functions along with the legacy .suspend & .resume bindings. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vaibhav Gupta <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-11-25scsi: aic7xxx: Use generic power managementVaibhav Gupta4-49/+17
Drivers should do only device-specific jobs. But in general, drivers using legacy PCI PM framework for .suspend()/.resume() have to manage many PCI PM-related tasks themselves which can be done by PCI Core itself. This brings extra load on the driver and it directly calls PCI helper functions to handle them. Switch to the new generic framework by updating function signatures and define a "struct dev_pm_ops" variable to bind PM callbacks. Also, remove unnecessary calls to the PCI Helper functions along with the legacy .suspend & .resume bindings. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vaibhav Gupta <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-11-25scsi: aacraid: Use generic power managementVaibhav Gupta1-26/+7
Drivers should do only device-specific jobs. But in general, drivers using legacy PCI PM framework for .suspend()/.resume() have to manage many PCI PM-related tasks themselves which can be done by PCI Core itself. This brings extra load on the driver and it directly calls PCI helper functions to handle them. Switch to the new generic framework by updating function signatures and define a "struct dev_pm_ops" variable to bind PM callbacks. Also, remove unnecessary calls to the PCI Helper functions along with the legacy .suspend & .resume bindings. Link: https://lore.kernel.org/r/[email protected] Acked-by: Balsundar P <[email protected]> Signed-off-by: Vaibhav Gupta <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-11-25scsi: aacraid: Drop pci_enable_wake() from .resumeVaibhav Gupta1-1/+0
The driver calls pci_enable_wake(...., false) in aac_resume(), and there is no corresponding pci_enable_wake(...., true) in aac_suspend(). Either it should do enable-wake the device in .suspend() or should not invoke pci_enable_wake() at all. Concluding that this is a bug and PCI core calls pci_enable_wake(pci_dev, PCI_D0, false) during resume, drop it from aac_resume(). Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vaibhav Gupta <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-11-25scsi: megaraid_sas: Update function descriptionVaibhav Gupta1-1/+1
Function parameter 'pdev 'is described as Generic Device Structure. It is a PCI device structure. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vaibhav Gupta <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-11-25scsi: megaraid_sas: Use generic power managementVaibhav Gupta1-38/+13
Drivers should do only device-specific jobs. But in general, drivers using legacy PCI PM framework for .suspend()/.resume() have to manage many PCI PM-related tasks themselves which can be done by PCI Core itself. This brings extra load on the driver and it directly calls PCI helper functions to handle them. Switch to the new generic framework by updating function signatures and define a "struct dev_pm_ops" variable to bind PM callbacks. Also, remove unnecessary calls to the PCI Helper functions along with the legacy .suspend & .resume bindings. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vaibhav Gupta <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-11-25scsi: megaraid_sas: Drop PCI wakeup calls from .resumeVaibhav Gupta1-1/+0
The driver calls pci_enable_wake(...., false) in megasas_resume(), and there is no corresponding pci_enable_wake(...., true) in megasas_suspend(). Either it should do enable-wake the device in .suspend() or should not invoke pci_enable_wake() at all. Concluding that this driver doesn't support enable-wake and PCI core calls pci_enable_wake(pci_dev, PCI_D0, false) during resume, drop it from megasas_resume(). Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vaibhav Gupta <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-11-23scsi: fnic: Validate io_req before othersKaran Tilak Kumar2-6/+5
We need to check for a valid io_req before we check other data. Also, remove redundant checks. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Arulprabhu Ponnusamy <[email protected]> Co-developed-by: Satish Kharat <[email protected]> Signed-off-by: Satish Kharat <[email protected]> Signed-off-by: Karan Tilak Kumar <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-11-23scsi: fnic: Set scsi_set_resid() only for underflowKaran Tilak Kumar2-3/+4
Set scsi_set_resid() only if FCPIO_ICMND_CMPL_RESID_UNDER is set. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Arulprabhu Ponnusamy <[email protected]> Co-developed-by: Satish Kharat <[email protected]> Signed-off-by: Satish Kharat <[email protected]> Signed-off-by: Karan Tilak Kumar <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-11-23scsi: fnic: Change shost_printk() to FNIC_MAIN_DBG()Karan Tilak Kumar2-2/+2
Replace shost_printk() with FNIC_MAIN_DBG() so that these log messages are controlled by fnic_log_level flag in fnic_handle_link. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Arulprabhu Ponnusamy <[email protected]> Co-developed-by: Satish Kharat <[email protected]> Signed-off-by: Satish Kharat <[email protected]> Signed-off-by: Karan Tilak Kumar <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-11-23scsi: fnic: Avoid looping in TRANS ETH on unloadKaran Tilak Kumar4-2/+8
Avoid looping in fnic_scsi_abort_io() before sending fw reset when fnic is in TRANS ETH state and when we have not received any link events. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Arulprabhu Ponnusamy <[email protected]> Co-developed-by: Satish Kharat <[email protected]> Signed-off-by: Satish Kharat <[email protected]> Signed-off-by: Karan Tilak Kumar <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-11-23scsi: fnic: Change shost_printk() to FNIC_FCS_DBG()Karan Tilak Kumar2-4/+4
Replacing shost_printk with FNIC_FCS_DBG() so that these log messages are controlled by fnic_log_level flag in fnic_fip_handler_timer. Bumping up version number from 47 to 49 to maintain same level as internal version. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Arulprabhu Ponnusamy <[email protected]> Co-developed-by: Satish Kharat <[email protected]> Signed-off-by: Satish Kharat <[email protected]> Signed-off-by: Karan Tilak Kumar <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-11-23scsi: pm8001: Make implicit use of pm8001_ha in pm8001_printk() explicitJoe Perches3-11/+10
Make the pm8001_printk() macro take an explicit HBA instead of assuming the existence of an unspecified pm8001_ha argument. Miscellanea: - Add pm8001_ha to the few uses of pm8001_printk() - Add HBA to the pm8001_dbg macro call to pm8001_printk() Link: https://lore.kernel.org/r/0e17a4c845f15e18f98b346ffb9b039584d21cdd.1605914030.git.joe@perches.com Acked-by: Jack Wang <[email protected]> Signed-off-by: Joe Perches <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-11-23scsi: pm8001: Neaten debug logging macros and usesJoe Perches6-1887/+1354
Every PM8001_<FOO>_DBG macro uses an internal call to pm8001_printk. Convert all uses of: PM8001_<FOO>_DBG(hba, pm8001_printk(fmt, ...)) to pm8001_dbg(hba, <FOO>, fmt, ...) so the visual complexity of each macro is reduced. The repetitive macro definitions are converted to a single pm8001_dbg and the level is concatenated using PM8001_##level##_LOGGING for the specific level test. Done with coccinelle, checkpatch and a little typing of the new macro definition. Miscellanea: - Coalesce formats - Realign arguments - Add missing terminating newlines to formats - Remove trailing spaces from formats - Change defective loop with printk(KERN_INFO... to emit a 16 byte hex block to %p16h Link: https://lore.kernel.org/r/49f36a93af7752b613d03c89a87078243567fd9a.1605914030.git.joe@perches.com Reported-by: kernel test robot <[email protected]> Acked-by: Jack Wang <[email protected]> Signed-off-by: Joe Perches <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-11-23scsi: pm8001: Remove typecast for pointer returned by kcalloc()Xu Wang1-1/+1
Stop typecasting the value returned by kcalloc(). Link: https://lore.kernel.org/r/[email protected] Acked-by: Jack Wang <[email protected]> Signed-off-by: Xu Wang <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-11-23scsi: NCR5380: Reduce NCR5380_maybe_release_dma_irq() call sitesFinn Thain1-6/+3
Refactor to avoid needless calls to NCR5380_maybe_release_dma_irq(). This makes the machine code smaller and the source more readable. Link: https://lore.kernel.org/r/c1317ae8fdcb498460de5d7ea0bd62a42f5eeca8.1605847196.git.fthain@telegraphics.com.au Tested-by: Michael Schmitz <[email protected]> Reviewed-by: Michael Schmitz <[email protected]> Signed-off-by: Finn Thain <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-11-23scsi: atari_scsi: Fix race condition between .queuecommand and EHFinn Thain2-10/+9
It is possible that bus_reset_cleanup() or .eh_abort_handler could be invoked during NCR5380_queuecommand(). If that takes place before the new command is enqueued and after the ST-DMA "lock" has been acquired, the ST-DMA "lock" will be released again. This will result in a lost DMA interrupt and a command timeout. Fix this by excluding EH and interrupt handlers while the new command is enqueued. Link: https://lore.kernel.org/r/af25163257796b50bb99d4ede4025cea55787b8f.1605847196.git.fthain@telegraphics.com.au Tested-by: Michael Schmitz <[email protected]> Reviewed-by: Michael Schmitz <[email protected]> Signed-off-by: Finn Thain <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-11-23scsi: ufs: Adjust logic in common ADAPT helperBjorn Andersson1-1/+1
The introduction of ufshcd_dme_configure_adapt() refactored out duplication from the Mediatek and Qualcomm drivers. Both these implementations had the logic of: gear_tx == UFS_HS_G4 => PA_INITIAL_ADAPT gear_tx != UFS_HS_G4 => PA_NO_ADAPT but now both implementations pass PA_INITIAL_ADAPT as "adapt_val" and if gear_tx is not UFS_HS_G4 that is replaced with PA_INITIAL_ADAPT. In other words, it's PA_INITIAL_ADAPT in both above cases. The result is that e.g. Qualcomm SM8150 has no longer functional UFS, so adjust the logic to match the previous implementation. Link: https://lore.kernel.org/r/[email protected] Fixes: fc85a74e28fe ("scsi: ufs: Refactor ADAPT configuration function") Reviewed-by: Can Guo <[email protected]> Reviewed-by: Stanley Chu <[email protected]> Signed-off-by: Bjorn Andersson <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-11-19scsi: lpfc: Fix variable 'vport' set but not used in ↵James Smart1-2/+0
lpfc_sli4_abts_err_handler() Remove vport variable that is assigned but not used in lpfc_sli4_abts_err_handler(). Link: https://lore.kernel.org/r/[email protected] Fixes: e7dab164a9aa ("scsi: lpfc: Fix scheduling call while in softirq context in lpfc_unreg_rpi") Reported-by: kernel test robot <[email protected]> Signed-off-by: James Smart <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-11-19scsi: lpfc: Fix missing prototype for lpfc_nvmet_prep_abort_wqe()James Smart1-1/+1
lpfc_nvmet_prep_abort_wqe() needs to be declared static. Link: https://lore.kernel.org/r/[email protected] Fixes: db7531d2b377 ("scsi: lpfc: Convert abort handling to SLI-3 and SLI-4 handlers") Reported-by: kernel test robot <[email protected]> Signed-off-by: James Smart <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-11-19scsi: lpfc: Fix set but unused variables in lpfc_dev_loss_tmo_handler()James Smart1-2/+0
Remove set but not used variable shost in lpfc_dev_loss_tmo_handler(). Link: https://lore.kernel.org/r/[email protected] Fixes: 52edb2caf675 ("scsi: lpfc: Remove ndlp when a PLOGI/ADISC/PRLI/REG_RPI ultimately fails") Reported-by: kernel test robot <[email protected]> Signed-off-by: James Smart <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-11-19scsi: lpfc: Fix set but not used warnings from Rework remote port lock handlingJames Smart3-12/+0
Remove local variables that are set but not used. Link: https://lore.kernel.org/r/[email protected] Fixes: c6adba150191 ("scsi: lpfc: Rework remote port lock handling") Reported-by: kernel test robot <[email protected]> Signed-off-by: James Smart <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-11-19scsi: lpfc: Fix missing prototype warning for lpfc_fdmi_vendor_attr_mi()James Smart1-1/+1
Function needs to be declared as static. Link: https://lore.kernel.org/r/[email protected] Fixes: 8aaa7bcf07a2 ("scsi: lpfc: Add FDMI Vendor MIB support") Reported-by: kernel test robot <[email protected]> Signed-off-by: James Smart <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-11-19scsi: lpfc: Fix memory leak on lcb_contextColin Ian King1-3/+5
Currently there is an error return path that neglects to free the allocation for lcb_context. Fix this by adding a new error free exit path that kfree's lcb_context before returning. Use this new kfree exit path in another exit error path that also kfree's the same object, allowing a line of code to be removed. Link: https://lore.kernel.org/r/[email protected] Fixes: 4430f7fd09ec ("scsi: lpfc: Rework locations of ndlp reference taking") Reviewed-by: James Smart <[email protected]> Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]> Addresses-Coverity: ("Resource leak")
2020-11-19scsi: lpfc: Remove dead code on second !ndlp checkColin Ian King1-6/+0
Currently there is a null check on the pointer ndlp that exits via error path issue_ct_rsp_exit followed by another null check on the same pointer that is almost identical to the previous null check stanza and yet can never can be reached because the previous check exited via issue_ct_rsp_exit. This is deadcode and can be removed. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: James Smart <[email protected]> Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]> Addresses-Coverity: ("Logically dead code")
2020-11-19scsi: lpfc: Fix pointer defereference before it is null checked issueColin Ian King1-2/+5
There is a null check on pointer lpfc_cmd after the pointer has been dereferenced when pointers rdata and ndlp are initialized at the start of the function. Fix this by only assigning rdata and ndlp after the pointer lpfc_cmd has been null checked. Link: https://lore.kernel.org/r/[email protected] Fixes: 96e209be6ecb ("scsi: lpfc: Convert SCSI I/O completions to SLI-3 and SLI-4 handlers") Reviewed-by: James Smart <[email protected]> Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]> Addresses-Coverity: ("Dereference before null check")
2020-11-19scsi: ibmvfc: Advertise client support for targetWWPN using v2 commandsTyrel Datwyler1-1/+1
The previous patch added support for the targetWWPN field in version 2 MADs and vfcFrame structures. Set the IBMVFC_CAN_SEND_VF_WWPN bit in our capabailites flag during NPIV Login to inform the VIOS that this client supports the feature. Link: https://lore.kernel.org/r/[email protected] Acked-by: Brian King <[email protected]> Signed-off-by: Tyrel Datwyler <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-11-19scsi: ibmvfc: Add support for target_wwpn field in v2 MADs and vfcFrameTyrel Datwyler1-6/+33
Several version 2 MADs and the version 2 vfcFrame structures introduced a new targetWWPN field for better identification of a target over the scsi_id. Set this field and MAD versioning fields when the VIOS advertises the IBMVFC_HANDLE_VF_WWPN capability. Link: https://lore.kernel.org/r/[email protected] Acked-by: Brian King <[email protected]> Signed-off-by: Tyrel Datwyler <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-11-19scsi: ibmvfc: Add FC payload retrieval routines for versioned vfcFramesTyrel Datwyler1-23/+54
The FC iu and response payloads are located at different offsets depending on the ibmvfc_cmd version. This is a result of the version 2 vfcFrame definition adding an extra 64bytes of reserved space to the structure prior to the payloads. Add helper routines to determine the current vfcFrame version and return a pointer to the proper iu or response structure within that ibmvfc_cmd. Link: https://lore.kernel.org/r/[email protected] Acked-by: Brian King <[email protected]> Signed-off-by: Tyrel Datwyler <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-11-19scsi: ibmvfc: Add helper for testing capability flagsTyrel Datwyler1-1/+8
Testing the NPIV Login response capabilities is a long winded process of dereferencing the vhost->login_buf->resp.capabilities field, then byte swapping that value to host endian, and performing the bitwise test. Currently we only ever check this in ibmvfc_cancel_all(), but follow-up patches will need to regularly check for targetWWPN and channelization support. Add a helper to simplify checking various VIOS capabilities, namely ibmvfc_check_caps(). Link: https://lore.kernel.org/r/[email protected] Acked-by: Brian King <[email protected]> Signed-off-by: Tyrel Datwyler <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-11-19scsi: ibmvfc: Add new fields for version 2 of several MADsTyrel Datwyler2-31/+55
Introduce a target_wwpn field to several MADs. Its possible that a SCSI ID of a target can change due to some fabric changes. The WWPN of the SCSI target provides a better way to identify the target. Also, add flags for receiving MAD versioning information and advertising client support for targetWWPN with the VIOS. This latter capability flag will be required for future clients capable of requesting multiple hardware queues from the host adapter. Link: https://lore.kernel.org/r/[email protected] Acked-by: Brian King <[email protected]> Signed-off-by: Tyrel Datwyler <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-11-19scsi: ibmvfc: Deduplicate common ibmvfc_cmd init codeTyrel Datwyler1-32/+24
The virtual FC frame command exchanged with the VIOS is used for device reset and command abort TMF as well as normally queued commands. When initializing the ibmvfc_cmd there are several elements of the command that are set the same way regardless of the command type. Deduplicate code by moving these commonally set fields into a initialization helper routine, namely ibmvfc_init_vfc_cmd(). Link: https://lore.kernel.org/r/[email protected] Acked-by: Brian King <[email protected]> Signed-off-by: Tyrel Datwyler <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-11-19scsi: ibmvfc: Use correlation token to tag commandsTyrel Datwyler1-0/+4
The vfcFrame correlation field is a 64bit handle that is intended to trace I/O operations through both the client stack and VIOS stack when the underlying physical FC adapter supports tagging. Tag vfcFrames with the associated ibmvfc_event pointer handle. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Tyrel Datwyler <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-11-19scsi: ibmvfc: Remove trailing semicolonTyrel Datwyler1-1/+1
Remove a superfluous semicolon following a closing function block bracket. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Tyrel Datwyler <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-11-19scsi: ibmvfc: Byte swap login_buf.resp values in attribute show functionsTyrel Datwyler1-2/+2
Both ibmvfc_show_host_(capabilities|npiv_version) functions retrieve values from vhost->login_buf.resp buffer. This is the MAD response buffer from the VIOS and as such any multi-byte non-string values are in big endian format. Byte swap these values to host CPU endian format for better human readability. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Tyrel Datwyler <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-11-19scsi: ufs: Show LBA and length for UNMAP commandsLeo Liou1-0/+5
We have LBA and length for unmap commands. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Stanley Chu <[email protected]> Reviewed-by: Can Guo <[email protected]> Signed-off-by: Leo Liou <[email protected]> Signed-off-by: Jaegeuk Kim <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-11-19scsi: ufs: Fix clkgating on/offJaegeuk Kim1-1/+1
The following call stack prevents clk_gating at every I/O completion. We can remove the condition, ufshcd_any_tag_in_use(), since clkgating_work will check it again. ufshcd_complete_requests(struct ufs_hba *hba) ufshcd_transfer_req_compl() __ufshcd_transfer_req_compl() __ufshcd_release(hba) if (ufshcd_any_tag_in_use() == 1) return; ufshcd_tmc_handler(hba); blk_mq_tagset_busy_iter(); Note that this still requires work to deal with a potential race condition when user sets clkgating.delay_ms to very small value. That can cause preventing clkgating by the check of ufshcd_any_tag_in_use() in gate_work. Link: https://lore.kernel.org/r/[email protected] Fixes: 7252a3603015 ("scsi: ufs: Avoid busy-waiting by eliminating tag conflicts") Reviewed-by: Asutosh Das <[email protected]> Reviewed-by: Can Guo <[email protected]> Signed-off-by: Jaegeuk Kim <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-11-19scsi: ufs: Add more contexts in the ufs tracepointsJaegeuk Kim2-6/+21
This adds user-friendly tracepoints with group id. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Can Guo <[email protected]> Signed-off-by: Jaegeuk Kim <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-11-19scsi: ufs: Use WQ_HIGHPRI for gating workJaegeuk Kim1-1/+1
Must have WQ_MEM_RECLAIM ``WQ_MEM_RECLAIM`` All workqueues which might be used in the memory reclaim paths **MUST** have this flag set. The wq is guaranteed to have at least one execution context regardless of memory pressure. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Asutosh Das <[email protected]> Signed-off-by: Jaegeuk Kim <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-11-19scsi: ufs: Clear UAC for FFU and RPMB LUNsJaegeuk Kim2-6/+65
In order to conduct FFU or RPMB operations, UFS needs to clear UNIT ATTENTION condition. Clear it explicitly so that we get no failures during initialization. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jaegeuk Kim <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-11-19scsi: ufs: Atomic update for clkgating_enableJaegeuk Kim1-6/+6
While running a stress test which enables/disables clkgating, we occasionally hit device timeout. This patch avoids a subtle race condition to address it. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Can Guo <[email protected]> Signed-off-by: Jaegeuk Kim <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-11-19scsi: ufs: Avoid to call REQ_CLKS_OFF to CLKS_OFFJaegeuk Kim1-1/+2
Once UFS is gated with CLKS_OFF, it should not call REQ_CLKS_OFF again. This can lead to hibern8_enter failure. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Can Guo <[email protected]> Signed-off-by: Jaegeuk Kim <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-11-17scsi: qla4xxx: Remove redundant assignment to variable rvalJing Xiangfeng1-3/+0
The variable rval has been initialized with 'QLA_ERROR'. The assignment is redundant in an error path. Remove it. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jing Xiangfeng <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-11-17scsi: ufs: ufs-qcom: Use common ADAPT configuration functionStanley Chu1-11/+3
Use common ADAPT configuration function to reduce duplicated code in UFS drivers. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Bean Huo <[email protected]> Signed-off-by: Stanley Chu <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-11-17scsi: ufs: ufs-mediatek: Use common ADAPT configuration functionStanley Chu1-8/+3
Use common ADAPT configuration function to reduce duplicated code in UFS drivers. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Bean Huo <[email protected]> Signed-off-by: Stanley Chu <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-11-17scsi: ufs: Refactor ADAPT configuration functionStanley Chu2-0/+19
Several vendors are using same code to configure ADAPT settings for HS-G4. Simply refactor it as common function. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Bean Huo <[email protected]> Signed-off-by: Stanley Chu <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-11-17scsi: ufs: ufs-hisi: Use device parameter initialization functionStanley Chu2-25/+1
Use common device parameter initialization function instead of initializing those parameters by vendor driver itself. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Bean Huo <[email protected]> Signed-off-by: Stanley Chu <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-11-17scsi: ufs: ufs-exynos: Use device parameter initialization functionStanley Chu2-27/+1
Use common device parameter initialization function instead of initializing those parameters by vendor driver itself. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Bean Huo <[email protected]> Signed-off-by: Stanley Chu <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-11-17scsi: ufs: ufs-qcom: Use device parameter initialization functionStanley Chu2-23/+1
Use common device parameter initialization function instead of initializing those parameters by vendor driver itself. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Bean Huo <[email protected]> Signed-off-by: Stanley Chu <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>