diff options
Diffstat (limited to 'sys/dev/ata/atapi-all.h')
-rw-r--r-- | sys/dev/ata/atapi-all.h | 51 |
1 files changed, 20 insertions, 31 deletions
diff --git a/sys/dev/ata/atapi-all.h b/sys/dev/ata/atapi-all.h index 9727a2c..0d2df68 100644 --- a/sys/dev/ata/atapi-all.h +++ b/sys/dev/ata/atapi-all.h @@ -1,5 +1,5 @@ /*- - * Copyright (c) 1998,1999,2000,2001 Søren Schmidt <sos@FreeBSD.org> + * Copyright (c) 1998,1999,2000,2001,2002 Søren Schmidt <sos@FreeBSD.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -143,21 +143,10 @@ struct atapi_reqsense { u_int8_t sk_specific2; /* sense key specific */ }; -struct atapi_softc { - struct ata_softc *controller; /* ptr to controller softc */ - int unit; /* ATA_MASTER or ATA_SLAVE */ - void *driver; /* ptr to subdriver softc */ - u_int8_t cmd; /* last cmd executed */ - struct atapi_reqsense sense; /* last cmd sense if error */ - int flags; /* drive flags */ -#define ATAPI_F_MEDIA_CHANGED 0x0001 -#define ATAPI_F_DETACHING 0x0002 -}; - typedef int atapi_callback_t(struct atapi_request *); struct atapi_request { - struct atapi_softc *device; /* ptr to parent device */ + struct ata_device *device; /* ptr to parent softc */ u_int8_t ccb[16]; /* command control block */ int ccbsize; /* size of ccb (12 | 16) */ u_int32_t bytecount; /* bytes to transfer */ @@ -178,27 +167,27 @@ struct atapi_request { caddr_t data; /* pointer to data buf */ atapi_callback_t *callback; /* ptr to callback func */ struct ata_dmaentry *dmatab; /* DMA transfer table */ - void *driver; /* driver specific */ + void *driver; /* driver specific */ TAILQ_ENTRY(atapi_request) chain; /* list management */ }; -void atapi_attach(struct ata_softc *, int); -void atapi_detach(struct atapi_softc *); -void atapi_start(struct atapi_softc *); +void atapi_attach(struct ata_device *); +void atapi_detach(struct ata_device *); +void atapi_start(struct ata_device *); int atapi_transfer(struct atapi_request *); int atapi_interrupt(struct atapi_request *); -int atapi_queue_cmd(struct atapi_softc *, int8_t [], caddr_t, int, int, int, atapi_callback_t, void *); -void atapi_reinit(struct atapi_softc *); -int atapi_test_ready(struct atapi_softc *); -int atapi_wait_dsc(struct atapi_softc *, int); -void atapi_request_sense(struct atapi_softc *, struct atapi_reqsense *); +int atapi_queue_cmd(struct ata_device *, int8_t [], caddr_t, int, int, int, atapi_callback_t, void *); +void atapi_reinit(struct ata_device *); +int atapi_test_ready(struct ata_device *); +int atapi_wait_dsc(struct ata_device *, int); +void atapi_request_sense(struct ata_device *, struct atapi_reqsense *); void atapi_dump(char *, void *, int); -int acdattach(struct atapi_softc *); -void acddetach(struct atapi_softc *); -void acd_start(struct atapi_softc *); -int afdattach(struct atapi_softc *); -void afddetach(struct atapi_softc *); -void afd_start(struct atapi_softc *); -int astattach(struct atapi_softc *); -void astdetach(struct atapi_softc *); -void ast_start(struct atapi_softc *); +int acdattach(struct ata_device *); +void acddetach(struct ata_device *); +void acd_start(struct ata_device *); +int afdattach(struct ata_device *); +void afddetach(struct ata_device *); +void afd_start(struct ata_device *); +int astattach(struct ata_device *); +void astdetach(struct ata_device *); +void ast_start(struct ata_device *); |