[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] qtest/ide-test: ppc64be correction for ATAPI te
From: |
John Snow |
Subject: |
Re: [Qemu-devel] [PATCH] qtest/ide-test: ppc64be correction for ATAPI tests |
Date: |
Thu, 1 Oct 2015 12:42:36 -0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 |
On 09/28/2015 01:38 PM, John Snow wrote:
> the 16bit ide data register is LE by definition.
>
> Signed-off-by: John Snow <address@hidden>
> ---
> tests/ide-test.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tests/ide-test.c b/tests/ide-test.c
> index 5594738..b6e9e1a 100644
> --- a/tests/ide-test.c
> +++ b/tests/ide-test.c
> @@ -633,7 +633,7 @@ static void send_scsi_cdb_read10(uint64_t lba, int
> nblocks)
>
> /* Send Packet */
> for (i = 0; i < sizeof(Read10CDB)/2; i++) {
> - outw(IDE_BASE + reg_data, ((uint16_t *)&pkt)[i]);
> + outw(IDE_BASE + reg_data, cpu_to_le16(((uint16_t *)&pkt)[i]));
> }
> }
>
> @@ -733,7 +733,7 @@ static void cdrom_pio_impl(int nblocks)
> size_t offset = i * (limit / 2);
> size_t rem = (rxsize / 2) - offset;
> for (j = 0; j < MIN((limit / 2), rem); j++) {
> - rx[offset + j] = inw(IDE_BASE + reg_data);
> + rx[offset + j] = le16_to_cpu(inw(IDE_BASE + reg_data));
> }
> ide_wait_intr(IDE_PRIMARY_IRQ);
> }
>
Tentatively staged. Barring objections, I will send a pull request for
this tomorrow, thanks.
https://github.com/jnsnow/qemu/commits/ide
https://github.com/jnsnow/qemu.git
--js
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [Qemu-devel] [PATCH] qtest/ide-test: ppc64be correction for ATAPI tests,
John Snow <=