From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH] lsi53c895a: Add missing registers and workaround for OS/2 Warp SYM8XX.ADD driver Date: Thu, 30 Sep 2010 10:07:43 +0200 Message-ID: <4CA4454F.30402@redhat.com> References: <1285823254-6699-1-git-send-email-nab@linux-iscsi.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Paul Brook , Jan Kiszka , Kevin Wolf , Gerd Hoffmann , Hannes Reinecke , FUJITA Tomonori , Matthew Wilcox , kvm-devel , qemu-devel To: "Nicholas A. Bellinger" Return-path: Received: from mail-iw0-f174.google.com ([209.85.214.174]:53748 "EHLO mail-iw0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755074Ab0I3IHv (ORCPT ); Thu, 30 Sep 2010 04:07:51 -0400 Received: by iwn5 with SMTP id 5so2126723iwn.19 for ; Thu, 30 Sep 2010 01:07:50 -0700 (PDT) In-Reply-To: <1285823254-6699-1-git-send-email-nab@linux-iscsi.org> Sender: kvm-owner@vger.kernel.org List-ID: 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