[SCSI] Fix incorrect reporting of host protection capabilities
[safe/jmp/linux-2.6] / include / scsi / scsi_device.h
index 9576690..9af48cb 100644 (file)
@@ -187,10 +187,13 @@ struct scsi_device_handler {
        void (*detach)(struct scsi_device *);
        int (*activate)(struct scsi_device *);
        int (*prep_fn)(struct scsi_device *, struct request *);
+       int (*set_params)(struct scsi_device *, const char *);
 };
 
 struct scsi_dh_data {
        struct scsi_device_handler *scsi_dh;
+       struct scsi_device *sdev;
+       struct kref kref;
        char buf[0];
 };
 
@@ -371,12 +374,6 @@ extern int scsi_execute_req(struct scsi_device *sdev, const unsigned char *cmd,
                            int data_direction, void *buffer, unsigned bufflen,
                            struct scsi_sense_hdr *, int timeout, int retries,
                            int *resid);
-extern int scsi_execute_async(struct scsi_device *sdev,
-                             const unsigned char *cmd, int cmd_len, int data_direction,
-                             void *buffer, unsigned bufflen, int use_sg,
-                             int timeout, int retries, void *privdata,
-                             void (*done)(void *, char *, int, int),
-                             gfp_t gfp);
 
 static inline int __must_check scsi_device_reprobe(struct scsi_device *sdev)
 {
@@ -401,7 +398,8 @@ 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;
+       return (sdev->sdev_state != SDEV_OFFLINE &&
+               sdev->sdev_state != SDEV_DEL);
 }
 static inline int scsi_device_blocked(struct scsi_device *sdev)
 {