diff options
author | Hannes Reinecke <hare@suse.de> | 2006-05-23 04:29:28 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-05-28 13:07:41 -0400 |
commit | 2b89dad0c7e3b03d45d9674ee9a7b49670df098e (patch) | |
tree | 8f480172c865e9d6cfab9ed4888a043bc75ab4ce /drivers/scsi/53c7xx.c | |
parent | 091686d3b5569d2ec76b9e6dab7f3608b6f64497 (diff) |
[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.c | 4 |
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) { | |||
709 | printk (KERN_ALERT "target %d is host ID\n", target); | 709 | printk (KERN_ALERT "target %d is host ID\n", target); |
710 | return -1; | 710 | return -1; |
711 | } | 711 | } |
712 | else if (target > h->max_id) { | 712 | else if (target >= h->max_id) { |
713 | printk (KERN_ALERT "target %d exceeds maximum of %d\n", target, | 713 | printk (KERN_ALERT "target %d exceeds maximum of %d\n", target, |
714 | h->max_id); | 714 | h->max_id); |
715 | return -1; | 715 | return -1; |
@@ -3622,7 +3622,7 @@ NCR53c7xx_queue_command (Scsi_Cmnd *cmd, void (* done)(Scsi_Cmnd *)) { | |||
3622 | #ifdef LINUX_1_2 | 3622 | #ifdef LINUX_1_2 |
3623 | || cmd->device->id > 7 | 3623 | || cmd->device->id > 7 |
3624 | #else | 3624 | #else |
3625 | || cmd->device->id > host->max_id | 3625 | || cmd->device->id >= host->max_id |
3626 | #endif | 3626 | #endif |
3627 | || cmd->device->id == host->this_id | 3627 | || cmd->device->id == host->this_id |
3628 | || hostdata->state == STATE_DISABLED) { | 3628 | || hostdata->state == STATE_DISABLED) { |