Make protocol message more accurate.
This commit is contained in:
parent
a94b555441
commit
36b5d25ca8
|
@ -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 <bishop@rr.iij4u.or.jp>,
|
* Copyright (c) 1999 MAEKAWA Masahide <bishop@rr.iij4u.or.jp>,
|
||||||
* Nick Hibma <n_hibma@freebsd.org>
|
* Nick Hibma <n_hibma@freebsd.org>
|
||||||
|
@ -773,6 +773,7 @@ USB_ATTACH(umass)
|
||||||
USB_ATTACH_START(umass, sc, uaa);
|
USB_ATTACH_START(umass, sc, uaa);
|
||||||
usb_interface_descriptor_t *id;
|
usb_interface_descriptor_t *id;
|
||||||
usb_endpoint_descriptor_t *ed;
|
usb_endpoint_descriptor_t *ed;
|
||||||
|
const char *sSubclass, *sProto;
|
||||||
char devinfo[1024];
|
char devinfo[1024];
|
||||||
int i, bno;
|
int i, bno;
|
||||||
int err;
|
int err;
|
||||||
|
@ -803,36 +804,45 @@ USB_ATTACH(umass)
|
||||||
id = usbd_get_interface_descriptor(sc->iface);
|
id = usbd_get_interface_descriptor(sc->iface);
|
||||||
printf("%s: %s\n", USBDEVNAME(sc->sc_dev), devinfo);
|
printf("%s: %s\n", USBDEVNAME(sc->sc_dev), devinfo);
|
||||||
|
|
||||||
printf("%s: using ", USBDEVNAME(sc->sc_dev));
|
switch (id->bInterfaceSubClass) {
|
||||||
switch (sc->proto & PROTO_COMMAND) {
|
case UISUBCLASS_SCSI:
|
||||||
case PROTO_SCSI:
|
sSubclass = "SCSI";
|
||||||
printf("SCSI");
|
|
||||||
break;
|
break;
|
||||||
case PROTO_8070:
|
case UISUBCLASS_UFI:
|
||||||
printf("8070i");
|
sSubclass = "UFI";
|
||||||
break;
|
break;
|
||||||
case PROTO_UFI:
|
case UISUBCLASS_SFF8020I:
|
||||||
printf("UFI");
|
sSubclass = "SFF8020i";
|
||||||
|
break;
|
||||||
|
case UISUBCLASS_SFF8070I:
|
||||||
|
sSubclass = "SFF8070i";
|
||||||
|
break;
|
||||||
|
case UISUBCLASS_QIC157:
|
||||||
|
sSubclass = "QIC157";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
printf("(unknown 0x%02x)", sc->proto&PROTO_COMMAND);
|
sSubclass = "unknown";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
printf(" over ");
|
switch (id->bInterfaceProtocol) {
|
||||||
switch (sc->proto & PROTO_WIRE) {
|
case UIPROTO_MASS_CBI:
|
||||||
case PROTO_BBB:
|
sProto = "CBI";
|
||||||
printf("Bulk-Only");
|
|
||||||
break;
|
break;
|
||||||
case PROTO_CBI: /* uses Command/Bulk pipes */
|
case UIPROTO_MASS_CBI_I:
|
||||||
printf("CBI");
|
sProto = "CBI-I";
|
||||||
break;
|
break;
|
||||||
case PROTO_CBI_I: /* uses Command/Bulk/Interrupt pipes */
|
case UIPROTO_MASS_BBB:
|
||||||
printf("CBI with CCI");
|
sProto = "BBB";
|
||||||
|
break;
|
||||||
|
case UIPROTO_MASS_BBB_P:
|
||||||
|
sProto = "BBB-P";
|
||||||
break;
|
break;
|
||||||
default:
|
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
|
* In addition to the Control endpoint the following endpoints
|
||||||
|
|
Loading…
Reference in New Issue