Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/ic MFI_STATE_BOOT_MESSAGE_PENDING also needs to be h...



details:   https://anonhg.NetBSD.org/src/rev/1625b214c229
branches:  trunk
changeset: 782622:1625b214c229
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Fri Nov 09 18:46:54 2012 +0000

description:
MFI_STATE_BOOT_MESSAGE_PENDING also needs to be handed for non-TBOLT
controllers, from FreeBSD. tested by Hugo Silva against a GEN2 controller.

diffstat:

 sys/dev/ic/mfi.c |  14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diffs (37 lines):

diff -r c4ea145071e4 -r 1625b214c229 sys/dev/ic/mfi.c
--- a/sys/dev/ic/mfi.c  Fri Nov 09 12:52:33 2012 +0000
+++ b/sys/dev/ic/mfi.c  Fri Nov 09 18:46:54 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mfi.c,v 1.47 2012/09/19 21:24:29 bouyer Exp $ */
+/* $NetBSD: mfi.c,v 1.48 2012/11/09 18:46:54 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.47 2012/09/19 21:24:29 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mfi.c,v 1.48 2012/11/09 18:46:54 bouyer Exp $");
 
 #include "bio.h"
 
@@ -587,12 +587,14 @@
                        max_wait = 20;
                        break;
                case MFI_STATE_BOOT_MESSAGE_PENDING:
-                       if (sc->sc_ioptype == MFI_IOP_TBOLT) {
+                       if (sc->sc_ioptype == MFI_IOP_SKINNY ||
+                           sc->sc_ioptype == MFI_IOP_TBOLT) {
                                mfi_write(sc, MFI_SKINNY_IDB, MFI_INIT_HOTPLUG);
-                               max_wait = 180;
-                               break;
+                       } else {
+                               mfi_write(sc, MFI_IDB, MFI_INIT_HOTPLUG);
                        }
-                       /* FALLTHROUGH */
+                       max_wait = 180;
+                       break;
                default:
                        aprint_error_dev(sc->sc_dev,
                            "unknown firmware state %d\n", fw_state);



Home | Main Index | Thread Index | Old Index