diff --git a/include/scsi-lowlevel.h b/include/scsi-lowlevel.h index e37be0a..1b7d6ed 100644 --- a/include/scsi-lowlevel.h +++ b/include/scsi-lowlevel.h @@ -152,6 +152,7 @@ EXTERN const char *scsi_sense_key_str(int key); #define SCSI_SENSE_ASCQ_LOGICAL_UNIT_NOT_SUPPORTED 0x2500 #define SCSI_SENSE_ASCQ_WRITE_PROTECTED 0x2700 #define SCSI_SENSE_ASCQ_BUS_RESET 0x2900 +#define SCSI_SENSE_ASCQ_NEXUS_LOSS 0x2907 #define SCSI_SENSE_ASCQ_MODE_PARAMETERS_CHANGED 0x2a01 #define SCSI_SENSE_ASCQ_CAPACITY_DATA_HAS_CHANGED 0x2a09 #define SCSI_SENSE_ASCQ_THIN_PROVISION_SOFT_THRES_REACHED 0x3807 diff --git a/lib/connect.c b/lib/connect.c index 4f04636..3976d5a 100644 --- a/lib/connect.c +++ b/lib/connect.c @@ -49,7 +49,8 @@ iscsi_testunitready_cb(struct iscsi_context *iscsi, int status, if (status != 0) { if (task->sense.key == SCSI_SENSE_UNIT_ATTENTION - && task->sense.ascq == SCSI_SENSE_ASCQ_BUS_RESET) { + && (task->sense.ascq == SCSI_SENSE_ASCQ_BUS_RESET || + task->sense.ascq == SCSI_SENSE_ASCQ_NEXUS_LOSS)) { /* This is just the normal unitattention/busreset * you always get just after a fresh login. Try * again.