Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/ic Make MFI_DEBUG build on i386.



details:   https://anonhg.NetBSD.org/src/rev/c273652132bc
branches:  trunk
changeset: 781208:c273652132bc
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Sun Aug 26 16:22:32 2012 +0000

description:
Make MFI_DEBUG build on i386.
Report BBU state changes with aprint_normal(), it seems that sysmon_envsys()
doens't report changes for ENVSYS_INDICATOR as it does for ENVSYS_DRIVE.

diffstat:

 sys/dev/ic/mfi.c |  18 +++++++++++++-----
 1 files changed, 13 insertions(+), 5 deletions(-)

diffs (58 lines):

diff -r 9ae7ccb56b4e -r c273652132bc sys/dev/ic/mfi.c
--- a/sys/dev/ic/mfi.c  Sun Aug 26 16:05:29 2012 +0000
+++ b/sys/dev/ic/mfi.c  Sun Aug 26 16:22:32 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mfi.c,v 1.45 2012/08/26 16:05:29 bouyer Exp $ */
+/* $NetBSD: mfi.c,v 1.46 2012/08/26 16:22:32 bouyer Exp $ */
 /* $OpenBSD: mfi.c,v 1.66 2006/11/28 23:59:45 dlg Exp $ */
 
 /*
@@ -73,7 +73,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mfi.c,v 1.45 2012/08/26 16:05:29 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mfi.c,v 1.46 2012/08/26 16:22:32 bouyer Exp $");
 
 #include "bio.h"
 
@@ -789,7 +789,7 @@
            sc->sc_info.mci_host.mih_port_count);
 
        for (i = 0; i < 8; i++)
-               printf("%.0lx ", sc->sc_info.mci_host.mih_port_addr[i]);
+               printf("%.0" PRIx64 " ", sc->sc_info.mci_host.mih_port_addr[i]);
        printf("\n");
 
        printf("%s: type %.x port_count %d port_addr ",
@@ -797,8 +797,10 @@
            sc->sc_info.mci_device.mid_type,
            sc->sc_info.mci_device.mid_port_count);
 
-       for (i = 0; i < 8; i++)
-               printf("%.0lx ", sc->sc_info.mci_device.mid_port_addr[i]);
+       for (i = 0; i < 8; i++) {
+               printf("%.0" PRIx64 " ",
+                   sc->sc_info.mci_device.mid_port_addr[i]);
+       }
        printf("\n");
 #endif /* MFI_DEBUG */
 
@@ -2582,11 +2584,17 @@
                case MFI_BBU_GOOD:
                        edata->value_cur = 1;
                        edata->state = ENVSYS_SVALID;
+                       if (!sc->sc_bbuok)
+                               aprint_normal_dev(sc->sc_dev,
+                                   "BBU state changed to good\n");
                        sc->sc_bbuok = true;
                        break;
                case MFI_BBU_BAD:
                        edata->value_cur = 0;
                        edata->state = ENVSYS_SCRITICAL;
+                       if (sc->sc_bbuok)
+                               aprint_normal_dev(sc->sc_dev,
+                                   "BBU state changed to bad\n");
                        sc->sc_bbuok = false;
                        break;
                case MFI_BBU_UNKNOWN:



Home | Main Index | Thread Index | Old Index