diff options
-rw-r--r-- | sys/dev/ata/atascsi.c | 3 | ||||
-rw-r--r-- | sys/dev/ic/mpi.c | 3 | ||||
-rw-r--r-- | sys/dev/pci/mpii.c | 3 | ||||
-rw-r--r-- | sys/dev/usb/umass_quirks.c | 6 | ||||
-rw-r--r-- | sys/dev/usb/umass_scsi.c | 8 | ||||
-rw-r--r-- | sys/scsi/cd.c | 9 | ||||
-rw-r--r-- | sys/scsi/scsiconf.h | 4 | ||||
-rw-r--r-- | sys/scsi/sd.c | 8 |
8 files changed, 16 insertions, 28 deletions
diff --git a/sys/dev/ata/atascsi.c b/sys/dev/ata/atascsi.c index 803b8ec5009..94024c81ea9 100644 --- a/sys/dev/ata/atascsi.c +++ b/sys/dev/ata/atascsi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: atascsi.c,v 1.143 2020/07/22 13:16:04 krw Exp $ */ +/* $OpenBSD: atascsi.c,v 1.144 2020/08/26 13:57:19 krw Exp $ */ /* * Copyright (c) 2007 David Gwynne <dlg@openbsd.org> @@ -258,7 +258,6 @@ atascsi_probe(struct scsi_link *link) break; case ATA_PORT_T_ATAPI: link->flags |= SDEV_ATAPI; - link->quirks |= SDEV_ONLYBIG; break; case ATA_PORT_T_PM: if (link->lun != 0) { diff --git a/sys/dev/ic/mpi.c b/sys/dev/ic/mpi.c index 76f63ee17ba..bc365c6de1f 100644 --- a/sys/dev/ic/mpi.c +++ b/sys/dev/ic/mpi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mpi.c,v 1.221 2020/07/20 14:41:13 krw Exp $ */ +/* $OpenBSD: mpi.c,v 1.222 2020/08/26 13:57:19 krw Exp $ */ /* * Copyright (c) 2005, 2006, 2009 David Gwynne <dlg@openbsd.org> @@ -1682,7 +1682,6 @@ mpi_scsi_probe(struct scsi_link *link) DNPRINTF(MPI_D_MISC, "%s: target %d is an ATAPI device\n", DEVNAME(sc), link->target); link->flags |= SDEV_ATAPI; - link->quirks |= SDEV_ONLYBIG; } return (0); diff --git a/sys/dev/pci/mpii.c b/sys/dev/pci/mpii.c index 881a6f9f2c8..90e7f09e16a 100644 --- a/sys/dev/pci/mpii.c +++ b/sys/dev/pci/mpii.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mpii.c,v 1.138 2020/07/22 13:16:04 krw Exp $ */ +/* $OpenBSD: mpii.c,v 1.139 2020/08/26 13:57:19 krw Exp $ */ /* * Copyright (c) 2010, 2012 Mike Belopuhov * Copyright (c) 2009 James Giannoules @@ -954,7 +954,6 @@ mpii_scsi_probe(struct scsi_link *link) if (ISSET(lemtoh32(&pg0.device_info), MPII_CFG_SAS_DEV_0_DEVINFO_ATAPI_DEVICE)) { link->flags |= SDEV_ATAPI; - link->quirks |= SDEV_ONLYBIG; } return (0); diff --git a/sys/dev/usb/umass_quirks.c b/sys/dev/usb/umass_quirks.c index 8c1d6f4a165..d19fc5a41f6 100644 --- a/sys/dev/usb/umass_quirks.c +++ b/sys/dev/usb/umass_quirks.c @@ -1,4 +1,4 @@ -/* $OpenBSD: umass_quirks.c,v 1.33 2020/06/22 15:54:55 tobhe Exp $ */ +/* $OpenBSD: umass_quirks.c,v 1.34 2020/08/26 13:57:20 krw Exp $ */ /* $NetBSD: umass_quirks.c,v 1.67 2004/06/28 07:49:16 mycroft Exp $ */ /* @@ -189,7 +189,7 @@ const struct umass_quirk umass_quirks[] = { { { USB_VENDOR_IRIVER, USB_PRODUCT_IRIVER_IFP_1XX }, UMASS_WPROTO_UNSPEC, UMASS_CPROTO_UNSPEC, 0, - SDEV_ONLYBIG, + 0, UMATCH_VENDOR_PRODUCT, NULL, NULL }, @@ -285,7 +285,7 @@ const struct umass_quirk umass_quirks[] = { { { USB_VENDOR_OLYMPUS, USB_PRODUCT_OLYMPUS_C700 }, UMASS_WPROTO_UNSPEC, UMASS_CPROTO_UNSPEC, 0, - SDEV_ONLYBIG | SDEV_NOSYNCCACHE, + SDEV_NOSYNCCACHE, UMATCH_DEVCLASS_DEVSUBCLASS_DEVPROTO, NULL, NULL }, diff --git a/sys/dev/usb/umass_scsi.c b/sys/dev/usb/umass_scsi.c index 549ca40a576..a5a94d6acab 100644 --- a/sys/dev/usb/umass_scsi.c +++ b/sys/dev/usb/umass_scsi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: umass_scsi.c,v 1.59 2020/07/29 23:56:42 krw Exp $ */ +/* $OpenBSD: umass_scsi.c,v 1.60 2020/08/26 13:57:20 krw Exp $ */ /* $NetBSD: umass_scsipi.c,v 1.9 2003/02/16 23:14:08 augustss Exp $ */ /* * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -82,7 +82,7 @@ umass_scsi_attach(struct umass_softc *sc) { struct scsibus_attach_args saa; struct umass_scsi_softc *scbus; - u_int16_t flags = SDEV_UMASS; + u_int16_t flags = 0; scbus = malloc(sizeof(*scbus), M_DEVBUF, M_WAITOK | M_ZERO); @@ -114,9 +114,9 @@ umass_scsi_attach(struct umass_softc *sc) saa.saa_adapter_target = UMASS_SCSIID_HOST; saa.saa_luns = sc->maxlun + 1; saa.saa_openings = 1; - saa.saa_quirks = SDEV_ONLYBIG | sc->sc_busquirks; + saa.saa_quirks = sc->sc_busquirks; saa.saa_pool = &scbus->sc_iopool; - saa.saa_flags = flags; + saa.saa_flags = SDEV_UMASS | flags; saa.saa_wwpn = saa.saa_wwnn = 0; sc->sc_refcnt++; diff --git a/sys/scsi/cd.c b/sys/scsi/cd.c index f785d733f29..eb38b71e56a 100644 --- a/sys/scsi/cd.c +++ b/sys/scsi/cd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cd.c,v 1.252 2020/08/22 15:07:11 krw Exp $ */ +/* $OpenBSD: cd.c,v 1.253 2020/08/26 13:57:20 krw Exp $ */ /* $NetBSD: cd.c,v 1.100 1997/04/02 02:29:30 mycroft Exp $ */ /* @@ -555,12 +555,7 @@ cdstart(struct scsi_xfer *xs) read = (bp->b_flags & B_READ); - /* - * Fill out the scsi command. If the transfer will - * fit in a "small" cdb, use it. - */ - if (!ISSET(link->flags, SDEV_ATAPI) && - !ISSET(link->quirks, SDEV_ONLYBIG) && + if (!ISSET(link->flags, SDEV_ATAPI | SDEV_UMASS) && ((secno & 0x1fffff) == secno) && ((nsecs & 0xff) == nsecs)) { /* diff --git a/sys/scsi/scsiconf.h b/sys/scsi/scsiconf.h index 8a2297ecc6c..9839c40432b 100644 --- a/sys/scsi/scsiconf.h +++ b/sys/scsi/scsiconf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: scsiconf.h,v 1.195 2020/08/16 13:39:21 krw Exp $ */ +/* $OpenBSD: scsiconf.h,v 1.196 2020/08/26 13:57:20 krw Exp $ */ /* $NetBSD: scsiconf.h,v 1.35 1997/04/02 02:29:38 mycroft Exp $ */ /* @@ -309,7 +309,7 @@ struct scsi_link { #define ADEV_LITTLETOC 0x0400 /* little-endian TOC - ATAPI */ #define ADEV_NOCAPACITY 0x0800 /* no READ CD CAPACITY */ #define ADEV_NODOORLOCK 0x2000 /* can't lock door */ -#define SDEV_ONLYBIG 0x4000 /* always use READ_BIG and WRITE_BIG */ +#define SDEV_ONLYBIG 0x4000 /* avoid 6 byte READ/WRITE on sd(4) */ int (*interpret_sense)(struct scsi_xfer *); void *device_softc; /* needed for call to foo_start */ struct scsibus_softc *bus; /* link to the scsibus we're on */ diff --git a/sys/scsi/sd.c b/sys/scsi/sd.c index 08ecbef65c3..7f0a47ca49b 100644 --- a/sys/scsi/sd.c +++ b/sys/scsi/sd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sd.c,v 1.318 2020/08/22 15:07:11 krw Exp $ */ +/* $OpenBSD: sd.c,v 1.319 2020/08/26 13:57:20 krw Exp $ */ /* $NetBSD: sd.c,v 1.111 1997/04/02 02:29:41 mycroft Exp $ */ /*- @@ -689,11 +689,7 @@ sdstart(struct scsi_xfer *xs) nsecs = howmany(bp->b_bcount, sc->sc_dk.dk_label->d_secsize); read = bp->b_flags & B_READ; - /* - * Fill out the scsi command. If the transfer will - * fit in a "small" cdb, use it. - */ - if (!ISSET(link->flags, SDEV_ATAPI) && + if (!ISSET(link->flags, SDEV_ATAPI | SDEV_UMASS) && !ISSET(link->quirks, SDEV_ONLYBIG) && ((secno & 0x1fffff) == secno) && ((nsecs & 0xff) == nsecs)) |