summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aacraid/commsup.c
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2020-02-28 08:53:14 +0100
committerMartin K. Petersen <martin.petersen@oracle.com>2020-02-28 20:54:51 -0500
commit3d3ca53b163914c1397289d0c2ee6d2f52362dcc (patch)
tree2f08f18b1ce2c6e38feff0674b3a5c99fa34643a /drivers/scsi/aacraid/commsup.c
parent2bb955840c1dc44746af8a7873d9a0ba70debbd6 (diff)
scsi: aacraid: use scsi_host_(block,unblock) to block I/O
Use scsi_host_block() and scsi_host_unblock() instead of scsi_block_requests()/scsi_unblock_requests() to block and unblock I/O. This has the advantage that the block layer will stop sending I/O to the adapter instead of having the SCSI midlayer requeueing I/O internally. Link: https://lore.kernel.org/r/20200228075318.91255-10-hare@suse.de Reviewed-by: Christoph Hellwig <hch@lst.de> Acked-by: Balsundar P < Balsundar.P@microchip.com> Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/aacraid/commsup.c')
-rw-r--r--drivers/scsi/aacraid/commsup.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.c
index fee13a778198..bb14a05f6d77 100644
--- a/drivers/scsi/aacraid/commsup.c
+++ b/drivers/scsi/aacraid/commsup.c
@@ -1477,7 +1477,6 @@ static int _aac_reset_adapter(struct aac_dev *aac, int forced, u8 reset_type)
int index, quirks;
int retval;
struct Scsi_Host *host = aac->scsi_host_ptr;
- struct scsi_device *dev;
int jafo = 0;
int bled;
u64 dmamask;
@@ -1605,16 +1604,7 @@ static int _aac_reset_adapter(struct aac_dev *aac, int forced, u8 reset_type)
*/
scsi_host_complete_all_commands(host, DID_RESET);
- /*
- * Any Device that was already marked offline needs to be marked
- * running
- */
- __shost_for_each_device(dev, host) {
- if (!scsi_device_online(dev))
- scsi_device_set_state(dev, SDEV_RUNNING);
- }
retval = 0;
-
out:
aac->in_reset = 0;
@@ -1655,7 +1645,7 @@ int aac_reset_adapter(struct aac_dev *aac, int forced, u8 reset_type)
* target (block maximum 60 seconds). Although not necessary,
* it does make us a good storage citizen.
*/
- scsi_block_requests(host);
+ scsi_host_block(host);
/* Quiesce build, flush cache, write through mode */
if (forced < 2)
@@ -1666,7 +1656,7 @@ int aac_reset_adapter(struct aac_dev *aac, int forced, u8 reset_type)
retval = _aac_reset_adapter(aac, bled, reset_type);
spin_unlock_irqrestore(host->host_lock, flagv);
- scsi_unblock_requests(host);
+ retval = scsi_host_unblock(host, SDEV_RUNNING);
if ((forced < 2) && (retval == -ENODEV)) {
/* Unwind aac_send_shutdown() IOP_RESET unsupported/disabled */