Re: [Qemu-devel] [PATCH v3 29/32] ahci: properly shadow the TFD register
On 08/14/2014 12:09 PM, Stefan Hajnoczi wrote: On Wed, Aug 13, 2014 at 05:56:12PM -0400, John Snow wrote: @@ -497,6 +495,8 @@ static void ahci_reset_port(AHCIState *s, int port) pr-scr_stat = 0; pr-scr_err = 0; pr-scr_act = 0; +pr-tfdata = 0x7F; Is it possible to avoid the magic number? I can name it as AHCI_TFD_BOOT_VALUE or AHCI_TFD_INIT_VALUE or so. Same for the PxSIG boot value too. I don't think I can give any greater meaning to the value because it's just a boot signature that means We haven't received an FIS yet.
Re: [Qemu-devel] [PATCH v3 29/32] ahci: properly shadow the TFD register
On Wed, Aug 13, 2014 at 05:56:12PM -0400, John Snow wrote: @@ -497,6 +495,8 @@ static void ahci_reset_port(AHCIState *s, int port) pr-scr_stat = 0; pr-scr_err = 0; pr-scr_act = 0; +pr-tfdata = 0x7F; Is it possible to avoid the magic number? pgpmIgF53vtBL.pgp Description: PGP signature
Re: [Qemu-devel] [PATCH v3 29/32] ahci: properly shadow the TFD register
On Thu, Aug 14, 2014 at 12:13:51PM -0400, John Snow wrote: On 08/14/2014 12:09 PM, Stefan Hajnoczi wrote: On Wed, Aug 13, 2014 at 05:56:12PM -0400, John Snow wrote: @@ -497,6 +495,8 @@ static void ahci_reset_port(AHCIState *s, int port) pr-scr_stat = 0; pr-scr_err = 0; pr-scr_act = 0; +pr-tfdata = 0x7F; Is it possible to avoid the magic number? I can name it as AHCI_TFD_BOOT_VALUE or AHCI_TFD_INIT_VALUE or so. Same for the PxSIG boot value too. I don't think I can give any greater meaning to the value because it's just a boot signature that means We haven't received an FIS yet. In that case, don't bother. I thought this was error and status fields shifted. Stefan pgpBMIhp2oiIA.pgp Description: PGP signature