Commit db6c93eb authored by Christoph Hellwig's avatar Christoph Hellwig Committed by James Bottomley

[PATCH] check for can_queue != 0 in scsi_host_alloc

This is to give a proper warning if someone tries to load an
unconverted old-style driver.
parent 8c346176
...@@ -144,6 +144,12 @@ struct Scsi_Host *scsi_host_alloc(struct scsi_host_template *sht, int privsize) ...@@ -144,6 +144,12 @@ 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