Add some more ATA_CAM ifdefs.
Submitted by: marius (partially) MFC after: 1 week
This commit is contained in:
parent
d6794b7067
commit
aac18bac02
@ -166,9 +166,11 @@ ata_attach(device_t dev)
|
|||||||
ch->state = ATA_IDLE;
|
ch->state = ATA_IDLE;
|
||||||
bzero(&ch->state_mtx, sizeof(struct mtx));
|
bzero(&ch->state_mtx, sizeof(struct mtx));
|
||||||
mtx_init(&ch->state_mtx, "ATA state lock", NULL, MTX_DEF);
|
mtx_init(&ch->state_mtx, "ATA state lock", NULL, MTX_DEF);
|
||||||
|
#ifndef ATA_CAM
|
||||||
bzero(&ch->queue_mtx, sizeof(struct mtx));
|
bzero(&ch->queue_mtx, sizeof(struct mtx));
|
||||||
mtx_init(&ch->queue_mtx, "ATA queue lock", NULL, MTX_DEF);
|
mtx_init(&ch->queue_mtx, "ATA queue lock", NULL, MTX_DEF);
|
||||||
TAILQ_INIT(&ch->ata_queue);
|
TAILQ_INIT(&ch->ata_queue);
|
||||||
|
#endif
|
||||||
TASK_INIT(&ch->conntask, 0, ata_conn_event, dev);
|
TASK_INIT(&ch->conntask, 0, ata_conn_event, dev);
|
||||||
#ifdef ATA_CAM
|
#ifdef ATA_CAM
|
||||||
for (i = 0; i < 16; i++) {
|
for (i = 0; i < 16; i++) {
|
||||||
@ -340,7 +342,9 @@ ata_detach(device_t dev)
|
|||||||
ch->dma.free(dev);
|
ch->dma.free(dev);
|
||||||
|
|
||||||
mtx_destroy(&ch->state_mtx);
|
mtx_destroy(&ch->state_mtx);
|
||||||
|
#ifndef ATA_CAM
|
||||||
mtx_destroy(&ch->queue_mtx);
|
mtx_destroy(&ch->queue_mtx);
|
||||||
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1107,6 +1111,7 @@ ata_default_registers(device_t dev)
|
|||||||
ch->r_io[ATA_ALTSTAT].offset = ch->r_io[ATA_CONTROL].offset;
|
ch->r_io[ATA_ALTSTAT].offset = ch->r_io[ATA_CONTROL].offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef ATA_CAM
|
||||||
void
|
void
|
||||||
ata_modify_if_48bit(struct ata_request *request)
|
ata_modify_if_48bit(struct ata_request *request)
|
||||||
{
|
{
|
||||||
@ -1208,6 +1213,7 @@ ata_modify_if_48bit(struct ata_request *request)
|
|||||||
request->flags |= ATA_R_48BIT;
|
request->flags |= ATA_R_48BIT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void
|
void
|
||||||
ata_udelay(int interval)
|
ata_udelay(int interval)
|
||||||
@ -1453,7 +1459,7 @@ bpack(int8_t *src, int8_t *dst, int len)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ATA_CAM
|
#ifdef ATA_CAM
|
||||||
void
|
static void
|
||||||
ata_cam_begin_transaction(device_t dev, union ccb *ccb)
|
ata_cam_begin_transaction(device_t dev, union ccb *ccb)
|
||||||
{
|
{
|
||||||
struct ata_channel *ch = device_get_softc(dev);
|
struct ata_channel *ch = device_get_softc(dev);
|
||||||
|
@ -580,9 +580,11 @@ struct ata_channel {
|
|||||||
#define ATA_ACTIVE 0x0001
|
#define ATA_ACTIVE 0x0001
|
||||||
#define ATA_STALL_QUEUE 0x0002
|
#define ATA_STALL_QUEUE 0x0002
|
||||||
|
|
||||||
|
#ifndef ATA_CAM
|
||||||
struct mtx queue_mtx; /* queue lock */
|
struct mtx queue_mtx; /* queue lock */
|
||||||
TAILQ_HEAD(, ata_request) ata_queue; /* head of ATA queue */
|
TAILQ_HEAD(, ata_request) ata_queue; /* head of ATA queue */
|
||||||
struct ata_request *freezepoint; /* composite freezepoint */
|
struct ata_request *freezepoint; /* composite freezepoint */
|
||||||
|
#endif
|
||||||
struct ata_request *running; /* currently running request */
|
struct ata_request *running; /* currently running request */
|
||||||
struct task conntask; /* PHY events handling task */
|
struct task conntask; /* PHY events handling task */
|
||||||
#ifdef ATA_CAM
|
#ifdef ATA_CAM
|
||||||
@ -621,24 +623,24 @@ int ata_resume(device_t dev);
|
|||||||
void ata_interrupt(void *data);
|
void ata_interrupt(void *data);
|
||||||
int ata_device_ioctl(device_t dev, u_long cmd, caddr_t data);
|
int ata_device_ioctl(device_t dev, u_long cmd, caddr_t data);
|
||||||
int ata_getparam(struct ata_device *atadev, int init);
|
int ata_getparam(struct ata_device *atadev, int init);
|
||||||
int ata_identify(device_t dev);
|
|
||||||
void ata_default_registers(device_t dev);
|
void ata_default_registers(device_t dev);
|
||||||
void ata_modify_if_48bit(struct ata_request *request);
|
|
||||||
void ata_udelay(int interval);
|
void ata_udelay(int interval);
|
||||||
const char *ata_unit2str(struct ata_device *atadev);
|
const char *ata_unit2str(struct ata_device *atadev);
|
||||||
const char *ata_mode2str(int mode);
|
const char *ata_mode2str(int mode);
|
||||||
|
void ata_setmode(device_t dev);
|
||||||
|
void ata_print_cable(device_t dev, u_int8_t *who);
|
||||||
int ata_str2mode(const char *str);
|
int ata_str2mode(const char *str);
|
||||||
const char *ata_satarev2str(int rev);
|
const char *ata_satarev2str(int rev);
|
||||||
int ata_atapi(device_t dev, int target);
|
int ata_atapi(device_t dev, int target);
|
||||||
|
#ifndef ATA_CAM
|
||||||
|
int ata_identify(device_t dev);
|
||||||
|
void ata_modify_if_48bit(struct ata_request *request);
|
||||||
int ata_pmode(struct ata_params *ap);
|
int ata_pmode(struct ata_params *ap);
|
||||||
int ata_wmode(struct ata_params *ap);
|
int ata_wmode(struct ata_params *ap);
|
||||||
int ata_umode(struct ata_params *ap);
|
int ata_umode(struct ata_params *ap);
|
||||||
int ata_limit_mode(device_t dev, int mode, int maxmode);
|
int ata_limit_mode(device_t dev, int mode, int maxmode);
|
||||||
void ata_setmode(device_t dev);
|
|
||||||
void ata_print_cable(device_t dev, u_int8_t *who);
|
|
||||||
int ata_check_80pin(device_t dev, int mode);
|
int ata_check_80pin(device_t dev, int mode);
|
||||||
#ifdef ATA_CAM
|
#else
|
||||||
void ata_cam_begin_transaction(device_t dev, union ccb *ccb);
|
|
||||||
void ata_cam_end_transaction(device_t dev, struct ata_request *request);
|
void ata_cam_end_transaction(device_t dev, struct ata_request *request);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user