diff options
author | 2020-02-15 18:02:00 +0000 | |
---|---|---|
committer | 2020-02-15 18:02:00 +0000 | |
commit | bbd7668b70b9d5f7e274d61d04f4efddbd1e3ea5 (patch) | |
tree | d4edf012c6f371da8ed8656a9f29867aa10b80de /sys/dev/ic/aic79xx_openbsd.c | |
parent | remove unused function (diff) | |
download | wireguard-openbsd-bbd7668b70b9d5f7e274d61d04f4efddbd1e3ea5.tar.xz wireguard-openbsd-bbd7668b70b9d5f7e274d61d04f4efddbd1e3ea5.zip |
*_minphys() functions that cap i/o sizes at a value larger than the
value minphys() uses (MAXPHYS) are pointless since minphys() is always
called after the *_minphys() function.
MAXPHYS (64 * 1024) == 16 * 4096. 4096 is the smallest PAGE_SIZE we
have. So a *_minphys() function that caps the i/o size at N *
PAGE_SIZE where N is > 16 is just wasting cycles.
Nuke adv_minphys (40 * PAGE_SIZE), adw_minphys (254 * PAGE_SIZE),
ahc_minphys (128 * PAGE_SIZE), ahd_minphys (128 * PAGE_SIZE),
ami_minphys (26 * PAGE_SIZE), cac_minphys (65535 (!!!) * 512),
iha_minphsy (32 * PAGE_SIZE), trm_minphys (31 * PAGE_SIZE),
twe_minphys (62 * PAGE_SIZE). uha_minphys (32 * PAGE_SIZE),
Diffstat (limited to 'sys/dev/ic/aic79xx_openbsd.c')
-rw-r--r-- | sys/dev/ic/aic79xx_openbsd.c | 20 |
1 files changed, 2 insertions, 18 deletions
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; |