From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47148) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XkIRn-0007m8-4r for qemu-devel@nongnu.org; Fri, 31 Oct 2014 16:05:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XkIRe-0003dj-CB for qemu-devel@nongnu.org; Fri, 31 Oct 2014 16:05:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53535) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XkIRe-0003dK-4g for qemu-devel@nongnu.org; Fri, 31 Oct 2014 16:05:14 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s9VK5ClK011681 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Fri, 31 Oct 2014 16:05:12 -0400 From: John Snow Date: Fri, 31 Oct 2014 16:03:36 -0400 Message-Id: <1414785819-26209-1-git-send-email-jsnow@redhat.com> Subject: [Qemu-devel] [block PATCH v2 0/3] AHCI device fixes List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: pbonzini@redhat.com, John Snow , armbru@redhat.com, stefanha@redhat.com This is a v2 patch series that collects patches 3, 4 and 5 from the v1 series that was only partially merged. This series, as a subset, generally cleans up the usage and handling of the scatter-gather list implementation in QEMU that interacts with the PRDT (Physical Region Descriptor Table) in AHCI. We also repair a small oversight with PIO transfers. This series currently applies cleanly to stefanha's block staging tree, but can be trivially merged to master. v2: - Reset io_buffer_offset to 0 at the beginning of ide_exec_cmd, which will reset it for PIO I/O and all ATAPI commands. There was an oversight in V1 where we would use junk values for PACKET IDENTIFY if it was not the first command. - Adjust the prepare_buf() callback to return, simply, the number of bytes it was able to prepare, or -1 on error. This resolves an ambiguity around the nature of its return code meaning "no sectors" or "no bytes" which led to bad error pathways. John Snow (3): ide: repair PIO transfers for cases where nsector > 1 ahci: unify sglist preparation ide: Correct handling of malformed/short PRDTs hw/ide/ahci.c | 33 ++++++++++++++++++++++++++------- hw/ide/core.c | 14 ++++++++++++-- hw/ide/internal.h | 13 +++++++------ hw/ide/macio.c | 7 ++++++- hw/ide/pci.c | 27 +++++++++++++++++++++------ 5 files changed, 72 insertions(+), 22 deletions(-) -- 1.9.3