diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2009-02-16 21:19:08 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2009-02-16 21:19:08 +0000 |
commit | 2da99529039b177155c4f8b121a56af665bbc013 (patch) | |
tree | 164ac14d81166b8b640ca50ae2bfbd661def8e85 /sys/dev/ic | |
parent | 02ba6ef4276aced0ecad6ed5dc9b0a7e1cd1d4ad (diff) |
Extend the scsi_adapter minphys() callback to take a struct scsi_link *
as additional argument. This will allow intermediate layers between
scsi devices such as sd and scsi host adapters to take appropriate
action if necessary.
Diffstat (limited to 'sys/dev/ic')
-rw-r--r-- | sys/dev/ic/aac.c | 4 | ||||
-rw-r--r-- | sys/dev/ic/aacvar.h | 4 | ||||
-rw-r--r-- | sys/dev/ic/adv.c | 8 | ||||
-rw-r--r-- | sys/dev/ic/adw.c | 7 | ||||
-rw-r--r-- | sys/dev/ic/aic6360.c | 8 | ||||
-rw-r--r-- | sys/dev/ic/aic79xx_openbsd.c | 6 | ||||
-rw-r--r-- | sys/dev/ic/aic7xxx_openbsd.c | 7 | ||||
-rw-r--r-- | sys/dev/ic/ami.c | 6 | ||||
-rw-r--r-- | sys/dev/ic/bha.c | 8 | ||||
-rw-r--r-- | sys/dev/ic/cac.c | 7 | ||||
-rw-r--r-- | sys/dev/ic/ciss.c | 6 | ||||
-rw-r--r-- | sys/dev/ic/dpt.c | 6 | ||||
-rw-r--r-- | sys/dev/ic/dptvar.h | 4 | ||||
-rw-r--r-- | sys/dev/ic/gdt_common.c | 4 | ||||
-rw-r--r-- | sys/dev/ic/gdtvar.h | 4 | ||||
-rw-r--r-- | sys/dev/ic/iha.c | 5 | ||||
-rw-r--r-- | sys/dev/ic/iha.h | 4 | ||||
-rw-r--r-- | sys/dev/ic/isp_openbsd.c | 6 | ||||
-rw-r--r-- | sys/dev/ic/mfi.c | 6 | ||||
-rw-r--r-- | sys/dev/ic/mpi.c | 6 | ||||
-rw-r--r-- | sys/dev/ic/oosiop.c | 6 | ||||
-rw-r--r-- | sys/dev/ic/osiop.c | 8 | ||||
-rw-r--r-- | sys/dev/ic/sili.c | 4 | ||||
-rw-r--r-- | sys/dev/ic/siop_common.c | 5 | ||||
-rw-r--r-- | sys/dev/ic/siopvar_common.h | 4 | ||||
-rw-r--r-- | sys/dev/ic/trm.c | 6 | ||||
-rw-r--r-- | sys/dev/ic/twe.c | 5 | ||||
-rw-r--r-- | sys/dev/ic/twevar.h | 4 | ||||
-rw-r--r-- | sys/dev/ic/uha.c | 8 |
29 files changed, 75 insertions, 91 deletions
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); |