Exorcise UMASS_QUIRK_FORCE_SHORT_INQUIRY.

This commit is contained in:
mycroft 2003-09-10 05:25:44 +00:00
parent 7f9445d14a
commit 9c39f1d6a5
3 changed files with 8 additions and 40 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: umass_quirks.c,v 1.53 2003/09/10 03:13:53 mycroft Exp $ */ /* $NetBSD: umass_quirks.c,v 1.54 2003/09/10 05:25:44 mycroft Exp $ */
/* /*
* Copyright (c) 2001 The NetBSD Foundation, Inc. * Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -37,7 +37,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: umass_quirks.c,v 1.53 2003/09/10 03:13:53 mycroft Exp $"); __KERNEL_RCSID(0, "$NetBSD: umass_quirks.c,v 1.54 2003/09/10 05:25:44 mycroft Exp $");
#include <sys/param.h> #include <sys/param.h>
#include <sys/systm.h> #include <sys/systm.h>
@ -92,15 +92,6 @@ Static const struct umass_quirk umass_quirks[] = {
NULL, NULL NULL, NULL
}, },
{ { USB_VENDOR_MELCO, USB_PRODUCT_MELCO_DUBPXXG },
UMASS_WPROTO_UNSPEC, UMASS_CPROTO_UNSPEC,
UMASS_QUIRK_FORCE_SHORT_INQUIRY,
0,
UMATCH_DEVCLASS_DEVSUBCLASS_DEVPROTO,
NULL, NULL
},
{ { USB_VENDOR_OLYMPUS, USB_PRODUCT_OLYMPUS_C1 }, { { USB_VENDOR_OLYMPUS, USB_PRODUCT_OLYMPUS_C1 },
UMASS_WPROTO_UNSPEC, UMASS_CPROTO_UNSPEC, UMASS_WPROTO_UNSPEC, UMASS_CPROTO_UNSPEC,
UMASS_QUIRK_WRONG_CSWSIG, UMASS_QUIRK_WRONG_CSWSIG,
@ -143,19 +134,11 @@ Static const struct umass_quirk umass_quirks[] = {
{ { USB_VENDOR_YANO, USB_PRODUCT_YANO_U640MO }, { { USB_VENDOR_YANO, USB_PRODUCT_YANO_U640MO },
UMASS_WPROTO_CBI_I, UMASS_CPROTO_ATAPI, UMASS_WPROTO_CBI_I, UMASS_CPROTO_ATAPI,
UMASS_QUIRK_FORCE_SHORT_INQUIRY, 0,
0, 0,
UMATCH_VENDOR_PRODUCT, UMATCH_VENDOR_PRODUCT,
NULL, NULL NULL, NULL
}, },
{ { USB_VENDOR_GENESYS,USB_PRODUCT_GENESYS_GL641USB },
UMASS_WPROTO_UNSPEC, UMASS_CPROTO_UNSPEC,
UMASS_QUIRK_FORCE_SHORT_INQUIRY,
0,
UMATCH_DEVCLASS_DEVSUBCLASS_DEVPROTO,
NULL, NULL
},
}; };
const struct umass_quirk * const struct umass_quirk *

View File

@ -1,4 +1,4 @@
/* $NetBSD: umass_scsipi.c,v 1.11 2003/09/10 02:49:19 mycroft Exp $ */ /* $NetBSD: umass_scsipi.c,v 1.12 2003/09/10 05:25:44 mycroft Exp $ */
/* /*
* Copyright (c) 2001 The NetBSD Foundation, Inc. * Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -38,7 +38,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: umass_scsipi.c,v 1.11 2003/09/10 02:49:19 mycroft Exp $"); __KERNEL_RCSID(0, "$NetBSD: umass_scsipi.c,v 1.12 2003/09/10 05:25:44 mycroft Exp $");
#include "atapibus.h" #include "atapibus.h"
#include "scsibus.h" #include "scsibus.h"
@ -288,20 +288,6 @@ umass_scsipi_request(struct scsipi_channel *chan,
cmd = xs->cmd; cmd = xs->cmd;
cmdlen = xs->cmdlen; cmdlen = xs->cmdlen;
/* XXX should use transform */
if (cmd->opcode == INQUIRY &&
(sc->sc_quirks & UMASS_QUIRK_FORCE_SHORT_INQUIRY)) {
/*
* Some drives wedge when asked for full inquiry
* information.
*/
memcpy(&trcmd, cmd, sizeof trcmd);
trcmd.bytes[4] = SHORT_INQUIRY_LENGTH;
cmd = &trcmd;
xs->datalen = SHORT_INQUIRY_LENGTH;
}
dir = DIR_NONE; dir = DIR_NONE;
if (xs->datalen) { if (xs->datalen) {
switch (xs->xs_control & switch (xs->xs_control &

View File

@ -1,4 +1,4 @@
/* $NetBSD: umassvar.h,v 1.21 2003/09/10 02:49:19 mycroft Exp $ */ /* $NetBSD: umassvar.h,v 1.22 2003/09/10 05:25:44 mycroft Exp $ */
/*- /*-
* Copyright (c) 1999 MAEKAWA Masahide <bishop@rr.iij4u.or.jp>, * Copyright (c) 1999 MAEKAWA Masahide <bishop@rr.iij4u.or.jp>,
* Nick Hibma <n_hibma@freebsd.org> * Nick Hibma <n_hibma@freebsd.org>
@ -176,9 +176,8 @@ struct umass_softc {
#define UMASS_CPROTO_ISD_ATA 5 #define UMASS_CPROTO_ISD_ATA 5
u_int32_t sc_quirks; u_int32_t sc_quirks;
#define UMASS_QUIRK_FORCE_SHORT_INQUIRY 0x00000001 #define UMASS_QUIRK_WRONG_CSWSIG 0x00000001
#define UMASS_QUIRK_WRONG_CSWSIG 0x00000002 #define UMASS_QUIRK_WRONG_CSWTAG 0x00000002
#define UMASS_QUIRK_WRONG_CSWTAG 0x00000004
u_int32_t sc_busquirks; u_int32_t sc_busquirks;