From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:56816) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SelzX-0007oq-7K for qemu-devel@nongnu.org; Wed, 13 Jun 2012 07:44:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SelzR-0005nO-4T for qemu-devel@nongnu.org; Wed, 13 Jun 2012 07:44:02 -0400 Received: from mx1.redhat.com ([209.132.183.28]:30969) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SelzQ-0005n4-Sw for qemu-devel@nongnu.org; Wed, 13 Jun 2012 07:43:57 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q5DBhscU004218 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 13 Jun 2012 07:43:54 -0400 Message-ID: <4FD87CF9.3010905@redhat.com> Date: Wed, 13 Jun 2012 13:43:53 +0200 From: Pavel Hrdina MIME-Version: 1.0 References: <83fb3a579f13cec8bd6a62a486911627f36e7185.1339499796.git.phrdina@redhat.com> <4FD73D35.7000000@redhat.com> In-Reply-To: <4FD73D35.7000000@redhat.com> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v3 4/4] fdc: fix interrupt handling List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org On 06/12/2012 02:59 PM, Paolo Bonzini wrote: > Il 12/06/2012 13:19, Pavel Hrdina ha scritto: >> } else { >> - /* XXX: status0 handling is broken for read/write >> - commands, so we do this hack. It should be suppressed >> - ASAP */ >> - fdctrl->fifo[0] = >> - FD_SR0_SEEK | (cur_drv->head<< 2) | GET_CUR_DRV(fdctrl); >> + fdctrl->fifo[0] = (fdctrl->status0& ~FD_SR0_HEAD) | GET_CUR_DRV(fdctrl); > Should bit 0 be cleared also, before ORing GET_CUR_DRV(fdctrl)? > > Paolo According to the code bits 0 and 1 don't have to be cleared, but it would be probably better clear them too. Good point. Pavel