diff options
author | Constantine Sapuntzakis <csapuntz@cvs.openbsd.org> | 2001-03-25 13:11:59 +0000 |
---|---|---|
committer | Constantine Sapuntzakis <csapuntz@cvs.openbsd.org> | 2001-03-25 13:11:59 +0000 |
commit | e062b2ded8bea4b44e6b5782a79fabbebb2eb929 (patch) | |
tree | 2b254b38691ca1d18309eaf5b10ebcde5eb617ac /sys/dev/ata/atavar.h | |
parent | f8ee0399c6e8a97e07e33bfdd2cf4ed7bd611704 (diff) |
Minor mods to DMA interface - get rid of unnecessary args. Allow DMA functions to return status flags.
Note: Changing code to have DMA interface indicate when I/O is done (a la NetBSD) was considered. It was rejected due to questionable backward compatability
with ISA DMA and MAC obio DMA
Added irqack from NetBSD (though this feature should really be in the
PCI interrupt handlers)
Use pool
Diffstat (limited to 'sys/dev/ata/atavar.h')
-rw-r--r-- | sys/dev/ata/atavar.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/dev/ata/atavar.h b/sys/dev/ata/atavar.h index 8448949adcd..0ba26ac2922 100644 --- a/sys/dev/ata/atavar.h +++ b/sys/dev/ata/atavar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: atavar.h,v 1.5 2000/04/10 07:06:16 csapuntz Exp $ */ +/* $OpenBSD: atavar.h,v 1.6 2001/03/25 13:11:56 csapuntz Exp $ */ /* $NetBSD: atavar.h,v 1.13 1999/03/10 13:11:43 bouyer Exp $ */ /* @@ -79,10 +79,10 @@ struct ata_drive_datas { /* 0x20-0x40 reserved for ATAPI_CFG_DRQ_MASK */ u_int8_t atapi_cap; - /* Number of DMA errors. Reset to 0 after every successful transfers. */ u_int8_t n_dmaerrs; - /* downgrade mode after this many successive errors */ -#define NERRS_MAX 2 + u_int32_t n_xfers; +#define NERRS_MAX 4 +#define NXFER 1000 char drive_name[31]; int cf_flags; @@ -168,6 +168,7 @@ void wdc_reset_channel __P((struct ata_drive_datas *)); int wdc_ata_addref __P((struct ata_drive_datas *)); void wdc_ata_delref __P((struct ata_drive_datas *)); +void wdc_ata_kill_pending __P((struct ata_drive_datas *)); struct ataparams; int ata_get_params __P((struct ata_drive_datas*, u_int8_t, @@ -178,4 +179,5 @@ int ata_set_mode __P((struct ata_drive_datas*, u_int8_t, u_int8_t)); #define CMD_ERR 1 #define CMD_AGAIN 2 +void ata_dmaerr __P((struct ata_drive_datas *)); void ata_perror __P((struct ata_drive_datas *, int, char *)); |