aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/mpi3mr/mpi3mr.h
Commit message (Collapse)AuthorAgeFilesLines
...
* scsi: mpi3mr: Update driver version to 8.2.0.3.0Sreekanth Reddy2022-09-251-2/+2
| | | | | | | | Update driver version to 8.2.0.3.0. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sreekanth Reddy <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
* scsi: mpi3mr: Fix scheduling while atomic type bugSreekanth Reddy2022-09-251-0/+2
| | | | | | | | | Fix 'scheduling while atomic' type bug, which is observed when pci_irq_vector() is called from interrupt context. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sreekanth Reddy <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
* scsi: mpi3mr: Scan the devices during resume timeSreekanth Reddy2022-09-251-0/+2
| | | | | | | | | | 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/[email protected] Signed-off-by: Sreekanth Reddy <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
* scsi: mpi3mr: Free enclosure objects during driver unloadSreekanth Reddy2022-09-251-0/+1
| | | | | | | | | Free the enclosure device objects during driver unload and before rescanning the target devices during controller reset. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sreekanth Reddy <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
* scsi: mpi3mr: Graceful handling of surprise removal of PCIe HBASreekanth Reddy2022-09-251-0/+3
| | | | | | | | | | | | | | | | 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/[email protected] Reported-by: kernel test robot <[email protected]> Signed-off-by: Sreekanth Reddy <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
* scsi: mpi3mr: Refresh SAS ports during soft resetSreekanth Reddy2022-09-011-0/+11
| | | | | | | | | | | | | | | | | 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/[email protected] Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Sreekanth Reddy <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
* scsi: mpi3mr: Support SAS transport class callbacksSreekanth Reddy2022-08-231-0/+3
| | | | | | | | | | | | | | | | | 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/[email protected] Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Sreekanth Reddy <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
* scsi: mpi3mr: Add framework to issue MPT transport cmdsSreekanth Reddy2022-08-231-1/+5
| | | | | | | | | | | 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/[email protected] Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Sreekanth Reddy <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
* scsi: mpi3mr: Add SAS SATA end devices to STLSreekanth Reddy2022-08-231-0/+10
| | | | | | | | | | | 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/[email protected] Reported-by: kernel test robot <[email protected]> Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Sreekanth Reddy <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
* scsi: mpi3mr: Get target object based on rphySreekanth Reddy2022-08-231-0/+4
| | | | | | | | | | | | | | | | | | 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/[email protected] Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Sreekanth Reddy <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
* scsi: mpi3mr: Add expander devices to STLSreekanth Reddy2022-08-231-0/+7
| | | | | | | | | | 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/[email protected] Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Sreekanth Reddy <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
* scsi: mpi3mr: Enable STL on HBAs where multipath is disabledSreekanth Reddy2022-08-231-0/+6
| | | | | | | | | | 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/[email protected] Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Sreekanth Reddy <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
* scsi: mpi3mr: Add helper functions to manage device's portSreekanth Reddy2022-08-231-0/+13
| | | | | | | | | | | | | 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/[email protected] Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Sreekanth Reddy <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
* scsi: mpi3mr: Add helper functions to retrieve device objectsSreekanth Reddy2022-08-231-0/+14
| | | | | | | | | | | | | | | | | | | | | | 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/[email protected] Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Sreekanth Reddy <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
* scsi: mpi3mr: Add framework to add phys to STLSreekanth Reddy2022-08-231-0/+93
| | | | | | | | | | Add framework to register and unregister the host and expander phys with SCSI Transport Layer (STL). Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Sreekanth Reddy <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
* scsi: mpi3mr: Enable Enclosure device add eventSreekanth Reddy2022-08-231-0/+19
| | | | | | | | | Enable and process the Enclosure device add event. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Sreekanth Reddy <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
* scsi: mpi3mr: Add helper functions to retrieve config pagesSreekanth Reddy2022-08-231-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/[email protected] Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Sreekanth Reddy <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
* scsi: mpi3mr: Add framework to issue config requestsSreekanth Reddy2022-08-231-0/+28
| | | | | | | | | Add framework to issue config requests commands to controller firmware. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Sreekanth Reddy <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
* scsi: mpi3mr: Reduce VD queue depth on detecting throttlingSreekanth Reddy2022-07-191-0/+10
| | | | | | | | | | | 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/[email protected] Signed-off-by: Sreekanth Reddy <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
* scsi: mpi3mr: Resource Based MeteringSreekanth Reddy2022-07-191-3/+58
| | | | | | | | | | | | | | 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/[email protected] Signed-off-by: Sreekanth Reddy <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
* scsi: mpi3mr: Increase cmd_per_lun to 128Sreekanth Reddy2022-07-071-1/+1
| | | | | | | | Increase cmd_per_lun to 128. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sreekanth Reddy <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
* scsi: mpi3mr: Rework mrioc->bsg_device model to fix warningsSumit Saxena2022-06-021-1/+1
| | | | | | | | | | | | | | | 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/[email protected] Fixes: 4268fa751365 ("scsi: mpi3mr: Add bsg device support") Reported-by: Dan Carpenter <[email protected]> Tested-by: Tomas Henzl <[email protected]> Signed-off-by: Sumit Saxena <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
* scsi: mpi3mr: Add target device related sysfs attributesSreekanth Reddy2022-05-201-0/+1
| | | | | | | | | | | 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/[email protected] Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Sreekanth Reddy <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
* scsi: mpi3mr: Increase I/O timeout value to 60sSreekanth Reddy2022-05-111-0/+3
| | | | | | | | | Set each SCSI device's default I/O timeout and default error handling I/O timeout to 60s. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sreekanth Reddy <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
* scsi: mpi3mr: Update driver version to 8.0.0.69.0Sumit Saxena2022-05-021-2/+2
| | | | | | Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sumit Saxena <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
* scsi: mpi3mr: Add support for NVMe passthroughSumit Saxena2022-05-021-0/+25
| | | | | | | | | | | | | | | 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/[email protected] Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Sumit Saxena <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
* scsi: mpi3mr: Expose adapter state to sysfsSumit Saxena2022-05-021-1/+1
| | | | | | | Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Sumit Saxena <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
* scsi: mpi3mr: Add support for PEL commandsSumit Saxena2022-05-021-1/+35
| | | | | | | | | | | | | Implement driver support for management applications to enable persistent event log (PEL) notifications. Upon receipt of events, the driver will increment a sysfs variable named event_counter. The management application will poll for event_counter value changes and signal the application about events. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Sumit Saxena <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
* scsi: mpi3mr: Add support for MPT commandsSumit Saxena2022-05-021-0/+29
| | | | | | | | | | There are certain management commands which require firmware intervention. These commands are termed MPT commands. Add support for them. Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Sumit Saxena <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
* scsi: mpi3mr: Move data structures/definitions from MPI headers to uapi headerSumit Saxena2022-05-021-0/+1
| | | | | | | | | | | This patch moves the data structures/definitions which are used by userspace applications from MPI headers to uapi/scsi/scsi_bsg_mpi3mr.h Link: https://lore.kernel.org/r/[email protected] Reported by: Stephen Rothwell <[email protected]> Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Sumit Saxena <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
* scsi: mpi3mr: Add support for driver commandsSumit Saxena2022-05-021-3/+13
| | | | | | | | | | | | | There are certain bsg commands which need to be completed by the driver without involving firmware. These requests are termed driver commands. Add support for these. Link: https://lore.kernel.org/r/[email protected] Reported by: Stephen Rothwell <[email protected]> Reported-by: kernel test robot <[email protected]> Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Sumit Saxena <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
* scsi: mpi3mr: Add bsg device supportSumit Saxena2022-05-021-0/+20
| | | | | | | | | | | | | | Create bsg device per controller for controller management purposes. bsg device nodes will be named /dev/bsg/mpi3mrctl0, /dev/bsg/mpi3mrctl1, etc. Link: https://lore.kernel.org/r/[email protected] Reported-by: kernel test robot <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Reviewed-by: Himanshu Madhani <[email protected]> Signed-off-by: Sumit Saxena <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
* Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsiLinus Torvalds2022-03-251-3/+7
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull SCSI updates from James Bottomley: "This series consists of the usual driver updates (qla2xxx, pm8001, libsas, smartpqi, scsi_debug, lpfc, iscsi, mpi3mr) plus minor updates and bug fixes. The high blast radius core update is the removal of write same, which affects block and several non-SCSI devices. The other big change, which is more local, is the removal of the SCSI pointer" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (281 commits) scsi: scsi_ioctl: Drop needless assignment in sg_io() scsi: bsg: Drop needless assignment in scsi_bsg_sg_io_fn() scsi: lpfc: Copyright updates for 14.2.0.0 patches scsi: lpfc: Update lpfc version to 14.2.0.0 scsi: lpfc: SLI path split: Refactor BSG paths scsi: lpfc: SLI path split: Refactor Abort paths scsi: lpfc: SLI path split: Refactor SCSI paths scsi: lpfc: SLI path split: Refactor CT paths scsi: lpfc: SLI path split: Refactor misc ELS paths scsi: lpfc: SLI path split: Refactor VMID paths scsi: lpfc: SLI path split: Refactor FDISC paths scsi: lpfc: SLI path split: Refactor LS_RJT paths scsi: lpfc: SLI path split: Refactor LS_ACC paths scsi: lpfc: SLI path split: Refactor the RSCN/SCR/RDF/EDC/FARPR paths scsi: lpfc: SLI path split: Refactor PLOGI/PRLI/ADISC/LOGO paths scsi: lpfc: SLI path split: Refactor base ELS paths and the FLOGI path scsi: lpfc: SLI path split: Introduce lpfc_prep_wqe scsi: lpfc: SLI path split: Refactor fast and slow paths to native SLI4 scsi: lpfc: SLI path split: Refactor lpfc_iocbq scsi: lpfc: Use kcalloc() ...
| * scsi: mpi3mr: Bump driver version to 8.0.0.68.0Sreekanth Reddy2022-02-111-2/+2
| | | | | | | | | | | | | | | | Bump mpi3mr driver version to 8.0.0.68.0. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sreekanth Reddy <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
| * scsi: mpi3mr: Update the copyright yearSreekanth Reddy2022-02-111-1/+1
| | | | | | | | | | | | | | | | Update the copyright year to 2017-2022. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sreekanth Reddy <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
| * scsi: mpi3mr: Fix deadlock while canceling the fw eventSreekanth Reddy2022-02-111-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During controller reset, the driver tries to flush all the pending firmware event works from worker queue that are queued prior to the reset. However, if any work is waiting for device addition/removal operation to be completed at the SML, then a deadlock is observed. This is due to the controller reset waiting for the device addition/removal to be completed and the device/addition removal is waiting for the controller reset to be completed. To limit this deadlock, continue with the controller reset handling without canceling the work which is waiting for device addition/removal operation to complete at SML. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sreekanth Reddy <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
* | treewide: Replace zero-length arrays with flexible-array membersGustavo A. R. Silva2022-02-171-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is a regular need in the kernel to provide a way to declare having a dynamically sized set of trailing elements in a structure. Kernel code should always use “flexible array members”[1] for these cases. The older style of one-element or zero-length arrays should no longer be used[2]. This code was transformed with the help of Coccinelle: (next-20220214$ spatch --jobs $(getconf _NPROCESSORS_ONLN) --sp-file script.cocci --include-headers --dir . > output.patch) @@ identifier S, member, array; type T1, T2; @@ struct S { ... T1 member; T2 array[ - 0 ]; }; UAPI and wireless changes were intentionally excluded from this patch and will be sent out separately. [1] https://en.wikipedia.org/wiki/Flexible_array_member [2] https://www.kernel.org/doc/html/v5.16/process/deprecated.html#zero-length-and-one-element-arrays Link: https://github.com/KSPP/linux/issues/78 Reviewed-by: Kees Cook <[email protected]> Signed-off-by: Gustavo A. R. Silva <[email protected]>
* scsi: mpi3mr: Bump driver version to 8.0.0.61.0Sreekanth Reddy2021-12-231-2/+2
| | | | | | | | Update the driver version to newer version format i.e. 8.0.0.61.0. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sreekanth Reddy <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
* scsi: mpi3mr: Fixes around reply request queuesSreekanth Reddy2021-12-231-1/+2
| | | | | | | | | | | Set reply queue depth of 1K for B0 and 4K for A0. While freeing the segmented request queues use the actual queue depth that is used while creating them. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sreekanth Reddy <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
* scsi: mpi3mr: Enhanced Task Management Support Reply handlingSreekanth Reddy2021-12-231-0/+6
| | | | | | | | | | | | Enhance driver to consider MPI3_IOCSTATUS_SCSI_IOC_TERMINATED as a success for TMs issued by it and check the pending I/Os to decide the success or failure of the task management requests instead of just considering the MPI3_IOCSTATUS_SCSI_IOC_TERMINATED as a failure of the task management request. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sreekanth Reddy <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
* scsi: mpi3mr: Use TM response codes from MPI3 headersSreekanth Reddy2021-12-231-7/+0
| | | | | | | | Remove locally defined TM response codes and use codes from MPI3 headers. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sreekanth Reddy <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
* scsi: mpi3mr: Add io_uring interface support in I/O-polled modeSreekanth Reddy2021-12-231-0/+18
| | | | | | | | | | | | | | | | | | | | | Add support for the io_uring interface in I/O-polled mode. This feature is disabled in the driver by default. To enable the feature, a module parameter "poll_queues" has to be set with the desired number of polling queues. When the feature is enabled, the driver reserves a certain number of operational queue pairs for the poll_queues either from the available queue pairs or creates additional queue pairs based on the operational queue availability. The Polling queues will have corresponding IRQ and ISR functions as similar to default queues. However, the IRQ line is disabled by the driver for poll_queues. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sreekanth Reddy <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
* scsi: mpi3mr: Support Prepare for Reset eventSreekanth Reddy2021-12-231-0/+6
| | | | | | | | | | | | | | | The IOC sends a Prepare for Reset Event to the host to prepare for a Soft Reset. This event data has two reason codes: 1. Start - The host is expected to gracefully quiesce all I/O within approximately 1 second. 2. Abort - The IOC is requesting to abort a previous Prepare for Reset Event request. Normal I/O may be resumed. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sreekanth Reddy <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
* scsi: mpi3mr: Add Event acknowledgment logicSreekanth Reddy2021-12-231-3/+27
| | | | | | | | Add Event acknowledgment logic. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sreekanth Reddy <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
* scsi: mpi3mr: Gracefully handle online FW update operationSreekanth Reddy2021-12-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enhance driver to gracefully handle discrepancies in certain key data sizes between firmware update operations as mentioned below: - The driver displays an error message and marks the controller as unrecoverable if the firmware reports ReplyFrameSize that is greater than the current ReplyFrameSize. - If the firmware reports ReplyFrameSize greater than the current ReplyFrameSize then the driver uses the current ReplyFrameSize while copying the reply messages. - The driver displays an error message and marks the controller as unrecoverable if the firmware reports MaxOperationalReplyQueues less than the currently allocated operational reply queues count. - If the firmware reports MaxOperationalReplyQueues that is greater than the currently allocated operational reply queue count then the driver ignores the new increased value and uses the previously allocated number of operational queues only. - If the firmware reports MaxDevHandle greater than the previously used MaxDevHandle value after a reset then the driver re-allocates the 'device remove pending bitmap' buffer with the newer size using krealloc(). Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sreekanth Reddy <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
* scsi: mpi3mr: Detect async reset that occurred in firmwareSreekanth Reddy2021-12-231-5/+7
| | | | | | | | | | | | | | | | | | Detect asynchronous reset that occurred in the firmware by polling for reset history bit of IOC status register is set and if that bit is set, then the driver waits for the controller to become ready and then re-initializes the controller. Also reduce the time driver is waiting for the controller to acknowledge the reset action after issuing a specific reset action to the controller. The wait time is reduced from 510 seconds to 30 seconds. If the controller didn't acknowledge a specific reset action within the time interval then the driver marks the controller as unrecoverable instead of retrying two more times prior to giving up. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sreekanth Reddy <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
* scsi: mpi3mr: Handle offline FW activation in graceful mannerSreekanth Reddy2021-12-231-16/+6
| | | | | | | | | | | | | | | Currently the driver marks the controller as unrecoverable if there is an asynchronous reset or fault during the initialization, reinitialization post reset, and OS resume. Enhance driver to retry the initialization, re-initialization, and resume sequences for a maximum of 3 times if the controller became faulty or asynchronously reset due to a firmware activation during the initialization sequence. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sreekanth Reddy <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
* scsi: mpi3mr: Fault IOC when internal command gets timeoutSreekanth Reddy2021-12-231-0/+1
| | | | | | | | | | | | Save snapdump and fault the controller with the given reason code if it is already not in the fault or not in asynchronous reset. This ensures that soft reset is issued from the watchdog thread. This will also be used to handle initialization time faults/resets/timeout as in those cases immediate soft reset invocation is not required. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sreekanth Reddy <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
* scsi: mpi3mr: Increase internal cmnds timeout to 60sSreekanth Reddy2021-12-231-4/+4
| | | | | | | | | | | - Increase internal command timeout to 60 seconds. - Enable 16 device removal handshake processing in parallel in the device removal handshake infrastructure. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sreekanth Reddy <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
* scsi: mpi3mr: Add support for PCIe Managed Switch SES deviceSreekanth Reddy2021-12-231-0/+3
| | | | | | | | | | | | | | | | | The SAS4 Controller firmware exposes the SES devices in Managed PCIe Switch as a PCIe Device Type SCSI Device (MPI3_DEVICE0_PCIE_DEVICE_INFO_TYPE_SCSI_DEVICE). Driver is enhanced to handle this device type by: - Exposing the device to the upper layers and - Not updating any hardware sectors & virtual boundary settings as these settings are needed only for NVMe devices. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sreekanth Reddy <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>