Skip to content

Commit

Permalink
scsi: aacraid: check adapter health
Browse files Browse the repository at this point in the history
Currently driver waits for the command IOCTL from the firmware and if the
firmware enters nonresponsive state, the driver doesn't respond till the
firmware is responsive again.

Check that firmware is alive, otherwise return -EBUSY.

[mkp: clarified commit desc]

Link: https://lore.kernel.org/r/1571120524-6037-6-git-send-email-balsundar.p@microsemi.com
Signed-off-by: Balsundar P <balsundar.p@microsemi.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
  • Loading branch information
Balsundar P authored and Martin K. Petersen committed Oct 18, 2019
1 parent e2fd90d commit 572ee53
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/scsi/aacraid/linit.c
Original file line number Diff line number Diff line change
Expand Up @@ -612,9 +612,13 @@ static struct device_attribute *aac_dev_attrs[] = {
static int aac_ioctl(struct scsi_device *sdev, unsigned int cmd,
void __user *arg)
{
int retval;
struct aac_dev *dev = (struct aac_dev *)sdev->host->hostdata;
if (!capable(CAP_SYS_RAWIO))
return -EPERM;
retval = aac_adapter_check_health(dev);
if (retval)
return -EBUSY;
return aac_do_ioctl(dev, cmd, arg);
}

Expand Down

0 comments on commit 572ee53

Please sign in to comment.