Allow wd33c93 attachments to choose what DMA mode it should use, and arrange
to use burst mode on sec(4), which makes it slightly but significantly faster.
This commit is contained in:
parent
7da05dea5d
commit
439213ef2c
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: wdsc.c,v 1.16 2006/08/26 22:06:37 bjh21 Exp $ */
|
||||
/* $NetBSD: wdsc.c,v 1.17 2006/10/01 22:02:55 bjh21 Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2001 Wayne Knowles
|
||||
@ -37,7 +37,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: wdsc.c,v 1.16 2006/08/26 22:06:37 bjh21 Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: wdsc.c,v 1.17 2006/10/01 22:02:55 bjh21 Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -148,6 +148,7 @@ wdsc_attach(struct device *pdp, struct device *dp, void *auxp)
|
||||
|
||||
sc->sc_id = 0; /* Host ID = 0 */
|
||||
sc->sc_clkfreq = wsc->sc_hpcdma.hpc->clk_freq;
|
||||
sc->sc_dmamode = SBIC_CTL_DMA;
|
||||
|
||||
evcnt_attach_dynamic(&wsc->sc_intrcnt, EVCNT_TYPE_INTR, NULL,
|
||||
sc->sc_dev.dv_xname, "intr");
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: wd33c93.c,v 1.8 2006/09/26 22:45:25 bjh21 Exp $ */
|
||||
/* $NetBSD: wd33c93.c,v 1.9 2006/10/01 22:02:55 bjh21 Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
@ -79,7 +79,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: wd33c93.c,v 1.8 2006/09/26 22:45:25 bjh21 Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: wd33c93.c,v 1.9 2006/10/01 22:02:55 bjh21 Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
|
||||
@ -1912,7 +1912,7 @@ wd33c93_nextstate(struct wd33c93_softc *dev, struct wd33c93_acb *acb, u_char csr
|
||||
wd33c93_dma_setup(dev, datain);
|
||||
|
||||
SET_SBIC_control(dev, SBIC_CTL_EDI | SBIC_CTL_IDI |
|
||||
SBIC_CTL_DMA);
|
||||
dev->sc_dmamode);
|
||||
|
||||
SBIC_DEBUG(DMA, ("DMA xfer: %d(%p:%zx)\n", dev->target,
|
||||
dev->sc_daddr, dev->sc_dleft));
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: wd33c93var.h,v 1.3 2006/09/26 23:27:36 bjh21 Exp $ */
|
||||
/* $NetBSD: wd33c93var.h,v 1.4 2006/10/01 22:02:55 bjh21 Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
@ -161,9 +161,12 @@ struct wd33c93_softc {
|
||||
u_char sc_imsglen;
|
||||
u_char sc_omsglen;
|
||||
|
||||
/* Static hardware attributes */
|
||||
/* Static hardware attributes supplied by attachment */
|
||||
int sc_id; /* SCSI ID for controller */
|
||||
int sc_clkfreq; /* wd33c93 clk freq * 10 MHz */
|
||||
uint8_t sc_dmamode; /* One of SBIC_CTL_*DMA */
|
||||
|
||||
/* Static hardware attributes derived by wd33c93_attach() */
|
||||
int sc_chip; /* Chip variation */
|
||||
int sc_rev; /* Chip revision */
|
||||
int sc_cfflags; /* Copy of config flags */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: sec.c,v 1.1 2006/10/01 12:39:35 bjh21 Exp $ */
|
||||
/* $NetBSD: sec.c,v 1.2 2006/10/01 22:02:55 bjh21 Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2000, 2001, 2006 Ben Harris
|
||||
@ -38,7 +38,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: sec.c,v 1.1 2006/10/01 12:39:35 bjh21 Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: sec.c,v 1.2 2006/10/01 22:02:55 bjh21 Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
|
||||
@ -88,7 +88,7 @@ struct sec_softc {
|
||||
|
||||
#define SEC_DMABLK 16384
|
||||
#define SEC_NBLKS 3
|
||||
#define SEC_DMAMODE MODE_TMODE_SGL
|
||||
#define SEC_DMAMODE MODE_TMODE_DMD
|
||||
|
||||
/* autoconfiguration glue */
|
||||
static int sec_match(struct device *, struct cfdata *, void *);
|
||||
@ -180,6 +180,7 @@ sec_attach(struct device *parent, struct device *self, void *aux)
|
||||
|
||||
sc->sc_sbic.sc_id = 7;
|
||||
sc->sc_sbic.sc_clkfreq = SEC_CLKFREQ;
|
||||
sc->sc_sbic.sc_dmamode = SBIC_CTL_BURST_DMA;
|
||||
|
||||
sc->sc_sbic.sc_adapter.adapt_request = wd33c93_scsi_request;
|
||||
sc->sc_sbic.sc_adapter.adapt_minphys = minphys;
|
||||
|
Loading…
Reference in New Issue
Block a user