qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] FDC: rework status0, status1, status2 handling


From: J. Mayer
Subject: Re: [Qemu-devel] [PATCH] FDC: rework status0, status1, status2 handling
Date: Thu, 26 Jun 2008 09:53:01 +0200

On Wed, 2008-06-25 at 23:25 +0200, Hervé Poussineau wrote:
> Hi,
> 
> Attached patch fixes status0, status1 and status2 handling, which were 
> broken in read/write commands and in some subtle ways. Status values are 
> now calculated during command execution and not at the very end.
> This allows removing of one hack in  fdctrl_handle_sense_interrupt_status().

Hi,

this way of proceeding seem very strange, as actual hardware do compute
the status bytes in the FIFO when entering the status phase. This is
quite logical as those bytes are supposed to reflect the state of the
hardware at the end of the command completion and cannot be computed
before, apart from a few bits, like the DID_SEEK bit.
Furthermore, doing this way, you have to introduce weird hack in the
main access routine :
@@ -1811,6 +1781,15 @@
>              return;
>          }
>  
> +        if (fdctrl->fifo[0] != FD_CMD_SENSE_INTERRUPT_STATUS)
> +        {
> +            /* Reset status0, except for SENSE_INTERRUPT_STATUS
> +             * which returns it */
> +            fdctrl->status0 = 0;
> +        }
> +        fdctrl->status1 = 0;
> +        fdctrl->status2 = 0;
> +

what is the exact bug and why isn't it possible to try to going on doing
things like actual hardware do ?
Another remark: moving code, like you do in this patch make very
difficult to figure what the real changes are and to track the
regressions if any. Could you please avoid introducing such artificial
diffs ?

-- 
J. Mayer <address@hidden>
Never organized





reply via email to

[Prev in Thread] Current Thread [Next in Thread]