From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L9l01-0001WB-Jo for qemu-devel@nongnu.org; Mon, 08 Dec 2008 13:38:29 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L9kzz-0001Uu-SW for qemu-devel@nongnu.org; Mon, 08 Dec 2008 13:38:29 -0500 Received: from [199.232.76.173] (port=44627 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L9kzz-0001Ul-MA for qemu-devel@nongnu.org; Mon, 08 Dec 2008 13:38:27 -0500 Received: from mx20.gnu.org ([199.232.41.8]:15788) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1L9kzz-0006Dm-AU for qemu-devel@nongnu.org; Mon, 08 Dec 2008 13:38:27 -0500 Received: from mail.codesourcery.com ([65.74.133.4]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L9kzx-0002x3-V5 for qemu-devel@nongnu.org; Mon, 08 Dec 2008 13:38:26 -0500 From: Paul Brook Subject: Re: [Qemu-devel] [PATCH 3/4] LSI53C895A: Implement TARGET RESET message Date: Mon, 8 Dec 2008 18:38:22 +0000 References: <1228759670-31113-1-git-send-email-ryanh@us.ibm.com> <1228759670-31113-4-git-send-email-ryanh@us.ibm.com> In-Reply-To: <1228759670-31113-4-git-send-email-ryanh@us.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200812081838.23464.paul@codesourcery.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Ryan Harper , kvm@vger.kernel.org On Monday 08 December 2008, Ryan Harper wrote: > Linux and Windows send a TARGET RESET message to the device when it fails > to respond as it expects. For example, when it tries to select LUN1, which > we don't support. This patch is needed to support the Linux sym53c8xx_2 > driver when configured with SYM_CONF_DMA_ADDRESSING_MODE=2 > > Signed-off-by: Ryan Harper > > diff --git a/hw/lsi53c895a.c b/hw/lsi53c895a.c > index b36c08c..ac8c5a5 100644 > --- a/hw/lsi53c895a.c > +++ b/hw/lsi53c895a.c > @@ -804,6 +804,10 @@ static void lsi_do_msgout(LSIState *s) > goto bad; > } > break; > + case 0x0c: /* TARGET RESET */ > + DPRINTF("MSG: Target Reset\n"); > + lsi_soft_reset(s); > + break; > case 0x20: /* SIMPLE queue */ > s->current_tag |= lsi_get_msgbyte(s) | LSI_TAG_VALID; > DPRINTF("SIMPLE queue tag=0x%x\n", s->current_tag & 0xff); This looks wrong. The clue is in the name. This should reset the *target* device (i.e. the disk) not the host adapter. Probably also explains why you need the bogus 4th patch. Paul