[SCSI] host state model update: replace old host bitmap state

Migrate the current SCSI host state model to a model like SCSI
device is using.

Signed-off-by: Mike Anderson <andmike@us.ibm.com>

Rejections fixed up and

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
This commit is contained in:
Mike Anderson
2005-06-16 11:12:38 -07:00
committed by James Bottomley
parent 5dbffcd83d
commit d330187408
8 changed files with 162 additions and 21 deletions

View File

@ -429,12 +429,15 @@ struct scsi_host_template {
};
/*
* shost states
* shost state: If you alter this, you also need to alter scsi_sysfs.c
* (for the ascii descriptions) and the state model enforcer:
* scsi_host_set_state()
*/
enum {
SHOST_ADD,
SHOST_DEL,
enum scsi_host_state {
SHOST_CREATED = 1,
SHOST_RUNNING,
SHOST_CANCEL,
SHOST_DEL,
SHOST_RECOVERY,
};
@ -575,7 +578,7 @@ struct Scsi_Host {
unsigned int irq;
unsigned long shost_state;
enum scsi_host_state shost_state;
/* ldm bits */
struct device shost_gendev;
@ -633,6 +636,7 @@ extern void scsi_remove_host(struct Scsi_Host *);
extern struct Scsi_Host *scsi_host_get(struct Scsi_Host *);
extern void scsi_host_put(struct Scsi_Host *t);
extern struct Scsi_Host *scsi_host_lookup(unsigned short);
extern const char *scsi_host_state_name(enum scsi_host_state);
extern u64 scsi_calculate_bounce_limit(struct Scsi_Host *);