aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2020-12-01scsi: hisi_sas: Remove preemptible()Ahmed S. Darwish1-7/+1
hisi_sas_task_exec() uses preemptible() to see if it's safe to block. This does not work for CONFIG_PREEMPT_COUNT=n kernels in which preemptible() always returns 0. The problem is masked when enabling some of the common Kconfig.debug options (like CONFIG_DEBUG_ATOMIC_SLEEP), as they implicitly enable the preemption counter. In general, driver leaf functions should not make logic decisions based on the context they're called from. The caller should be the entity responsible for explicitly indicating context. Since hisi_sas_task_exec() already has a gfp_t flags parameter, use it as the explicit context marker. Link: https://lore.kernel.org/r/[email protected] Fixes: 214e702d4b70 ("scsi: hisi_sas: Adjust task reject period during host reset") Fixes: 550c0d89d52d ("scsi: hisi_sas: Replace in_softirq() check in hisi_sas_task_exec()") Cc: Xiaofei Tan <[email protected]> Cc: Xiang Chen <[email protected]> Cc: John Garry <[email protected]> Acked-by: John Garry <[email protected]> Signed-off-by: Ahmed S. Darwish <[email protected]> Signed-off-by: Sebastian Andrzej Siewior <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-12-01scsi: pm80xx: Do not sleep in atomic contextAhmed S. Darwish1-1/+1
hw_event_sas_phy_up() is used in hardirq/softirq context: pm8001_interrupt_handler_msix() || pm8001_interrupt_handler_intx() || pm8001_tasklet => PM8001_CHIP_DISP->isr() = pm80xx_chip_isr() => process_oq() [spin_lock_irqsave(&pm8001_ha->lock,)] => process_one_iomb() => mpi_hw_event() => hw_event_sas_phy_up() => msleep(200) Revert the msleep() back to an mdelay() to avoid sleeping in atomic context. Link: https://lore.kernel.org/r/[email protected] Fixes: 4daf1ef3c681 ("scsi: pm80xx: Convert 'long' mdelay to msleep") Cc: Vikram Auradkar <[email protected]> Cc: Jack Wang <[email protected]> Acked-by: Jack Wang <[email protected]> Signed-off-by: Ahmed S. Darwish <[email protected]> Signed-off-by: Sebastian Andrzej Siewior <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-11-30scsi: ufs: Remove unnecessary if condition in ufshcd_suspend()Bean Huo1-3/+1
In the case that auto_bkops_enable is false, which means auto bkops has been disabled, there is no need to call ufshcd_disable_auto_bkops(). Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Stanley Chu <[email protected]> Reviewed-by: Can Guo <[email protected]> Signed-off-by: Bean Huo <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-11-30scsi: hisi_sas: Move debugfs code to v3 hw driverLuo Jiaxing3-1387/+1212
Relocate all the debugfs code for DFX to v3 hw since no other versions support it. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Luo Jiaxing <[email protected]> Signed-off-by: John Garry <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-11-30scsi: hisi_sas: Fix up probe error handling for v3 hwXiang Chen1-15/+11
Fix some rollbacks in function hisi_sas_v3_probe() and interrupt_init_v3_hw(). Link: https://lore.kernel.org/r/[email protected] Fixes: 8d98416a55eb ("scsi: hisi_sas: Switch v3 hw to MQ") Signed-off-by: Xiang Chen <[email protected]> Signed-off-by: John Garry <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-11-30scsi: hisi_sas: Reduce some indirection in v3 hw driverJohn Garry1-3/+2
Sometimes local functions are called indirectly from the hw driver, which only makes the code harder to follow. Remove these. Method .hw_init is only called from platform driver probe, which is not relevant, so don't set this either. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: John Garry <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-11-30scsi: pm8001: Remove space in a debug messageColin Ian King1-1/+1
There are two words that need separating with a space in a pm8001_dbg() message. Fix it. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Ewan D. Milne <[email protected]> Acked-by: Jack Wang <[email protected]> Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-11-30scsi: pm8001: Fix misindentationJoe Perches1-10/+10
kernel robot reported a misindentation of a goto. Fix it. At the same time, use a temporary for a repeated entry in the same block to reduce visual noise. Link: https://lore.kernel.org/r/9542a8be9954c1dca744f93f53bb1af6dd1436e8.1606192458.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-30scsi: pm8001: Convert pm8001_printk() to pm8001_info()Joe Perches3-6/+6
Use the more common logging style. [mkp: fixed a few conflicts] Link: https://lore.kernel.org/r/69dc34ff63adfa60b3f203ed2d58143b5692af57.1606192458.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-25scsi: pmcraid: Use generic power managementVaibhav Gupta1-33/+10
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: pmcraid: Drop PCI Wakeup calls from .resumeVaibhav Gupta1-1/+0
The driver calls pci_enable_wake(...., false) in pmcraid_resume(), and there is no corresponding pci_enable_wake(...., true) in pmcraid_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 pmcraid_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: mvumi: Update function descriptionVaibhav Gupta1-1/+1
There is no "device" parameter in mvumi_shutdown(). Instead there is "pdev" which is not described. 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: mvumi: Use generic power managementVaibhav Gupta1-37/+9
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: mvumi: Drop PCI Wakeup calls from .resumeVaibhav Gupta1-1/+0
The driver calls pci_enable_wake(...., false) in mvumi_resume(), and there is no corresponding pci_enable_wake(...., true) in mvumi_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 mvumi_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: 3w-sas: Use generic power managementVaibhav Gupta1-24/+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] Signed-off-by: Vaibhav Gupta <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-11-25scsi: 3w-sas: Drop PCI Wakeup calls from .resumeVaibhav Gupta1-1/+0
The driver calls pci_enable_wake(...., false) in twl_resume(), and there is no corresponding pci_enable_wake(...., true) in twl_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 twl_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: 3w-9xxx: Use generic power managementVaibhav Gupta1-22/+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] Signed-off-by: Vaibhav Gupta <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-11-25scsi: 3w-9xxx: Drop PCI Wakeup calls from .resumeVaibhav Gupta1-1/+0
The driver calls pci_enable_wake(...., false) in twa_resume(), and there is no corresponding pci_enable_wake(...., true) in twa_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 twa_resume(). Link: https://lore.kernel.org/r/[email protected] Acked-by: Don Brace <[email protected]> Signed-off-by: Vaibhav Gupta <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-11-25scsi: hpsa: Use generic power managementVaibhav Gupta1-5/+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: Don Brace <[email protected]> Signed-off-by: Vaibhav Gupta <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-11-25scsi: pm_8001: Use generic power managementVaibhav Gupta1-29/+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: pm_8001: Drop PCI Wakeup calls from .resumeVaibhav Gupta1-1/+0
The driver calls pci_enable_wake(...., false) in pm8001_pci_resume(), and there is no corresponding pci_enable_wake(...., true) in pm8001_pci_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 pm8001_pci__resume(). Link: https://lore.kernel.org/r/[email protected] Acked-by: Jack Wang <[email protected]> Signed-off-by: Vaibhav Gupta <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-11-25scsi: lpfc: Use generic power managementVaibhav Gupta1-67/+33
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: mpt3sas_scsih: Use generic power managementVaibhav Gupta1-21/+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: mpt3sas_scsih: Drop PCI Wakeup calls from .resumeVaibhav Gupta1-1/+0
The driver calls pci_enable_wake(...., false) in scsih_resume(), and there is no corresponding pci_enable_wake(...., true) in scsih_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 scsih_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: hisi_sas_v3_hw: Remove extra function calls for runtime pmVaibhav Gupta1-17/+6
Both runtime_suspend_v3_hw() and runtime_resume_v3_hw() do nothing else but invoke suspend_v3_hw() and resume_v3_hw() respectively. This is the case of unnecessary function calls. To use those functions for runtime pm as well, simply use UNIVERSAL_DEV_PM_OPS. make -j$(nproc) W=1, with CONFIG_PM disabled, throws '-Wunused-function' warning for runtime_suspend_v3_hw() and runtime_resume_v3_hw(). After dropping those function definitions, the warning was thrown for suspend_v3_hw() and resume_v3_hw(). Hence, mark them as '__maybe_unused'. 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: hisi_sas_v3_hw: Don't use PCI helper functionsVaibhav Gupta1-16/+1
Drivers using new-framework/generic-framework should not handle standard power management operations. These operations were performed by legacy framework through PCI helper functions like pci_save/restore_state(), pci_set_power_state(), etc. Drivers should not use them now. 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: hisi_sas_v3_hw: Drop PCI Wakeup calls from .resumeVaibhav Gupta1-1/+0
The driver calls pci_enable_wake(...., false) in hisi_sas_v3_resume(), and there is no corresponding pci_enable_wake(...., true) in hisi_sas_v3_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 hisi_sas_v3_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: esas2r: Use generic power managementVaibhav Gupta3-36/+16
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: esas2r: Drop PCI Wakeup calls from .resumeVaibhav Gupta1-4/+0
The driver calls pci_enable_wake(...., false) in esas2r_resume(), and there is no corresponding pci_enable_wake(...., true) in esas2r_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 esas2r_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: arcmsr: Use generic power managementVaibhav Gupta1-19/+9
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: 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]>