Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Apr 2013 09:03:07 +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: r249609 - stable/9/sys/cam/ata
Message-ID:  <201304180903.r3I937kn081222@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201304180903.r3I937kn081222>