kern/12837: Provide a way to get working devices that violate the usb spec by
returning a non-matching CSW tag. Defined a quirk for this and set it for Scanlogic SL11R, which gets my NEO Jukebox working.
This commit is contained in:
parent
eebbb33967
commit
6278998229
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: umass.c,v 1.90 2002/11/04 19:17:33 pooka Exp $ */
|
||||
/* $NetBSD: umass.c,v 1.91 2002/12/06 03:57:51 erh Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 1999 MAEKAWA Masahide <bishop@rr.iij4u.or.jp>,
|
||||
* Nick Hibma <n_hibma@freebsd.org>
|
||||
@ -94,7 +94,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: umass.c,v 1.90 2002/11/04 19:17:33 pooka Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: umass.c,v 1.91 2002/12/06 03:57:51 erh Exp $");
|
||||
|
||||
#include "atapibus.h"
|
||||
#include "scsibus.h"
|
||||
@ -1120,6 +1120,10 @@ umass_bbb_state(usbd_xfer_handle xfer, usbd_private_handle priv,
|
||||
UGETDW(sc->csw.dCSWSignature) == CSWSIGNATURE_OLYMPUS_C1)
|
||||
USETDW(sc->csw.dCSWSignature, CSWSIGNATURE);
|
||||
|
||||
/* Translate invalid command-status tags */
|
||||
if (sc->sc_quirks & UMASS_QUIRK_WRONG_CSWTAG)
|
||||
USETDW(sc->csw.dCSWTag, UGETDW(sc->cbw.dCBWTag));
|
||||
|
||||
/* Check CSW and handle any error */
|
||||
if (UGETDW(sc->csw.dCSWSignature) != CSWSIGNATURE) {
|
||||
/* Invalid CSW: Wrong signature or wrong tag might
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: umass_quirks.c,v 1.27 2002/11/28 10:08:28 gehenna Exp $ */
|
||||
/* $NetBSD: umass_quirks.c,v 1.28 2002/12/06 03:57:51 erh Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2001 The NetBSD Foundation, Inc.
|
||||
@ -236,7 +236,7 @@ Static const struct umass_quirk umass_quirks[] = {
|
||||
|
||||
{ { USB_VENDOR_SCANLOGIC, USB_PRODUCT_SCANLOGIC_SL11R },
|
||||
UMASS_WPROTO_UNSPEC, UMASS_CPROTO_UFI,
|
||||
0,
|
||||
UMASS_QUIRK_WRONG_CSWTAG,
|
||||
0,
|
||||
UMATCH_VENDOR_PRODUCT,
|
||||
NULL, NULL
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: umassvar.h,v 1.16 2002/07/11 21:14:32 augustss Exp $ */
|
||||
/* $NetBSD: umassvar.h,v 1.17 2002/12/06 03:57:51 erh Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 1999 MAEKAWA Masahide <bishop@rr.iij4u.or.jp>,
|
||||
* Nick Hibma <n_hibma@freebsd.org>
|
||||
@ -178,11 +178,12 @@ struct umass_softc {
|
||||
#define UMASS_CPROTO_ISD_ATA 5
|
||||
|
||||
u_int32_t sc_quirks;
|
||||
#define UMASS_QUIRK_RS_NO_CLEAR_UA 0x00000002
|
||||
#define UMASS_QUIRK_NO_START_STOP 0x00000004
|
||||
#define UMASS_QUIRK_FORCE_SHORT_INQUIRY 0x00000008
|
||||
#define UMASS_QUIRK_WRONG_CSWSIG 0x00000010
|
||||
#define UMASS_QUIRK_NO_MAX_LUN 0x00000020
|
||||
#define UMASS_QUIRK_RS_NO_CLEAR_UA 0x00000002
|
||||
#define UMASS_QUIRK_NO_START_STOP 0x00000004
|
||||
#define UMASS_QUIRK_FORCE_SHORT_INQUIRY 0x00000008
|
||||
#define UMASS_QUIRK_WRONG_CSWSIG 0x00000010
|
||||
#define UMASS_QUIRK_NO_MAX_LUN 0x00000020
|
||||
#define UMASS_QUIRK_WRONG_CSWTAG 0x00000040
|
||||
|
||||
u_int32_t sc_busquirks;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user