From owner-svn-src-stable-9@FreeBSD.ORG Thu Apr 18 09:03:07 2013 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 634451AF; Thu, 18 Apr 2013 09:03:07 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 55669688; Thu, 18 Apr 2013 09:03:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3I937xm081223; Thu, 18 Apr 2013 09:03:07 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3I937kn081222; Thu, 18 Apr 2013 09:03:07 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201304180903.r3I937kn081222@svn.freebsd.org> From: Alexander Motin Date: Thu, 18 Apr 2013 09:03:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r249609 - stable/9/sys/cam/ata X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Apr 2013 09:03:07 -0000 Author: mav Date: Thu Apr 18 09:03:06 2013 New Revision: 249609 URL: http://svnweb.freebsd.org/changeset/base/249609 Log: MFC r248695: Remove two bzero()s that are erasing only few more bytes then set later. Modified: stable/9/sys/cam/ata/ata_all.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cam/ata/ata_all.c ============================================================================== --- stable/9/sys/cam/ata/ata_all.c Thu Apr 18 07:09:27 2013 (r249608) +++ stable/9/sys/cam/ata/ata_all.c Thu Apr 18 09:03:06 2013 (r249609) @@ -367,7 +367,7 @@ void ata_48bit_cmd(struct ccb_ataio *ataio, uint8_t cmd, uint16_t features, uint64_t lba, uint16_t sector_count) { - bzero(&ataio->cmd, sizeof(ataio->cmd)); + ataio->cmd.flags = CAM_ATAIO_48BIT; if (cmd == ATA_READ_DMA48 || cmd == ATA_READ_DMA_QUEUED48 || @@ -391,13 +391,14 @@ ata_48bit_cmd(struct ccb_ataio *ataio, u ataio->cmd.features_exp = features >> 8; ataio->cmd.sector_count = sector_count; ataio->cmd.sector_count_exp = sector_count >> 8; + ataio->cmd.control = 0; } void ata_ncq_cmd(struct ccb_ataio *ataio, uint8_t cmd, uint64_t lba, uint16_t sector_count) { - bzero(&ataio->cmd, sizeof(ataio->cmd)); + ataio->cmd.flags = CAM_ATAIO_48BIT | CAM_ATAIO_FPDMA; ataio->cmd.command = cmd; ataio->cmd.features = sector_count; @@ -409,6 +410,9 @@ ata_ncq_cmd(struct ccb_ataio *ataio, uin ataio->cmd.lba_mid_exp = lba >> 32; ataio->cmd.lba_high_exp = lba >> 40; ataio->cmd.features_exp = sector_count >> 8; + ataio->cmd.sector_count = 0; + ataio->cmd.sector_count_exp = 0; + ataio->cmd.control = 0; } void