Bart Van Assche
90f359c1aa
scsi: core: Report error list information in debugfs
...
Provide information in debugfs about SCSI error handling to make it easier
to debug the SCSI error handler. Additionally, report the maximum number of
retries in debugfs (.allowed).
Reviewed-by: John Garry <john.g.garry@oracle.com >
Cc: Hannes Reinecke <hare@suse.de >
Cc: Damien Le Moal <damien.lemoal@opensource.wdc.com >
Cc: Mike Christie <michael.christie@oracle.com >
Cc: Ming Lei <ming.lei@redhat.com >
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Link: https://lore.kernel.org/r/20230822163811.219569-1-bvanassche@acm.org
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-08-24 22:13:03 -04:00
Bart Van Assche
79519528a1
scsi: core: Improve type safety of scsi_rescan_device()
...
Most callers of scsi_rescan_device() have the scsi_device pointer readily
available. Pass a struct scsi_device pointer to scsi_rescan_device()
instead of a struct device pointer. This change prevents that a pointer to
another struct device would be passed accidentally to scsi_rescan_device().
Remove the scsi_rescan_device() declaration from the scsi_priv.h header
file since it duplicates the declaration in <scsi/scsi_host.h>.
Reviewed-by: Hannes Reinecke <hare@suse.de >
Reviewed-by: Damien Le Moal <damien.lemoal@opensource.wdc.com >
Reviewed-by: John Garry <john.g.garry@oracle.com >
Cc: Mike Christie <michael.christie@oracle.com >
Cc: Ming Lei <ming.lei@redhat.com >
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Link: https://lore.kernel.org/r/20230822153043.4046244-1-bvanassche@acm.org
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-08-24 22:11:29 -04:00
Yue Haibing
e1a87e29fb
scsi: qedi: Remove unused declarations
...
These declarations were never implemented, remove them.
Signed-off-by: Yue Haibing <yuehaibing@huawei.com >
Link: https://lore.kernel.org/r/20230822143338.19120-1-yuehaibing@huawei.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-08-24 22:09:04 -04:00
Yue Haibing
11443b539e
scsi: qedf: Remove unused declaration
...
This declaration was never implemented, remove it.
Signed-off-by: Yue Haibing <yuehaibing@huawei.com >
Link: https://lore.kernel.org/r/20230822143338.19120-1-yuehaibing@huawei.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-08-24 22:09:04 -04:00
Juergen Gross
73c7881b50
scsi: xen-scsifront: shost_priv() can never return NULL
...
There is no need to check whether shost_priv() returns a non-NULL value, as
the pointer returned is just an offset to the passed in parameter.
While at it replace an open coded shost_priv() instance.
Reported-by: Dan Carpenter <dan.carpenter@linaro.org >
Signed-off-by: Juergen Gross <jgross@suse.com >
Link: https://lore.kernel.org/r/20230822064817.27257-1-jgross@suse.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-08-24 22:06:44 -04:00
Martin K. Petersen
1451455e6f
Merge patch series "libsas: Some tidy-up"
...
John Garry <john.g.garry@oracle.com > says:
This series tidies-up libsas a bit, including:
- delete structure(s) with only one member
- delete structure members which are only ever set
- delete structure members which are never set and code which relies on
that member being set
This conflicts with the following series:
https://lore.kernel.org/linux-scsi/20230809132249.37948-1-yuehaibing@huawei.com/
Any conflict should be trivial to resolve.
Based on mkp-scsi staging at a18e81d17a ("scsi: ufs: ufs-pci: Add support for QEMU")
Link: https://lore.kernel.org/r/20230815115156.343535-1-john.g.garry@oracle.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-08-24 21:06:16 -04:00
Martin K. Petersen
ef5d681b4d
Merge patch series "Returning FIS on success for CDL"
...
Igor Pylypiv <ipylypiv@google.com > says:
This patch series plumbs libata's request for a result taskfile
(ATA_QCFLAG_RESULT_TF) through libsas to pm80xx LLDD. Other libsas LLDDs
can start using the newly added return_fis_on_success as well, if needed.
For Command Duration Limits policy 0xD (command completes without an
error) libata needs FIS in order to detect the ATA_SENSE bit and read
the Sense Data for Successful NCQ Commands log (0Fh). pm80xx HBAs do
not return FIS on success by default, hence, the driver is updated to
set the RETFIS bit (Return FIS on good completion) when requested by
libsas.
Link: https://lore.kernel.org/r/20230819213040.1101044-1-ipylypiv@google.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-08-24 21:05:19 -04:00
John Garry
86344494e3
scsi: libsas: Delete sas_ata_task.retry_count
...
Since libsas was introduced in commit 2908d778ab ("[SCSI] aic94xx: new
driver"), sas_ata_task.retry_count is never set, so delete it and the
reference in asd_build_ata_ascb().
Signed-off-by: John Garry <john.g.garry@oracle.com >
Link: https://lore.kernel.org/r/20230815115156.343535-11-john.g.garry@oracle.com
Reviewed-by: Damien Le Moal <dlemoal@kernel.org >
Reviewed-by: Jason Yan <yanaijie@huawei.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-08-21 17:50:59 -04:00
John Garry
44862dc2d2
scsi: libsas: Delete sas_ata_task.stp_affil_pol
...
Since libsas was introduced in commit 2908d778ab ("[SCSI] aic94xx: new
driver"), sas_ata_task.stp_affil_pol is never set, so delete it and the
reference in asd_build_ata_ascb().
Signed-off-by: John Garry <john.g.garry@oracle.com >
Link: https://lore.kernel.org/r/20230815115156.343535-10-john.g.garry@oracle.com
Reviewed-by: Damien Le Moal <dlemoal@kernel.org >
Reviewed-by: Jason Yan <yanaijie@huawei.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-08-21 17:50:59 -04:00
John Garry
7b964c4022
scsi: libsas: Delete sas_ata_task.set_affil_pol
...
Since libsas was introduced in commit 2908d778ab ("[SCSI] aic94xx: new
driver"), sas_ata_task.set_affil_pol is never set, so delete it and the
reference in asd_build_ata_ascb().
Signed-off-by: John Garry <john.g.garry@oracle.com >
Link: https://lore.kernel.org/r/20230815115156.343535-9-john.g.garry@oracle.com
Reviewed-by: Damien Le Moal <dlemoal@kernel.org >
Reviewed-by: Jason Yan <yanaijie@huawei.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-08-21 17:50:58 -04:00
John Garry
4dc051eb0c
scsi: libsas: Delete sas_ssp_task.task_prio
...
Since libsas was introduced in commit 2908d778ab ("[SCSI] aic94xx: new
driver"), sas_ssp_task.task_prio is never set, so delete it and any
references which depend on it being set (all of them).
Signed-off-by: John Garry <john.g.garry@oracle.com >
Link: https://lore.kernel.org/r/20230815115156.343535-8-john.g.garry@oracle.com
Reviewed-by: Damien Le Moal <dlemoal@kernel.org >
Reviewed-by: Jason Yan <yanaijie@huawei.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-08-21 17:50:58 -04:00
John Garry
ebf26e93cf
scsi: libsas: Delete sas_ssp_task.enable_first_burst
...
Since libsas was introduced in commit 2908d778ab ("[SCSI] aic94xx: new
driver"), sas_ssp_task.enable_first_burst is never set, so delete it and
any references.
Signed-off-by: John Garry <john.g.garry@oracle.com >
Link: https://lore.kernel.org/r/20230815115156.343535-7-john.g.garry@oracle.com
Reviewed-by: Damien Le Moal <dlemoal@kernel.org >
Reviewed-by: Jason Yan <yanaijie@huawei.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-08-21 17:50:58 -04:00
John Garry
31d9061b47
scsi: libsas: Delete sas_ssp_task.retry_count
...
Since libsas was introduced in commit 2908d778ab ("[SCSI] aic94xx: new
driver"), sas_ssp_task.retry_count is only ever set, so delete it.
The aic94xx driver also had its own retry_count definition in struct scb
sub-structs, which may have caused a mix-up.
Signed-off-by: John Garry <john.g.garry@oracle.com >
Link: https://lore.kernel.org/r/20230815115156.343535-6-john.g.garry@oracle.com
Reviewed-by: Jason Yan <yanaijie@huawei.com >
Reviewed-by: Damien Le Moal <dlemoal@kernel.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-08-21 17:50:58 -04:00
John Garry
1136a0225d
scsi: libsas: Delete struct scsi_core
...
Since commit 79855d1785 ("libsas: remove task_collector mode"), struct
scsi_core only contains a reference to the shost. struct scsi_core is only
used in sas_ha_struct.core, so delete scsi_core and replace with a
reference to the shost there.
Signed-off-by: John Garry <john.g.garry@oracle.com >
Link: https://lore.kernel.org/r/20230815115156.343535-5-john.g.garry@oracle.com
Reviewed-by: Jason Yan <yanaijie@huawei.com >
Reviewed-by: Damien Le Moal <dlemoal@kernel.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-08-21 17:50:58 -04:00
John Garry
2f4e20cd6e
scsi: libsas: Delete enum sas_phy_type
...
enum sas_phy_type is used for asd_sas_phy.type, which is only ever set, so
delete this member and the enum.
Signed-off-by: John Garry <john.g.garry@oracle.com >
Link: https://lore.kernel.org/r/20230815115156.343535-4-john.g.garry@oracle.com
Reviewed-by: Damien Le Moal <dlemoal@kernel.org >
Reviewed-by: Jason Yan <yanaijie@huawei.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-08-21 17:50:57 -04:00
John Garry
c46a917093
scsi: libsas: Delete enum sas_class
...
enum sas_class prob would have been useful if function sas_show_class() was
ever implemented, which it wasn't.
enum sas_class is used as asd_sas_port.class and asd_sas_phy.class, which
are only ever set, so delete these members and the enum.
Signed-off-by: John Garry <john.g.garry@oracle.com >
Link: https://lore.kernel.org/r/20230815115156.343535-3-john.g.garry@oracle.com
Reviewed-by: Damien Le Moal <dlemoal@kernel.org >
Reviewed-by: Jason Yan <yanaijie@huawei.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-08-21 17:50:57 -04:00
John Garry
b1bc497317
scsi: libsas: Delete sas_ha_struct.lldd_module
...
Since libsas was introduced in commit 2908d778ab ("[SCSI] aic94xx: new
driver"), sas_ha_struct.lldd_module has only ever been set, so remove it.
Struct scsi_host_template already has a reference to the LLD driver
module as to stop the driver being removed unexpectedly.
Signed-off-by: John Garry <john.g.garry@oracle.com >
Link: https://lore.kernel.org/r/20230815115156.343535-2-john.g.garry@oracle.com
Reviewed-by: Damien Le Moal <dlemoal@kernel.org >
Reviewed-by: Jason Yan <yanaijie@huawei.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-08-21 17:50:57 -04:00
Mike Christie
84c073fd89
scsi: target: Fix write perf due to unneeded throttling
...
The write back throttling (WBT) code checks if REQ_SYNC | REQ_IDLE is set
to determine if a write is O_DIRECT vs buffered. If the bits are not set
then it assumes it's a buffered write and will throttle LIO if we hit
certain metrics. LIO itself is not using the buffer cache and is doing
direct I/O, so this has us set the direct bits so we are not throttled.
When the initiator application is doing direct I/O this can greatly improve
performance. It depends on the backend device but we have seen where the
WBT code is throttling writes to only 20K IOPs with 4K I/Os when the device
can support 100K+.
Signed-off-by: Mike Christie <michael.christie@oracle.com >
Link: https://lore.kernel.org/r/20230817192902.346791-1-michael.christie@oracle.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-08-21 17:20:48 -04:00
Andy Shevchenko
19d7102a95
scsi: lpfc: Do not abuse UUID APIs and LPFC_COMPRESS_VMID_SIZE
...
The lpfc_vmid_host_uuid is not defined as uuid_t and its usage is not the
same as for uuid_t operations (like exporting or importing). Hence replace
call to uuid_is_null() by respective memchr_inv() without abusing casting.
With that, replace LPFC_COMPRESS_VMID_SIZE with plain number and respective
sizeof() to make code robust to changes in the future, if any.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Link: https://lore.kernel.org/r/20230818155452.875781-1-andriy.shevchenko@linux.intel.com
Reviewed-by: Justin Tee <justin.tee@broadcom.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-08-21 17:13:57 -04:00
Yue Haibing
04aff456af
scsi: pm8001: Remove unused declarations
...
Commit 4fcf812ca3 ("[SCSI] libsas: export sas_alloc_task()") removed
these implementations but not the declarations.
Signed-off-by: Yue Haibing <yuehaibing@huawei.com >
Link: https://lore.kernel.org/r/20230818124700.49724-1-yuehaibing@huawei.com
Reviewed-by: Bart Van Assche <bvanassche@acm.org >
Acked-by: Jack Wang <jinpu.wang@ionos.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-08-21 17:13:57 -04:00
Chengfeng Ye
1a19755519
scsi: fcoe: Fix potential deadlock on &fip->ctlr_lock
...
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: 794d98e77f ("[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.com
Reviewed-by: Davidlohr Bueso <dave@stgolabs.net >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-08-21 17:13:56 -04:00
Rajeshwar R Shinde
2d6f70fe17
scsi: elx: sli4: Remove code duplication
...
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.com
Reviewed-by: Ram Vegesna <ram.vegesna@broadcom.com >
Acked-by: Randy Dunlap <rdunlap@infradead.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-08-21 17:13:56 -04:00
Gustavo A. R. Silva
56a4d69a26
scsi: bfa: Replace one-element array with flexible-array member in struct fc_rscn_pl_s
...
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/339
Signed-off-by: "Gustavo A. R. Silva" <gustavoars@kernel.org >
Link: https://lore.kernel.org/r/ZN0VTpDBOSVHGayb@work
Reviewed-by: Kees Cook <keescook@chromium.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-08-21 17:13:56 -04:00
Yue Haibing
1e4474c845
scsi: qla2xxx: Remove unused declarations
...
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.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-08-21 17:13:56 -04:00
Zheng Zengkai
5d344c5eb4
scsi: pmcraid: Use pci_dev_id() to simplify the code
...
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.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-08-21 17:13:56 -04:00
Igor Pylypiv
5454329595
scsi: pm80xx: Set RETFIS when requested by libsas
...
By default PM80xx HBAs return FIS only when a drive reports an error.
The RETFIS bit forces the controller to populate FIS even when a drive
reports no error.
Signed-off-by: Igor Pylypiv <ipylypiv@google.com >
Link: https://lore.kernel.org/r/20230819213040.1101044-3-ipylypiv@google.com
Reviewed-by: Niklas Cassel <niklas.cassel@wdc.com >
Reviewed-by: Damien Le Moal <dlemoal@kernel.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-08-21 17:11:41 -04:00
Igor Pylypiv
72875018f6
scsi: libsas: Add return_fis_on_success to sas_ata_task
...
Set return_fis_on_success when libata requests result taskfile.
For Command Duration Limits policy 0xD (command completes without
an error) libata needs FIS in order to detect the ATA_SENSE bit and
read the Sense Data for Successful NCQ Commands log (0Fh).
Signed-off-by: Igor Pylypiv <ipylypiv@google.com >
Link: https://lore.kernel.org/r/20230819213040.1101044-2-ipylypiv@google.com
Reviewed-by: Niklas Cassel <niklas.cassel@wdc.com >
Reviewed-by: Damien Le Moal <dlemoal@kernel.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-08-21 17:11:41 -04:00
Jialin Zhang
bb1459cb84
scsi: megaraid: Use pci_dev_id() to simplify the code
...
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.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-08-21 16:47:44 -04:00
Jialin Zhang
a46421fdf7
scsi: megaraid_sas: Use pci_dev_id() to simplify the code
...
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.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-08-21 16:47:44 -04:00
Jialin Zhang
48e590218d
scsi: mvumi: Use pci_dev_id() to simplify the code
...
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.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-08-21 16:47:44 -04:00
Brian Masney
517f8eb3fa
scsi: ufs: host: Convert to dev_err_probe() in ufshcd_pltfrm_init()
...
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.com
Reviewed-by: "Bao D. Nguyen" <quic_nguyenb@quicinc.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-08-21 16:45:14 -04:00
Brian Masney
1375232371
scsi: ufs: core: Convert to dev_err_probe() in ufshcd_variant_hba_init()
...
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.com
Reviewed-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-08-21 16:45:14 -04:00
Tony Battersby
62ec209209
scsi: core: Use 32-bit hostnum in scsi_host_lookup()
...
Change scsi_host_lookup() hostnum argument type from unsigned short to
unsigned int to match the type used everywhere else.
Fixes: 6d49f63b41 ("[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.com
Reviewed-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-08-21 16:42:03 -04:00
Artem Chernyshev
9a23ed57ab
scsi: isci: Return result of sas_register_ha()
...
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.ru
Reviewed-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-08-21 16:39:30 -04:00
Arnd Bergmann
bfaa4a0ce1
scsi: gvp11: Remove unused gvp11_setup() function
...
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.org
Reviewed-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 >
2023-08-21 16:37:11 -04:00
Arnd Bergmann
71cc486335
scsi: qlogicpti: Mark qlogicpti_info() static
...
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.org
Reviewed-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 >
2023-08-21 16:37:11 -04:00
Alex Henrie
68a4f84a17
scsi: ppa: Add a module parameter for the transfer mode
...
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.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-08-21 16:32:40 -04:00
Alex Henrie
b68442ebda
scsi: ppa: Fix compilation with PPA_DEBUG=1
...
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.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-08-21 16:32:40 -04:00
Xiang Yang
e9b525b6cc
scsi: arcmsr: Add __init and __exit for arcmsr_module_{init,exit}()
...
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.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-08-21 16:27:10 -04:00
Yue Haibing
a905b5cddc
scsi: core: Remove unused extern declarations
...
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.com
Reviewed-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-08-21 16:23:41 -04:00
Yue Haibing
2fcd1e2b64
scsi: libsas: Remove unused declarations
...
Commit 042ebd293b ("scsi: libsas: kill useless ha_event and do some
cleanup") removed sas_hae_reset() but not its declaration. Commit
2908d778ab ("[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.com
Reviewed-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 >
2023-08-21 16:22:09 -04:00
Jeuk Kim
a18e81d17a
scsi: ufs: ufs-pci: Add support for QEMU
...
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@fedora
Signed-off-by: Jeuk Kim <jeuk20.kim@samsung.com >
Link: https://lore.kernel.org/r/20230807013726epcms2p1c604cb8e98680aebebb7cc5ab2d580f5@epcms2p1
Acked-by: Adrian Hunter <adrian.hunter@intel.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-08-07 22:39:00 -04:00
Martin K. Petersen
9640d57d15
Merge patch series "mpi3mr: Few Enhancements and minor fixes"
...
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.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-08-07 21:43:24 -04:00
Ranjan Kumar
9a9068b2af
scsi: mpi3mr: Update driver version to 8.5.0.0.0
...
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.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-08-07 21:41:48 -04:00
Ranjan Kumar
d9a5ab0ea9
scsi: mpi3mr: Enhance handling of devices removed after controller reset
...
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.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-08-07 21:41:48 -04:00
Ranjan Kumar
e7a8648e1c
scsi: mpi3mr: WRITE SAME implementation
...
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.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-08-07 21:41:48 -04:00
Ranjan Kumar
d9adb81e67
scsi: mpi3mr: Add support for more than 1MB I/O
...
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.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-08-07 21:41:48 -04:00
Ranjan Kumar
6f81b1cfdf
scsi: mpi3mr: Update MPI Headers to version 3.00.28
...
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.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-08-07 21:41:48 -04:00
Ranjan Kumar
9134211f7b
scsi: mpi3mr: Invoke soft reset upon TSU or event ack time out
...
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.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-08-07 21:41:47 -04:00
Justin Tee
dded1dc31a
scsi: lpfc: Modify when a node should be put in device recovery mode during RSCN
...
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.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-08-07 21:25:47 -04:00