Linus Torvalds
7fcd473a64
Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
...
Pull more SCSI updates from James Bottomley:
"A few late arriving patches that missed the initial pull request. It's
mostly bug fixes (the dt-bindings is a fix for the initial pull)"
* tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
scsi: ufs: core: Remove unused function declaration
scsi: target: docs: Remove tcm_mod_builder.py
scsi: target: iblock: Quiet bool conversion warning with pr_preempt use
scsi: dt-bindings: ufs: qcom: Fix ICE phandle
scsi: core: Simplify scsi_cdl_check_cmd()
scsi: isci: Fix comment typo
scsi: smartpqi: Replace one-element arrays with flexible-array members
scsi: target: tcmu: Replace strlcpy() with strscpy()
scsi: ncr53c8xx: Replace strlcpy() with strscpy()
scsi: lpfc: Fix lpfc_name struct packing
2023-07-08 12:35:18 -07:00
Linus Torvalds
ca7ce08d6a
Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
...
Pull SCSI updates from James Bottomley:
"Updates to the usual drivers (ufs, pm80xx, libata-scsi, smartpqi,
lpfc, qla2xxx).
We have a couple of major core changes impacting other systems:
- Command Duration Limits, which spills into block and ATA
- block level Persistent Reservation Operations, which touches block,
nvme, target and dm
Both of these are added with merge commits containing a cover letter
explaining what's going on"
* tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (187 commits)
scsi: core: Improve warning message in scsi_device_block()
scsi: core: Replace scsi_target_block() with scsi_block_targets()
scsi: core: Don't wait for quiesce in scsi_device_block()
scsi: core: Don't wait for quiesce in scsi_stop_queue()
scsi: core: Merge scsi_internal_device_block() and device_block()
scsi: sg: Increase number of devices
scsi: bsg: Increase number of devices
scsi: qla2xxx: Remove unused nvme_ls_waitq wait queue
scsi: ufs: ufs-pci: Add support for Intel Arrow Lake
scsi: sd: sd_zbc: Use PAGE_SECTORS_SHIFT
scsi: ufs: wb: Add explicit flush_threshold sysfs attribute
scsi: ufs: ufs-qcom: Switch to the new ICE API
scsi: ufs: dt-bindings: qcom: Add ICE phandle
scsi: ufs: ufs-mediatek: Set UFSHCD_QUIRK_MCQ_BROKEN_RTC quirk
scsi: ufs: ufs-mediatek: Set UFSHCD_QUIRK_MCQ_BROKEN_INTR quirk
scsi: ufs: core: Add host quirk UFSHCD_QUIRK_MCQ_BROKEN_RTC
scsi: ufs: core: Add host quirk UFSHCD_QUIRK_MCQ_BROKEN_INTR
scsi: ufs: core: Remove dedicated hwq for dev command
scsi: ufs: core: mcq: Fix the incorrect OCS value for the device command
scsi: ufs: dt-bindings: samsung,exynos: Drop unneeded quotes
...
2023-06-30 11:57:07 -07:00
Gustavo A. R. Silva
6f0a92fd7d
scsi: smartpqi: Replace one-element arrays with flexible-array members
...
One-element arrays are deprecated, and we are replacing them with flexible
array members instead. So, replace one-element arrays with flexible-array
members in a couple of structures, and refactor the rest of the code,
accordingly.
This helps with the ongoing efforts to tighten the FORTIFY_SOURCE routines
on memcpy().
This results in no differences in binary output.
Link: https://github.com/KSPP/linux/issues/79
Link: https://github.com/KSPP/linux/issues/204
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org >
Link: https://lore.kernel.org/r/ZJNdKDkuRbFZpASS@work
Reviewed-by: Kees Cook <keescook@chromium.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-06-21 21:15:08 -04:00
Azeem Shaikh
41e5d6f64d
scsi: smartpqi: Replace all non-returning strlcpy() with strscpy()
...
strlcpy() reads the entire source buffer first. This read may exceed the
destination size limit. This is both inefficient and can lead to linear
read overflows if a source string is not NUL-terminated [1]. In an effort
to remove strlcpy() completely [2], replace strlcpy() here with strscpy().
No return values were used, so direct replacement is safe.
[1] https://www.kernel.org/doc/html/latest/process/deprecated.html#strlcpy
[2] https://github.com/KSPP/linux/issues/89
Signed-off-by: Azeem Shaikh <azeemshaikh38@gmail.com >
Link: https://lore.kernel.org/r/20230530162321.984035-1-azeemshaikh38@gmail.com
Reviewed-by: Kees Cook <keescook@chromium.org >
Acked-by: Don Brace <don.brace@microchip.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-05-31 18:05:59 -04:00
Kees Cook
d67790ddf0
overflow: Add struct_size_t() helper
...
While struct_size() is normally used in situations where the structure
type already has a pointer instance, there are places where no variable
is available. In the past, this has been worked around by using a typed
NULL first argument, but this is a bit ugly. Add a helper to do this,
and replace the handful of instances of the code pattern with it.
Instances were found with this Coccinelle script:
@struct_size_t@
identifier STRUCT, MEMBER;
expression COUNT;
@@
- struct_size((struct STRUCT *)\(0\|NULL\),
+ struct_size_t(struct STRUCT,
MEMBER, COUNT)
Suggested-by: Christoph Hellwig <hch@infradead.org >
Cc: Jesse Brandeburg <jesse.brandeburg@intel.com >
Cc: Tony Nguyen <anthony.l.nguyen@intel.com >
Cc: "David S. Miller" <davem@davemloft.net >
Cc: Eric Dumazet <edumazet@google.com >
Cc: Paolo Abeni <pabeni@redhat.com >
Cc: James Smart <james.smart@broadcom.com >
Cc: Keith Busch <kbusch@kernel.org >
Cc: Jens Axboe <axboe@kernel.dk >
Cc: Sagi Grimberg <sagi@grimberg.me >
Cc: HighPoint Linux Team <linux@highpoint-tech.com >
Cc: "James E.J. Bottomley" <jejb@linux.ibm.com >
Cc: "Martin K. Petersen" <martin.petersen@oracle.com >
Cc: Kashyap Desai <kashyap.desai@broadcom.com >
Cc: Sumit Saxena <sumit.saxena@broadcom.com >
Cc: Shivasharan S <shivasharan.srikanteshwara@broadcom.com >
Cc: Don Brace <don.brace@microchip.com >
Cc: "Darrick J. Wong" <djwong@kernel.org >
Cc: Dave Chinner <dchinner@redhat.com >
Cc: Guo Xuenan <guoxuenan@huawei.com >
Cc: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com >
Cc: Nick Desaulniers <ndesaulniers@google.com >
Cc: Daniel Latypov <dlatypov@google.com >
Cc: kernel test robot <lkp@intel.com >
Cc: intel-wired-lan@lists.osuosl.org
Cc: netdev@vger.kernel.org
Cc: linux-nvme@lists.infradead.org
Cc: linux-scsi@vger.kernel.org
Cc: megaraidlinux.pdl@broadcom.com
Cc: storagedev@microchip.com
Cc: linux-xfs@vger.kernel.org
Cc: linux-hardening@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org >
Acked-by: Martin K. Petersen <martin.petersen@oracle.com >
Reviewed-by: Darrick J. Wong <djwong@kernel.org >
Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org >
Reviewed-by: Christoph Hellwig <hch@lst.de >
Acked-by: Jakub Kicinski <kuba@kernel.org >
Reviewed-by: Alexander Lobakin <aleksander.lobakin@intel.com >
Link: https://lore.kernel.org/r/20230522211810.never.421-kees@kernel.org
2023-05-26 13:52:19 -07:00
Don Brace
fcb405111a
scsi: smartpqi: Update version to 2.1.22-040
...
Reviewed-by: Gerry Morong <gerry.morong@microchip.com >
Reviewed-by: Scott Benesh <scott.benesh@microchip.com >
Reviewed-by: Mike McGowen <mike.mcgowen@microchip.com >
Reviewed-by: Kevin Barnett <kevin.barnett@microchip.com >
Signed-off-by: Don Brace <don.brace@microchip.com >
Link: https://lore.kernel.org/r/20230428153712.297638-13-don.brace@microchip.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-05-08 07:17:12 -04:00
Don Brace
49fd52d499
scsi: smartpqi: Update copyright to 2023
...
Update copyright to current year.
Reviewed-by: Scott Benesh <scott.benesh@microchip.com >
Reviewed-by: Mike McGowen <mike.mcgowen@microchip.com >
Reviewed-by: Kevin Barnett <kevin.barnett@microchip.com >
Signed-off-by: Don Brace <don.brace@microchip.com >
Link: https://lore.kernel.org/r/20230428153712.297638-12-don.brace@microchip.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-05-08 07:17:12 -04:00
Don Brace
d2c7583f27
scsi: smartpqi: Add sysfs entry for NUMA node in /sys/block/sdX/device
...
Although NUMA node is a PCIe device level attribute, it was requested the
NUMA node be added for each exposed device similar to NVMe disks.
Example for NVMe:
/sys/block/nvme1c1n1/device/numa_node
Example for smartpqi:
/sys/block/sdh/device/numa_node
cat /sys/block/sdh/device/numa_node
0
Reviewed-by: David Strahan <david.strahan@microchip.com >
Reviewed-by: Mike McGowen <mike.mcgowen@microchip.com >
Reviewed-by: Kevin Barnett <kevin.barnett@microchip.com >
Signed-off-by: Don Brace <don.brace@microchip.com >
Link: https://lore.kernel.org/r/20230428153712.297638-11-don.brace@microchip.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-05-08 07:17:12 -04:00
Kevin Barnett
2eddf98d01
scsi: smartpqi: Stop sending driver-initiated TURs
...
Stop sending driver-initiated TURs to physical devices during driver
load/rescan.
Note: This does not affect SML initiated TURs.
Some Linux kernels can cause lengthy delays in OS boot if the kernel
detects that a drive is being sanitized/erased. We were using TURs to
detect if a sanitize/erase was in progress.
Some devices do not return the TUR in a timely manner, causing driver
load/rescan stalls.
Reviewed-by: Scott Benesh <scott.benesh@microchip.com >
Reviewed-by: Scott Teel <scott.teel@microchip.com >
Reviewed-by: Mike McGowen <mike.mcgowen@microchip.com >
Signed-off-by: Kevin Barnett <kevin.barnett@microchip.com >
Signed-off-by: Don Brace <don.brace@microchip.com >
Link: https://lore.kernel.org/r/20230428153712.297638-10-don.brace@microchip.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-05-08 07:17:12 -04:00
Don Brace
c23efd9ead
scsi: smartpqi: Fix byte aligned writew for ARM servers
...
Correct OOPs on ARM servers during driver init.
The driver attempts to update FW with max_feature_supported value using a
writew() kernel call using a byte aligned address. This fails on some ARM
systems.
Change the writew() to two writeb() calls to update this value.
Reviewed-by: Scott Benesh <scott.benesh@microchip.com >
Reviewed-by: Scott Teel <scott.teel@microchip.com >
Reviewed-by: Mike McGowen <mike.mcgowen@microchip.com >
Signed-off-by: Don Brace <don.brace@microchip.com >
Link: https://lore.kernel.org/r/20230428153712.297638-9-don.brace@microchip.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-05-08 07:17:11 -04:00
Gilbert Wu
68f7920492
scsi: smartpqi: Add support for RAID NCQ priority
...
Enable NCQ priority feature for the RAID path when AIO path is disabled.
Move function pqi_is_io_high_priority() up to avoid adding a prototype.
Remove unused argument ctrl_info.
Reviewed-by: Scott Benesh <scott.benesh@microchip.com >
Reviewed-by: Scott Teel <scott.teel@microchip.com >
Reviewed-by: Mike McGowen <mike.mcgowen@microchip.com >
Reviewed-by: Kevin Barnett <kevin.barnett@microchip.com >
Signed-off-by: Gilbert Wu <Gilbert.Wu@microchip.com >
Signed-off-by: Don Brace <don.brace@microchip.com >
Link: https://lore.kernel.org/r/20230428153712.297638-8-don.brace@microchip.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-05-08 07:17:11 -04:00
Murthy Bhat
5c9e3c1c52
scsi: smartpqi: Validate block layer host tag
...
Prevent OS crashes when a drive is hot removed during I/O stress test.
The I/O request pointer can be invalid if block layer provides incorrect
multi-queue host tag. This can lead to invalid I/O request pointer
dereference.
Reviewed-by: Scott Benesh <scott.benesh@microchip.com >
Reviewed-by: Scott Teel <scott.teel@microchip.com >
Reviewed-by: Mike McGowen <mike.mcgowen@microchip.com >
Reviewed-by: Kevin Barnett <kevin.barnett@microchip.com >
Signed-off-by: Murthy Bhat <Murthy.Bhat@microchip.com >
Signed-off-by: Don Brace <don.brace@microchip.com >
Link: https://lore.kernel.org/r/20230428153712.297638-7-don.brace@microchip.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-05-08 07:17:11 -04:00
Mike McGowen
80d560d94f
scsi: smartpqi: Remove contention for raid_bypass_cnt
...
Reduce CPU contention when incrementing variable raid_bypass_cnt.
Remove the atomic operations for this variable by changing the atomic to an
unsigned int and replace atomic operations with standard operations. The
value is only checked that it is increasing and accuracy is not required.
Reviewed-by: Scott Benesh <scott.benesh@microchip.com >
Reviewed-by: Scott Teel <scott.teel@microchip.com >
Reviewed-by: Kevin Barnett <kevin.barnett@microchip.com >
Signed-off-by: Mike McGowen <mike.mcgowen@microchip.com >
Signed-off-by: Don Brace <don.brace@microchip.com >
Link: https://lore.kernel.org/r/20230428153712.297638-6-don.brace@microchip.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-05-08 07:17:11 -04:00
David Strahan
fe0375d485
scsi: smartpqi: Add new controller PCI IDs
...
All PCI ID entries in Hex.
Add PCI IDs for ZTE controllers:
VID / DID / SVID / SDID
---- ---- ---- ----
ZTE SmartROC3200 RS344-16i 4G 9005 / 028f / 1cf2 / 0804
ZTE SmartROC3200 RS345-16i 8G 9005 / 028f / 1cf2 / 0805
ZTE SmartIOC2200 RS346-16i 9005 / 028f / 1cf2 / 0806
ZTE SmartROC3200 RM344-16i 4G 9005 / 028f / 1cf2 / 54da
ZTE SmartROC3200 RM345-16i 8G 9005 / 028f / 1cf2 / 54db
ZTE SmartIOC2200 RM346-16i 9005 / 028f / 1cf2 / 54dc
Add PCI IDs for ByteDance controllers:
VID / DID / SVID / SDID
---- ---- ---- ----
ByteHBA JGH43014-8 9005 / 028f / 1e93 / 1005
Add PCI IDs for IBM controllers:
VID / DID / SVID / SDID
---- ---- ---- ----
IBM 4-Port 24G SAS 9005 / 028f / 1014 / 0718
Add PCI IDs for Cloudnine controllers:
VID / DID / SVID / SDID
---- ---- ---- ----
SmartHBA P6600-8i 9005 / 028f / 1f51 / 1001
SmartRAID P7604-8i 9005 / 028f / 1f51 / 1002
SmartHBA P6600-8e 9005 / 028f / 1f51 / 1003
SmartRAID P7604-8e 9005 / 028f / 1f51 / 1004
SmartHBA P6600-16i 9005 / 028f / 1f51 / 1005
SmartRAID P7608-16i 9005 / 028f / 1f51 / 1006
SmartHBA P6600-8i8e 9005 / 028f / 1f51 / 1007
SmartRAID P7608-8i8e 9005 / 028f / 1f51 / 1008
SmartHBA P6600-16e 9005 / 028f / 1f51 / 1009
SmartRAID P7608-16e 9005 / 028f / 1f51 / 100a
Reviewed-by: Scott Benesh <scott.benesh@microchip.com >
Reviewed-by: Scott Teel <scott.teel@microchip.com >
Reviewed-by: Kevin Barnett <kevin.barnett@microchip.com >
Reviewed-by: Mike McGowen <mike.mcgowen@microchip.com >
Signed-off-by: David Strahan <David.Strahan@microchip.com >
Signed-off-by: Don Brace <don.brace@microchip.com >
Link: https://lore.kernel.org/r/20230428153712.297638-3-don.brace@microchip.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-05-08 07:17:11 -04:00
Mike McGowen
3e7e55aa3d
scsi: smartpqi: Map full length of PCI BAR 0
...
Map full length of PCI BAR 0 at driver init.
During driver initialization, the driver must make a kernel call to map the
controller registers into kernel address space. A parameter to this call
is the length of the memory to be mapped. The driver was specifying the
wrong length.
Reviewed-by: Scott Benesh <scott.benesh@microchip.com >
Reviewed-by: Kevin Barnett <kevin.barnett@microchip.com >
Signed-off-by: Mike McGowen <mike.mcgowen@microchip.com >
Signed-off-by: Don Brace <don.brace@microchip.com >
Link: https://lore.kernel.org/r/20230428153712.297638-2-don.brace@microchip.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-05-08 07:17:11 -04:00
Bart Van Assche
077126d6b9
scsi: smartpqi: Declare SCSI host template const
...
Make it explicit that the SCSI host template is not modified.
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Link: https://lore.kernel.org/r/20230322195515.1267197-71-bvanassche@acm.org
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-03-24 19:19:59 -04:00
Gustavo A. R. Silva
ead821268c
scsi: smartpqi: Replace one-element array with flexible-array member
...
One-element arrays are deprecated, and we are replacing them with flexible
array members instead. So, replace one-element array with flexible-array
member in struct report_log_lun_list.
This helps with the ongoing efforts to tighten the FORTIFY_SOURCE routines
on memcpy().
Link: https://lore.kernel.org/r/Y+LJz/r6+UeLqnV3@work
Link: https://github.com/KSPP/linux/issues/79
Link: https://github.com/KSPP/linux/issues/204
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org >
Acked-by: Don Brace <don.brace@microchip.com >
Reviewed-by: Kees Cook <keescook@chromium.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-02-08 19:03:43 -05:00
Don Brace
2ae45329a9
scsi: smartpqi: Change version to 2.1.20-035
...
Reviewed-by: Scott Benesh <scott.benesh@microchip.com >
Reviewed-by: Scott Teel <scott.teel@microchip.com >
Reviewed-by: Gerry Morong <gerry.morong@microchip.com >
Reviewed-by: Kevin Barnett <kevin.barnett@microchip.com >
Signed-off-by: Don Brace <don.brace@microchip.com >
Link: https://lore.kernel.org/r/166793533417.322537.3074216622272955440.stgit@brunhilda
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-11-17 18:10:59 +00:00
Don Brace
921800a1de
scsi: smartpqi: Initialize feature section info
...
Initialize features to 0 before processing.
Reviewed-by: Scott Benesh <scott.benesh@microchip.com >
Reviewed-by: Mike Mcgowan <mike.mcgowan@microchip.com >
Reviewed-by: Kevin Barnett <kevin.barnett@microchip.com >
Signed-off-by: Don Brace <don.brace@microchip.com >
Link: https://lore.kernel.org/r/166793532902.322537.2436075977808555348.stgit@brunhilda
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-11-17 18:10:59 +00:00
Gilbert Wu
14063fb625
scsi: smartpqi: Add controller cache flush during rmmod
...
Add in a call to flush the controller cache during driver removal.
Reviewed-by: Scott Benesh <scott.benesh@microchip.com >
Reviewed-by: Mike Mcgowan <mike.mcgowan@microchip.com >
Reviewed-by: Kevin Barnett <kevin.barnett@microchip.com >
Signed-off-by: Gilbert Wu <Gilbert.Wu@microchip.com >
Signed-off-by: Don Brace <don.brace@microchip.com >
Link: https://lore.kernel.org/r/166793532388.322537.878022136408270892.stgit@brunhilda
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-11-17 18:10:59 +00:00
Kumar Meiyappan
cc9befcbbb
scsi: smartpqi: Correct device removal for multi-actuator devices
...
Correct device count for multi-actuator drives which can cause kernel
panics.
Reviewed-by: Scott Benesh <scott.benesh@microchip.com >
Reviewed-by: Scott Teel <scott.teel@microchip.com >
Reviewed-by: Mike Mcgowan <mike.mcgowan@microchip.com >
Reviewed-by: Kevin Barnett <kevin.barnett@microchip.com >
Signed-off-by: Kumar Meiyappan <Kumar.Meiyappan@microchip.com >
Signed-off-by: Don Brace <don.brace@microchip.com >
Link: https://lore.kernel.org/r/166793531872.322537.9003385780343419275.stgit@brunhilda
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-11-17 18:10:59 +00:00
Kevin Barnett
cbe42ac156
scsi: smartpqi: Change sysfs raid_level attribute to N/A for controllers
...
Change the sysfs raid_level attribute from "RAID-0" to N/A.
Reviewed-by: Scott Benesh <scott.benesh@microchip.com >
Reviewed-by: Scott Teel <scott.teel@microchip.com >
Reviewed-by: Mike McGowan <mike.mcgowan@microchip.com >
Signed-off-by: Kevin Barnett <kevin.barnett@microchip.com >
Signed-off-by: Don Brace <don.brace@microchip.com >
Link: https://lore.kernel.org/r/166793531357.322537.8639138137605612362.stgit@brunhilda
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-11-17 18:10:59 +00:00
Kevin Barnett
7c56850637
scsi: smartpqi: Correct max LUN number
...
Correct maximum LUN number for multi-actuator devices.
When multi-actuator support was added to smartpqi, the maximum number of
LUNs supported for multi-actuator devices was supposed to be changed from
unlimited to 256, but the setting was inadvertently left at unlimited.
Reviewed-by: Scott Benesh <scott.benesh@microchip.com >
Reviewed-by: Scott Teel <scott.teel@microchip.com >
Signed-off-by: Kevin Barnett <kevin.barnett@microchip.com >
Signed-off-by: Don Brace <don.brace@microchip.com >
Link: https://lore.kernel.org/r/166793530842.322537.816949081443241857.stgit@brunhilda
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-11-17 18:10:58 +00:00
Mike McGowen
0b93cf2a90
scsi: smartpqi: Add new controller PCI IDs
...
All PCI ID entries in Hex.
Add PCI IDs for ByteDance controllers:
VID / DID / SVID / SDID
---- ---- ---- ----
ByteHBA JGH43024-8 9005 / 028f / 1e93 / 1000
ByteHBA JGH43034-8 9005 / 028f / 1e93 / 1001
ByteHBA JGH44014-8 9005 / 028f / 1e93 / 1002
Add PCI IDs for new Inspur controllers:
VID / DID / SVID / SDID
---- ---- ---- ----
INSPUR RT0800M7E 9005 / 028f / 1bd4 / 0086
INSPUR RT0800M7H 9005 / 028f / 1bd4 / 0087
INSPUR RT0804M7R 9005 / 028f / 1bd4 / 0088
INSPUR RT0808M7R 9005 / 028f / 1bd4 / 0089
Add PCI IDs for new FAB A controllers:
VID / DID / SVID / SDID
---- ---- ---- ----
Adaptec SmartRAID 3254-16e /e 9005 / 028f / 9005 / 1475
Adaptec HBA 1200-16e 9005 / 028f / 9005 / 14c3
Adaptec HBA 1200-8e 9005 / 028f / 9005 / 14c4
Add H3C controller PCI IDs:
VID / DID / SVID / SDID
---- ---- ---- ----
H3C H4508-Mf-8i 9005 / 028f / 193d / 110b
Reviewed-by: Scott Benesh <scott.benesh@microchip.com >
Reviewed-by: Scott Teel <scott.teel@microchip.com >
Signed-off-by: Mike McGowen <mike.mcgowen@microchip.com >
Signed-off-by: Don Brace <don.brace@microchip.com >
Link: https://lore.kernel.org/r/166793530327.322537.6056884426657539311.stgit@brunhilda
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-11-17 18:10:58 +00:00
Don Brace
b27ac2faa2
scsi: smartpqi: Convert to host_tagset
...
Add support for host_tagset.
Also move the reserved command slots to the end of the pool to eliminate an
addition operation for every SCSI request.
This patch was originally authored by Hannes Reinecke here:
Link: https://lore.kernel.org/linux-block/20191126131009.71726-8-hare@suse.de/
But we NAKed this patch because we wanted to fully test multipath
failover operations.
Suggested-by: Hannes Reinecke <hare@suse.de >
Reviewed-by: Scott Benesh <scott.benesh@microchip.com >
Reviewed-by: Scott Teel <scott.teel@microchip.com >
Reviewed-by: Mahesh Rajashekhara <Mahesh.Rajashekhara@microchip.com >
Reviewed-by: Mike McGowen <Mike.McGowen@microchip.com >
Reviewed-by: Kevin Barnett <kevin.barnett@microchip.com >
Signed-off-by: Don Brace <don.brace@microchip.com >
Link: https://lore.kernel.org/r/166793529811.322537.3294617845448383948.stgit@brunhilda
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-11-17 18:10:58 +00:00
Bart Van Assche
a4e1d0b76e
block: Change the return type of blk_mq_map_queues() into void
...
Since blk_mq_map_queues() and the .map_queues() callbacks always return 0,
change their return type into void. Most callers ignore the returned value
anyway.
Cc: Christoph Hellwig <hch@lst.de >
Cc: Jason Wang <jasowang@redhat.com >
Cc: Keith Busch <kbusch@kernel.org >
Cc: Martin K. Petersen <martin.petersen@oracle.com >
Cc: Doug Gilbert <dgilbert@interlog.com >
Cc: Michael S. Tsirkin <mst@redhat.com >
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Reviewed-by: John Garry <john.garry@huawei.com >
Acked-by: Md Haris Iqbal <haris.iqbal@ionos.com >
Reviewed-by: Sagi Grimberg <sagi@grimberg.me >
Link: https://lore.kernel.org/r/20220815170043.19489-3-bvanassche@acm.org
[axboe: fold in fix from Bart]
Signed-off-by: Jens Axboe <axboe@kernel.dk >
2022-08-22 10:07:53 -06:00
Don Brace
f54f85dfd7
scsi: smartpqi: Update version to 2.1.18-045
...
Link: https://lore.kernel.org/r/165730608687.177165.11815510982277242966.stgit@brunhilda
Reviewed-by: Gerry Morong <gerry.morong@microchip.com >
Reviewed-by: Scott Benesh <scott.benesh@microchip.com >
Reviewed-by: Scott Teel <scott.teel@microchip.com >
Reviewed-by: Kevin Barnett <kevin.barnett@microchip.com >
Signed-off-by: Don Brace <don.brace@microchip.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-07-13 23:42:05 -04:00
Don Brace
e4b73b3fa2
scsi: smartpqi: Update copyright to current year
...
Update copyright to current year.
Link: https://lore.kernel.org/r/165730608177.177165.13184715486635363193.stgit@brunhilda
Reviewed-by: Scott Benesh <scott.benesh@microchip.com >
Reviewed-by: Scott Teel <scott.teel@microchip.com >
Reviewed-by: Kevin Barnett <kevin.barnett@microchip.com >
Signed-off-by: Don Brace <don.brace@microchip.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-07-13 23:42:04 -04:00
Kevin Barnett
6d567dfee0
scsi: smartpqi: Add ctrl ready timeout module parameter
...
Allow user to override the default driver timeout for controller ready.
There are some rare configurations which require the driver to wait longer
than the normal 3 minutes for the controller to complete its bootup
sequence and be ready to accept commands from the driver.
The module parameter is:
ctrl_ready_timeout= { 0 | 30-1800 }
and specifies the timeout in seconds for the driver to wait for controller
ready. The valid range is 0 or 30-1800. The default value is 0, which
causes the driver to use a timeout of 180 seconds (3 minutes).
Link: https://lore.kernel.org/r/165730607666.177165.9221211345284471213.stgit@brunhilda
Reviewed-by: Scott Teel <scott.teel@microchip.com >
Reviewed-by: Mike McGowen <mike.mcgowen@microchip.com >
Signed-off-by: Kevin Barnett <kevin.barnett@microchip.com >
Signed-off-by: Don Brace <don.brace@microchip.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-07-13 23:42:04 -04:00
Kevin Barnett
2d80f4054f
scsi: smartpqi: Update deleting a LUN via sysfs
...
Change removing a LUN using sysfs from an internal driver function
pqi_remove_all_scsi_devices() to using the .slave_destroy entry in the
scsi_host_template.
A LUN can be deleted via sysfs using this syntax:
echo 1 > /sys/block/sdX/device/delete
Link: https://lore.kernel.org/r/165730607154.177165.9723066932202995774.stgit@brunhilda
Reviewed-by: Scott Teel <scott.teel@microchip.com >
Reviewed-by: Mike McGowen <mike.mcgowen@microchip.com >
Signed-off-by: Kevin Barnett <kevin.barnett@microchip.com >
Signed-off-by: Don Brace <don.brace@microchip.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-07-13 23:42:04 -04:00
Mike McGowen
cf15c3e734
scsi: smartpqi: Add module param to disable managed ints
...
Allow SMP affinity to be changeable by disabling managed interrupts.
On distributions where the driver is enabled for multi-queue support the
driver utilizes kernel managed interrupts, which automatically distributes
interrupts to all available CPUs and assigns SMP affinity.
On most distributions, the affinity can not be changed by the user.
This change will allow managed interrupts to be disabled by the user via a
module parameter while still allowing multi-queue support to function
properly.
Use the module parameter disable_managed_interrupts=1
Link: https://lore.kernel.org/r/165730606638.177165.12846020942931640329.stgit@brunhilda
Reviewed-by: Scott Benesh <scott.benesh@microchip.com >
Reviewed-by: Scott Teel <scott.teel@microchip.com >
Reviewed-by: Kevin Barnett <kevin.barnett@microchip.com >
Signed-off-by: Mike McGowen <Mike.McGowen@microchip.com >
Signed-off-by: Don Brace <don.brace@microchip.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-07-13 23:42:04 -04:00
Kevin Barnett
6ce3cfb365
scsi: smartpqi: Fix RAID map race condition
...
Correct a rare stale RAID map access when performing AIO during a RAID
configuration change.
A race condition in the driver could cause it to access a stale RAID map
when a logical volume is reconfigured.
Modify the driver logic to invalidate a RAID map very early when a RAID
configuration change is detected and only switch to a new RAID map after
the driver detects that the RAID map has changed.
Link: https://lore.kernel.org/r/165730606128.177165.7671413443814750829.stgit@brunhilda
Reviewed-by: Scott Benesh <scott.benesh@microchip.com >
Reviewed-by: Scott Teel <scott.teel@microchip.com >
Reviewed-by: Mike McGowen <mike.mcgowen@microchip.com >
Signed-off-by: Kevin Barnett <kevin.barnett@microchip.com >
Signed-off-by: Don Brace <don.brace@microchip.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-07-13 23:42:04 -04:00
Mahesh Rajashekhara
69695aeaa6
scsi: smartpqi: Fix DMA direction for RAID requests
...
Correct a SOP READ and WRITE DMA flags for some requests.
This update corrects DMA direction issues with SCSI commands removed from
the controller's internal lookup table.
Currently, SCSI READ BLOCK LIMITS (0x5) was removed from the controller
lookup table and exposed a DMA direction flag issue.
SCSI READ BLOCK LIMITS was recently removed from our controller lookup
table so the controller uses the respective IU flag field to set the DMA
data direction. Since the DMA direction is incorrect the FW never completes
the request causing a hang.
Some SCSI commands which use SCSI READ BLOCK LIMITS
* sg_map
* mt -f /dev/stX status
After updating controller firmware, users may notice their tape units
failing. This patch resolves the issue.
Also, the AIO path DMA direction is correct.
The DMA direction flag is a day-one bug with no reported BZ.
Fixes: 6c223761eb ("smartpqi: initial commit of Microsemi smartpqi driver")
Link: https://lore.kernel.org/r/165730605618.177165.9054223644512926624.stgit@brunhilda
Reviewed-by: Scott Benesh <scott.benesh@microchip.com >
Reviewed-by: Scott Teel <scott.teel@microchip.com >
Reviewed-by: Mike McGowen <mike.mcgowen@microchip.com >
Reviewed-by: Kevin Barnett <kevin.barnett@microchip.com >
Signed-off-by: Mahesh Rajashekhara <Mahesh.Rajashekhara@microchip.com >
Signed-off-by: Don Brace <don.brace@microchip.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-07-13 23:42:04 -04:00
Kevin Barnett
85b41834b0
scsi: smartpqi: Stop logging spurious PQI reset failures
...
Change method used to detect controller firmware crash during PQI reset.
PQI reset can fail with error -6 if firmware takes > 100ms to complete
reset.
Method used by driver to detect controller firmware crash during PQI was
incorrect in some cases.
Link: https://lore.kernel.org/r/165730605108.177165.1132931838384767071.stgit@brunhilda
Reviewed-by: Scott Benesh <scott.benesh@microchip.com >
Reviewed-by: Scott Teel <scott.teel@microchip.com >
Reviewed-by: Mike McGowen <mike.mcgowen@microchip.com >
Signed-off-by: Kevin Barnett <kevin.barnett@microchip.com >
Signed-off-by: Don Brace <don.brace@microchip.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-07-13 23:42:03 -04:00
Mike McGowen
2a9c2ba2bc
scsi: smartpqi: Add PCI IDs for Lenovo controllers
...
Add PCI IDs for Lenovo controllers (values in hex):
VID / DID / SVID / SDID
---- ---- ---- ----
Lenovo 4350-8i HBA 9005 / 028f / 1d49 / 0220
Lenovo 4350-16i HBA 9005 / 028f / 1d49 / 0221
Lenovo 5350-8i RAID 9005 / 028f / 1d49 / 0520
Lenovo 5350-8i Internal RAID 9005 / 028f / 1d49 / 0522
Lenovo 9350-8i RAID 9005 / 028f / 1d49 / 0620
Lenovo 9350-8i Internal RAID 9005 / 028f / 1d49 / 0621
Lenovo 9350-16i RAID 9005 / 028f / 1d49 / 0622
Lenovo 9350-16i Internal RAID 9005 / 028f / 1d49 / 0623
Link: https://lore.kernel.org/r/165730604598.177165.9910276232981721083.stgit@brunhilda
Reviewed-by: Scott Benesh <scott.benesh@microchip.com >
Reviewed-by: Scott Teel <scott.teel@microchip.com >
Reviewed-by: Kevin Barnett <kevin.barnett@microchip.com >
Signed-off-by: Mike McGowen <Mike.McGowen@microchip.com >
Signed-off-by: Don Brace <don.brace@microchip.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-07-13 23:42:03 -04:00
Mike McGowen
44e68c4af5
scsi: smartpqi: Add PCI ID for Adaptec SmartHBA 2100-8i
...
Add the PCI ID for (values in hex):
VID / DID / SVID / SDID
---- ---- ---- ----
Adaptec SmartHBA 2100-8i-o 9005 / 0285 / 9005 / 0659
Link: https://lore.kernel.org/r/165730604089.177165.17257514581321583667.stgit@brunhilda
Reviewed-by: Scott Benesh <scott.benesh@microchip.com >
Reviewed-by: Scott Teel <scott.teel@microchip.com >
Reviewed-by: Kevin Barnett <kevin.barnett@microchip.com >
Signed-off-by: Mike McGowen <Mike.McGowen@microchip.com >
Signed-off-by: Don Brace <don.brace@microchip.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-07-13 23:42:03 -04:00
Sagar Biradar
331f7e998b
scsi: smartpqi: Fix PCI control linkdown system hang
...
Fail all outstanding requests after a PCI linkdown.
Block access to device SCSI attributes during the following conditions:
"Cable pull" is called PQI_CTRL_SURPRISE_REMOVAL.
"PCIe Link Down" is called PQI_CTRL_GRACEFUL_REMOVAL.
Block access to device SCSI attributes during and in rare instances when
the controller goes offline.
Either outstanding requests or the access of SCSI attributes post linkdown
can lead to a hang.
Post linkdown, driver does not fail the outstanding requests leading to
long wait time before all the IOs eventually fail.
Also access of the SCSI attributes by host applications can lead to a
system hang.
Link: https://lore.kernel.org/r/165730603578.177165.4699352086827187263.stgit@brunhilda
Reviewed-by: Scott Benesh <scott.benesh@microchip.com >
Reviewed-by: Scott Teel <scott.teel@microchip.com >
Reviewed-by: Mike McGowen <mike.mcgowen@microchip.com >
Reviewed-by: Kevin Barnett <kevin.barnett@microchip.com >
Signed-off-by: Sagar Biradar <sagar.biradar@microchip.com >
Signed-off-by: Don Brace <don.brace@microchip.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-07-13 23:42:03 -04:00
Kumar Meiyappan
904f2bfda6
scsi: smartpqi: Add driver support for multi-LUN devices
...
Add driver support for up to 256 LUNs per device.
Update AIO path to pass the appropriate LUN number for base-code to target
the correct LUN.
Update RAID IO path to pass the appropriate LUN number for FW to target the
correct LUN.
Pass the correct LUN number while doing a LUN reset.
Count the outstanding commands based on LUN number. While removing a
Multi-LUN device, wait for all outstanding commands to complete for all
LUNs.
Add Feature bit support.
Link: https://lore.kernel.org/r/165730603067.177165.14016422176841798336.stgit@brunhilda
Reviewed-by: Scott Benesh <scott.benesh@microchip.com >
Reviewed-by: Scott Teel <scott.teel@microchip.com >
Reviewed-by: Mike McGowen <mike.mcgowen@microchip.com >
Reviewed-by: Kevin Barnett <kevin.barnett@microchip.com >
Signed-off-by: Kumar Meiyappan <Kumar.Meiyappan@microchip.com >
Signed-off-by: Don Brace <don.brace@microchip.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-07-13 23:42:03 -04:00
Murthy Bhat
dab5378485
scsi: smartpqi: Add PCI IDs for ramaxel controllers
...
Add the following controllers (values in hex):
VID / DID / SVID / SDID
---- / ---- / ---- / ----
Ramaxel FBGF-RAD PM8204 9005 / 028F / 1CC4 / 0101
Ramaxel FBGF-RAD PM8222 9005 / 028F / 1CC4 / 0201
Link: https://lore.kernel.org/r/165730602045.177165.3720208650043407285.stgit@brunhilda
Reviewed-by: Scott Benesh <scott.benesh@microchip.com >
Reviewed-by: Scott Teel <scott.teel@microchip.com >
Reviewed-by: Mike McGowen <mike.mcgowen@microchip.com >
Reviewed-by: Kevin Barnett <kevin.barnett@microchip.com >
Signed-off-by: Murthy Bhat <Murthy.Bhat@microchip.com >
Signed-off-by: Don Brace <don.brace@microchip.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-07-13 23:42:02 -04:00
Gilbert Wu
1d393227fc
scsi: smartpqi: Add controller fw version to console log
...
Print controller firmware version to OS message log during driver
initialization or after OFA.
Link: https://lore.kernel.org/r/165730601536.177165.17698744242908911822.stgit@brunhilda
Reviewed-by: Scott Benesh <scott.benesh@microchip.com >
Reviewed-by: Scott Teel <scott.teel@microchip.com >
Reviewed-by: Mike McGowen <mike.mcgowen@microchip.com >
Reviewed-by: Kevin Barnett <kevin.barnett@microchip.com >
Signed-off-by: Gilbert Wu <Gilbert.Wu@microchip.com >
Signed-off-by: Don Brace <don.brace@microchip.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-07-13 23:42:02 -04:00
Mike McGowen
4e7d26029e
scsi: smartpqi: Shorten drive visibility after removal
...
Check the response code returned from the LUN reset task management
function and if it indicates the LUN is not valid, do not retry.
Reduce rescan worker delay to 5 seconds for the event handler only.
The removal of a drive from the OS could have been delayed up to 30 seconds
after being physically pulled.
The driver was retrying a LUN reset 3 times even though the return code
indiciated the LUN was no longer valid. There was a 10 second delay between
each retry. Additionally, the rescan worker was scheduled to run 10 seconds
after the driver received the event.
Link: https://lore.kernel.org/r/165730601025.177165.9416869335174437006.stgit@brunhilda
Reviewed-by: Scott Teel <scott.teel@microchip.com >
Reviewed-by: Kevin Barnett <kevin.barnett@microchip.com >
Signed-off-by: Mike McGowen <Mike.McGowen@microchip.com >
Signed-off-by: Don Brace <don.brace@microchip.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-07-13 23:42:02 -04:00
Bart Van Assche
c1ea387d99
scsi: smartpqi: Stop using the SCSI pointer
...
Set .cmd_size in the SCSI host template instead of using the SCSI pointer
from struct scsi_cmnd. This patch prepares for removal of the SCSI pointer
from struct scsi_cmnd.
Link: https://lore.kernel.org/r/20220218195117.25689-44-bvanassche@acm.org
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com >
Reviewed-by: Hannes Reinecke <hare@suse.de >
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-02-22 21:11:06 -05:00
Don Brace
31b17c3aeb
scsi: smartpqi: Fix unused variable pqi_pm_ops for clang
...
Driver added a new dev_pm_ops structure used only if CONFIG_PM is set. The
CONFIG_PM MACRO needed to be moved up in the code to avoid the compiler
warnings. The hunk to move the location was missing from the above patch.
Found by kernel test robot by building driver with CONFIG_PM disabled.
Link: https://lore.kernel.org/all/202202090657.bstNLuce-lkp@intel.com/
Link: https://lore.kernel.org/r/20220210201151.236170-1-don.brace@microchip.com
Fixes: c66e078ad8 ("scsi: smartpqi: Fix hibernate and suspend")
Reported-by: kernel test robot <lkp@intel.com >
Reviewed-by: Scott Teel <scott.teel@microchip.com >
Reviewed-by: Scott Benesh <scott.benesh@microchip.com >
Reviewed-by: Mike Mcgowen <mike.mcgowen@microchip.com >
Reviewed-by: Kevin Barnett <kevin.barnett@microchip.com >
Signed-off-by: Don Brace <don.brace@microchip.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-02-11 17:06:12 -05:00
Don Brace
62ed6622aa
scsi: smartpqi: Update version to 2.1.14-035
...
Link: https://lore.kernel.org/r/164375215867.440833.17567317655622946368.stgit@brunhilda.pdev.net
Reviewed-by: Kevin Barnett <kevin.barnett@microchip.com >
Reviewed-by: Scott Benesh <scott.benesh@microchip.com >
Reviewed-by: Scott Teel <scott.teel@microchip.com >
Reviewed-by: Gerry Morong <gerry.morong@microchip.com >
Signed-off-by: Don Brace <don.brace@microchip.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-02-07 23:38:36 -05:00
Kevin Barnett
291c2e0071
scsi: smartpqi: Fix lsscsi -t SAS addresses
...
Correct lsscsi -t output for newer controllers that support 16-byte WWID in
the SAS address field. lsscsi -t was displaying all zeros for SAS
addresses.
When we added support to smartpqi for 16-byte WWIDs in the RPL data for
newer controllers, we were copying the wrong part of the 16-byte WWID to
the SAS address field.
Link: https://lore.kernel.org/r/164375215363.440833.7298523719813806902.stgit@brunhilda.pdev.net
Reviewed-by: Scott Benesh <scott.benesh@microchip.com >
Reviewed-by: Scott Teel <scott.teel@microchip.com >
Reviewed-by: Mike McGowen <mike.mcgowen@microchip.com >
Signed-off-by: Kevin Barnett <kevin.barnett@microchip.com >
Signed-off-by: Don Brace <don.brace@microchip.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-02-07 23:38:36 -05:00
Kevin Barnett
c66e078ad8
scsi: smartpqi: Fix hibernate and suspend
...
Restructure the hibernate/suspend code to allow workarounds for the
controller boot differences.
Newer controllers have subtle differences in the way that they boot up.
Link: https://lore.kernel.org/r/164375214859.440833.14683009064111314948.stgit@brunhilda.pdev.net
Reviewed-by: Mike McGowen <mike.mcgowen@microchip.com >
Reviewed-by: Scott Benesh <scott.benesh@microchip.com >
Reviewed-by: Scott Teel <scott.teel@microchip.com >
Signed-off-by: Kevin Barnett <kevin.barnett@microchip.com >
Signed-off-by: Don Brace <don.brace@microchip.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-02-07 23:38:36 -05:00
Mike McGowen
5e6935864d
scsi: smartpqi: Fix BUILD_BUG_ON() statements
...
Add calls to the functions at the beginning driver initialization.
The BUILD_BUG_ON() statements that are currently in functions named
verify_structures() in the modules smartpqi_init.c and smartpqi_sis.c do
not work as currently implemented.
Link: https://lore.kernel.org/r/164375214355.440833.13129778749209816497.stgit@brunhilda.pdev.net
Reviewed-by: Kevin Barnett <kevin.barnett@microchip.com >
Reviewed-by: Scott Teel <scott.teel@microchip.com >
Reviewed-by: Scott Benesh <scott.benesh@microchip.com >
Signed-off-by: Mike McGowen <Mike.McGowen@microchip.com >
Signed-off-by: Don Brace <don.brace@microchip.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-02-07 23:38:36 -05:00
Mike McGowen
c52efc9238
scsi: smartpqi: Fix NUMA node not updated during init
...
Correct NUMA node association when calling pqi_pci_probe().
In the function pqi_pci_probe(), the driver makes an OS call to get the
NUMA node associated with a controller. If the call returns that there is
no associated node, the driver attempts to set it to node 0. The problem is
that a different local variable (cp_node) was being used to do this, but
the original local variable (node) was still being used in the call to
pqi_alloc_ctrl_info().
The value of "node" is not updated if the conditional after the call to
dev_to_node() evaluates to TRUE.
Link: https://lore.kernel.org/r/164375213850.440833.5243014942807747074.stgit@brunhilda.pdev.net
Reviewed-by: Kevin Barnett <kevin.barnett@microchip.com >
Reviewed-by: Scott Teel <scott.teel@microchip.com >
Signed-off-by: Mike McGowen <Mike.McGowen@microchip.com >
Signed-off-by: Don Brace <don.brace@microchip.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-02-07 23:38:35 -05:00
Kevin Barnett
00598b056a
scsi: smartpqi: Expose SAS address for SATA drives
...
Remove UNIQUE_WWID_IN_REPORT_PHYS_LUN PQI feature.
This feature was originally added to solve a problem with NVMe drives, but
this problem has since been solved a different way, so this PQI feature is
no longer required for any type of drive.
The kernel was not creating symbolic links in sysfs between SATA drives and
their enclosure.
The driver was enabling the UNIQUE_WWID_IN_REPORT_PHYS_LUN PQI feature,
which causes the FW to return a WWID for SATA drives that is derived from a
unique ID read from the SATA drive itself. The driver was exposing this
WWID as the drive's SAS address. However, because this SAS address does not
match the SAS address returned by an enclosure's SES Page 0xA data, the
Linux kernel was not able to match a SATA drive with its enclosure.
Link: https://lore.kernel.org/r/164375213346.440833.12379222470149882747.stgit@brunhilda.pdev.net
Reviewed-by: Mike McGowen <mike.mcgowen@microchip.com >
Reviewed-by: Scott Benesh <scott.benesh@microchip.com >
Reviewed-by: Scott Teel <scott.teel@microchip.com >
Signed-off-by: Kevin Barnett <kevin.barnett@microchip.com >
Signed-off-by: Don Brace <don.brace@microchip.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-02-07 23:38:35 -05:00
Mike McGowen
5d8fbce04d
scsi: smartpqi: Speed up RAID 10 sequential reads
...
Use all data disks for sequential read operations.
Testing discovered inconsistent performance on RAID 10 volumes when
performing 256K sequential reads. The driver was only using a single
tracker to determine which physical drive to send a request to for AIO
requests.
Change the single tracker (next_bypass_group) to an array of trackers based
on the number of data disks in a row of the RAID map.
Link: https://lore.kernel.org/r/164375212842.440833.6733971458765002128.stgit@brunhilda.pdev.net
Reviewed-by: Kevin Barnett <kevin.barnett@microchip.com >
Reviewed-by: Mike McGowen <mike.mcgowen@microchip.com >
Reviewed-by: Scott Benesh <scott.benesh@microchip.com >
Reviewed-by: Scott Teel <scott.teel@microchip.com >
Signed-off-by: Mike McGowen <Mike.McGowen@microchip.com >
Signed-off-by: Don Brace <don.brace@microchip.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-02-07 23:38:35 -05:00