Remove UMASS_QUIRK_IGNORE_RESIDUE, instead max out the expected response
size at the actual transfer length. Fixes PR kern/42225 differently.
This commit is contained in:
parent
de7c94ffb6
commit
667f16d7f3
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: umass.c,v 1.136 2009/11/12 19:58:27 dyoung Exp $ */
|
||||
/* $NetBSD: umass.c,v 1.137 2010/02/13 02:09:41 martin Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2003 The NetBSD Foundation, Inc.
|
||||
|
@ -124,7 +124,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: umass.c,v 1.136 2009/11/12 19:58:27 dyoung Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: umass.c,v 1.137 2010/02/13 02:09:41 martin Exp $");
|
||||
|
||||
#include "atapibus.h"
|
||||
#include "scsibus.h"
|
||||
|
@ -1178,10 +1178,9 @@ umass_bbb_state(usbd_xfer_handle xfer, usbd_private_handle priv,
|
|||
|
||||
DIF(UDMASS_BBB, umass_bbb_dump_csw(sc, &sc->csw));
|
||||
|
||||
if (sc->sc_quirks & UMASS_QUIRK_IGNORE_RESIDUE)
|
||||
residue = sc->transfer_datalen - sc->transfer_actlen;
|
||||
else
|
||||
residue = UGETDW(sc->csw.dCSWDataResidue);
|
||||
residue = UGETDW(sc->csw.dCSWDataResidue);
|
||||
if (residue < sc->transfer_datalen - sc->transfer_actlen)
|
||||
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.78 2009/10/30 16:22:32 is Exp $ */
|
||||
/* $NetBSD: umass_quirks.c,v 1.79 2010/02/13 02:09:41 martin 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.78 2009/10/30 16:22:32 is Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: umass_quirks.c,v 1.79 2010/02/13 02:09:41 martin Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -229,17 +229,6 @@ 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.28 2009/10/30 16:22:32 is Exp $ */
|
||||
/* $NetBSD: umassvar.h,v 1.29 2010/02/13 02:09:41 martin Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 1999 MAEKAWA Masahide <bishop@rr.iij4u.or.jp>,
|
||||
* Nick Hibma <n_hibma@freebsd.org>
|
||||
|
@ -180,7 +180,6 @@ 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