mirror of
https://github.com/reactos/reactos.git
synced 2025-01-02 12:32:47 +00:00
- Reduced the size of the necessary inquiry data length to recognize a device as valid.
svn path=/trunk/; revision=9672
This commit is contained in:
parent
4536f9c25b
commit
cfef139c5b
1 changed files with 4 additions and 3 deletions
|
@ -16,7 +16,7 @@
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
/* $Id: scsiport.c,v 1.60 2004/06/10 08:14:57 hbirr Exp $
|
/* $Id: scsiport.c,v 1.61 2004/06/15 09:29:41 hbirr Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -32,6 +32,7 @@
|
||||||
#include <ddk/srb.h>
|
#include <ddk/srb.h>
|
||||||
#include <ddk/scsi.h>
|
#include <ddk/scsi.h>
|
||||||
#include <ddk/ntddscsi.h>
|
#include <ddk/ntddscsi.h>
|
||||||
|
#include <ntos/minmax.h>
|
||||||
#include <rosrtl/string.h>
|
#include <rosrtl/string.h>
|
||||||
|
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
|
@ -2041,13 +2042,13 @@ SpiScanAdapter (IN PSCSI_PORT_DEVICE_EXTENSION DeviceExtension)
|
||||||
if (NT_SUCCESS(ScanData->Status) &&
|
if (NT_SUCCESS(ScanData->Status) &&
|
||||||
(Srb->SrbStatus == SRB_STATUS_SUCCESS ||
|
(Srb->SrbStatus == SRB_STATUS_SUCCESS ||
|
||||||
(Srb->SrbStatus == SRB_STATUS_DATA_OVERRUN &&
|
(Srb->SrbStatus == SRB_STATUS_DATA_OVERRUN &&
|
||||||
Srb->DataTransferLength >= sizeof(INQUIRYDATA))) &&
|
Srb->DataTransferLength >= INQUIRYDATABUFFERSIZE)) &&
|
||||||
((PINQUIRYDATA)Srb->DataBuffer)->DeviceTypeQualifier == 0)
|
((PINQUIRYDATA)Srb->DataBuffer)->DeviceTypeQualifier == 0)
|
||||||
{
|
{
|
||||||
/* Copy inquiry data */
|
/* Copy inquiry data */
|
||||||
RtlCopyMemory (&ScanData->LunExtension->InquiryData,
|
RtlCopyMemory (&ScanData->LunExtension->InquiryData,
|
||||||
Srb->DataBuffer,
|
Srb->DataBuffer,
|
||||||
sizeof(INQUIRYDATA));
|
min(sizeof(INQUIRYDATA), Srb->DataTransferLength));
|
||||||
ScanData->Lun++;
|
ScanData->Lun++;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue