Consistent/Correct error message from failing usbd_set_config.

Use aprint_error_dev.
This commit is contained in:
skrll 2012-12-27 16:42:32 +00:00
parent e60ee66c05
commit 897388ea60
26 changed files with 123 additions and 94 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: aubtfwl.c,v 1.3 2011/12/23 00:51:43 jakllsch Exp $ */ /* $NetBSD: aubtfwl.c,v 1.4 2012/12/27 16:42:32 skrll Exp $ */
/* /*
* Copyright (c) 2011 Jonathan A. Kollasch * Copyright (c) 2011 Jonathan A. Kollasch
@ -27,7 +27,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: aubtfwl.c,v 1.3 2011/12/23 00:51:43 jakllsch Exp $"); __KERNEL_RCSID(0, "$NetBSD: aubtfwl.c,v 1.4 2012/12/27 16:42:32 skrll Exp $");
#include <sys/param.h> #include <sys/param.h>
#include <dev/usb/usb.h> #include <dev/usb/usb.h>
@ -110,7 +110,8 @@ aubtfwl_attach_hook(device_t self)
error = usbd_set_config_no(sc->sc_udev, 1, 0); error = usbd_set_config_no(sc->sc_udev, 1, 0);
if (error != 0) { if (error != 0) {
aprint_error_dev(self, "could not set configuration no\n"); aprint_error_dev(self, "failed to set configuration"
", err=%s\n", usbd_errstr(error));
goto out_firmware; goto out_firmware;
} }

View File

@ -1,4 +1,4 @@
/* $NetBSD: emdtv.c,v 1.8 2012/03/11 01:06:06 mrg Exp $ */ /* $NetBSD: emdtv.c,v 1.9 2012/12/27 16:42:32 skrll Exp $ */
/*- /*-
* Copyright (c) 2008, 2011 Jared D. McNeill <jmcneill@invisible.ca> * Copyright (c) 2008, 2011 Jared D. McNeill <jmcneill@invisible.ca>
@ -27,7 +27,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: emdtv.c,v 1.8 2012/03/11 01:06:06 mrg Exp $"); __KERNEL_RCSID(0, "$NetBSD: emdtv.c,v 1.9 2012/12/27 16:42:32 skrll Exp $");
#include <sys/param.h> #include <sys/param.h>
#include <sys/systm.h> #include <sys/systm.h>
@ -128,7 +128,8 @@ emdtv_attach(device_t parent, device_t self, void *opaque)
status = usbd_set_config_no(sc->sc_udev, 1, 1); status = usbd_set_config_no(sc->sc_udev, 1, 1);
if (status != USBD_NORMAL_COMPLETION) { if (status != USBD_NORMAL_COMPLETION) {
aprint_error_dev(sc->sc_dev, "couldn't set config no\n"); aprint_error_dev(sc->sc_dev, "failed to set configuration"
", err=%s\n", usbd_errstr(status));
return; return;
} }

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_atu.c,v 1.44 2012/09/23 01:08:17 chs Exp $ */ /* $NetBSD: if_atu.c,v 1.45 2012/12/27 16:42:32 skrll Exp $ */
/* $OpenBSD: if_atu.c,v 1.48 2004/12/30 01:53:21 dlg Exp $ */ /* $OpenBSD: if_atu.c,v 1.48 2004/12/30 01:53:21 dlg Exp $ */
/* /*
* Copyright (c) 2003, 2004 * Copyright (c) 2003, 2004
@ -48,7 +48,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_atu.c,v 1.44 2012/09/23 01:08:17 chs Exp $"); __KERNEL_RCSID(0, "$NetBSD: if_atu.c,v 1.45 2012/12/27 16:42:32 skrll Exp $");
#include <sys/param.h> #include <sys/param.h>
@ -1257,7 +1257,8 @@ atu_attach(device_t parent, device_t self, void *aux)
err = usbd_set_config_no(dev, ATU_CONFIG_NO, 1); err = usbd_set_config_no(dev, ATU_CONFIG_NO, 1);
if (err) { if (err) {
aprint_error_dev(self, "setting config no failed\n"); aprint_error_dev(self, "failed to set configuration"
", err=%s\n", usbd_errstr(err));
return; return;
} }

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_aue.c,v 1.127 2012/07/22 14:33:05 matt Exp $ */ /* $NetBSD: if_aue.c,v 1.128 2012/12/27 16:42:32 skrll Exp $ */
/* /*
* Copyright (c) 1997, 1998, 1999, 2000 * Copyright (c) 1997, 1998, 1999, 2000
@ -78,7 +78,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_aue.c,v 1.127 2012/07/22 14:33:05 matt Exp $"); __KERNEL_RCSID(0, "$NetBSD: if_aue.c,v 1.128 2012/12/27 16:42:32 skrll Exp $");
#include "opt_inet.h" #include "opt_inet.h"
@ -745,7 +745,8 @@ aue_attach(device_t parent, device_t self, void *aux)
err = usbd_set_config_no(dev, AUE_CONFIG_NO, 1); err = usbd_set_config_no(dev, AUE_CONFIG_NO, 1);
if (err) { if (err) {
aprint_error_dev(self, "setting config no failed\n"); aprint_error_dev(self, "failed to set configuration"
", err=%s\n", usbd_errstr(err));
return; return;
} }

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_axe.c,v 1.60 2012/11/26 21:15:34 christos Exp $ */ /* $NetBSD: if_axe.c,v 1.61 2012/12/27 16:42:32 skrll Exp $ */
/* $OpenBSD: if_axe.c,v 1.96 2010/01/09 05:33:08 jsg Exp $ */ /* $OpenBSD: if_axe.c,v 1.96 2010/01/09 05:33:08 jsg Exp $ */
/* /*
@ -89,7 +89,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_axe.c,v 1.60 2012/11/26 21:15:34 christos Exp $"); __KERNEL_RCSID(0, "$NetBSD: if_axe.c,v 1.61 2012/12/27 16:42:32 skrll Exp $");
#if defined(_KERNEL_OPT) #if defined(_KERNEL_OPT)
#include "opt_inet.h" #include "opt_inet.h"
@ -603,7 +603,8 @@ axe_attach(device_t parent, device_t self, void *aux)
err = usbd_set_config_no(dev, AXE_CONFIG_NO, 1); err = usbd_set_config_no(dev, AXE_CONFIG_NO, 1);
if (err) { if (err) {
aprint_error_dev(self, "getting interface handle failed\n"); aprint_error_dev(self, "failed to set configuration"
", err=%s\n", usbd_errstr(err));
return; return;
} }

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_cue.c,v 1.63 2012/03/11 01:06:06 mrg Exp $ */ /* $NetBSD: if_cue.c,v 1.64 2012/12/27 16:42:32 skrll Exp $ */
/* /*
* Copyright (c) 1997, 1998, 1999, 2000 * Copyright (c) 1997, 1998, 1999, 2000
* Bill Paul <wpaul@ee.columbia.edu>. All rights reserved. * Bill Paul <wpaul@ee.columbia.edu>. All rights reserved.
@ -56,7 +56,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_cue.c,v 1.63 2012/03/11 01:06:06 mrg Exp $"); __KERNEL_RCSID(0, "$NetBSD: if_cue.c,v 1.64 2012/12/27 16:42:32 skrll Exp $");
#include "opt_inet.h" #include "opt_inet.h"
@ -477,7 +477,8 @@ cue_attach(device_t parent, device_t self, void *aux)
err = usbd_set_config_no(dev, CUE_CONFIG_NO, 1); err = usbd_set_config_no(dev, CUE_CONFIG_NO, 1);
if (err) { if (err) {
aprint_error_dev(self, "setting config no failed\n"); aprint_error_dev(self, "failed to set configuration"
", err=%s\n", usbd_errstr(err));
return; return;
} }

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_kue.c,v 1.77 2012/03/11 01:06:06 mrg Exp $ */ /* $NetBSD: if_kue.c,v 1.78 2012/12/27 16:42:32 skrll Exp $ */
/* /*
* Copyright (c) 1997, 1998, 1999, 2000 * Copyright (c) 1997, 1998, 1999, 2000
@ -71,7 +71,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_kue.c,v 1.77 2012/03/11 01:06:06 mrg Exp $"); __KERNEL_RCSID(0, "$NetBSD: if_kue.c,v 1.78 2012/12/27 16:42:32 skrll Exp $");
#include "opt_inet.h" #include "opt_inet.h"
@ -417,7 +417,8 @@ kue_attach(device_t parent, device_t self, void *aux)
err = usbd_set_config_no(dev, KUE_CONFIG_NO, 1); err = usbd_set_config_no(dev, KUE_CONFIG_NO, 1);
if (err) { if (err) {
aprint_error_dev(self, " setting config no failed\n"); aprint_error_dev(self, "failed to set configuration"
", err=%s\n", usbd_errstr(err));
return; return;
} }

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_otus.c,v 1.16 2012/12/27 14:47:27 christos Exp $ */ /* $NetBSD: if_otus.c,v 1.17 2012/12/27 16:42:32 skrll Exp $ */
/* $OpenBSD: if_otus.c,v 1.18 2010/08/27 17:08:00 jsg Exp $ */ /* $OpenBSD: if_otus.c,v 1.18 2010/08/27 17:08:00 jsg Exp $ */
/*- /*-
@ -18,7 +18,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_otus.c,v 1.16 2012/12/27 14:47:27 christos Exp $"); __KERNEL_RCSID(0, "$NetBSD: if_otus.c,v 1.17 2012/12/27 16:42:32 skrll Exp $");
/*- /*-
* Driver for Atheros AR9001U chipset. * Driver for Atheros AR9001U chipset.
* http://www.atheros.com/pt/bulletins/AR9001USBBulletin.pdf * http://www.atheros.com/pt/bulletins/AR9001USBBulletin.pdf
@ -611,9 +611,10 @@ otus_attach(device_t parent, device_t self, void *aux)
sc->sc_amrr.amrr_min_success_threshold = 1; sc->sc_amrr.amrr_min_success_threshold = 1;
sc->sc_amrr.amrr_max_success_threshold = 10; sc->sc_amrr.amrr_max_success_threshold = 10;
if (usbd_set_config_no(sc->sc_udev, 1, 0) != 0) { error = usbd_set_config_no(sc->sc_udev, 1, 0);
aprint_error_dev(sc->sc_dev, if (error != 0) {
"could not set configuration no\n"); aprint_error_dev(sc->sc_dev, "failed to set configuration"
", err=%s\n", usbd_errstr(error));
return; return;
} }

View File

@ -1,5 +1,5 @@
/* $OpenBSD: if_rum.c,v 1.40 2006/09/18 16:20:20 damien Exp $ */ /* $OpenBSD: if_rum.c,v 1.40 2006/09/18 16:20:20 damien Exp $ */
/* $NetBSD: if_rum.c,v 1.43 2012/09/23 01:08:17 chs Exp $ */ /* $NetBSD: if_rum.c,v 1.44 2012/12/27 16:42:32 skrll Exp $ */
/*- /*-
* Copyright (c) 2005-2007 Damien Bergamini <damien.bergamini@free.fr> * Copyright (c) 2005-2007 Damien Bergamini <damien.bergamini@free.fr>
@ -24,7 +24,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_rum.c,v 1.43 2012/09/23 01:08:17 chs Exp $"); __KERNEL_RCSID(0, "$NetBSD: if_rum.c,v 1.44 2012/12/27 16:42:32 skrll Exp $");
#include <sys/param.h> #include <sys/param.h>
@ -330,8 +330,10 @@ rum_attach(device_t parent, device_t self, void *aux)
aprint_normal_dev(self, "%s\n", devinfop); aprint_normal_dev(self, "%s\n", devinfop);
usbd_devinfo_free(devinfop); usbd_devinfo_free(devinfop);
if (usbd_set_config_no(sc->sc_udev, RT2573_CONFIG_NO, 0) != 0) { error = usbd_set_config_no(sc->sc_udev, RT2573_CONFIG_NO, 0);
aprint_error_dev(self, "could not set configuration no\n"); if (error != 0) {
aprint_error_dev(self, "failed to set configuration"
", err=%s\n", usbd_errstr(error));
return; return;
} }

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_run.c,v 1.4 2012/08/20 07:32:49 christos Exp $ */ /* $NetBSD: if_run.c,v 1.5 2012/12/27 16:42:32 skrll Exp $ */
/* $OpenBSD: if_run.c,v 1.90 2012/03/24 15:11:04 jsg Exp $ */ /* $OpenBSD: if_run.c,v 1.90 2012/03/24 15:11:04 jsg Exp $ */
/*- /*-
@ -23,7 +23,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_run.c,v 1.4 2012/08/20 07:32:49 christos Exp $"); __KERNEL_RCSID(0, "$NetBSD: if_run.c,v 1.5 2012/12/27 16:42:32 skrll Exp $");
#include <sys/param.h> #include <sys/param.h>
#include <sys/sockio.h> #include <sys/sockio.h>
@ -500,9 +500,10 @@ run_attach(device_t parent, device_t self, void *aux)
aprint_normal_dev(sc->sc_dev, "%s\n", devinfop); aprint_normal_dev(sc->sc_dev, "%s\n", devinfop);
usbd_devinfo_free(devinfop); usbd_devinfo_free(devinfop);
if (usbd_set_config_no(sc->sc_udev, 1, 0) != 0) { error = usbd_set_config_no(sc->sc_udev, 1, 0);
aprint_error_dev(sc->sc_dev, if (error != 0) {
"could not set configuration no\n"); aprint_error_dev(sc->sc_dev, "failed to set configuration"
", err=%s\n", usbd_errstr(error));
return; return;
} }

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_udav.c,v 1.38 2012/07/22 14:33:05 matt Exp $ */ /* $NetBSD: if_udav.c,v 1.39 2012/12/27 16:42:32 skrll Exp $ */
/* $nabe: if_udav.c,v 1.3 2003/08/21 16:57:19 nabe Exp $ */ /* $nabe: if_udav.c,v 1.3 2003/08/21 16:57:19 nabe Exp $ */
/* /*
@ -45,7 +45,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_udav.c,v 1.38 2012/07/22 14:33:05 matt Exp $"); __KERNEL_RCSID(0, "$NetBSD: if_udav.c,v 1.39 2012/12/27 16:42:32 skrll Exp $");
#include "opt_inet.h" #include "opt_inet.h"
@ -205,7 +205,8 @@ udav_attach(device_t parent, device_t self, void *aux)
/* Move the device into the configured state. */ /* Move the device into the configured state. */
err = usbd_set_config_no(dev, UDAV_CONFIG_NO, 1); /* idx 0 */ err = usbd_set_config_no(dev, UDAV_CONFIG_NO, 1); /* idx 0 */
if (err) { if (err) {
aprint_error_dev(self, "setting config no failed\n"); aprint_error_dev(self, "failed to set configuration"
", err=%s\n", usbd_errstr(err));
goto bad; goto bad;
} }

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_upgt.c,v 1.6 2012/03/11 01:06:06 mrg Exp $ */ /* $NetBSD: if_upgt.c,v 1.7 2012/12/27 16:42:32 skrll Exp $ */
/* $OpenBSD: if_upgt.c,v 1.49 2010/04/20 22:05:43 tedu Exp $ */ /* $OpenBSD: if_upgt.c,v 1.49 2010/04/20 22:05:43 tedu Exp $ */
/* /*
@ -18,7 +18,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_upgt.c,v 1.6 2012/03/11 01:06:06 mrg Exp $"); __KERNEL_RCSID(0, "$NetBSD: if_upgt.c,v 1.7 2012/12/27 16:42:32 skrll Exp $");
#include <sys/param.h> #include <sys/param.h>
#include <sys/callout.h> #include <sys/callout.h>
@ -244,9 +244,10 @@ upgt_attach(device_t parent, device_t self, void *aux)
return; return;
/* set configuration number */ /* set configuration number */
if (usbd_set_config_no(sc->sc_udev, UPGT_CONFIG_NO, 0) != 0) { error = usbd_set_config_no(sc->sc_udev, UPGT_CONFIG_NO, 0);
aprint_error_dev(sc->sc_dev, if (error != 0) {
"could not set configuration no\n"); aprint_error_dev(sc->sc_dev, "failed to set configuration"
", err=%s\n", usbd_errstr(error));
return; return;
} }

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_upl.c,v 1.42 2012/02/02 19:43:07 tls Exp $ */ /* $NetBSD: if_upl.c,v 1.43 2012/12/27 16:42:32 skrll Exp $ */
/* /*
* Copyright (c) 2000 The NetBSD Foundation, Inc. * Copyright (c) 2000 The NetBSD Foundation, Inc.
* All rights reserved. * All rights reserved.
@ -34,7 +34,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_upl.c,v 1.42 2012/02/02 19:43:07 tls Exp $"); __KERNEL_RCSID(0, "$NetBSD: if_upl.c,v 1.43 2012/12/27 16:42:32 skrll Exp $");
#include "opt_inet.h" #include "opt_inet.h"
@ -239,7 +239,8 @@ upl_attach(device_t parent, device_t self, void *aux)
err = usbd_set_config_no(dev, UPL_CONFIG_NO, 1); err = usbd_set_config_no(dev, UPL_CONFIG_NO, 1);
if (err) { if (err) {
aprint_error_dev(self, "setting config no failed\n"); aprint_error_dev(self, "failed to set configuration"
", err=%s\n", usbd_errstr(err));
return; return;
} }

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_ural.c,v 1.40 2012/05/31 12:32:35 nonaka Exp $ */ /* $NetBSD: if_ural.c,v 1.41 2012/12/27 16:42:32 skrll Exp $ */
/* $FreeBSD: /repoman/r/ncvs/src/sys/dev/usb/if_ural.c,v 1.40 2006/06/02 23:14:40 sam Exp $ */ /* $FreeBSD: /repoman/r/ncvs/src/sys/dev/usb/if_ural.c,v 1.40 2006/06/02 23:14:40 sam Exp $ */
/*- /*-
@ -24,7 +24,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_ural.c,v 1.40 2012/05/31 12:32:35 nonaka Exp $"); __KERNEL_RCSID(0, "$NetBSD: if_ural.c,v 1.41 2012/12/27 16:42:32 skrll Exp $");
#include <sys/param.h> #include <sys/param.h>
@ -388,8 +388,10 @@ ural_attach(device_t parent, device_t self, void *aux)
aprint_normal_dev(self, "%s\n", devinfop); aprint_normal_dev(self, "%s\n", devinfop);
usbd_devinfo_free(devinfop); usbd_devinfo_free(devinfop);
if (usbd_set_config_no(sc->sc_udev, RAL_CONFIG_NO, 0) != 0) { error = usbd_set_config_no(sc->sc_udev, RAL_CONFIG_NO, 0);
aprint_error_dev(self, "could not set configuration no\n"); if (error != 0) {
aprint_error_dev(self, "failed to set configuration"
", err=%s\n", usbd_errstr(error));
return; return;
} }

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_url.c,v 1.44 2012/07/22 14:33:06 matt Exp $ */ /* $NetBSD: if_url.c,v 1.45 2012/12/27 16:42:32 skrll Exp $ */
/* /*
* Copyright (c) 2001, 2002 * Copyright (c) 2001, 2002
@ -44,7 +44,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_url.c,v 1.44 2012/07/22 14:33:06 matt Exp $"); __KERNEL_RCSID(0, "$NetBSD: if_url.c,v 1.45 2012/12/27 16:42:32 skrll Exp $");
#include "opt_inet.h" #include "opt_inet.h"
@ -202,7 +202,8 @@ url_attach(device_t parent, device_t self, void *aux)
/* Move the device into the configured state. */ /* Move the device into the configured state. */
err = usbd_set_config_no(dev, URL_CONFIG_NO, 1); err = usbd_set_config_no(dev, URL_CONFIG_NO, 1);
if (err) { if (err) {
aprint_error_dev(self, "setting config no failed\n"); aprint_error_dev(self, "failed to set configuration"
", err=%s\n", usbd_errstr(err));
goto bad; goto bad;
} }

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_urtw.c,v 1.1 2012/05/29 14:06:23 christos Exp $ */ /* $NetBSD: if_urtw.c,v 1.2 2012/12/27 16:42:32 skrll Exp $ */
/* $OpenBSD: if_urtw.c,v 1.39 2011/07/03 15:47:17 matthew Exp $ */ /* $OpenBSD: if_urtw.c,v 1.39 2011/07/03 15:47:17 matthew Exp $ */
/*- /*-
@ -19,7 +19,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_urtw.c,v 1.1 2012/05/29 14:06:23 christos Exp $"); __KERNEL_RCSID(0, "$NetBSD: if_urtw.c,v 1.2 2012/12/27 16:42:32 skrll Exp $");
#include <sys/param.h> #include <sys/param.h>
#include <sys/sockio.h> #include <sys/sockio.h>
@ -2317,8 +2317,8 @@ urtw_init(struct ifnet *ifp)
if (!(sc->sc_flags & URTW_INIT_ONCE)) { if (!(sc->sc_flags & URTW_INIT_ONCE)) {
error = usbd_set_config_no(sc->sc_udev, URTW_CONFIG_NO, 0); error = usbd_set_config_no(sc->sc_udev, URTW_CONFIG_NO, 0);
if (error != 0) { if (error != 0) {
printf("%s: could not set configuration no\n", aprint_error_dev(sc->sc_dev, "failed to set configuration"
device_xname(sc->sc_dev)); ", err=%s\n", usbd_errstr(error));
goto fail; goto fail;
} }
/* get the first interface handle */ /* get the first interface handle */
@ -3686,8 +3686,9 @@ urtw_8187b_init(struct ifnet *ifp)
if (!(sc->sc_flags & URTW_INIT_ONCE)) { if (!(sc->sc_flags & URTW_INIT_ONCE)) {
error = usbd_set_config_no(sc->sc_udev, URTW_CONFIG_NO, 0); error = usbd_set_config_no(sc->sc_udev, URTW_CONFIG_NO, 0);
if (error != 0) { if (error != 0) {
printf("%s: could not set configuration no\n", aprint_error_dev(sc->sc_dev, "failed to set configuration"
device_xname(sc->sc_dev)); ", err=%s\n", usbd_errstr(error));
goto fail; goto fail;
} }
/* Get the first interface handle. */ /* Get the first interface handle. */

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_urtwn.c,v 1.5 2012/06/14 04:14:36 riz Exp $ */ /* $NetBSD: if_urtwn.c,v 1.6 2012/12/27 16:42:32 skrll Exp $ */
/* $OpenBSD: if_urtwn.c,v 1.20 2011/11/26 06:39:33 ckuethe Exp $ */ /* $OpenBSD: if_urtwn.c,v 1.20 2011/11/26 06:39:33 ckuethe Exp $ */
/*- /*-
@ -22,7 +22,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_urtwn.c,v 1.5 2012/06/14 04:14:36 riz Exp $"); __KERNEL_RCSID(0, "$NetBSD: if_urtwn.c,v 1.6 2012/12/27 16:42:32 skrll Exp $");
#include <sys/param.h> #include <sys/param.h>
#include <sys/sockio.h> #include <sys/sockio.h>
@ -268,8 +268,10 @@ urtwn_attach(device_t parent, device_t self, void *aux)
callout_init(&sc->sc_calib_to, 0); callout_init(&sc->sc_calib_to, 0);
callout_setfunc(&sc->sc_calib_to, urtwn_calib_to, sc); callout_setfunc(&sc->sc_calib_to, urtwn_calib_to, sc);
if (usbd_set_config_no(sc->sc_udev, 1, 0) != 0) { error = usbd_set_config_no(sc->sc_udev, 1, 0);
aprint_error_dev(self, "could not set configuration no\n"); if (error != 0) {
aprint_error_dev(self, "failed to set configuration"
", err=%s\n", usbd_errstr(error));
goto fail; goto fail;
} }

View File

@ -1,5 +1,5 @@
/* $OpenBSD: if_zyd.c,v 1.52 2007/02/11 00:08:04 jsg Exp $ */ /* $OpenBSD: if_zyd.c,v 1.52 2007/02/11 00:08:04 jsg Exp $ */
/* $NetBSD: if_zyd.c,v 1.32 2012/09/23 14:40:29 joerg Exp $ */ /* $NetBSD: if_zyd.c,v 1.33 2012/12/27 16:42:32 skrll Exp $ */
/*- /*-
* Copyright (c) 2006 by Damien Bergamini <damien.bergamini@free.fr> * Copyright (c) 2006 by Damien Bergamini <damien.bergamini@free.fr>
@ -22,7 +22,7 @@
* ZyDAS ZD1211/ZD1211B USB WLAN driver. * ZyDAS ZD1211/ZD1211B USB WLAN driver.
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_zyd.c,v 1.32 2012/09/23 14:40:29 joerg Exp $"); __KERNEL_RCSID(0, "$NetBSD: if_zyd.c,v 1.33 2012/12/27 16:42:32 skrll Exp $");
#include <sys/param.h> #include <sys/param.h>
@ -365,7 +365,8 @@ zyd_complete_attach(struct zyd_softc *sc)
error = usbd_set_config_no(sc->sc_udev, ZYD_CONFIG_NO, 1); error = usbd_set_config_no(sc->sc_udev, ZYD_CONFIG_NO, 1);
if (error != 0) { if (error != 0) {
aprint_error_dev(sc->sc_dev, "setting config no failed\n"); aprint_error_dev(sc->sc_dev, "failed to set configuration"
", err=%s\n", usbd_errstr(error));
goto fail; goto fail;
} }

View File

@ -1,4 +1,4 @@
/* $NetBSD: uberry.c,v 1.8 2011/12/23 00:51:44 jakllsch Exp $ */ /* $NetBSD: uberry.c,v 1.9 2012/12/27 16:42:32 skrll Exp $ */
/*- /*-
* Copyright (c) 2008 The NetBSD Foundation, Inc. * Copyright (c) 2008 The NetBSD Foundation, Inc.
@ -37,7 +37,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: uberry.c,v 1.8 2011/12/23 00:51:44 jakllsch Exp $"); __KERNEL_RCSID(0, "$NetBSD: uberry.c,v 1.9 2012/12/27 16:42:32 skrll Exp $");
#include <sys/param.h> #include <sys/param.h>
#include <sys/systm.h> #include <sys/systm.h>
@ -127,7 +127,8 @@ uberry_charge(struct uberry_softc *sc)
err = usbd_set_config_no(sc->sc_udev, UBERRY_CONFIG_NO, 1); err = usbd_set_config_no(sc->sc_udev, UBERRY_CONFIG_NO, 1);
if (err) { if (err) {
aprint_error_dev(sc->sc_dev, "setting config no failed\n"); aprint_error_dev(sc->sc_dev, "failed to set configuration"
", err=%s\n", usbd_errstr(err));
return; return;
} }
} }
@ -145,7 +146,8 @@ uberry_dual_mode(struct uberry_softc *sc)
err = usbd_set_config_no(sc->sc_udev, UBERRY_CONFIG_NO, 1); err = usbd_set_config_no(sc->sc_udev, UBERRY_CONFIG_NO, 1);
if (err) { if (err) {
aprint_error_dev(sc->sc_dev, "setting config no failed\n"); aprint_error_dev(sc->sc_dev, "failed to set configuration"
", err=%s\n", usbd_errstr(err));
return; return;
} }
} }

View File

@ -1,4 +1,4 @@
/* $NetBSD: udl.c,v 1.6 2011/11/20 12:29:33 nonaka Exp $ */ /* $NetBSD: udl.c,v 1.7 2012/12/27 16:42:32 skrll Exp $ */
/*- /*-
* Copyright (c) 2009 FUKAUMI Naoki. * Copyright (c) 2009 FUKAUMI Naoki.
@ -53,7 +53,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: udl.c,v 1.6 2011/11/20 12:29:33 nonaka Exp $"); __KERNEL_RCSID(0, "$NetBSD: udl.c,v 1.7 2012/12/27 16:42:32 skrll Exp $");
#include <sys/param.h> #include <sys/param.h>
#include <sys/device.h> #include <sys/device.h>
@ -361,8 +361,11 @@ udl_attach(device_t parent, device_t self, void *aux)
* Set device configuration descriptor number. * Set device configuration descriptor number.
*/ */
error = usbd_set_config_no(sc->sc_udev, 1, 0); error = usbd_set_config_no(sc->sc_udev, 1, 0);
if (error != USBD_NORMAL_COMPLETION) if (error != USBD_NORMAL_COMPLETION) {
aprint_error_dev(self, "failed to set configuration"
", err=%s\n", usbd_errstr(error));
return; return;
}
/* /*
* Create device handle to interface descriptor. * Create device handle to interface descriptor.

View File

@ -1,4 +1,4 @@
/* $NetBSD: udsbr.c,v 1.21 2012/03/11 01:06:07 mrg Exp $ */ /* $NetBSD: udsbr.c,v 1.22 2012/12/27 16:42:32 skrll Exp $ */
/* /*
* Copyright (c) 2002 The NetBSD Foundation, Inc. * Copyright (c) 2002 The NetBSD Foundation, Inc.
@ -38,7 +38,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: udsbr.c,v 1.21 2012/03/11 01:06:07 mrg Exp $"); __KERNEL_RCSID(0, "$NetBSD: udsbr.c,v 1.22 2012/12/27 16:42:32 skrll Exp $");
#include <sys/param.h> #include <sys/param.h>
#include <sys/systm.h> #include <sys/systm.h>
@ -141,7 +141,8 @@ udsbr_attach(device_t parent, device_t self, void *aux)
err = usbd_set_config_no(dev, UDSBR_CONFIG_NO, 1); err = usbd_set_config_no(dev, UDSBR_CONFIG_NO, 1);
if (err) { if (err) {
aprint_error_dev(self, "setting config no failed\n"); aprint_error_dev(self, "failed to set configuration"
", err=%s\n", usbd_errstr(err));
return; return;
} }

View File

@ -1,4 +1,4 @@
/* $NetBSD: uhso.c,v 1.9 2012/04/05 16:31:53 plunky Exp $ */ /* $NetBSD: uhso.c,v 1.10 2012/12/27 16:42:32 skrll Exp $ */
/*- /*-
* Copyright (c) 2009 Iain Hibbert * Copyright (c) 2009 Iain Hibbert
@ -37,7 +37,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: uhso.c,v 1.9 2012/04/05 16:31:53 plunky Exp $"); __KERNEL_RCSID(0, "$NetBSD: uhso.c,v 1.10 2012/12/27 16:42:32 skrll Exp $");
#include "opt_inet.h" #include "opt_inet.h"
@ -478,9 +478,8 @@ uhso_attach(device_t parent, device_t self, void *aux)
status = usbd_set_config_no(sc->sc_udev, UHSO_CONFIG_NO, 1); status = usbd_set_config_no(sc->sc_udev, UHSO_CONFIG_NO, 1);
if (status != USBD_NORMAL_COMPLETION) { if (status != USBD_NORMAL_COMPLETION) {
aprint_error_dev(self, "could not set config no %d: %s\n", aprint_error_dev(self, "failed to set configuration"
UHSO_CONFIG_NO, usbd_errstr(status)); ", err=%s\n", usbd_errstr(status));
return; return;
} }

View File

@ -1,4 +1,4 @@
/* $NetBSD: uipaq.c,v 1.18 2011/12/23 00:51:46 jakllsch Exp $ */ /* $NetBSD: uipaq.c,v 1.19 2012/12/27 16:42:32 skrll Exp $ */
/* $OpenBSD: uipaq.c,v 1.1 2005/06/17 23:50:33 deraadt Exp $ */ /* $OpenBSD: uipaq.c,v 1.1 2005/06/17 23:50:33 deraadt Exp $ */
/* /*
@ -42,7 +42,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: uipaq.c,v 1.18 2011/12/23 00:51:46 jakllsch Exp $"); __KERNEL_RCSID(0, "$NetBSD: uipaq.c,v 1.19 2012/12/27 16:42:32 skrll Exp $");
#include <sys/param.h> #include <sys/param.h>
#include <sys/systm.h> #include <sys/systm.h>
@ -177,8 +177,8 @@ uipaq_attach(device_t parent, device_t self, void *aux)
/* Move the device into the configured state. */ /* Move the device into the configured state. */
err = usbd_set_config_no(dev, UIPAQ_CONFIG_NO, 1); err = usbd_set_config_no(dev, UIPAQ_CONFIG_NO, 1);
if (err) { if (err) {
aprint_error("\n%s: failed to set configuration, err=%s\n", aprint_error_dev(self, "failed to set configuration"
devname, usbd_errstr(err)); ", err=%s\n", usbd_errstr(err));
goto bad; goto bad;
} }

View File

@ -1,4 +1,4 @@
/* $NetBSD: urio.c,v 1.39 2012/03/06 03:35:30 mrg Exp $ */ /* $NetBSD: urio.c,v 1.40 2012/12/27 16:42:32 skrll Exp $ */
/* /*
* Copyright (c) 2000 The NetBSD Foundation, Inc. * Copyright (c) 2000 The NetBSD Foundation, Inc.
@ -36,7 +36,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: urio.c,v 1.39 2012/03/06 03:35:30 mrg Exp $"); __KERNEL_RCSID(0, "$NetBSD: urio.c,v 1.40 2012/12/27 16:42:32 skrll Exp $");
#include <sys/param.h> #include <sys/param.h>
#include <sys/systm.h> #include <sys/systm.h>
@ -156,7 +156,8 @@ urio_attach(device_t parent, device_t self, void *aux)
err = usbd_set_config_no(dev, URIO_CONFIG_NO, 1); err = usbd_set_config_no(dev, URIO_CONFIG_NO, 1);
if (err) { if (err) {
aprint_error_dev(self, "setting config no failed\n"); aprint_error_dev(self, "failed to set configuration"
", err=%s\n", usbd_errstr(err));
return; return;
} }

View File

@ -1,4 +1,4 @@
/* $NetBSD: uscanner.c,v 1.72 2012/03/06 03:35:30 mrg Exp $ */ /* $NetBSD: uscanner.c,v 1.73 2012/12/27 16:42:32 skrll Exp $ */
/* /*
* Copyright (c) 2000 The NetBSD Foundation, Inc. * Copyright (c) 2000 The NetBSD Foundation, Inc.
@ -32,7 +32,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: uscanner.c,v 1.72 2012/03/06 03:35:30 mrg Exp $"); __KERNEL_RCSID(0, "$NetBSD: uscanner.c,v 1.73 2012/12/27 16:42:32 skrll Exp $");
#include <sys/param.h> #include <sys/param.h>
#include <sys/systm.h> #include <sys/systm.h>
@ -294,7 +294,8 @@ uscanner_attach(device_t parent, device_t self, void *aux)
err = usbd_set_config_no(uaa->device, 1, 1); /* XXX */ err = usbd_set_config_no(uaa->device, 1, 1); /* XXX */
if (err) { if (err) {
aprint_error_dev(self, "setting config no failed\n"); aprint_error_dev(self, "failed to set configuration"
", err=%s\n", usbd_errstr(err));
sc->sc_dying = 1; sc->sc_dying = 1;
return; return;
} }

View File

@ -1,4 +1,4 @@
/* $NetBSD: usscanner.c,v 1.35 2012/03/06 03:35:30 mrg Exp $ */ /* $NetBSD: usscanner.c,v 1.36 2012/12/27 16:42:32 skrll Exp $ */
/* /*
* Copyright (c) 2001 The NetBSD Foundation, Inc. * Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -47,7 +47,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: usscanner.c,v 1.35 2012/03/06 03:35:30 mrg Exp $"); __KERNEL_RCSID(0, "$NetBSD: usscanner.c,v 1.36 2012/12/27 16:42:32 skrll Exp $");
#include "scsibus.h" #include "scsibus.h"
#include <sys/param.h> #include <sys/param.h>
@ -196,7 +196,8 @@ usscanner_attach(device_t parent, device_t self, void *aux)
err = usbd_set_config_no(dev, USSCANNER_CONFIG_NO, 1); err = usbd_set_config_no(dev, USSCANNER_CONFIG_NO, 1);
if (err) { if (err) {
aprint_error_dev(self, "setting config no failed\n"); aprint_error_dev(self, "failed to set configuration"
", err=%s\n", usbd_errstr(err));
return; return;
} }