diff --git a/sys/dev/usb/umass.c b/sys/dev/usb/umass.c index fe5e3779ee73..d8c3bac2c2f7 100644 --- a/sys/dev/usb/umass.c +++ b/sys/dev/usb/umass.c @@ -1,4 +1,4 @@ -/* $NetBSD: umass.c,v 1.31 2000/04/03 12:31:34 augustss Exp $ */ +/* $NetBSD: umass.c,v 1.32 2000/04/04 20:16:47 augustss Exp $ */ /*- * Copyright (c) 1999 MAEKAWA Masahide , * Nick Hibma @@ -773,6 +773,7 @@ USB_ATTACH(umass) USB_ATTACH_START(umass, sc, uaa); usb_interface_descriptor_t *id; usb_endpoint_descriptor_t *ed; + const char *sSubclass, *sProto; char devinfo[1024]; int i, bno; int err; @@ -803,36 +804,45 @@ USB_ATTACH(umass) id = usbd_get_interface_descriptor(sc->iface); printf("%s: %s\n", USBDEVNAME(sc->sc_dev), devinfo); - printf("%s: using ", USBDEVNAME(sc->sc_dev)); - switch (sc->proto & PROTO_COMMAND) { - case PROTO_SCSI: - printf("SCSI"); + switch (id->bInterfaceSubClass) { + case UISUBCLASS_SCSI: + sSubclass = "SCSI"; break; - case PROTO_8070: - printf("8070i"); + case UISUBCLASS_UFI: + sSubclass = "UFI"; break; - case PROTO_UFI: - printf("UFI"); + case UISUBCLASS_SFF8020I: + sSubclass = "SFF8020i"; + break; + case UISUBCLASS_SFF8070I: + sSubclass = "SFF8070i"; + break; + case UISUBCLASS_QIC157: + sSubclass = "QIC157"; break; default: - printf("(unknown 0x%02x)", sc->proto&PROTO_COMMAND); + sSubclass = "unknown"; break; } - printf(" over "); - switch (sc->proto & PROTO_WIRE) { - case PROTO_BBB: - printf("Bulk-Only"); + switch (id->bInterfaceProtocol) { + case UIPROTO_MASS_CBI: + sProto = "CBI"; break; - case PROTO_CBI: /* uses Command/Bulk pipes */ - printf("CBI"); + case UIPROTO_MASS_CBI_I: + sProto = "CBI-I"; break; - case PROTO_CBI_I: /* uses Command/Bulk/Interrupt pipes */ - printf("CBI with CCI"); + case UIPROTO_MASS_BBB: + sProto = "BBB"; + break; + case UIPROTO_MASS_BBB_P: + sProto = "BBB-P"; break; default: - printf("(unknown 0x%02x)", sc->proto&PROTO_WIRE); + sProto = "unknown"; + break; } - printf("\n"); + printf("%s: using %s over %s\n", USBDEVNAME(sc->sc_dev), sSubclass, + sProto); /* * In addition to the Control endpoint the following endpoints