svn commit: r249609 - stable/9/sys/cam/ata

Alexander Motin mav at FreeBSD.org
Thu Apr 18 09:03:07 UTC 2013


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


More information about the svn-src-stable-9 mailing list