summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aic7xxx
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/aic7xxx
parent091686d3b5569d2ec76b9e6dab7f3608b6f64497 (diff)
downloadkernel-crypto-2b89dad0c7e3b03d45d9674ee9a7b49670df098e.tar.gz
kernel-crypto-2b89dad0c7e3b03d45d9674ee9a7b49670df098e.tar.xz
kernel-crypto-2b89dad0c7e3b03d45d9674ee9a7b49670df098e.zip
[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/aic7xxx')
-rw-r--r--drivers/scsi/aic7xxx/aic79xx_core.c4
-rw-r--r--drivers/scsi/aic7xxx/aic7xxx_core.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/drivers/scsi/aic7xxx/aic79xx_core.c b/drivers/scsi/aic7xxx/aic79xx_core.c
index 08771f6f685..e14244aa69d 100644
--- a/drivers/scsi/aic7xxx/aic79xx_core.c
+++ b/drivers/scsi/aic7xxx/aic79xx_core.c
@@ -9396,8 +9396,8 @@ ahd_find_tmode_devs(struct ahd_softc *ahd, struct cam_sim *sim, union ccb *ccb,
} else {
u_int max_id;
- max_id = (ahd->features & AHD_WIDE) ? 15 : 7;
- if (ccb->ccb_h.target_id > max_id)
+ max_id = (ahd->features & AHD_WIDE) ? 16 : 8;
+ if (ccb->ccb_h.target_id >= max_id)
return (CAM_TID_INVALID);
if (ccb->ccb_h.target_lun >= AHD_NUM_LUNS)
diff --git a/drivers/scsi/aic7xxx/aic7xxx_core.c b/drivers/scsi/aic7xxx/aic7xxx_core.c
index d37566978fb..50a3dd047cf 100644
--- a/drivers/scsi/aic7xxx/aic7xxx_core.c
+++ b/drivers/scsi/aic7xxx/aic7xxx_core.c
@@ -6774,8 +6774,8 @@ ahc_find_tmode_devs(struct ahc_softc *ahc, struct cam_sim *sim, union ccb *ccb,
} else {
u_int max_id;
- max_id = (ahc->features & AHC_WIDE) ? 15 : 7;
- if (ccb->ccb_h.target_id > max_id)
+ max_id = (ahc->features & AHC_WIDE) ? 16 : 8;
+ if (ccb->ccb_h.target_id >= max_id)
return (CAM_TID_INVALID);
if (ccb->ccb_h.target_lun >= AHC_NUM_LUNS)