mirror of https://gitee.com/openkylin/qemu.git
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1 iQIcBAABAgAGBQJVnWccAAoJEH3vgQaq/DkOX3sP/0xKbvvi/AWFXBAj+M00bx/q heeBVOksuihWhuV/KG+FfmTO+ZMIWKHCOjlafzfPLmlS4cPANv6X942Lqtq86DiK yuIZjWjBVLIBaQWtN3EOjux0X0WLZwCn9V0sdW0Ir2Z2UutliYAkBdSO8eSiYA4W VqJ1dnkGeuDbj6O6k4Hfwa+bhDQIpDYeq423DikjxOOZkjw5UzLk8FQt70smX4Ky fo1WOxcAj6bnB+3wVD2Idn2Rtwdjtydnau1O+XK4KW2qgwfuzm7OS7mz+N1ttA3u yt6PvzpGon5xp+DxIpQjmI5KhIGZ9R+di4P0Inm84pj3JC0ikdn9NyfvSQGvyray 2bISZr0W0JEDFaoG8jKVJoWUNiGHR7kKnK30UwFw4Z9IiDjK9M4wXo6h7U3B281Y x02XAQ4k2sJI0mfD9zcHaAW8HPHuf2mQb2LXx2ZeEhBNKsCs41dv86b/c/3g2iwn gkv4fSLKgamUZU18EqH/TblcrHzvCxSFnQ3KUgPjnln2mB9yKxi446STjJTwu5PQ 5fMYrYVPC8NmAVxAd1WeKJY2gitScTUD/XhcztTGYtA86yuX/xqdXJq+lDbyHkXm 0liCp8BbGoIPNWuZiVkqE/rneyOPDSaAzvl5JlZ7vqjVuk1P1ErBMkTOvdUBrMxe gE6J4lSL3Hwxxhfn7Ty2 =vdxq -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/jnsnow/tags/ide-pull-request' into staging # gpg: Signature made Wed Jul 8 19:08:28 2015 BST using RSA key ID AAFC390E # gpg: Good signature from "John Snow (John Huston) <jsnow@redhat.com>" # gpg: WARNING: This key is not certified with sufficiently trusted signatures! # gpg: It is not certain that the signature belongs to the owner. # Primary key fingerprint: FAEB 9711 A12C F475 812F 18F2 88A9 064D 1835 61EB # Subkey fingerprint: F9B7 ABDB BCAC DF95 BE76 CBD0 7DEF 8106 AAFC 390E * remotes/jnsnow/tags/ide-pull-request: ahci: Fix CD-ROM signature libqos/ahci: fix ahci_write_fis for ncq on ppc64 Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
c8e84287da
|
@ -166,7 +166,7 @@
|
|||
#define AHCI_CMD_HDR_CMD_FIS_LEN 0x1f
|
||||
#define AHCI_CMD_HDR_PRDT_LEN 16
|
||||
|
||||
#define SATA_SIGNATURE_CDROM 0xeb140000
|
||||
#define SATA_SIGNATURE_CDROM 0xeb140101
|
||||
#define SATA_SIGNATURE_DISK 0x00000101
|
||||
|
||||
#define AHCI_GENERIC_HOST_CONTROL_REGS_MAX_ADDR 0x20
|
||||
|
|
|
@ -545,16 +545,18 @@ void ahci_destroy_command(AHCIQState *ahci, uint8_t port, uint8_t slot)
|
|||
ahci->port[port].prdtl[slot] = 0;
|
||||
}
|
||||
|
||||
void ahci_write_fis(AHCIQState *ahci, RegH2DFIS *fis, uint64_t addr)
|
||||
void ahci_write_fis(AHCIQState *ahci, AHCICommand *cmd)
|
||||
{
|
||||
RegH2DFIS tmp = *fis;
|
||||
RegH2DFIS tmp = cmd->fis;
|
||||
uint64_t addr = cmd->header.ctba;
|
||||
|
||||
/* The auxiliary FIS fields are defined per-command and are not
|
||||
* currently implemented in libqos/ahci.o, but may or may not need
|
||||
* to be flipped. */
|
||||
|
||||
/* All other FIS fields are 8 bit and do not need to be flipped. */
|
||||
tmp.count = cpu_to_le16(tmp.count);
|
||||
/* NCQ commands use exclusively 8 bit fields and needs no adjustment.
|
||||
* Only the count field needs to be adjusted for non-NCQ commands.
|
||||
* The auxiliary FIS fields are defined per-command and are not currently
|
||||
* implemented in libqos/ahci.o, but may or may not need to be flipped. */
|
||||
if (!cmd->props->ncq) {
|
||||
tmp.count = cpu_to_le16(tmp.count);
|
||||
}
|
||||
|
||||
memwrite(addr, &tmp, sizeof(tmp));
|
||||
}
|
||||
|
@ -877,7 +879,7 @@ void ahci_command_commit(AHCIQState *ahci, AHCICommand *cmd, uint8_t port)
|
|||
|
||||
/* Commit the command header and command FIS */
|
||||
ahci_set_command_header(ahci, port, cmd->slot, &(cmd->header));
|
||||
ahci_write_fis(ahci, &(cmd->fis), table_ptr);
|
||||
ahci_write_fis(ahci, cmd);
|
||||
|
||||
/* Construct and write the PRDs to the command table */
|
||||
g_assert_cmphex(prdtl, ==, cmd->header.prdtl);
|
||||
|
|
|
@ -548,7 +548,7 @@ void ahci_get_command_header(AHCIQState *ahci, uint8_t port,
|
|||
void ahci_set_command_header(AHCIQState *ahci, uint8_t port,
|
||||
uint8_t slot, AHCICommandHeader *cmd);
|
||||
void ahci_destroy_command(AHCIQState *ahci, uint8_t port, uint8_t slot);
|
||||
void ahci_write_fis(AHCIQState *ahci, RegH2DFIS *fis, uint64_t addr);
|
||||
void ahci_write_fis(AHCIQState *ahci, AHCICommand *cmd);
|
||||
unsigned ahci_pick_cmd(AHCIQState *ahci, uint8_t port);
|
||||
unsigned size_to_prdtl(unsigned bytes, unsigned bytes_per_prd);
|
||||
void ahci_guest_io(AHCIQState *ahci, uint8_t port, uint8_t ide_cmd,
|
||||
|
|
Loading…
Reference in New Issue