Date: Wed, 10 Apr 2013 18:07:26 +0000 (UTC) From: Alexander Motin <mav@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r249340 - stable/9/sys/dev/ata Message-ID: <201304101807.r3AI7QqB021394@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mav Date: Wed Apr 10 18:07:25 2013 New Revision: 249340 URL: http://svnweb.freebsd.org/changeset/base/249340 Log: MFC r249052: Add some more ATA_CAM ifdefs. Modified: stable/9/sys/dev/ata/ata-all.c stable/9/sys/dev/ata/ata-all.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/ata/ata-all.c ============================================================================== --- stable/9/sys/dev/ata/ata-all.c Wed Apr 10 17:51:39 2013 (r249339) +++ stable/9/sys/dev/ata/ata-all.c Wed Apr 10 18:07:25 2013 (r249340) @@ -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); TAILQ_INIT(&ch->ata_queue); +#endif 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) ch->dma.free(dev); mtx_destroy(&ch->state_mtx); +#ifndef ATA_CAM mtx_destroy(&ch->queue_mtx); +#endif 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 void ata_modify_if_48bit(struct ata_request *request) { @@ -1208,6 +1213,7 @@ ata_modify_if_48bit(struct ata_request * request->flags |= ATA_R_48BIT; } } +#endif void ata_udelay(int interval) @@ -1453,7 +1459,7 @@ bpack(int8_t *src, int8_t *dst, int len) #endif #ifdef ATA_CAM -void +static void ata_cam_begin_transaction(device_t dev, union ccb *ccb) { struct ata_channel *ch = device_get_softc(dev); Modified: stable/9/sys/dev/ata/ata-all.h ============================================================================== --- stable/9/sys/dev/ata/ata-all.h Wed Apr 10 17:51:39 2013 (r249339) +++ stable/9/sys/dev/ata/ata-all.h Wed Apr 10 18:07:25 2013 (r249340) @@ -579,9 +579,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 */ +#endif struct ata_request *running; /* currently running request */ struct task conntask; /* PHY events handling task */ #ifdef ATA_CAM @@ -620,24 +622,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); +#else void ata_cam_end_transaction(device_t dev, struct ata_request *request); #endif
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201304101807.r3AI7QqB021394>