]> err.no Git - linux-2.6/blobdiff - include/scsi/scsi_device.h
[PATCH] Create vio_register_device
[linux-2.6] / include / scsi / scsi_device.h
index f6d051318299c17bf10240b042bca624e96ee97e..835af8ecbb7c874601351ca4ee4ecc81b6778101 100644 (file)
@@ -9,7 +9,7 @@
 struct request_queue;
 struct scsi_cmnd;
 struct scsi_mode_data;
-
+struct scsi_lun;
 
 /*
  * sdev state: If you alter this, you also need to alter scsi_sysfs.c
@@ -43,7 +43,9 @@ struct scsi_device {
        struct list_head    siblings;   /* list of all devices on this host */
        struct list_head    same_target_siblings; /* just the devices sharing same target id */
 
-       volatile unsigned short device_busy;    /* commands actually active on low-level */
+       /* this is now protected by the request_queue->queue_lock */
+       unsigned int device_busy;       /* commands actually active on
+                                        * low-level. protected by queue_lock. */
        spinlock_t list_lock;
        struct list_head cmd_list;      /* queue of in use SCSI Command structures */
        struct list_head starved_entry;
@@ -152,7 +154,9 @@ struct scsi_target {
        unsigned int            id; /* target id ... replace
                                     * scsi_device.id eventually */
        unsigned long           create:1; /* signal that it needs to be added */
-       unsigned long           starget_data[0];
+       void                    *hostdata; /* available to low-level driver */
+       unsigned long           starget_data[0]; /* for the transport */
+       /* starget_data must be the last element!!!! */
 } __attribute__((aligned(sizeof(unsigned long))));
 
 #define to_scsi_target(d)      container_of(d, struct scsi_target, dev)
@@ -239,6 +243,7 @@ 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_remove_target(struct device *);
+extern void int_to_scsilun(unsigned int, struct scsi_lun *);
 extern const char *scsi_device_state_name(enum scsi_device_state);
 extern int scsi_is_sdev_device(const struct device *);
 extern int scsi_is_target_device(const struct device *);