Commit 05730426 authored by James Bottomley's avatar James Bottomley

SCSI: Move can_queue == 0 check

Some HBA drivers don't set this until their ->detect routines,
so don't check for it until scsi_add_host
parent 4b68c65b
...@@ -82,6 +82,13 @@ int scsi_add_host(struct Scsi_Host *shost, struct device *dev) ...@@ -82,6 +82,13 @@ int scsi_add_host(struct Scsi_Host *shost, struct device *dev)
sht->info ? sht->info(shost) : sht->name); sht->info ? sht->info(shost) : sht->name);
error = scsi_sysfs_add_host(shost, dev); error = scsi_sysfs_add_host(shost, dev);
if (!shost->can_queue) {
printk(KERN_ERR "%s: can_queue = 0 no longer supported\n",
sht->name);
error = -EINVAL;
}
if (!error) { if (!error) {
scsi_proc_host_add(shost); scsi_proc_host_add(shost);
scsi_scan_host(shost); scsi_scan_host(shost);
...@@ -144,12 +151,6 @@ struct Scsi_Host *scsi_host_alloc(struct scsi_host_template *sht, int privsize) ...@@ -144,12 +151,6 @@ struct Scsi_Host *scsi_host_alloc(struct scsi_host_template *sht, int privsize)
dump_stack(); dump_stack();
} }
if (!sht->can_queue) {
printk(KERN_ERR "%s: can_queue = 0 no more supported\n",
sht->name);
return NULL;
}
/* if its not set in the template, use the default */ /* if its not set in the template, use the default */
if (!sht->shost_attrs) if (!sht->shost_attrs)
sht->shost_attrs = scsi_sysfs_shost_attrs; sht->shost_attrs = scsi_sysfs_shost_attrs;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment