Module Name:    src
Committed By:   msaitoh
Date:           Sun Aug 16 19:22:33 UTC 2015

Modified Files:
        src/sys/dev/i2o: iopsp.c

Log Message:
 Fix device_t/softc split bug.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/sys/dev/i2o/iopsp.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/i2o/iopsp.c
diff -u src/sys/dev/i2o/iopsp.c:1.36 src/sys/dev/i2o/iopsp.c:1.37
--- src/sys/dev/i2o/iopsp.c:1.36	Sat Oct 27 17:18:17 2012
+++ src/sys/dev/i2o/iopsp.c	Sun Aug 16 19:22:33 2015
@@ -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 @@ static int
 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 @@ iopsp_match(device_t parent, cfdata_t ma
 	} __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 ||

Reply via email to