diff options
author | sos <sos@FreeBSD.org> | 2000-01-18 21:02:59 +0000 |
---|---|---|
committer | sos <sos@FreeBSD.org> | 2000-01-18 21:02:59 +0000 |
commit | 841c5b6aa808db8ac648f9af237cc856d50058c6 (patch) | |
tree | bbd15141d47f1d11ebb77e77689734b311ee93b4 /sys/dev/ata/ata-disk.h | |
parent | 9fe69108f21206d84ce6ad53222e6403b12bd80b (diff) | |
download | FreeBSD-src-841c5b6aa808db8ac648f9af237cc856d50058c6.zip FreeBSD-src-841c5b6aa808db8ac648f9af237cc856d50058c6.tar.gz |
Rearrange the probecode, so that 80pin cables can be identified
correctly on both master and slave.
Smash together the ata_params & atapi_params structures as they
are more or less equal anyways.
Get rid of the last SYSINIT's in here.
Diffstat (limited to 'sys/dev/ata/ata-disk.h')
-rw-r--r-- | sys/dev/ata/ata-disk.h | 102 |
1 files changed, 1 insertions, 101 deletions
diff --git a/sys/dev/ata/ata-disk.h b/sys/dev/ata/ata-disk.h index 709b1fb..63fb4c7 100644 --- a/sys/dev/ata/ata-disk.h +++ b/sys/dev/ata/ata-disk.h @@ -28,110 +28,9 @@ * $FreeBSD$ */ -/* ATA device parameter information */ -struct ata_params { - int16_t config; /* general configuration bits */ - u_int16_t cylinders; /* number of cylinders */ - int16_t reserved2; - u_int16_t heads; /* # heads */ - int16_t unfbytespertrk; /* # unformatted bytes/track */ - int16_t unfbytes; /* # unformatted bytes/sector */ - u_int16_t sectors; /* # sectors/track */ - int16_t vendorunique0[3]; - int8_t serial[20]; /* serial number */ - int16_t buffertype; /* buffer type */ -#define ATA_BT_SINGLEPORTSECTOR 1 /* 1 port, 1 sector buffer */ -#define ATA_BT_DUALPORTMULTI 2 /* 2 port, mult sector buffer */ -#define ATA_BT_DUALPORTMULTICACHE 3 /* above plus track cache */ - - int16_t buffersize; /* buf size, 512-byte units */ - int16_t necc; /* ecc bytes appended */ - int8_t revision[8]; /* firmware revision */ - int8_t model[40]; /* model name */ - int8_t nsecperint; /* sectors per interrupt */ - int8_t vendorunique1; - int16_t usedmovsd; /* double word read/write? */ - - u_int8_t vendorcap; /* vendor capabilities */ - u_int8_t dmaflag :1; /* DMA supported - always 1 */ - u_int8_t lbaflag :1; /* LBA supported - always 1 */ - u_int8_t iordydis :1; /* IORDY may be disabled */ - u_int8_t iordyflag :1; /* IORDY supported */ - u_int8_t :1; - u_int8_t standby :1; /* standby timer supported */ - u_int8_t :1; - u_int8_t :1; - int16_t capvalidate; /* validation for above */ - - int8_t vendorunique3; - int8_t opiomode; /* PIO modes 0-2 */ - int8_t vendorunique4; - int8_t odmamode; /* old DMA modes, not ATA-3 */ - - int16_t atavalid; /* fields valid */ -#define ATA_FLAG_54_58 1 /* words 54-58 valid */ -#define ATA_FLAG_64_70 2 /* words 64-70 valid */ -#define ATA_FLAG_88 4 /* word 88 valid */ - - int16_t currcyls; - int16_t currheads; - int16_t currsectors; - int16_t currsize0; - int16_t currsize1; - int8_t currmultsect; - int8_t multsectvalid; - int32_t lbasize; - - int16_t sdmamodes; /* singleword DMA modes */ - int16_t wdmamodes; /* multiword DMA modes */ - int16_t apiomodes; /* advanced PIO modes */ - - u_int16_t mwdmamin; /* min. M/W DMA time/word ns */ - u_int16_t mwdmarec; /* rec. M/W DMA time ns */ - u_int16_t pioblind; /* min. PIO cycle w/o flow */ - u_int16_t pioiordy; /* min. PIO cycle IORDY flow */ - - int16_t reserved69; - int16_t reserved70; - u_int16_t rlsovlap; /* rel time (us) for overlap */ - u_int16_t rlsservice; /* rel time (us) for service */ - int16_t reserved73; - int16_t reserved74; - int16_t queuelen; - int16_t reserved76; - int16_t reserved77; - int16_t reserved78; - int16_t reserved79; - int16_t versmajor; - int16_t versminor; - int16_t featsupp1; - int16_t featsupp2; - int16_t featsupp3; - int16_t featenab1; - int16_t featenab2; - int16_t featenab3; - int16_t udmamodes; /* UltraDMA modes */ - int16_t erasetime; - int16_t enherasetime; - int16_t apmlevel; - int16_t masterpasswdrev; - u_int16_t masterhwres :8; - u_int16_t slavehwres :5; - u_int16_t cblid :1; - u_int16_t reserved93_1415 :2; - int16_t reserved94[32]; - int16_t rmvstat; - int16_t securstat; - int16_t reserved129[30]; - int16_t cfapwrmode; - int16_t reserved161[84]; - int16_t integrity; -}; - /* structure describing an ATA disk */ struct ad_softc { struct ata_softc *controller; /* ptr to parent ctrl */ - struct ata_params *ata_parm; /* ata device params */ int32_t unit; /* ATA_MASTER or ATA_SLAVE */ int32_t lun; /* logical unit number */ u_int32_t total_secs; /* total # of sectors (LBA) */ @@ -171,6 +70,7 @@ struct ad_request { TAILQ_ENTRY(ad_request) chain; /* list management */ }; +void ad_attach(struct ata_softc *, int32_t); void ad_transfer(struct ad_request *); int32_t ad_interrupt(struct ad_request *); void ad_reinit(struct ad_softc *); |