Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci print error message when fail to load firmware.



details:   https://anonhg.NetBSD.org/src/rev/60934697bced
branches:  trunk
changeset: 336124:60934697bced
user:      nonaka <nonaka%NetBSD.org@localhost>
date:      Sat Feb 14 05:00:23 2015 +0000

description:
print error message when fail to load firmware.

diffstat:

 sys/dev/pci/if_iwm.c |  11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diffs (32 lines):

diff -r 44510f30212b -r 60934697bced sys/dev/pci/if_iwm.c
--- a/sys/dev/pci/if_iwm.c      Fri Feb 13 22:00:53 2015 +0000
+++ b/sys/dev/pci/if_iwm.c      Sat Feb 14 05:00:23 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_iwm.c,v 1.5 2015/02/13 18:57:47 nonaka Exp $        */
+/*     $NetBSD: if_iwm.c,v 1.6 2015/02/14 05:00:23 nonaka Exp $        */
 /*     OpenBSD: if_iwm.c,v 1.18 2015/02/11 01:12:42 brad Exp   */
 
 /*
@@ -105,7 +105,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_iwm.c,v 1.5 2015/02/13 18:57:47 nonaka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_iwm.c,v 1.6 2015/02/14 05:00:23 nonaka Exp $");
 
 #include <sys/param.h>
 #include <sys/conf.h>
@@ -2840,7 +2840,12 @@
        IWM_WRITE(sc, IWM_CSR_UCODE_DRV_GP1_CLR, IWM_CSR_UCODE_SW_BIT_RFKILL);
 
        /* Load the given image to the HW */
-       return iwm_load_firmware(sc, ucode_type);
+       error = iwm_load_firmware(sc, ucode_type);
+       if (error) {
+               aprint_error_dev(sc->sc_dev, "failed to load firmware: %d\n",
+                   error);
+       }
+       return error;
 }
 
 static int



Home | Main Index | Thread Index | Old Index