summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/53c7xx.c
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2006-05-23 10:29:28 +0200
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-05-28 13:07:41 -0400
commit2b89dad0c7e3b03d45d9674ee9a7b49670df098e (patch)
tree8f480172c865e9d6cfab9ed4888a043bc75ab4ce /drivers/scsi/53c7xx.c
parent091686d3b5569d2ec76b9e6dab7f3608b6f64497 (diff)
downloadlinux-2b89dad0c7e3b03d45d9674ee9a7b49670df098e.tar.bz2
[SCSI] audit drivers for incorrect max_id use
max_id now means the maximum number of ids on the bus, which means it is one greater than the largest possible id number. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/53c7xx.c')
-rw-r--r--drivers/scsi/53c7xx.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/53c7xx.c b/drivers/scsi/53c7xx.c
index 7894b8ea84bd..cfc991271cc8 100644
--- a/drivers/scsi/53c7xx.c
+++ b/drivers/scsi/53c7xx.c
@@ -709,7 +709,7 @@ request_synchronous (int host, int target) {
printk (KERN_ALERT "target %d is host ID\n", target);
return -1;
}
- else if (target > h->max_id) {
+ else if (target >= h->max_id) {
printk (KERN_ALERT "target %d exceeds maximum of %d\n", target,
h->max_id);
return -1;
@@ -3622,7 +3622,7 @@ NCR53c7xx_queue_command (Scsi_Cmnd *cmd, void (* done)(Scsi_Cmnd *)) {
#ifdef LINUX_1_2
|| cmd->device->id > 7
#else
- || cmd->device->id > host->max_id
+ || cmd->device->id >= host->max_id
#endif
|| cmd->device->id == host->this_id
|| hostdata->state == STATE_DISABLED) {