summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorAlexander Yurchenko <grange@cvs.openbsd.org>2009-03-18 20:35:42 +0000
committerAlexander Yurchenko <grange@cvs.openbsd.org>2009-03-18 20:35:42 +0000
commitf01db1e5d35ecf695b7244373594d430c1b1098e (patch)
tree5cf9500458fde687158a56aae48cc2acfd2f5807 /sys/dev/pci
parent8a139053ca9414dcd05b7a7c2f0ba08cea03d2ca (diff)
Keep softc pointer in ccb because it requires some work to correctly
extract it from scsi_xfer in ips_timeout since link->adapter_softc may point to a per-channel structure in pass-through path.
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/ips.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/pci/ips.c b/sys/dev/pci/ips.c
index 6c3225186ef..d42ad119b48 100644
--- a/sys/dev/pci/ips.c
+++ b/sys/dev/pci/ips.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ips.c,v 1.72 2009/03/17 08:17:48 grange Exp $ */
+/* $OpenBSD: ips.c,v 1.73 2009/03/18 20:35:41 grange Exp $ */
/*
* Copyright (c) 2006, 2007, 2009 Alexander Yurchenko <grange@openbsd.org>
@@ -348,6 +348,7 @@ struct ips_info {
/* Command control block */
struct ips_softc;
struct ips_ccb {
+ struct ips_softc * c_sc; /* driver softc */
int c_id; /* command id */
int c_flags; /* SCSI_* flags */
enum {
@@ -1703,8 +1704,8 @@ void
ips_timeout(void *arg)
{
struct ips_ccb *ccb = arg;
+ struct ips_softc *sc = ccb->c_sc;
struct scsi_xfer *xs = ccb->c_xfer;
- struct ips_softc *sc = xs->sc_link->adapter_softc;
int s;
/*
@@ -2023,6 +2024,7 @@ ips_ccb_alloc(struct ips_softc *sc, int n)
return (NULL);
for (i = 0; i < n; i++) {
+ ccb[i].c_sc = sc;
ccb[i].c_id = i;
ccb[i].c_cmdbva = (char *)sc->sc_cmdbm.dm_vaddr +
i * sizeof(struct ips_cmdb);