diff options
Diffstat (limited to 'sys/cam/cam_xpt.c')
-rw-r--r-- | sys/cam/cam_xpt.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/sys/cam/cam_xpt.c b/sys/cam/cam_xpt.c index a0a4346..b56c50f 100644 --- a/sys/cam/cam_xpt.c +++ b/sys/cam/cam_xpt.c @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: cam_xpt.c,v 1.64 1999/06/20 18:19:44 mjacob Exp $ + * $Id: cam_xpt.c,v 1.65 1999/07/11 06:10:47 jmg Exp $ */ #include <sys/param.h> #include <sys/systm.h> @@ -194,9 +194,11 @@ struct xpt_quirk_entry { u_int8_t quirks; #define CAM_QUIRK_NOLUNS 0x01 #define CAM_QUIRK_NOSERIAL 0x02 +#define CAM_QUIRK_HILUNS 0x04 u_int mintags; u_int maxtags; }; +#define CAM_SCSI2_MAXLUN 8 typedef enum { XPT_FLAG_OPEN = 0x01 @@ -4840,7 +4842,9 @@ xpt_scan_bus(struct cam_periph *periph, union ccb *request_ccb) if ((lun_id != 0) || (device != NULL)) { /* Try the next lun */ - lun_id++; + if (lun_id < (CAM_SCSI2_MAXLUN-1) || + (device->quirk->quirks & CAM_QUIRK_HILUNS)) + lun_id++; } } else { struct cam_ed *device; @@ -4849,7 +4853,9 @@ xpt_scan_bus(struct cam_periph *periph, union ccb *request_ccb) if ((device->quirk->quirks & CAM_QUIRK_NOLUNS) == 0) { /* Try the next lun */ - lun_id++; + if (lun_id < (CAM_SCSI2_MAXLUN-1) || + (device->quirk->quirks & CAM_QUIRK_HILUNS)) + lun_id++; } } |