-/* $OpenBSD: umass_scsi.c,v 1.63 2022/04/16 19:19:59 naddy Exp $ */
+/* $OpenBSD: umass_scsi.c,v 1.64 2023/05/10 15:28:26 krw Exp $ */
/* $NetBSD: umass_scsipi.c,v 1.9 2003/02/16 23:14:08 augustss Exp $ */
/*
* Copyright (c) 2001 The NetBSD Foundation, Inc.
sc->sc_dev.dv_xname, sc, scbus));
break;
case UMASS_CPROTO_UFI:
+ flags |= SDEV_UFI | SDEV_ATAPI;
+ DPRINTF(UDMASS_USB, ("%s: umass_attach_bus: UFI\n"
+ "sc = 0x%p, scbus = 0x%p\n",
+ sc->sc_dev.dv_xname, sc, scbus));
+ break;
case UMASS_CPROTO_ATAPI:
flags |= SDEV_ATAPI;
DPRINTF(UDMASS_USB, ("%s: umass_attach_bus: ATAPI\n"
-/* $OpenBSD: scsiconf.h,v 1.201 2022/04/16 19:19:59 naddy Exp $ */
+/* $OpenBSD: scsiconf.h,v 1.202 2023/05/10 15:28:26 krw Exp $ */
/* $NetBSD: scsiconf.h,v 1.35 1997/04/02 02:29:38 mycroft Exp $ */
/*
#define SDEV_UMASS 0x0400 /* device is UMASS SCSI */
#define SDEV_VIRTUAL 0x0800 /* device is virtualised on the hba */
#define SDEV_OWN_IOPL 0x1000 /* scsibus */
+#define SDEV_UFI 0x2000 /* Universal Floppy Interface */
u_int16_t quirks; /* per-device oddities */
#define SDEV_AUTOSAVE 0x0001 /* do implicit SAVEDATAPOINTER on disconnect */
#define SDEV_NOSYNC 0x0002 /* does not grok SDTR */
-/* $OpenBSD: sd.c,v 1.333 2022/10/23 14:39:19 krw Exp $ */
+/* $OpenBSD: sd.c,v 1.334 2023/05/10 15:28:26 krw Exp $ */
/* $NetBSD: sd.c,v 1.111 1997/04/02 02:29:41 mycroft Exp $ */
/*-
/* As long as it's not 0 - readdisklabel divides by it. */
}
- lp->d_type = DTYPE_SCSI;
- if ((link->inqdata.device & SID_TYPE) == T_OPTICAL)
- strncpy(lp->d_typename, "SCSI optical",
- sizeof(lp->d_typename));
- else
- strncpy(lp->d_typename, "SCSI disk",
+ if (ISSET(link->flags, SDEV_UFI)) {
+ lp->d_type = DTYPE_FLOPPY;
+ strncpy(lp->d_typename, "USB floppy disk",
sizeof(lp->d_typename));
+ } else {
+ lp->d_type = DTYPE_SCSI;
+ if ((link->inqdata.device & SID_TYPE) == T_OPTICAL)
+ strncpy(lp->d_typename, "SCSI optical",
+ sizeof(lp->d_typename));
+ else
+ strncpy(lp->d_typename, "SCSI disk",
+ sizeof(lp->d_typename));
+ }
/*
* Try to fit '<vendor> <product>' into d_packname. If that doesn't fit