From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=49731 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P1EBH-0002qo-IT for qemu-devel@nongnu.org; Thu, 30 Sep 2010 04:07:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1P1EBD-0005YC-HG for qemu-devel@nongnu.org; Thu, 30 Sep 2010 04:07:55 -0400 Received: from mail-iw0-f173.google.com ([209.85.214.173]:47610) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P1EBD-0005Xy-ET for qemu-devel@nongnu.org; Thu, 30 Sep 2010 04:07:51 -0400 Received: by iwn38 with SMTP id 38so2306482iwn.4 for ; Thu, 30 Sep 2010 01:07:50 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <4CA4454F.30402@redhat.com> Date: Thu, 30 Sep 2010 10:07:43 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1285823254-6699-1-git-send-email-nab@linux-iscsi.org> In-Reply-To: <1285823254-6699-1-git-send-email-nab@linux-iscsi.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH] lsi53c895a: Add missing registers and workaround for OS/2 Warp SYM8XX.ADD driver List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Nicholas A. Bellinger" Cc: Kevin Wolf , Gerd Hoffmann , kvm-devel , Jan Kiszka , qemu-devel , FUJITA Tomonori , Hannes Reinecke , Matthew Wilcox , Paul Brook On 09/30/2010 07:07 AM, Nicholas A. Bellinger wrote: > case 0x06: /* SDID */ > - if ((val& 0xf) != (s->ssid& 0xf)) > - BADF("Destination ID does not match SSID\n"); > + /* > + * This workaround is required by the SYM8XX.ADD driver for OS/2 Warp. > + */ > + if ((val& 0xf) != (s->ssid& 0xf)) { > + DPRINTF("Destination ID does not match SSID, val: %02x" > + " s->ssid: %02x, fixing up val\n", val, s->ssid); > + val = s->ssid; > + } > s->sdid = val& 0xf; > break; I don't think the write is bogus, as the manual says "Writing these bits set the SCSI ID of the intended initiator or target during SCSI reselection or selection phases, respectively". The value is never used by the device model, only read/written according to SCRIPTS and register read/writes. How does the OS/2 driver use it? Have you tried, just removing the "if" without replacing it? Paolo