[Linux1394-cvslog] rev 521 - trunk
Brought to you by:
aeb,
bencollins
From: SVN U. <ben...@us...> - 2002-07-15 16:37:38
|
Author: bencollins Date: Sun, 14 Jul 2002 15:38:46 -0400 New Revision: 521 Modified: trunk/sbp2.c Log: Make the SCSI inquiry hack a module load option Modified: trunk/sbp2.c ============================================================================== --- trunk/sbp2.c (original) +++ trunk/sbp2.c Mon Jul 15 12:37:25 2002 @@ -422,6 +422,15 @@ MODULE_PARM_DESC(sbp2_exclusive_login, "Exclusive login to sbp2 device (default = 1)"); static int sbp2_exclusive_login = 1; +/* + * SCSI inquiry hack for really badly behaved sbp2 devices. Turn this on if your sbp2 device + * is not properly handling the SCSI inquiry command. This hack makes the inquiry look more + * like a typical MS Windows inquiry. + */ +MODULE_PARM(sbp2_force_inquiry_hack,"i") +MODULE_PARM_DESC(sbp2_force_inquiry_hack, "Force SCSI inquiry hack (default = 0)"); +static int sbp2_force_inquiry_hack = 0; + /* * Export information about protocols/devices supported by this driver. @@ -506,14 +515,6 @@ #endif /* - * SCSI inquiry hack for really badly behaved sbp2 devices. Turn this on if your sbp2 device - * is not properly handling the SCSI inquiry command. This hack makes the inquiry look more - * like a typical MS Windows inquiry. - */ - -/* #define SBP2_FORCE_36_BYTE_INQUIRY */ - -/* * Globals */ @@ -2401,11 +2402,10 @@ * reject this inquiry command. Fix the request_bufflen. */ if (*cmd == INQUIRY) { -#ifdef SBP2_FORCE_36_BYTE_INQUIRY - request_bufflen = cmd[4] = 0x24; -#else - request_bufflen = cmd[4]; -#endif + if (sbp2_force_inquiry_hack) + request_bufflen = cmd[4] = 0x24; + else + request_bufflen = cmd[4]; } /* |