aboutsummaryrefslogtreecommitdiff
path: root/drivers/scsi
AgeCommit message (Collapse)AuthorFilesLines
2020-09-08scsi: qedi: Use qed count from set_fp_int in msix allocationManish Rangankar2-2/+8
To avoid unnecessary vector allocation when the number of fast-path queues is less then available msix vectors, use return count from module qed->set_fp_int. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Manish Rangankar <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-08scsi: ibmvfc: Interface updates for future FPIN and MQ supportTyrel Datwyler1-1/+65
VIOS partitions with SLI-4 enabled Emulex adapters will be capable of driving I/O in parallel through mulitple work queues or channels, and with new hypervisor firmware that supports multiple interrupt sources an ibmvfc NPIV single initiator can be modified to exploit end-to-end channelization in a PowerVM environment. VIOS hosts will also be able to expose fabric perfromance impact notifications (FPIN) via a new asynchronous event to ibmvfc clients that advertise support via IBMVFC_CAN_HANDLE_FPIN in their capabilities flag during NPIV_LOGIN. This patch introduces three new Management Datagrams (MADs) for channelization support negotiation as well as the FPIN asynchronous event and FPIN status flags. Follow up work is required to plumb the ibmvfc client driver to use these new interfaces. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Tyrel Datwyler <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-08scsi: ibmvfc: Use compiler attribute defines instead of __attribute__()Tyrel Datwyler1-28/+28
Update ibmvfc.h structs to use the preferred __packed and __aligned() attribute macros defined in include/linux/compiler_attributes.h in place of __attribute__(). Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Tyrel Datwyler <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-08scsi: ufshcd: Allow specifying an Auto-Hibernate Timer value of zeroBao D. Nguyen2-2/+9
Setting the Auto-Hibernate Timer to zero is a valid setting which indicates the Auto-Hibernate feature being disabled. Correctly support this setting. In addition, when the timer value is queried from sysfs, read from the host controller's register and return that value instead of using the RAM value. Link: https://lore.kernel.org/r/b141cfcd7998b8933635828b56fbb64f8ad4d175.1598661071.git.nguyenb@codeaurora.org Acked-by: Stanley Chu <[email protected]> Signed-off-by: Bao D. Nguyen <[email protected]> Signed-off-by: Asutosh Das <[email protected]> Signed-off-by: Can Guo <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-08Merge tag 'scsi-fixes' of ↵Linus Torvalds11-14/+19
git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Eleven fixes, mostly in drivers or minor fixes in driver related infrastructure libraries (target, libfc and libsas). Most of the bugs fixed only show up under rare circumstances, the exception being the endianness problem in qla2xxx which is used as a device on some sparc systems" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: mpt3sas: Don't call disable_irq from IRQ poll handler scsi: megaraid_sas: Don't call disable_irq from process IRQ poll scsi: target: iscsi: Fix hang in iscsit_access_np() when getting tpg->np_login_sem scsi: libsas: Set data_dir as DMA_NONE if libata marks qc as NODATA scsi: target: iscsi: Fix data digest calculation scsi: lpfc: Update lpfc version to 12.8.0.4 scsi: lpfc: Extend the RDF FPIN Registration descriptor for additional events scsi: lpfc: Fix FLOGI/PLOGI receive race condition in pt2pt discovery scsi: lpfc: Fix setting IRQ affinity with an empty CPU mask scsi: qla2xxx: Fix regression on sparc64 scsi: libfc: Fix for double free() scsi: pm8001: Fix memleak in pm8001_exec_internal_task_abort
2020-09-02scsi: scsi_debug: Make sdebug_build_parts() respect virtual_gbJohn Pittman1-1/+1
If virtual_gb is passed while using num_parts, when creating the partitions, virtual_gb is not respected. Set num_sectors using get_sdebug_capacity() to pull virtual_gb if set. Link: https://lore.kernel.org/r/[email protected] Acked-by: Douglas Gilbert <[email protected]> Signed-off-by: John Pittman <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-02scsi: scsi_debug: Adjust num_parts to create equally sized partitionsJohn Pittman1-3/+7
Currently when using the num_parts parameter, partitions are aligned and the end sector is one prior to the next start. This creates different sized partitions. Create instead equally sized partitions by trimming the end of each partition to the size of the smallest partition. This aligns better with what one would expect from automatically created partitions and can be helpful with testing things such as raid which often expect legs of the same size. Minimal space is lost as the initial partition starting size is calculated by dividing num_sectors by sdebug_num_parts. Link: https://lore.kernel.org/r/[email protected] Acked-by: Douglas Gilbert <[email protected]> Signed-off-by: John Pittman <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-02scsi: hisi_sas: Code style cleanupLuo Jiaxing3-5/+2
Remove extra blank lines and add spaces around operators. 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-09-02scsi: hisi_sas: Add missing newlinesXiang Chen4-15/+15
Newline is missing from some printk() statements. Add them. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Xiang Chen <[email protected]> Signed-off-by: John Garry <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-02scsi: hisi_sas: Add BIST support for fixed code patternLuo Jiaxing3-31/+59
Through the new debugfs interface the user can select fixed code patterns. Add two new interfaces fixed_code and fixed_code1. 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-09-02scsi: hisi_sas: Add BIST support for phy FFELuo Jiaxing3-3/+111
Add BIST support for phy FFE (Feed forward equalizer) setting. The user can configure FFE through the new debugfs interface. FFE is a parameter used for link layer control. It will affect the link quality between the SAS controller and the backplane. In the BIST test, the FFE interface is provided to assist board testers in optimizing link parameters. The modification of the FFE parameter will affect the test after BIST or the normal running of the board. The user should save the initial FFE values and restore them after BIST test is complete. 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-09-02scsi: hisi_sas: Make phy index variable name consistentLuo Jiaxing1-25/+25
We use "phy_id" to identify phy in the BIST code but the rest of code always uses "phy_no". Change it for consistency. 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-09-02scsi: hisi_sas: Do not modify upper fields of PROG_PHY_LINK_RATE regLuo Jiaxing1-11/+14
When updating PROG_PHY_LINK_RATE to set linkrate for a phy we used a hard-coded initial value instead of getting the current value from the register. The assumption was that this register would not be modified, but in fact it was partially modified in a new version of hardware. The hard-coded value we used changed the default value of the register to a an incorrect setting and as a result the SAS controller could not change linkrate for the phy. Delete hard-coded value and always read the latest value of register before updating 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-09-02scsi: hisi_sas: Modify macro name for OOB phy linkrateLuo Jiaxing1-8/+7
The macro for OOB phy linkrate is named CFG_PROG_PHY_LINK_RATE_* but that is inaccurate. For clarification, include OOB in macro name. 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-09-02scsi: hisi_sas: Avoid accessing to SSP task for SMP I/OsXiang Chen1-4/+5
hisi_sas_slot_task_free() attempts to dereference SSP task for non-ATA tasks. If the task is SMP, the code may reference the wrong structure although this may not cause any problems. To avoid this, only access to SSP task when slot->n_elem_dif is not 0 which indicates this is an SSP task. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Xiang Chen <[email protected]> Signed-off-by: John Garry <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-02scsi: fc: Add 256GBit speed setting to SCSI FC transportJames Smart1-0/+1
Add 256GBit speed setting to the SCSI FC transport. This speed can be reached via FC trunking techniques. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: James Smart <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-02scsi: fnic: Remove set but not used 'eth_hdrs_stripped'Jason Yan1-3/+0
This addresses the following gcc warning with "make W=1": drivers/scsi/fnic/fnic_fcs.c: In function ‘fnic_rq_cmpl_frame_recv’: drivers/scsi/fnic/fnic_fcs.c:840:15: warning: variable ‘eth_hdrs_stripped’ set but not used [-Wunused-but-set-variable] 840 | unsigned int eth_hdrs_stripped; | ^~~~~~~~~~~~~~~~~ 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-02scsi: fnic: Remove set but not used 'fr_len'Jason Yan1-2/+0
This addresses the following gcc warning with "make W=1": drivers/scsi/fnic/fnic_fcs.c: In function ‘fnic_fcoe_send_vlan_req’: drivers/scsi/fnic/fnic_fcs.c:379:6: warning: variable ‘fr_len’ set but not used [-Wunused-but-set-variable] 379 | int fr_len; | ^~~~~~ 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-02scsi: fnic: Remove set but not used variable in is_fnic_fip_flogi_reject()Jason Yan1-4/+0
This addresses the following gcc warning with "make W=1": drivers/scsi/fnic/fnic_fcs.c: In function ‘is_fnic_fip_flogi_reject’: drivers/scsi/fnic/fnic_fcs.c:317:9: warning: variable ‘els_len’ set but not used [-Wunused-but-set-variable] 317 | size_t els_len = 0; | ^~~~~~~ drivers/scsi/fnic/fnic_fcs.c:312:21: warning: variable ‘els_dtype’ set but not used [-Wunused-but-set-variable] 312 | enum fip_desc_type els_dtype = 0; | ^~~~~~~~~ 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-02scsi: fnic: Remove set but not used 'old_vlan'Jason Yan1-2/+1
This addresses the following gcc warning with "make W=1": drivers/scsi/fnic/fnic_main.c: In function ‘fnic_set_vlan’: drivers/scsi/fnic/fnic_main.c:555:6: warning: variable ‘old_vlan’ set but not used [-Wunused-but-set-variable] 555 | u16 old_vlan; | ^~~~~~~~ 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-02scsi: fdomain_isa: Merge branches in fdomain_isa_match()Sergey Shtylyov1-3/+2
The *else* branch of the *if* (base) statement in fdomain_isa_match() is immediately followed by the *if* (!base) statement. Simplify the code by removing the unneeded *if*. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sergey Shtylyov <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-02scsi: qla2xxx: Fix the return valueXianting Tian1-1/+1
A negative error code should be returned. Link: https://lore.kernel.org/r/[email protected] Acked-by: Nilesh Javali <[email protected]> Signed-off-by: Xianting Tian <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-02scsi: arm: Avoid comma separated statementsJoe Perches3-16/+21
Use semicolons and braces. Link: https://lore.kernel.org/r/be30bb0f24a5fb4f70ca8ed7027ca7555816a3fb.1598331149.git.joe@perches.com Signed-off-by: Joe Perches <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-02scsi: ufs: Handle LINERESET indication in err handlerCan Guo4-14/+103
PA Layer issues a LINERESET to the PHY at the recovery step in the Power Mode change operation. If it happens during auto or manual hibern8 enter, even if hibern8 enter succeeds, UFS power mode shall be set to PWM-G1 mode and kept in that mode after exit from hibern8, leading to bad performance. Handle the LINERESET in the eh_work by restoring power mode to HS mode after all pending reqs and tasks are cleared from doorbell. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Can Guo <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-02scsi: ufs: Abort tasks before clearing them from doorbellCan Guo1-62/+81
To recover non-fatal errors, no full reset is required, err_handler only clears those pending TRs/TMRs so that SCSI layer can re-issue them. In current err_handler, TRs are directly cleared from UFS host's doorbell but not aborted from device side. However, according to the UFSHCI JEDEC spec, the host software shall use UTP Transfer Request List Clear Register to clear a task from UFS host's doorbell only when a UTP Transfer Request is expected to not be completed, e.g. when the host software receives a “FUNCTION COMPLETE” Task Management response which means a Transfer Request was aborted. To follow the UFSHCI JEDEC spec, in err_handler, abort one TR before clearing it from doorbell. Link: https://lore.kernel.org/r/[email protected] Acked-by: Stanley Chu <[email protected]> Signed-off-by: Can Guo <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-02scsi: smartpqi: Update copyrightDon Brace6-7/+7
Update driver copyright. Link: https://lore.kernel.org/r/159864896224.13630.9798419111015060967.stgit@brunhilda Reviewed-by: Scott Teel <[email protected]> Reviewed-by: Scott Benesh <[email protected]> Signed-off-by: Don Brace <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-02scsi: hpsa: Update copyrightDon Brace3-0/+3
Add entry for Microchip. Link: https://lore.kernel.org/r/159864166227.12131.3427629298809272795.stgit@brunhilda Reviewed-by: Scott Teel <[email protected]> Reviewed-by: Scott Benesh <[email protected]> Signed-off-by: Don Brace <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-02scsi: mpt3sas: Don't call disable_irq from IRQ poll handlerTomas Henzl1-1/+1
disable_irq() might sleep, replace it with disable_irq_nosync(). For synchronisation 'irq_poll_scheduled' is sufficient Fixes: 320e77acb3 scsi: mpt3sas: Irq poll to avoid CPU hard lockups Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Tomas Henzl <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-02scsi: megaraid_sas: Don't call disable_irq from process IRQ pollTomas Henzl1-1/+1
disable_irq() might sleep. Replace it with disable_irq_nosync() which is sufficient as irq_poll_scheduled protects against concurrently running complete_cmd_fusion() from megasas_irqpoll() and megasas_isr_fusion(). Link: https://lore.kernel.org/r/[email protected] Fixes: a6ffd5bf681 scsi: megaraid_sas: Call disable_irq from process IRQ poll Signed-off-by: Tomas Henzl <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-02sd: open code revalidate_diskChristoph Hellwig1-2/+4
Instead of calling revalidate_disk just do the work directly by calling sd_revalidate_disk, and revalidate_disk_size where needed. Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Josef Bacik <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2020-09-01scsi: isci: Remove set but not used 'index'Jason Yan1-2/+0
This addresses the following gcc warning with "make W=1": drivers/scsi/isci/host.c: In function ‘sci_controller_complete_io’: drivers/scsi/isci/host.c:2674:6: warning: variable ‘index’ set but not used [-Wunused-but-set-variable] 2674 | u16 index; | ^~~~~ 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-01scsi: dpt_i2o: Remove set but not used 'pHba'Jason Yan1-3/+0
This addresses the following gcc warning with "make W=1": drivers/scsi/dpt_i2o.c: In function ‘adpt_slave_configure’: drivers/scsi/dpt_i2o.c:411:12: warning: variable ‘pHba’ set but not used [-Wunused-but-set-variable] 411 | adpt_hba* pHba; | ^~~~ 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-01scsi: qedi: Remove redundant NULL checkXu Wang1-2/+1
kfree_skb() handles a NULL skb argument so the additional check is unnecessary. Remove it. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Xu Wang <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-01scsi: ufs: Make ufshcd_print_trs() consider UFSHCD_QUIRK_PRDT_BYTE_GRANEric Biggers1-0/+3
Fix ufshcd_print_trs() to consider UFSHCD_QUIRK_PRDT_BYTE_GRAN when using utp_transfer_req_desc::prd_table_length, so that it doesn't treat the number of bytes as the number of entries. Originally from Kiwoong Kim (https://lkml.kernel.org/r/[email protected]). Link: https://lore.kernel.org/r/[email protected] Fixes: 26f968d7de82 ("scsi: ufs: Introduce UFSHCD_QUIRK_PRDT_BYTE_GRAN quirk") Cc: Alim Akhtar <[email protected]> Cc: Kiwoong Kim <[email protected]> Signed-off-by: Eric Biggers <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-01scsi: aacraid: Remove erroneous fallthrough annotationDan Carpenter1-1/+0
This fallthrough annotation is unreachable so we can delete it. Link: https://lore.kernel.org/r/20200825112003.GD285523@mwanda Fixes: c4e2fbca374b ("scsi: aacraid: Reworked scsi command submission path") Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-01scsi: scsi_debug: Implement lun_formatDouglas Gilbert1-7/+64
Implement 'flat space LUN addressing', which allows us to raise the max_lun limitation to 16384. The maximum number of LUNs prior to this patch was 256. Link: https://lore.kernel.org/r/[email protected] Suggested-by: Hannes Reinecke <[email protected]> Signed-off-by: Douglas Gilbert <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-01scsi: libsas: Set data_dir as DMA_NONE if libata marks qc as NODATALuo Jiaxing1-1/+4
It was discovered that sdparm will fail when attempting to disable write cache on a SATA disk connected via libsas. In the ATA command set the write cache state is controlled through the SET FEATURES operation. This is roughly corresponds to MODE SELECT in SCSI and the latter command is what is used in the SCSI-ATA translation layer. A subtle difference is that a MODE SELECT carries data whereas SET FEATURES is defined as a non-data command in ATA. Set the DMA data direction to DMA_NONE if the requested ATA command is identified as non-data. [mkp: commit desc] Fixes: fa1c1e8f1ece ("[SCSI] Add SATA support to libsas") Link: https://lore.kernel.org/r/[email protected] Reviewed-by: John Garry <[email protected]> Reviewed-by: Jason Yan <[email protected]> Signed-off-by: Luo Jiaxing <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-09-01Merge tag 'scsi-fixes' of ↵Linus Torvalds3-4/+2
git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Three minor fixes, all in drivers" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: scsi_debug: Remove superfluous close zone in resp_open_zone() scsi: libcxgbi: Fix a use after free in cxgbi_conn_xmit_pdu() scsi: qedf: Fix null ptr reference in qedf_stag_change_work
2020-08-31scsi: ufs: exynos: Enable UFSHCI_QUIRK_SKIP_MANUAL_WB_FLUSH_CTRLKiwoong Kim1-1/+2
For Exynos, flush during hibern8 is sufficient. Manual flush will cause an increase in power usage. Link: https://lore.kernel.org/r/ef94af8f273316d50d7f50a0cac9c7be9b9316a1.1598319701.git.kwmad.kim@samsung.com Reviewed-by: Avri Altman <[email protected]> Signed-off-by: Kiwoong Kim <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-08-31scsi: ufs: Introduce skipping manual flush for Write BoosterKiwoong Kim2-0/+8
We have two knobs to control flush for write booster, fWriteBoosterBufferFlushDuringHibernate and fWriteBoosterBufferFlushEn. Some vendors use only fWriteBoosterBufferFlushDuringHibernate because this can reportedly cover most scenarios. Also, there have been some reports that flush by fWriteBoosterBufferFlushEn could lead to increased power consumption thanks to unexpected internal operations. Consequently, we need a way to enable or disable fWriteBoosterEn operations. Add quirk to bypass manual flush. Link: https://lore.kernel.org/r/ffdb0eda30515809f0ad9ee936b26917ee9b4593.1598319701.git.kwmad.kim@samsung.com Reviewed-by: Avri Altman <[email protected]> Signed-off-by: Kiwoong Kim <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-08-31scsi: lpfc: Update lpfc version to 12.8.0.4James Smart1-1/+1
Update lpfc version to 12.8.0.4 Link: https://lore.kernel.org/r/[email protected] Co-developed-by: Dick Kennedy <[email protected]> Signed-off-by: Dick Kennedy <[email protected]> Signed-off-by: James Smart <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-08-31scsi: lpfc: Extend the RDF FPIN Registration descriptor for additional eventsJames Smart2-1/+4
Currently the driver registers for Link Integrity events only. This patch adds registration for the following FPIN types: - Delivery Notifications - Congestion Notification - Peer Congestion Notification Link: https://lore.kernel.org/r/[email protected] Co-developed-by: Dick Kennedy <[email protected]> Signed-off-by: Dick Kennedy <[email protected]> Signed-off-by: James Smart <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-08-31scsi: lpfc: Fix FLOGI/PLOGI receive race condition in pt2pt discoveryJames Smart1-1/+3
The driver is unable to successfully login with remote device. During pt2pt login, the driver completes its FLOGI request with the remote device having WWN precedence. The remote device issues its own (delayed) FLOGI after accepting the driver's and, upon transmitting the FLOGI, immediately recognizes it has already processed the driver's FLOGI thus it transitions to sending a PLOGI before waiting for an ACC to its FLOGI. In the driver, the FLOGI is received and an ACC sent, followed by the PLOGI being received and an ACC sent. The issue is that the PLOGI reception occurs before the response from the adapter from the FLOGI ACC is received. Processing of the PLOGI sets state flags to perform the REG_RPI mailbox command and proceed with the rest of discovery on the port. The same completion routine used by both FLOGI and PLOGI is generic in nature. One of the things it does is clear flags, and those flags happen to drive the rest of discovery. So what happened was the PLOGI processing set the flags, the FLOGI ACC completion cleared them, thus when the PLOGI ACC completes it doesn't see the flags and stops. Fix by modifying the generic completion routine to not clear the rest of discovery flag (NLP_ACC_REGLOGIN) unless the completion is also associated with performing a mailbox command as part of its handling. For things such as FLOGI ACC, there isn't a subsequent action to perform with the adapter, thus there is no mailbox cmd ptr. PLOGI ACC though will perform REG_RPI upon completion, thus there is a mailbox cmd ptr. Link: https://lore.kernel.org/r/[email protected] Co-developed-by: Dick Kennedy <[email protected]> Signed-off-by: Dick Kennedy <[email protected]> Signed-off-by: James Smart <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-08-31scsi: lpfc: Fix setting IRQ affinity with an empty CPU maskJames Smart1-1/+0
Some systems are reporting the following log message during driver unload or system shutdown: ics_rtas_set_affinity: No online cpus in the mask A prior commit introduced the writing of an empty affinity mask in calls to irq_set_affinity_hint() when disabling interrupts or when there are no remaining online CPUs to service an eq interrupt. At least some ppc64 systems are checking whether affinity masks are empty or not. Do not call irq_set_affinity_hint() with an empty CPU mask. Fixes: dcaa21367938 ("scsi: lpfc: Change default IRQ model on AMD architectures") Link: https://lore.kernel.org/r/[email protected] Cc: <[email protected]> # v5.5+ Co-developed-by: Dick Kennedy <[email protected]> Signed-off-by: Dick Kennedy <[email protected]> Signed-off-by: James Smart <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-08-31scsi: qla2xxx: Fix regression on sparc64René Rebe2-4/+4
Commit 98aee70d19a7 ("qla2xxx: Add endianizer to max_payload_size modifier.") in 2014 broke qla2xxx on sparc64, e.g. as in the Sun Blade 1000 / 2000. Unbreak by partial revert to fix endianness in nvram firmware default initialization. Also mark the second frame_payload_size in nvram_t __le16 to avoid new sparse warnings. Link: https://lore.kernel.org/r/[email protected] Fixes: 98aee70d19a7 ("qla2xxx: Add endianizer to max_payload_size modifier.") Reviewed-by: Himanshu Madhani <[email protected]> Reviewed-by: Bart Van Assche <[email protected]> Acked-by: Arun Easi <[email protected]> Signed-off-by: René Rebe <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-08-31scsi: libfc: Fix for double free()Javed Hasan1-2/+0
Fix for '&fp->skb' double free. Link: https://lore.kernel.org/r/[email protected] Reported-by: Dan Carpenter <[email protected]> Signed-off-by: Javed Hasan <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-08-31scsi: pm8001: Fix memleak in pm8001_exec_internal_task_abortDinghao Liu1-1/+1
When pm8001_tag_alloc() fails, task should be freed just like it is done in the subsequent error paths. Link: https://lore.kernel.org/r/[email protected] Acked-by: Jack Wang <[email protected]> Signed-off-by: Dinghao Liu <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-08-24scsi: esas2r: Remove unnecessary castsAlex Dewar1-15/+13
In a number of places in esas2r_ioctl.c, the void* returned from pci_alloc_consistent() is cast unnecessarily. Remove casts. Issue identified with Coccinelle. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alex Dewar <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-08-24scsi: csiostor: Fix wrong return value in csio_hw_prep_fw()Tianjia Zhang1-1/+1
On an error exit path, a negative error code should be returned instead of a positive return value. Link: https://lore.kernel.org/r/[email protected] Fixes: f40e74ffa3de ("csiostor:firmware upgrade fix") Cc: Praveen Madhavan <[email protected]> Signed-off-by: Tianjia Zhang <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
2020-08-24scsi: qla2xxx: Fix wrong return value in qla_nvme_register_hba()Tianjia Zhang1-1/+1
On an error exit path, a negative error code should be returned instead of a positive return value. Link: https://lore.kernel.org/r/[email protected] Fixes: 8777e4314d39 ("scsi: qla2xxx: Migrate NVME N2N handling into state machine") Cc: Quinn Tran <[email protected]> Signed-off-by: Tianjia Zhang <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>