Kevin Barnett
dac12fbc7b
scsi: smartpqi: fix critical ARM issue reading PQI index registers
...
Use the readl() kernel function to read all index registers. For ARM
systems, this function includes a read memory barrier that eliminates ci/pi
corruption.
Reviewed-by: Scott Benesh <scott.benesh@microsemi.com >
Reviewed-by: Scott Teel <scott.teel@microsemi.com >
Tested-by: Shunyong Yang <shunyong.yang@hxt-semitech.com >
Signed-off-by: Kevin Barnett <kevin.barnett@microsemi.com >
Signed-off-by: Don Brace <don.brace@microsemi.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2018-06-19 22:02:25 -04:00
Kevin Barnett
26b390aba2
scsi: smartpqi: improve error checking for sync requests
...
Detect rare error cases for synchronous requests down the RAID path.
Also retry INQUIRY of VPD page 0 sent to an HBA drive if the command failed
due to an abort.
Reviewed-by: Scott Benesh <scott.benesh@microsemi.com >
Reviewed-by: Scott Teel <scott.teel@microsemi.com >
Signed-off-by: Kevin Barnett <kevin.barnett@microsemi.com >
Signed-off-by: Don Brace <don.brace@microsemi.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2018-06-19 22:02:25 -04:00
Kevin Barnett
58322fe006
scsi: smartpqi: enhance BMIC cache flush
...
- distinguish between shutdown and non-shutdown.
Reviewed-by: Scott Benesh <scott.benesh@microsemi.com >
Signed-off-by: Kevin Barnett <kevin.barnett@microsemi.com >
Signed-off-by: Don Brace <don.brace@microsemi.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2017-08-10 19:58:25 -04:00
Kevin Barnett
336b681931
scsi: smartpqi: add pqi reset quiesce support
...
Reviewed-by: Scott Benesh <scott.benesh@microsemi.com >
Signed-off-by: Kevin Barnett <kevin.barnett@microsemi.com >
Signed-off-by: Don Brace <don.brace@microsemi.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2017-08-10 19:58:25 -04:00
Yadan Fan
eeee410754
scsi: smartpqi: limit transfer length to 1MB
...
The smartpqi firmware will bypass the cache for any request larger than
1MB, so we should cap the request size to avoid any performance
degradation in kernels later than v4.3
This degradation is caused from d2be537c3b
,
which changed max_sectors_kb to 1280k, but the hardware is able to
work fine with it, so the true fix should be from smartpqi driver.
Signed-off-by: Yadan Fan <ydfan@suse.com >
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de >
Acked-by: Don Brace <don.brace@microsemi.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2017-07-17 22:56:33 -04:00
Corentin Labbe
ebaec8e3ee
scsi: smartpqi: remove writeq/readq function definitions
...
Instead of rewriting write/readq, use existing functions
Reviewed-by: Scott Benesh <scott.benesh@microsemi.com >
Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com >
Signed-off-by: Kevin Barnett <kevin.barnett@microsemi.com >
Signed-off-by: Don Brace <don.brace@microsemi.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2017-06-12 20:48:04 -04:00
Kevin Barnett
588a63fea1
scsi: smartpqi: make ioaccel references consistent
...
- make all references to RAID bypass consistent throughout driver.
Reviewed-by: Scott Benesh <scott.benesh@microsemi.com >
Signed-off-by: Kevin Barnett <kevin.barnett@microsemi.com >
Signed-off-by: Don Brace <don.brace@microsemi.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2017-06-12 20:48:04 -04:00
Kevin Barnett
5f310425c8
scsi: smartpqi: update rescan worker
...
improve support for taking controller offline.
Reviewed-by: Scott Benesh <scott.benesh@microsemi.com >
Signed-off-by: Kevin Barnett <kevin.barnett@microsemi.com >
Signed-off-by: Don Brace <don.brace@microsemi.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2017-06-12 20:48:03 -04:00
Kevin Barnett
376fb880a4
scsi: smartpqi: correct aio error path
...
set the internal flag that causes I/O to be sent down the
RAID path when the AIO path is disabled
Reviewed-by: Scott Benesh <scott.benesh@microsemi.com >
Signed-off-by: Kevin Barnett <kevin.barnett@microsemi.com >
Signed-off-by: Don Brace <don.brace@microsemi.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2017-06-12 20:48:03 -04:00
Kevin Barnett
94086f5be3
scsi: smartpqi: remove qdepth calculations for logical volumes
...
make the queue depth for LVs the same as the maximum
I/Os supported by the controller
Reviewed-by: Scott Benesh <scott.benesh@microsemi.com >
Signed-off-by: Kevin Barnett <kevin.barnett@microsemi.com >
Signed-off-by: Don Brace <don.brace@microsemi.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2017-06-12 20:48:03 -04:00
Kevin Barnett
d727a776d7
scsi: smartpqi: enhance kdump
...
constrain resource usage during kdump to avoid kdump failures
Reviewed-by: Scott Benesh <scott.benesh@microsemi.com >
Signed-off-by: Kevin Barnett <kevin.barnett@microsemi.com >
Signed-off-by: Don Brace <don.brace@microsemi.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2017-06-12 20:48:03 -04:00
Kevin Barnett
bd10cf0be6
scsi: smartpqi: add ptraid support
...
add support for PTRAID devices
Reviewed-by: Scott Benesh <scott.benesh@microsemi.com >
Signed-off-by: Kevin Barnett <kevin.barnett@microsemi.com >
Signed-off-by: Don Brace <don.brace@microsemi.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2017-06-12 20:48:03 -04:00
Kevin Barnett
b805dbfe2b
scsi: smartpqi: update copyright
...
Reviewed-by: Scott Benesh <scott.benesh@microsemi.com >
Signed-off-by: Kevin Barnett <kevin.barnett@microsemi.com >
Signed-off-by: Don Brace <don.brace@microsemi.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2017-06-12 20:48:03 -04:00
Kevin Barnett
cbe0c7b11d
scsi: smartpqi: minor driver cleanup
...
- remove debug code that is no longer necessary.
- Some WARN_ON checks were removed because the driver continues
to function when the conditions are met.
- remove a MACRO that is no longer used.
- remove unnecessary multi-line statements.
Reviewed-by: Scott Benesh <scott.benesh@microsemi.com >
Signed-off-by: Kevin Barnett <kevin.barnett@microsemi.com >
Signed-off-by: Don Brace <don.brace@microsemi.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2017-06-12 20:48:02 -04:00
Kevin Barnett
1be42f46ad
scsi: smartpqi: correct BMIC identify physical drive
...
correct the BMIC Identify Physical Device structure
- missing 2 fields
Reviewed-by: Scott Benesh <scott.benesh@microsemi.com >
Signed-off-by: Kevin Barnett <kevin.barnett@microsemi.com >
Signed-off-by: Don Brace <don.brace@microsemi.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2017-06-12 20:48:02 -04:00
Kevin Barnett
98f876674a
scsi: smartpqi: add heartbeat check
...
check for controller lockups
Reviewed-by: Scott Benesh <scott.benesh@microsemi.com >
Signed-off-by: Kevin Barnett <kevin.barnett@microsemi.com >
Signed-off-by: Don Brace <don.brace@microsemi.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2017-06-12 20:48:02 -04:00
Kevin Barnett
061ef06a2d
scsi: smartpqi: add suspend and resume support
...
add support for ACPI S3 (suspend) and S4 (hibernate)
system power states.
Reviewed-by: Scott Benesh <scott.benesh@microsemi.com >
Signed-off-by: Kevin Barnett <kevin.barnett@microsemi.com >
Signed-off-by: Don Brace <don.brace@microsemi.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2017-06-12 20:48:02 -04:00
Kevin Barnett
7561a7e441
scsi: smartpqi: enhance resets
...
- Block all I/O targeted at LUN reset device.
- Wait until all I/O targeted at LUN reset device has been
consumed by the controller.
- Issue LUN reset request.
- Wait until all outstanding I/Os and LUN reset completion
have been received by the host.
- Return to OS results of LUN reset request.
Reviewed-by: Scott Benesh <scott.benesh@microsemi.com >
Signed-off-by: Kevin Barnett <kevin.barnett@microsemi.com >
Signed-off-by: Don Brace <don.brace@microsemi.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2017-06-12 20:48:02 -04:00
Kevin Barnett
6a50d6ada0
scsi: smartpqi: add supporting events
...
Only register for controller events that driver supports
cleanup event handling.
Reviewed-by: Scott Benesh <scott.benesh@microsemi.com >
Signed-off-by: Kevin Barnett <kevin.barnett@microsemi.com >
Signed-off-by: Don Brace <don.brace@microsemi.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2017-06-12 20:48:02 -04:00
Kevin Barnett
162d7753fc
scsi: smartpqi: ensure controller is in SIS mode at init
...
put in SIS mode during initialization.
support kexec/kdump
Reviewed-by: Scott Benesh <scott.benesh@microsemi.com >
Reviewed-by: Scott Teel <scott.teel@microsemi.com >
Signed-off-by: Kevin Barnett <kevin.barnett@microsemi.com >
Signed-off-by: Don Brace <don.brace@microsemi.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2017-06-12 20:48:02 -04:00
Kevin Barnett
5b0fba0f40
scsi: smartpqi: add in controller checkpoint for controller lockups.
...
tell smartpqi controller to generate a checkpoint for rare lockup
conditions.
Reviewed-by: Scott Benesh <scott.benesh@microsemi.com >
Reviewed-by: Scott Teel <scott.teel@microsemi.com >
Signed-off-by: Kevin Barnett <kevin.barnett@microsemi.com >
Signed-off-by: Don Brace <don.brace@microsemi.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2017-06-12 20:48:02 -04:00
Christoph Hellwig
5219822687
scsi: smartpqi: switch to pci_alloc_irq_vectors
...
Which cleans up a lot of the MSI-X handling, and allows us to use the
PCI IRQ layer provided vector mapping, which we can then expose to
blk-mq.
Signed-off-by: Christoph Hellwig <hch@lst.de >
Reviewed-by: Hannes Reinecke <hare@suse.com >
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de >
Reviewed-by: Sagi Grimberg <sagi@grimberg.me >
Acked-by: Don Brace <don.brace@microsemi.com >
Tested-by: Don Brace <don.brace@microsemi.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2016-11-08 17:30:00 -05:00
Kevin Barnett
5e6429df9c
scsi: smartpqi: correct event acknowledgment timeout issue
...
the driver no longer waits for the firmware to consume
the event ack IU.
Reviewed-by: Scott Teel <scott.teel@microsemi.com >
Reviewed-by: Scott Benesh <scott.benesh@microsemi.com >
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de >
Reviewed-by: Tomas Henzl <thenzl@redhat.com >
Signed-off-by: Kevin Barnett <kevin.barnett@microsemi.com >
Signed-off-by: Don Brace <don.brace@microsemi.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2016-09-02 06:21:38 -04:00
Kevin Barnett
ff6abb7383
scsi: smartpqi: add kdump support
...
Reviewed-by: Scott Teel <scott.teel@microsemi.com >
Reviewed-by: Scott Benesh <scott.benesh@microsemi.com >
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de >
Reviewed-by: Tomas Henzl <thenzl@redhat.com >
Signed-off-by: Kevin Barnett <kevin.barnett@microsemi.com >
Signed-off-by: Don Brace <don.brace@microsemi.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2016-09-02 06:21:38 -04:00
Kevin Barnett
14bb215d09
scsi: smartpqi: enhance reset logic
...
Eliminated timeout from LUN reset logic.
Reviewed-by: Scott Teel <scott.teel@microsemi.com >
Reviewed-by: Scott Benesh <scott.benesh@microsemi.com >
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de >
Reviewed-by: Tomas Henzl <thenzl@redhat.com >
Signed-off-by: Kevin Barnett <kevin.barnett@microsemi.com >
Signed-off-by: Don Brace <don.brace@microsemi.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2016-09-02 06:21:37 -04:00
Kevin Barnett
b17f048658
scsi: smartpqi: change tmf macro names
...
small change to make code look cleaner
Reviewed-by: Scott Teel <scott.teel@microsemi.com >
Reviewed-by: Scott Benesh <scott.benesh@microsemi.com >
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de >
Reviewed-by: Tomas Henzl <thenzl@redhat.com >
Signed-off-by: Kevin Barnett <kevin.barnett@microsemi.com >
Signed-off-by: Don Brace <don.brace@microsemi.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2016-09-02 06:21:37 -04:00
Kevin Barnett
6c223761eb
smartpqi: initial commit of Microsemi smartpqi driver
...
This initial commit contains Microsemi's smartpqi module.
[mkp: Minor tweaks to apply to 4.9/scsi-queue]
Reviewed-by: Scott Benesh <scott.benesh@microsemi.com >
Reviewed-by: Kevin Barnett <kevin.barnett@microsemi.com >
Signed-off-by: Kevin Barnett <kevin.barnett@microsemi.com >
Signed-off-by: Don Brace <don.brace@microsemi.com >
Reviewed-by: Hannes Reinecke <hare@suse.com >
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de >
Reviewed-by: Ewan D. Milne <emilne@redhat.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2016-08-12 16:00:09 -04:00