Christoph Hellwig
30efd3823f
scsi: mpi3mr: Switch to using ->device_configure
...
Switch to the ->device_configure method instead of ->slave_configure and
update the block limits on the passed in queue_limits instead of using the
per-limit accessors.
Note that mpi3mr also updates the limits from an event handler that
iterates all SCSI devices. This is also updated to use the queue_limits,
but the complete locking of this path probably means it already is
completely broken and needs a proper audit.
Signed-off-by: Christoph Hellwig <hch@lst.de >
Link: https://lore.kernel.org/r/20240409143748.980206-22-hch@lst.de
Reviewed-by: Damien Le Moal <dlemoal@kernel.org >
Reviewed-by: Hannes Reinecke <hare@suse.de >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2024-04-11 21:43:53 -04:00
Ranjan Kumar
829dce7e12
scsi: mpi3mr: Driver version update to 8.8.1.0.50
...
Update driver version to 8.8.1.0.50.
Signed-off-by: Ranjan Kumar <ranjan.kumar@broadcom.com >
Link: https://lore.kernel.org/r/20240313100746.128951-8-ranjan.kumar@broadcom.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2024-03-25 18:14:33 -04:00
Ranjan Kumar
0a2714b787
scsi: mpi3mr: Debug ability improvements
...
Update driver to include OS type in fault/reset reason code. MPI request
sent through ioctl now automatically dumped on timeout.
Reported-by: kernel test robot <lkp@intel.com >
Closes: https://lore.kernel.org/oe-kbuild-all/202403081903.q3Dq54zZ-lkp@intel.com/
Signed-off-by: Ranjan Kumar <ranjan.kumar@broadcom.com >
Signed-off-by: Sathya Prakash <sathya.prakash@broadcom.com >
Link: https://lore.kernel.org/r/20240313100746.128951-6-ranjan.kumar@broadcom.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2024-03-25 18:14:32 -04:00
Ranjan Kumar
dd896a6b0a
scsi: mpi3mr: Block devices are not removed even when VDs are offlined
...
The driver did not remove the virtual disk that was exposed as hidden and
offline after the controller was reset.
Drive is removed from OS when firmware sends "device added" event with
hidden bit set or access status indicating inability to accept I/Os.
Signed-off-by: Ranjan Kumar <ranjan.kumar@broadcom.com >
Signed-off-by: Sathya Prakash <sathya.prakash@broadcom.com >
Link: https://lore.kernel.org/r/20240313100746.128951-2-ranjan.kumar@broadcom.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2024-03-25 18:14:32 -04:00
Chandrakanth patil
d0a60e3eda
scsi: mpi3mr: Update driver version to 8.5.1.0.0
...
Update driver version to 8.5.1.0.0
Signed-off-by: Chandrakanth patil <chandrakanth.patil@broadcom.com >
Link: https://lore.kernel.org/r/20231205191630.12201-5-chandrakanth.patil@broadcom.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-12-05 21:45:53 -05:00
Chandrakanth patil
9536af615d
scsi: mpi3mr: Support for preallocation of SGL BSG data buffers part-3
...
The driver acquires the required NVMe SGLs from the pre-allocated
pool.
Co-developed-by: Sathya Prakash <sathya.prakash@broadcom.com >
Signed-off-by: Sathya Prakash <sathya.prakash@broadcom.com >
Signed-off-by: Chandrakanth patil <chandrakanth.patil@broadcom.com >
Link: https://lore.kernel.org/r/20231205191630.12201-4-chandrakanth.patil@broadcom.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-12-05 21:45:53 -05:00
Chandrakanth patil
fb231d7def
scsi: mpi3mr: Support for preallocation of SGL BSG data buffers part-2
...
The driver acquires the required SGLs from the pre-allocated pool.
Co-developed-by: Sathya Prakash <sathya.prakash@broadcom.com >
Signed-off-by: Sathya Prakash <sathya.prakash@broadcom.com >
Signed-off-by: Chandrakanth patil <chandrakanth.patil@broadcom.com >
Link: https://lore.kernel.org/r/20231205191630.12201-3-chandrakanth.patil@broadcom.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-12-05 21:45:53 -05:00
Chandrakanth patil
c432e16752
scsi: mpi3mr: Support for preallocation of SGL BSG data buffers part-1
...
The driver now supports SGLs for BSG data transfer. Upon loading, the
driver pre-allocates SGLs in chunks of 8k, results in a total of 256 * 8k,
equal to 2MB. These pre-allocated SGLs are reserved for handling BSG
commands and are deallocated during driver unload.
Co-developed-by: Sathya Prakash <sathya.prakash@broadcom.com >
Signed-off-by: Sathya Prakash <sathya.prakash@broadcom.com >
Signed-off-by: Chandrakanth patil <chandrakanth.patil@broadcom.com >
Link: https://lore.kernel.org/r/20231205191630.12201-2-chandrakanth.patil@broadcom.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-12-05 21:45:53 -05:00
Sumit Saxena
b4d94164ff
scsi: mpi3mr: driver version upgrade to 8.5.0.0.50
...
Update driver version to 8.5.0.0.50.
Signed-off-by: Sumit Saxena <sumit.saxena@broadcom.com >
Link: https://lore.kernel.org/r/20231123160132.4155-6-sumit.saxena@broadcom.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-11-24 20:53:05 -05:00
Sumit Saxena
cb5b608946
scsi: mpi3mr: Increase maximum number of PHYs to 64 from 32
...
SAS5116 controllers supports maximum 48 physical PHYs. Modify driver to
accommodate up to 64 PHYs (though current need is to support 48 PHYs).
Signed-off-by: Sumit Saxena <sumit.saxena@broadcom.com >
Link: https://lore.kernel.org/r/20231123160132.4155-4-sumit.saxena@broadcom.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-11-24 20:53:05 -05: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
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
Christophe JAILLET
144679dfb5
scsi: mpi3mr: Fix the type used for pointers to bitmap
...
Bitmaps are "unsigned long[]", so better use "unsigned long *" instead of a
plain "void *" when dealing with pointers to bitmaps.
This is more informative.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr >
Link: https://lore.kernel.org/r/8bdf9148ce1a5d01aac11c46c8617b477813457e.1683473011.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-05-22 17:40:11 -04:00
Martin K. Petersen
f467b865cf
Merge branch '6.3/scsi-fixes' into 6.4/scsi-staging
...
Pull in the fixes branch to resolve an mpi3mr conflict reported by
sfr.
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-03-31 21:45:14 -04:00
Ranjan Kumar
1ea41edd88
scsi: mpi3mr: Update driver version to 8.4.1.0.0
...
Update driver version to 8.4.1.0.0.
Signed-off-by: Ranjan Kumar <ranjan.kumar@broadcom.com >
Signed-off-by: Sreekanth Reddy <sreekanth.reddy@broadcom.com >
Link: https://lore.kernel.org/r/20230316110209.60145-9-ranjan.kumar@broadcom.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-03-16 23:54:29 -04:00
Ranjan Kumar
e74f2fbd8b
scsi: mpi3mr: Update copyright year
...
Update copyright year from 2022 to 2023.
Signed-off-by: Ranjan Kumar <ranjan.kumar@broadcom.com >
Signed-off-by: Sreekanth Reddy <sreekanth.reddy@broadcom.com >
Link: https://lore.kernel.org/r/20230316110209.60145-8-ranjan.kumar@broadcom.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-03-16 23:54:29 -04:00
Ranjan Kumar
22beef38e5
scsi: mpi3mr: Modify MUR timeout value to 120 seconds
...
Modify Message Unit Reset timeout value to 120 seconds from the previous
value of 30 seconds.
Signed-off-by: Ranjan Kumar <ranjan.kumar@broadcom.com >
Signed-off-by: Sreekant Reddy <sreekanth.reddy@broadcom.com >
Link: https://lore.kernel.org/r/20230316110209.60145-4-ranjan.kumar@broadcom.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-03-16 23:54:28 -04:00
Ranjan Kumar
3f1254ed01
scsi: mpi3mr: Successive VD delete and add causes FW fault
...
Upon Virtual disk removal, firmware sends device status change event
(Virtual disk remove event) and expects the driver to start device remove
handshake (by sending target reset and IOU control command to firmware).
However, the driver does not initiate the device remove handshake which
leads to the firmware fault.
Signed-off-by: Ranjan Kumar <ranjan.kumar@broadcom.com >
Signed-off-by: Sreekanth Reddy <sreekanth.reddy@broadcom.com >
Link: https://lore.kernel.org/r/20230316110209.60145-2-ranjan.kumar@broadcom.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-03-16 23:54:28 -04:00
Tomas Henzl
ce756daa36
scsi: mpi3mr: Fix expander node leak in mpi3mr_remove()
...
Add a missing resource clean up in .remove.
Fixes: e22bae3066 ("scsi: mpi3mr: Add expander devices to STL")
Signed-off-by: Tomas Henzl <thenzl@redhat.com >
Link: https://lore.kernel.org/r/20230302234336.25456-7-thenzl@redhat.com
Acked-by: Sathya Prakash Veerichetty <sathya.prakash@broadcom.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-03-07 21:17:23 -05:00
Ranjan Kumar
02ca7da291
scsi: mpi3mr: ioctl timeout when disabling/enabling interrupt
...
As part of Task Management handling, the driver will disable and enable the
MSIx index zero which belongs to the Admin reply queue. During this
transition the driver loses some interrupts and this leads to Admin request
and ioctl timeouts.
After enabling the interrupts, poll the Admin reply queue to avoid
timeouts.
Signed-off-by: Ranjan Kumar <ranjan.kumar@broadcom.com >
Signed-off-by: Sreekanth Reddy <sreekanth.reddy@broadcom.com >
Link: https://lore.kernel.org/r/20230228140835.4075-2-ranjan.kumar@broadcom.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-03-06 18:33:12 -05:00
Jesper Juhl
66b381d874
scsi: mpi3mr: Remove unneeded version.h include
...
Remove unneeded version.h include pointed out by 'make versioncheck'.
Link: https://lore.kernel.org/r/820137c2-decc-3d78-f170-7f1c0571fbb7@gmail.com
Signed-off-by: Jesper Juhl <jesperjuhl76@gmail.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-02-21 22:00:51 -05:00
Shin'ichiro Kawasaki
339e61565f
scsi: mpi3mr: Use number of bits to manage bitmap sizes
...
To allocate bitmaps, the mpi3mr driver calculates sizes of bitmaps using
byte as unit. However, bitmap helper functions assume that bitmaps are
allocated using unsigned long as unit. This gap causes memory access beyond
the bitmap sizes and results in "BUG: KASAN: slab-out-of-bounds". The BUG
was observed at firmware download to eHBA-9600. Call trace indicated that
the out-of-bounds access happened in find_first_zero_bit() called from
mpi3mr_send_event_ack() for miroc->evtack_cmds_bitmap.
To fix the BUG, do not use bytes to manage bitmap sizes. Instead, use
number of bits, and call bitmap helper functions which take number of bits
as arguments. For memory allocation, call bitmap_zalloc() instead of
kzalloc() and krealloc(). For memory free, call bitmap_free() instead of
kfree(). For zero clear, call bitmap_clear() instead of memset().
Remove three fields for bitmap byte sizes in struct scmd_priv which are no
longer required. Replace the field dev_handle_bitmap_sz with
dev_handle_bitmap_bits to keep number of bits of removepend_bitmap across
resize.
Link: https://lore.kernel.org/r/20230214005019.1897251-4-shinichiro.kawasaki@wdc.com
Fixes: c5758fc72b ("scsi: mpi3mr: Gracefully handle online FW update operation")
Fixes: e844adb1fb ("scsi: mpi3mr: Implement SCSI error handler hooks")
Fixes: c1af985d27 ("scsi: mpi3mr: Add Event acknowledgment logic")
Fixes: 824a156633 ("scsi: mpi3mr: Base driver code")
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com >
Acked-by: Sathya Prakash Veerichetty <sathya.prakash@broadcom.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2023-02-21 22:00:50 -05:00
Sreekanth Reddy
f616efbee9
scsi: mpi3mr: Update driver version to 8.2.0.3.0
...
Update driver version to 8.2.0.3.0.
Link: https://lore.kernel.org/r/20220912135742.11764-10-sreekanth.reddy@broadcom.com
Signed-off-by: Sreekanth Reddy <sreekanth.reddy@broadcom.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-09-25 13:49:52 -04:00
Sreekanth Reddy
2e31be8697
scsi: mpi3mr: Fix scheduling while atomic type bug
...
Fix 'scheduling while atomic' type bug, which is observed when
pci_irq_vector() is called from interrupt context.
Link: https://lore.kernel.org/r/20220912135742.11764-9-sreekanth.reddy@broadcom.com
Signed-off-by: Sreekanth Reddy <sreekanth.reddy@broadcom.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-09-25 13:49:52 -04:00
Sreekanth Reddy
f84e8b5bb5
scsi: mpi3mr: Scan the devices during resume time
...
Scan the target devices during system resume time and add or remove the
target device with the SML if the corresponding target device is newly
added or removed respectively.
Link: https://lore.kernel.org/r/20220912135742.11764-8-sreekanth.reddy@broadcom.com
Signed-off-by: Sreekanth Reddy <sreekanth.reddy@broadcom.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-09-25 13:49:52 -04:00
Sreekanth Reddy
130fc180a4
scsi: mpi3mr: Free enclosure objects during driver unload
...
Free the enclosure device objects during driver unload and before
rescanning the target devices during controller reset.
Link: https://lore.kernel.org/r/20220912135742.11764-7-sreekanth.reddy@broadcom.com
Signed-off-by: Sreekanth Reddy <sreekanth.reddy@broadcom.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-09-25 13:49:52 -04:00
Sreekanth Reddy
f2a79d2030
scsi: mpi3mr: Graceful handling of surprise removal of PCIe HBA
...
Implement graceful handling of surprise or orderly removal of PCIe HBA:
- Detect a hot removal of the controller at certain critical places in the
driver. Early detection will help to reduce the time taken for cleaning
up the hot-removed controller at the driver level.
- Poll the status of the port enable issued after reset once every 5
seconds to avoid a long delay in detecting unavailable controller.
Link: https://lore.kernel.org/r/20220912135742.11764-5-sreekanth.reddy@broadcom.com
Reported-by: kernel test robot <lkp@intel.com >
Signed-off-by: Sreekanth Reddy <sreekanth.reddy@broadcom.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-09-25 13:49:52 -04:00
Sreekanth Reddy
2745ce0e6d
scsi: mpi3mr: Refresh SAS ports during soft reset
...
Update the host's SAS ports if there is change in port id or phys. If the
port id is changed, then the driver updates it. If some phys are
enabled/disabled during reset, then driver updates them in STL.
Check for the responding expander devices and update the device handle if
it got changed. Register the expander with STL if it got added during reset
and unregister the expander device if it got removed during reset.
[mkp: include fix for zeroday warning]
Link: https://lore.kernel.org/r/20220804131226.16653-15-sreekanth.reddy@broadcom.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Sreekanth Reddy <sreekanth.reddy@broadcom.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-08-31 23:39:39 -04:00
Sreekanth Reddy
176d4aa69c
scsi: mpi3mr: Support SAS transport class callbacks
...
Add support for the following SAS transport class callbacks:
- get_linkerrors
- get_enclosure_identifier
- get_bay_identifier
- phy_reset
- phy_enable
- set_phy_speed
- smp_handler
Link: https://lore.kernel.org/r/20220804131226.16653-14-sreekanth.reddy@broadcom.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Sreekanth Reddy <sreekanth.reddy@broadcom.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-08-22 23:34:06 -04:00
Sreekanth Reddy
2bd37e2849
scsi: mpi3mr: Add framework to issue MPT transport cmds
...
Add framework to issue MPT transport commands to controllers. Also issue
the MPT transport commands to get the manufacturing info of SAS expander
device.
Link: https://lore.kernel.org/r/20220804131226.16653-13-sreekanth.reddy@broadcom.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Sreekanth Reddy <sreekanth.reddy@broadcom.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-08-22 23:34:06 -04:00
Sreekanth Reddy
7f56c79196
scsi: mpi3mr: Add SAS SATA end devices to STL
...
Register/unregister the SAS, SATA devices to SCSI Transport Layer(STL)
whenever the corresponding device is added/removed from topology.
Link: https://lore.kernel.org/r/20220804131226.16653-12-sreekanth.reddy@broadcom.com
Reported-by: kernel test robot <lkp@intel.com >
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Sreekanth Reddy <sreekanth.reddy@broadcom.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-08-22 23:34:06 -04:00
Sreekanth Reddy
626665e9c3
scsi: mpi3mr: Get target object based on rphy
...
When device is registered with the STL then get the corresponding device's
target object using the rphy in below callback functions:
- mpi3mr_target_alloc()
- mpi3mr_slave_alloc()
- mpi3mr_slave_configure()
- mpi3mr_slave_destroy()
Link: https://lore.kernel.org/r/20220804131226.16653-11-sreekanth.reddy@broadcom.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Sreekanth Reddy <sreekanth.reddy@broadcom.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-08-22 23:34:06 -04:00
Sreekanth Reddy
e22bae3066
scsi: mpi3mr: Add expander devices to STL
...
Register/unregister the expander devices to SCSI Transport Layer(STL)
whenever the corresponding expander is added/removed from topology.
Link: https://lore.kernel.org/r/20220804131226.16653-10-sreekanth.reddy@broadcom.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Sreekanth Reddy <sreekanth.reddy@broadcom.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-08-22 23:34:05 -04:00
Sreekanth Reddy
c4723e68a0
scsi: mpi3mr: Enable STL on HBAs where multipath is disabled
...
Register the SAS, SATA devices to SCSI Transport Layer (STL) only if
multipath capability is disabled in the controller's firmware.
Link: https://lore.kernel.org/r/20220804131226.16653-9-sreekanth.reddy@broadcom.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Sreekanth Reddy <sreekanth.reddy@broadcom.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-08-22 23:34:05 -04:00
Sreekanth Reddy
42fc9fee11
scsi: mpi3mr: Add helper functions to manage device's port
...
Add the following helper functions:
- Update the host phys with STL
- Remove the device's SAS port with STL
Link: https://lore.kernel.org/r/20220804131226.16653-8-sreekanth.reddy@broadcom.com
Reviewed-by: Himanshu Madhani <himanshu.madani@oracle.com >
Signed-off-by: Sreekanth Reddy <sreekanth.reddy@broadcom.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-08-22 23:34:05 -04:00
Sreekanth Reddy
125ad1e6b4
scsi: mpi3mr: Add helper functions to retrieve device objects
...
Add the following helper functions:
- Get the device's sas address by reading corresponding device's Device
page0
- Get the expander object from expander list based on expander's handle
- Get the target device object from target device list based on device's
sas address
- Get the expander device object from expander list based on expanders's
sas address
- Get hba port object from hba port table list based on port's port id
Link: https://lore.kernel.org/r/20220804131226.16653-7-sreekanth.reddy@broadcom.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Sreekanth Reddy <sreekanth.reddy@broadcom.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-08-22 23:34:05 -04:00
Sreekanth Reddy
fc7212fd31
scsi: mpi3mr: Add framework to add phys to STL
...
Add framework to register and unregister the host and expander phys with
SCSI Transport Layer (STL).
Link: https://lore.kernel.org/r/20220804131226.16653-6-sreekanth.reddy@broadcom.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Sreekanth Reddy <sreekanth.reddy@broadcom.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-08-22 23:34:05 -04:00
Sreekanth Reddy
7188c03ff8
scsi: mpi3mr: Enable Enclosure device add event
...
Enable and process the Enclosure device add event.
Link: https://lore.kernel.org/r/20220804131226.16653-5-sreekanth.reddy@broadcom.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Sreekanth Reddy <sreekanth.reddy@broadcom.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-08-22 23:34:05 -04:00
Sreekanth Reddy
64a8d9315b
scsi: mpi3mr: Add helper functions to retrieve config pages
...
Add helper functions to retrieve below controller's config pages:
- SAS IOUnit Page0
- SAS IOUnit Page1
- Driver Page1
- Device Page0
- SAS Phy Page0
- SAS Phy Page1
- SAS Expander Page0
- SAS Expander Page1
- Enclosure Page0
Also add the helper function to set SAS IOUnit Page1.
Link: https://lore.kernel.org/r/20220804131226.16653-4-sreekanth.reddy@broadcom.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Sreekanth Reddy <sreekanth.reddy@broadcom.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-08-22 23:34:05 -04:00
Sreekanth Reddy
32d457d5a2
scsi: mpi3mr: Add framework to issue config requests
...
Add framework to issue config requests commands to controller firmware.
Link: https://lore.kernel.org/r/20220804131226.16653-3-sreekanth.reddy@broadcom.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Sreekanth Reddy <sreekanth.reddy@broadcom.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-08-22 23:34:04 -04:00
Sreekanth Reddy
cf1ce8b715
scsi: mpi3mr: Reduce VD queue depth on detecting throttling
...
Reduce the VD queue depth on detecting the throttling condition.
[mkp: incorporate fix for pointer cast issue reported by the test
robot and Guenter Roeck]
Link: https://lore.kernel.org/r/20220708195020.8323-3-sreekanth.reddy@broadcom.com
Signed-off-by: Sreekanth Reddy <sreekanth.reddy@broadcom.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-07-18 23:03:28 -04:00
Sreekanth Reddy
f10af05732
scsi: mpi3mr: Resource Based Metering
...
Update driver to track cumulative pending large data size at the controller
level and at the throttle group level. When one of the values meet or
exceed the controller's firmware-determined high threshold value, then the
driver will divert future selective I/O to the firmware. Once both
controller level and at the throttle group level cumulative pending large
data size reach controller's firmware determined low threshold value, then
the driver will stop diverting I/Os to the firmware.
Link: https://lore.kernel.org/r/20220708195020.8323-2-sreekanth.reddy@broadcom.com
Signed-off-by: Sreekanth Reddy <sreekanth.reddy@broadcom.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-07-18 23:03:28 -04:00
Sreekanth Reddy
d29ea7b716
scsi: mpi3mr: Increase cmd_per_lun to 128
...
Increase cmd_per_lun to 128.
Link: https://lore.kernel.org/r/20220628074848.5036-3-sreekanth.reddy@broadcom.com
Signed-off-by: Sreekanth Reddy <sreekanth.reddy@broadcom.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-07-07 16:46:11 -04:00
Sumit Saxena
4094981db7
scsi: mpi3mr: Rework mrioc->bsg_device model to fix warnings
...
During driver unload, mrioc->bsg_device reference count becomes
negative. Also, as reported in [1], the driver's bsg_device model had few
more bugs. Fix all these up.
[1] https://marc.info/?l=linux-scsi&m=165183971411991&w=2
Link: https://lore.kernel.org/r/20220526170157.58274-1-sumit.saxena@broadcom.com
Fixes: 4268fa7513 ("scsi: mpi3mr: Add bsg device support")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com >
Tested-by: Tomas Henzl <thenzl@redhat.com >
Signed-off-by: Sumit Saxena <sumit.saxena@broadcom.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-06-01 22:23:09 -04:00
Sreekanth Reddy
9feb5c4c3f
scsi: mpi3mr: Add target device related sysfs attributes
...
Add sysfs attributes for exposing target device details such as SAS
address, firmware device handle, and persistent ID for the
controller-attached devices and RAID volumes.
Link: https://lore.kernel.org/r/20220517115310.13062-3-sreekanth.reddy@broadcom.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Sreekanth Reddy <sreekanth.reddy@broadcom.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-05-19 20:16:26 -04:00
Sreekanth Reddy
1aa529d400
scsi: mpi3mr: Increase I/O timeout value to 60s
...
Set each SCSI device's default I/O timeout and default error handling I/O
timeout to 60s.
Link: https://lore.kernel.org/r/20220505184808.24049-3-sreekanth.reddy@broadcom.com
Signed-off-by: Sreekanth Reddy <sreekanth.reddy@broadcom.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-05-10 22:14:34 -04:00
Sumit Saxena
f304d35e59
scsi: mpi3mr: Update driver version to 8.0.0.69.0
...
Link: https://lore.kernel.org/r/20220429211641.642010-9-sumit.saxena@broadcom.com
Signed-off-by: Sumit Saxena <sumit.saxena@broadcom.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-05-02 17:02:42 -04:00
Sumit Saxena
7dbd0dd8cd
scsi: mpi3mr: Add support for NVMe passthrough
...
Add support for management applications to send an MPI3 Encapsulated NVMe
passthru command to the NVMe devices attached to an Avenger controller.
Since the NVMe drives are exposed as SCSI devices by the controller, the
standard NVMe applications cannot be used to interact with the drives and
the command sets supported are also limited by the controller firmware.
Special handling is required for MPI3 Encapsulated NVMe passthru commands
for PRP/SGL setup in the commands.
Link: https://lore.kernel.org/r/20220429211641.642010-8-sumit.saxena@broadcom.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Sumit Saxena <sumit.saxena@broadcom.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-05-02 17:02:42 -04:00
Sumit Saxena
986d6bad21
scsi: mpi3mr: Expose adapter state to sysfs
...
Link: https://lore.kernel.org/r/20220429211641.642010-7-sumit.saxena@broadcom.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com >
Signed-off-by: Sumit Saxena <sumit.saxena@broadcom.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2022-05-02 17:02:42 -04:00