Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci Improve error reporting during attachment to PCI...



details:   https://anonhg.NetBSD.org/src/rev/42d8f195dd7b
branches:  trunk
changeset: 761377:42d8f195dd7b
user:      dyoung <dyoung%NetBSD.org@localhost>
date:      Wed Jan 26 00:08:30 2011 +0000

description:
Improve error reporting during attachment to PCI ath(4).

diffstat:

 sys/dev/pci/if_ath_pci.c |  9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diffs (34 lines):

diff -r 00f8447ca549 -r 42d8f195dd7b sys/dev/pci/if_ath_pci.c
--- a/sys/dev/pci/if_ath_pci.c  Tue Jan 25 23:46:48 2011 +0000
+++ b/sys/dev/pci/if_ath_pci.c  Wed Jan 26 00:08:30 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_ath_pci.c,v 1.38 2010/04/28 22:00:39 dyoung Exp $   */
+/*     $NetBSD: if_ath_pci.c,v 1.39 2011/01/26 00:08:30 dyoung Exp $   */
 
 /*-
  * Copyright (c) 2002-2005 Sam Leffler, Errno Consulting
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ath_pci.c,v 1.38 2010/04/28 22:00:39 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ath_pci.c,v 1.39 2011/01/26 00:08:30 dyoung Exp $");
 
 /*
  * PCI/Cardbus front-end for the Atheros Wireless LAN controller driver.
@@ -145,12 +145,13 @@
        mem_type = pci_mapreg_type(pc, pa->pa_tag, ATH_PCI_MMBA);
        if (mem_type != PCI_MAPREG_TYPE_MEM &&
            mem_type != PCI_MAPREG_MEM_TYPE_64BIT) {
-               aprint_error("bad pci register type %d\n", (int)mem_type);
+               aprint_error_dev(self, "bad pci register type %d\n",
+                   (int)mem_type);
                goto bad;
        }
        if (pci_mapreg_map(pa, ATH_PCI_MMBA, mem_type, 0, &psc->sc_iot,
                &psc->sc_ioh, NULL, &psc->sc_mapsz) != 0) {
-               aprint_error("cannot map register space\n");
+               aprint_error_dev(self, "cannot map register space\n");
                goto bad;
        }
 



Home | Main Index | Thread Index | Old Index