Mark Lord wrote: > Jens Axboe wrote: > >> On Wed, Mar 15 2006, Mark Lord wrote: > > .. > >>> ATA cmd=0x35 is ATA_CMD_WRITE_EXT, and 0x25 (lower down in the logs) >>> is ATA_CMD_READ_EXT. >>> >>> Those are the bog-standard (and slow!) PIO R/W commands, >>> which generate one interrupt per 512-bytes transferred. >> >> >> Eh no they are not, 0x35 is WRITEDMA_EXT and 0x25 is READMA_EXT. > > > We're both correct, in that 0x35 is ATA_CMD_WRITE_EXT as I said. > But the naming had me fooled -- they really are DMA commands, > even if the linux/ata.h names are incomplete. > How about the attached renaming patch? It could make the command names more consistent to what's in the ATA/ATAPI spec. --- Albert Changes: ATA_CMD_READ => ATA_CMD_READ_DMA ATA_CMD_WRITE => ATA_CMD_WRITE_DMA ... ATA_CMD_PIO_READ => ATA_CMD_READ_PIO ATA_CMD_PIO_WRITE => ATA_CMD_WRITE_PIO ... ATA_CMD_FPDMA_READ => ATA_CMD_READ_FPDMA_QUEUED ATA_CMD_FPDMA_WRITE => ATA_CMD_WRITE_FPDMA_QUEUED --- upstream/include/linux/ata.h 2006-03-16 17:23:56.000000000 +0800 +++ rename/include/linux/ata.h 2006-03-17 17:08:53.000000000 +0800 @@ -125,15 +125,17 @@ enum { ATA_CMD_FLUSH_EXT = 0xEA, ATA_CMD_ID_ATA = 0xEC, ATA_CMD_ID_ATAPI = 0xA1, - ATA_CMD_READ = 0xC8, - ATA_CMD_READ_EXT = 0x25, - ATA_CMD_WRITE = 0xCA, - ATA_CMD_WRITE_EXT = 0x35, - ATA_CMD_WRITE_FUA_EXT = 0x3D, - ATA_CMD_PIO_READ = 0x20, - ATA_CMD_PIO_READ_EXT = 0x24, - ATA_CMD_PIO_WRITE = 0x30, - ATA_CMD_PIO_WRITE_EXT = 0x34, + ATA_CMD_READ_DMA = 0xC8, + ATA_CMD_READ_DMA_EXT = 0x25, + ATA_CMD_WRITE_DMA = 0xCA, + ATA_CMD_WRITE_DMA_EXT = 0x35, + ATA_CMD_WRITE_DMA_FUA_EXT = 0x3D, + ATA_CMD_READ_FPDMA_QUEUED = 0x60, + ATA_CMD_WRITE_FPDMA_QUEUED = 0x61, + ATA_CMD_READ_PIO = 0x20, + ATA_CMD_READ_PIO_EXT = 0x24, + ATA_CMD_WRITE_PIO = 0x30, + ATA_CMD_WRITE_PIO_EXT = 0x34, ATA_CMD_READ_MULTI = 0xC4, ATA_CMD_READ_MULTI_EXT = 0x29, ATA_CMD_WRITE_MULTI = 0xC5, --- upstream/drivers/scsi/libata-core.c 2006-03-16 17:23:51.000000000 +0800 +++ rename/drivers/scsi/libata-core.c 2006-03-17 13:54:58.000000000 +0800 @@ -167,23 +167,23 @@ static const u8 ata_rw_cmds[] = { 0, ATA_CMD_WRITE_MULTI_FUA_EXT, /* pio */ - ATA_CMD_PIO_READ, - ATA_CMD_PIO_WRITE, - ATA_CMD_PIO_READ_EXT, - ATA_CMD_PIO_WRITE_EXT, + ATA_CMD_READ_PIO, + ATA_CMD_WRITE_PIO, + ATA_CMD_READ_PIO_EXT, + ATA_CMD_WRITE_PIO_EXT, 0, 0, 0, 0, /* dma */ - ATA_CMD_READ, - ATA_CMD_WRITE, - ATA_CMD_READ_EXT, - ATA_CMD_WRITE_EXT, + ATA_CMD_READ_DMA, + ATA_CMD_WRITE_DMA, + ATA_CMD_READ_DMA_EXT, + ATA_CMD_WRITE_DMA_EXT, 0, 0, 0, - ATA_CMD_WRITE_FUA_EXT + ATA_CMD_WRITE_DMA_FUA_EXT }; /** --- upstream/drivers/scsi/sata_mv.c 2006-03-16 17:23:51.000000000 +0800 +++ rename/drivers/scsi/sata_mv.c 2006-03-17 17:09:31.000000000 +0800 @@ -1087,16 +1087,16 @@ static void mv_qc_prep(struct ata_queued * NCQ. NCQ will drop hob_nsect. */ switch (tf->command) { - case ATA_CMD_READ: - case ATA_CMD_READ_EXT: - case ATA_CMD_WRITE: - case ATA_CMD_WRITE_EXT: - case ATA_CMD_WRITE_FUA_EXT: + case ATA_CMD_READ_DMA: + case ATA_CMD_READ_DMA_EXT: + case ATA_CMD_WRITE_DMA: + case ATA_CMD_WRITE_DMA_EXT: + case ATA_CMD_WRITE_DMA_FUA_EXT: mv_crqb_pack_cmd(cw++, tf->hob_nsect, ATA_REG_NSECT, 0); break; #ifdef LIBATA_NCQ /* FIXME: remove this line when NCQ added */ - case ATA_CMD_FPDMA_READ: - case ATA_CMD_FPDMA_WRITE: + case ATA_CMD_READ_FPDMA_QUEUED: + case ATA_CMD_WRITE_FPDMA_QUEUED: mv_crqb_pack_cmd(cw++, tf->hob_feature, ATA_REG_FEATURE, 0); mv_crqb_pack_cmd(cw++, tf->feature, ATA_REG_FEATURE, 0); break; - : send the line "unsubscribe linux-ide" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html