Restore original residue quirk proposed in PR#42225, it is necessary.
This commit is contained in:
parent
66ca8ad7c3
commit
080ef1cab8
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: umass.c,v 1.138 2010/02/13 02:16:51 martin Exp $ */
|
||||
/* $NetBSD: umass.c,v 1.139 2011/07/31 16:32:02 jakllsch Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2003 The NetBSD Foundation, Inc.
|
||||
|
@ -124,7 +124,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: umass.c,v 1.138 2010/02/13 02:16:51 martin Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: umass.c,v 1.139 2011/07/31 16:32:02 jakllsch Exp $");
|
||||
|
||||
#include "atapibus.h"
|
||||
#include "scsibus.h"
|
||||
|
@ -1178,9 +1178,11 @@ umass_bbb_state(usbd_xfer_handle xfer, usbd_private_handle priv,
|
|||
|
||||
DIF(UDMASS_BBB, umass_bbb_dump_csw(sc, &sc->csw));
|
||||
|
||||
residue = UGETDW(sc->csw.dCSWDataResidue);
|
||||
if (residue < sc->transfer_datalen - sc->transfer_actlen)
|
||||
if ((sc->sc_quirks & UMASS_QUIRK_IGNORE_RESIDUE) == 0) {
|
||||
residue = UGETDW(sc->csw.dCSWDataResidue);
|
||||
} else {
|
||||
residue = sc->transfer_datalen - sc->transfer_actlen;
|
||||
}
|
||||
|
||||
/* Translate weird command-status signatures. */
|
||||
if ((sc->sc_quirks & UMASS_QUIRK_WRONG_CSWSIG) &&
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: umass_quirks.c,v 1.84 2010/12/30 19:35:33 jakllsch Exp $ */
|
||||
/* $NetBSD: umass_quirks.c,v 1.85 2011/07/31 16:32:02 jakllsch Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2001, 2004 The NetBSD Foundation, Inc.
|
||||
|
@ -32,7 +32,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: umass_quirks.c,v 1.84 2010/12/30 19:35:33 jakllsch Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: umass_quirks.c,v 1.85 2011/07/31 16:32:02 jakllsch Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -286,6 +286,15 @@ Static const struct umass_quirk umass_quirks[] = {
|
|||
UMATCH_VENDOR_PRODUCT,
|
||||
NULL, NULL
|
||||
},
|
||||
|
||||
/* Devices with bad residue. */
|
||||
{ { USB_VENDOR_SUPERTOP, USB_PRODUCT_SUPERTOP_IDEBRIDGE },
|
||||
UMASS_WPROTO_UNSPEC, UMASS_CPROTO_UNSPEC,
|
||||
UMASS_QUIRK_IGNORE_RESIDUE,
|
||||
0,
|
||||
UMATCH_VENDOR_PRODUCT,
|
||||
NULL, NULL
|
||||
},
|
||||
};
|
||||
|
||||
const struct umass_quirk *
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: umassvar.h,v 1.30 2010/11/03 22:34:24 dyoung Exp $ */
|
||||
/* $NetBSD: umassvar.h,v 1.31 2011/07/31 16:32:02 jakllsch Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 1999 MAEKAWA Masahide <bishop@rr.iij4u.or.jp>,
|
||||
* Nick Hibma <n_hibma@freebsd.org>
|
||||
|
@ -180,6 +180,7 @@ struct umass_softc {
|
|||
#define UMASS_QUIRK_WRONG_CSWTAG 0x00000002
|
||||
#define UMASS_QUIRK_RBC_PAD_TO_12 0x00000004
|
||||
#define UMASS_QUIRK_NOGETMAXLUN 0x00000008
|
||||
#define UMASS_QUIRK_IGNORE_RESIDUE 0x00000010
|
||||
|
||||
#define UMASS_QUIRK_USE_DEFAULTMATCH -1
|
||||
|
||||
|
|
Loading…
Reference in New Issue