Module Name: src
Committed By: tsutsui
Date: Sat May 16 05:26:31 UTC 2009
Modified Files:
src/sys/dev/ic: ninjascsi32.c
Log Message:
Fix botch on device_t/softc split.
XXX: still doesn't work (command timeout on data xfer).
To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/dev/ic/ninjascsi32.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/ic/ninjascsi32.c
diff -u src/sys/dev/ic/ninjascsi32.c:1.18 src/sys/dev/ic/ninjascsi32.c:1.19
--- src/sys/dev/ic/ninjascsi32.c:1.18 Wed Jul 9 19:08:44 2008
+++ src/sys/dev/ic/ninjascsi32.c Sat May 16 05:26:31 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: ninjascsi32.c,v 1.18 2008/07/09 19:08:44 joerg Exp $ */
+/* $NetBSD: ninjascsi32.c,v 1.19 2009/05/16 05:26:31 tsutsui Exp $ */
/*-
* Copyright (c) 2004, 2006, 2007 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ninjascsi32.c,v 1.18 2008/07/09 19:08:44 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ninjascsi32.c,v 1.19 2009/05/16 05:26:31 tsutsui Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -1280,7 +1280,7 @@
struct scsipi_xfer_mode *xm;
struct njsc32_target *target;
- sc = (void *)chan->chan_adapter->adapt_dev;
+ sc = device_private(chan->chan_adapter->adapt_dev);
switch (req) {
case ADAPTER_REQ_RUN_XFER:
@@ -1444,7 +1444,9 @@
njsc32_scsipi_ioctl(struct scsipi_channel *chan, u_long cmd,
void *addr, int flag, struct proc *p)
{
- struct njsc32_softc *sc = (void *)chan->chan_adapter->adapt_dev;
+ struct njsc32_softc *sc;
+
+ sc = device_private(chan->chan_adapter->adapt_dev);
switch (cmd) {
case SCBUSIORESET: