Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Add some more ATA_CAM ifdefs.

Submitted by:	marius (partially)
MFC after:	1 week
  • Loading branch information...
commit 063bf308cb2ec26b1f4b759a118f66e69a148ccf 1 parent 57bb843
Alexander Motin authored April 03, 2013
8  sys/dev/ata/ata-all.c
@@ -166,9 +166,11 @@ ata_attach(device_t dev)
166 166
     ch->state = ATA_IDLE;
167 167
     bzero(&ch->state_mtx, sizeof(struct mtx));
168 168
     mtx_init(&ch->state_mtx, "ATA state lock", NULL, MTX_DEF);
  169
+#ifndef ATA_CAM
169 170
     bzero(&ch->queue_mtx, sizeof(struct mtx));
170 171
     mtx_init(&ch->queue_mtx, "ATA queue lock", NULL, MTX_DEF);
171 172
     TAILQ_INIT(&ch->ata_queue);
  173
+#endif
172 174
     TASK_INIT(&ch->conntask, 0, ata_conn_event, dev);
173 175
 #ifdef ATA_CAM
174 176
 	for (i = 0; i < 16; i++) {
@@ -340,7 +342,9 @@ ata_detach(device_t dev)
340 342
 	ch->dma.free(dev);
341 343
 
342 344
     mtx_destroy(&ch->state_mtx);
  345
+#ifndef ATA_CAM
343 346
     mtx_destroy(&ch->queue_mtx);
  347
+#endif
344 348
     return 0;
345 349
 }
346 350
 
@@ -1107,6 +1111,7 @@ ata_default_registers(device_t dev)
1107 1111
     ch->r_io[ATA_ALTSTAT].offset = ch->r_io[ATA_CONTROL].offset;
1108 1112
 }
1109 1113
 
  1114
+#ifndef ATA_CAM
1110 1115
 void
1111 1116
 ata_modify_if_48bit(struct ata_request *request)
1112 1117
 {
@@ -1208,6 +1213,7 @@ ata_modify_if_48bit(struct ata_request *request)
1208 1213
 	request->flags |= ATA_R_48BIT;
1209 1214
     }
1210 1215
 }
  1216
+#endif
1211 1217
 
1212 1218
 void
1213 1219
 ata_udelay(int interval)
@@ -1453,7 +1459,7 @@ bpack(int8_t *src, int8_t *dst, int len)
1453 1459
 #endif
1454 1460
 
1455 1461
 #ifdef ATA_CAM
1456  
-void
  1462
+static void
1457 1463
 ata_cam_begin_transaction(device_t dev, union ccb *ccb)
1458 1464
 {
1459 1465
 	struct ata_channel *ch = device_get_softc(dev);
14  sys/dev/ata/ata-all.h
@@ -580,9 +580,11 @@ struct ata_channel {
580 580
 #define         ATA_ACTIVE              0x0001
581 581
 #define         ATA_STALL_QUEUE         0x0002
582 582
 
  583
+#ifndef ATA_CAM
583 584
     struct mtx                  queue_mtx;      /* queue lock */
584 585
     TAILQ_HEAD(, ata_request)   ata_queue;      /* head of ATA queue */
585 586
     struct ata_request          *freezepoint;   /* composite freezepoint */
  587
+#endif
586 588
     struct ata_request          *running;       /* currently running request */
587 589
     struct task			conntask;	/* PHY events handling task */
588 590
 #ifdef ATA_CAM
@@ -621,24 +623,24 @@ int ata_resume(device_t dev);
621 623
 void ata_interrupt(void *data);
622 624
 int ata_device_ioctl(device_t dev, u_long cmd, caddr_t data);
623 625
 int ata_getparam(struct ata_device *atadev, int init);
624  
-int ata_identify(device_t dev);
625 626
 void ata_default_registers(device_t dev);
626  
-void ata_modify_if_48bit(struct ata_request *request);
627 627
 void ata_udelay(int interval);
628 628
 const char *ata_unit2str(struct ata_device *atadev);
629 629
 const char *ata_mode2str(int mode);
  630
+void ata_setmode(device_t dev);
  631
+void ata_print_cable(device_t dev, u_int8_t *who);
630 632
 int ata_str2mode(const char *str);
631 633
 const char *ata_satarev2str(int rev);
632 634
 int ata_atapi(device_t dev, int target);
  635
+#ifndef ATA_CAM
  636
+int ata_identify(device_t dev);
  637
+void ata_modify_if_48bit(struct ata_request *request);
633 638
 int ata_pmode(struct ata_params *ap);
634 639
 int ata_wmode(struct ata_params *ap);
635 640
 int ata_umode(struct ata_params *ap);
636 641
 int ata_limit_mode(device_t dev, int mode, int maxmode);
637  
-void ata_setmode(device_t dev);
638  
-void ata_print_cable(device_t dev, u_int8_t *who);
639 642
 int ata_check_80pin(device_t dev, int mode);
640  
-#ifdef ATA_CAM
641  
-void ata_cam_begin_transaction(device_t dev, union ccb *ccb);
  643
+#else
642 644
 void ata_cam_end_transaction(device_t dev, struct ata_request *request);
643 645
 #endif
644 646
 

Git Notes

svn path=/head/; revision=249052

0 notes on commit 063bf30

Please sign in to comment.
Something went wrong with that request. Please try again.