diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2007-10-11 18:33:16 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2007-10-11 18:33:16 +0000 |
commit | c8d027b7c2c9478cc6134a64ce7f4493c4f31d03 (patch) | |
tree | d059b171ccae4a9b91e72ce31662e4163fb1e943 /sys/dev/usb/if_atu.c | |
parent | cb538c3cbe26e67bac2b85c75da7259a005d264e (diff) |
treat usb vendor/product names as a locator, and have usbd_print handle it,
so that it shows up before the :. as a result, all the usb devices do not
need to have name printing code anymore. all this now works and prints
nicely because usbd_probe_and_attach() is serialized. ok kettenis
Diffstat (limited to 'sys/dev/usb/if_atu.c')
-rw-r--r-- | sys/dev/usb/if_atu.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/sys/dev/usb/if_atu.c b/sys/dev/usb/if_atu.c index f5369d0d276..b595de6dc3a 100644 --- a/sys/dev/usb/if_atu.c +++ b/sys/dev/usb/if_atu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_atu.c,v 1.88 2007/10/06 16:01:17 jsg Exp $ */ +/* $OpenBSD: if_atu.c,v 1.89 2007/10/11 18:33:13 deraadt Exp $ */ /* * Copyright (c) 2003, 2004 * Daan Vreeken <Danovitsch@Vitsch.net>. All rights reserved. @@ -1254,7 +1254,6 @@ atu_attach(struct device *parent, struct device *self, void *aux) { struct atu_softc *sc = (struct atu_softc *)self; struct usb_attach_arg *uaa = aux; - char *devinfop; usbd_status err; usbd_device_handle dev = uaa->device; u_int8_t mode, channel; @@ -1262,10 +1261,6 @@ atu_attach(struct device *parent, struct device *self, void *aux) sc->sc_state = ATU_S_UNCONFIG; - devinfop = usbd_devinfo_alloc(dev, 0); - printf("\n%s: %s", sc->atu_dev.dv_xname, devinfop); - usbd_devinfo_free(devinfop); - err = usbd_set_config_no(dev, ATU_CONFIG_NO, 1); if (err) { printf("%s: setting config no failed\n", @@ -1313,8 +1308,6 @@ atu_attach(struct device *parent, struct device *self, void *aux) DPRINTF(("%s: starting internal firmware download\n", sc->atu_dev.dv_xname)); - printf("\n"); - if (rootvp == NULL) mountroothook_establish(atu_internal_firmware, sc); else @@ -1407,7 +1400,7 @@ atu_complete_attach(struct atu_softc *sc) /* read device config & get MAC address */ err = atu_get_card_config(sc); if (err) { - printf("\n%s: could not get card cfg!\n", + printf("%s: could not get card cfg!\n", sc->atu_dev.dv_xname); return; } @@ -1427,7 +1420,8 @@ atu_complete_attach(struct atu_softc *sc) #endif /* ATU_DEBUG */ /* Show the world our MAC address */ - printf(", address %s\n", ether_sprintf(ic->ic_myaddr)); + printf("%s: address %s\n", sc->atu_dev.dv_xname, + ether_sprintf(ic->ic_myaddr)); sc->atu_cdata.atu_tx_inuse = 0; |