From owner-svn-src-head@FreeBSD.ORG Tue Dec 1 23:01:30 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 01BCD1065670; Tue, 1 Dec 2009 23:01:30 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E53588FC08; Tue, 1 Dec 2009 23:01:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nB1N1TP3079291; Tue, 1 Dec 2009 23:01:29 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nB1N1TgN079287; Tue, 1 Dec 2009 23:01:29 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200912012301.nB1N1TgN079287@svn.freebsd.org> From: Alexander Motin Date: Tue, 1 Dec 2009 23:01:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r200008 - in head/sys: cam/ata sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2009 23:01:30 -0000 Author: mav Date: Tue Dec 1 23:01:29 2009 New Revision: 200008 URL: http://svn.freebsd.org/changeset/base/200008 Log: Add CAM_ATAIO_DMA ATA command flag to mark DMA protocol commands. It is not needed for SATA controllers, but required for PATA. Modified: head/sys/cam/ata/ata_all.c head/sys/cam/ata/ata_all.h head/sys/sys/ata.h Modified: head/sys/cam/ata/ata_all.c ============================================================================== --- head/sys/cam/ata/ata_all.c Tue Dec 1 22:59:37 2009 (r200007) +++ head/sys/cam/ata/ata_all.c Tue Dec 1 23:01:29 2009 (r200008) @@ -93,8 +93,8 @@ ata_op_string(struct ata_cmd *cmd) case 0x39: return ("WRITE_MUL48"); case 0x3a: return ("WRITE_STREAM_DMA48"); case 0x3b: return ("WRITE_STREAM48"); - case 0x3d: return ("WRITE_DMA_FUA"); - case 0x3e: return ("WRITE_DMA_FUA48"); + case 0x3d: return ("WRITE_DMA_FUA48"); + case 0x3e: return ("WRITE_DMA_QUEUED_FUA48"); case 0x3f: return ("WRITE_LOG_EXT"); case 0x40: return ("READ_VERIFY"); case 0x42: return ("READ_VERIFY48"); @@ -119,7 +119,7 @@ ata_op_string(struct ata_cmd *cmd) case 0xca: return ("WRITE_DMA"); case 0xcc: return ("WRITE_DMA_QUEUED"); case 0xcd: return ("CFA_WRITE_MULTIPLE_WITHOUT_ERASE"); - case 0xce: return ("WRITE_MULTIPLE_FUA48"); + case 0xce: return ("WRITE_MUL_FUA48"); case 0xd1: return ("CHECK_MEDIA_CARD_TYPE"); case 0xda: return ("GET_MEDIA_STATUS"); case 0xde: return ("MEDIA_LOCK"); @@ -309,6 +309,11 @@ ata_28bit_cmd(struct ccb_ataio *ataio, u { bzero(&ataio->cmd, sizeof(ataio->cmd)); ataio->cmd.flags = 0; + if (cmd == ATA_READ_DMA || + cmd == ATA_READ_DMA_QUEUED || + cmd == ATA_WRITE_DMA || + cmd == ATA_WRITE_DMA_QUEUED) + ataio->cmd.flags |= CAM_ATAIO_DMA; ataio->cmd.command = cmd; ataio->cmd.features = features; ataio->cmd.lba_low = lba; @@ -324,6 +329,15 @@ ata_48bit_cmd(struct ccb_ataio *ataio, u { bzero(&ataio->cmd, sizeof(ataio->cmd)); ataio->cmd.flags = CAM_ATAIO_48BIT; + if (cmd == ATA_READ_DMA48 || + cmd == ATA_READ_DMA_QUEUED48 || + cmd == ATA_READ_STREAM_DMA48 || + cmd == ATA_WRITE_DMA48 || + cmd == ATA_WRITE_DMA_FUA48 || + cmd == ATA_WRITE_DMA_QUEUED48 || + cmd == ATA_WRITE_DMA_QUEUED_FUA48 || + cmd == ATA_WRITE_STREAM_DMA48) + ataio->cmd.flags |= CAM_ATAIO_DMA; ataio->cmd.command = cmd; ataio->cmd.features = features; ataio->cmd.lba_low = lba; Modified: head/sys/cam/ata/ata_all.h ============================================================================== --- head/sys/cam/ata/ata_all.h Tue Dec 1 22:59:37 2009 (r200007) +++ head/sys/cam/ata/ata_all.h Tue Dec 1 23:01:29 2009 (r200008) @@ -41,6 +41,7 @@ struct ata_cmd { #define CAM_ATAIO_FPDMA 0x02 /* FPDMA command */ #define CAM_ATAIO_CONTROL 0x04 /* Control, not a command */ #define CAM_ATAIO_NEEDRESULT 0x08 /* Request requires result. */ +#define CAM_ATAIO_DMA 0x10 /* DMA command */ u_int8_t command; u_int8_t features; Modified: head/sys/sys/ata.h ============================================================================== --- head/sys/sys/ata.h Tue Dec 1 22:59:37 2009 (r200007) +++ head/sys/sys/ata.h Tue Dec 1 23:01:29 2009 (r200008) @@ -291,12 +291,21 @@ struct ata_params { #define ATA_READ_DMA_QUEUED48 0x26 /* read DMA QUEUED 48bit LBA */ #define ATA_READ_NATIVE_MAX_ADDRESS48 0x27 /* read native max addr 48bit */ #define ATA_READ_MUL48 0x29 /* read multi 48bit LBA */ +#define ATA_READ_STREAM_DMA48 0x2a /* read DMA stream 48bit LBA */ +#define ATA_READ_STREAM48 0x2b /* read stream 48bit LBA */ #define ATA_WRITE 0x30 /* write */ #define ATA_WRITE48 0x34 /* write 48bit LBA */ #define ATA_WRITE_DMA48 0x35 /* write DMA 48bit LBA */ #define ATA_WRITE_DMA_QUEUED48 0x36 /* write DMA QUEUED 48bit LBA*/ #define ATA_SET_MAX_ADDRESS48 0x37 /* set max address 48bit */ #define ATA_WRITE_MUL48 0x39 /* write multi 48bit LBA */ +#define ATA_WRITE_STREAM_DMA48 0x3a +#define ATA_WRITE_STREAM48 0x3b +#define ATA_WRITE_DMA_FUA48 0x3d +#define ATA_WRITE_DMA_QUEUED_FUA48 0x3e +#define ATA_WRITE_LOG_EXT 0x3f +#define ATA_READ_VERIFY 0x40 +#define ATA_READ_VERIFY48 0x42 #define ATA_READ_FPDMA_QUEUED 0x60 /* read DMA NCQ */ #define ATA_WRITE_FPDMA_QUEUED 0x61 /* write DMA NCQ */ #define ATA_SEEK 0x70 /* seek */ @@ -312,6 +321,7 @@ struct ata_params { #define ATA_READ_DMA 0xc8 /* read DMA */ #define ATA_WRITE_DMA 0xca /* write DMA */ #define ATA_WRITE_DMA_QUEUED 0xcc /* write DMA QUEUED */ +#define ATA_WRITE_MUL_FUA48 0xce #define ATA_STANDBY_IMMEDIATE 0xe0 /* standby immediate */ #define ATA_IDLE_IMMEDIATE 0xe1 /* idle immediate */ #define ATA_STANDBY_CMD 0xe2 /* standby */