Browse files

Add some more ATA_CAM ifdefs.

Submitted by:	marius (partially)
MFC after:	1 week
  • Loading branch information...
1 parent 57bb843 commit 063bf308cb2ec26b1f4b759a118f66e69a148ccf @amotin amotin committed Apr 3, 2013
Showing with 15 additions and 7 deletions.
  1. +7 −1 sys/dev/ata/ata-all.c
  2. +8 −6 sys/dev/ata/ata-all.h
@@ -166,9 +166,11 @@ ata_attach(device_t dev)
ch->state = ATA_IDLE;
bzero(&ch->state_mtx, sizeof(struct mtx));
mtx_init(&ch->state_mtx, "ATA state lock", NULL, MTX_DEF);
+#ifndef ATA_CAM
bzero(&ch->queue_mtx, sizeof(struct mtx));
mtx_init(&ch->queue_mtx, "ATA queue lock", NULL, MTX_DEF);
TASK_INIT(&ch->conntask, 0, ata_conn_event, dev);
#ifdef ATA_CAM
for (i = 0; i < 16; i++) {
@@ -340,7 +342,9 @@ ata_detach(device_t dev)
+#ifndef ATA_CAM
return 0;
@@ -1107,6 +1111,7 @@ ata_default_registers(device_t dev)
ch->r_io[ATA_ALTSTAT].offset = ch->r_io[ATA_CONTROL].offset;
+#ifndef ATA_CAM
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;
ata_udelay(int interval)
@@ -1453,7 +1459,7 @@ bpack(int8_t *src, int8_t *dst, int len)
#ifdef ATA_CAM
+static void
ata_cam_begin_transaction(device_t dev, union ccb *ccb)
struct ata_channel *ch = device_get_softc(dev);
@@ -580,9 +580,11 @@ struct ata_channel {
#define ATA_ACTIVE 0x0001
#define ATA_STALL_QUEUE 0x0002
+#ifndef ATA_CAM
struct mtx queue_mtx; /* queue lock */
TAILQ_HEAD(, ata_request) ata_queue; /* head of ATA queue */
struct ata_request *freezepoint; /* composite freezepoint */
struct ata_request *running; /* currently running request */
struct task conntask; /* PHY events handling task */
#ifdef ATA_CAM
@@ -621,24 +623,24 @@ int ata_resume(device_t dev);
void ata_interrupt(void *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_identify(device_t dev);
void ata_default_registers(device_t dev);
-void ata_modify_if_48bit(struct ata_request *request);
void ata_udelay(int interval);
const char *ata_unit2str(struct ata_device *atadev);
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);
const char *ata_satarev2str(int rev);
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_wmode(struct ata_params *ap);
int ata_umode(struct ata_params *ap);
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);
-#ifdef ATA_CAM
-void ata_cam_begin_transaction(device_t dev, union ccb *ccb);
void ata_cam_end_transaction(device_t dev, struct ata_request *request);

0 comments on commit 063bf30

Please sign in to comment.