Rename "struct channel_softc" to "struct wdc_channel".
This commit is contained in:
parent
f61ad169ec
commit
5bd80d8373
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: wdc_pioc.c,v 1.13 2004/01/01 17:18:54 thorpej Exp $ */
|
||||
/* $NetBSD: wdc_pioc.c,v 1.14 2004/01/03 01:50:52 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-1998 Mark Brinicombe.
|
||||
|
@ -34,7 +34,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: wdc_pioc.c,v 1.13 2004/01/01 17:18:54 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: wdc_pioc.c,v 1.14 2004/01/03 01:50:52 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -58,8 +58,8 @@ __KERNEL_RCSID(0, "$NetBSD: wdc_pioc.c,v 1.13 2004/01/01 17:18:54 thorpej Exp $"
|
|||
|
||||
struct wdc_pioc_softc {
|
||||
struct wdc_softc sc_wdcdev;
|
||||
struct channel_softc *wdc_chanlist[1];
|
||||
struct channel_softc wdc_channel;
|
||||
struct wdc_channel *wdc_chanlist[1];
|
||||
struct wdc_channel wdc_channel;
|
||||
struct ata_queue wdc_chqueue;
|
||||
void *sc_ih;
|
||||
};
|
||||
|
@ -86,7 +86,7 @@ wdc_pioc_probe(parent, cf, aux)
|
|||
void *aux;
|
||||
{
|
||||
struct pioc_attach_args *pa = aux;
|
||||
struct channel_softc ch;
|
||||
struct wdc_channel ch;
|
||||
int res, i;
|
||||
u_int iobase;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: icside.c,v 1.18 2004/01/01 17:18:54 thorpej Exp $ */
|
||||
/* $NetBSD: icside.c,v 1.19 2004/01/03 01:50:52 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-1998 Mark Brinicombe
|
||||
|
@ -42,7 +42,7 @@
|
|||
|
||||
#include <sys/param.h>
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: icside.c,v 1.18 2004/01/01 17:18:54 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: icside.c,v 1.19 2004/01/03 01:50:52 thorpej Exp $");
|
||||
|
||||
#include <sys/systm.h>
|
||||
#include <sys/conf.h>
|
||||
|
@ -83,9 +83,9 @@ struct icside_softc {
|
|||
bus_space_tag_t sc_latchiot; /* EEPROM page latch etc */
|
||||
bus_space_handle_t sc_latchioh;
|
||||
void *sc_shutdownhook;
|
||||
struct channel_softc *sc_chp[ICSIDE_MAX_CHANNELS];
|
||||
struct wdc_channel *sc_chp[ICSIDE_MAX_CHANNELS];
|
||||
struct icside_channel {
|
||||
struct channel_softc wdc_channel; /* generic part */
|
||||
struct wdc_channel wdc_channel; /* generic part */
|
||||
struct ata_queue wdc_chqueue; /* channel queue */
|
||||
void *ic_ih; /* interrupt handler */
|
||||
struct evcnt ic_intrcnt; /* interrupt count */
|
||||
|
@ -178,7 +178,7 @@ icside_attach(struct device *parent, struct device *self, void *aux)
|
|||
u_int iobase;
|
||||
int channel, i;
|
||||
struct icside_channel *icp;
|
||||
struct channel_softc *cp;
|
||||
struct wdc_channel *cp;
|
||||
int loop;
|
||||
int id;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: rapide.c,v 1.17 2004/01/01 17:18:54 thorpej Exp $ */
|
||||
/* $NetBSD: rapide.c,v 1.18 2004/01/03 01:50:52 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-1998 Mark Brinicombe
|
||||
|
@ -68,7 +68,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: rapide.c,v 1.17 2004/01/01 17:18:54 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: rapide.c,v 1.18 2004/01/03 01:50:52 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -110,7 +110,7 @@ __KERNEL_RCSID(0, "$NetBSD: rapide.c,v 1.17 2004/01/01 17:18:54 thorpej Exp $");
|
|||
|
||||
struct rapide_softc {
|
||||
struct wdc_softc sc_wdcdev; /* common wdc definitions */
|
||||
struct channel_softc *wdc_chanarray[2]; /* channels definition */
|
||||
struct wdc_channel *wdc_chanarray[2]; /* channels definition */
|
||||
podule_t *sc_podule; /* Our podule info */
|
||||
int sc_podule_number; /* Our podule number */
|
||||
int sc_intr_enable_mask; /* Global intr mask */
|
||||
|
@ -118,7 +118,7 @@ struct rapide_softc {
|
|||
bus_space_tag_t sc_ctliot; /* Bus tag */
|
||||
bus_space_handle_t sc_ctlioh; /* control handler */
|
||||
struct rapide_channel {
|
||||
struct channel_softc wdc_channel; /* generic part */
|
||||
struct wdc_channel wdc_channel; /* generic part */
|
||||
struct ata_queue wdc_chqueue; /* channel queue */
|
||||
irqhandler_t rc_ih; /* interrupt handler */
|
||||
int rc_irqmask; /* IRQ mask for this channel */
|
||||
|
@ -200,7 +200,7 @@ rapide_attach(parent, self, aux)
|
|||
u_int iobase;
|
||||
int channel, i;
|
||||
struct rapide_channel *rcp;
|
||||
struct channel_softc *cp;
|
||||
struct wdc_channel *cp;
|
||||
irqhandler_t *ihp;
|
||||
|
||||
/* Note the podule number and validate */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: simide.c,v 1.16 2004/01/01 17:18:54 thorpej Exp $ */
|
||||
/* $NetBSD: simide.c,v 1.17 2004/01/03 01:50:52 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997-1998 Mark Brinicombe
|
||||
|
@ -40,7 +40,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: simide.c,v 1.16 2004/01/01 17:18:54 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: simide.c,v 1.17 2004/01/03 01:50:52 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -79,7 +79,7 @@ __KERNEL_RCSID(0, "$NetBSD: simide.c,v 1.16 2004/01/01 17:18:54 thorpej Exp $");
|
|||
|
||||
struct simide_softc {
|
||||
struct wdc_softc sc_wdcdev; /* common wdc definitions */
|
||||
struct channel_softc *wdc_chanarray[2]; /* channels definition */
|
||||
struct wdc_channel *wdc_chanarray[2]; /* channels definition */
|
||||
podule_t *sc_podule; /* Our podule info */
|
||||
int sc_podule_number; /* Our podule number */
|
||||
int sc_ctl_reg; /* Global ctl reg */
|
||||
|
@ -88,7 +88,7 @@ struct simide_softc {
|
|||
bus_space_handle_t sc_ctlioh; /* control handle */
|
||||
struct bus_space sc_tag; /* custom tag */
|
||||
struct simide_channel {
|
||||
struct channel_softc wdc_channel; /* generic part */
|
||||
struct wdc_channel wdc_channel; /* generic part */
|
||||
struct ata_queue wdc_chqueue; /* channel queue */
|
||||
irqhandler_t sc_ih; /* interrupt handler */
|
||||
int sc_irqmask; /* IRQ mask for this channel */
|
||||
|
@ -164,7 +164,7 @@ simide_attach(parent, self, aux)
|
|||
u_int iobase;
|
||||
int channel, i;
|
||||
struct simide_channel *scp;
|
||||
struct channel_softc *cp;
|
||||
struct wdc_channel *cp;
|
||||
irqhandler_t *ihp;
|
||||
|
||||
/* Note the podule number and validate */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: wdc_amiga.c,v 1.17 2004/01/01 17:18:54 thorpej Exp $ */
|
||||
/* $NetBSD: wdc_amiga.c,v 1.18 2004/01/03 01:50:52 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2000, 2003 The NetBSD Foundation, Inc.
|
||||
|
@ -37,7 +37,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: wdc_amiga.c,v 1.17 2004/01/01 17:18:54 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: wdc_amiga.c,v 1.18 2004/01/03 01:50:52 thorpej Exp $");
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
|
@ -61,8 +61,8 @@ __KERNEL_RCSID(0, "$NetBSD: wdc_amiga.c,v 1.17 2004/01/01 17:18:54 thorpej Exp $
|
|||
|
||||
struct wdc_amiga_softc {
|
||||
struct wdc_softc sc_wdcdev;
|
||||
struct channel_softc wdc_chanlist[1];
|
||||
struct channel_softc wdc_channel;
|
||||
struct wdc_channel wdc_chanlist[1];
|
||||
struct wdc_channel wdc_channel;
|
||||
struct ata_queue wdc_chqueue;
|
||||
struct isr sc_isr;
|
||||
volatile u_char *sc_intreg;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: wdc_mb.c,v 1.18 2004/01/01 17:18:54 thorpej Exp $ */
|
||||
/* $NetBSD: wdc_mb.c,v 1.19 2004/01/03 01:50:52 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998, 2003 The NetBSD Foundation, Inc.
|
||||
|
@ -37,7 +37,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: wdc_mb.c,v 1.18 2004/01/01 17:18:54 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: wdc_mb.c,v 1.19 2004/01/03 01:50:52 thorpej Exp $");
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
|
@ -72,8 +72,8 @@ static void write_multi_2_swap __P((bus_space_tag_t, bus_space_handle_t,
|
|||
|
||||
struct wdc_mb_softc {
|
||||
struct wdc_softc sc_wdcdev;
|
||||
struct channel_softc wdc_chanlist[1];
|
||||
struct channel_softc wdc_channel;
|
||||
struct wdc_channel wdc_chanlist[1];
|
||||
struct wdc_channel wdc_channel;
|
||||
struct ata_queue wdc_chqueue;
|
||||
void *sc_ih;
|
||||
};
|
||||
|
@ -91,7 +91,7 @@ wdc_mb_probe(parent, cfp, aux)
|
|||
void *aux;
|
||||
{
|
||||
static int wdc_matched = 0;
|
||||
struct channel_softc ch;
|
||||
struct wdc_channel ch;
|
||||
int result = 0;
|
||||
u_char sv_ierb;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pciide.c,v 1.2 2003/12/14 11:53:52 tsutsui Exp $ */
|
||||
/* $NetBSD: pciide.c,v 1.3 2004/01/03 01:50:53 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2003 The NetBSD Foundation, Inc.
|
||||
|
@ -42,7 +42,7 @@
|
|||
|
||||
int
|
||||
pciide_init(chp, unit)
|
||||
struct channel_softc *chp;
|
||||
struct wdc_channel *chp;
|
||||
u_int *unit;
|
||||
{
|
||||
u_long bpa, addr;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: wdc.c,v 1.4 2003/12/14 11:53:52 tsutsui Exp $ */
|
||||
/* $NetBSD: wdc.c,v 1.5 2004/01/03 01:50:53 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2003 The NetBSD Foundation, Inc.
|
||||
|
@ -49,17 +49,17 @@
|
|||
#define WDCDELAY 100
|
||||
#define WDCNDELAY_RST 31000 * 10
|
||||
|
||||
static int wdcprobe(struct channel_softc *chp);
|
||||
static int wdc_wait_for_ready(struct channel_softc *chp);
|
||||
static int wdcprobe(struct wdc_channel *chp);
|
||||
static int wdc_wait_for_ready(struct wdc_channel *chp);
|
||||
static int wdc_read_block(struct wd_softc *sc, struct wdc_command *wd_c);
|
||||
static int __wdcwait_reset(struct channel_softc *chp, int drv_mask);
|
||||
static int __wdcwait_reset(struct wdc_channel *chp, int drv_mask);
|
||||
|
||||
/*
|
||||
* Reset the controller.
|
||||
*/
|
||||
static int
|
||||
__wdcwait_reset(chp, drv_mask)
|
||||
struct channel_softc *chp;
|
||||
struct wdc_channel *chp;
|
||||
int drv_mask;
|
||||
{
|
||||
int timeout;
|
||||
|
@ -119,7 +119,7 @@ end:
|
|||
*/
|
||||
static int
|
||||
wdcprobe(chp)
|
||||
struct channel_softc *chp;
|
||||
struct wdc_channel *chp;
|
||||
{
|
||||
u_int8_t st0, st1, sc, sn, cl, ch;
|
||||
u_int8_t ret_value = 0x03;
|
||||
|
@ -195,7 +195,7 @@ wdc_init(sc, unit)
|
|||
*/
|
||||
int
|
||||
wdc_wait_for_ready(chp)
|
||||
struct channel_softc *chp;
|
||||
struct wdc_channel *chp;
|
||||
{
|
||||
u_int timeout;
|
||||
for (timeout = WDC_TIMEOUT; timeout > 0; --timeout) {
|
||||
|
@ -215,7 +215,7 @@ wdc_read_block(sc, wd_c)
|
|||
struct wdc_command *wd_c;
|
||||
{
|
||||
int i;
|
||||
struct channel_softc *chp = &sc->sc_channel;
|
||||
struct wdc_channel *chp = &sc->sc_channel;
|
||||
u_int16_t *ptr = (u_int16_t*)wd_c->data;
|
||||
|
||||
if (ptr == NULL)
|
||||
|
@ -236,7 +236,7 @@ wdccommand(sc, wd_c)
|
|||
struct wdc_command *wd_c;
|
||||
{
|
||||
u_int8_t err;
|
||||
struct channel_softc *chp = &sc->sc_channel;
|
||||
struct wdc_channel *chp = &sc->sc_channel;
|
||||
|
||||
#if 0
|
||||
DPRINTF(("wdccommand(%d, %d, %d, %d, %d, %d, %d)\n",
|
||||
|
@ -274,7 +274,7 @@ wdccommandext(wd, wd_c)
|
|||
struct wdc_command *wd_c;
|
||||
{
|
||||
u_int8_t err;
|
||||
struct channel_softc *chp = &wd->sc_channel;
|
||||
struct wdc_channel *chp = &wd->sc_channel;
|
||||
|
||||
/* Select drive, head, and addressing mode. */
|
||||
chp->c_base[wd_sdh] = (wd_c->drive << 4) | WDSD_LBA;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: wdvar.h,v 1.3 2003/12/14 11:53:52 tsutsui Exp $ */
|
||||
/* $NetBSD: wdvar.h,v 1.4 2004/01/03 01:50:53 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2003 The NetBSD Foundation, Inc.
|
||||
|
@ -46,7 +46,7 @@
|
|||
#define PCIIDE_CHANNEL_NDEV 2
|
||||
#define NUNITS (PCIIDE_CHANNEL_NDEV * PCIIDE_NUM_CHANNELS)
|
||||
|
||||
struct channel_softc {
|
||||
struct wdc_channel {
|
||||
volatile u_int8_t *c_base;
|
||||
volatile u_int16_t *c_data;
|
||||
|
||||
|
@ -65,7 +65,7 @@ struct wd_softc {
|
|||
|
||||
struct ataparams sc_params;
|
||||
struct disklabel sc_label;
|
||||
struct channel_softc sc_channel;
|
||||
struct wdc_channel sc_channel;
|
||||
};
|
||||
|
||||
struct wdc_command {
|
||||
|
@ -90,6 +90,6 @@ int wdccommandext (struct wd_softc*, struct wdc_command*);
|
|||
int wdc_exec_read (struct wd_softc*, u_int8_t, daddr_t, void*);
|
||||
int wdc_exec_identify (struct wd_softc*, void*);
|
||||
|
||||
int pciide_init (struct channel_softc*, u_int*);
|
||||
int pciide_init (struct wdc_channel*, u_int*);
|
||||
|
||||
#endif /* _STAND_WDVAR_H */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pciide_pnpbios.c,v 1.12 2004/01/01 17:18:53 thorpej Exp $ */
|
||||
/* $NetBSD: pciide_pnpbios.c,v 1.13 2004/01/03 01:50:53 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1999 Soren S. Jorvang. All rights reserved.
|
||||
|
@ -30,7 +30,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: pciide_pnpbios.c,v 1.12 2004/01/01 17:18:53 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: pciide_pnpbios.c,v 1.13 2004/01/03 01:50:53 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -54,7 +54,7 @@ __KERNEL_RCSID(0, "$NetBSD: pciide_pnpbios.c,v 1.12 2004/01/01 17:18:53 thorpej
|
|||
|
||||
static int pciide_pnpbios_match(struct device *, struct cfdata *, void *);
|
||||
static void pciide_pnpbios_attach(struct device *, struct device *, void *);
|
||||
void pciide_pnpbios_setup_channel(struct channel_softc *);
|
||||
void pciide_pnpbios_setup_channel(struct wdc_channel *);
|
||||
|
||||
extern void pciide_channel_dma_setup(struct pciide_channel *);
|
||||
extern int pciide_dma_init(void *, int, int, void *, size_t, int);
|
||||
|
@ -87,7 +87,7 @@ pciide_pnpbios_attach(parent, self, aux)
|
|||
struct pciide_softc *sc = (void *)self;
|
||||
struct pnpbiosdev_attach_args *aa = aux;
|
||||
struct pciide_channel *cp;
|
||||
struct channel_softc *wdc_cp;
|
||||
struct wdc_channel *wdc_cp;
|
||||
bus_space_tag_t compat_iot;
|
||||
bus_space_handle_t cmd_baseioh, ctl_ioh;
|
||||
int i;
|
||||
|
@ -170,7 +170,7 @@ pciide_pnpbios_attach(parent, self, aux)
|
|||
|
||||
void
|
||||
pciide_pnpbios_setup_channel(chp)
|
||||
struct channel_softc *chp;
|
||||
struct wdc_channel *chp;
|
||||
{
|
||||
struct pciide_channel *cp = (struct pciide_channel *)chp;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: wdc_obio.c,v 1.10 2004/01/01 17:18:54 thorpej Exp $ */
|
||||
/* $NetBSD: wdc_obio.c,v 1.11 2004/01/03 01:50:53 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2002 Takeshi Shibagaki All rights reserved.
|
||||
|
@ -32,7 +32,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: wdc_obio.c,v 1.10 2004/01/01 17:18:54 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: wdc_obio.c,v 1.11 2004/01/03 01:50:53 thorpej Exp $");
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
|
@ -66,8 +66,8 @@ static u_long IDEBase = 0x50f1a000;
|
|||
|
||||
struct wdc_obio_softc {
|
||||
struct wdc_softc sc_wdcdev;
|
||||
struct channel_softc wdc_chanlist[1];
|
||||
struct channel_softc wdc_channel;
|
||||
struct wdc_channel wdc_chanlist[1];
|
||||
struct wdc_channel wdc_channel;
|
||||
struct ata_queue wdc_chqueue;
|
||||
void *sc_ih;
|
||||
};
|
||||
|
@ -86,7 +86,7 @@ wdc_obio_match(parent, match, aux)
|
|||
void *aux;
|
||||
{
|
||||
struct obio_attach_args *oa = (struct obio_attach_args *) aux;
|
||||
struct channel_softc ch;
|
||||
struct wdc_channel ch;
|
||||
static int wdc_matched = 0;
|
||||
int i, result = 0;
|
||||
|
||||
|
@ -132,7 +132,7 @@ wdc_obio_match(parent, match, aux)
|
|||
|
||||
static bus_space_tag_t wdc_obio_isr_tag;
|
||||
static bus_space_handle_t wdc_obio_isr_hdl;
|
||||
static struct channel_softc *ch_sc = NULL;
|
||||
static struct wdc_channel *ch_sc = NULL;
|
||||
|
||||
void
|
||||
wdc_obio_intr(arg)
|
||||
|
@ -157,7 +157,7 @@ wdc_obio_attach(parent, self, aux)
|
|||
{
|
||||
struct wdc_obio_softc *sc = (void *)self;
|
||||
struct obio_attach_args *oa = aux;
|
||||
struct channel_softc *chp = &sc->wdc_channel;
|
||||
struct wdc_channel *chp = &sc->wdc_channel;
|
||||
int i;
|
||||
|
||||
oa->oa_addr = IDEBase;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: kauai.c,v 1.9 2004/01/01 17:18:54 thorpej Exp $ */
|
||||
/* $NetBSD: kauai.c,v 1.10 2004/01/03 01:50:53 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2003 Tsubai Masanari. All rights reserved.
|
||||
|
@ -27,7 +27,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: kauai.c,v 1.9 2004/01/01 17:18:54 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: kauai.c,v 1.10 2004/01/03 01:50:53 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -58,8 +58,8 @@ __KERNEL_RCSID(0, "$NetBSD: kauai.c,v 1.9 2004/01/01 17:18:54 thorpej Exp $");
|
|||
|
||||
struct kauai_softc {
|
||||
struct wdc_softc sc_wdcdev;
|
||||
struct channel_softc wdc_chanlist[1];
|
||||
struct channel_softc wdc_channel;
|
||||
struct wdc_channel wdc_chanlist[1];
|
||||
struct wdc_channel wdc_channel;
|
||||
struct ata_queue wdc_queue;
|
||||
dbdma_regmap_t *sc_dmareg;
|
||||
dbdma_command_t *sc_dmacmd;
|
||||
|
@ -75,7 +75,7 @@ void kauai_attach __P((struct device *, struct device *, void *));
|
|||
int kauai_dma_init __P((void *, int, int, void *, size_t, int));
|
||||
void kauai_dma_start __P((void *, int, int));
|
||||
int kauai_dma_finish __P((void *, int, int, int));
|
||||
void kauai_set_modes __P((struct channel_softc *));
|
||||
void kauai_set_modes __P((struct wdc_channel *));
|
||||
static void calc_timing_kauai __P((struct kauai_softc *, int));
|
||||
static int getnodebypci(pci_chipset_tag_t, pcitag_t);
|
||||
|
||||
|
@ -105,7 +105,7 @@ kauai_attach(parent, self, aux)
|
|||
{
|
||||
struct kauai_softc *sc = (void *)self;
|
||||
struct pci_attach_args *pa = aux;
|
||||
struct channel_softc *chp = &sc->wdc_channel;
|
||||
struct wdc_channel *chp = &sc->wdc_channel;
|
||||
pci_intr_handle_t ih;
|
||||
paddr_t regbase, dmabase;
|
||||
int node, reg[5], i;
|
||||
|
@ -196,7 +196,7 @@ kauai_attach(parent, self, aux)
|
|||
|
||||
void
|
||||
kauai_set_modes(chp)
|
||||
struct channel_softc *chp;
|
||||
struct wdc_channel *chp;
|
||||
{
|
||||
struct kauai_softc *sc = (void *)chp->wdc;
|
||||
struct ata_drive_datas *drvp0 = &chp->ch_drive[0];
|
||||
|
@ -253,7 +253,7 @@ calc_timing_kauai(sc, drive)
|
|||
struct kauai_softc *sc;
|
||||
int drive;
|
||||
{
|
||||
struct channel_softc *chp = &sc->wdc_channel;
|
||||
struct wdc_channel *chp = &sc->wdc_channel;
|
||||
struct ata_drive_datas *drvp = &chp->ch_drive[drive];
|
||||
int piomode = drvp->PIO_mode;
|
||||
int dmamode = drvp->DMA_mode;
|
||||
|
@ -284,7 +284,7 @@ kauai_dma_init(v, channel, drive, databuf, datalen, flags)
|
|||
{
|
||||
struct kauai_softc *sc = v;
|
||||
dbdma_command_t *cmdp = sc->sc_dmacmd;
|
||||
struct channel_softc *chp = &sc->wdc_channel;
|
||||
struct wdc_channel *chp = &sc->wdc_channel;
|
||||
vaddr_t va = (vaddr_t)databuf;
|
||||
int read = flags & WDC_DMA_READ;
|
||||
int cmd = read ? DBDMA_CMD_IN_MORE : DBDMA_CMD_OUT_MORE;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: wdc_obio.c,v 1.33 2004/01/01 17:18:54 thorpej Exp $ */
|
||||
/* $NetBSD: wdc_obio.c,v 1.34 2004/01/03 01:50:53 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998, 2003 The NetBSD Foundation, Inc.
|
||||
|
@ -37,7 +37,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: wdc_obio.c,v 1.33 2004/01/01 17:18:54 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: wdc_obio.c,v 1.34 2004/01/03 01:50:53 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -70,8 +70,8 @@ __KERNEL_RCSID(0, "$NetBSD: wdc_obio.c,v 1.33 2004/01/01 17:18:54 thorpej Exp $"
|
|||
|
||||
struct wdc_obio_softc {
|
||||
struct wdc_softc sc_wdcdev;
|
||||
struct channel_softc wdc_chanptr[1];
|
||||
struct channel_softc wdc_channel;
|
||||
struct wdc_channel wdc_chanptr[1];
|
||||
struct wdc_channel wdc_channel;
|
||||
struct ata_queue wdc_chqueue;
|
||||
dbdma_regmap_t *sc_dmareg;
|
||||
dbdma_command_t *sc_dmacmd;
|
||||
|
@ -86,9 +86,9 @@ int wdc_obio_dma_init __P((void *, int, int, void *, size_t, int));
|
|||
void wdc_obio_dma_start __P((void *, int, int));
|
||||
int wdc_obio_dma_finish __P((void *, int, int, int));
|
||||
|
||||
static void wdc_obio_select __P((struct channel_softc *, int));
|
||||
static void adjust_timing __P((struct channel_softc *));
|
||||
static void ata4_adjust_timing __P((struct channel_softc *));
|
||||
static void wdc_obio_select __P((struct wdc_channel *, int));
|
||||
static void adjust_timing __P((struct wdc_channel *));
|
||||
static void ata4_adjust_timing __P((struct wdc_channel *));
|
||||
|
||||
CFATTACH_DECL(wdc_obio, sizeof(struct wdc_obio_softc),
|
||||
wdc_obio_probe, wdc_obio_attach, wdc_obio_detach, wdcactivate);
|
||||
|
@ -125,7 +125,7 @@ wdc_obio_attach(parent, self, aux)
|
|||
{
|
||||
struct wdc_obio_softc *sc = (void *)self;
|
||||
struct confargs *ca = aux;
|
||||
struct channel_softc *chp = &sc->wdc_channel;
|
||||
struct wdc_channel *chp = &sc->wdc_channel;
|
||||
int intr, i;
|
||||
int use_dma = 0;
|
||||
char path[80];
|
||||
|
@ -273,7 +273,7 @@ static struct ide_timings udma_timing[5] = {
|
|||
|
||||
void
|
||||
wdc_obio_select(chp, drive)
|
||||
struct channel_softc *chp;
|
||||
struct wdc_channel *chp;
|
||||
int drive;
|
||||
{
|
||||
struct wdc_obio_softc *sc = (struct wdc_obio_softc *)chp->wdc;
|
||||
|
@ -283,7 +283,7 @@ wdc_obio_select(chp, drive)
|
|||
|
||||
void
|
||||
adjust_timing(chp)
|
||||
struct channel_softc *chp;
|
||||
struct wdc_channel *chp;
|
||||
{
|
||||
struct wdc_obio_softc *sc = (struct wdc_obio_softc *)chp->wdc;
|
||||
int drive;
|
||||
|
@ -350,7 +350,7 @@ adjust_timing(chp)
|
|||
|
||||
void
|
||||
ata4_adjust_timing(chp)
|
||||
struct channel_softc *chp;
|
||||
struct wdc_channel *chp;
|
||||
{
|
||||
struct wdc_obio_softc *sc = (struct wdc_obio_softc *)chp->wdc;
|
||||
int drive;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: wdc_spd.c,v 1.10 2004/01/01 17:18:54 thorpej Exp $ */
|
||||
/* $NetBSD: wdc_spd.c,v 1.11 2004/01/03 01:50:53 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2001, 2003 The NetBSD Foundation, Inc.
|
||||
|
@ -37,7 +37,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: wdc_spd.c,v 1.10 2004/01/01 17:18:54 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: wdc_spd.c,v 1.11 2004/01/03 01:50:53 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -75,8 +75,8 @@ __KERNEL_RCSID(0, "$NetBSD: wdc_spd.c,v 1.10 2004/01/01 17:18:54 thorpej Exp $")
|
|||
|
||||
struct wdc_spd_softc {
|
||||
struct wdc_softc sc_wdcdev;
|
||||
struct channel_softc wdc_chanlist[1];
|
||||
struct channel_softc wdc_channel;
|
||||
struct wdc_channel wdc_chanlist[1];
|
||||
struct wdc_channel wdc_channel;
|
||||
struct ata_queue wdc_chqueue;
|
||||
void *sc_ih;
|
||||
};
|
||||
|
@ -97,7 +97,7 @@ extern struct cfdriver wdc_cd;
|
|||
|
||||
STATIC void __wdc_spd_enable(void);
|
||||
STATIC void __wdc_spd_disable(void) __attribute__((__unused__));
|
||||
STATIC void __wdc_spd_bus_space(struct channel_softc *);
|
||||
STATIC void __wdc_spd_bus_space(struct wdc_channel *);
|
||||
|
||||
/*
|
||||
* wdc register is 16 bit wide.
|
||||
|
@ -172,7 +172,7 @@ int
|
|||
wdc_spd_match(struct device *parent, struct cfdata *cf, void *aux)
|
||||
{
|
||||
struct spd_attach_args *spa = aux;
|
||||
struct channel_softc ch;
|
||||
struct wdc_channel ch;
|
||||
int i, result;
|
||||
|
||||
if (spa->spa_slot != SPD_HDD)
|
||||
|
@ -196,7 +196,7 @@ wdc_spd_attach(struct device *parent, struct device *self, void *aux)
|
|||
struct spd_attach_args *spa = aux;
|
||||
struct wdc_spd_softc *sc = (void *)self;
|
||||
struct wdc_softc *wdc = &sc->sc_wdcdev;
|
||||
struct channel_softc *ch = &sc->wdc_channel;
|
||||
struct wdc_channel *ch = &sc->wdc_channel;
|
||||
|
||||
printf(": %s\n", spa->spa_product_name);
|
||||
|
||||
|
@ -220,7 +220,7 @@ wdc_spd_attach(struct device *parent, struct device *self, void *aux)
|
|||
}
|
||||
|
||||
void
|
||||
__wdc_spd_bus_space(struct channel_softc *ch)
|
||||
__wdc_spd_bus_space(struct wdc_channel *ch)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: wdc_obio.c,v 1.11 2004/01/01 17:18:54 thorpej Exp $ */
|
||||
/* $NetBSD: wdc_obio.c,v 1.12 2004/01/03 01:50:53 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998, 2003 The NetBSD Foundation, Inc.
|
||||
|
@ -37,7 +37,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: wdc_obio.c,v 1.11 2004/01/01 17:18:54 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: wdc_obio.c,v 1.12 2004/01/03 01:50:53 thorpej Exp $");
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
|
@ -62,8 +62,8 @@ __KERNEL_RCSID(0, "$NetBSD: wdc_obio.c,v 1.11 2004/01/01 17:18:54 thorpej Exp $"
|
|||
|
||||
struct wdc_obio_softc {
|
||||
struct wdc_softc sc_wdcdev;
|
||||
struct channel_softc wdc_chanlist[1];
|
||||
struct channel_softc wdc_channel;
|
||||
struct wdc_channel wdc_chanlist[1];
|
||||
struct wdc_channel wdc_channel;
|
||||
struct ata_queue wdc_chqueue;
|
||||
void *sc_ih;
|
||||
};
|
||||
|
@ -77,7 +77,7 @@ CFATTACH_DECL(wdc_obio, sizeof(struct wdc_obio_softc),
|
|||
static int
|
||||
wdc_obio_probe(struct device *parent, struct cfdata *match, void *aux)
|
||||
{
|
||||
struct channel_softc ch;
|
||||
struct wdc_channel ch;
|
||||
struct obio_attach_args *oa = aux;
|
||||
int result = 0;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ata.c,v 1.24 2004/01/01 17:18:54 thorpej Exp $ */
|
||||
/* $NetBSD: ata.c,v 1.25 2004/01/03 01:50:53 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998, 2001 Manuel Bouyer. All rights reserved.
|
||||
|
@ -30,7 +30,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ata.c,v 1.24 2004/01/01 17:18:54 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ata.c,v 1.25 2004/01/03 01:50:53 thorpej Exp $");
|
||||
|
||||
#ifndef WDCDEBUG
|
||||
#define WDCDEBUG
|
||||
|
@ -83,7 +83,7 @@ extern int wdcdebug_mask; /* init'ed in wdc.c */
|
|||
int
|
||||
atabusprint(void *aux, const char *pnp)
|
||||
{
|
||||
struct channel_softc *chan = aux;
|
||||
struct wdc_channel *chan = aux;
|
||||
|
||||
if (pnp)
|
||||
aprint_normal("atabus at %s", pnp);
|
||||
|
@ -118,7 +118,7 @@ static void
|
|||
atabus_thread(void *arg)
|
||||
{
|
||||
struct atabus_softc *sc = arg;
|
||||
struct channel_softc *chp = sc->sc_chan;
|
||||
struct wdc_channel *chp = sc->sc_chan;
|
||||
struct ata_xfer *xfer;
|
||||
int s;
|
||||
|
||||
|
@ -178,7 +178,7 @@ static void
|
|||
atabus_create_thread(void *arg)
|
||||
{
|
||||
struct atabus_softc *sc = arg;
|
||||
struct channel_softc *chp = sc->sc_chan;
|
||||
struct wdc_channel *chp = sc->sc_chan;
|
||||
int error;
|
||||
|
||||
if ((error = kthread_create1(atabus_thread, sc, &chp->thread,
|
||||
|
@ -195,7 +195,7 @@ atabus_create_thread(void *arg)
|
|||
static int
|
||||
atabus_match(struct device *parent, struct cfdata *cf, void *aux)
|
||||
{
|
||||
struct channel_softc *chp = aux;
|
||||
struct wdc_channel *chp = aux;
|
||||
|
||||
if (chp == NULL)
|
||||
return (0);
|
||||
|
@ -216,7 +216,7 @@ static void
|
|||
atabus_attach(struct device *parent, struct device *self, void *aux)
|
||||
{
|
||||
struct atabus_softc *sc = (void *) self;
|
||||
struct channel_softc *chp = aux;
|
||||
struct wdc_channel *chp = aux;
|
||||
struct atabus_initq *initq;
|
||||
|
||||
sc->sc_chan = chp;
|
||||
|
@ -240,7 +240,7 @@ static int
|
|||
atabus_activate(struct device *self, enum devact act)
|
||||
{
|
||||
struct atabus_softc *sc = (void *) self;
|
||||
struct channel_softc *chp = sc->sc_chan;
|
||||
struct wdc_channel *chp = sc->sc_chan;
|
||||
struct device *dev = NULL;
|
||||
int s, i, error = 0;
|
||||
|
||||
|
@ -298,7 +298,7 @@ static int
|
|||
atabus_detach(struct device *self, int flags)
|
||||
{
|
||||
struct atabus_softc *sc = (void *) self;
|
||||
struct channel_softc *chp = sc->sc_chan;
|
||||
struct wdc_channel *chp = sc->sc_chan;
|
||||
struct device *dev = NULL;
|
||||
int i, error = 0;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ata_wdc.c,v 1.49 2004/01/01 20:25:22 thorpej Exp $ */
|
||||
/* $NetBSD: ata_wdc.c,v 1.50 2004/01/03 01:50:53 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998, 2001, 2003 Manuel Bouyer.
|
||||
|
@ -66,7 +66,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ata_wdc.c,v 1.49 2004/01/01 20:25:22 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ata_wdc.c,v 1.50 2004/01/03 01:50:53 thorpej Exp $");
|
||||
|
||||
#ifndef WDCDEBUG
|
||||
#define WDCDEBUG
|
||||
|
@ -115,12 +115,12 @@ extern int wdcdebug_wd_mask; /* inited in wd.c */
|
|||
#define ATA_DELAY 10000 /* 10s for a drive I/O */
|
||||
|
||||
static int wdc_ata_bio(struct ata_drive_datas*, struct ata_bio*);
|
||||
static void wdc_ata_bio_start(struct channel_softc *,struct ata_xfer *);
|
||||
static void _wdc_ata_bio_start(struct channel_softc *,struct ata_xfer *);
|
||||
static int wdc_ata_bio_intr(struct channel_softc *, struct ata_xfer *,
|
||||
static void wdc_ata_bio_start(struct wdc_channel *,struct ata_xfer *);
|
||||
static void _wdc_ata_bio_start(struct wdc_channel *,struct ata_xfer *);
|
||||
static int wdc_ata_bio_intr(struct wdc_channel *, struct ata_xfer *,
|
||||
int);
|
||||
static void wdc_ata_bio_kill_xfer(struct channel_softc *,struct ata_xfer *);
|
||||
static void wdc_ata_bio_done(struct channel_softc *, struct ata_xfer *);
|
||||
static void wdc_ata_bio_kill_xfer(struct wdc_channel *,struct ata_xfer *);
|
||||
static void wdc_ata_bio_done(struct wdc_channel *, struct ata_xfer *);
|
||||
static int wdc_ata_err(struct ata_drive_datas *, struct ata_bio *);
|
||||
#define WDC_ATA_NOERR 0x00 /* Drive doesn't report an error */
|
||||
#define WDC_ATA_RECOV 0x01 /* There was a recovered error */
|
||||
|
@ -173,7 +173,7 @@ static int
|
|||
wdc_ata_bio(struct ata_drive_datas *drvp, struct ata_bio *ata_bio)
|
||||
{
|
||||
struct ata_xfer *xfer;
|
||||
struct channel_softc *chp = drvp->chnl_softc;
|
||||
struct wdc_channel *chp = drvp->chnl_softc;
|
||||
|
||||
xfer = wdc_get_xfer(WDC_NOSLEEP);
|
||||
if (xfer == NULL)
|
||||
|
@ -197,7 +197,7 @@ wdc_ata_bio(struct ata_drive_datas *drvp, struct ata_bio *ata_bio)
|
|||
}
|
||||
|
||||
static void
|
||||
wdc_ata_bio_start(struct channel_softc *chp, struct ata_xfer *xfer)
|
||||
wdc_ata_bio_start(struct wdc_channel *chp, struct ata_xfer *xfer)
|
||||
{
|
||||
struct ata_bio *ata_bio = xfer->c_cmd;
|
||||
struct ata_drive_datas *drvp = &chp->ch_drive[xfer->c_drive];
|
||||
|
@ -329,7 +329,7 @@ ctrldone:
|
|||
}
|
||||
|
||||
static void
|
||||
_wdc_ata_bio_start(struct channel_softc *chp, struct ata_xfer *xfer)
|
||||
_wdc_ata_bio_start(struct wdc_channel *chp, struct ata_xfer *xfer)
|
||||
{
|
||||
int wait_flags = (xfer->c_flags & C_POLL) ? AT_POLL : 0;
|
||||
struct ata_bio *ata_bio = xfer->c_cmd;
|
||||
|
@ -570,7 +570,7 @@ timeout:
|
|||
}
|
||||
|
||||
static int
|
||||
wdc_ata_bio_intr(struct channel_softc *chp, struct ata_xfer *xfer, int irq)
|
||||
wdc_ata_bio_intr(struct wdc_channel *chp, struct ata_xfer *xfer, int irq)
|
||||
{
|
||||
struct ata_bio *ata_bio = xfer->c_cmd;
|
||||
struct ata_drive_datas *drvp = &chp->ch_drive[xfer->c_drive];
|
||||
|
@ -730,13 +730,13 @@ end:
|
|||
static void
|
||||
wdc_ata_kill_pending(struct ata_drive_datas *drvp)
|
||||
{
|
||||
struct channel_softc *chp = drvp->chnl_softc;
|
||||
struct wdc_channel *chp = drvp->chnl_softc;
|
||||
|
||||
wdc_kill_pending(chp);
|
||||
}
|
||||
|
||||
static void
|
||||
wdc_ata_bio_kill_xfer(struct channel_softc *chp, struct ata_xfer *xfer)
|
||||
wdc_ata_bio_kill_xfer(struct wdc_channel *chp, struct ata_xfer *xfer)
|
||||
{
|
||||
struct ata_bio *ata_bio = xfer->c_cmd;
|
||||
int drive = xfer->c_drive;
|
||||
|
@ -753,7 +753,7 @@ wdc_ata_bio_kill_xfer(struct channel_softc *chp, struct ata_xfer *xfer)
|
|||
}
|
||||
|
||||
static void
|
||||
wdc_ata_bio_done(struct channel_softc *chp, struct ata_xfer *xfer)
|
||||
wdc_ata_bio_done(struct wdc_channel *chp, struct ata_xfer *xfer)
|
||||
{
|
||||
struct ata_bio *ata_bio = xfer->c_cmd;
|
||||
int drive = xfer->c_drive;
|
||||
|
@ -782,7 +782,7 @@ wdc_ata_bio_done(struct channel_softc *chp, struct ata_xfer *xfer)
|
|||
static int
|
||||
wdc_ata_err(struct ata_drive_datas *drvp, struct ata_bio *ata_bio)
|
||||
{
|
||||
struct channel_softc *chp = drvp->chnl_softc;
|
||||
struct wdc_channel *chp = drvp->chnl_softc;
|
||||
ata_bio->error = 0;
|
||||
if (chp->ch_status & WDCS_BSY) {
|
||||
ata_bio->error = TIMEOUT;
|
||||
|
@ -819,7 +819,7 @@ wdc_ata_err(struct ata_drive_datas *drvp, struct ata_bio *ata_bio)
|
|||
static int
|
||||
wdc_ata_addref(struct ata_drive_datas *drvp)
|
||||
{
|
||||
struct channel_softc *chp = drvp->chnl_softc;
|
||||
struct wdc_channel *chp = drvp->chnl_softc;
|
||||
|
||||
return (wdc_addref(chp));
|
||||
}
|
||||
|
@ -827,7 +827,7 @@ wdc_ata_addref(struct ata_drive_datas *drvp)
|
|||
static void
|
||||
wdc_ata_delref(struct ata_drive_datas *drvp)
|
||||
{
|
||||
struct channel_softc *chp = drvp->chnl_softc;
|
||||
struct wdc_channel *chp = drvp->chnl_softc;
|
||||
|
||||
wdc_delref(chp);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: atavar.h,v 1.39 2004/01/01 17:18:54 thorpej Exp $ */
|
||||
/* $NetBSD: atavar.h,v 1.40 2004/01/03 01:50:53 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998, 2001 Manuel Bouyer.
|
||||
|
@ -43,7 +43,7 @@ struct ata_xfer {
|
|||
__volatile u_int c_flags; /* command state flags */
|
||||
|
||||
/* Channel and drive that are to process the request. */
|
||||
struct channel_softc *c_chp;
|
||||
struct wdc_channel *c_chp;
|
||||
int c_drive;
|
||||
|
||||
void *c_cmd; /* private request structure pointer */
|
||||
|
@ -56,9 +56,9 @@ struct ata_xfer {
|
|||
TAILQ_ENTRY(ata_xfer) c_xferchain;
|
||||
|
||||
/* Low-level protocol handlers. */
|
||||
void (*c_start)(struct channel_softc *, struct ata_xfer *);
|
||||
int (*c_intr)(struct channel_softc *, struct ata_xfer *, int);
|
||||
void (*c_kill_xfer)(struct channel_softc *, struct ata_xfer *);
|
||||
void (*c_start)(struct wdc_channel *, struct ata_xfer *);
|
||||
int (*c_intr)(struct wdc_channel *, struct ata_xfer *, int);
|
||||
void (*c_kill_xfer)(struct wdc_channel *, struct ata_xfer *);
|
||||
};
|
||||
|
||||
#define C_ATAPI 0x0001 /* xfer is ATAPI request */
|
||||
|
@ -75,7 +75,7 @@ struct ata_queue {
|
|||
/* ATA bus instance state information. */
|
||||
struct atabus_softc {
|
||||
struct device sc_dev;
|
||||
struct channel_softc *sc_chan; /* XXXwdc */
|
||||
struct wdc_channel *sc_chan; /* XXXwdc */
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: wdc.c,v 1.167 2004/01/01 21:18:28 thorpej Exp $ */
|
||||
/* $NetBSD: wdc.c,v 1.168 2004/01/03 01:50:53 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998, 2001, 2003 Manuel Bouyer. All rights reserved.
|
||||
|
@ -70,7 +70,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: wdc.c,v 1.167 2004/01/01 21:18:28 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: wdc.c,v 1.168 2004/01/03 01:50:53 thorpej Exp $");
|
||||
|
||||
#ifndef WDCDEBUG
|
||||
#define WDCDEBUG
|
||||
|
@ -143,14 +143,14 @@ const struct ata_bustype wdc_ata_bustype = {
|
|||
};
|
||||
#endif
|
||||
|
||||
static int wdcprobe1(struct channel_softc*, int);
|
||||
static void __wdcerror(struct channel_softc*, char *);
|
||||
static int __wdcwait_reset(struct channel_softc *, int, int);
|
||||
static void __wdccommand_done(struct channel_softc *, struct ata_xfer *);
|
||||
static void __wdccommand_start(struct channel_softc *, struct ata_xfer *);
|
||||
static int __wdccommand_intr(struct channel_softc *, struct ata_xfer *,
|
||||
static int wdcprobe1(struct wdc_channel*, int);
|
||||
static void __wdcerror(struct wdc_channel*, char *);
|
||||
static int __wdcwait_reset(struct wdc_channel *, int, int);
|
||||
static void __wdccommand_done(struct wdc_channel *, struct ata_xfer *);
|
||||
static void __wdccommand_start(struct wdc_channel *, struct ata_xfer *);
|
||||
static int __wdccommand_intr(struct wdc_channel *, struct ata_xfer *,
|
||||
int);
|
||||
static int __wdcwait(struct channel_softc *, int, int, int);
|
||||
static int __wdcwait(struct wdc_channel *, int, int, int);
|
||||
|
||||
#define DEBUG_INTR 0x01
|
||||
#define DEBUG_XFERS 0x02
|
||||
|
@ -190,7 +190,7 @@ struct simplelock atabus_interlock = SIMPLELOCK_INITIALIZER;
|
|||
*/
|
||||
|
||||
static void
|
||||
wdc_drvprobe(struct channel_softc *chp)
|
||||
wdc_drvprobe(struct wdc_channel *chp)
|
||||
{
|
||||
struct ataparams params;
|
||||
u_int8_t st0 = 0, st1 = 0;
|
||||
|
@ -339,7 +339,7 @@ wdc_drvprobe(struct channel_softc *chp)
|
|||
void
|
||||
atabusconfig(struct atabus_softc *atabus_sc)
|
||||
{
|
||||
struct channel_softc *chp = atabus_sc->sc_chan;
|
||||
struct wdc_channel *chp = atabus_sc->sc_chan;
|
||||
int i, error, need_delref = 0;
|
||||
struct atabus_initq *atabus_initq = NULL;
|
||||
|
||||
|
@ -464,14 +464,14 @@ atabusconfig(struct atabus_softc *atabus_sc)
|
|||
}
|
||||
|
||||
int
|
||||
wdcprobe(struct channel_softc *chp)
|
||||
wdcprobe(struct wdc_channel *chp)
|
||||
{
|
||||
|
||||
return (wdcprobe1(chp, 1));
|
||||
}
|
||||
|
||||
static int
|
||||
wdcprobe1(struct channel_softc *chp, int poll)
|
||||
wdcprobe1(struct wdc_channel *chp, int poll)
|
||||
{
|
||||
u_int8_t st0, st1, sc, sn, cl, ch;
|
||||
u_int8_t ret_value = 0x03;
|
||||
|
@ -648,7 +648,7 @@ wdcprobe1(struct channel_softc *chp, int poll)
|
|||
}
|
||||
|
||||
void
|
||||
wdcattach(struct channel_softc *chp)
|
||||
wdcattach(struct wdc_channel *chp)
|
||||
{
|
||||
static int inited = 0;
|
||||
|
||||
|
@ -699,7 +699,7 @@ int
|
|||
wdcdetach(struct device *self, int flags)
|
||||
{
|
||||
struct wdc_softc *wdc = (struct wdc_softc *)self;
|
||||
struct channel_softc *chp;
|
||||
struct wdc_channel *chp;
|
||||
int i, error = 0;
|
||||
|
||||
for (i = 0; i < wdc->nchannels; i++) {
|
||||
|
@ -719,7 +719,7 @@ wdcdetach(struct device *self, int flags)
|
|||
* are shared.
|
||||
*/
|
||||
void
|
||||
wdcstart(struct channel_softc *chp)
|
||||
wdcstart(struct wdc_channel *chp)
|
||||
{
|
||||
struct ata_xfer *xfer;
|
||||
|
||||
|
@ -773,7 +773,7 @@ wdcstart(struct channel_softc *chp)
|
|||
void
|
||||
wdcrestart(void *v)
|
||||
{
|
||||
struct channel_softc *chp = v;
|
||||
struct wdc_channel *chp = v;
|
||||
int s;
|
||||
|
||||
s = splbio();
|
||||
|
@ -791,7 +791,7 @@ wdcrestart(void *v)
|
|||
int
|
||||
wdcintr(void *arg)
|
||||
{
|
||||
struct channel_softc *chp = arg;
|
||||
struct wdc_channel *chp = arg;
|
||||
struct ata_xfer *xfer;
|
||||
int ret;
|
||||
|
||||
|
@ -831,7 +831,7 @@ wdcintr(void *arg)
|
|||
void
|
||||
wdc_reset_channel(struct ata_drive_datas *drvp, int flags)
|
||||
{
|
||||
struct channel_softc *chp = drvp->chnl_softc;
|
||||
struct wdc_channel *chp = drvp->chnl_softc;
|
||||
int drive;
|
||||
|
||||
WDCDEBUG_PRINT(("ata_reset_channel %s:%d for drive %d\n",
|
||||
|
@ -854,7 +854,7 @@ wdc_reset_channel(struct ata_drive_datas *drvp, int flags)
|
|||
}
|
||||
|
||||
int
|
||||
wdcreset(struct channel_softc *chp, int poll)
|
||||
wdcreset(struct wdc_channel *chp, int poll)
|
||||
{
|
||||
int drv_mask1, drv_mask2;
|
||||
int s = 0;
|
||||
|
@ -897,7 +897,7 @@ wdcreset(struct channel_softc *chp, int poll)
|
|||
}
|
||||
|
||||
static int
|
||||
__wdcwait_reset(struct channel_softc *chp, int drv_mask, int poll)
|
||||
__wdcwait_reset(struct wdc_channel *chp, int drv_mask, int poll)
|
||||
{
|
||||
int timeout, nloop;
|
||||
u_int8_t st0 = 0, st1 = 0;
|
||||
|
@ -997,7 +997,7 @@ end:
|
|||
* return -1 for a timeout after "timeout" ms.
|
||||
*/
|
||||
static int
|
||||
__wdcwait(struct channel_softc *chp, int mask, int bits, int timeout)
|
||||
__wdcwait(struct wdc_channel *chp, int mask, int bits, int timeout)
|
||||
{
|
||||
u_char status;
|
||||
int time = 0;
|
||||
|
@ -1054,7 +1054,7 @@ __wdcwait(struct channel_softc *chp, int mask, int bits, int timeout)
|
|||
* thread if possible
|
||||
*/
|
||||
int
|
||||
wdcwait(struct channel_softc *chp, int mask, int bits, int timeout, int flags)
|
||||
wdcwait(struct wdc_channel *chp, int mask, int bits, int timeout, int flags)
|
||||
{
|
||||
int error, i, timeout_hz = mstohz(timeout);
|
||||
|
||||
|
@ -1101,7 +1101,7 @@ wdcwait(struct channel_softc *chp, int mask, int bits, int timeout, int flags)
|
|||
* Busy-wait for DMA to complete
|
||||
*/
|
||||
int
|
||||
wdc_dmawait(struct channel_softc *chp, struct ata_xfer *xfer, int timeout)
|
||||
wdc_dmawait(struct wdc_channel *chp, struct ata_xfer *xfer, int timeout)
|
||||
{
|
||||
int time;
|
||||
for (time = 0; time < timeout * 1000 / WDCDELAY; time++) {
|
||||
|
@ -1121,7 +1121,7 @@ wdc_dmawait(struct channel_softc *chp, struct ata_xfer *xfer, int timeout)
|
|||
void
|
||||
wdctimeout(void *arg)
|
||||
{
|
||||
struct channel_softc *chp = (struct channel_softc *)arg;
|
||||
struct wdc_channel *chp = (struct wdc_channel *)arg;
|
||||
struct ata_xfer *xfer = TAILQ_FIRST(&chp->ch_queue->queue_xfer);
|
||||
int s;
|
||||
|
||||
|
@ -1166,7 +1166,7 @@ void
|
|||
wdc_probe_caps(struct ata_drive_datas *drvp)
|
||||
{
|
||||
struct ataparams params, params2;
|
||||
struct channel_softc *chp = drvp->chnl_softc;
|
||||
struct wdc_channel *chp = drvp->chnl_softc;
|
||||
struct device *drv_dev = drvp->drv_softc;
|
||||
struct wdc_softc *wdc = chp->wdc;
|
||||
int i, printed;
|
||||
|
@ -1382,7 +1382,7 @@ wdc_probe_caps(struct ata_drive_datas *drvp)
|
|||
int
|
||||
wdc_downgrade_mode(struct ata_drive_datas *drvp, int flags)
|
||||
{
|
||||
struct channel_softc *chp = drvp->chnl_softc;
|
||||
struct wdc_channel *chp = drvp->chnl_softc;
|
||||
struct device *drv_dev = drvp->drv_softc;
|
||||
struct wdc_softc *wdc = chp->wdc;
|
||||
int cf_flags = drv_dev->dv_cfdata->cf_flags;
|
||||
|
@ -1440,7 +1440,7 @@ wdc_downgrade_mode(struct ata_drive_datas *drvp, int flags)
|
|||
int
|
||||
wdc_exec_command(struct ata_drive_datas *drvp, struct wdc_command *wdc_c)
|
||||
{
|
||||
struct channel_softc *chp = drvp->chnl_softc;
|
||||
struct wdc_channel *chp = drvp->chnl_softc;
|
||||
struct ata_xfer *xfer;
|
||||
int s, ret;
|
||||
|
||||
|
@ -1491,7 +1491,7 @@ wdc_exec_command(struct ata_drive_datas *drvp, struct wdc_command *wdc_c)
|
|||
}
|
||||
|
||||
static void
|
||||
__wdccommand_start(struct channel_softc *chp, struct ata_xfer *xfer)
|
||||
__wdccommand_start(struct wdc_channel *chp, struct ata_xfer *xfer)
|
||||
{
|
||||
int drive = xfer->c_drive;
|
||||
struct wdc_command *wdc_c = xfer->c_cmd;
|
||||
|
@ -1538,7 +1538,7 @@ __wdccommand_start(struct channel_softc *chp, struct ata_xfer *xfer)
|
|||
}
|
||||
|
||||
static int
|
||||
__wdccommand_intr(struct channel_softc *chp, struct ata_xfer *xfer, int irq)
|
||||
__wdccommand_intr(struct wdc_channel *chp, struct ata_xfer *xfer, int irq)
|
||||
{
|
||||
struct wdc_command *wdc_c = xfer->c_cmd;
|
||||
int bcount = wdc_c->bcount;
|
||||
|
@ -1636,7 +1636,7 @@ __wdccommand_intr(struct channel_softc *chp, struct ata_xfer *xfer, int irq)
|
|||
}
|
||||
|
||||
static void
|
||||
__wdccommand_done(struct channel_softc *chp, struct ata_xfer *xfer)
|
||||
__wdccommand_done(struct wdc_channel *chp, struct ata_xfer *xfer)
|
||||
{
|
||||
struct wdc_command *wdc_c = xfer->c_cmd;
|
||||
|
||||
|
@ -1691,7 +1691,7 @@ __wdccommand_done(struct channel_softc *chp, struct ata_xfer *xfer)
|
|||
* Assumes interrupts are blocked.
|
||||
*/
|
||||
void
|
||||
wdccommand(struct channel_softc *chp, u_int8_t drive, u_int8_t command,
|
||||
wdccommand(struct wdc_channel *chp, u_int8_t drive, u_int8_t command,
|
||||
u_int16_t cylin, u_int8_t head, u_int8_t sector, u_int8_t count,
|
||||
u_int8_t precomp)
|
||||
{
|
||||
|
@ -1726,7 +1726,7 @@ wdccommand(struct channel_softc *chp, u_int8_t drive, u_int8_t command,
|
|||
* Assumes interrupts are blocked.
|
||||
*/
|
||||
void
|
||||
wdccommandext(struct channel_softc *chp, u_int8_t drive, u_int8_t command,
|
||||
wdccommandext(struct wdc_channel *chp, u_int8_t drive, u_int8_t command,
|
||||
u_int64_t blkno, u_int16_t count)
|
||||
{
|
||||
|
||||
|
@ -1772,7 +1772,7 @@ wdccommandext(struct channel_softc *chp, u_int8_t drive, u_int8_t command,
|
|||
* tested by the caller.
|
||||
*/
|
||||
void
|
||||
wdccommandshort(struct channel_softc *chp, int drive, int command)
|
||||
wdccommandshort(struct wdc_channel *chp, int drive, int command)
|
||||
{
|
||||
|
||||
WDCDEBUG_PRINT(("wdccommandshort %s:%d:%d command 0x%x\n",
|
||||
|
@ -1791,7 +1791,7 @@ wdccommandshort(struct channel_softc *chp, int drive, int command)
|
|||
|
||||
/* Add a command to the queue and start controller. Must be called at splbio */
|
||||
void
|
||||
wdc_exec_xfer(struct channel_softc *chp, struct ata_xfer *xfer)
|
||||
wdc_exec_xfer(struct wdc_channel *chp, struct ata_xfer *xfer)
|
||||
{
|
||||
|
||||
WDCDEBUG_PRINT(("wdc_exec_xfer %p channel %d drive %d\n", xfer,
|
||||
|
@ -1833,7 +1833,7 @@ wdc_get_xfer(int flags)
|
|||
}
|
||||
|
||||
void
|
||||
wdc_free_xfer(struct channel_softc *chp, struct ata_xfer *xfer)
|
||||
wdc_free_xfer(struct wdc_channel *chp, struct ata_xfer *xfer)
|
||||
{
|
||||
struct wdc_softc *wdc = chp->wdc;
|
||||
int s;
|
||||
|
@ -1848,12 +1848,12 @@ wdc_free_xfer(struct channel_softc *chp, struct ata_xfer *xfer)
|
|||
}
|
||||
|
||||
/*
|
||||
* Kill off all pending xfers for a channel_softc.
|
||||
* Kill off all pending xfers for a wdc_channel.
|
||||
*
|
||||
* Must be called at splbio().
|
||||
*/
|
||||
void
|
||||
wdc_kill_pending(struct channel_softc *chp)
|
||||
wdc_kill_pending(struct wdc_channel *chp)
|
||||
{
|
||||
struct ata_xfer *xfer;
|
||||
|
||||
|
@ -1864,7 +1864,7 @@ wdc_kill_pending(struct channel_softc *chp)
|
|||
}
|
||||
|
||||
static void
|
||||
__wdcerror(struct channel_softc *chp, char *msg)
|
||||
__wdcerror(struct wdc_channel *chp, char *msg)
|
||||
{
|
||||
struct ata_xfer *xfer = TAILQ_FIRST(&chp->ch_queue->queue_xfer);
|
||||
|
||||
|
@ -1880,7 +1880,7 @@ __wdcerror(struct channel_softc *chp, char *msg)
|
|||
* the bit bucket
|
||||
*/
|
||||
void
|
||||
wdcbit_bucket(struct channel_softc *chp, int size)
|
||||
wdcbit_bucket(struct wdc_channel *chp, int size)
|
||||
{
|
||||
|
||||
for (; size >= 2; size -= 2)
|
||||
|
@ -1890,7 +1890,7 @@ wdcbit_bucket(struct channel_softc *chp, int size)
|
|||
}
|
||||
|
||||
int
|
||||
wdc_addref(struct channel_softc *chp)
|
||||
wdc_addref(struct wdc_channel *chp)
|
||||
{
|
||||
struct wdc_softc *wdc = chp->wdc;
|
||||
struct scsipi_adapter *adapt = &wdc->sc_atapi_adapter._generic;
|
||||
|
@ -1908,7 +1908,7 @@ wdc_addref(struct channel_softc *chp)
|
|||
}
|
||||
|
||||
void
|
||||
wdc_delref(struct channel_softc *chp)
|
||||
wdc_delref(struct wdc_channel *chp)
|
||||
{
|
||||
struct wdc_softc *wdc = chp->wdc;
|
||||
struct scsipi_adapter *adapt = &wdc->sc_atapi_adapter._generic;
|
||||
|
@ -1922,7 +1922,7 @@ wdc_delref(struct channel_softc *chp)
|
|||
}
|
||||
|
||||
void
|
||||
wdc_print_modes(struct channel_softc *chp)
|
||||
wdc_print_modes(struct wdc_channel *chp)
|
||||
{
|
||||
int drive;
|
||||
struct ata_drive_datas *drvp;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: wdc_upc.c,v 1.13 2004/01/01 17:18:53 thorpej Exp $ */
|
||||
/* $NetBSD: wdc_upc.c,v 1.14 2004/01/03 01:50:53 thorpej Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 2000 Ben Harris
|
||||
* All rights reserved.
|
||||
|
@ -28,7 +28,7 @@
|
|||
/* This file is part of NetBSD/arm26 -- a port of NetBSD to ARM2/3 machines. */
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: wdc_upc.c,v 1.13 2004/01/01 17:18:53 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: wdc_upc.c,v 1.14 2004/01/03 01:50:53 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/device.h>
|
||||
|
@ -49,8 +49,8 @@ static void wdc_upc_attach(struct device *, struct device *, void *);
|
|||
|
||||
struct wdc_upc_softc {
|
||||
struct wdc_softc sc_wdc;
|
||||
struct channel_softc *sc_chanlist[1];
|
||||
struct channel_softc sc_channel;
|
||||
struct wdc_channel *sc_chanlist[1];
|
||||
struct wdc_channel sc_channel;
|
||||
struct ata_queue sc_chqueue;
|
||||
};
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: wdcvar.h,v 1.51 2004/01/01 20:25:22 thorpej Exp $ */
|
||||
/* $NetBSD: wdcvar.h,v 1.52 2004/01/03 01:50:53 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998, 2003 The NetBSD Foundation, Inc.
|
||||
|
@ -50,7 +50,7 @@
|
|||
|
||||
#define WDC_NREG 8 /* number of command registers */
|
||||
|
||||
struct channel_softc { /* Per channel data */
|
||||
struct wdc_channel { /* Per channel data */
|
||||
/* Our timeout callout */
|
||||
struct callout ch_callout;
|
||||
/* Our location */
|
||||
|
@ -119,7 +119,7 @@ struct wdc_softc { /* Per controller state */
|
|||
u_int8_t DMA_cap; /* highest DMA mode supported */
|
||||
u_int8_t UDMA_cap; /* highest UDMA mode supported */
|
||||
int nchannels; /* Number of channels on this controller */
|
||||
struct channel_softc **channels; /* channels-specific datas (array) */
|
||||
struct wdc_channel **channels; /* channels-specific datas (array) */
|
||||
|
||||
/*
|
||||
* The reference count here is used for both IDE and ATAPI devices.
|
||||
|
@ -127,7 +127,7 @@ struct wdc_softc { /* Per controller state */
|
|||
struct atapi_adapter sc_atapi_adapter;
|
||||
|
||||
/* Function used to probe for drives. */
|
||||
void (*drv_probe)(struct channel_softc *);
|
||||
void (*drv_probe)(struct wdc_channel *);
|
||||
|
||||
/* if WDC_CAPABILITY_DMA set in 'cap' */
|
||||
void *dma_arg;
|
||||
|
@ -149,13 +149,13 @@ struct wdc_softc { /* Per controller state */
|
|||
void (*free_hw)(void *);
|
||||
|
||||
/* if WDC_CAPABILITY_MODE set in 'cap' */
|
||||
void (*set_modes)(struct channel_softc *);
|
||||
void (*set_modes)(struct wdc_channel *);
|
||||
|
||||
/* if WDC_CAPABILITY_SELECT set in 'cap' */
|
||||
void (*select)(struct channel_softc *,int);
|
||||
void (*select)(struct wdc_channel *,int);
|
||||
|
||||
/* if WDC_CAPABILITY_IRQACK set in 'cap' */
|
||||
void (*irqack)(struct channel_softc *);
|
||||
void (*irqack)(struct wdc_channel *);
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -163,37 +163,37 @@ struct wdc_softc { /* Per controller state */
|
|||
* or bus-specific backends.
|
||||
*/
|
||||
|
||||
int wdcprobe(struct channel_softc *);
|
||||
void wdcattach(struct channel_softc *);
|
||||
int wdcprobe(struct wdc_channel *);
|
||||
void wdcattach(struct wdc_channel *);
|
||||
int wdcdetach(struct device *, int);
|
||||
int wdcactivate(struct device *, enum devact);
|
||||
int wdcintr(void *);
|
||||
void wdc_exec_xfer(struct channel_softc *, struct ata_xfer *);
|
||||
void wdc_exec_xfer(struct wdc_channel *, struct ata_xfer *);
|
||||
|
||||
struct ata_xfer *wdc_get_xfer(int); /* int = WDC_NOSLEEP/CANSLEEP */
|
||||
#define WDC_CANSLEEP 0x00
|
||||
#define WDC_NOSLEEP 0x01
|
||||
|
||||
void wdc_free_xfer (struct channel_softc *, struct ata_xfer *);
|
||||
void wdcstart(struct channel_softc *);
|
||||
void wdc_free_xfer (struct wdc_channel *, struct ata_xfer *);
|
||||
void wdcstart(struct wdc_channel *);
|
||||
void wdcrestart(void*);
|
||||
|
||||
int wdcreset(struct channel_softc *, int);
|
||||
int wdcreset(struct wdc_channel *, int);
|
||||
#define RESET_POLL 1
|
||||
#define RESET_SLEEP 0 /* wdcreset will use tsleep() */
|
||||
|
||||
int wdcwait(struct channel_softc *, int, int, int, int);
|
||||
int wdcwait(struct wdc_channel *, int, int, int, int);
|
||||
#define WDCWAIT_OK 0 /* we have what we asked */
|
||||
#define WDCWAIT_TOUT -1 /* timed out */
|
||||
#define WDCWAIT_THR 1 /* return, the kernel thread has been awakened */
|
||||
|
||||
int wdc_dmawait(struct channel_softc *, struct ata_xfer *, int);
|
||||
void wdcbit_bucket( struct channel_softc *, int);
|
||||
void wdccommand(struct channel_softc *, u_int8_t, u_int8_t, u_int16_t,
|
||||
int wdc_dmawait(struct wdc_channel *, struct ata_xfer *, int);
|
||||
void wdcbit_bucket( struct wdc_channel *, int);
|
||||
void wdccommand(struct wdc_channel *, u_int8_t, u_int8_t, u_int16_t,
|
||||
u_int8_t, u_int8_t, u_int8_t, u_int8_t);
|
||||
void wdccommandext(struct channel_softc *, u_int8_t, u_int8_t, u_int64_t,
|
||||
void wdccommandext(struct wdc_channel *, u_int8_t, u_int8_t, u_int64_t,
|
||||
u_int16_t);
|
||||
void wdccommandshort(struct channel_softc *, int, int);
|
||||
void wdccommandshort(struct wdc_channel *, int, int);
|
||||
void wdctimeout(void *arg);
|
||||
void wdc_reset_channel(struct ata_drive_datas *, int);
|
||||
|
||||
|
@ -202,11 +202,11 @@ int wdc_exec_command(struct ata_drive_datas *, struct wdc_command*);
|
|||
#define WDC_QUEUED 0x02
|
||||
#define WDC_TRY_AGAIN 0x03
|
||||
|
||||
int wdc_addref(struct channel_softc *);
|
||||
void wdc_delref(struct channel_softc *);
|
||||
void wdc_kill_pending(struct channel_softc *);
|
||||
int wdc_addref(struct wdc_channel *);
|
||||
void wdc_delref(struct wdc_channel *);
|
||||
void wdc_kill_pending(struct wdc_channel *);
|
||||
|
||||
void wdc_print_modes (struct channel_softc *);
|
||||
void wdc_print_modes (struct wdc_channel *);
|
||||
void wdc_probe_caps(struct ata_drive_datas*);
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: wdc_isa.c,v 1.38 2004/01/01 17:18:53 thorpej Exp $ */
|
||||
/* $NetBSD: wdc_isa.c,v 1.39 2004/01/03 01:50:53 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998, 2003 The NetBSD Foundation, Inc.
|
||||
|
@ -37,7 +37,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: wdc_isa.c,v 1.38 2004/01/01 17:18:53 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: wdc_isa.c,v 1.39 2004/01/03 01:50:53 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -65,8 +65,8 @@ __KERNEL_RCSID(0, "$NetBSD: wdc_isa.c,v 1.38 2004/01/01 17:18:53 thorpej Exp $")
|
|||
|
||||
struct wdc_isa_softc {
|
||||
struct wdc_softc sc_wdcdev;
|
||||
struct channel_softc *wdc_chanlist[1];
|
||||
struct channel_softc wdc_channel;
|
||||
struct wdc_channel *wdc_chanlist[1];
|
||||
struct wdc_channel wdc_channel;
|
||||
struct ata_queue wdc_chqueue;
|
||||
isa_chipset_tag_t sc_ic;
|
||||
void *sc_ih;
|
||||
|
@ -92,7 +92,7 @@ wdc_isa_probe(parent, match, aux)
|
|||
struct cfdata *match;
|
||||
void *aux;
|
||||
{
|
||||
struct channel_softc ch;
|
||||
struct wdc_channel ch;
|
||||
struct isa_attach_args *ia = aux;
|
||||
int result = 0, i;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: wdc_isapnp.c,v 1.24 2004/01/01 17:18:53 thorpej Exp $ */
|
||||
/* $NetBSD: wdc_isapnp.c,v 1.25 2004/01/03 01:50:53 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998, 2003 The NetBSD Foundation, Inc.
|
||||
|
@ -37,7 +37,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: wdc_isapnp.c,v 1.24 2004/01/01 17:18:53 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: wdc_isapnp.c,v 1.25 2004/01/03 01:50:53 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -60,8 +60,8 @@ __KERNEL_RCSID(0, "$NetBSD: wdc_isapnp.c,v 1.24 2004/01/01 17:18:53 thorpej Exp
|
|||
|
||||
struct wdc_isapnp_softc {
|
||||
struct wdc_softc sc_wdcdev;
|
||||
struct channel_softc *wdc_chanlist[1];
|
||||
struct channel_softc wdc_channel;
|
||||
struct wdc_channel *wdc_chanlist[1];
|
||||
struct wdc_channel wdc_channel;
|
||||
struct ata_queue wdc_chqueue;
|
||||
isa_chipset_tag_t sc_ic;
|
||||
void *sc_ih;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: wdc_ofisa.c,v 1.17 2004/01/01 17:18:53 thorpej Exp $ */
|
||||
/* $NetBSD: wdc_ofisa.c,v 1.18 2004/01/03 01:50:53 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 1997, 1998
|
||||
|
@ -38,7 +38,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: wdc_ofisa.c,v 1.17 2004/01/01 17:18:53 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: wdc_ofisa.c,v 1.18 2004/01/03 01:50:53 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/device.h>
|
||||
|
@ -59,8 +59,8 @@ __KERNEL_RCSID(0, "$NetBSD: wdc_ofisa.c,v 1.17 2004/01/01 17:18:53 thorpej Exp $
|
|||
|
||||
struct wdc_ofisa_softc {
|
||||
struct wdc_softc sc_wdcdev;
|
||||
struct channel_softc *wdc_chanlist[1];
|
||||
struct channel_softc wdc_channel;
|
||||
struct wdc_channel *wdc_chanlist[1];
|
||||
struct wdc_channel wdc_channel;
|
||||
struct ata_queue wdc_chqueue;
|
||||
void *sc_ih;
|
||||
};
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: acardide.c,v 1.6 2003/11/27 23:02:40 fvdl Exp $ */
|
||||
/* $NetBSD: acardide.c,v 1.7 2004/01/03 01:50:53 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2001 Izumi Tsutsui.
|
||||
|
@ -36,7 +36,7 @@
|
|||
#include <dev/pci/pciide_acard_reg.h>
|
||||
|
||||
static void acard_chip_map(struct pciide_softc*, struct pci_attach_args*);
|
||||
static void acard_setup_channel(struct channel_softc*);
|
||||
static void acard_setup_channel(struct wdc_channel*);
|
||||
#if 0 /* XXX !! */
|
||||
static int acard_pci_intr(void *);
|
||||
#endif
|
||||
|
@ -176,7 +176,7 @@ acard_chip_map(struct pciide_softc *sc, struct pci_attach_args *pa)
|
|||
}
|
||||
|
||||
static void
|
||||
acard_setup_channel(struct channel_softc *chp)
|
||||
acard_setup_channel(struct wdc_channel *chp)
|
||||
{
|
||||
struct ata_drive_datas *drvp;
|
||||
struct pciide_channel *cp = (struct pciide_channel*)chp;
|
||||
|
@ -292,7 +292,7 @@ acard_pci_intr(void *arg)
|
|||
{
|
||||
struct pciide_softc *sc = arg;
|
||||
struct pciide_channel *cp;
|
||||
struct channel_softc *wdc_cp;
|
||||
struct wdc_channel *wdc_cp;
|
||||
int rv = 0;
|
||||
int dmastat, i, crv;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: aceride.c,v 1.4 2003/11/27 23:02:40 fvdl Exp $ */
|
||||
/* $NetBSD: aceride.c,v 1.5 2004/01/03 01:50:53 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1999, 2000, 2001 Manuel Bouyer.
|
||||
|
@ -39,7 +39,7 @@
|
|||
#include <dev/pci/pciide_acer_reg.h>
|
||||
|
||||
static void acer_chip_map(struct pciide_softc*, struct pci_attach_args*);
|
||||
static void acer_setup_channel(struct channel_softc*);
|
||||
static void acer_setup_channel(struct wdc_channel*);
|
||||
static int acer_pci_intr(void *);
|
||||
|
||||
static int aceride_match(struct device *, struct cfdata *, void *);
|
||||
|
@ -169,7 +169,7 @@ acer_chip_map(struct pciide_softc *sc, struct pci_attach_args *pa)
|
|||
}
|
||||
|
||||
static void
|
||||
acer_setup_channel(struct channel_softc *chp)
|
||||
acer_setup_channel(struct wdc_channel *chp)
|
||||
{
|
||||
struct ata_drive_datas *drvp;
|
||||
int drive;
|
||||
|
@ -267,7 +267,7 @@ acer_pci_intr(void *arg)
|
|||
{
|
||||
struct pciide_softc *sc = arg;
|
||||
struct pciide_channel *cp;
|
||||
struct channel_softc *wdc_cp;
|
||||
struct wdc_channel *wdc_cp;
|
||||
int i, rv, crv;
|
||||
u_int32_t chids;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: cmdide.c,v 1.8 2004/01/01 17:18:53 thorpej Exp $ */
|
||||
/* $NetBSD: cmdide.c,v 1.9 2004/01/03 01:50:53 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1999, 2000, 2001 Manuel Bouyer.
|
||||
|
@ -48,13 +48,13 @@ CFATTACH_DECL(cmdide, sizeof(struct pciide_softc),
|
|||
|
||||
static void cmd_chip_map(struct pciide_softc*, struct pci_attach_args*);
|
||||
static void cmd0643_9_chip_map(struct pciide_softc*, struct pci_attach_args*);
|
||||
static void cmd0643_9_setup_channel(struct channel_softc*);
|
||||
static void cmd0643_9_setup_channel(struct wdc_channel*);
|
||||
static void cmd_channel_map(struct pci_attach_args *, struct pciide_softc *,
|
||||
int);
|
||||
static int cmd_pci_intr(void *);
|
||||
static void cmd646_9_irqack(struct channel_softc *);
|
||||
static void cmd646_9_irqack(struct wdc_channel *);
|
||||
static void cmd680_chip_map(struct pciide_softc*, struct pci_attach_args*);
|
||||
static void cmd680_setup_channel(struct channel_softc*);
|
||||
static void cmd680_setup_channel(struct wdc_channel*);
|
||||
static void cmd680_channel_map(struct pci_attach_args *, struct pciide_softc *,
|
||||
int);
|
||||
|
||||
|
@ -201,7 +201,7 @@ cmd_pci_intr(void *arg)
|
|||
{
|
||||
struct pciide_softc *sc = arg;
|
||||
struct pciide_channel *cp;
|
||||
struct channel_softc *wdc_cp;
|
||||
struct wdc_channel *wdc_cp;
|
||||
int i, rv, crv;
|
||||
u_int32_t priirq, secirq;
|
||||
|
||||
|
@ -353,7 +353,7 @@ cmd0643_9_chip_map(struct pciide_softc *sc, struct pci_attach_args *pa)
|
|||
}
|
||||
|
||||
static void
|
||||
cmd0643_9_setup_channel(struct channel_softc *chp)
|
||||
cmd0643_9_setup_channel(struct wdc_channel *chp)
|
||||
{
|
||||
struct ata_drive_datas *drvp;
|
||||
u_int8_t tim;
|
||||
|
@ -431,7 +431,7 @@ cmd0643_9_setup_channel(struct channel_softc *chp)
|
|||
}
|
||||
|
||||
static void
|
||||
cmd646_9_irqack(struct channel_softc *chp)
|
||||
cmd646_9_irqack(struct wdc_channel *chp)
|
||||
{
|
||||
u_int32_t priirq, secirq;
|
||||
struct pciide_channel *cp = (struct pciide_channel*)chp;
|
||||
|
@ -532,7 +532,7 @@ cmd680_channel_map(struct pci_attach_args *pa, struct pciide_softc *sc,
|
|||
}
|
||||
|
||||
static void
|
||||
cmd680_setup_channel(struct channel_softc *chp)
|
||||
cmd680_setup_channel(struct wdc_channel *chp)
|
||||
{
|
||||
struct ata_drive_datas *drvp;
|
||||
u_int8_t mode, off, scsc;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: cypide.c,v 1.5 2004/01/01 17:18:53 thorpej Exp $ */
|
||||
/* $NetBSD: cypide.c,v 1.6 2004/01/03 01:50:53 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1999, 2000, 2001 Manuel Bouyer.
|
||||
|
@ -42,7 +42,7 @@
|
|||
#include <dev/pci/cy82c693var.h>
|
||||
|
||||
static void cy693_chip_map(struct pciide_softc*, struct pci_attach_args*);
|
||||
static void cy693_setup_channel(struct channel_softc*);
|
||||
static void cy693_setup_channel(struct wdc_channel*);
|
||||
|
||||
static int cypide_match(struct device *, struct cfdata *, void *);
|
||||
static void cypide_attach(struct device *, struct device *, void *);
|
||||
|
@ -174,7 +174,7 @@ cy693_chip_map(struct pciide_softc *sc, struct pci_attach_args *pa)
|
|||
}
|
||||
|
||||
static void
|
||||
cy693_setup_channel(struct channel_softc *chp)
|
||||
cy693_setup_channel(struct wdc_channel *chp)
|
||||
{
|
||||
struct ata_drive_datas *drvp;
|
||||
int drive;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: hptide.c,v 1.7 2003/11/28 20:08:29 chs Exp $ */
|
||||
/* $NetBSD: hptide.c,v 1.8 2004/01/03 01:50:53 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1999, 2000, 2001 Manuel Bouyer.
|
||||
|
@ -39,7 +39,7 @@
|
|||
#include <dev/pci/pciide_hpt_reg.h>
|
||||
|
||||
static void hpt_chip_map(struct pciide_softc*, struct pci_attach_args*);
|
||||
static void hpt_setup_channel(struct channel_softc*);
|
||||
static void hpt_setup_channel(struct wdc_channel*);
|
||||
static int hpt_pci_intr(void *);
|
||||
|
||||
static int hptide_match(struct device *, struct cfdata *, void *);
|
||||
|
@ -268,7 +268,7 @@ hpt_chip_map(struct pciide_softc *sc, struct pci_attach_args *pa)
|
|||
}
|
||||
|
||||
static void
|
||||
hpt_setup_channel(struct channel_softc *chp)
|
||||
hpt_setup_channel(struct wdc_channel *chp)
|
||||
{
|
||||
struct ata_drive_datas *drvp;
|
||||
int drive;
|
||||
|
@ -377,7 +377,7 @@ hpt_pci_intr(void *arg)
|
|||
{
|
||||
struct pciide_softc *sc = arg;
|
||||
struct pciide_channel *cp;
|
||||
struct channel_softc *wdc_cp;
|
||||
struct wdc_channel *wdc_cp;
|
||||
int rv = 0;
|
||||
int dmastat, i, crv;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: optiide.c,v 1.3 2003/10/24 00:24:15 mycroft Exp $ */
|
||||
/* $NetBSD: optiide.c,v 1.4 2004/01/03 01:50:53 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2000 The NetBSD Foundation, Inc.
|
||||
|
@ -46,7 +46,7 @@
|
|||
#include <dev/pci/pciide_opti_reg.h>
|
||||
|
||||
static void opti_chip_map(struct pciide_softc*, struct pci_attach_args*);
|
||||
static void opti_setup_channel(struct channel_softc*);
|
||||
static void opti_setup_channel(struct wdc_channel*);
|
||||
|
||||
static int optiide_match(struct device *, struct cfdata *, void *);
|
||||
static void optiide_attach(struct device *, struct device *, void *);
|
||||
|
@ -168,7 +168,7 @@ opti_chip_map(struct pciide_softc *sc, struct pci_attach_args *pa)
|
|||
}
|
||||
|
||||
static void
|
||||
opti_setup_channel(struct channel_softc *chp)
|
||||
opti_setup_channel(struct wdc_channel *chp)
|
||||
{
|
||||
struct ata_drive_datas *drvp;
|
||||
struct pciide_channel *cp = (struct pciide_channel*)chp;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pciide_common.c,v 1.6 2004/01/01 17:18:53 thorpej Exp $ */
|
||||
/* $NetBSD: pciide_common.c,v 1.7 2004/01/03 01:50:53 thorpej Exp $ */
|
||||
|
||||
|
||||
/*
|
||||
|
@ -76,7 +76,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: pciide_common.c,v 1.6 2004/01/01 17:18:53 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: pciide_common.c,v 1.7 2004/01/03 01:50:53 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/malloc.h>
|
||||
|
@ -202,7 +202,7 @@ pciide_mapregs_compat(pa, cp, compatchan, cmdsizep, ctlsizep)
|
|||
bus_size_t *cmdsizep, *ctlsizep;
|
||||
{
|
||||
struct pciide_softc *sc = (struct pciide_softc *)cp->wdc_channel.wdc;
|
||||
struct channel_softc *wdc_cp = &cp->wdc_channel;
|
||||
struct wdc_channel *wdc_cp = &cp->wdc_channel;
|
||||
int i;
|
||||
|
||||
cp->compat = 1;
|
||||
|
@ -254,7 +254,7 @@ pciide_mapregs_native(pa, cp, cmdsizep, ctlsizep, pci_intr)
|
|||
int (*pci_intr) __P((void *));
|
||||
{
|
||||
struct pciide_softc *sc = (struct pciide_softc *)cp->wdc_channel.wdc;
|
||||
struct channel_softc *wdc_cp = &cp->wdc_channel;
|
||||
struct wdc_channel *wdc_cp = &cp->wdc_channel;
|
||||
const char *intrstr;
|
||||
pci_intr_handle_t intrhandle;
|
||||
int i;
|
||||
|
@ -455,7 +455,7 @@ pciide_pci_intr(arg)
|
|||
{
|
||||
struct pciide_softc *sc = arg;
|
||||
struct pciide_channel *cp;
|
||||
struct channel_softc *wdc_cp;
|
||||
struct wdc_channel *wdc_cp;
|
||||
int i, rv, crv;
|
||||
|
||||
rv = 0;
|
||||
|
@ -726,7 +726,7 @@ pciide_dma_finish(v, channel, drive, force)
|
|||
|
||||
void
|
||||
pciide_irqack(chp)
|
||||
struct channel_softc *chp;
|
||||
struct wdc_channel *chp;
|
||||
{
|
||||
struct pciide_channel *cp = (struct pciide_channel*)chp;
|
||||
struct pciide_softc *sc = (struct pciide_softc *)cp->wdc_channel.wdc;
|
||||
|
@ -774,7 +774,7 @@ pciide_mapchan(pa, cp, interface, cmdsizep, ctlsizep, pci_intr)
|
|||
bus_size_t *cmdsizep, *ctlsizep;
|
||||
int (*pci_intr) __P((void *));
|
||||
{
|
||||
struct channel_softc *wdc_cp = &cp->wdc_channel;
|
||||
struct wdc_channel *wdc_cp = &cp->wdc_channel;
|
||||
|
||||
if (interface & PCIIDE_INTERFACE_PCI(wdc_cp->channel))
|
||||
pciide_mapregs_native(pa, cp, cmdsizep, ctlsizep, pci_intr);
|
||||
|
@ -946,7 +946,7 @@ next:
|
|||
|
||||
void
|
||||
sata_setup_channel(chp)
|
||||
struct channel_softc *chp;
|
||||
struct wdc_channel *chp;
|
||||
{
|
||||
struct ata_drive_datas *drvp;
|
||||
int drive;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pciide_opti_reg.h,v 1.4 2003/11/27 23:02:40 fvdl Exp $ */
|
||||
/* $NetBSD: pciide_opti_reg.h,v 1.5 2004/01/03 01:50:53 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2000 The NetBSD Foundation, Inc.
|
||||
|
@ -113,7 +113,7 @@
|
|||
* by an interrupt routine while this magic sequence is executing.
|
||||
*/
|
||||
static __inline__ u_int8_t __attribute__((__unused__))
|
||||
opti_read_config(struct channel_softc *chp, int reg)
|
||||
opti_read_config(struct wdc_channel *chp, int reg)
|
||||
{
|
||||
u_int8_t rv;
|
||||
int s = splhigh();
|
||||
|
@ -137,7 +137,7 @@ opti_read_config(struct channel_softc *chp, int reg)
|
|||
}
|
||||
|
||||
static __inline__ void __attribute__((__unused__))
|
||||
opti_write_config(struct channel_softc *chp, int reg, u_int8_t val)
|
||||
opti_write_config(struct wdc_channel *chp, int reg, u_int8_t val)
|
||||
{
|
||||
int s = splhigh();
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pciidevar.h,v 1.19 2003/12/19 19:29:10 thorpej Exp $ */
|
||||
/* $NetBSD: pciidevar.h,v 1.20 2004/01/03 01:50:53 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998 Christopher G. Demetriou. All rights reserved.
|
||||
|
@ -115,10 +115,10 @@ struct pciide_softc {
|
|||
/* Chip description */
|
||||
const struct pciide_product_desc *sc_pp;
|
||||
/* common definitions */
|
||||
struct channel_softc *wdc_chanarray[PCIIDE_MAX_CHANNELS];
|
||||
struct wdc_channel *wdc_chanarray[PCIIDE_MAX_CHANNELS];
|
||||
/* internal bookkeeping */
|
||||
struct pciide_channel { /* per-channel data */
|
||||
struct channel_softc wdc_channel; /* generic part */
|
||||
struct wdc_channel wdc_channel; /* generic part */
|
||||
const char *name;
|
||||
int compat; /* is it compat? */
|
||||
void *ih; /* compat or pci handle */
|
||||
|
@ -186,14 +186,14 @@ pciide_pci_write(pc, pa, reg, val)
|
|||
}
|
||||
|
||||
void default_chip_map __P((struct pciide_softc*, struct pci_attach_args*));
|
||||
void sata_setup_channel __P((struct channel_softc*));
|
||||
void sata_setup_channel __P((struct wdc_channel*));
|
||||
|
||||
void pciide_channel_dma_setup __P((struct pciide_channel *));
|
||||
int pciide_dma_table_setup __P((struct pciide_softc*, int, int));
|
||||
int pciide_dma_init __P((void*, int, int, void *, size_t, int));
|
||||
void pciide_dma_start __P((void*, int, int));
|
||||
int pciide_dma_finish __P((void*, int, int, int));
|
||||
void pciide_irqack __P((struct channel_softc *));
|
||||
void pciide_irqack __P((struct wdc_channel *));
|
||||
|
||||
/*
|
||||
* Functions defined by machine-dependent code.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pdcide.c,v 1.9 2003/11/27 23:02:40 fvdl Exp $ */
|
||||
/* $NetBSD: pdcide.c,v 1.10 2004/01/03 01:50:53 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1999, 2000, 2001 Manuel Bouyer.
|
||||
|
@ -39,8 +39,8 @@
|
|||
#include <dev/pci/pciide_pdc202xx_reg.h>
|
||||
|
||||
static void pdc202xx_chip_map(struct pciide_softc *, struct pci_attach_args *);
|
||||
static void pdc202xx_setup_channel(struct channel_softc *);
|
||||
static void pdc20268_setup_channel(struct channel_softc *);
|
||||
static void pdc202xx_setup_channel(struct wdc_channel *);
|
||||
static void pdc20268_setup_channel(struct wdc_channel *);
|
||||
static int pdc202xx_pci_intr(void *);
|
||||
static int pdc20265_pci_intr(void *);
|
||||
static void pdc20262_dma_start(void *, int, int);
|
||||
|
@ -323,7 +323,7 @@ pdc202xx_chip_map(struct pciide_softc *sc, struct pci_attach_args *pa)
|
|||
}
|
||||
|
||||
static void
|
||||
pdc202xx_setup_channel(struct channel_softc *chp)
|
||||
pdc202xx_setup_channel(struct wdc_channel *chp)
|
||||
{
|
||||
struct ata_drive_datas *drvp;
|
||||
int drive;
|
||||
|
@ -438,7 +438,7 @@ pdc202xx_setup_channel(struct channel_softc *chp)
|
|||
}
|
||||
|
||||
static void
|
||||
pdc20268_setup_channel(struct channel_softc *chp)
|
||||
pdc20268_setup_channel(struct wdc_channel *chp)
|
||||
{
|
||||
struct ata_drive_datas *drvp;
|
||||
int drive;
|
||||
|
@ -491,7 +491,7 @@ pdc202xx_pci_intr(void *arg)
|
|||
{
|
||||
struct pciide_softc *sc = arg;
|
||||
struct pciide_channel *cp;
|
||||
struct channel_softc *wdc_cp;
|
||||
struct wdc_channel *wdc_cp;
|
||||
int i, rv, crv;
|
||||
u_int32_t scr;
|
||||
|
||||
|
@ -520,7 +520,7 @@ pdc20265_pci_intr(void *arg)
|
|||
{
|
||||
struct pciide_softc *sc = arg;
|
||||
struct pciide_channel *cp;
|
||||
struct channel_softc *wdc_cp;
|
||||
struct wdc_channel *wdc_cp;
|
||||
int i, rv, crv;
|
||||
u_int32_t dmastat;
|
||||
|
||||
|
@ -581,7 +581,7 @@ pdc20262_dma_finish(void *v, int channel, int drive, int force)
|
|||
struct pciide_softc *sc = v;
|
||||
struct pciide_dma_maps *dma_maps =
|
||||
&sc->pciide_channels[channel].dma_maps[drive];
|
||||
struct channel_softc *chp;
|
||||
struct wdc_channel *chp;
|
||||
int atapi, error;
|
||||
|
||||
error = pciide_dma_finish(v, channel, drive, force);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: piixide.c,v 1.6 2003/12/14 01:32:02 thorpej Exp $ */
|
||||
/* $NetBSD: piixide.c,v 1.7 2004/01/03 01:50:53 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1999, 2000, 2001 Manuel Bouyer.
|
||||
|
@ -39,8 +39,8 @@
|
|||
#include <dev/pci/pciide_piix_reg.h>
|
||||
|
||||
static void piix_chip_map(struct pciide_softc*, struct pci_attach_args *);
|
||||
static void piix_setup_channel(struct channel_softc *);
|
||||
static void piix3_4_setup_channel(struct channel_softc *);
|
||||
static void piix_setup_channel(struct wdc_channel *);
|
||||
static void piix3_4_setup_channel(struct wdc_channel *);
|
||||
static u_int32_t piix_setup_idetim_timings(u_int8_t, u_int8_t, u_int8_t);
|
||||
static u_int32_t piix_setup_idetim_drvs(struct ata_drive_datas *);
|
||||
static u_int32_t piix_setup_sidetim_timings(u_int8_t, u_int8_t, u_int8_t);
|
||||
|
@ -311,7 +311,7 @@ piix_chip_map(struct pciide_softc *sc, struct pci_attach_args *pa)
|
|||
}
|
||||
|
||||
static void
|
||||
piix_setup_channel(struct channel_softc *chp)
|
||||
piix_setup_channel(struct wdc_channel *chp)
|
||||
{
|
||||
u_int8_t mode[2], drive;
|
||||
u_int32_t oidetim, idetim, idedma_ctl;
|
||||
|
@ -417,7 +417,7 @@ end: /*
|
|||
}
|
||||
|
||||
static void
|
||||
piix3_4_setup_channel(struct channel_softc *chp)
|
||||
piix3_4_setup_channel(struct wdc_channel *chp)
|
||||
{
|
||||
struct ata_drive_datas *drvp;
|
||||
u_int32_t oidetim, idetim, sidetim, udmareg, ideconf, idedma_ctl;
|
||||
|
@ -569,7 +569,7 @@ piix_setup_idetim_drvs(drvp)
|
|||
struct ata_drive_datas *drvp;
|
||||
{
|
||||
u_int32_t ret = 0;
|
||||
struct channel_softc *chp = drvp->chnl_softc;
|
||||
struct wdc_channel *chp = drvp->chnl_softc;
|
||||
u_int8_t channel = chp->channel;
|
||||
u_int8_t drive = drvp->drive;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: rccide.c,v 1.5 2003/12/14 00:17:05 thorpej Exp $ */
|
||||
/* $NetBSD: rccide.c,v 1.6 2004/01/03 01:50:53 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2003 By Noon Software, Inc. All rights reserved.
|
||||
|
@ -27,7 +27,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: rccide.c,v 1.5 2003/12/14 00:17:05 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: rccide.c,v 1.6 2004/01/03 01:50:53 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -39,7 +39,7 @@ __KERNEL_RCSID(0, "$NetBSD: rccide.c,v 1.5 2003/12/14 00:17:05 thorpej Exp $");
|
|||
|
||||
static void serverworks_chip_map(struct pciide_softc *,
|
||||
struct pci_attach_args *);
|
||||
static void serverworks_setup_channel(struct channel_softc *);
|
||||
static void serverworks_setup_channel(struct wdc_channel *);
|
||||
static int serverworks_pci_intr(void *);
|
||||
static int serverworkscsb6_pci_intr(void *);
|
||||
|
||||
|
@ -170,7 +170,7 @@ serverworks_chip_map(struct pciide_softc *sc, struct pci_attach_args *pa)
|
|||
}
|
||||
|
||||
static void
|
||||
serverworks_setup_channel(struct channel_softc *chp)
|
||||
serverworks_setup_channel(struct wdc_channel *chp)
|
||||
{
|
||||
struct ata_drive_datas *drvp;
|
||||
struct pciide_channel *cp = (struct pciide_channel*)chp;
|
||||
|
@ -251,7 +251,7 @@ serverworks_pci_intr(arg)
|
|||
{
|
||||
struct pciide_softc *sc = arg;
|
||||
struct pciide_channel *cp;
|
||||
struct channel_softc *wdc_cp;
|
||||
struct wdc_channel *wdc_cp;
|
||||
int rv = 0;
|
||||
int dmastat, i, crv;
|
||||
|
||||
|
@ -281,7 +281,7 @@ serverworkscsb6_pci_intr(arg)
|
|||
{
|
||||
struct pciide_softc *sc = arg;
|
||||
struct pciide_channel *cp;
|
||||
struct channel_softc *wdc_cp;
|
||||
struct wdc_channel *wdc_cp;
|
||||
int rv = 0;
|
||||
int i, crv;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: satalink.c,v 1.9 2004/01/01 17:18:53 thorpej Exp $ */
|
||||
/* $NetBSD: satalink.c,v 1.10 2004/01/03 01:50:53 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2003 The NetBSD Foundation, Inc.
|
||||
|
@ -267,8 +267,8 @@ CFATTACH_DECL(satalink, sizeof(struct pciide_softc),
|
|||
|
||||
static void sii3112_chip_map(struct pciide_softc*, struct pci_attach_args*);
|
||||
static void sii3114_chip_map(struct pciide_softc*, struct pci_attach_args*);
|
||||
static void sii3112_drv_probe(struct channel_softc*);
|
||||
static void sii3112_setup_channel(struct channel_softc*);
|
||||
static void sii3112_drv_probe(struct wdc_channel*);
|
||||
static void sii3112_setup_channel(struct wdc_channel*);
|
||||
|
||||
static const struct pciide_product_desc pciide_satalink_products[] = {
|
||||
{ PCI_PRODUCT_CMDTECH_3112,
|
||||
|
@ -556,7 +556,7 @@ static void
|
|||
sii3114_mapchan(struct pciide_channel *cp)
|
||||
{
|
||||
struct pciide_softc *sc = (struct pciide_softc *)cp->wdc_channel.wdc;
|
||||
struct channel_softc *wdc_cp = &cp->wdc_channel;
|
||||
struct wdc_channel *wdc_cp = &cp->wdc_channel;
|
||||
int i;
|
||||
|
||||
cp->compat = 0;
|
||||
|
@ -736,7 +736,7 @@ static const char *sata_speed[] = {
|
|||
};
|
||||
|
||||
static void
|
||||
sii3112_drv_probe(struct channel_softc *chp)
|
||||
sii3112_drv_probe(struct wdc_channel *chp)
|
||||
{
|
||||
struct pciide_channel *cp = (struct pciide_channel *)chp;
|
||||
struct pciide_softc *sc = (struct pciide_softc *)cp->wdc_channel.wdc;
|
||||
|
@ -836,7 +836,7 @@ sii3112_drv_probe(struct channel_softc *chp)
|
|||
}
|
||||
|
||||
static void
|
||||
sii3112_setup_channel(struct channel_softc *chp)
|
||||
sii3112_setup_channel(struct wdc_channel *chp)
|
||||
{
|
||||
struct ata_drive_datas *drvp;
|
||||
int drive;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: siside.c,v 1.3 2003/11/27 23:02:40 fvdl Exp $ */
|
||||
/* $NetBSD: siside.c,v 1.4 2004/01/03 01:50:53 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1999, 2000, 2001 Manuel Bouyer.
|
||||
|
@ -39,8 +39,8 @@
|
|||
#include <dev/pci/pciide_sis_reg.h>
|
||||
|
||||
static void sis_chip_map(struct pciide_softc *, struct pci_attach_args *);
|
||||
static void sis_setup_channel(struct channel_softc *);
|
||||
static void sis96x_setup_channel(struct channel_softc *);
|
||||
static void sis_setup_channel(struct wdc_channel *);
|
||||
static void sis96x_setup_channel(struct wdc_channel *);
|
||||
|
||||
static int sis_hostbr_match(struct pci_attach_args *);
|
||||
static int sis_south_match(struct pci_attach_args *);
|
||||
|
@ -292,7 +292,7 @@ sis_chip_map(struct pciide_softc *sc, struct pci_attach_args *pa)
|
|||
}
|
||||
|
||||
static void
|
||||
sis96x_setup_channel(struct channel_softc *chp)
|
||||
sis96x_setup_channel(struct wdc_channel *chp)
|
||||
{
|
||||
struct ata_drive_datas *drvp;
|
||||
int drive;
|
||||
|
@ -356,7 +356,7 @@ sis96x_setup_channel(struct channel_softc *chp)
|
|||
}
|
||||
|
||||
static void
|
||||
sis_setup_channel(struct channel_softc *chp)
|
||||
sis_setup_channel(struct wdc_channel *chp)
|
||||
{
|
||||
struct ata_drive_datas *drvp;
|
||||
int drive;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: slide.c,v 1.2 2003/10/11 17:40:15 thorpej Exp $ */
|
||||
/* $NetBSD: slide.c,v 1.3 2004/01/03 01:50:53 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2002 The NetBSD Foundation, Inc.
|
||||
|
@ -46,7 +46,7 @@
|
|||
#include <dev/pci/pciide_sl82c105_reg.h>
|
||||
|
||||
static void sl82c105_chip_map(struct pciide_softc*, struct pci_attach_args*);
|
||||
static void sl82c105_setup_channel(struct channel_softc*);
|
||||
static void sl82c105_setup_channel(struct wdc_channel*);
|
||||
|
||||
static int slide_match(struct device *, struct cfdata *, void *);
|
||||
static void slide_attach(struct device *, struct device *, void *);
|
||||
|
@ -183,7 +183,7 @@ sl82c105_chip_map(struct pciide_softc *sc, struct pci_attach_args *pa)
|
|||
}
|
||||
|
||||
static void
|
||||
sl82c105_setup_channel(struct channel_softc *chp)
|
||||
sl82c105_setup_channel(struct wdc_channel *chp)
|
||||
{
|
||||
struct ata_drive_datas *drvp;
|
||||
struct pciide_channel *cp = (struct pciide_channel*)chp;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: stpcide.c,v 1.2 2003/11/27 23:02:40 fvdl Exp $ */
|
||||
/* $NetBSD: stpcide.c,v 1.3 2004/01/03 01:50:53 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2003 Toru Nishimura
|
||||
|
@ -38,7 +38,7 @@
|
|||
#include <dev/pci/pciidevar.h>
|
||||
|
||||
static void stpc_chip_map(struct pciide_softc *, struct pci_attach_args *);
|
||||
static void stpc_setup_channel(struct channel_softc *);
|
||||
static void stpc_setup_channel(struct wdc_channel *);
|
||||
|
||||
static int stpcide_match(struct device *, struct cfdata *, void *);
|
||||
static void stpcide_attach(struct device *, struct device *, void *);
|
||||
|
@ -132,7 +132,7 @@ static const u_int16_t dmatbl[] = { 0x7C00, 0x1800, 0x0800 };
|
|||
static const u_int16_t piotbl[] = { 0x03C0, 0x0230, 0x01A0, 0x0110, 0x0010 };
|
||||
|
||||
static void
|
||||
stpc_setup_channel(struct channel_softc *chp)
|
||||
stpc_setup_channel(struct wdc_channel *chp)
|
||||
{
|
||||
struct pciide_channel *cp = (struct pciide_channel *)chp;
|
||||
struct pciide_softc *sc = (struct pciide_softc *)cp->wdc_channel.wdc;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: viaide.c,v 1.7 2003/11/27 23:02:40 fvdl Exp $ */
|
||||
/* $NetBSD: viaide.c,v 1.8 2004/01/03 01:50:53 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1999, 2000, 2001 Manuel Bouyer.
|
||||
|
@ -43,7 +43,7 @@ static int via_pcib_match(struct pci_attach_args *);
|
|||
static void via_chip_map(struct pciide_softc *, struct pci_attach_args *);
|
||||
static void via_sata_chip_map(struct pciide_softc *,
|
||||
struct pci_attach_args *);
|
||||
static void via_setup_channel(struct channel_softc *);
|
||||
static void via_setup_channel(struct wdc_channel *);
|
||||
|
||||
static int viaide_match(struct device *, struct cfdata *, void *);
|
||||
static void viaide_attach(struct device *, struct device *, void *);
|
||||
|
@ -330,7 +330,7 @@ unknown:
|
|||
}
|
||||
|
||||
static void
|
||||
via_setup_channel(struct channel_softc *chp)
|
||||
via_setup_channel(struct wdc_channel *chp)
|
||||
{
|
||||
u_int32_t udmatim_reg, datatim_reg;
|
||||
u_int8_t idedma_ctl;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: wdc_pcmcia.c,v 1.65 2004/01/01 17:18:53 thorpej Exp $ */
|
||||
/* $NetBSD: wdc_pcmcia.c,v 1.66 2004/01/03 01:50:53 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998, 2003 The NetBSD Foundation, Inc.
|
||||
|
@ -37,7 +37,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: wdc_pcmcia.c,v 1.65 2004/01/01 17:18:53 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: wdc_pcmcia.c,v 1.66 2004/01/03 01:50:53 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/device.h>
|
||||
|
@ -61,8 +61,8 @@ __KERNEL_RCSID(0, "$NetBSD: wdc_pcmcia.c,v 1.65 2004/01/01 17:18:53 thorpej Exp
|
|||
|
||||
struct wdc_pcmcia_softc {
|
||||
struct wdc_softc sc_wdcdev;
|
||||
struct channel_softc *wdc_chanlist[1];
|
||||
struct channel_softc wdc_channel;
|
||||
struct wdc_channel *wdc_chanlist[1];
|
||||
struct wdc_channel wdc_channel;
|
||||
struct ata_queue wdc_chqueue;
|
||||
struct pcmcia_io_handle sc_pioh;
|
||||
struct pcmcia_io_handle sc_auxpioh;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: dtide.c,v 1.13 2004/01/01 17:18:54 thorpej Exp $ */
|
||||
/* $NetBSD: dtide.c,v 1.14 2004/01/03 01:50:53 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2000, 2001 Ben Harris
|
||||
|
@ -31,7 +31,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: dtide.c,v 1.13 2004/01/01 17:18:54 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: dtide.c,v 1.14 2004/01/03 01:50:53 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
|
||||
|
@ -51,8 +51,8 @@ __KERNEL_RCSID(0, "$NetBSD: dtide.c,v 1.13 2004/01/01 17:18:54 thorpej Exp $");
|
|||
|
||||
struct dtide_softc {
|
||||
struct wdc_softc sc_wdc;
|
||||
struct channel_softc *sc_chp[DTIDE_NCHANNELS];/* pointers to sc_chan */
|
||||
struct channel_softc sc_chan[DTIDE_NCHANNELS];
|
||||
struct wdc_channel *sc_chp[DTIDE_NCHANNELS];/* pointers to sc_chan */
|
||||
struct wdc_channel sc_chan[DTIDE_NCHANNELS];
|
||||
struct ata_queue sc_chq[DTIDE_NCHANNELS];
|
||||
bus_space_tag_t sc_magict;
|
||||
bus_space_handle_t sc_magich;
|
||||
|
@ -80,7 +80,7 @@ dtide_attach(struct device *parent, struct device *self, void *aux)
|
|||
{
|
||||
struct podulebus_attach_args *pa = aux;
|
||||
struct dtide_softc *sc = (void *)self;
|
||||
struct channel_softc *ch;
|
||||
struct wdc_channel *ch;
|
||||
int i, j;
|
||||
bus_space_tag_t bst;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: hcide.c,v 1.10 2004/01/01 17:18:54 thorpej Exp $ */
|
||||
/* $NetBSD: hcide.c,v 1.11 2004/01/03 01:50:53 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2000, 2001 Ben Harris
|
||||
|
@ -31,7 +31,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: hcide.c,v 1.10 2004/01/01 17:18:54 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: hcide.c,v 1.11 2004/01/03 01:50:53 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
|
||||
|
@ -50,8 +50,8 @@ __KERNEL_RCSID(0, "$NetBSD: hcide.c,v 1.10 2004/01/01 17:18:54 thorpej Exp $");
|
|||
|
||||
struct hcide_softc {
|
||||
struct wdc_softc sc_wdc;
|
||||
struct channel_softc *sc_chp[HCIDE_NCHANNELS];/* pointers to sc_chan */
|
||||
struct channel_softc sc_chan[HCIDE_NCHANNELS];
|
||||
struct wdc_channel *sc_chp[HCIDE_NCHANNELS];/* pointers to sc_chan */
|
||||
struct wdc_channel sc_chan[HCIDE_NCHANNELS];
|
||||
struct ata_queue sc_chq[HCIDE_NCHANNELS];
|
||||
};
|
||||
|
||||
|
@ -80,7 +80,7 @@ hcide_attach(struct device *parent, struct device *self, void *aux)
|
|||
{
|
||||
struct hcide_softc *sc = (void *)self;
|
||||
struct podulebus_attach_args *pa = aux;
|
||||
struct channel_softc *ch;
|
||||
struct wdc_channel *ch;
|
||||
int i, j;
|
||||
|
||||
sc->sc_wdc.cap = WDC_CAPABILITY_DATA16 | WDC_CAPABILITY_NOIRQ;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: atapi_wdc.c,v 1.65 2004/01/01 21:57:42 thorpej Exp $ */
|
||||
/* $NetBSD: atapi_wdc.c,v 1.66 2004/01/03 01:50:53 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998, 2001 Manuel Bouyer.
|
||||
|
@ -30,7 +30,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: atapi_wdc.c,v 1.65 2004/01/01 21:57:42 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: atapi_wdc.c,v 1.66 2004/01/03 01:50:53 thorpej Exp $");
|
||||
|
||||
#ifndef WDCDEBUG
|
||||
#define WDCDEBUG
|
||||
|
@ -86,12 +86,12 @@ static int wdc_atapi_get_params(struct scsipi_channel *, int,
|
|||
struct ataparams *);
|
||||
static void wdc_atapi_probe_device(struct atapibus_softc *, int);
|
||||
static void wdc_atapi_minphys (struct buf *bp);
|
||||
static void wdc_atapi_start(struct channel_softc *,struct ata_xfer *);
|
||||
static int wdc_atapi_intr(struct channel_softc *, struct ata_xfer *, int);
|
||||
static void wdc_atapi_kill_xfer(struct channel_softc *, struct ata_xfer *);
|
||||
static void wdc_atapi_start(struct wdc_channel *,struct ata_xfer *);
|
||||
static int wdc_atapi_intr(struct wdc_channel *, struct ata_xfer *, int);
|
||||
static void wdc_atapi_kill_xfer(struct wdc_channel *, struct ata_xfer *);
|
||||
static void wdc_atapi_phase_complete(struct ata_xfer *);
|
||||
static void wdc_atapi_done(struct channel_softc *, struct ata_xfer *);
|
||||
static void wdc_atapi_reset(struct channel_softc *, struct ata_xfer *);
|
||||
static void wdc_atapi_done(struct wdc_channel *, struct ata_xfer *);
|
||||
static void wdc_atapi_reset(struct wdc_channel *, struct ata_xfer *);
|
||||
static void wdc_atapi_scsipi_request(struct scsipi_channel *,
|
||||
scsipi_adapter_req_t, void *);
|
||||
static void wdc_atapi_kill_pending(struct scsipi_periph *);
|
||||
|
@ -110,7 +110,7 @@ static const struct scsipi_bustype wdc_atapi_bustype = {
|
|||
void
|
||||
wdc_atapibus_attach(struct atabus_softc *ata_sc)
|
||||
{
|
||||
struct channel_softc *chp = ata_sc->sc_chan;
|
||||
struct wdc_channel *chp = ata_sc->sc_chan;
|
||||
struct wdc_softc *wdc = chp->wdc;
|
||||
struct scsipi_adapter *adapt = &wdc->sc_atapi_adapter._generic;
|
||||
struct scsipi_channel *chan = &chp->ch_atapi_channel;
|
||||
|
@ -161,14 +161,14 @@ wdc_atapi_kill_pending(struct scsipi_periph *periph)
|
|||
{
|
||||
struct wdc_softc *wdc =
|
||||
(void *)periph->periph_channel->chan_adapter->adapt_dev;
|
||||
struct channel_softc *chp =
|
||||
struct wdc_channel *chp =
|
||||
wdc->channels[periph->periph_channel->chan_channel];
|
||||
|
||||
wdc_kill_pending(chp);
|
||||
}
|
||||
|
||||
static void
|
||||
wdc_atapi_kill_xfer(struct channel_softc *chp, struct ata_xfer *xfer)
|
||||
wdc_atapi_kill_xfer(struct wdc_channel *chp, struct ata_xfer *xfer)
|
||||
{
|
||||
struct scsipi_xfer *sc_xfer = xfer->c_cmd;
|
||||
|
||||
|
@ -184,7 +184,7 @@ wdc_atapi_get_params(struct scsipi_channel *chan, int drive,
|
|||
struct ataparams *id)
|
||||
{
|
||||
struct wdc_softc *wdc = (void *)chan->chan_adapter->adapt_dev;
|
||||
struct channel_softc *chp = wdc->channels[chan->chan_channel];
|
||||
struct wdc_channel *chp = wdc->channels[chan->chan_channel];
|
||||
struct wdc_command wdc_c;
|
||||
|
||||
/* if no ATAPI device detected at wdc attach time, skip */
|
||||
|
@ -237,7 +237,7 @@ wdc_atapi_probe_device(struct atapibus_softc *sc, int target)
|
|||
struct ataparams ids;
|
||||
struct ataparams *id = &ids;
|
||||
struct wdc_softc *wdc = (void *)chan->chan_adapter->adapt_dev;
|
||||
struct channel_softc *chp = wdc->channels[chan->chan_channel];
|
||||
struct wdc_channel *chp = wdc->channels[chan->chan_channel];
|
||||
struct ata_drive_datas *drvp = &chp->ch_drive[target];
|
||||
struct scsipibus_attach_args sa;
|
||||
char serial_number[21], model[41], firmware_revision[9];
|
||||
|
@ -390,7 +390,7 @@ wdc_atapi_scsipi_request(struct scsipi_channel *chan, scsipi_adapter_req_t req,
|
|||
}
|
||||
|
||||
static void
|
||||
wdc_atapi_start(struct channel_softc *chp, struct ata_xfer *xfer)
|
||||
wdc_atapi_start(struct wdc_channel *chp, struct ata_xfer *xfer)
|
||||
{
|
||||
struct scsipi_xfer *sc_xfer = xfer->c_cmd;
|
||||
struct ata_drive_datas *drvp = &chp->ch_drive[xfer->c_drive];
|
||||
|
@ -554,7 +554,7 @@ error:
|
|||
}
|
||||
|
||||
static int
|
||||
wdc_atapi_intr(struct channel_softc *chp, struct ata_xfer *xfer, int irq)
|
||||
wdc_atapi_intr(struct wdc_channel *chp, struct ata_xfer *xfer, int irq)
|
||||
{
|
||||
struct scsipi_xfer *sc_xfer = xfer->c_cmd;
|
||||
struct ata_drive_datas *drvp = &chp->ch_drive[xfer->c_drive];
|
||||
|
@ -872,7 +872,7 @@ again:
|
|||
static void
|
||||
wdc_atapi_phase_complete(struct ata_xfer *xfer)
|
||||
{
|
||||
struct channel_softc *chp = xfer->c_chp;
|
||||
struct wdc_channel *chp = xfer->c_chp;
|
||||
struct scsipi_xfer *sc_xfer = xfer->c_cmd;
|
||||
struct ata_drive_datas *drvp = &chp->ch_drive[xfer->c_drive];
|
||||
|
||||
|
@ -947,7 +947,7 @@ wdc_atapi_phase_complete(struct ata_xfer *xfer)
|
|||
}
|
||||
|
||||
static void
|
||||
wdc_atapi_done(struct channel_softc *chp, struct ata_xfer *xfer)
|
||||
wdc_atapi_done(struct wdc_channel *chp, struct ata_xfer *xfer)
|
||||
{
|
||||
struct scsipi_xfer *sc_xfer = xfer->c_cmd;
|
||||
|
||||
|
@ -966,7 +966,7 @@ wdc_atapi_done(struct channel_softc *chp, struct ata_xfer *xfer)
|
|||
}
|
||||
|
||||
static void
|
||||
wdc_atapi_reset(struct channel_softc *chp, struct ata_xfer *xfer)
|
||||
wdc_atapi_reset(struct wdc_channel *chp, struct ata_xfer *xfer)
|
||||
{
|
||||
struct ata_drive_datas *drvp = &chp->ch_drive[xfer->c_drive];
|
||||
struct scsipi_xfer *sc_xfer = xfer->c_cmd;
|
||||
|
|
Loading…
Reference in New Issue