scsi: libsas: Introduce more SAM status code aliases in enum exec_status
[linux-2.6-microblaze.git] / drivers / scsi / sr_ioctl.c
index 15c3052..79d9aa2 100644 (file)
@@ -201,7 +201,11 @@ int sr_do_ioctl(Scsi_CD *cd, struct packet_command *cgc)
                              cgc->timeout, IOCTL_RETRIES, 0, 0, NULL);
 
        /* Minimal error checking.  Ignore cases we know about, and report the rest. */
-       if (driver_byte(result) != 0) {
+       if (result < 0) {
+               err = result;
+               goto out;
+       }
+       if (scsi_status_is_check_condition(result)) {
                switch (sshdr->sense_key) {
                case UNIT_ATTENTION:
                        SDev->changed = 1;