summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/ic/adv.c13
-rw-r--r--sys/dev/ic/adw.c14
-rw-r--r--sys/dev/ic/aic79xx_openbsd.c20
-rw-r--r--sys/dev/ic/aic7xxx_openbsd.c20
-rw-r--r--sys/dev/ic/ami.c14
-rw-r--r--sys/dev/ic/cac.c12
-rw-r--r--sys/dev/ic/iha.c17
-rw-r--r--sys/dev/ic/iha.h3
-rw-r--r--sys/dev/ic/trm.c21
-rw-r--r--sys/dev/ic/twe.c11
-rw-r--r--sys/dev/ic/twevar.h3
-rw-r--r--sys/dev/ic/uha.c12
12 files changed, 23 insertions, 137 deletions
diff --git a/sys/dev/ic/adv.c b/sys/dev/ic/adv.c
index 67e0bf2b931..20ecfac4274 100644
--- a/sys/dev/ic/adv.c
+++ b/sys/dev/ic/adv.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: adv.c,v 1.41 2020/01/27 13:11:01 sthen Exp $ */
+/* $OpenBSD: adv.c,v 1.42 2020/02/15 18:02:00 krw Exp $ */
/* $NetBSD: adv.c,v 1.6 1998/10/28 20:39:45 dante Exp $ */
/*
@@ -66,7 +66,6 @@ static void adv_start_ccbs(ASC_SOFTC *);
static u_int8_t *adv_alloc_overrunbuf(char *dvname, bus_dma_tag_t);
static void adv_scsi_cmd(struct scsi_xfer *);
-static void adv_minphys(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);
@@ -83,7 +82,7 @@ struct cfdriver adv_cd = {
struct scsi_adapter adv_switch = {
- adv_scsi_cmd, adv_minphys, NULL, NULL, NULL
+ adv_scsi_cmd, NULL, NULL, NULL, NULL
};
@@ -516,14 +515,6 @@ adv_attach(sc)
}
-static void
-adv_minphys(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);
-}
-
-
/*
* start a scsi operation given the command and the data address. Also needs
* the unit, target and lu.
diff --git a/sys/dev/ic/adw.c b/sys/dev/ic/adw.c
index 2d1499f60bc..2a3fd25ff5f 100644
--- a/sys/dev/ic/adw.c
+++ b/sys/dev/ic/adw.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: adw.c,v 1.58 2020/02/07 13:31:47 krw Exp $ */
+/* $OpenBSD: adw.c,v 1.59 2020/02/15 18:02:00 krw Exp $ */
/* $NetBSD: adw.c,v 1.23 2000/05/27 18:24:50 dante Exp $ */
/*
@@ -65,7 +65,6 @@ int adw_queue_ccb(ADW_SOFTC *, ADW_CCB *, int);
void 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 *, struct scsi_link *);
void adw_isr_callback(ADW_SOFTC *, ADW_SCSI_REQ_Q *);
void adw_async_callback(ADW_SOFTC *, u_int8_t);
@@ -84,7 +83,7 @@ struct cfdriver adw_cd = {
};
struct scsi_adapter adw_switch = {
- adw_scsi_cmd, adw_minphys, NULL, NULL, NULL
+ adw_scsi_cmd, NULL, NULL, NULL, NULL
};
/******************************************************************************/
@@ -520,15 +519,6 @@ adw_attach(ADW_SOFTC *sc)
}
-void
-adw_minphys(struct buf *bp, struct scsi_link *sl)
-{
-
- if (bp->b_bcount > ((ADW_MAX_SG_LIST - 1) * PAGE_SIZE))
- bp->b_bcount = ((ADW_MAX_SG_LIST - 1) * PAGE_SIZE);
-}
-
-
/*
* start a scsi operation given the command and the data address.
* Also needs the unit, target and lu.
diff --git a/sys/dev/ic/aic79xx_openbsd.c b/sys/dev/ic/aic79xx_openbsd.c
index ef7d138d996..95be685f6f8 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.49 2020/02/06 15:08:19 krw Exp $ */
+/* $OpenBSD: aic79xx_openbsd.c,v 1.50 2020/02/15 18:02:00 krw Exp $ */
/*
* Copyright (c) 2004 Milos Urbanek, Kenneth R. Westerback & Marco Peereboom
@@ -76,14 +76,13 @@ void 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 *, struct scsi_link *);
struct cfdriver ahd_cd = {
NULL, "ahd", DV_DULL
};
static struct scsi_adapter ahd_switch = {
- ahd_action, ahd_minphys, NULL, NULL, NULL
+ ahd_action, NULL, NULL, NULL, NULL
};
/*
@@ -249,21 +248,6 @@ ahd_done(struct ahd_softc *ahd, struct scb *scb)
}
void
-ahd_minphys(struct buf *bp, struct scsi_link *sl)
-{
- /*
- * Even though the card can transfer up to 16megs per command
- * we are limited by the number of segments in the dma segment
- * list that we can hold. The worst case is that all pages are
- * discontinuous physically, hence the "page per segment" limit
- * enforced here.
- */
- if (bp->b_bcount > ((AHD_NSEG - 1) * PAGE_SIZE)) {
- bp->b_bcount = ((AHD_NSEG - 1) * PAGE_SIZE);
- }
-}
-
-void
ahd_action(struct scsi_xfer *xs)
{
struct ahd_softc *ahd;
diff --git a/sys/dev/ic/aic7xxx_openbsd.c b/sys/dev/ic/aic7xxx_openbsd.c
index 406a0c33893..861464b54bc 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.59 2020/02/06 15:08:19 krw Exp $ */
+/* $OpenBSD: aic7xxx_openbsd.c,v 1.60 2020/02/15 18:02:00 krw Exp $ */
/* $NetBSD: aic7xxx_osm.c,v 1.14 2003/11/02 11:07:44 wiz Exp $ */
/*
@@ -53,7 +53,6 @@ void ahc_execute_scb(void *, bus_dma_segment_t *, int);
int ahc_poll(struct ahc_softc *, int);
void ahc_setup_data(struct ahc_softc *, struct scsi_xfer *, struct scb *);
-void ahc_minphys(struct buf *, struct scsi_link *);
void ahc_adapter_req_set_xfer_mode(struct ahc_softc *, struct scb *);
@@ -62,7 +61,7 @@ struct cfdriver ahc_cd = {
};
static struct scsi_adapter ahc_switch = {
- ahc_action, ahc_minphys, NULL, NULL, NULL
+ ahc_action, NULL, NULL, NULL, NULL
};
/*
@@ -254,21 +253,6 @@ ahc_done(struct ahc_softc *ahc, struct scb *scb)
}
void
-ahc_minphys(struct buf *bp, struct scsi_link *sl)
-{
- /*
- * Even though the card can transfer up to 16megs per command
- * we are limited by the number of segments in the dma segment
- * list that we can hold. The worst case is that all pages are
- * discontinuous physically, hence the "page per segment" limit
- * enforced here.
- */
- if (bp->b_bcount > ((AHC_NSEG - 1) * PAGE_SIZE)) {
- bp->b_bcount = ((AHC_NSEG - 1) * PAGE_SIZE);
- }
-}
-
-void
ahc_action(struct scsi_xfer *xs)
{
struct ahc_softc *ahc;
diff --git a/sys/dev/ic/ami.c b/sys/dev/ic/ami.c
index b9425ffc6d0..6e655074757 100644
--- a/sys/dev/ic/ami.c
+++ b/sys/dev/ic/ami.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ami.c,v 1.240 2020/01/26 00:53:31 krw Exp $ */
+/* $OpenBSD: ami.c,v 1.241 2020/02/15 18:02:00 krw Exp $ */
/*
* Copyright (c) 2001 Michael Shalayeff
@@ -95,16 +95,15 @@ struct cfdriver ami_cd = {
void ami_scsi_cmd(struct scsi_xfer *);
int ami_scsi_ioctl(struct scsi_link *, u_long, caddr_t, int);
-void ami_minphys(struct buf *bp, struct scsi_link *sl);
struct scsi_adapter ami_switch = {
- ami_scsi_cmd, ami_minphys, NULL, NULL, ami_scsi_ioctl
+ ami_scsi_cmd, NULL, NULL, NULL, ami_scsi_ioctl
};
void ami_scsi_raw_cmd(struct scsi_xfer *);
struct scsi_adapter ami_raw_switch = {
- ami_scsi_raw_cmd, ami_minphys, NULL, NULL, NULL
+ ami_scsi_raw_cmd, NULL, NULL, NULL, NULL
};
void * ami_get_ccb(void *);
@@ -1191,13 +1190,6 @@ ami_done_init(struct ami_softc *sc, struct ami_ccb *ccb)
}
void
-ami_minphys(struct buf *bp, struct scsi_link *sl)
-{
- if (bp->b_bcount > AMI_MAXFER)
- bp->b_bcount = AMI_MAXFER;
-}
-
-void
ami_copy_internal_data(struct scsi_xfer *xs, void *v, size_t size)
{
size_t copy_cnt;
diff --git a/sys/dev/ic/cac.c b/sys/dev/ic/cac.c
index 690f1e86c6e..51d6a21701f 100644
--- a/sys/dev/ic/cac.c
+++ b/sys/dev/ic/cac.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cac.c,v 1.58 2020/01/26 00:53:31 krw Exp $ */
+/* $OpenBSD: cac.c,v 1.59 2020/02/15 18:02:00 krw Exp $ */
/* $NetBSD: cac.c,v 1.15 2000/11/08 19:20:35 ad Exp $ */
/*
@@ -96,10 +96,9 @@ struct cfdriver cac_cd = {
};
void cac_scsi_cmd(struct scsi_xfer *);
-void cac_minphys(struct buf *bp, struct scsi_link *sl);
struct scsi_adapter cac_switch = {
- cac_scsi_cmd, cac_minphys, NULL, NULL, NULL
+ cac_scsi_cmd, NULL, NULL, NULL, NULL
};
void *cac_ccb_alloc(void *);
@@ -562,13 +561,6 @@ cac_get_dinfo(sc, target)
}
void
-cac_minphys(struct buf *bp, struct scsi_link *sl)
-{
- if (bp->b_bcount > CAC_MAX_XFER)
- bp->b_bcount = CAC_MAX_XFER;
-}
-
-void
cac_copy_internal_data(xs, v, size)
struct scsi_xfer *xs;
void *v;
diff --git a/sys/dev/ic/iha.c b/sys/dev/ic/iha.c
index 6e0a5d88c0e..b862342b226 100644
--- a/sys/dev/ic/iha.c
+++ b/sys/dev/ic/iha.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: iha.c,v 1.46 2020/01/26 00:53:31 krw Exp $ */
+/* $OpenBSD: iha.c,v 1.47 2020/02/15 18:02:00 krw Exp $ */
/*-------------------------------------------------------------------------
*
* Device driver for the INI-9XXXU/UW or INIC-940/950 PCI SCSI Controller.
@@ -53,7 +53,7 @@ struct cfdriver iha_cd = {
};
struct scsi_adapter iha_switch = {
- iha_scsi_cmd, iha_minphys, NULL, NULL, NULL
+ iha_scsi_cmd, NULL, NULL, NULL, NULL
};
/*
@@ -443,19 +443,6 @@ iha_init_tulip(struct iha_softc *sc)
}
/*
- * iha_minphys - reduce bp->b_bcount to something less than
- * or equal to the largest I/O possible through
- * the adapter. Called from higher layers
- * via sc->sc_adapter.dev_minphys.
- */
-void
-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);
-}
-
-/*
* iha_reset_dma - abort any active DMA xfer, reset tulip FIFO.
*/
void
diff --git a/sys/dev/ic/iha.h b/sys/dev/ic/iha.h
index 983ed8bf18b..b9a1d25215c 100644
--- a/sys/dev/ic/iha.h
+++ b/sys/dev/ic/iha.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: iha.h,v 1.19 2020/02/06 18:18:51 krw Exp $ */
+/* $OpenBSD: iha.h,v 1.20 2020/02/15 18:02:00 krw Exp $ */
/*-------------------------------------------------------------------------
*
* Device driver for the INI-9XXXU/UW or INIC-940/950 PCI SCSI Controller.
@@ -426,7 +426,6 @@ struct iha_nvram {
void iha_scsi_cmd(struct scsi_xfer *);
int iha_intr(void *);
-void iha_minphys(struct buf *, struct scsi_link *);
int iha_init_tulip(struct iha_softc *);
diff --git a/sys/dev/ic/trm.c b/sys/dev/ic/trm.c
index dfccb55f07d..9d226e2d6a1 100644
--- a/sys/dev/ic/trm.c
+++ b/sys/dev/ic/trm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trm.c,v 1.38 2020/02/06 19:17:54 krw Exp $
+/* $OpenBSD: trm.c,v 1.39 2020/02/15 18:02:00 krw Exp $
* ------------------------------------------------------------
* O.S : OpenBSD
* File Name : trm.c
@@ -61,8 +61,6 @@
/* #define TRM_DEBUG0 */
-void trm_minphys(struct buf *, struct scsi_link *);
-
void trm_initSRB(struct trm_scsi_req_q *);
void trm_check_eeprom(struct trm_adapter_nvram *, bus_space_tag_t, bus_space_handle_t);
@@ -134,7 +132,7 @@ struct cfdriver trm_cd = {
};
struct scsi_adapter trm_switch = {
- trm_scsi_cmd, trm_minphys, NULL, NULL, NULL
+ trm_scsi_cmd, NULL, NULL, NULL, NULL
};
/*
@@ -2352,21 +2350,6 @@ trm_linkSRB(struct trm_softc *sc)
/*
* ------------------------------------------------------------
- * Function : trm_minphys
- * Purpose : limited by the number of segments in the dma segment list
- * Inputs : *buf
- * ------------------------------------------------------------
- */
-void
-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;
- }
-}
-
-/*
- * ------------------------------------------------------------
* Function : trm_initACB
* Purpose : initialize the internal structures for a given SCSI host
* Inputs :
diff --git a/sys/dev/ic/twe.c b/sys/dev/ic/twe.c
index 61637da28cb..6b6a8a6f30a 100644
--- a/sys/dev/ic/twe.c
+++ b/sys/dev/ic/twe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: twe.c,v 1.50 2020/01/26 00:53:31 krw Exp $ */
+/* $OpenBSD: twe.c,v 1.51 2020/02/15 18:02:00 krw Exp $ */
/*
* Copyright (c) 2000-2002 Michael Shalayeff. All rights reserved.
@@ -65,7 +65,7 @@ struct cfdriver twe_cd = {
void twe_scsi_cmd(struct scsi_xfer *);
struct scsi_adapter twe_switch = {
- twe_scsi_cmd, twe_minphys, NULL, NULL, NULL
+ twe_scsi_cmd, NULL, NULL, NULL, NULL
};
void *twe_get_ccb(void *);
@@ -753,13 +753,6 @@ twe_done(sc, ccb)
}
void
-twe_minphys(struct buf *bp, struct scsi_link *sl)
-{
- if (bp->b_bcount > TWE_MAXFER)
- bp->b_bcount = TWE_MAXFER;
-}
-
-void
twe_copy_internal_data(xs, v, size)
struct scsi_xfer *xs;
void *v;
diff --git a/sys/dev/ic/twevar.h b/sys/dev/ic/twevar.h
index 11724b6e529..8b34888991b 100644
--- a/sys/dev/ic/twevar.h
+++ b/sys/dev/ic/twevar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: twevar.h,v 1.12 2020/01/27 02:02:28 krw Exp $ */
+/* $OpenBSD: twevar.h,v 1.13 2020/02/15 18:02:00 krw Exp $ */
/*
* Copyright (c) 2000 Michael Shalayeff
@@ -87,6 +87,5 @@ struct twe_softc {
#define TWE_UNLOCK(sc, lock) splx(lock)
typedef int twe_lock_t;
-void twe_minphys(struct buf *, struct scsi_link *);
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 94863f0a31e..315adeffe88 100644
--- a/sys/dev/ic/uha.c
+++ b/sys/dev/ic/uha.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uha.c,v 1.29 2020/01/26 00:53:31 krw Exp $ */
+/* $OpenBSD: uha.c,v 1.30 2020/02/15 18:02:00 krw Exp $ */
/* $NetBSD: uha.c,v 1.3 1996/10/13 01:37:29 christos Exp $ */
#undef UHADEBUG
@@ -78,11 +78,10 @@
void uha_reset_mscp(struct uha_softc *, struct uha_mscp *);
void uha_mscp_free(void *, void *);
void *uha_mscp_alloc(void *);
-void uha_minphys(struct buf *, struct scsi_link *);
void uha_scsi_cmd(struct scsi_xfer *);
struct scsi_adapter uha_switch = {
- uha_scsi_cmd, uha_minphys, NULL, NULL, NULL
+ uha_scsi_cmd, NULL, NULL, NULL, NULL
};
struct cfdriver uha_cd = {
@@ -260,13 +259,6 @@ uha_done(sc, mscp)
scsi_done(xs);
}
-void
-uha_minphys(struct buf *bp, struct scsi_link *sl)
-{
- if (bp->b_bcount > ((UHA_NSEG - 1) << PGSHIFT))
- bp->b_bcount = ((UHA_NSEG - 1) << PGSHIFT);
-}
-
/*
* start a scsi operation given the command and the data address. Also
* needs the unit, target and lu.