Put in a limit (8) for lun width- do not exceed probing this unless a device
is quirked for allowing it. This will allow SCSI cards to specify their true correct lun width (32 for Qlogic SCSI, 16 or 65536 for Qlogic Fibre Channel) without crippling the system because of f/w breakage of a lot of drives. Reviewed by: gibbs@freebsd.org
This commit is contained in:
parent
a0c6c4d6ce
commit
48f6456d82
@ -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++;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user