linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Casper Boon <casper@ambinet.com.au>
To: linux-kernel@vger.kernel.org
Cc: alan@redhat.com
Subject: A Little patch for DTC SCSI Controller
Date: Sat, 20 Oct 2001 08:37:38 +0800	[thread overview]
Message-ID: <3BD0C752.F1A001F1@ambinet.com.au> (raw)

TWIMC

The patch below is for the DTC3x80 controller which stopped working
under
2.4 series.  The change is only to the header and changes readb to
isa_readb
and writeb to isa_writeb.  Without this patch the kernel panics at
startup.


========================================================================
Casper A. Boon                                     casper@ambinet.com.au
Ambinet Systems                                             0417 171 505
========================================================================

diff -u linux-2.4.10/drivers/scsi/dtc.h
linux-2.4.10-cab/drivers/scsi/dtc.h
--- linux-2.4.10/drivers/scsi/dtc.h     Tue Sep 19 05:12:01 2000
+++ linux-2.4.10-cab/drivers/scsi/dtc.h Sat Oct 13 18:09:01 2001
@@ -80,29 +80,29 @@
 #define DTC_address(reg) (base + DTC_5380_OFFSET + reg)
 
 #define
dbNCR5380_read(reg)                                              \
-    (rval=readb(DTC_address(reg)), \
+    (rval=isa_readb(DTC_address(reg)), \
      (((unsigned char) printk("DTC : read register %d at addr %08x is:
%02x\n"\
     , (reg), (int)DTC_address(reg), rval)), rval ) )
 
 #define dbNCR5380_write(reg, value) do
{                                  \
     printk("DTC : write %02x to register %d at address %08x\n",        
\
             (value), (reg), (int)DTC_address(reg));     \
-    writeb(value, DTC_address(reg));} while(0)
+    isa_writeb(value, DTC_address(reg));} while(0)
 
 
 #if !(DTCDEBUG & DTCDEBUG_TRANSFER) 
-#define NCR5380_read(reg) (readb(DTC_address(reg)))
-#define NCR5380_write(reg, value) (writeb(value, DTC_address(reg)))
+#define NCR5380_read(reg) (isa_readb(DTC_address(reg)))
+#define NCR5380_write(reg, value) (isa_writeb(value, DTC_address(reg)))
 #else
-#define NCR5380_read(reg) (readb(DTC_address(reg)))
+#define NCR5380_read(reg) (isa_readb(DTC_address(reg)))
 #define xNCR5380_read(reg)                                            
\
     (((unsigned char) printk("DTC : read register %d at address
%08x\n"\
-    , (reg), DTC_address(reg))), readb(DTC_address(reg)))
+    , (reg), DTC_address(reg))), isa_readb(DTC_address(reg)))
 
 #define NCR5380_write(reg, value) do {                                
\
     printk("DTC : write %02x to register %d at address %08x\n",       
\
            (value), (reg), (int)DTC_address(reg));     \
-    writeb(value, DTC_address(reg));} while(0)
+    isa_writeb(value, DTC_address(reg));} while(0)
 #endif
 
 #define NCR5380_intr dtc_intr

                 reply	other threads:[~2001-10-20  0:41 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3BD0C752.F1A001F1@ambinet.com.au \
    --to=casper@ambinet.com.au \
    --cc=alan@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).