Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261545AbUKGGNM (ORCPT ); Sun, 7 Nov 2004 01:13:12 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261547AbUKGGNM (ORCPT ); Sun, 7 Nov 2004 01:13:12 -0500 Received: from pimout2-ext.prodigy.net ([207.115.63.101]:23285 "EHLO pimout2-ext.prodigy.net") by vger.kernel.org with ESMTP id S261545AbUKGGFJ (ORCPT ); Sun, 7 Nov 2004 01:05:09 -0500 Date: Sat, 6 Nov 2004 22:04:38 -0800 From: Chris Wedgwood To: Jeff Garzik Cc: Bartlomiej Zolnierkiewicz , LKML Subject: [PATCH 2/3] WIN_* -> ATA_CMD_* conversion (take #2): convert users of WIN_* to ATA_CMD_* Message-ID: <20041107060438.GC25569@taniwha.stupidest.org> References: <20041103091101.GC22469@taniwha.stupidest.org> <418AE8C0.3040205@pobox.com> <58cb370e041105051635c15281@mail.gmail.com> <20041106032305.GB6060@taniwha.stupidest.org> <418D0066.9040002@pobox.com> <418D043E.3090406@pobox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <418D043E.3090406@pobox.com> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 29022 Lines: 755 ide/ide-cd.c | 6 ++-- ide/ide-disk.c | 68 +++++++++++++++++++++++++-------------------------- ide/ide-floppy.c | 4 +-- ide/ide-io.c | 14 +++++----- ide/ide-iops.c | 10 +++---- ide/ide-probe.c | 30 +++++++++++----------- ide/ide-tape.c | 4 +-- ide/ide-taskfile.c | 21 ++++++--------- ide/ide.c | 2 - ide/legacy/hd.c | 8 +++--- ide/ppc/pmac.c | 2 - scsi/ide-scsi.c | 6 ++-- usb/storage/isd200.c | 10 +++---- 13 files changed, 91 insertions(+), 94 deletions(-) ===== drivers/ide/ide-cd.c 1.96 vs edited ===== Index: cw-current/drivers/ide/ide-cd.c =================================================================== --- cw-current.orig/drivers/ide/ide-cd.c 2004-11-06 21:54:32.877043104 -0800 +++ cw-current/drivers/ide/ide-cd.c 2004-11-06 21:54:32.880043207 -0800 @@ -585,7 +585,7 @@ } if (HWIF(drive)->INB(IDE_STATUS_REG) & (BUSY_STAT|DRQ_STAT)) /* force an abort */ - HWIF(drive)->OUTB(WIN_IDLEIMMEDIATE,IDE_COMMAND_REG); + HWIF(drive)->OUTB(ATA_CMD_IDLE_IMMEDIATE,IDE_COMMAND_REG); if (rq->errors >= ERROR_MAX) { DRIVER(drive)->end_request(drive, 0, 0); } else { @@ -887,11 +887,11 @@ if (CDROM_CONFIG_FLAGS (drive)->drq_interrupt) { /* packet command */ - ide_execute_command(drive, WIN_PACKETCMD, handler, ATAPI_WAIT_PC, cdrom_timer_expiry); + ide_execute_command(drive, ATA_CMD_PACKET, handler, ATAPI_WAIT_PC, cdrom_timer_expiry); return ide_started; } else { /* packet command */ - HWIF(drive)->OUTB(WIN_PACKETCMD, IDE_COMMAND_REG); + HWIF(drive)->OUTB(ATA_CMD_PACKET, IDE_COMMAND_REG); return (*handler) (drive); } } Index: cw-current/drivers/ide/ide-disk.c =================================================================== --- cw-current.orig/drivers/ide/ide-disk.c 2004-11-06 21:54:32.903044003 -0800 +++ cw-current/drivers/ide/ide-disk.c 2004-11-06 21:54:32.906044107 -0800 @@ -126,7 +126,7 @@ ide_hwif_t *hwif = HWIF(drive); unsigned int dma = drive->using_dma; u8 lba48 = (drive->addressing == 1) ? 1 : 0; - task_ioreg_t command = WIN_NOP; + task_ioreg_t command = ATA_CMD_NOP; ata_nsector_t nsectors; nsectors.all = (u16) rq->nr_sectors; @@ -213,13 +213,13 @@ if (dma) { if (!hwif->dma_setup(drive)) { if (rq_data_dir(rq)) { - command = lba48 ? WIN_WRITEDMA_EXT : WIN_WRITEDMA; + command = lba48 ? ATA_CMD_WRITE_EXT : ATA_CMD_WRITE; if (drive->vdma) - command = lba48 ? WIN_WRITE_EXT: WIN_WRITE; + command = lba48 ? ATA_CMD_PIO_WRITE_EXT: ATA_CMD_PIO_WRITE; } else { - command = lba48 ? WIN_READDMA_EXT : WIN_READDMA; + command = lba48 ? ATA_CMD_READ_EXT : ATA_CMD_READ; if (drive->vdma) - command = lba48 ? WIN_READ_EXT: WIN_READ; + command = lba48 ? ATA_CMD_PIO_READ_EXT: ATA_CMD_PIO_READ; } hwif->dma_exec_cmd(drive, command); hwif->dma_start(drive); @@ -233,10 +233,10 @@ if (drive->mult_count) { hwif->data_phase = TASKFILE_MULTI_IN; - command = lba48 ? WIN_MULTREAD_EXT : WIN_MULTREAD; + command = lba48 ? ATA_CMD_READ_MULTIPLE_EXT : ATA_CMD_READ_MULTIPLE; } else { hwif->data_phase = TASKFILE_IN; - command = lba48 ? WIN_READ_EXT : WIN_READ; + command = lba48 ? ATA_CMD_PIO_READ_EXT : ATA_CMD_PIO_READ; } ide_execute_command(drive, command, &task_in_intr, WAIT_CMD, NULL); @@ -244,10 +244,10 @@ } else { if (drive->mult_count) { hwif->data_phase = TASKFILE_MULTI_OUT; - command = lba48 ? WIN_MULTWRITE_EXT : WIN_MULTWRITE; + command = lba48 ? ATA_CMD_WRITE_MULTIPLE_EXT : ATA_CMD_WRITE_MULTIPLE; } else { hwif->data_phase = TASKFILE_OUT; - command = lba48 ? WIN_WRITE_EXT : WIN_WRITE; + command = lba48 ? ATA_CMD_PIO_WRITE_EXT : ATA_CMD_PIO_WRITE; } /* FIXME: ->OUTBSYNC ? */ @@ -416,8 +416,8 @@ /* err has different meaning on cdrom and tape */ if (err == ABRT_ERR) { if (drive->select.b.lba && - /* some newer drives don't support WIN_SPECIFY */ - hwif->INB(IDE_COMMAND_REG) == WIN_SPECIFY) + /* some newer drives don't support ATA_CMD_SPECIFY */ + hwif->INB(IDE_COMMAND_REG) == ATA_CMD_SPECIFY) return ide_stopped; } else if ((err & BAD_CRC) == BAD_CRC) { /* UDMA crc error, just retry the operation */ @@ -434,7 +434,7 @@ try_to_flush_leftover_data(drive); if (hwif->INB(IDE_STATUS_REG) & (BUSY_STAT|DRQ_STAT)) { /* force an abort */ - hwif->OUTB(WIN_IDLEIMMEDIATE,IDE_COMMAND_REG); + hwif->OUTB(ATA_CMD_IDLE_IMMEDIATE,IDE_COMMAND_REG); } if (rq->errors >= ERROR_MAX || blk_noretry_request(rq)) DRIVER(drive)->end_request(drive, 0, 0); @@ -482,7 +482,7 @@ /* Create IDE/ATA command request structure */ memset(&args, 0, sizeof(ide_task_t)); args.tfRegister[IDE_SELECT_OFFSET] = 0x40; - args.tfRegister[IDE_COMMAND_OFFSET] = WIN_READ_NATIVE_MAX; + args.tfRegister[IDE_COMMAND_OFFSET] = ATA_CMD_READ_NATIVE_MAX_ADDRESS; args.command_type = IDE_DRIVE_TASK_NO_DATA; args.handler = &task_no_data_intr; /* submit command request */ @@ -508,7 +508,7 @@ memset(&args, 0, sizeof(ide_task_t)); args.tfRegister[IDE_SELECT_OFFSET] = 0x40; - args.tfRegister[IDE_COMMAND_OFFSET] = WIN_READ_NATIVE_MAX_EXT; + args.tfRegister[IDE_COMMAND_OFFSET] = ATA_CMD_READ_NATIVE_MAX_ADDRESS_EXT; args.command_type = IDE_DRIVE_TASK_NO_DATA; args.handler = &task_no_data_intr; /* submit command request */ @@ -544,7 +544,7 @@ args.tfRegister[IDE_LCYL_OFFSET] = ((addr_req >> 8) & 0xff); args.tfRegister[IDE_HCYL_OFFSET] = ((addr_req >> 16) & 0xff); args.tfRegister[IDE_SELECT_OFFSET] = ((addr_req >> 24) & 0x0f) | 0x40; - args.tfRegister[IDE_COMMAND_OFFSET] = WIN_SET_MAX; + args.tfRegister[IDE_COMMAND_OFFSET] = ATA_CMD_SET_MAX_ADDRESS; args.command_type = IDE_DRIVE_TASK_NO_DATA; args.handler = &task_no_data_intr; /* submit command request */ @@ -572,7 +572,7 @@ args.tfRegister[IDE_LCYL_OFFSET] = ((addr_req >>= 8) & 0xff); args.tfRegister[IDE_HCYL_OFFSET] = ((addr_req >>= 8) & 0xff); args.tfRegister[IDE_SELECT_OFFSET] = 0x40; - args.tfRegister[IDE_COMMAND_OFFSET] = WIN_SET_MAX_EXT; + args.tfRegister[IDE_COMMAND_OFFSET] = ATA_CMD_SET_MAX_ADDRESS_EXT; args.hobRegister[IDE_SECTOR_OFFSET] = (addr_req >>= 8) & 0xff; args.hobRegister[IDE_LCYL_OFFSET] = (addr_req >>= 8) & 0xff; args.hobRegister[IDE_HCYL_OFFSET] = (addr_req >>= 8) & 0xff; @@ -716,7 +716,7 @@ args.tfRegister[IDE_LCYL_OFFSET] = drive->cyl; args.tfRegister[IDE_HCYL_OFFSET] = drive->cyl>>8; args.tfRegister[IDE_SELECT_OFFSET] = ((drive->head-1)|drive->select.all)&0xBF; - args.tfRegister[IDE_COMMAND_OFFSET] = WIN_SPECIFY; + args.tfRegister[IDE_COMMAND_OFFSET] = ATA_CMD_SPECIFY; args.command_type = IDE_DRIVE_TASK_NO_DATA; args.handler = &set_geometry_intr; do_rw_taskfile(drive, &args); @@ -727,7 +727,7 @@ ide_task_t args; memset(&args, 0, sizeof(ide_task_t)); args.tfRegister[IDE_NSECTOR_OFFSET] = drive->sect; - args.tfRegister[IDE_COMMAND_OFFSET] = WIN_RESTORE; + args.tfRegister[IDE_COMMAND_OFFSET] = ATA_CMD_RESTORE; args.command_type = IDE_DRIVE_TASK_NO_DATA; args.handler = &recal_intr; do_rw_taskfile(drive, &args); @@ -740,7 +740,7 @@ ide_task_t args; memset(&args, 0, sizeof(ide_task_t)); args.tfRegister[IDE_NSECTOR_OFFSET] = drive->mult_req; - args.tfRegister[IDE_COMMAND_OFFSET] = WIN_SETMULT; + args.tfRegister[IDE_COMMAND_OFFSET] = ATA_CMD_SET_MULTIPLE_MODE; args.command_type = IDE_DRIVE_TASK_NO_DATA; args.handler = &set_multmode_intr; do_rw_taskfile(drive, &args); @@ -779,7 +779,7 @@ args.tfRegister[IDE_FEATURE_OFFSET] = SMART_ENABLE; args.tfRegister[IDE_LCYL_OFFSET] = SMART_LCYL_PASS; args.tfRegister[IDE_HCYL_OFFSET] = SMART_HCYL_PASS; - args.tfRegister[IDE_COMMAND_OFFSET] = WIN_SMART; + args.tfRegister[IDE_COMMAND_OFFSET] = ATA_CMD_SMART; args.command_type = IDE_DRIVE_TASK_NO_DATA; args.handler = &task_no_data_intr; return ide_raw_taskfile(drive, &args, NULL); @@ -794,7 +794,7 @@ args.tfRegister[IDE_NSECTOR_OFFSET] = 0x01; args.tfRegister[IDE_LCYL_OFFSET] = SMART_LCYL_PASS; args.tfRegister[IDE_HCYL_OFFSET] = SMART_HCYL_PASS; - args.tfRegister[IDE_COMMAND_OFFSET] = WIN_SMART; + args.tfRegister[IDE_COMMAND_OFFSET] = ATA_CMD_SMART; args.command_type = IDE_DRIVE_TASK_IN; args.data_phase = TASKFILE_IN; args.handler = &task_in_intr; @@ -810,7 +810,7 @@ args.tfRegister[IDE_NSECTOR_OFFSET] = 0x01; args.tfRegister[IDE_LCYL_OFFSET] = SMART_LCYL_PASS; args.tfRegister[IDE_HCYL_OFFSET] = SMART_HCYL_PASS; - args.tfRegister[IDE_COMMAND_OFFSET] = WIN_SMART; + args.tfRegister[IDE_COMMAND_OFFSET] = ATA_CMD_SMART; args.command_type = IDE_DRIVE_TASK_IN; args.data_phase = TASKFILE_IN; args.handler = &task_in_intr; @@ -900,9 +900,9 @@ if (ide_id_has_flush_cache_ext(drive->id) && (drive->capacity64 >= (1UL << 28))) - rq->cmd[0] = WIN_FLUSH_CACHE_EXT; + rq->cmd[0] = ATA_CMD_FLUSH_EXT; else - rq->cmd[0] = WIN_FLUSH_CACHE; + rq->cmd[0] = ATA_CMD_FLUSH; rq->flags |= REQ_DRIVE_TASK | REQ_SOFTBARRIER; @@ -959,7 +959,7 @@ memset(&args, 0, sizeof(ide_task_t)); args.tfRegister[IDE_FEATURE_OFFSET] = (arg) ? SETFEATURES_EN_WCACHE : SETFEATURES_DIS_WCACHE; - args.tfRegister[IDE_COMMAND_OFFSET] = WIN_SETFEATURES; + args.tfRegister[IDE_COMMAND_OFFSET] = ATA_CMD_SET_FEATURES; args.command_type = IDE_DRIVE_TASK_NO_DATA; args.handler = &task_no_data_intr; @@ -977,9 +977,9 @@ memset(&args, 0, sizeof(ide_task_t)); if (ide_id_has_flush_cache_ext(drive->id)) - args.tfRegister[IDE_COMMAND_OFFSET] = WIN_FLUSH_CACHE_EXT; + args.tfRegister[IDE_COMMAND_OFFSET] = ATA_CMD_FLUSH_EXT; else - args.tfRegister[IDE_COMMAND_OFFSET] = WIN_FLUSH_CACHE; + args.tfRegister[IDE_COMMAND_OFFSET] = ATA_CMD_FLUSH; args.command_type = IDE_DRIVE_TASK_NO_DATA; args.handler = &task_no_data_intr; return ide_raw_taskfile(drive, &args, NULL); @@ -993,7 +993,7 @@ args.tfRegister[IDE_FEATURE_OFFSET] = (arg) ? SETFEATURES_EN_AAM : SETFEATURES_DIS_AAM; args.tfRegister[IDE_NSECTOR_OFFSET] = arg; - args.tfRegister[IDE_COMMAND_OFFSET] = WIN_SETFEATURES; + args.tfRegister[IDE_COMMAND_OFFSET] = ATA_CMD_SET_FEATURES; args.command_type = IDE_DRIVE_TASK_NO_DATA; args.handler = &task_no_data_intr; ide_raw_taskfile(drive, &args, NULL); @@ -1084,21 +1084,21 @@ return ide_stopped; } if (ide_id_has_flush_cache_ext(drive->id)) - args->tfRegister[IDE_COMMAND_OFFSET] = WIN_FLUSH_CACHE_EXT; + args->tfRegister[IDE_COMMAND_OFFSET] = ATA_CMD_FLUSH_EXT; else - args->tfRegister[IDE_COMMAND_OFFSET] = WIN_FLUSH_CACHE; + args->tfRegister[IDE_COMMAND_OFFSET] = ATA_CMD_FLUSH; args->command_type = IDE_DRIVE_TASK_NO_DATA; args->handler = &task_no_data_intr; return do_rw_taskfile(drive, args); case idedisk_pm_standby: /* Suspend step 2 (standby) */ - args->tfRegister[IDE_COMMAND_OFFSET] = WIN_STANDBYNOW1; + args->tfRegister[IDE_COMMAND_OFFSET] = ATA_CMD_STANDBY_IMMEDIATE; args->command_type = IDE_DRIVE_TASK_NO_DATA; args->handler = &task_no_data_intr; return do_rw_taskfile(drive, args); case idedisk_pm_idle: /* Resume step 1 (idle) */ - args->tfRegister[IDE_COMMAND_OFFSET] = WIN_IDLEIMMEDIATE; + args->tfRegister[IDE_COMMAND_OFFSET] = ATA_CMD_IDLE_IMMEDIATE; args->command_type = IDE_DRIVE_TASK_NO_DATA; args->handler = task_no_data_intr; return do_rw_taskfile(drive, args); @@ -1378,7 +1378,7 @@ if (drive->removable && drive->usage == 1) { ide_task_t args; memset(&args, 0, sizeof(ide_task_t)); - args.tfRegister[IDE_COMMAND_OFFSET] = WIN_DOORLOCK; + args.tfRegister[IDE_COMMAND_OFFSET] = ATA_CMD_MEDIA_LOCK; args.command_type = IDE_DRIVE_TASK_NO_DATA; args.handler = &task_no_data_intr; check_disk_change(inode->i_bdev); @@ -1401,7 +1401,7 @@ if (drive->removable && drive->usage == 1) { ide_task_t args; memset(&args, 0, sizeof(ide_task_t)); - args.tfRegister[IDE_COMMAND_OFFSET] = WIN_DOORUNLOCK; + args.tfRegister[IDE_COMMAND_OFFSET] = ATA_CMD_MEDIA_UNLOCK; args.command_type = IDE_DRIVE_TASK_NO_DATA; args.handler = &task_no_data_intr; if (drive->doorlocking && ide_raw_taskfile(drive, &args, NULL)) Index: cw-current/drivers/ide/ide-floppy.c =================================================================== --- cw-current.orig/drivers/ide/ide-floppy.c 2004-11-06 21:37:01.323677199 -0800 +++ cw-current/drivers/ide/ide-floppy.c 2004-11-06 21:54:32.907044141 -0800 @@ -1092,14 +1092,14 @@ if (test_bit (IDEFLOPPY_DRQ_INTERRUPT, &floppy->flags)) { /* Issue the packet command */ - ide_execute_command(drive, WIN_PACKETCMD, + ide_execute_command(drive, ATA_CMD_PACKET, pkt_xfer_routine, IDEFLOPPY_WAIT_CMD, NULL); return ide_started; } else { /* Issue the packet command */ - HWIF(drive)->OUTB(WIN_PACKETCMD, IDE_COMMAND_REG); + HWIF(drive)->OUTB(ATA_CMD_PACKET, IDE_COMMAND_REG); return (*pkt_xfer_routine) (drive); } } Index: cw-current/drivers/ide/ide-io.c =================================================================== --- cw-current.orig/drivers/ide/ide-io.c 2004-11-06 21:54:32.926044798 -0800 +++ cw-current/drivers/ide/ide-io.c 2004-11-06 21:54:32.927044833 -0800 @@ -66,11 +66,11 @@ rq->flags |= REQ_DRIVE_TASK | REQ_STARTED; rq->buffer = buf; - rq->buffer[0] = WIN_FLUSH_CACHE; + rq->buffer[0] = ATA_CMD_FLUSH; if (ide_id_has_flush_cache_ext(drive->id) && (drive->capacity64 >= (1UL << 28))) - rq->buffer[0] = WIN_FLUSH_CACHE_EXT; + rq->buffer[0] = ATA_CMD_FLUSH_EXT; } /* @@ -505,9 +505,9 @@ /* err has different meaning on cdrom and tape */ if (err == ABRT_ERR) { if (drive->select.b.lba && - (hwif->INB(IDE_COMMAND_REG) == WIN_SPECIFY)) + (hwif->INB(IDE_COMMAND_REG) == ATA_CMD_SPECIFY)) /* some newer drives don't - * support WIN_SPECIFY + * support ATA_CMD_SPECIFY */ return ide_stopped; } else if ((err & BAD_CRC) == BAD_CRC) { @@ -527,7 +527,7 @@ } if (hwif->INB(IDE_STATUS_REG) & (BUSY_STAT|DRQ_STAT)) { /* force an abort */ - hwif->OUTB(WIN_IDLEIMMEDIATE,IDE_COMMAND_REG); + hwif->OUTB(ATA_CMD_IDLE_IMMEDIATE,IDE_COMMAND_REG); } if (rq->errors >= ERROR_MAX) { DRIVER(drive)->end_request(drive, 0, 0); @@ -644,7 +644,7 @@ * do_special - issue some special commands * @drive: drive the command is for * - * do_special() is used to issue WIN_SPECIFY, WIN_RESTORE, and WIN_SETMULT + * do_special() is used to issue ATA_CMD_SPECIFY, ATA_CMD_RESTORE, and ATA_CMD_SET_MULTIPLE_MODE * commands to a drive. It used to do much more, but has been scaled * back. */ @@ -770,7 +770,7 @@ printk("fr=0x%02x ", args[2]); printk("xx=0x%02x\n", args[3]); #endif - if (args[0] == WIN_SMART) { + if (args[0] == ATA_CMD_SMART) { hwif->OUTB(0x4f, IDE_LCYL_REG); hwif->OUTB(0xc2, IDE_HCYL_REG); hwif->OUTB(args[2],IDE_FEATURE_REG); Index: cw-current/drivers/ide/ide-iops.c =================================================================== --- cw-current.orig/drivers/ide/ide-iops.c 2004-11-06 21:37:02.758726828 -0800 +++ cw-current/drivers/ide/ide-iops.c 2004-11-06 21:54:32.929044902 -0800 @@ -650,7 +650,7 @@ int ide_ata66_check (ide_drive_t *drive, ide_task_t *args) { - if ((args->tfRegister[IDE_COMMAND_OFFSET] == WIN_SETFEATURES) && + if ((args->tfRegister[IDE_COMMAND_OFFSET] == ATA_CMD_SET_FEATURES) && (args->tfRegister[IDE_SECTOR_OFFSET] > XFER_UDMA_2) && (args->tfRegister[IDE_FEATURE_OFFSET] == SETFEATURES_XFER)) { #ifndef CONFIG_IDEDMA_IVB @@ -680,7 +680,7 @@ */ int set_transfer (ide_drive_t *drive, ide_task_t *args) { - if ((args->tfRegister[IDE_COMMAND_OFFSET] == WIN_SETFEATURES) && + if ((args->tfRegister[IDE_COMMAND_OFFSET] == ATA_CMD_SET_FEATURES) && (args->tfRegister[IDE_SECTOR_OFFSET] >= XFER_SW_DMA_0) && (args->tfRegister[IDE_FEATURE_OFFSET] == SETFEATURES_XFER) && (drive->id->dma_ultra || @@ -752,7 +752,7 @@ if (IDE_CONTROL_REG) hwif->OUTB(drive->ctl,IDE_CONTROL_REG); msleep(50); - hwif->OUTB(WIN_IDENTIFY, IDE_COMMAND_REG); + hwif->OUTB(ATA_CMD_ID_ATA, IDE_COMMAND_REG); timeout = jiffies + WAIT_WORSTCASE; do { if (time_after(jiffies, timeout)) { @@ -842,7 +842,7 @@ hwif->OUTB(drive->ctl | 2, IDE_CONTROL_REG); hwif->OUTB(speed, IDE_NSECTOR_REG); hwif->OUTB(SETFEATURES_XFER, IDE_FEATURE_REG); - hwif->OUTB(WIN_SETFEATURES, IDE_COMMAND_REG); + hwif->OUTB(ATA_CMD_SET_FEATURES, IDE_COMMAND_REG); if ((IDE_CONTROL_REG) && (drive->quirk_list == 2)) hwif->OUTB(drive->ctl, IDE_CONTROL_REG); udelay(1); @@ -1168,7 +1168,7 @@ pre_reset(drive); SELECT_DRIVE(drive); udelay (20); - hwif->OUTB(WIN_SRST, IDE_COMMAND_REG); + hwif->OUTB(ATA_CMD_DEVICE_RESET, IDE_COMMAND_REG); hwgroup->poll_timeout = jiffies + WAIT_WORSTCASE; __ide_set_handler(drive, &atapi_reset_pollfunc, HZ/20, NULL); spin_unlock_irqrestore(&ide_lock, flags); Index: cw-current/drivers/ide/ide-probe.c =================================================================== --- cw-current.orig/drivers/ide/ide-probe.c 2004-11-06 21:37:03.390748685 -0800 +++ cw-current/drivers/ide/ide-probe.c 2004-11-06 21:54:32.930044937 -0800 @@ -151,10 +151,10 @@ #endif /* CONFIG_SCSI_EATA_DMA || CONFIG_SCSI_EATA_PIO */ /* - * WIN_IDENTIFY returns little-endian info, - * WIN_PIDENTIFY *usually* returns little-endian info. + * ATA_CMD_ID_ATA returns little-endian info, + * ATA_CMD_ID_ATAPI *usually* returns little-endian info. */ - if (cmd == WIN_PIDENTIFY) { + if (cmd == ATA_CMD_ID_ATAPI) { if ((id->model[0] == 'N' && id->model[1] == 'E') /* NEC */ || (id->model[0] == 'F' && id->model[1] == 'X') /* Mitsumi */ || (id->model[0] == 'P' && id->model[1] == 'i'))/* Pioneer */ @@ -177,7 +177,7 @@ /* * Check for an ATAPI device */ - if (cmd == WIN_PIDENTIFY) { + if (cmd == ATA_CMD_ID_ATAPI) { u8 type = (id->config >> 8) & 0x1f; printk("ATAPI "); switch (type) { @@ -287,14 +287,14 @@ /* set features register for atapi * identify command to be sure of reply */ - if ((cmd == WIN_PIDENTIFY)) + if ((cmd == ATA_CMD_ID_ATAPI)) /* disable dma & overlap */ hwif->OUTB(0, IDE_FEATURE_REG); /* ask drive for ID */ hwif->OUTB(cmd, IDE_COMMAND_REG); - timeout = ((cmd == WIN_IDENTIFY) ? WAIT_WORSTCASE : WAIT_PIDENTIFY) / 2; + timeout = ((cmd == ATA_CMD_ID_ATA) ? WAIT_WORSTCASE : WAIT_PIDENTIFY) / 2; timeout += jiffies; do { if (time_after(jiffies, timeout)) { @@ -414,13 +414,13 @@ if (drive->present) { /* avoid waiting for inappropriate probes */ - if ((drive->media != ide_disk) && (cmd == WIN_IDENTIFY)) + if ((drive->media != ide_disk) && (cmd == ATA_CMD_ID_ATA)) return 4; } #ifdef DEBUG printk("probing for %s: present=%d, media=%d, probetype=%s\n", drive->name, drive->present, drive->media, - (cmd == WIN_IDENTIFY) ? "ATA" : "ATAPI"); + (cmd == ATA_CMD_ID_ATA) ? "ATA" : "ATAPI"); #endif /* needed for some systems @@ -441,7 +441,7 @@ } if (OK_STAT((hwif->INB(IDE_STATUS_REG)), READY_STAT, BUSY_STAT) || - drive->present || cmd == WIN_PIDENTIFY) { + drive->present || cmd == ATA_CMD_ID_ATAPI) { /* send cmd and wait */ if ((rc = try_to_identify(drive, cmd))) { /* failed: try again */ @@ -450,7 +450,7 @@ if (hwif->INB(IDE_STATUS_REG) == (BUSY_STAT|READY_STAT)) return 4; - if ((rc == 1 && cmd == WIN_PIDENTIFY) && + if ((rc == 1 && cmd == ATA_CMD_ID_ATAPI) && ((drive->autotune == IDE_TUNE_DEFAULT) || (drive->autotune == IDE_TUNE_AUTO))) { unsigned long timeout; @@ -460,7 +460,7 @@ msleep(50); hwif->OUTB(drive->select.all, IDE_SELECT_REG); msleep(50); - hwif->OUTB(WIN_SRST, IDE_COMMAND_REG); + hwif->OUTB(ATA_CMD_DEVICE_RESET, IDE_COMMAND_REG); timeout = jiffies; while (((hwif->INB(IDE_STATUS_REG)) & BUSY_STAT) && time_before(jiffies, timeout + WAIT_WORSTCASE)) @@ -516,9 +516,9 @@ } /* if !(success||timed-out) */ - if (do_probe(drive, WIN_IDENTIFY) >= 2) { + if (do_probe(drive, ATA_CMD_ID_ATA) >= 2) { /* look for ATAPI device */ - (void) do_probe(drive, WIN_PIDENTIFY); + (void) do_probe(drive, ATA_CMD_ID_ATAPI); } } @@ -559,9 +559,9 @@ if (!drive->noprobe) { /* if !(success||timed-out) */ - if (do_probe(drive, WIN_IDENTIFY) >= 2) { + if (do_probe(drive, ATA_CMD_ID_ATA) >= 2) { /* look for ATAPI device */ - (void) do_probe(drive, WIN_PIDENTIFY); + (void) do_probe(drive, ATA_CMD_ID_ATAPI); } if (strstr(drive->id->model, "E X A B Y T E N E S T")) enable_nest(drive); Index: cw-current/drivers/ide/ide-tape.c =================================================================== --- cw-current.orig/drivers/ide/ide-tape.c 2004-11-06 21:37:03.953768156 -0800 +++ cw-current/drivers/ide/ide-tape.c 2004-11-06 21:54:32.933045040 -0800 @@ -2148,10 +2148,10 @@ set_bit(PC_DMA_IN_PROGRESS, &pc->flags); if (test_bit(IDETAPE_DRQ_INTERRUPT, &tape->flags)) { ide_set_handler(drive, &idetape_transfer_pc, IDETAPE_WAIT_CMD, NULL); - hwif->OUTB(WIN_PACKETCMD, IDE_COMMAND_REG); + hwif->OUTB(ATA_CMD_PACKET, IDE_COMMAND_REG); return ide_started; } else { - hwif->OUTB(WIN_PACKETCMD, IDE_COMMAND_REG); + hwif->OUTB(ATA_CMD_PACKET, IDE_COMMAND_REG); return idetape_transfer_pc(drive); } } Index: cw-current/drivers/ide/ide-taskfile.c =================================================================== --- cw-current.orig/drivers/ide/ide-taskfile.c 2004-11-06 21:54:32.955045801 -0800 +++ cw-current/drivers/ide/ide-taskfile.c 2004-11-06 21:56:17.327655323 -0800 @@ -87,9 +87,9 @@ memset(&args, 0, sizeof(ide_task_t)); args.tfRegister[IDE_NSECTOR_OFFSET] = 0x01; if (drive->media == ide_disk) - args.tfRegister[IDE_COMMAND_OFFSET] = WIN_IDENTIFY; + args.tfRegister[IDE_COMMAND_OFFSET] = ATA_CMD_ID_ATA; else - args.tfRegister[IDE_COMMAND_OFFSET] = WIN_PIDENTIFY; + args.tfRegister[IDE_COMMAND_OFFSET] = ATA_CMD_ID_ATAPI; args.command_type = IDE_DRIVE_TASK_IN; args.data_phase = TASKFILE_IN; args.handler = &task_in_intr; @@ -140,13 +140,10 @@ return ide_stopped; switch (taskfile->command) { - case WIN_WRITEDMA_ONCE: - case WIN_WRITEDMA: - case WIN_WRITEDMA_EXT: - case WIN_READDMA_ONCE: - case WIN_READDMA: - case WIN_READDMA_EXT: - case WIN_IDENTIFY_DMA: + case ATA_CMD_WRITE: + case ATA_CMD_WRITE_EXT: + case ATA_CMD_READ: + case ATA_CMD_READ_EXT: if (!hwif->dma_setup(drive)) { hwif->dma_exec_cmd(drive, taskfile->command); hwif->dma_start(drive); @@ -164,7 +161,7 @@ EXPORT_SYMBOL(do_rw_taskfile); /* - * set_multmode_intr() is invoked on completion of a WIN_SETMULT cmd. + * set_multmode_intr() is invoked on completion of a ATA_CMD_SET_MULTIPLE_MODE cmd. */ ide_startstop_t set_multmode_intr (ide_drive_t *drive) { @@ -184,7 +181,7 @@ EXPORT_SYMBOL(set_multmode_intr); /* - * set_geometry_intr() is invoked on completion of a WIN_SPECIFY cmd. + * set_geometry_intr() is invoked on completion of a ATA_CMD_SPECIFY cmd. */ ide_startstop_t set_geometry_intr (ide_drive_t *drive) { @@ -210,7 +207,7 @@ EXPORT_SYMBOL(set_geometry_intr); /* - * recal_intr() is invoked on completion of a WIN_RESTORE (recalibrate) cmd. + * recal_intr() is invoked on completion of a ATA_CMD_RESTORE (recalibrate) cmd. */ ide_startstop_t recal_intr (ide_drive_t *drive) { Index: cw-current/drivers/ide/ide.c =================================================================== --- cw-current.orig/drivers/ide/ide.c 2004-11-06 21:37:05.509821969 -0800 +++ cw-current/drivers/ide/ide.c 2004-11-06 21:54:32.958045905 -0800 @@ -1390,7 +1390,7 @@ static int set_xfer_rate (ide_drive_t *drive, int arg) { int err = ide_wait_cmd(drive, - WIN_SETFEATURES, (u8) arg, + ATA_CMD_SET_FEATURES, (u8) arg, SETFEATURES_XFER, 0, NULL); if (!err && arg) { Index: cw-current/drivers/ide/legacy/hd.c =================================================================== --- cw-current.orig/drivers/ide/legacy/hd.c 2004-11-06 21:37:06.345850881 -0800 +++ cw-current/drivers/ide/legacy/hd.c 2004-11-06 21:54:32.960045974 -0800 @@ -370,7 +370,7 @@ struct hd_i_struct *disk = &hd_info[i]; disk->special_op = disk->recalibrate = 1; hd_out(disk,disk->sect,disk->sect,disk->head-1, - disk->cyl,WIN_SPECIFY,&reset_hd); + disk->cyl,ATA_CMD_SPECIFY,&reset_hd); if (reset) goto repeat; } else @@ -555,7 +555,7 @@ { if (disk->recalibrate) { disk->recalibrate = 0; - hd_out(disk,disk->sect,0,0,0,WIN_RESTORE,&recal_intr); + hd_out(disk,disk->sect,0,0,0,ATA_CMD_RESTORE,&recal_intr); return reset; } if (disk->head > 16) { @@ -627,12 +627,12 @@ if (req->flags & REQ_CMD) { switch (rq_data_dir(req)) { case READ: - hd_out(disk,nsect,sec,head,cyl,WIN_READ,&read_intr); + hd_out(disk,nsect,sec,head,cyl,ATA_CMD_PIO_READ,&read_intr); if (reset) goto repeat; break; case WRITE: - hd_out(disk,nsect,sec,head,cyl,WIN_WRITE,&write_intr); + hd_out(disk,nsect,sec,head,cyl,ATA_CMD_PIO_WRITE,&write_intr); if (reset) goto repeat; if (wait_DRQ()) { Index: cw-current/drivers/ide/ppc/pmac.c =================================================================== --- cw-current.orig/drivers/ide/ppc/pmac.c 2004-11-06 21:37:07.164879206 -0800 +++ cw-current/drivers/ide/ppc/pmac.c 2004-11-06 21:54:32.961046009 -0800 @@ -594,7 +594,7 @@ hwif->OUTB(drive->ctl | 2, IDE_CONTROL_REG); hwif->OUTB(command, IDE_NSECTOR_REG); hwif->OUTB(SETFEATURES_XFER, IDE_FEATURE_REG); - hwif->OUTBSYNC(drive, WIN_SETFEATURES, IDE_COMMAND_REG); + hwif->OUTBSYNC(drive, ATA_CMD_SET_FEATURES, IDE_COMMAND_REG); udelay(1); /* Timeout bumped for some powerbooks */ result = wait_for_ready(drive, 2000); Index: cw-current/drivers/scsi/ide-scsi.c =================================================================== --- cw-current.orig/drivers/scsi/ide-scsi.c 2004-11-06 21:54:32.980046666 -0800 +++ cw-current/drivers/scsi/ide-scsi.c 2004-11-06 21:54:32.981046700 -0800 @@ -320,7 +320,7 @@ if (HWIF(drive)->INB(IDE_STATUS_REG) & (BUSY_STAT|DRQ_STAT)) /* force an abort */ - HWIF(drive)->OUTB(WIN_IDLEIMMEDIATE,IDE_COMMAND_REG); + HWIF(drive)->OUTB(ATA_CMD_IDLE_IMMEDIATE,IDE_COMMAND_REG); rq->errors++; DRIVER(drive)->end_request(drive, 0, 0); @@ -657,11 +657,11 @@ ide_set_handler(drive, &idescsi_transfer_pc, get_timeout(pc), idescsi_expiry); /* Issue the packet command */ - HWIF(drive)->OUTB(WIN_PACKETCMD, IDE_COMMAND_REG); + HWIF(drive)->OUTB(ATA_CMD_PACKET, IDE_COMMAND_REG); return ide_started; } else { /* Issue the packet command */ - HWIF(drive)->OUTB(WIN_PACKETCMD, IDE_COMMAND_REG); + HWIF(drive)->OUTB(ATA_CMD_PACKET, IDE_COMMAND_REG); return idescsi_transfer_pc(drive); } } Index: cw-current/drivers/usb/storage/isd200.c =================================================================== --- cw-current.orig/drivers/usb/storage/isd200.c 2004-11-06 21:37:08.556927347 -0800 +++ cw-current/drivers/usb/storage/isd200.c 2004-11-06 21:54:32.983046770 -0800 @@ -470,14 +470,14 @@ ata.generic.ActionSelect = ACTION_SELECT_1|ACTION_SELECT_5; ata.generic.RegisterSelect = REG_DEVICE_HEAD | REG_COMMAND; ata.write.DeviceHeadByte = info->DeviceHead; - ata.write.CommandByte = WIN_SRST; + ata.write.CommandByte = ATA_CMD_DEVICE_RESET; srb->sc_data_direction = DMA_NONE; break; case ACTION_IDENTIFY: US_DEBUGP(" isd200_action(IDENTIFY)\n"); ata.generic.RegisterSelect = REG_COMMAND; - ata.write.CommandByte = WIN_IDENTIFY; + ata.write.CommandByte = ATA_CMD_ID_ATA; srb->sc_data_direction = DMA_FROM_DEVICE; srb->request_buffer = (void *) info->id; srb->request_bufflen = sizeof(struct hd_driveid); @@ -1242,7 +1242,7 @@ ataCdb->write.CylinderHighByte = (unsigned char)(cylinder>>8); ataCdb->write.CylinderLowByte = (unsigned char)cylinder; ataCdb->write.DeviceHeadByte = (head | ATA_ADDRESS_DEVHEAD_STD); - ataCdb->write.CommandByte = WIN_READ; + ataCdb->write.CommandByte = ATA_CMD_PIO_READ; break; case WRITE_10: @@ -1272,7 +1272,7 @@ ataCdb->write.CylinderHighByte = (unsigned char)(cylinder>>8); ataCdb->write.CylinderLowByte = (unsigned char)cylinder; ataCdb->write.DeviceHeadByte = (head | ATA_ADDRESS_DEVHEAD_STD); - ataCdb->write.CommandByte = WIN_WRITE; + ataCdb->write.CommandByte = ATA_CMD_PIO_WRITE; break; case ALLOW_MEDIUM_REMOVAL: @@ -1286,7 +1286,7 @@ ataCdb->generic.TransferBlockSize = 1; ataCdb->generic.RegisterSelect = REG_COMMAND; ataCdb->write.CommandByte = (srb->cmnd[4] & 0x1) ? - WIN_DOORLOCK : WIN_DOORUNLOCK; + ATA_CMD_MEDIA_LOCK : ATA_CMD_MEDIA_UNLOCK; srb->request_bufflen = 0; } else { US_DEBUGP(" Not removeable media, just report okay\n"); - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/