[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>
This commit is contained in:
committed by
James Bottomley
parent
091686d3b5
commit
2b89dad0c7
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user