Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb Consistent/Correct error message from failing us...
details: https://anonhg.NetBSD.org/src/rev/49345db306b7
branches: trunk
changeset: 783533:49345db306b7
user: skrll <skrll%NetBSD.org@localhost>
date: Thu Dec 27 16:42:32 2012 +0000
description:
Consistent/Correct error message from failing usbd_set_config.
Use aprint_error_dev.
diffstat:
sys/dev/usb/aubtfwl.c | 7 ++++---
sys/dev/usb/emdtv.c | 7 ++++---
sys/dev/usb/if_atu.c | 7 ++++---
sys/dev/usb/if_aue.c | 7 ++++---
sys/dev/usb/if_axe.c | 7 ++++---
sys/dev/usb/if_cue.c | 7 ++++---
sys/dev/usb/if_kue.c | 7 ++++---
sys/dev/usb/if_otus.c | 11 ++++++-----
sys/dev/usb/if_rum.c | 10 ++++++----
sys/dev/usb/if_run.c | 11 ++++++-----
sys/dev/usb/if_udav.c | 7 ++++---
sys/dev/usb/if_upgt.c | 11 ++++++-----
sys/dev/usb/if_upl.c | 7 ++++---
sys/dev/usb/if_ural.c | 10 ++++++----
sys/dev/usb/if_url.c | 7 ++++---
sys/dev/usb/if_urtw.c | 13 +++++++------
sys/dev/usb/if_urtwn.c | 10 ++++++----
sys/dev/usb/if_zyd.c | 7 ++++---
sys/dev/usb/uberry.c | 10 ++++++----
sys/dev/usb/udl.c | 9 ++++++---
sys/dev/usb/udsbr.c | 7 ++++---
sys/dev/usb/uhso.c | 9 ++++-----
sys/dev/usb/uipaq.c | 8 ++++----
sys/dev/usb/urio.c | 7 ++++---
sys/dev/usb/uscanner.c | 7 ++++---
sys/dev/usb/usscanner.c | 7 ++++---
26 files changed, 123 insertions(+), 94 deletions(-)
diffs (truncated from 780 to 300 lines):
diff -r c10518e486a5 -r 49345db306b7 sys/dev/usb/aubtfwl.c
--- a/sys/dev/usb/aubtfwl.c Thu Dec 27 16:23:48 2012 +0000
+++ b/sys/dev/usb/aubtfwl.c Thu Dec 27 16:42:32 2012 +0000
@@ -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
@@ -27,7 +27,7 @@
*/
#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 <dev/usb/usb.h>
@@ -110,7 +110,8 @@
error = usbd_set_config_no(sc->sc_udev, 1, 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;
}
diff -r c10518e486a5 -r 49345db306b7 sys/dev/usb/emdtv.c
--- a/sys/dev/usb/emdtv.c Thu Dec 27 16:23:48 2012 +0000
+++ b/sys/dev/usb/emdtv.c Thu Dec 27 16:42:32 2012 +0000
@@ -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@localhost>
@@ -27,7 +27,7 @@
*/
#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/systm.h>
@@ -128,7 +128,8 @@
status = usbd_set_config_no(sc->sc_udev, 1, 1);
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;
}
diff -r c10518e486a5 -r 49345db306b7 sys/dev/usb/if_atu.c
--- a/sys/dev/usb/if_atu.c Thu Dec 27 16:23:48 2012 +0000
+++ b/sys/dev/usb/if_atu.c Thu Dec 27 16:42:32 2012 +0000
@@ -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 $ */
/*
* Copyright (c) 2003, 2004
@@ -48,7 +48,7 @@
*/
#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>
@@ -1257,7 +1257,8 @@
err = usbd_set_config_no(dev, ATU_CONFIG_NO, 1);
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;
}
diff -r c10518e486a5 -r 49345db306b7 sys/dev/usb/if_aue.c
--- a/sys/dev/usb/if_aue.c Thu Dec 27 16:23:48 2012 +0000
+++ b/sys/dev/usb/if_aue.c Thu Dec 27 16:42:32 2012 +0000
@@ -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
@@ -78,7 +78,7 @@
*/
#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"
@@ -745,7 +745,8 @@
err = usbd_set_config_no(dev, AUE_CONFIG_NO, 1);
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;
}
diff -r c10518e486a5 -r 49345db306b7 sys/dev/usb/if_axe.c
--- a/sys/dev/usb/if_axe.c Thu Dec 27 16:23:48 2012 +0000
+++ b/sys/dev/usb/if_axe.c Thu Dec 27 16:42:32 2012 +0000
@@ -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 $ */
/*
@@ -89,7 +89,7 @@
*/
#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)
#include "opt_inet.h"
@@ -603,7 +603,8 @@
err = usbd_set_config_no(dev, AXE_CONFIG_NO, 1);
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;
}
diff -r c10518e486a5 -r 49345db306b7 sys/dev/usb/if_cue.c
--- a/sys/dev/usb/if_cue.c Thu Dec 27 16:23:48 2012 +0000
+++ b/sys/dev/usb/if_cue.c Thu Dec 27 16:42:32 2012 +0000
@@ -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
* Bill Paul <wpaul%ee.columbia.edu@localhost>. All rights reserved.
@@ -56,7 +56,7 @@
*/
#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"
@@ -477,7 +477,8 @@
err = usbd_set_config_no(dev, CUE_CONFIG_NO, 1);
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;
}
diff -r c10518e486a5 -r 49345db306b7 sys/dev/usb/if_kue.c
--- a/sys/dev/usb/if_kue.c Thu Dec 27 16:23:48 2012 +0000
+++ b/sys/dev/usb/if_kue.c Thu Dec 27 16:42:32 2012 +0000
@@ -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
@@ -71,7 +71,7 @@
*/
#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"
@@ -417,7 +417,8 @@
err = usbd_set_config_no(dev, KUE_CONFIG_NO, 1);
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;
}
diff -r c10518e486a5 -r 49345db306b7 sys/dev/usb/if_otus.c
--- a/sys/dev/usb/if_otus.c Thu Dec 27 16:23:48 2012 +0000
+++ b/sys/dev/usb/if_otus.c Thu Dec 27 16:42:32 2012 +0000
@@ -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 $ */
/*-
@@ -18,7 +18,7 @@
*/
#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.
* http://www.atheros.com/pt/bulletins/AR9001USBBulletin.pdf
@@ -611,9 +611,10 @@
sc->sc_amrr.amrr_min_success_threshold = 1;
sc->sc_amrr.amrr_max_success_threshold = 10;
- if (usbd_set_config_no(sc->sc_udev, 1, 0) != 0) {
- aprint_error_dev(sc->sc_dev,
- "could not set configuration no\n");
+ error = usbd_set_config_no(sc->sc_udev, 1, 0);
+ if (error != 0) {
+ aprint_error_dev(sc->sc_dev, "failed to set configuration"
+ ", err=%s\n", usbd_errstr(error));
return;
}
diff -r c10518e486a5 -r 49345db306b7 sys/dev/usb/if_rum.c
--- a/sys/dev/usb/if_rum.c Thu Dec 27 16:23:48 2012 +0000
+++ b/sys/dev/usb/if_rum.c Thu Dec 27 16:42:32 2012 +0000
@@ -1,5 +1,5 @@
/* $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@localhost>
@@ -24,7 +24,7 @@
*/
#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>
@@ -330,8 +330,10 @@
aprint_normal_dev(self, "%s\n", devinfop);
usbd_devinfo_free(devinfop);
- if (usbd_set_config_no(sc->sc_udev, RT2573_CONFIG_NO, 0) != 0) {
- aprint_error_dev(self, "could not set configuration no\n");
+ error = usbd_set_config_no(sc->sc_udev, RT2573_CONFIG_NO, 0);
+ if (error != 0) {
+ aprint_error_dev(self, "failed to set configuration"
+ ", err=%s\n", usbd_errstr(error));
return;
}
diff -r c10518e486a5 -r 49345db306b7 sys/dev/usb/if_run.c
--- a/sys/dev/usb/if_run.c Thu Dec 27 16:23:48 2012 +0000
+++ b/sys/dev/usb/if_run.c Thu Dec 27 16:42:32 2012 +0000
@@ -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 $ */
/*-
@@ -23,7 +23,7 @@
*/
#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/sockio.h>
@@ -500,9 +500,10 @@
aprint_normal_dev(sc->sc_dev, "%s\n", devinfop);
usbd_devinfo_free(devinfop);
- if (usbd_set_config_no(sc->sc_udev, 1, 0) != 0) {
- aprint_error_dev(sc->sc_dev,
- "could not set configuration no\n");
+ error = usbd_set_config_no(sc->sc_udev, 1, 0);
+ if (error != 0) {
+ aprint_error_dev(sc->sc_dev, "failed to set configuration"
+ ", err=%s\n", usbd_errstr(error));
return;
}
diff -r c10518e486a5 -r 49345db306b7 sys/dev/usb/if_udav.c
--- a/sys/dev/usb/if_udav.c Thu Dec 27 16:23:48 2012 +0000
+++ b/sys/dev/usb/if_udav.c Thu Dec 27 16:42:32 2012 +0000
@@ -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 $ */
Home |
Main Index |
Thread Index |
Old Index