Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/i2o Fix device_t/softc split bug.



details:   https://anonhg.NetBSD.org/src/rev/58fe7563d438
branches:  trunk
changeset: 339906:58fe7563d438
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Sun Aug 16 19:22:33 2015 +0000

description:
Fix device_t/softc split bug.

diffstat:

 sys/dev/i2o/iopsp.c |  10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diffs (42 lines):

diff -r 5eb9d63f1928 -r 58fe7563d438 sys/dev/i2o/iopsp.c
--- a/sys/dev/i2o/iopsp.c       Sun Aug 16 19:21:33 2015 +0000
+++ b/sys/dev/i2o/iopsp.c       Sun Aug 16 19:22:33 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: iopsp.c,v 1.36 2012/10/27 17:18:17 chs Exp $   */
+/*     $NetBSD: iopsp.c,v 1.37 2015/08/16 19:22:33 msaitoh Exp $       */
 
 /*-
  * Copyright (c) 2000, 2001, 2007 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: iopsp.c,v 1.36 2012/10/27 17:18:17 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: iopsp.c,v 1.37 2015/08/16 19:22:33 msaitoh Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -83,6 +83,7 @@
 iopsp_match(device_t parent, cfdata_t match, void *aux)
 {
        struct iop_attach_args *ia;
+       struct iop_softc *iop;
        struct {
                struct  i2o_param_op_results pr;
                struct  i2o_param_read_results prr;
@@ -90,12 +91,13 @@
        } __packed param;
 
        ia = aux;
+       iop = device_private(parent);
 
        if (ia->ia_class != I2O_CLASS_BUS_ADAPTER_PORT)
                return (0);
 
-       if (iop_field_get_all((struct iop_softc *)parent, ia->ia_tid,
-           I2O_PARAM_HBA_CTLR_INFO, &param, sizeof(param), NULL) != 0)
+       if (iop_field_get_all(iop, ia->ia_tid, I2O_PARAM_HBA_CTLR_INFO, &param,
+           sizeof(param), NULL) != 0)
                return (0);
 
        return (param.ci.bustype == I2O_HBA_BUS_SCSI ||



Home | Main Index | Thread Index | Old Index