Merge branch 'master' [vanilla Linus master] into libata-dev.git/upstream
[cascardo/linux.git] / include / scsi / scsi_device.h
index 6efb2e1..9895f69 100644 (file)
@@ -42,6 +42,7 @@ enum scsi_device_state {
                                 * originate in the mid-layer) */
        SDEV_OFFLINE,           /* Device offlined (by error handling or
                                 * user request */
+       SDEV_TRANSPORT_OFFLINE, /* Offlined by transport class error handler */
        SDEV_BLOCK,             /* Device blocked by scsi lld.  No
                                 * scsi commands from user or midlayer
                                 * should be issued to the scsi
@@ -151,7 +152,10 @@ struct scsi_device {
                                           SD_LAST_BUGGY_SECTORS */
        unsigned no_read_disc_info:1;   /* Avoid READ_DISC_INFO cmds */
        unsigned no_read_capacity_16:1; /* Avoid READ_CAPACITY_16 cmds */
+       unsigned try_rc_10_first:1;     /* Try READ_CAPACACITY_10 first */
        unsigned is_visible:1;  /* is the device visible in sysfs */
+       unsigned can_power_off:1; /* Device supports runtime power off */
+       unsigned wce_default_on:1;      /* Cache is ON by default */
 
        DECLARE_BITMAP(supported_events, SDEV_EVT_MAXBITS); /* supported events */
        struct list_head event_list;    /* asserted events */
@@ -372,7 +376,7 @@ extern void scsi_scan_target(struct device *parent, unsigned int channel,
                             unsigned int id, unsigned int lun, int rescan);
 extern void scsi_target_reap(struct scsi_target *);
 extern void scsi_target_block(struct device *);
-extern void scsi_target_unblock(struct device *);
+extern void scsi_target_unblock(struct device *, enum scsi_device_state);
 extern void scsi_remove_target(struct device *);
 extern void int_to_scsilun(unsigned int, struct scsi_lun *);
 extern int scsilun_to_int(struct scsi_lun *);
@@ -420,6 +424,7 @@ static inline unsigned int sdev_id(struct scsi_device *sdev)
 static inline int scsi_device_online(struct scsi_device *sdev)
 {
        return (sdev->sdev_state != SDEV_OFFLINE &&
+               sdev->sdev_state != SDEV_TRANSPORT_OFFLINE &&
                sdev->sdev_state != SDEV_DEL);
 }
 static inline int scsi_device_blocked(struct scsi_device *sdev)