summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/hp300/dev/mb89352.c4
-rw-r--r--sys/arch/luna88k/dev/spc.c4
-rw-r--r--sys/arch/mac68k/dev/esp.c4
-rw-r--r--sys/arch/mac68k/dev/ncr5380.c12
-rw-r--r--sys/arch/mac68k/dev/sbc.c8
-rw-r--r--sys/arch/macppc/dev/esp.c4
-rw-r--r--sys/arch/macppc/dev/mesh.c6
-rw-r--r--sys/arch/mvme68k/dev/sbic.c17
-rw-r--r--sys/arch/mvme68k/dev/sbicvar.h3
-rw-r--r--sys/arch/mvme68k/dev/ssh.c17
-rw-r--r--sys/arch/mvme68k/dev/sshdma.c4
-rw-r--r--sys/arch/mvme68k/dev/sshvar.h3
-rw-r--r--sys/arch/mvme68k/dev/vs.c15
-rw-r--r--sys/arch/mvme68k/dev/vsdma.c4
-rw-r--r--sys/arch/mvme68k/dev/vsvar.h3
-rw-r--r--sys/arch/mvme68k/dev/wdsc.c4
-rw-r--r--sys/arch/mvme88k/dev/vs.c6
-rw-r--r--sys/arch/mvme88k/dev/vsbic.c6
-rw-r--r--sys/arch/sparc/dev/esp.c4
-rw-r--r--sys/arch/sparc/dev/si.c8
-rw-r--r--sys/arch/sparc64/dev/vdsk.c4
-rw-r--r--sys/arch/vax/dec/sii.c4
-rw-r--r--sys/arch/vax/vsa/asc_vsbus.c4
-rw-r--r--sys/arch/vax/vsa/ncr.c8
-rw-r--r--sys/dev/ata/atascsi.c7
-rw-r--r--sys/dev/ata/atascsi.h6
-rw-r--r--sys/dev/atapiscsi/atapiscsi.c8
-rw-r--r--sys/dev/eisa/aha1742.c8
-rw-r--r--sys/dev/i2o/ioprbs.c12
-rw-r--r--sys/dev/i2o/iopsp.c7
-rw-r--r--sys/dev/ic/aac.c4
-rw-r--r--sys/dev/ic/aacvar.h4
-rw-r--r--sys/dev/ic/adv.c8
-rw-r--r--sys/dev/ic/adw.c7
-rw-r--r--sys/dev/ic/aic6360.c8
-rw-r--r--sys/dev/ic/aic79xx_openbsd.c6
-rw-r--r--sys/dev/ic/aic7xxx_openbsd.c7
-rw-r--r--sys/dev/ic/ami.c6
-rw-r--r--sys/dev/ic/bha.c8
-rw-r--r--sys/dev/ic/cac.c7
-rw-r--r--sys/dev/ic/ciss.c6
-rw-r--r--sys/dev/ic/dpt.c6
-rw-r--r--sys/dev/ic/dptvar.h4
-rw-r--r--sys/dev/ic/gdt_common.c4
-rw-r--r--sys/dev/ic/gdtvar.h4
-rw-r--r--sys/dev/ic/iha.c5
-rw-r--r--sys/dev/ic/iha.h4
-rw-r--r--sys/dev/ic/isp_openbsd.c6
-rw-r--r--sys/dev/ic/mfi.c6
-rw-r--r--sys/dev/ic/mpi.c6
-rw-r--r--sys/dev/ic/oosiop.c6
-rw-r--r--sys/dev/ic/osiop.c8
-rw-r--r--sys/dev/ic/sili.c4
-rw-r--r--sys/dev/ic/siop_common.c5
-rw-r--r--sys/dev/ic/siopvar_common.h4
-rw-r--r--sys/dev/ic/trm.c6
-rw-r--r--sys/dev/ic/twe.c5
-rw-r--r--sys/dev/ic/twevar.h4
-rw-r--r--sys/dev/ic/uha.c8
-rw-r--r--sys/dev/isa/aha.c8
-rw-r--r--sys/dev/isa/seagate.c4
-rw-r--r--sys/dev/isa/wds.c7
-rw-r--r--sys/dev/pci/ahci.c4
-rw-r--r--sys/dev/pci/arc.c6
-rw-r--r--sys/dev/pci/ips.c4
-rw-r--r--sys/dev/pci/pcscp.c4
-rw-r--r--sys/dev/pci/qli_pci.c6
-rw-r--r--sys/dev/pcmcia/esp_pcmcia.c4
-rw-r--r--sys/dev/sbus/esp_sbus.c4
-rw-r--r--sys/dev/sdmmc/sdmmc_scsi.c6
-rw-r--r--sys/dev/softraid.c6
-rw-r--r--sys/dev/tc/asc.c4
-rw-r--r--sys/dev/usb/umass_scsi.c6
-rw-r--r--sys/dev/usb/usscanner.c6
-rw-r--r--sys/dev/vscsi.c4
-rw-r--r--sys/scsi/cd.c4
-rw-r--r--sys/scsi/scsi_ioctl.c23
-rw-r--r--sys/scsi/scsiconf.c13
-rw-r--r--sys/scsi/scsiconf.h5
-rw-r--r--sys/scsi/sd.c4
-rw-r--r--sys/scsi/ss.c4
-rw-r--r--sys/scsi/st.c23
82 files changed, 250 insertions, 279 deletions
diff --git a/sys/arch/hp300/dev/mb89352.c b/sys/arch/hp300/dev/mb89352.c
index 53105a62fd0..298e55264d9 100644
--- a/sys/arch/hp300/dev/mb89352.c
+++ b/sys/arch/hp300/dev/mb89352.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mb89352.c,v 1.16 2008/11/25 17:52:02 krw Exp $ */
+/* $OpenBSD: mb89352.c,v 1.17 2009/02/16 21:19:04 miod Exp $ */
/* $NetBSD: mb89352.c,v 1.5 2000/03/23 07:01:31 thorpej Exp $ */
/* NecBSD: mb89352.c,v 1.4 1998/03/14 07:31:20 kmatsuda Exp */
@@ -173,7 +173,7 @@ struct scsi_device spc_dev = {
struct scsi_adapter spc_switch = {
spc_scsi_cmd,
- minphys,
+ scsi_minphys,
NULL,
NULL
};
diff --git a/sys/arch/luna88k/dev/spc.c b/sys/arch/luna88k/dev/spc.c
index 52b7cf5b752..c1c1350870f 100644
--- a/sys/arch/luna88k/dev/spc.c
+++ b/sys/arch/luna88k/dev/spc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: spc.c,v 1.5 2008/06/26 05:42:11 ray Exp $ */
+/* $OpenBSD: spc.c,v 1.6 2009/02/16 21:19:05 miod Exp $ */
/* $NetBSD: spc.c,v 1.4 2003/07/05 19:00:17 tsutsui Exp $ */
/*-
@@ -61,7 +61,7 @@ struct cfdriver spc_cd = {
struct scsi_adapter spc_switch = {
spc_scsi_cmd,
- minphys, /* no max at this level; handled by DMA code */
+ scsi_minphys, /* no max at this level; handled by DMA code */
NULL,
NULL,
};
diff --git a/sys/arch/mac68k/dev/esp.c b/sys/arch/mac68k/dev/esp.c
index 9c3c934ba05..d61ddcc6cea 100644
--- a/sys/arch/mac68k/dev/esp.c
+++ b/sys/arch/mac68k/dev/esp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: esp.c,v 1.27 2007/07/29 21:24:02 miod Exp $ */
+/* $OpenBSD: esp.c,v 1.28 2009/02/16 21:19:05 miod Exp $ */
/* $NetBSD: esp.c,v 1.17 1998/09/05 15:15:35 pk Exp $ */
/*
@@ -110,7 +110,7 @@ struct cfattach esp_ca = {
struct scsi_adapter esp_switch = {
ncr53c9x_scsi_cmd,
- minphys, /* no max at this level; handled by DMA code */
+ scsi_minphys, /* no max at this level; handled by DMA code */
NULL,
NULL,
};
diff --git a/sys/arch/mac68k/dev/ncr5380.c b/sys/arch/mac68k/dev/ncr5380.c
index 002cee9eefa..318b497a19e 100644
--- a/sys/arch/mac68k/dev/ncr5380.c
+++ b/sys/arch/mac68k/dev/ncr5380.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ncr5380.c,v 1.34 2008/11/25 17:52:02 krw Exp $ */
+/* $OpenBSD: ncr5380.c,v 1.35 2009/02/16 21:19:05 miod Exp $ */
/* $NetBSD: ncr5380.c,v 1.38 1996/12/19 21:48:18 scottr Exp $ */
/*
@@ -73,7 +73,7 @@ static volatile int main_running = 0;
*/
static u_char busy;
-static void ncr5380_minphys(struct buf *bp);
+static void ncr5380_minphys(struct buf *bp, struct scsi_link *sl);
static int mac68k_ncr5380_scsi_cmd(struct scsi_xfer *xs);
static void ncr5380_show_scsi_cmd(struct scsi_xfer *xs);
@@ -397,11 +397,11 @@ mac68k_ncr5380_scsi_cmd(struct scsi_xfer *xs)
}
static void
-ncr5380_minphys(struct buf *bp)
+ncr5380_minphys(struct buf *bp, struct scsi_link *sl)
{
- if (bp->b_bcount > MIN_PHYS)
- bp->b_bcount = MIN_PHYS;
- minphys(bp);
+ if (bp->b_bcount > MIN_PHYS)
+ bp->b_bcount = MIN_PHYS;
+ minphys(bp);
}
#undef MIN_PHYS
diff --git a/sys/arch/mac68k/dev/sbc.c b/sys/arch/mac68k/dev/sbc.c
index 2aa2df17931..097843034b1 100644
--- a/sys/arch/mac68k/dev/sbc.c
+++ b/sys/arch/mac68k/dev/sbc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sbc.c,v 1.17 2007/12/29 03:04:18 dlg Exp $ */
+/* $OpenBSD: sbc.c,v 1.18 2009/02/16 21:19:05 miod Exp $ */
/* $NetBSD: sbc.c,v 1.24 1997/04/18 17:38:08 scottr Exp $ */
/*
@@ -76,7 +76,7 @@ int sbc_debug = 0 /* | SBC_DB_INTR | SBC_DB_DMA */;
int sbc_link_flags = 0 /* | SDEV_DB2 */;
int sbc_options = 0 /* | SBC_PDMA */;
-static void sbc_minphys(struct buf *bp);
+static void sbc_minphys(struct buf *bp, struct scsi_link *sl);
struct scsi_adapter sbc_ops = {
ncr5380_scsi_cmd, /* scsi_cmd() */
@@ -102,11 +102,11 @@ static int sbc_ready(struct ncr5380_softc *);
static void sbc_wait_not_req(struct ncr5380_softc *);
static void
-sbc_minphys(struct buf *bp)
+sbc_minphys(struct buf *bp, struct scsi_link *sl)
{
if (bp->b_bcount > MAX_DMA_LEN)
bp->b_bcount = MAX_DMA_LEN;
- return (minphys(bp));
+ minphys(bp);
}
diff --git a/sys/arch/macppc/dev/esp.c b/sys/arch/macppc/dev/esp.c
index 965e453f2ce..f236f7d2790 100644
--- a/sys/arch/macppc/dev/esp.c
+++ b/sys/arch/macppc/dev/esp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: esp.c,v 1.4 2008/06/26 05:42:12 ray Exp $ */
+/* $OpenBSD: esp.c,v 1.5 2009/02/16 21:19:06 miod Exp $ */
/*-
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -137,7 +137,7 @@ struct cfattach esp_ca = {
struct scsi_adapter esp_switch = {
/* no max at this level; handled by DMA code */
- ncr53c9x_scsi_cmd, minphys, NULL, NULL,
+ ncr53c9x_scsi_cmd, scsi_minphys, NULL, NULL,
};
struct scsi_device esp_dev = {
diff --git a/sys/arch/macppc/dev/mesh.c b/sys/arch/macppc/dev/mesh.c
index 02b8a649909..7e6a1a76b5d 100644
--- a/sys/arch/macppc/dev/mesh.c
+++ b/sys/arch/macppc/dev/mesh.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mesh.c,v 1.21 2008/11/25 17:52:02 krw Exp $ */
+/* $OpenBSD: mesh.c,v 1.22 2009/02/16 21:19:06 miod Exp $ */
/* $NetBSD: mesh.c,v 1.1 1999/02/19 13:06:03 tsubai Exp $ */
/*-
@@ -241,7 +241,7 @@ void mesh_sched(struct mesh_softc *);
int mesh_poll(struct scsi_xfer *);
void mesh_done(struct mesh_softc *, struct mesh_scb *);
void mesh_timeout(void *);
-void mesh_minphys(struct buf *);
+void mesh_minphys(struct buf *, struct scsi_link *);
struct cfattach mesh_ca = {
sizeof(struct mesh_softc), mesh_match, mesh_attach
@@ -1185,7 +1185,7 @@ mesh_timeout(void *arg)
}
void
-mesh_minphys(struct buf *bp)
+mesh_minphys(struct buf *bp, struct scsi_link *sl)
{
if (bp->b_bcount > 64*1024)
bp->b_bcount = 64*1024;
diff --git a/sys/arch/mvme68k/dev/sbic.c b/sys/arch/mvme68k/dev/sbic.c
index 624f48722ce..b6a5dc9c3da 100644
--- a/sys/arch/mvme68k/dev/sbic.c
+++ b/sys/arch/mvme68k/dev/sbic.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sbic.c,v 1.21 2008/11/25 17:52:02 krw Exp $ */
+/* $OpenBSD: sbic.c,v 1.22 2009/02/16 21:19:06 miod Exp $ */
/* $NetBSD: sbic.c,v 1.2 1996/04/23 16:32:54 chuck Exp $ */
/*
@@ -151,21 +151,6 @@ void sbictimeout(struct sbic_softc *dev);
#define QPRINTF(a) /* */
#endif
-
-/*
- * default minphys routine for sbic based controllers
- */
-void
-sbic_minphys(bp)
- struct buf *bp;
-{
- /*
- * No max transfer at this level.
- */
- minphys(bp);
-}
-
-
/*
* Save DMA pointers. Take into account partial transfer. Shut down DMA.
*/
diff --git a/sys/arch/mvme68k/dev/sbicvar.h b/sys/arch/mvme68k/dev/sbicvar.h
index 44875db2c43..3c6ae68de1a 100644
--- a/sys/arch/mvme68k/dev/sbicvar.h
+++ b/sys/arch/mvme68k/dev/sbicvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: sbicvar.h,v 1.7 2004/07/02 17:57:29 miod Exp $ */
+/* $OpenBSD: sbicvar.h,v 1.8 2009/02/16 21:19:06 miod Exp $ */
/*
* Copyright (c) 1990 The Regents of the University of California.
@@ -196,7 +196,6 @@ struct sbic_softc {
struct buf;
struct scsi_xfer;
-void sbic_minphys(struct buf *bp);
int sbic_scsicmd(struct scsi_xfer *);
#endif /* _SBICVAR_H_ */
diff --git a/sys/arch/mvme68k/dev/ssh.c b/sys/arch/mvme68k/dev/ssh.c
index 55161447cb1..2ee25ce6200 100644
--- a/sys/arch/mvme68k/dev/ssh.c
+++ b/sys/arch/mvme68k/dev/ssh.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh.c,v 1.20 2008/11/25 17:52:02 krw Exp $ */
+/* $OpenBSD: ssh.c,v 1.21 2009/02/16 21:19:06 miod Exp $ */
/*
* Copyright (c) 1994 Michael L. Hitch
@@ -126,21 +126,6 @@ int ssh_trix;
#define SSH_TRACE(a,b,c,d)
#endif
-
-/*
- * default minphys routine for ssh based controllers
- */
-void
-ssh_minphys(bp)
-struct buf *bp;
-{
-
- /*
- * No max transfer at this level.
- */
- minphys(bp);
-}
-
/*
* used by specific ssh controller
*
diff --git a/sys/arch/mvme68k/dev/sshdma.c b/sys/arch/mvme68k/dev/sshdma.c
index e1dc51c78d1..487aa1ee74e 100644
--- a/sys/arch/mvme68k/dev/sshdma.c
+++ b/sys/arch/mvme68k/dev/sshdma.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshdma.c,v 1.14 2006/11/28 23:59:45 dlg Exp $ */
+/* $OpenBSD: sshdma.c,v 1.15 2009/02/16 21:19:06 miod Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -65,7 +65,7 @@ extern void sshinitialize(struct ssh_softc *);
struct scsi_adapter afsc_scsiswitch = {
ssh_scsicmd,
- ssh_minphys,
+ scsi_minphys,
0, /* no lun support */
0, /* no lun support */
};
diff --git a/sys/arch/mvme68k/dev/sshvar.h b/sys/arch/mvme68k/dev/sshvar.h
index 9160fc30d55..dc6696c741f 100644
--- a/sys/arch/mvme68k/dev/sshvar.h
+++ b/sys/arch/mvme68k/dev/sshvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshvar.h,v 1.5 2004/07/30 22:29:45 miod Exp $ */
+/* $OpenBSD: sshvar.h,v 1.6 2009/02/16 21:19:06 miod Exp $ */
/*
* Copyright (c) 1995 Theo de Raadt
@@ -192,7 +192,6 @@ struct ssh_softc {
#define STS_INTERMED 0x10 /* Intermediate status sent */
#define STS_EXT 0x80 /* Extended status valid */
-void ssh_minphys(struct buf *bp);
int ssh_scsicmd(struct scsi_xfer *);
#endif /* _SSHVAR_H */
diff --git a/sys/arch/mvme68k/dev/vs.c b/sys/arch/mvme68k/dev/vs.c
index f97f42753dc..042d96f4819 100644
--- a/sys/arch/mvme68k/dev/vs.c
+++ b/sys/arch/mvme68k/dev/vs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vs.c,v 1.26 2008/11/25 17:52:02 krw Exp $ */
+/* $OpenBSD: vs.c,v 1.27 2009/02/16 21:19:06 miod Exp $ */
/*
* Copyright (c) 1999 Steve Murphree, Jr.
@@ -125,19 +125,6 @@ szero(src, cnt)
}
}
-/*
- * default minphys routine for MVME328 based controllers
- */
-void
-vs_minphys(bp)
- struct buf *bp;
-{
- /*
- * No max transfer at this level.
- */
- minphys(bp);
-}
-
int
do_vspoll(sc, to, canreset)
struct vs_softc *sc;
diff --git a/sys/arch/mvme68k/dev/vsdma.c b/sys/arch/mvme68k/dev/vsdma.c
index 808d09f92a7..bafcef817a2 100644
--- a/sys/arch/mvme68k/dev/vsdma.c
+++ b/sys/arch/mvme68k/dev/vsdma.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vsdma.c,v 1.12 2006/11/28 23:59:45 dlg Exp $ */
+/* $OpenBSD: vsdma.c,v 1.13 2009/02/16 21:19:06 miod Exp $ */
/*
* Copyright (c) 1999 Steve Murphree, Jr.
* All rights reserved.
@@ -62,7 +62,7 @@ int vs_eintr(void *);
struct scsi_adapter vs_scsiswitch = {
vs_scsicmd,
- vs_minphys,
+ scsi_minphys,
0, /* no lun support */
0, /* no lun support */
};
diff --git a/sys/arch/mvme68k/dev/vsvar.h b/sys/arch/mvme68k/dev/vsvar.h
index a0f8b44c1c3..6b0f3afcb7b 100644
--- a/sys/arch/mvme68k/dev/vsvar.h
+++ b/sys/arch/mvme68k/dev/vsvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: vsvar.h,v 1.6 2004/07/30 22:29:45 miod Exp $ */
+/* $OpenBSD: vsvar.h,v 1.7 2009/02/16 21:19:06 miod Exp $ */
/*
* Copyright (c) 1999 Steve Murphree, Jr.
* Copyright (c) 1990 The Regents of the University of California.
@@ -120,7 +120,6 @@ struct vs_softc {
#define WQO_RFWQ 0x0020 /* report frozen work queue bit */
#define WQO_INIT 0x8000 /* work queue init bit */
-void vs_minphys(struct buf *bp);
int vs_scsicmd(struct scsi_xfer *);
#endif /* _M328VAR_H */
diff --git a/sys/arch/mvme68k/dev/wdsc.c b/sys/arch/mvme68k/dev/wdsc.c
index 3771f529d64..296447b434f 100644
--- a/sys/arch/mvme68k/dev/wdsc.c
+++ b/sys/arch/mvme68k/dev/wdsc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wdsc.c,v 1.15 2008/07/30 18:08:03 miod Exp $ */
+/* $OpenBSD: wdsc.c,v 1.16 2009/02/16 21:19:06 miod Exp $ */
/*
* Copyright (c) 1996 Steve Woodford
@@ -59,7 +59,7 @@ extern int sbicintr(struct sbic_softc *);
struct scsi_adapter wdsc_scsiswitch = {
sbic_scsicmd,
- sbic_minphys,
+ scsi_minphys,
0, /* no lun support */
0, /* no lun support */
};
diff --git a/sys/arch/mvme88k/dev/vs.c b/sys/arch/mvme88k/dev/vs.c
index 1019c17ae51..27e1484e46f 100644
--- a/sys/arch/mvme88k/dev/vs.c
+++ b/sys/arch/mvme88k/dev/vs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vs.c,v 1.75 2009/02/08 13:28:01 miod Exp $ */
+/* $OpenBSD: vs.c,v 1.76 2009/02/16 21:19:06 miod Exp $ */
/*
* Copyright (c) 2004, 2009, Miodrag Vallat.
@@ -64,7 +64,7 @@
int vsmatch(struct device *, void *, void *);
void vsattach(struct device *, struct device *, void *);
-void vs_minphys(struct buf *);
+void vs_minphys(struct buf *, struct scsi_link *);
int vs_scsicmd(struct scsi_xfer *);
struct scsi_adapter vs_scsiswitch = {
@@ -254,7 +254,7 @@ vsattach(struct device *parent, struct device *self, void *args)
}
void
-vs_minphys(struct buf *bp)
+vs_minphys(struct buf *bp, struct scsi_link *sl)
{
if (bp->b_bcount > ptoa(MAX_SG_ELEMENTS))
bp->b_bcount = ptoa(MAX_SG_ELEMENTS);
diff --git a/sys/arch/mvme88k/dev/vsbic.c b/sys/arch/mvme88k/dev/vsbic.c
index 898af91bf33..afd2447275d 100644
--- a/sys/arch/mvme88k/dev/vsbic.c
+++ b/sys/arch/mvme88k/dev/vsbic.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vsbic.c,v 1.2 2009/02/15 15:44:32 miod Exp $ */
+/* $OpenBSD: vsbic.c,v 1.3 2009/02/16 21:19:06 miod Exp $ */
/*
* Copyright (c) 2008, 2009 Miodrag Vallat.
@@ -30,7 +30,7 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/device.h>
-#include <sys/buf.h> /* minphys */
+#include <sys/buf.h>
#include <sys/malloc.h>
#include <uvm/uvm_extern.h>
@@ -426,7 +426,7 @@ struct cfdriver vsbic_cd = {
struct scsi_adapter vsbic_swtch = {
vsbic_scsicmd,
- minphys
+ scsi_minphys
};
struct scsi_device vsbic_scsidev = {
diff --git a/sys/arch/sparc/dev/esp.c b/sys/arch/sparc/dev/esp.c
index bb46760890a..9d15d968b3b 100644
--- a/sys/arch/sparc/dev/esp.c
+++ b/sys/arch/sparc/dev/esp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: esp.c,v 1.25 2007/10/01 16:11:19 krw Exp $ */
+/* $OpenBSD: esp.c,v 1.26 2009/02/16 21:19:06 miod Exp $ */
/* $NetBSD: esp.c,v 1.69 1997/08/27 11:24:18 bouyer Exp $ */
/*
@@ -134,7 +134,7 @@ struct cfattach esp_ca = {
struct scsi_adapter esp_switch = {
ncr53c9x_scsi_cmd,
- minphys, /* no max at this level; handled by DMA code */
+ scsi_minphys, /* no max at this level; handled by DMA code */
NULL,
NULL,
};
diff --git a/sys/arch/sparc/dev/si.c b/sys/arch/sparc/dev/si.c
index 9aaebcc6607..60f5073766b 100644
--- a/sys/arch/sparc/dev/si.c
+++ b/sys/arch/sparc/dev/si.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: si.c,v 1.31 2009/01/04 16:51:44 miod Exp $ */
+/* $OpenBSD: si.c,v 1.32 2009/02/16 21:19:06 miod Exp $ */
/* $NetBSD: si.c,v 1.38 1997/08/27 11:24:20 bouyer Exp $ */
/*-
@@ -183,7 +183,7 @@ static int si_match(struct device *, void *, void *);
static void si_attach(struct device *, struct device *, void *);
static int si_intr(void *);
static void si_reset_adapter(struct ncr5380_softc *);
-static void si_minphys(struct buf *);
+static void si_minphys(struct buf *, struct scsi_link *);
void si_dma_alloc(struct ncr5380_softc *);
void si_dma_free(struct ncr5380_softc *);
@@ -484,7 +484,7 @@ si_attach(parent, self, args)
}
static void
-si_minphys(struct buf *bp)
+si_minphys(struct buf *bp, struct scsi_link *sl)
{
if (bp->b_bcount > MAX_DMA_LEN) {
#ifdef DEBUG
@@ -497,7 +497,7 @@ si_minphys(struct buf *bp)
#endif
bp->b_bcount = MAX_DMA_LEN;
}
- return (minphys(bp));
+ minphys(bp);
}
#define CSR_WANT (SI_CSR_SBC_IP | SI_CSR_DMA_IP | \
diff --git a/sys/arch/sparc64/dev/vdsk.c b/sys/arch/sparc64/dev/vdsk.c
index bc27e9e9f4a..a3d9ec890c7 100644
--- a/sys/arch/sparc64/dev/vdsk.c
+++ b/sys/arch/sparc64/dev/vdsk.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vdsk.c,v 1.8 2009/01/17 22:18:14 kettenis Exp $ */
+/* $OpenBSD: vdsk.c,v 1.9 2009/02/16 21:19:06 miod Exp $ */
/*
* Copyright (c) 2009 Mark Kettenis
*
@@ -337,7 +337,7 @@ vdsk_attach(struct device *parent, struct device *self, void *aux)
return;
sc->sc_switch.scsi_cmd = vdsk_scsi_cmd;
- sc->sc_switch.scsi_minphys = minphys;
+ sc->sc_switch.scsi_minphys = scsi_minphys;
sc->sc_switch.dev_probe = vdsk_dev_probe;
sc->sc_switch.dev_free = vdsk_dev_free;
sc->sc_switch.ioctl = vdsk_ioctl;
diff --git a/sys/arch/vax/dec/sii.c b/sys/arch/vax/dec/sii.c
index 1883e634827..bbf7282712f 100644
--- a/sys/arch/vax/dec/sii.c
+++ b/sys/arch/vax/dec/sii.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sii.c,v 1.4 2008/11/25 17:52:02 krw Exp $ */
+/* $OpenBSD: sii.c,v 1.5 2009/02/16 21:19:06 miod Exp $ */
/* $NetBSD: sii.c,v 1.42 2000/06/02 20:20:29 mhitch Exp $ */
/*
* Copyright (c) 2008 Miodrag Vallat.
@@ -164,7 +164,7 @@ void sii_DumpLog(void);
struct scsi_adapter sii_scsiswitch = {
sii_scsi_cmd,
- minphys,
+ scsi_minphys,
NULL,
NULL,
NULL
diff --git a/sys/arch/vax/vsa/asc_vsbus.c b/sys/arch/vax/vsa/asc_vsbus.c
index fd7f92341f2..f331df902a6 100644
--- a/sys/arch/vax/vsa/asc_vsbus.c
+++ b/sys/arch/vax/vsa/asc_vsbus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: asc_vsbus.c,v 1.9 2008/06/26 05:42:14 ray Exp $ */
+/* $OpenBSD: asc_vsbus.c,v 1.10 2009/02/16 21:19:06 miod Exp $ */
/* $NetBSD: asc_vsbus.c,v 1.22 2001/02/04 20:36:32 ragge Exp $ */
/*-
@@ -107,7 +107,7 @@ struct cfdriver asc_cd = {
struct scsi_adapter asc_vsbus_ops = {
ncr53c9x_scsi_cmd,
- minphys,
+ scsi_minphys,
NULL,
NULL
};
diff --git a/sys/arch/vax/vsa/ncr.c b/sys/arch/vax/vsa/ncr.c
index b7011f6cb20..ebdabaaad3c 100644
--- a/sys/arch/vax/vsa/ncr.c
+++ b/sys/arch/vax/vsa/ncr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ncr.c,v 1.24 2008/07/30 18:08:04 miod Exp $ */
+/* $OpenBSD: ncr.c,v 1.25 2009/02/16 21:19:06 miod Exp $ */
/* $NetBSD: ncr.c,v 1.32 2000/06/25 16:00:43 ragge Exp $ */
/*-
@@ -104,7 +104,7 @@ static int ncr_dmasize;
static int si_match(struct device *, void *, void *);
static void si_attach(struct device *, struct device *, void *);
-static void si_minphys(struct buf *);
+static void si_minphys(struct buf *, struct scsi_link *);
static void si_dma_alloc(struct ncr5380_softc *);
static void si_dma_free(struct ncr5380_softc *);
@@ -271,11 +271,11 @@ si_attach(parent, self, aux)
* Adjust the max transfer size. The DMA buffer is only 16k on VS2000.
*/
static void
-si_minphys(bp)
- struct buf *bp;
+si_minphys(struct buf *bp, struct scsi_link *sl)
{
if (bp->b_bcount > ncr_dmasize)
bp->b_bcount = ncr_dmasize;
+ minphys(bp);
}
void
diff --git a/sys/dev/ata/atascsi.c b/sys/dev/ata/atascsi.c
index ffa5ea551f5..b82242f0d53 100644
--- a/sys/dev/ata/atascsi.c
+++ b/sys/dev/ata/atascsi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: atascsi.c,v 1.63 2008/09/25 11:00:48 krw Exp $ */
+/* $OpenBSD: atascsi.c,v 1.64 2009/02/16 21:19:06 miod Exp $ */
/*
* Copyright (c) 2007 David Gwynne <dlg@openbsd.org>
@@ -56,7 +56,7 @@ void atascsi_free(struct scsi_link *);
/* template */
struct scsi_adapter atascsi_switch = {
atascsi_cmd, /* scsi_cmd */
- minphys, /* scsi_minphys */
+ scsi_minphys, /* scsi_minphys */
atascsi_probe, /* dev_probe */
atascsi_free, /* dev_free */
atascsi_ioctl /* ioctl */
@@ -107,7 +107,8 @@ atascsi_attach(struct device *self, struct atascsi_attach_args *aaa)
/* copy from template and modify for ourselves */
as->as_switch = atascsi_switch;
- as->as_switch.scsi_minphys = aaa->aaa_minphys;
+ if (aaa->aaa_minphys != NULL)
+ as->as_switch.scsi_minphys = aaa->aaa_minphys;
/* fill in our scsi_link */
as->as_link.device = &atascsi_device;
diff --git a/sys/dev/ata/atascsi.h b/sys/dev/ata/atascsi.h
index 551e8c29060..c53d4c22c4e 100644
--- a/sys/dev/ata/atascsi.h
+++ b/sys/dev/ata/atascsi.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: atascsi.h,v 1.32 2008/01/01 03:09:15 dlg Exp $ */
+/* $OpenBSD: atascsi.h,v 1.33 2009/02/16 21:19:06 miod Exp $ */
/*
* Copyright (c) 2007 David Gwynne <dlg@openbsd.org>
@@ -17,6 +17,7 @@
*/
struct atascsi;
+struct scsi_link;
/*
* ATA commands
@@ -319,7 +320,8 @@ struct atascsi_attach_args {
void *aaa_cookie;
struct atascsi_methods *aaa_methods;
- void (*aaa_minphys)(struct buf *);
+ void (*aaa_minphys)(struct buf *,
+ struct scsi_link *);
int aaa_nports;
int aaa_ncmds;
int aaa_capability;
diff --git a/sys/dev/atapiscsi/atapiscsi.c b/sys/dev/atapiscsi/atapiscsi.c
index 23f8d940a09..435feee5a67 100644
--- a/sys/dev/atapiscsi/atapiscsi.c
+++ b/sys/dev/atapiscsi/atapiscsi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: atapiscsi.c,v 1.81 2008/11/25 17:52:02 krw Exp $ */
+/* $OpenBSD: atapiscsi.c,v 1.82 2009/02/16 21:19:06 miod Exp $ */
/*
* This code is derived from code with the copyright below.
@@ -164,7 +164,7 @@ struct atapiscsi_softc {
int drive;
};
-void wdc_atapi_minphys(struct buf *bp);
+void wdc_atapi_minphys(struct buf *bp, struct scsi_link *sl);
int wdc_atapi_ioctl(struct scsi_link *,
u_long, caddr_t, int, struct proc *);
int wdc_atapi_send_cmd(struct scsi_xfer *sc_xfer);
@@ -433,9 +433,9 @@ wdc_atapi_send_cmd(sc_xfer)
}
void
-wdc_atapi_minphys (struct buf *bp)
+wdc_atapi_minphys (struct buf *bp, struct scsi_link *sl)
{
- if(bp->b_bcount > MAX_SIZE)
+ if (bp->b_bcount > MAX_SIZE)
bp->b_bcount = MAX_SIZE;
minphys(bp);
}
diff --git a/sys/dev/eisa/aha1742.c b/sys/dev/eisa/aha1742.c
index 588d97b12d7..5a6ca5bf687 100644
--- a/sys/dev/eisa/aha1742.c
+++ b/sys/dev/eisa/aha1742.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aha1742.c,v 1.30 2009/01/21 21:53:59 grange Exp $ */
+/* $OpenBSD: aha1742.c,v 1.31 2009/02/16 21:19:06 miod Exp $ */
/* $NetBSD: aha1742.c,v 1.61 1996/05/12 23:40:01 mycroft Exp $ */
/*
@@ -289,7 +289,7 @@ struct ahb_ecb *ahb_get_ecb(struct ahb_softc *, int);
struct ahb_ecb *ahb_ecb_phys_kv(struct ahb_softc *, physaddr);
int ahb_find(bus_space_tag_t, bus_space_handle_t, struct ahb_softc *);
void ahb_init(struct ahb_softc *);
-void ahbminphys(struct buf *);
+void ahbminphys(struct buf *, struct scsi_link *);
int ahb_scsi_cmd(struct scsi_xfer *);
void ahb_timeout(void *);
void ahb_print_ecb(struct ahb_ecb *);
@@ -929,10 +929,8 @@ ahb_init(sc)
}
void
-ahbminphys(bp)
- struct buf *bp;
+ahbminphys(struct buf *bp, struct scsi_link *sl)
{
-
if (bp->b_bcount > ((AHB_NSEG - 1) << PGSHIFT))
bp->b_bcount = ((AHB_NSEG - 1) << PGSHIFT);
minphys(bp);
diff --git a/sys/dev/i2o/ioprbs.c b/sys/dev/i2o/ioprbs.c
index 6f539f79246..f82503668bb 100644
--- a/sys/dev/i2o/ioprbs.c
+++ b/sys/dev/i2o/ioprbs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ioprbs.c,v 1.15 2009/01/21 21:53:59 grange Exp $ */
+/* $OpenBSD: ioprbs.c,v 1.16 2009/02/16 21:19:06 miod Exp $ */
/*
* Copyright (c) 2001 Niklas Hallqvist
@@ -91,7 +91,6 @@
#define DPRINTF(x)
#endif
-void ioprbsminphys(struct buf *);
void ioprbs_adjqparam(struct device *, int);
void ioprbs_attach(struct device *, struct device *, void *);
void ioprbs_copy_internal_data(struct scsi_xfer *, u_int8_t *,
@@ -122,7 +121,7 @@ struct cfattach ioprbs_ca = {
};
struct scsi_adapter ioprbs_switch = {
- ioprbs_scsi_cmd, ioprbsminphys, 0, 0,
+ ioprbs_scsi_cmd, scsi_minphys, 0, 0,
};
struct scsi_device ioprbs_dev = {
@@ -545,13 +544,6 @@ ioprbs_scsi_cmd(xs)
}
void
-ioprbsminphys(bp)
- struct buf *bp;
-{
- minphys(bp);
-}
-
-void
ioprbs_intr(struct device *dv, struct iop_msg *im, void *reply)
{
struct i2o_rbs_reply *rb = reply;
diff --git a/sys/dev/i2o/iopsp.c b/sys/dev/i2o/iopsp.c
index 7a04159c933..3db66922fb6 100644
--- a/sys/dev/i2o/iopsp.c
+++ b/sys/dev/i2o/iopsp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: iopsp.c,v 1.13 2008/06/26 05:42:15 ray Exp $ */
+/* $OpenBSD: iopsp.c,v 1.14 2009/02/16 21:19:06 miod Exp $ */
/* $NetBSD$ */
/*-
@@ -72,7 +72,7 @@ struct cfattach iopsp_ca = {
};
int iopsp_scsi_cmd(struct scsi_xfer *);
-void iopspminphys(struct buf *bp);
+void iopspminphys(struct buf *bp, struct scsi_link *sl);
struct scsi_adapter iopsp_switch = {
iopsp_scsi_cmd, iopspminphys, 0, 0,
@@ -400,8 +400,7 @@ iopsp_rescan(struct iopsp_softc *sc)
}
void
-iopspminphys(bp)
- struct buf *bp;
+iopspminphys(struct buf *bp, struct scsi_link *sl)
{
if (bp->b_bcount > IOP_MAX_XFER)
bp->b_bcount = IOP_MAX_XFER;
diff --git a/sys/dev/ic/aac.c b/sys/dev/ic/aac.c
index 5817365a3a5..1c55359cd63 100644
--- a/sys/dev/ic/aac.c
+++ b/sys/dev/ic/aac.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aac.c,v 1.38 2008/11/24 00:31:35 krw Exp $ */
+/* $OpenBSD: aac.c,v 1.39 2009/02/16 21:19:06 miod Exp $ */
/*-
* Copyright (c) 2000 Michael Smith
@@ -2479,7 +2479,7 @@ aac_internal_cache_cmd(struct scsi_xfer *xs)
}
void
-aacminphys(struct buf *bp)
+aacminphys(struct buf *bp, struct scsi_link *sl)
{
#if 0
u_int8_t *buf = bp->b_data;
diff --git a/sys/dev/ic/aacvar.h b/sys/dev/ic/aacvar.h
index 792df3e80ae..9a2c1986f08 100644
--- a/sys/dev/ic/aacvar.h
+++ b/sys/dev/ic/aacvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: aacvar.h,v 1.7 2006/05/07 20:12:41 tedu Exp $ */
+/* $OpenBSD: aacvar.h,v 1.8 2009/02/16 21:19:06 miod Exp $ */
/*-
* Copyright (c) 2000 Michael Smith
@@ -437,7 +437,7 @@ extern void aac_release_sync_fib(struct aac_softc *);
extern int aac_sync_fib(struct aac_softc *, u_int32_t, u_int32_t,
struct aac_fib *, u_int16_t);
-void aacminphys(struct buf *);
+void aacminphys(struct buf *, struct scsi_link *);
int aac_attach(struct aac_softc *);
int aac_intr(void *);
diff --git a/sys/dev/ic/adv.c b/sys/dev/ic/adv.c
index 69dfd70cdaf..c8659877da8 100644
--- a/sys/dev/ic/adv.c
+++ b/sys/dev/ic/adv.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: adv.c,v 1.23 2009/01/21 21:53:59 grange Exp $ */
+/* $OpenBSD: adv.c,v 1.24 2009/02/16 21:19:06 miod Exp $ */
/* $NetBSD: adv.c,v 1.6 1998/10/28 20:39:45 dante Exp $ */
/*
@@ -74,7 +74,7 @@ static void adv_start_ccbs(ASC_SOFTC *);
static u_int8_t *adv_alloc_overrunbuf(char *dvname, bus_dma_tag_t);
static int adv_scsi_cmd(struct scsi_xfer *);
-static void advminphys(struct buf *);
+static void advminphys(struct buf *, struct scsi_link *);
static void adv_narrow_isr_callback(ASC_SOFTC *, ASC_QDONE_INFO *);
static int adv_poll(ASC_SOFTC *, struct scsi_xfer *, int);
@@ -564,10 +564,8 @@ adv_attach(sc)
static void
-advminphys(bp)
- struct buf *bp;
+advminphys(struct buf *bp, struct scsi_link *sl)
{
-
if (bp->b_bcount > ((ASC_MAX_SG_LIST - 1) * PAGE_SIZE))
bp->b_bcount = ((ASC_MAX_SG_LIST - 1) * PAGE_SIZE);
minphys(bp);
diff --git a/sys/dev/ic/adw.c b/sys/dev/ic/adw.c
index eb5fa0742c9..14a429db7b8 100644
--- a/sys/dev/ic/adw.c
+++ b/sys/dev/ic/adw.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: adw.c,v 1.37 2009/01/21 21:53:59 grange Exp $ */
+/* $OpenBSD: adw.c,v 1.38 2009/02/16 21:19:06 miod Exp $ */
/* $NetBSD: adw.c,v 1.23 2000/05/27 18:24:50 dante Exp $ */
/*
@@ -73,7 +73,7 @@ int adw_queue_ccb(ADW_SOFTC *, ADW_CCB *, int);
int adw_scsi_cmd(struct scsi_xfer *);
int adw_build_req(struct scsi_xfer *, ADW_CCB *, int);
void adw_build_sglist(ADW_CCB *, ADW_SCSI_REQ_Q *, ADW_SG_BLOCK *);
-void adw_minphys(struct buf *);
+void adw_minphys(struct buf *, struct scsi_link *);
void adw_isr_callback(ADW_SOFTC *, ADW_SCSI_REQ_Q *);
void adw_async_callback(ADW_SOFTC *, u_int8_t);
@@ -581,8 +581,7 @@ adw_attach(sc)
void
-adw_minphys(bp)
- struct buf *bp;
+adw_minphys(struct buf *bp, struct scsi_link *sl)
{
if (bp->b_bcount > ((ADW_MAX_SG_LIST - 1) * PAGE_SIZE))
diff --git a/sys/dev/ic/aic6360.c b/sys/dev/ic/aic6360.c
index 0875c30220d..03103b11e23 100644
--- a/sys/dev/ic/aic6360.c
+++ b/sys/dev/ic/aic6360.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aic6360.c,v 1.18 2009/01/21 21:53:59 grange Exp $ */
+/* $OpenBSD: aic6360.c,v 1.19 2009/02/16 21:19:06 miod Exp $ */
/* $NetBSD: aic6360.c,v 1.52 1996/12/10 21:27:51 thorpej Exp $ */
#ifdef DDB
@@ -154,7 +154,7 @@
int aic_debug = 0x00; /* AIC_SHOWSTART|AIC_SHOWMISC|AIC_SHOWTRACE; */
#endif
-void aic_minphys(struct buf *);
+void aic_minphys(struct buf *, struct scsi_link *);
void aic_init(struct aic_softc *);
void aic_done(struct aic_softc *, struct aic_acb *);
void aic_dequeue(struct aic_softc *, struct aic_acb *);
@@ -193,7 +193,7 @@ struct scsi_adapter aic_switch = {
#ifdef notyet
aic_minphys,
#else
- minphys,
+ scsi_minphys,
#endif
0,
0,
@@ -563,7 +563,7 @@ aic_scsi_cmd(struct scsi_xfer *xs)
* Adjust transfer size in buffer structure
*/
void
-aic_minphys(struct buf *bp)
+aic_minphys(struct buf *bp, struct scsi_link *sl)
{
AIC_TRACE(("aic_minphys "));
diff --git a/sys/dev/ic/aic79xx_openbsd.c b/sys/dev/ic/aic79xx_openbsd.c
index aa6a80a5db8..0ec3a78ac6c 100644
--- a/sys/dev/ic/aic79xx_openbsd.c
+++ b/sys/dev/ic/aic79xx_openbsd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aic79xx_openbsd.c,v 1.31 2009/01/21 21:53:59 grange Exp $ */
+/* $OpenBSD: aic79xx_openbsd.c,v 1.32 2009/02/16 21:19:06 miod Exp $ */
/*
* Copyright (c) 2004 Milos Urbanek, Kenneth R. Westerback & Marco Peereboom
@@ -81,7 +81,7 @@ int ahd_setup_data(struct ahd_softc *, struct scsi_xfer *,
struct scb *);
void ahd_adapter_req_set_xfer_mode(struct ahd_softc *, struct scb *);
-void ahd_minphys(struct buf *);
+void ahd_minphys(struct buf *, struct scsi_link *);
struct cfdriver ahd_cd = {
NULL, "ahd", DV_DULL
@@ -284,7 +284,7 @@ ahd_done(struct ahd_softc *ahd, struct scb *scb)
}
void
-ahd_minphys(struct buf *bp)
+ahd_minphys(struct buf *bp, struct scsi_link *sl)
{
/*
* Even though the card can transfer up to 16megs per command
diff --git a/sys/dev/ic/aic7xxx_openbsd.c b/sys/dev/ic/aic7xxx_openbsd.c
index fadb1c8afdc..903143f7673 100644
--- a/sys/dev/ic/aic7xxx_openbsd.c
+++ b/sys/dev/ic/aic7xxx_openbsd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aic7xxx_openbsd.c,v 1.41 2009/01/21 21:53:59 grange Exp $ */
+/* $OpenBSD: aic7xxx_openbsd.c,v 1.42 2009/02/16 21:19:06 miod Exp $ */
/* $NetBSD: aic7xxx_osm.c,v 1.14 2003/11/02 11:07:44 wiz Exp $ */
/*
@@ -53,7 +53,7 @@ int ahc_execute_scb(void *, bus_dma_segment_t *, int);
int ahc_poll(struct ahc_softc *, int);
int ahc_setup_data(struct ahc_softc *, struct scsi_xfer *, struct scb *);
-void ahc_minphys(struct buf *);
+void ahc_minphys(struct buf *, struct scsi_link *);
void ahc_adapter_req_set_xfer_mode(struct ahc_softc *, struct scb *);
@@ -284,8 +284,7 @@ ahc_done(struct ahc_softc *ahc, struct scb *scb)
}
void
-ahc_minphys(bp)
- struct buf *bp;
+ahc_minphys(struct buf *bp, struct scsi_link *sl)
{
/*
* Even though the card can transfer up to 16megs per command
diff --git a/sys/dev/ic/ami.c b/sys/dev/ic/ami.c
index 4542d286d96..c9b8fe5448f 100644
--- a/sys/dev/ic/ami.c
+++ b/sys/dev/ic/ami.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ami.c,v 1.191 2009/01/11 16:54:59 blambert Exp $ */
+/* $OpenBSD: ami.c,v 1.192 2009/02/16 21:19:06 miod Exp $ */
/*
* Copyright (c) 2001 Michael Shalayeff
@@ -94,7 +94,7 @@ struct cfdriver ami_cd = {
int ami_scsi_cmd(struct scsi_xfer *);
int ami_scsi_ioctl(struct scsi_link *, u_long, caddr_t, int, struct proc *);
-void amiminphys(struct buf *bp);
+void amiminphys(struct buf *bp, struct scsi_link *sl);
struct scsi_adapter ami_switch = {
ami_scsi_cmd, amiminphys, 0, 0, ami_scsi_ioctl
@@ -1300,7 +1300,7 @@ ami_done_init(struct ami_softc *sc, struct ami_ccb *ccb)
}
void
-amiminphys(struct buf *bp)
+amiminphys(struct buf *bp, struct scsi_link *sl)
{
if (bp->b_bcount > AMI_MAXFER)
bp->b_bcount = AMI_MAXFER;
diff --git a/sys/dev/ic/bha.c b/sys/dev/ic/bha.c
index c6b0ddd6bf4..64f2428ca18 100644
--- a/sys/dev/ic/bha.c
+++ b/sys/dev/ic/bha.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bha.c,v 1.16 2009/01/21 21:53:59 grange Exp $ */
+/* $OpenBSD: bha.c,v 1.17 2009/02/16 21:19:06 miod Exp $ */
/* $NetBSD: bha.c,v 1.27 1998/11/19 21:53:00 thorpej Exp $ */
#undef BHADEBUG
@@ -96,7 +96,7 @@ void bha_collect_mbo(struct bha_softc *);
void bha_start_ccbs(struct bha_softc *);
void bha_done(struct bha_softc *, struct bha_ccb *);
int bha_init(struct bha_softc *);
-void bhaminphys(struct buf *);
+void bhaminphys(struct buf *, struct scsi_link *);
int bha_scsi_cmd(struct scsi_xfer *);
int bha_poll(struct bha_softc *, struct scsi_xfer *, int);
void bha_timeout(void *arg);
@@ -1265,10 +1265,8 @@ bha_inquire_setup_information(sc)
}
void
-bhaminphys(bp)
- struct buf *bp;
+bhaminphys(struct buf *bp, struct scsi_link *sl)
{
-
if (bp->b_bcount > BHA_MAXXFER)
bp->b_bcount = BHA_MAXXFER;
minphys(bp);
diff --git a/sys/dev/ic/cac.c b/sys/dev/ic/cac.c
index a19ccb3f2be..92cad44fb30 100644
--- a/sys/dev/ic/cac.c
+++ b/sys/dev/ic/cac.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cac.c,v 1.27 2008/10/29 21:17:15 brad Exp $ */
+/* $OpenBSD: cac.c,v 1.28 2009/02/16 21:19:06 miod Exp $ */
/* $NetBSD: cac.c,v 1.15 2000/11/08 19:20:35 ad Exp $ */
/*
@@ -97,7 +97,7 @@ struct cfdriver cac_cd = {
};
int cac_scsi_cmd(struct scsi_xfer *);
-void cacminphys(struct buf *bp);
+void cacminphys(struct buf *bp, struct scsi_link *sl);
struct scsi_adapter cac_switch = {
cac_scsi_cmd, cacminphys, 0, 0,
@@ -555,8 +555,7 @@ cac_get_dinfo(sc, target)
}
void
-cacminphys(bp)
- struct buf *bp;
+cacminphys(struct buf *bp, struct scsi_link *sl)
{
if (bp->b_bcount > CAC_MAX_XFER)
bp->b_bcount = CAC_MAX_XFER;
diff --git a/sys/dev/ic/ciss.c b/sys/dev/ic/ciss.c
index 175855f0ec0..6fb9f8fd970 100644
--- a/sys/dev/ic/ciss.c
+++ b/sys/dev/ic/ciss.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ciss.c,v 1.32 2008/11/10 15:55:06 cnst Exp $ */
+/* $OpenBSD: ciss.c,v 1.33 2009/02/16 21:19:06 miod Exp $ */
/*
* Copyright (c) 2005,2006 Michael Shalayeff
@@ -72,7 +72,7 @@ struct cfdriver ciss_cd = {
int ciss_scsi_cmd(struct scsi_xfer *xs);
int ciss_scsi_ioctl(struct scsi_link *link, u_long cmd,
caddr_t addr, int flag, struct proc *p);
-void cissminphys(struct buf *bp);
+void cissminphys(struct buf *bp, struct scsi_link *sl);
struct scsi_adapter ciss_switch = {
ciss_scsi_cmd, cissminphys, NULL, NULL, ciss_scsi_ioctl
@@ -458,7 +458,7 @@ ciss_shutdown(void *v)
}
void
-cissminphys(struct buf *bp)
+cissminphys(struct buf *bp, struct scsi_link *sl)
{
#if 0 /* TODO */
#define CISS_MAXFER (PAGE_SIZE * (sc->maxsg + 1))
diff --git a/sys/dev/ic/dpt.c b/sys/dev/ic/dpt.c
index f9f2ad7f827..d322ccb4902 100644
--- a/sys/dev/ic/dpt.c
+++ b/sys/dev/ic/dpt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dpt.c,v 1.19 2008/11/26 22:03:11 krw Exp $ */
+/* $OpenBSD: dpt.c,v 1.20 2009/02/16 21:19:06 miod Exp $ */
/* $NetBSD: dpt.c,v 1.12 1999/10/23 16:26:33 ad Exp $ */
/*-
@@ -639,10 +639,8 @@ dpt_readcfg(sc)
* Adjust the size of each I/O before it passes to the SCSI layer.
*/
void
-dpt_minphys(bp)
- struct buf *bp;
+dpt_minphys(struct buf *bp, struct scsi_link *sl)
{
-
if (bp->b_bcount > DPT_MAX_XFER)
bp->b_bcount = DPT_MAX_XFER;
minphys(bp);
diff --git a/sys/dev/ic/dptvar.h b/sys/dev/ic/dptvar.h
index 736c90e1632..a9c1d4a76ef 100644
--- a/sys/dev/ic/dptvar.h
+++ b/sys/dev/ic/dptvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: dptvar.h,v 1.3 2008/11/26 22:03:11 krw Exp $ */
+/* $OpenBSD: dptvar.h,v 1.4 2009/02/16 21:19:06 miod Exp $ */
/* $NetBSD: dptvar.h,v 1.5 1999/10/23 16:26:32 ad Exp $ */
/*
@@ -96,7 +96,7 @@ int dpt_readcfg(struct dpt_softc *);
void dpt_init(struct dpt_softc *, const char *);
void dpt_shutdown(void *);
void dpt_timeout(void *);
-void dpt_minphys(struct buf *);
+void dpt_minphys(struct buf *, struct scsi_link *);
#ifdef __NetBSD__
int dpt_scsi_cmd(struct scsipi_xfer *);
#endif /* __NetBSD__ */
diff --git a/sys/dev/ic/gdt_common.c b/sys/dev/ic/gdt_common.c
index d88f5803868..b4d8af19864 100644
--- a/sys/dev/ic/gdt_common.c
+++ b/sys/dev/ic/gdt_common.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: gdt_common.c,v 1.44 2009/01/21 21:53:59 grange Exp $ */
+/* $OpenBSD: gdt_common.c,v 1.45 2009/02/16 21:19:06 miod Exp $ */
/*
* Copyright (c) 1999, 2000, 2003 Niklas Hallqvist. All rights reserved.
@@ -1189,7 +1189,7 @@ gdt_intr(void *arg)
}
void
-gdtminphys(struct buf *bp)
+gdtminphys(struct buf *bp, struct scsi_link *sl)
{
GDT_DPRINTF(GDT_D_MISC, ("gdtminphys(0x%x) ", bp));
diff --git a/sys/dev/ic/gdtvar.h b/sys/dev/ic/gdtvar.h
index 2b4fa865bf2..46aac558c31 100644
--- a/sys/dev/ic/gdtvar.h
+++ b/sys/dev/ic/gdtvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: gdtvar.h,v 1.15 2008/09/01 17:30:56 deraadt Exp $ */
+/* $OpenBSD: gdtvar.h,v 1.16 2009/02/16 21:19:06 miod Exp $ */
/*
* Copyright (c) 1999, 2000 Niklas Hallqvist. All rights reserved.
@@ -398,7 +398,7 @@ struct gdt_softc {
int (*sc_test_busy)(struct gdt_softc *);
};
-void gdtminphys(struct buf *);
+void gdtminphys(struct buf *, struct scsi_link *);
int gdt_attach(struct gdt_softc *);
int gdt_intr(void *);
diff --git a/sys/dev/ic/iha.c b/sys/dev/ic/iha.c
index 2ea843238e6..aa85a2e5023 100644
--- a/sys/dev/ic/iha.c
+++ b/sys/dev/ic/iha.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: iha.c,v 1.32 2009/01/21 21:54:00 grange Exp $ */
+/* $OpenBSD: iha.c,v 1.33 2009/02/16 21:19:06 miod Exp $ */
/*-------------------------------------------------------------------------
*
* Device driver for the INI-9XXXU/UW or INIC-940/950 PCI SCSI Controller.
@@ -473,8 +473,7 @@ iha_init_tulip(sc)
* via sc->sc_adapter.scsi_minphys.
*/
void
-iha_minphys(bp)
- struct buf *bp;
+iha_minphys(struct buf *bp, struct scsi_link *sl)
{
if (bp->b_bcount > ((IHA_MAX_SG_ENTRIES - 1) * PAGE_SIZE))
bp->b_bcount = ((IHA_MAX_SG_ENTRIES - 1) * PAGE_SIZE);
diff --git a/sys/dev/ic/iha.h b/sys/dev/ic/iha.h
index 455471d7759..80a2034815d 100644
--- a/sys/dev/ic/iha.h
+++ b/sys/dev/ic/iha.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: iha.h,v 1.15 2004/01/19 00:44:33 krw Exp $ */
+/* $OpenBSD: iha.h,v 1.16 2009/02/16 21:19:06 miod Exp $ */
/*-------------------------------------------------------------------------
*
* Device driver for the INI-9XXXU/UW or INIC-940/950 PCI SCSI Controller.
@@ -424,7 +424,7 @@ struct iha_nvram {
int iha_scsi_cmd(struct scsi_xfer *);
int iha_intr(void *);
-void iha_minphys(struct buf *);
+void iha_minphys(struct buf *, struct scsi_link *);
int iha_init_tulip(struct iha_softc *);
diff --git a/sys/dev/ic/isp_openbsd.c b/sys/dev/ic/isp_openbsd.c
index c744900b145..ef65d585b58 100644
--- a/sys/dev/ic/isp_openbsd.c
+++ b/sys/dev/ic/isp_openbsd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: isp_openbsd.c,v 1.34 2009/01/11 16:54:59 blambert Exp $ */
+/* $OpenBSD: isp_openbsd.c,v 1.35 2009/02/16 21:19:06 miod Exp $ */
/*
* Platform (OpenBSD) dependent common attachment code for QLogic adapters.
*
@@ -62,7 +62,7 @@
*/
#define _XT(xs) ((((xs)->timeout/1000) * hz) + (3 * hz))
-static void ispminphys(struct buf *);
+static void ispminphys(struct buf *, struct scsi_link *);
static int32_t ispcmd_slow(XS_T *);
static int32_t ispcmd(XS_T *);
@@ -184,7 +184,7 @@ isp_attach(struct ispsoftc *isp)
*/
static void
-ispminphys(struct buf *bp)
+ispminphys(struct buf *bp, struct scsi_link *sl)
{
/*
* XX: Only the 1020 has a 24 bit limit.
diff --git a/sys/dev/ic/mfi.c b/sys/dev/ic/mfi.c
index 8166d17a33f..6afdd503868 100644
--- a/sys/dev/ic/mfi.c
+++ b/sys/dev/ic/mfi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mfi.c,v 1.88 2009/01/28 23:45:12 marco Exp $ */
+/* $OpenBSD: mfi.c,v 1.89 2009/02/16 21:19:06 miod Exp $ */
/*
* Copyright (c) 2006 Marco Peereboom <marco@peereboom.us>
*
@@ -57,7 +57,7 @@ struct cfdriver mfi_cd = {
int mfi_scsi_cmd(struct scsi_xfer *);
int mfi_scsi_ioctl(struct scsi_link *, u_long, caddr_t, int, struct proc *);
-void mfiminphys(struct buf *bp);
+void mfiminphys(struct buf *bp, struct scsi_link *sl);
struct scsi_adapter mfi_switch = {
mfi_scsi_cmd, mfiminphys, 0, 0, mfi_scsi_ioctl
@@ -600,7 +600,7 @@ mfi_get_info(struct mfi_softc *sc)
}
void
-mfiminphys(struct buf *bp)
+mfiminphys(struct buf *bp, struct scsi_link *sl)
{
DNPRINTF(MFI_D_MISC, "mfiminphys: %d\n", bp->b_bcount);
diff --git a/sys/dev/ic/mpi.c b/sys/dev/ic/mpi.c
index 5d9febf439c..b79dc020c23 100644
--- a/sys/dev/ic/mpi.c
+++ b/sys/dev/ic/mpi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mpi.c,v 1.108 2009/02/13 23:16:22 sthen Exp $ */
+/* $OpenBSD: mpi.c,v 1.109 2009/02/16 21:19:07 miod Exp $ */
/*
* Copyright (c) 2005, 2006 David Gwynne <dlg@openbsd.org>
@@ -63,7 +63,7 @@ struct cfdriver mpi_cd = {
int mpi_scsi_cmd(struct scsi_xfer *);
void mpi_scsi_cmd_done(struct mpi_ccb *);
-void mpi_minphys(struct buf *bp);
+void mpi_minphys(struct buf *bp, struct scsi_link *sl);
int mpi_scsi_probe(struct scsi_link *);
int mpi_scsi_ioctl(struct scsi_link *, u_long, caddr_t,
int, struct proc *);
@@ -1431,7 +1431,7 @@ mpi_load_xs(struct mpi_ccb *ccb)
}
void
-mpi_minphys(struct buf *bp)
+mpi_minphys(struct buf *bp, struct scsi_link *sl)
{
/* XXX */
if (bp->b_bcount > MAXPHYS)
diff --git a/sys/dev/ic/oosiop.c b/sys/dev/ic/oosiop.c
index ac6fe33be30..d7206b19d02 100644
--- a/sys/dev/ic/oosiop.c
+++ b/sys/dev/ic/oosiop.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: oosiop.c,v 1.10 2009/01/21 21:54:00 grange Exp $ */
+/* $OpenBSD: oosiop.c,v 1.11 2009/02/16 21:19:07 miod Exp $ */
/* $NetBSD: oosiop.c,v 1.4 2003/10/29 17:45:55 tsutsui Exp $ */
/*
@@ -78,7 +78,7 @@ void oosiop_clear_fifo(struct oosiop_softc *);
void oosiop_phasemismatch(struct oosiop_softc *);
void oosiop_setup_syncxfer(struct oosiop_softc *);
void oosiop_set_syncparam(struct oosiop_softc *, int, int, int);
-void oosiop_minphys(struct buf *);
+void oosiop_minphys(struct buf *, struct scsi_link *);
int oosiop_scsicmd(struct scsi_xfer *);
void oosiop_done(struct oosiop_softc *, struct oosiop_cb *);
void oosiop_timeout(void *);
@@ -704,7 +704,7 @@ oosiop_set_syncparam(struct oosiop_softc *sc, int id, int period, int offset)
}
void
-oosiop_minphys(struct buf *bp)
+oosiop_minphys(struct buf *bp, struct scsi_link *sl)
{
if (bp->b_bcount > OOSIOP_MAX_XFER)
diff --git a/sys/dev/ic/osiop.c b/sys/dev/ic/osiop.c
index f0d0b8f39bb..0c3abb81974 100644
--- a/sys/dev/ic/osiop.c
+++ b/sys/dev/ic/osiop.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: osiop.c,v 1.36 2009/01/21 21:54:00 grange Exp $ */
+/* $OpenBSD: osiop.c,v 1.37 2009/02/16 21:19:07 miod Exp $ */
/* $NetBSD: osiop.c,v 1.9 2002/04/05 18:27:54 bouyer Exp $ */
/*
@@ -90,7 +90,7 @@
#include <dev/microcode/siop/osiop.out>
void osiop_attach(struct osiop_softc *);
-void osiop_minphys(struct buf *);
+void osiop_minphys(struct buf *, struct scsi_link *);
int osiop_scsicmd(struct scsi_xfer *xs);
void osiop_poll(struct osiop_softc *, struct osiop_acb *);
void osiop_sched(struct osiop_softc *);
@@ -355,10 +355,8 @@ osiop_attach(sc)
* default minphys routine for osiop based controllers
*/
void
-osiop_minphys(bp)
- struct buf *bp;
+osiop_minphys(struct buf *bp, struct scsi_link *sl)
{
-
if (bp->b_bcount > OSIOP_MAX_XFER)
bp->b_bcount = OSIOP_MAX_XFER;
minphys(bp);
diff --git a/sys/dev/ic/sili.c b/sys/dev/ic/sili.c
index cb852822424..0a85f7cb937 100644
--- a/sys/dev/ic/sili.c
+++ b/sys/dev/ic/sili.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sili.c,v 1.41 2009/01/21 21:54:00 grange Exp $ */
+/* $OpenBSD: sili.c,v 1.42 2009/02/16 21:19:07 miod Exp $ */
/*
* Copyright (c) 2007 David Gwynne <dlg@openbsd.org>
@@ -196,7 +196,7 @@ sili_attach(struct sili_softc *sc)
bzero(&aaa, sizeof(aaa));
aaa.aaa_cookie = sc;
aaa.aaa_methods = &sili_atascsi_methods;
- aaa.aaa_minphys = minphys;
+ aaa.aaa_minphys = NULL;
aaa.aaa_nports = sc->sc_nports;
aaa.aaa_ncmds = SILI_MAX_CMDS;
aaa.aaa_capability = ASAA_CAP_NCQ;
diff --git a/sys/dev/ic/siop_common.c b/sys/dev/ic/siop_common.c
index aa7e40fa47d..ffcb3e084b3 100644
--- a/sys/dev/ic/siop_common.c
+++ b/sys/dev/ic/siop_common.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: siop_common.c,v 1.32 2009/01/29 22:50:23 miod Exp $ */
+/* $OpenBSD: siop_common.c,v 1.33 2009/02/16 21:19:07 miod Exp $ */
/* $NetBSD: siop_common.c,v 1.37 2005/02/27 00:27:02 perry Exp $ */
/*
@@ -707,8 +707,7 @@ siop_ppr_msg(siop_cmd, offset, ssync, soff)
}
void
-siop_minphys(bp)
- struct buf *bp;
+siop_minphys(struct buf *bp, struct scsi_link *sl)
{
if (bp->b_bcount > SIOP_MAXFER)
bp->b_bcount = SIOP_MAXFER;
diff --git a/sys/dev/ic/siopvar_common.h b/sys/dev/ic/siopvar_common.h
index d395689e2f3..b4fd7ed271f 100644
--- a/sys/dev/ic/siopvar_common.h
+++ b/sys/dev/ic/siopvar_common.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: siopvar_common.h,v 1.25 2007/08/05 19:05:09 kettenis Exp $ */
+/* $OpenBSD: siopvar_common.h,v 1.26 2009/02/16 21:19:07 miod Exp $ */
/* $NetBSD: siopvar_common.h,v 1.33 2005/11/18 23:10:32 bouyer Exp $ */
/*
@@ -204,7 +204,7 @@ int siop_iwr(struct siop_common_cmd *);
#define SIOP_NEG_MSGOUT 0x1
#define SIOP_NEG_ACK 0x2
-void siop_minphys(struct buf *);
+void siop_minphys(struct buf *, struct scsi_link *);
void siop_ma(struct siop_common_cmd *);
void siop_sdp(struct siop_common_cmd *, int);
void siop_update_resid(struct siop_common_cmd *, int);
diff --git a/sys/dev/ic/trm.c b/sys/dev/ic/trm.c
index 60e19b88c77..f0bdea5c58a 100644
--- a/sys/dev/ic/trm.c
+++ b/sys/dev/ic/trm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trm.c,v 1.11 2009/01/21 21:54:00 grange Exp $
+/* $OpenBSD: trm.c,v 1.12 2009/02/16 21:19:07 miod Exp $
* ------------------------------------------------------------
* O.S : OpenBSD
* File Name : trm.c
@@ -61,7 +61,7 @@
/* #define TRM_DEBUG0 */
-void trm_minphys(struct buf *);
+void trm_minphys(struct buf *, struct scsi_link *);
void trm_initSRB(struct trm_scsi_req_q *);
@@ -2367,7 +2367,7 @@ trm_linkSRB(struct trm_softc *sc)
* ------------------------------------------------------------
*/
void
-trm_minphys(struct buf *bp)
+trm_minphys(struct buf *bp, struct scsi_link *sl)
{
if (bp->b_bcount > (TRM_MAX_SG_LISTENTRY-1) * (long) NBPG) {
bp->b_bcount = (TRM_MAX_SG_LISTENTRY-1) * (long) NBPG;
diff --git a/sys/dev/ic/twe.c b/sys/dev/ic/twe.c
index 5b00863c69f..f3f9700364f 100644
--- a/sys/dev/ic/twe.c
+++ b/sys/dev/ic/twe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: twe.c,v 1.29 2008/07/24 19:03:08 thib Exp $ */
+/* $OpenBSD: twe.c,v 1.30 2009/02/16 21:19:07 miod Exp $ */
/*
* Copyright (c) 2000-2002 Michael Shalayeff. All rights reserved.
@@ -746,8 +746,7 @@ twe_done(sc, ccb)
}
void
-tweminphys(bp)
- struct buf *bp;
+tweminphys(struct buf *bp, struct scsi_link *sl)
{
if (bp->b_bcount > TWE_MAXFER)
bp->b_bcount = TWE_MAXFER;
diff --git a/sys/dev/ic/twevar.h b/sys/dev/ic/twevar.h
index b0e0f48036c..bc15196ac5a 100644
--- a/sys/dev/ic/twevar.h
+++ b/sys/dev/ic/twevar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: twevar.h,v 1.8 2008/07/24 19:03:08 thib Exp $ */
+/* $OpenBSD: twevar.h,v 1.9 2009/02/16 21:19:07 miod Exp $ */
/*
* Copyright (c) 2000 Michael Shalayeff
@@ -83,6 +83,6 @@ struct twe_softc {
#define TWE_UNLOCK(sc, lock) splx(lock)
typedef int twe_lock_t;
-void tweminphys(struct buf *bp);
+void tweminphys(struct buf *bp, struct scsi_link *sl);
int twe_attach(struct twe_softc *);
int twe_intr(void *);
diff --git a/sys/dev/ic/uha.c b/sys/dev/ic/uha.c
index 68d2a976cc5..1cbad497019 100644
--- a/sys/dev/ic/uha.c
+++ b/sys/dev/ic/uha.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uha.c,v 1.11 2008/11/24 00:31:35 krw Exp $ */
+/* $OpenBSD: uha.c,v 1.12 2009/02/16 21:19:07 miod Exp $ */
/* $NetBSD: uha.c,v 1.3 1996/10/13 01:37:29 christos Exp $ */
#undef UHADEBUG
@@ -90,7 +90,7 @@ integrate void uha_reset_mscp(struct uha_softc *, struct uha_mscp *);
void uha_free_mscp(struct uha_softc *, struct uha_mscp *);
integrate void uha_init_mscp(struct uha_softc *, struct uha_mscp *);
struct uha_mscp *uha_get_mscp(struct uha_softc *, int);
-void uhaminphys(struct buf *);
+void uhaminphys(struct buf *, struct scsi_link *);
int uha_scsi_cmd(struct scsi_xfer *);
struct scsi_adapter uha_switch = {
@@ -339,10 +339,8 @@ uha_done(sc, mscp)
}
void
-uhaminphys(bp)
- struct buf *bp;
+uhaminphys(struct buf *bp, struct scsi_link *sl)
{
-
if (bp->b_bcount > ((UHA_NSEG - 1) << PGSHIFT))
bp->b_bcount = ((UHA_NSEG - 1) << PGSHIFT);
minphys(bp);
diff --git a/sys/dev/isa/aha.c b/sys/dev/isa/aha.c
index 00ce661c903..e96d7204819 100644
--- a/sys/dev/isa/aha.c
+++ b/sys/dev/isa/aha.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aha.c,v 1.61 2009/01/21 21:54:00 grange Exp $ */
+/* $OpenBSD: aha.c,v 1.62 2009/02/16 21:19:07 miod Exp $ */
/* $NetBSD: aha.c,v 1.11 1996/05/12 23:51:23 mycroft Exp $ */
#undef AHADIAG
@@ -154,7 +154,7 @@ void aha_done(struct aha_softc *, struct aha_ccb *);
int aha_find(struct isa_attach_args *, struct aha_softc *, int);
void aha_init(struct aha_softc *);
void aha_inquire_setup_information(struct aha_softc *);
-void ahaminphys(struct buf *);
+void ahaminphys(struct buf *, struct scsi_link *);
int aha_scsi_cmd(struct scsi_xfer *);
int aha_poll(struct aha_softc *, struct scsi_xfer *, int);
void aha_timeout(void *arg);
@@ -1239,10 +1239,8 @@ noinquire:
}
void
-ahaminphys(bp)
- struct buf *bp;
+ahaminphys(struct buf *bp, struct scsi_link *sl)
{
-
if (bp->b_bcount > ((AHA_NSEG - 1) << PGSHIFT))
bp->b_bcount = ((AHA_NSEG - 1) << PGSHIFT);
minphys(bp);
diff --git a/sys/dev/isa/seagate.c b/sys/dev/isa/seagate.c
index 28cfba3100e..51ba1920353 100644
--- a/sys/dev/isa/seagate.c
+++ b/sys/dev/isa/seagate.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: seagate.c,v 1.26 2009/01/21 21:54:00 grange Exp $ */
+/* $OpenBSD: seagate.c,v 1.27 2009/02/16 21:19:07 miod Exp $ */
/*
* ST01/02, Future Domain TMC-885, TMC-950 SCSI driver
@@ -291,7 +291,7 @@ void sea_reselect(struct sea_softc *sea);
struct scsi_adapter sea_switch = {
sea_scsi_cmd,
- minphys, /* no special minphys(), since driver uses PIO */
+ scsi_minphys, /* no special minphys(), since driver uses PIO */
0,
0,
};
diff --git a/sys/dev/isa/wds.c b/sys/dev/isa/wds.c
index 6522735ff61..ca7468f8d25 100644
--- a/sys/dev/isa/wds.c
+++ b/sys/dev/isa/wds.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wds.c,v 1.27 2009/01/21 21:54:00 grange Exp $ */
+/* $OpenBSD: wds.c,v 1.28 2009/02/16 21:19:07 miod Exp $ */
/* $NetBSD: wds.c,v 1.13 1996/11/03 16:20:31 mycroft Exp $ */
#undef WDSDIAG
@@ -163,7 +163,7 @@ void wds_done(struct wds_softc *, struct wds_scb *, u_char);
int wds_find(struct isa_attach_args *, struct wds_softc *);
void wds_init(struct wds_softc *);
void wds_inquire_setup_information(struct wds_softc *);
-void wdsminphys(struct buf *);
+void wdsminphys(struct buf *, struct scsi_link *);
int wds_scsi_cmd(struct scsi_xfer *);
void wds_sense(struct wds_softc *, struct wds_scb *);
int wds_poll(struct wds_softc *, struct scsi_xfer *, int);
@@ -1032,8 +1032,7 @@ out:
}
void
-wdsminphys(bp)
- struct buf *bp;
+wdsminphys(struct buf *bp, struct scsi_link *sl)
{
if (bp->b_bcount > ((WDS_NSEG - 1) << PGSHIFT))
bp->b_bcount = ((WDS_NSEG - 1) << PGSHIFT);
diff --git a/sys/dev/pci/ahci.c b/sys/dev/pci/ahci.c
index ca3aef1afc3..2837be99d12 100644
--- a/sys/dev/pci/ahci.c
+++ b/sys/dev/pci/ahci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ahci.c,v 1.146 2009/01/21 21:54:00 grange Exp $ */
+/* $OpenBSD: ahci.c,v 1.147 2009/02/16 21:19:07 miod Exp $ */
/*
* Copyright (c) 2006 David Gwynne <dlg@openbsd.org>
@@ -749,7 +749,7 @@ noccc:
bzero(&aaa, sizeof(aaa));
aaa.aaa_cookie = sc;
aaa.aaa_methods = &ahci_atascsi_methods;
- aaa.aaa_minphys = minphys;
+ aaa.aaa_minphys = NULL;
aaa.aaa_nports = AHCI_MAX_PORTS;
aaa.aaa_ncmds = sc->sc_ncmds;
aaa.aaa_capability = ASAA_CAP_NEEDS_RESERVED;
diff --git a/sys/dev/pci/arc.c b/sys/dev/pci/arc.c
index 4ab3d708ec7..889dda85db4 100644
--- a/sys/dev/pci/arc.c
+++ b/sys/dev/pci/arc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: arc.c,v 1.77 2008/07/17 13:16:29 jsg Exp $ */
+/* $OpenBSD: arc.c,v 1.78 2009/02/16 21:19:07 miod Exp $ */
/*
* Copyright (c) 2006 David Gwynne <dlg@openbsd.org>
@@ -400,7 +400,7 @@ struct cfdriver arc_cd = {
/* interface for scsi midlayer to talk to */
int arc_scsi_cmd(struct scsi_xfer *);
-void arc_minphys(struct buf *);
+void arc_minphys(struct buf *, struct scsi_link *);
struct scsi_adapter arc_switch = {
arc_scsi_cmd, arc_minphys, NULL, NULL, NULL
@@ -919,7 +919,7 @@ arc_complete(struct arc_softc *sc, struct arc_ccb *nccb, int timeout)
}
void
-arc_minphys(struct buf *bp)
+arc_minphys(struct buf *bp, struct scsi_link *sl)
{
if (bp->b_bcount > MAXPHYS)
bp->b_bcount = MAXPHYS;
diff --git a/sys/dev/pci/ips.c b/sys/dev/pci/ips.c
index c2beade2fc9..15c9c942d4d 100644
--- a/sys/dev/pci/ips.c
+++ b/sys/dev/pci/ips.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ips.c,v 1.45 2009/02/13 19:26:41 grange Exp $ */
+/* $OpenBSD: ips.c,v 1.46 2009/02/16 21:19:07 miod Exp $ */
/*
* Copyright (c) 2006, 2007, 2009 Alexander Yurchenko <grange@openbsd.org>
@@ -321,7 +321,7 @@ struct cfdriver ips_cd = {
static struct scsi_adapter ips_scsi_adapter = {
ips_scsi_cmd,
- minphys,
+ scsi_minphys,
NULL,
NULL,
NULL
diff --git a/sys/dev/pci/pcscp.c b/sys/dev/pci/pcscp.c
index 41d6b226950..f9c91ae85d7 100644
--- a/sys/dev/pci/pcscp.c
+++ b/sys/dev/pci/pcscp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pcscp.c,v 1.15 2008/06/26 05:42:17 ray Exp $ */
+/* $OpenBSD: pcscp.c,v 1.16 2009/02/16 21:19:07 miod Exp $ */
/* $NetBSD: pcscp.c,v 1.26 2003/10/19 10:25:42 tsutsui Exp $ */
/*-
@@ -121,7 +121,7 @@ int pcscp_dma_isactive(struct ncr53c9x_softc *);
struct scsi_adapter pcscp_adapter = {
ncr53c9x_scsi_cmd, /* cmd */
- minphys, /* minphys */
+ scsi_minphys, /* scsi_minphys */
0, /* open */
0, /* close */
};
diff --git a/sys/dev/pci/qli_pci.c b/sys/dev/pci/qli_pci.c
index 8d1cd934f46..545fdea75aa 100644
--- a/sys/dev/pci/qli_pci.c
+++ b/sys/dev/pci/qli_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: qli_pci.c,v 1.12 2007/11/05 01:25:43 krw Exp $ */
+/* $OpenBSD: qli_pci.c,v 1.13 2009/02/16 21:19:07 miod Exp $ */
/*
* Copyright (c) 2007 Marco Peereboom <marco@peereboom.us>
* Copyright (c) 2007 David Collins <dave@davec.name>
@@ -137,7 +137,7 @@ void qli_freemem(struct qli_softc *, struct qli_mem *);
int qli_scsi_cmd(struct scsi_xfer *);
int qli_scsi_ioctl(struct scsi_link *, u_long, caddr_t, int,
struct proc *);
-void qliminphys(struct buf *bp);
+void qliminphys(struct buf *bp, struct scsi_link *sl);
void qli_disable_interrupts(struct qli_softc *);
void qli_enable_interrupts(struct qli_softc *);
int qli_pci_find_device(void *);
@@ -355,7 +355,7 @@ qli_freemem(struct qli_softc *sc, struct qli_mem *mm)
}
void
-qliminphys(struct buf *bp)
+qliminphys(struct buf *bp, struct scsi_link *sl)
{
DNPRINTF(QLI_D_MISC, "qliminphys: %d\n", bp->b_bcount);
diff --git a/sys/dev/pcmcia/esp_pcmcia.c b/sys/dev/pcmcia/esp_pcmcia.c
index f2bc7ce5db6..9717fdaf3a3 100644
--- a/sys/dev/pcmcia/esp_pcmcia.c
+++ b/sys/dev/pcmcia/esp_pcmcia.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: esp_pcmcia.c,v 1.7 2008/06/26 05:42:17 ray Exp $ */
+/* $OpenBSD: esp_pcmcia.c,v 1.8 2009/02/16 21:19:07 miod Exp $ */
/* $NetBSD: esp_pcmcia.c,v 1.8 2000/06/05 15:36:45 tsutsui Exp $ */
/*-
@@ -80,7 +80,7 @@ int esp_pcmcia_enable(void *, int);
struct scsi_adapter esp_pcmcia_adapter = {
ncr53c9x_scsi_cmd, /* cmd */
- minphys, /* minphys */
+ scsi_minphys, /* scsi_minphys */
0, /* open */
0, /* close */
};
diff --git a/sys/dev/sbus/esp_sbus.c b/sys/dev/sbus/esp_sbus.c
index 2bf2d335a7a..3aa65efa19e 100644
--- a/sys/dev/sbus/esp_sbus.c
+++ b/sys/dev/sbus/esp_sbus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: esp_sbus.c,v 1.21 2008/06/26 05:42:18 ray Exp $ */
+/* $OpenBSD: esp_sbus.c,v 1.22 2009/02/16 21:19:07 miod Exp $ */
/* $NetBSD: esp_sbus.c,v 1.14 2001/04/25 17:53:37 bouyer Exp $ */
/*-
@@ -56,7 +56,7 @@
struct scsi_adapter esp_switch = {
ncr53c9x_scsi_cmd,
- minphys, /* no max at this level; handled by DMA code */
+ scsi_minphys, /* no max at this level; handled by DMA code */
NULL,
NULL,
};
diff --git a/sys/dev/sdmmc/sdmmc_scsi.c b/sys/dev/sdmmc/sdmmc_scsi.c
index 9e10a8760e6..3b324b072b1 100644
--- a/sys/dev/sdmmc/sdmmc_scsi.c
+++ b/sys/dev/sdmmc/sdmmc_scsi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sdmmc_scsi.c,v 1.13 2009/02/06 20:16:41 grange Exp $ */
+/* $OpenBSD: sdmmc_scsi.c,v 1.14 2009/02/16 21:19:07 miod Exp $ */
/*
* Copyright (c) 2006 Uwe Stuehler <uwe@openbsd.org>
@@ -82,7 +82,7 @@ int sdmmc_start_xs(struct sdmmc_softc *, struct sdmmc_ccb *);
void sdmmc_complete_xs(void *);
void sdmmc_done_xs(struct sdmmc_ccb *);
void sdmmc_stimeout(void *);
-void sdmmc_scsi_minphys(struct buf *);
+void sdmmc_scsi_minphys(struct buf *, struct scsi_link *);
#define DEVNAME(sc) SDMMCDEVNAME(sc)
@@ -495,7 +495,7 @@ sdmmc_stimeout(void *arg)
}
void
-sdmmc_scsi_minphys(struct buf *bp)
+sdmmc_scsi_minphys(struct buf *bp, struct scsi_link *sl)
{
/* XXX limit to max. transfer size supported by card/host? */
if (bp->b_bcount > DEV_BSIZE)
diff --git a/sys/dev/softraid.c b/sys/dev/softraid.c
index 3139d54dbcd..e1187e06e34 100644
--- a/sys/dev/softraid.c
+++ b/sys/dev/softraid.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softraid.c,v 1.126 2008/12/24 19:32:02 marco Exp $ */
+/* $OpenBSD: softraid.c,v 1.127 2009/02/16 21:19:06 miod Exp $ */
/*
* Copyright (c) 2007 Marco Peereboom <marco@peereboom.us>
* Copyright (c) 2008 Chris Kuethe <ckuethe@openbsd.org>
@@ -86,7 +86,7 @@ struct cfdriver softraid_cd = {
/* scsi & discipline */
int sr_scsi_cmd(struct scsi_xfer *);
-void sr_minphys(struct buf *bp);
+void sr_minphys(struct buf *bp, struct scsi_link *sl);
void sr_copy_internal_data(struct scsi_xfer *,
void *, size_t);
int sr_scsi_ioctl(struct scsi_link *, u_long,
@@ -1182,7 +1182,7 @@ sr_activate(struct device *self, enum devact act)
}
void
-sr_minphys(struct buf *bp)
+sr_minphys(struct buf *bp, struct scsi_link *sl)
{
DNPRINTF(SR_D_MISC, "sr_minphys: %d\n", bp->b_bcount);
diff --git a/sys/dev/tc/asc.c b/sys/dev/tc/asc.c
index ab8634bebda..6bf47cc5312 100644
--- a/sys/dev/tc/asc.c
+++ b/sys/dev/tc/asc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: asc.c,v 1.23 2008/06/26 05:42:18 ray Exp $ */
+/* $OpenBSD: asc.c,v 1.24 2009/02/16 21:19:07 miod Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -72,7 +72,7 @@ struct cfdriver asc_cd = {
struct scsi_adapter asc_switch = {
ncr53c9x_scsi_cmd,
- minphys, /* no max at this level; handled by DMA code */
+ scsi_minphys, /* no max at this level; handled by DMA code */
NULL,
NULL,
};
diff --git a/sys/dev/usb/umass_scsi.c b/sys/dev/usb/umass_scsi.c
index 342213c5f52..e8d6d469822 100644
--- a/sys/dev/usb/umass_scsi.c
+++ b/sys/dev/usb/umass_scsi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: umass_scsi.c,v 1.23 2008/06/26 05:42:19 ray Exp $ */
+/* $OpenBSD: umass_scsi.c,v 1.24 2009/02/16 21:19:07 miod Exp $ */
/* $NetBSD: umass_scsipi.c,v 1.9 2003/02/16 23:14:08 augustss Exp $ */
/*
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -69,7 +69,7 @@ struct umass_scsi_softc {
#define UMASS_ATAPI_DRIVE 0
int umass_scsi_cmd(struct scsi_xfer *);
-void umass_scsi_minphys(struct buf *);
+void umass_scsi_minphys(struct buf *, struct scsi_link *);
void umass_scsi_cb(struct umass_softc *sc, void *priv, int residue,
int status);
@@ -270,7 +270,7 @@ umass_scsi_cmd(struct scsi_xfer *xs)
}
void
-umass_scsi_minphys(struct buf *bp)
+umass_scsi_minphys(struct buf *bp, struct scsi_link *sl)
{
if (bp->b_bcount > UMASS_MAX_TRANSFER_SIZE)
bp->b_bcount = UMASS_MAX_TRANSFER_SIZE;
diff --git a/sys/dev/usb/usscanner.c b/sys/dev/usb/usscanner.c
index 0b9a075acc3..84c7c7cf2a5 100644
--- a/sys/dev/usb/usscanner.c
+++ b/sys/dev/usb/usscanner.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: usscanner.c,v 1.27 2008/06/26 05:42:19 ray Exp $ */
+/* $OpenBSD: usscanner.c,v 1.28 2009/02/16 21:19:07 miod Exp $ */
/* $NetBSD: usscanner.c,v 1.6 2001/01/23 14:04:14 augustss Exp $ */
/*
@@ -152,7 +152,7 @@ struct usscanner_softc {
void usscanner_cleanup(struct usscanner_softc *sc);
int usscanner_scsipi_cmd(struct scsipi_xfer *xs);
-void usscanner_scsipi_minphys(struct buf *bp);
+void usscanner_scsipi_minphys(struct buf *bp, struct scsi_link *sl);
void usscanner_done(struct usscanner_softc *sc);
void usscanner_sense(struct usscanner_softc *sc);
typedef void callback(usbd_xfer_handle, usbd_private_handle, usbd_status);
@@ -433,7 +433,7 @@ usscanner_activate(struct device *self, enum devact act)
}
void
-usscanner_scsipi_minphys(struct buf *bp)
+usscanner_scsipi_minphys(struct buf *bp, struct scsi_link *sl)
{
if (bp->b_bcount > USSCANNER_MAX_TRANSFER_SIZE)
bp->b_bcount = USSCANNER_MAX_TRANSFER_SIZE;
diff --git a/sys/dev/vscsi.c b/sys/dev/vscsi.c
index baac8d343f4..550d879ccd7 100644
--- a/sys/dev/vscsi.c
+++ b/sys/dev/vscsi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vscsi.c,v 1.1 2008/12/03 23:39:32 dlg Exp $ */
+/* $OpenBSD: vscsi.c,v 1.2 2009/02/16 21:19:06 miod Exp $ */
/*
* Copyright (c) 2008 David Gwynne <dlg@openbsd.org>
@@ -101,7 +101,7 @@ int vscsi_probe(struct scsi_link *);
struct scsi_adapter vscsi_switch = {
vscsi_cmd,
- minphys,
+ scsi_minphys,
vscsi_probe,
NULL
};
diff --git a/sys/scsi/cd.c b/sys/scsi/cd.c
index d50e5db0787..560bd202e1f 100644
--- a/sys/scsi/cd.c
+++ b/sys/scsi/cd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cd.c,v 1.145 2009/01/10 18:00:59 robert Exp $ */
+/* $OpenBSD: cd.c,v 1.146 2009/02/16 21:19:07 miod Exp $ */
/* $NetBSD: cd.c,v 1.100 1997/04/02 02:29:30 mycroft Exp $ */
/*
@@ -716,7 +716,7 @@ cdminphys(struct buf *bp)
bp->b_bcount = max;
}
- (*cd->sc_link->adapter->scsi_minphys)(bp);
+ (*cd->sc_link->adapter->scsi_minphys)(bp, cd->sc_link);
device_unref(&cd->sc_dev);
}
diff --git a/sys/scsi/scsi_ioctl.c b/sys/scsi/scsi_ioctl.c
index cfea976dea6..49d1f27d6cc 100644
--- a/sys/scsi/scsi_ioctl.c
+++ b/sys/scsi/scsi_ioctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: scsi_ioctl.c,v 1.30 2007/09/16 01:30:24 krw Exp $ */
+/* $OpenBSD: scsi_ioctl.c,v 1.31 2009/02/16 21:19:07 miod Exp $ */
/* $NetBSD: scsi_ioctl.c,v 1.23 1996/10/12 23:23:17 christos Exp $ */
/*
@@ -67,6 +67,7 @@ struct scsi_ioctl *si_get(void);
void si_free(struct scsi_ioctl *);
struct scsi_ioctl *si_find(struct buf *);
void scsistrategy(struct buf *);
+void scsiminphys(struct buf *);
const unsigned char scsi_readsafe_cmd[256] = {
[0x00] = 1, /* TEST UNIT READY */
@@ -324,6 +325,24 @@ bad:
splx(s);
}
+void
+scsiminphys(struct buf *bp)
+{
+ struct scsi_ioctl *si;
+ struct scsi_link *sc_link;
+
+ si = si_find(bp);
+ if (si == NULL) {
+ /* should not happen */
+ bp->b_flags |= B_ERROR;
+ bp->b_error = EINVAL;
+ return;
+ }
+
+ sc_link = si->si_sc_link;
+ (*sc_link->adapter->scsi_minphys)(bp, sc_link);
+}
+
/*
* Something (e.g. another driver) has called us
* with an sc_link for a target/lun/adapter, and a scsi
@@ -392,7 +411,7 @@ scsi_do_ioctl(struct scsi_link *sc_link, dev_t dev, u_long cmd, caddr_t addr,
si->si_uio.uio_procp = p;
error = physio(scsistrategy, &si->si_bp, dev,
(screq->flags & SCCMD_READ) ? B_READ : B_WRITE,
- sc_link->adapter->scsi_minphys, &si->si_uio);
+ scsiminphys, &si->si_uio);
} else {
/* if no data, no need to translate it.. */
si->si_bp.b_flags = 0;
diff --git a/sys/scsi/scsiconf.c b/sys/scsi/scsiconf.c
index 11b979d9ba3..c6e437e307f 100644
--- a/sys/scsi/scsiconf.c
+++ b/sys/scsi/scsiconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: scsiconf.c,v 1.137 2009/02/16 21:13:31 krw Exp $ */
+/* $OpenBSD: scsiconf.c,v 1.138 2009/02/16 21:19:07 miod Exp $ */
/* $NetBSD: scsiconf.c,v 1.57 1996/05/02 01:09:01 neil Exp $ */
/*
@@ -54,6 +54,7 @@
#include <sys/systm.h>
#include <sys/malloc.h>
#include <sys/device.h>
+#include <sys/buf.h>
#include <scsi/scsi_all.h>
#include <scsi/scsiconf.h>
@@ -1058,3 +1059,13 @@ err:
free(pg, M_TEMP);
return (rv);
}
+
+/*
+ * scsi_minphys member of struct scsi_adapter for drivers which don't
+ * need any specific routine.
+ */
+void
+scsi_minphys(struct buf *bp, struct scsi_link *sl)
+{
+ minphys(bp);
+}
diff --git a/sys/scsi/scsiconf.h b/sys/scsi/scsiconf.h
index a38f054540f..393301c4072 100644
--- a/sys/scsi/scsiconf.h
+++ b/sys/scsi/scsiconf.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: scsiconf.h,v 1.97 2008/11/10 18:04:41 deraadt Exp $ */
+/* $OpenBSD: scsiconf.h,v 1.98 2009/02/16 21:19:07 miod Exp $ */
/* $NetBSD: scsiconf.h,v 1.35 1997/04/02 02:29:38 mycroft Exp $ */
/*
@@ -293,7 +293,7 @@ extern int scsi_autoconf;
*/
struct scsi_adapter {
int (*scsi_cmd)(struct scsi_xfer *);
- void (*scsi_minphys)(struct buf *);
+ void (*scsi_minphys)(struct buf *, struct scsi_link *);
int (*dev_probe)(struct scsi_link *);
void (*dev_free)(struct scsi_link *);
int (*ioctl)(struct scsi_link *, u_long, caddr_t, int,
@@ -538,6 +538,7 @@ int scsi_do_ioctl(struct scsi_link *, dev_t, u_long, caddr_t,
void sc_print_addr(struct scsi_link *);
int scsi_report_luns(struct scsi_link *, int,
struct scsi_report_luns_data *, u_int32_t, int, int);
+void scsi_minphys(struct buf *, struct scsi_link *);
void show_scsi_xs(struct scsi_xfer *);
void scsi_print_sense(struct scsi_xfer *);
diff --git a/sys/scsi/sd.c b/sys/scsi/sd.c
index 6b44d1c2381..e291af5815e 100644
--- a/sys/scsi/sd.c
+++ b/sys/scsi/sd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sd.c,v 1.153 2008/08/24 09:08:49 dlg Exp $ */
+/* $OpenBSD: sd.c,v 1.154 2009/02/16 21:19:07 miod Exp $ */
/* $NetBSD: sd.c,v 1.111 1997/04/02 02:29:41 mycroft Exp $ */
/*-
@@ -808,7 +808,7 @@ sdminphys(struct buf *bp)
bp->b_bcount = max;
}
- (*sd->sc_link->adapter->scsi_minphys)(bp);
+ (*sd->sc_link->adapter->scsi_minphys)(bp, sd->sc_link);
device_unref(&sd->sc_dev);
}
diff --git a/sys/scsi/ss.c b/sys/scsi/ss.c
index d38ca4931e8..797469411a2 100644
--- a/sys/scsi/ss.c
+++ b/sys/scsi/ss.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ss.c,v 1.62 2008/06/22 16:32:05 krw Exp $ */
+/* $OpenBSD: ss.c,v 1.63 2009/02/16 21:19:07 miod Exp $ */
/* $NetBSD: ss.c,v 1.10 1996/05/05 19:52:55 christos Exp $ */
/*
@@ -501,7 +501,7 @@ ssminphys(bp)
{
struct ss_softc *ss = ss_cd.cd_devs[SSUNIT(bp->b_dev)];
- (ss->sc_link->adapter->scsi_minphys)(bp);
+ (ss->sc_link->adapter->scsi_minphys)(bp, ss->sc_link);
/*
* trim the transfer further for special devices this is
diff --git a/sys/scsi/st.c b/sys/scsi/st.c
index 70e49277b7d..82dc5f39bb1 100644
--- a/sys/scsi/st.c
+++ b/sys/scsi/st.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: st.c,v 1.85 2008/09/22 19:44:41 miod Exp $ */
+/* $OpenBSD: st.c,v 1.86 2009/02/16 21:19:07 miod Exp $ */
/* $NetBSD: st.c,v 1.71 1997/02/21 23:03:49 thorpej Exp $ */
/*
@@ -226,6 +226,7 @@ void stattach(struct device *, struct device *, void *);
int stactivate(struct device *, enum devact);
int stdetach(struct device *, int);
+void stminphys(struct buf *);
void st_kill_buffers(struct st_softc *);
void st_identify_drive(struct st_softc *, struct scsi_inquiry_data *);
void st_loadquirks(struct st_softc *);
@@ -1088,6 +1089,20 @@ strestart(void *v)
splx(s);
}
+void
+stminphys(struct buf *bp)
+{
+ struct st_softc *st;
+
+ st = stlookup(STUNIT(bp->b_dev));
+ if (st == NULL)
+ return; /* can't happen */
+
+ (*st->sc_link->adapter->scsi_minphys)(bp, st->sc_link);
+
+ device_unref(&st->sc_dev);
+}
+
int
stread(dev_t dev, struct uio *uio, int iomode)
{
@@ -1102,8 +1117,7 @@ stread(dev_t dev, struct uio *uio, int iomode)
return (ENXIO);
}
- return (physio(ststrategy, NULL, dev, B_READ,
- st->sc_link->adapter->scsi_minphys, uio));
+ return (physio(ststrategy, NULL, dev, B_READ, stminphys, uio));
}
int
@@ -1120,8 +1134,7 @@ stwrite(dev_t dev, struct uio *uio, int iomode)
return (ENXIO);
}
- return (physio(ststrategy, NULL, dev, B_WRITE,
- st->sc_link->adapter->scsi_minphys, uio));
+ return (physio(ststrategy, NULL, dev, B_WRITE, stminphys, uio));
}
/*