]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - include/scsi/scsi_device.h
[SCSI] libiscsi_tcp: use kmap in xmit path
[karo-tx-linux.git] / include / scsi / scsi_device.h
index 85867dcde3352ed32fad6389425da74773f204a0..2d3ec509468557521a65ac7fb016eff3728dcd59 100644 (file)
@@ -184,6 +184,7 @@ typedef void (*activate_complete)(void *, int);
 struct scsi_device_handler {
        /* Used by the infrastructure */
        struct list_head list; /* list of scsi_device_handlers */
+       int idx;
 
        /* Filled by the hardware handler */
        struct module *module;
@@ -461,7 +462,7 @@ static inline int scsi_device_qas(struct scsi_device *sdev)
 }
 static inline int scsi_device_enclosure(struct scsi_device *sdev)
 {
-       return sdev->inquiry[6] & (1<<6);
+       return sdev->inquiry ? (sdev->inquiry[6] & (1<<6)) : 1;
 }
 
 static inline int scsi_device_protection(struct scsi_device *sdev)