- 21 Aug, 2023 19 commits
-
-
Chengfeng Ye authored
There is a long call chain that &fip->ctlr_lock is acquired by isr fnic_isr_msix_wq_copy() under hard IRQ context. Thus other process context code acquiring the lock should disable IRQ, otherwise deadlock could happen if the IRQ preempts the execution while the lock is held in process context on the same CPU. [ISR] fnic_isr_msix_wq_copy() -> fnic_wq_copy_cmpl_handler() -> fnic_fcpio_cmpl_handler() -> fnic_fcpio_flogi_reg_cmpl_handler() -> fnic_flush_tx() -> fnic_send_frame() -> fcoe_ctlr_els_send() -> spin_lock_bh(&fip->ctlr_lock) [Process Context] 1. fcoe_ctlr_timer_work() -> fcoe_ctlr_flogi_send() -> spin_lock_bh(&fip->ctlr_lock) 2. fcoe_ctlr_recv_work() -> fcoe_ctlr_recv_handler() -> fcoe_ctlr_recv_els() -> fcoe_ctlr_announce() -> spin_lock_bh(&fip->ctlr_lock) 3. fcoe_ctlr_recv_work() -> fcoe_ctlr_recv_handler() -> fcoe_ctlr_recv_els() -> fcoe_ctlr_flogi_retry() -> spin_lock_bh(&fip->ctlr_lock) 4. -> fcoe_xmit() -> fcoe_ctlr_els_send() -> spin_lock_bh(&fip->ctlr_lock) spin_lock_bh() is not enough since fnic_isr_msix_wq_copy() is a hardirq. These flaws were found by an experimental static analysis tool I am developing for irq-related deadlock. The patch fix the potential deadlocks by spin_lock_irqsave() to disable hard irq. Fixes: 794d98e7 ("[SCSI] libfcoe: retry rejected FLOGI to another FCF if possible") Signed-off-by: Chengfeng Ye <dg573847474@gmail.com> Link: https://lore.kernel.org/r/20230817074708.7509-1-dg573847474@gmail.comReviewed-by: Davidlohr Bueso <dave@stgolabs.net> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Rajeshwar R Shinde authored
In the function sli_xmit_bls_rsp64_wqe(), the 'if' and 'else' conditions evaluates the same expression and give the same output. Also, params->s_id shall not be equal to U32_MAX. Remove the unused code. This fixes coccinelle warning such as: drivers/scsi/elx/libefc_sli/sli4.c:2320:2-4: WARNING: possible condition with no effect (if == else) Signed-off-by: Rajeshwar R Shinde <coolrrsh@gmail.com> Link: https://lore.kernel.org/r/20230817114301.17601-1-coolrrsh@gmail.comReviewed-by: Ram Vegesna <ram.vegesna@broadcom.com> Acked-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Gustavo A. R. Silva authored
One-element and zero-length arrays are deprecated. So, replace one-element array in struct fc_rscn_pl_s with flexible-array member. This results in no differences in binary output. Link: https://github.com/KSPP/linux/issues/339Signed-off-by: "Gustavo A. R. Silva" <gustavoars@kernel.org> Link: https://lore.kernel.org/r/ZN0VTpDBOSVHGayb@workReviewed-by: Kees Cook <keescook@chromium.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Yue Haibing authored
These declarations are not used anymore, remove them. Signed-off-by: Yue Haibing <yuehaibing@huawei.com> Link: https://lore.kernel.org/r/20230816130842.16684-1-yuehaibing@huawei.comSigned-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Zheng Zengkai authored
PCI core API pci_dev_id() can be used to get the BDF number for a PCI device. We don't need to compose it manually. Use pci_dev_id() to simplify the code a little bit. Signed-off-by: Zheng Zengkai <zhengzengkai@huawei.com> Link: https://lore.kernel.org/r/20230811111310.32364-1-zhengzengkai@huawei.comSigned-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Jialin Zhang authored
PCI core API pci_dev_id() can be used to get the BDF number for a PCI device. We don't need to compose it manually. Use pci_dev_id() to simplify the code a little bit. Signed-off-by: Jialin Zhang <zhangjialin11@huawei.com> Link: https://lore.kernel.org/r/20230815025419.3523236-4-zhangjialin11@huawei.comSigned-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Jialin Zhang authored
PCI core API pci_dev_id() can be used to get the BDF number for a PCI device. We don't need to compose it manually. Use pci_dev_id() to simplify the code a little bit. Signed-off-by: Jialin Zhang <zhangjialin11@huawei.com> Link: https://lore.kernel.org/r/20230815025419.3523236-3-zhangjialin11@huawei.comSigned-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Jialin Zhang authored
PCI core API pci_dev_id() can be used to get the BDF number for a PCI device. We don't need to compose it mannally. Use pci_dev_id() to simplify the code a little bit. Signed-off-by: Jialin Zhang <zhangjialin11@huawei.com> Link: https://lore.kernel.org/r/20230815025419.3523236-2-zhangjialin11@huawei.comSigned-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Brian Masney authored
Convert ufshcd_pltfrm_init() over to use dev_err_probe() to avoid the following log message on bootup due to an -EPROBE_DEFER return code: ufshcd-qcom 1d84000.ufs: Initialization failed While this line is changed, let's also go ahead and add the error code to the message as well. Signed-off-by: Brian Masney <bmasney@redhat.com> Link: https://lore.kernel.org/r/20230814184352.200531-3-bmasney@redhat.comReviewed-by: "Bao D. Nguyen" <quic_nguyenb@quicinc.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Brian Masney authored
Convert ufshcd_variant_hba_init() over to use dev_err_probe() to avoid log messages like the following on bootup: ufshcd-qcom 1d84000.ufs: ufshcd_variant_hba_init: variant qcom init failed err -517 Signed-off-by: Brian Masney <bmasney@redhat.com> Link: https://lore.kernel.org/r/20230814184352.200531-2-bmasney@redhat.comReviewed-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Tony Battersby authored
Change scsi_host_lookup() hostnum argument type from unsigned short to unsigned int to match the type used everywhere else. Fixes: 6d49f63b ("[SCSI] Make host_no an unsigned int") Signed-off-by: Tony Battersby <tonyb@cybernetics.com> Link: https://lore.kernel.org/r/a02497e7-c12b-ef15-47fc-3f0a0b00ffce@cybernetics.comReviewed-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Artem Chernyshev authored
To properly manage possible failure of sas_register_ha() in isci_register_sas_ha(), return its result instead of zero Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Artem Chernyshev <artem.chernyshev@red-soft.ru> Link: https://lore.kernel.org/r/20230813202336.240874-1-artem.chernyshev@red-soft.ruReviewed-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Arnd Bergmann authored
This function has no declaration, which causes a warning: drivers/scsi/gvp11.c:53:6: error: no previous prototype for 'gvp11_setup' [-Werror=missing-prototypes] Since there is also no caller, just remove the function. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Link: https://lore.kernel.org/r/20230810141947.1236730-12-arnd@kernel.orgReviewed-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Palmer Dabbelt <palmer@rivosinc.com> # RISC-V Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Arnd Bergmann authored
The qlogicpti_info() function is only used in this file and should be static to avoid a warning: drivers/scsi/qlogicpti.c:846:13: error: no previous prototype for 'qlogicpti_info' [-Werror=missing-prototypes] Signed-off-by: Arnd Bergmann <arnd@arndb.de> Link: https://lore.kernel.org/r/20230810141947.1236730-8-arnd@kernel.orgReviewed-by: Jack Wang <jinpu.wang@ionos.com> Acked-by: Palmer Dabbelt <palmer@rivosinc.com> # RISC-V Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Alex Henrie authored
I have an Iomega Z100P2 zip drive, but it does not work with my StarTech PEX1P2 AX99100 PCIe parallel port, which evidently does not support 16-bit or 32-bit EPP. Currently the only way to tell the PPA driver to use 8-bit EPP is to write 'mode=3' to /proc/scsi/ppa/*, but the driver doesn't actually distinguish between the three EPP modes and still tries to use 16-bit or 32-bit EPP. And even if writing to that file did make the driver use 8-bit EPP, it still wouldn't do me any good because by the time that file exists, the drive has already failed to initialize. Add a new parameter /sys/module/ppa/mode to set the transfer mode before initializing the drive. This parameter replaces the use of CONFIG_SCSI_IZIP_EPP16 in the PPA driver. At the same time, default to 8-bit EPP. 16-bit and 32-bit EPP are not necessary for the drive to function, nor are they part of the IEEE 1284 standard, so the driver should not assume that they are available. Signed-off-by: Alex Henrie <alexhenrie24@gmail.com> Link: https://lore.kernel.org/r/20230807155856.362864-2-alexhenrie24@gmail.comSigned-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Alex Henrie authored
Fix a regression introduced in February 2003 in Linux 2.5.61 by a patch from Alan Cox titled "fix ppa for new scsi".[1] Link: https://lore.kernel.org/lkml/E18jn1B-0005gQ-00@the-village.bc.nu/Signed-off-by: Alex Henrie <alexhenrie24@gmail.com> Link: https://lore.kernel.org/r/20230807155856.362864-1-alexhenrie24@gmail.comSigned-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Xiang Yang authored
Add __init and __exit for arcmsr_module_{init,exit}(). Signed-off-by: Xiang Yang <xiangyang3@huawei.com> Link: https://lore.kernel.org/r/20230804022913.1917023-1-xiangyang3@huawei.comSigned-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Yue Haibing authored
These functions have never been implemented since the beginning of git history. Signed-off-by: Yue Haibing <yuehaibing@huawei.com> Link: https://lore.kernel.org/r/20230809142107.42756-1-yuehaibing@huawei.comReviewed-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Yue Haibing authored
Commit 042ebd29 ("scsi: libsas: kill useless ha_event and do some cleanup") removed sas_hae_reset() but not its declaration. Commit 2908d778 ("[SCSI] aic94xx: new driver") declared but never implemented other functions. Signed-off-by: Yue Haibing <yuehaibing@huawei.com> Link: https://lore.kernel.org/r/20230809132249.37948-1-yuehaibing@huawei.comReviewed-by: John Garry <john.g.garry@oracle.com> Reviewed-by: Jason Yan <yanaijie@huawei.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
- 08 Aug, 2023 13 commits
-
-
Jeuk Kim authored
To ensure that the PCI based QEMU UFS device properly works with Linux, register the device ID (0x0013) and vendor ID (0x1b36) of QEMU UFS device. QEMU UFS will enable testing of the UFS driver inside a virtual machine on systems without UFS host controller. It can also be used to preemptively implement and test new features before the real device is created. The new QEMU UFS device can be found at: https://lore.kernel.org/qemu-devel/20230727155239.GA979354@fedoraSigned-off-by: Jeuk Kim <jeuk20.kim@samsung.com> Link: https://lore.kernel.org/r/20230807013726epcms2p1c604cb8e98680aebebb7cc5ab2d580f5@epcms2p1Acked-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Martin K. Petersen authored
Ranjan Kumar <ranjan.kumar@broadcom.com> says: Few Enhancements and minor fixes of mpi3mr driver. Link: https://lore.kernel.org/r/20230804104248.118924-1-ranjan.kumar@broadcom.comSigned-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Ranjan Kumar authored
Update driver version to 8.5.0.0.0 Signed-off-by: Ranjan Kumar <ranjan.kumar@broadcom.com> Link: https://lore.kernel.org/r/20230804104248.118924-7-ranjan.kumar@broadcom.comSigned-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Ranjan Kumar authored
Mark all of the devices that are exposed to the OS prior to a controller reset and not detected by the controller after the reset as removed devices and the I/Os to those devices are unblocked (and returned with DID_NO_CONNECT) prior to removing the devices one after the other. Signed-off-by: Ranjan Kumar <ranjan.kumar@broadcom.com> Link: https://lore.kernel.org/r/20230804104248.118924-6-ranjan.kumar@broadcom.comSigned-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Ranjan Kumar authored
Enhance driver to divert the WRITE SAME commands that are issued with UNMAP=1 and NDOB=1 and with the transfer length greater than the max WRITE SAME length specified by the firmware for the particular drive to the controller firmware. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202307280034.DXU5pTVV-lkp@intel.com/Signed-off-by: Ranjan Kumar <ranjan.kumar@broadcom.com> Link: https://lore.kernel.org/r/20230804104248.118924-5-ranjan.kumar@broadcom.comSigned-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Ranjan Kumar authored
Enhance the driver to get the maximum data length per I/O request from IOC Facts data and report that to the upper layers. If the IOC facts data is not reported then a default I/O size of 1MB is reported to the OS. Signed-off-by: Ranjan Kumar <ranjan.kumar@broadcom.com> Link: https://lore.kernel.org/r/20230804104248.118924-4-ranjan.kumar@broadcom.comSigned-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Ranjan Kumar authored
Updated MPI Headers to version 3.00.28. Signed-off-by: Ranjan Kumar <ranjan.kumar@broadcom.com> Link: https://lore.kernel.org/r/20230804104248.118924-3-ranjan.kumar@broadcom.comSigned-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Ranjan Kumar authored
When a timestamp update or an event acknowledgment command times out, the driver invokes the soft reset handler to recover the controller while holding a mutex lock. The soft reset handler also tries to acquire the same mutex to send initialization commands to the controller which leads to a deadlock scenario. To resolve the issue the driver will check thestatus and if this indicates the controller is operational, the driver will issue a diagnostic fault reset and exit out of the command processing function. If the controller is already faulted or asynchronously reset, then the driver will just exit the command processing function. Signed-off-by: Ranjan Kumar <ranjan.kumar@broadcom.com> Link: https://lore.kernel.org/r/20230804104248.118924-2-ranjan.kumar@broadcom.comSigned-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Justin Tee authored
Only nodes whose state is at least past a PLOGI issue and strictly less than a PRLI issue should be put into device recovery mode upon RSCN receipt. Previously, the allowance of LOGO and PRLI completion states did not make sense because those nodes should be allowed to flow through and marked as NPort dissappeared as is normally done. A follow up RSCN GID_FT would recover those nodes in such cases. Signed-off-by: Justin Tee <justin.tee@broadcom.com> Link: https://lore.kernel.org/r/20230804195546.157839-1-justintee8345@gmail.comSigned-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Manivannan Sadhasivam authored
ufs_qcom_bw_table is not modified anywhere. So make it static const so that it can be placed in read-only memory. Reported-by: Bart Van Assche <bvanassche@acm.org> Closes: https://lore.kernel.org/linux-scsi/43cd0057-c6d8-bc92-08f4-d767336d2cfe@acm.org/Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Link: https://lore.kernel.org/r/20230802040154.10652-1-manivannan.sadhasivam@linaro.orgReviewed-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Bart Van Assche authored
gcc compilers before version 10 cannot do constant-folding for sub-byte bitfields. This makes the compiler layout tests fail. Hence skip the layout checks for gcc 9 and before. Cc: Arnd Bergmann <arnd@arndb.de> Cc: Naresh Kamboju <naresh.kamboju@linaro.org> Cc: Nathan Chancellor <nathan@kernel.org> Reported-by: Naresh Kamboju <naresh.kamboju@linaro.org> Closes: https://lore.kernel.org/linux-scsi/CA+G9fYur8UJoUyTLJFVEJPh-15TJ7kbdD2q8xVz8a3fLjkxxVw@mail.gmail.com/Suggested-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Link: https://lore.kernel.org/r/20230801232204.1481902-1-bvanassche@acm.orgTested-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Nitin Rawat authored
Commit 52a51801 ("scsi: ufs: core: Fix missing clk change notification on host reset") added UFS clock scaling notification to ufshcd_host_reset_and_restore(). This invokes hibern8 enter and exit on Qualcomm platform which fails because controller is in reset state. Fix this by checking the Host controller state before sending hibern8 command. __ufshcd_wl_resume() ufshcd_reset_and_restore() ufshcd_host_reset_and_restore() ufshcd_scale_clks() ufshcd_vops_clk_scale_notify() ufs_qcom_clk_scale_notify() ufshcd_uic_hibern8_enter() Fixes: 52a51801 ("scsi: ufs: core: Fix missing clk change notification on host reset") Co-developed-by: Manish Pandey <quic_mapa@quicinc.com> Signed-off-by: Manish Pandey <quic_mapa@quicinc.com> Signed-off-by: Nitin Rawat <quic_nitirawa@quicinc.com> Link: https://lore.kernel.org/r/20230726134140.7180-3-quic_nitirawa@quicinc.comAcked-by: Manivannan Sadhasivam <mani@kernel.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Nitin Rawat authored
Export ufshcd_is_hba_active() to allow driver modules to check the state of the host controller. Signed-off-by: Nitin Rawat <quic_nitirawa@quicinc.com> Link: https://lore.kernel.org/r/20230726134140.7180-2-quic_nitirawa@quicinc.comAcked-by: Manivannan Sadhasivam <mani@kernel.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
- 31 Jul, 2023 8 commits
-
-
Martin K. Petersen authored
Bart Van Assche <bvanassche@acm.org> says: Hi Martin, This patch includes the following changes, none of which should change the functionality of the UFS host controller driver: - Improve the kernel-doc headers further. - Fix multiple W=2 compiler warnings. - Simplify ufshcd_abort_all(). - Simplify the code for creating and parsing UFS Transport Protocol (UTP) headers. Please consider this patch series for the next merge window. Thanks, Bart. Link: https://lore.kernel.org/r/20230727194457.3152309-1-bvanassche@acm.orgSigned-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Bart Van Assche authored
Make the code that parses UTP transfer request headers easier to read by using u8 instead of __be32 where appropriate. Signed-off-by: Bart Van Assche <bvanassche@acm.org> Link: https://lore.kernel.org/r/20230727194457.3152309-13-bvanassche@acm.orgReviewed-by: Avri Altman <avri.altman@wdc.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Bart Van Assche authored
Make the code that initializes UTP transfer request headers easier to read by using bitfields instead of __le32 where appropriate. Cc: "Bao D. Nguyen" <quic_nguyenb@quicinc.com> Cc: Eric Biggers <ebiggers@google.com> Cc: Avri Altman <avri.altman@wdc.com> Cc: Bean Huo <beanhuo@micron.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Link: https://lore.kernel.org/r/20230727194457.3152309-12-bvanassche@acm.orgReviewed-by: Avri Altman <avri.altman@wdc.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Bart Van Assche authored
Remove the 'response' member variable because no code reads its value. Additionally, move the ufs_query_req and ufs_query_res data structure definitions into include/ufs/ufshcd.h because these data structures are related to the UFS host controller driver. Reviewed-by: Avri Altman <avri.altman@wdc.com> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Link: https://lore.kernel.org/r/20230727194457.3152309-11-bvanassche@acm.orgSigned-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Bart Van Assche authored
Unify the MCQ and legacy code paths. This patch reworks code introduced by commit ab248643 ("scsi: ufs: core: Add error handling for MCQ mode"). Cc: "Bao D. Nguyen" <quic_nguyenb@quicinc.com> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Link: https://lore.kernel.org/r/20230727194457.3152309-10-bvanassche@acm.orgSigned-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Bart Van Assche authored
No functionality is changed. This patch prepares for unifying the MCQ and legacy code paths in this function. Signed-off-by: Bart Van Assche <bvanassche@acm.org> Link: https://lore.kernel.org/r/20230727194457.3152309-9-bvanassche@acm.orgSigned-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Bart Van Assche authored
Assign names to the enumeration types for UPIU types. Use these enumeration types where appropriate. Signed-off-by: Bart Van Assche <bvanassche@acm.org> Link: https://lore.kernel.org/r/20230727194457.3152309-8-bvanassche@acm.orgSigned-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-
Bart Van Assche authored
Use { } instead of { { 0 }, } to zero-initialize data structures on the stack. This patch fixes two W=2 warnings. Signed-off-by: Bart Van Assche <bvanassche@acm.org> Link: https://lore.kernel.org/r/20230727194457.3152309-7-bvanassche@acm.orgSigned-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-