aboutsummaryrefslogtreecommitdiff
path: root/hw/ide
diff options
context:
space:
mode:
authorJohn Snow <jsnow@redhat.com>2015-07-04 02:06:03 -0400
committerJohn Snow <jsnow@redhat.com>2015-07-04 02:06:03 -0400
commit0437d32ae232af37d3b94064a563eb51d4eedd62 (patch)
treea13b51475c214e08e92e4141ccac7a49bb448035 /hw/ide
parent5d5f89212f19e3d7d3da1328137ca9e33eead7bf (diff)
downloadqemu-0437d32ae232af37d3b94064a563eb51d4eedd62.zip
qemu-0437d32ae232af37d3b94064a563eb51d4eedd62.tar.gz
qemu-0437d32ae232af37d3b94064a563eb51d4eedd62.tar.bz2
ahci: ncq sector count correction
This value should not be size-corrected, 0 sectors does not imply 1 sector(s). This is just debug information, but it's misleading! Signed-off-by: John Snow <jsnow@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Message-id: 1435016308-6150-8-git-send-email-jsnow@redhat.com
Diffstat (limited to 'hw/ide')
-rw-r--r--hw/ide/ahci.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c
index b78017a..b73a2e4 100644
--- a/hw/ide/ahci.c
+++ b/hw/ide/ahci.c
@@ -1043,14 +1043,14 @@ static void process_ncq_command(AHCIState *s, int port, uint8_t *cmd_fis,
DPRINTF(port, "NCQ transfer LBA from %"PRId64" to %"PRId64", "
"drive max %"PRId64"\n",
- ncq_tfs->lba, ncq_tfs->lba + ncq_tfs->sector_count - 2,
+ ncq_tfs->lba, ncq_tfs->lba + ncq_tfs->sector_count - 1,
ide_state->nb_sectors - 1);
switch(ncq_fis->command) {
case READ_FPDMA_QUEUED:
DPRINTF(port, "NCQ reading %d sectors from LBA %"PRId64", "
"tag %d\n",
- ncq_tfs->sector_count-1, ncq_tfs->lba, ncq_tfs->tag);
+ ncq_tfs->sector_count, ncq_tfs->lba, ncq_tfs->tag);
DPRINTF(port, "tag %d aio read %"PRId64"\n",
ncq_tfs->tag, ncq_tfs->lba);
@@ -1063,7 +1063,7 @@ static void process_ncq_command(AHCIState *s, int port, uint8_t *cmd_fis,
break;
case WRITE_FPDMA_QUEUED:
DPRINTF(port, "NCQ writing %d sectors to LBA %"PRId64", tag %d\n",
- ncq_tfs->sector_count-1, ncq_tfs->lba, ncq_tfs->tag);
+ ncq_tfs->sector_count, ncq_tfs->lba, ncq_tfs->tag);
DPRINTF(port, "tag %d aio write %"PRId64"\n",
ncq_tfs->tag, ncq_tfs->lba);