diff options
| author | Martin K. Petersen <martin.petersen@oracle.com> | 2021-06-02 01:33:12 -0400 |
|---|---|---|
| committer | Martin K. Petersen <martin.petersen@oracle.com> | 2021-06-02 01:37:04 -0400 |
| commit | 1ff28f229bc7fe36735684b25e63b528dbb962a5 (patch) | |
| tree | 2c1371434da0e190d8dfdb7709b41b643ce5635e /drivers/scsi/scsi_scan.c | |
| parent | ed1b86ba0fba3d586cd53057551a95197b0a37ad (diff) | |
| parent | 3d45cefc8edd7f560e6c97a8d9928ad571f76dec (diff) | |
Merge branch '5.14/scsi-result' into 5.14/scsi-staging
Include Hannes' SCSI command result rework in the staging branch.
[mkp: remove DRIVER_SENSE from mpi3mr]
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/scsi_scan.c')
| -rw-r--r-- | drivers/scsi/scsi_scan.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c index 12f54571b83e..5ce45ef9808f 100644 --- a/drivers/scsi/scsi_scan.c +++ b/drivers/scsi/scsi_scan.c @@ -616,14 +616,14 @@ static int scsi_probe_lun(struct scsi_device *sdev, unsigned char *inq_result, "scsi scan: INQUIRY %s with code 0x%x\n", result ? "failed" : "successful", result)); - if (result) { + if (result > 0) { /* * not-ready to ready transition [asc/ascq=0x28/0x0] * or power-on, reset [asc/ascq=0x29/0x0], continue. * INQUIRY should not yield UNIT_ATTENTION * but many buggy devices do so anyway. */ - if (driver_byte(result) == DRIVER_SENSE && + if (scsi_status_is_check_condition(result) && scsi_sense_valid(&sshdr)) { if ((sshdr.sense_key == UNIT_ATTENTION) && ((sshdr.asc == 0x28) || @@ -631,7 +631,7 @@ static int scsi_probe_lun(struct scsi_device *sdev, unsigned char *inq_result, (sshdr.ascq == 0)) continue; } - } else { + } else if (result == 0) { /* * if nothing was transferred, we try * again. It's a workaround for some USB |