Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci Oops. Don't forget to set the isp_port value bas...



details:   https://anonhg.NetBSD.org/src/rev/56a8ed8a4699
branches:  trunk
changeset: 753850:56a8ed8a4699
user:      mjacob <mjacob%NetBSD.org@localhost>
date:      Mon Apr 12 14:26:21 2010 +0000

description:
Oops. Don't forget to set the isp_port value based upon PCI function code.
Otherwise you end up with both ports using the same WWPN. Bad.
Discovered by Havard. Pointy hat to me.

diffstat:

 sys/dev/pci/isp_pci.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (34 lines):

diff -r e48bd23ef12c -r 56a8ed8a4699 sys/dev/pci/isp_pci.c
--- a/sys/dev/pci/isp_pci.c     Mon Apr 12 14:26:11 2010 +0000
+++ b/sys/dev/pci/isp_pci.c     Mon Apr 12 14:26:21 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: isp_pci.c,v 1.111 2010/03/26 20:52:01 mjacob Exp $ */
+/* $NetBSD: isp_pci.c,v 1.112 2010/04/12 14:26:21 mjacob Exp $ */
 /*
  * Copyright (C) 1997, 1998, 1999 National Aeronautics & Space Administration
  * All rights reserved.
@@ -38,7 +38,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: isp_pci.c,v 1.111 2010/03/26 20:52:01 mjacob Exp $");
+__KERNEL_RCSID(0, "$NetBSD: isp_pci.c,v 1.112 2010/04/12 14:26:21 mjacob Exp $");
 
 #include <dev/ic/isp_netbsd.h>
 #include <dev/pci/pcireg.h>
@@ -665,6 +665,7 @@
                        dstring = ": QLogic FC-AL and 4Gbps Fabric PCI-E HBA\n";
                }
                isp->isp_type = ISP_HA_FC_2400;
+               isp->isp_port = pa->pa_function;
                mamt = sizeof (fcparam);
                pcs->pci_poff[MBOX_BLOCK >> _BLK_REG_SHFT] =
                    PCI_MBOX_REGS2400_OFF;
@@ -674,6 +675,7 @@
                isp->isp_mdvec = &mdvec_2500;
                dstring = ": QLogic FC-AL and 8Gbps Fabric PCI-E HBA\n";
                isp->isp_type = ISP_HA_FC_2500;
+               isp->isp_port = pa->pa_function;
                mamt = sizeof (fcparam);
                pcs->pci_poff[MBOX_BLOCK >> _BLK_REG_SHFT] =
                    PCI_MBOX_REGS2400_OFF;



Home | Main Index | Thread Index | Old Index