NEW PATCH: ncr/sym drivers and bridges

Gerard Roudier (groudier@club-internet.fr)
Tue, 27 Jul 1999 00:31:46 +0200 (MET DST)


My previous patch didn't reap completions that much. This one should do
the work a lot better.

If you plan to start your Linux system using a sym53c8xx controller for an
uptime of 1 year or more, the below patch may help. :-)

If you refer to my previous mail about this topic, you probably will not
expect this patch to fix anything that fails in less time than months or
years, unless your system uses a fairly broken host-pci bridge.

Gérard.

--- linux/drivers/scsi/sym53c8xx_defs.h.1.3g Sun Jul 25 18:37:08 1999
+++ linux/drivers/scsi/sym53c8xx_defs.h Mon Jul 26 23:52:25 1999
@@ -268,7 +268,11 @@
#define SCSI_NCR_CMD_PER_LUN (SCSI_NCR_MAX_TAGS)
#define SCSI_NCR_SG_TABLESIZE (SCSI_NCR_MAX_SCATTER)

+#if defined(SCSI_NCR_BROKEN_INTR) || defined(SCSI_NCR_REAP_COMPLETIONS)
+#define SCSI_NCR_TIMER_INTERVAL ((HZ+9)/10)
+#else
#define SCSI_NCR_TIMER_INTERVAL (HZ)
+#endif

#if 1 /* defined CONFIG_SCSI_MULTI_LUN */
#define SCSI_NCR_MAX_LUN (16)
--- linux/drivers/scsi/sym53c8xx.h.1.3g Sun Jul 25 18:49:09 1999
+++ linux/drivers/scsi/sym53c8xx.h Tue Jul 27 00:07:53 1999
@@ -57,6 +57,14 @@
#ifndef SYM53C8XX_H
#define SYM53C8XX_H

+/*
+** We may have to reap completions on some architectures because
+** of the host-pci bridge not following PCI ordering rules.
+*/
+#if !defined(__i386__) && !defined(__powerpc__) && !defined(__alpha__)
+#define SCSI_NCR_REAP_COMPLETIONS
+#endif
+
#include "sym53c8xx_defs.h"

/*
--- linux/drivers/scsi/sym53c8xx.c.1.3g Sun Jul 25 18:40:01 1999
+++ linux/drivers/scsi/sym53c8xx.c Mon Jul 26 23:46:46 1999
@@ -6881,6 +6881,10 @@
np->lasttime = thistime;
}

+#ifdef SCSI_NCR_REAP_COMPLETIONS
+ ncr_wakeup_done(np);
+#endif
+
#ifdef SCSI_NCR_BROKEN_INTR
if (INB(nc_istat) & (INTF|SIP|DIP)) {

@@ -7091,6 +7095,9 @@
if (istat & INTF) {
OUTB (nc_istat, (istat & SIGP) | INTF);
if (DEBUG_FLAGS & DEBUG_TINY) printk ("F ");
+#ifdef __alpha__
+ istat = INB (nc_istat);/* Dummy read to flush the write if PW */
+#endif
(void)ncr_wakeup_done (np);
#ifdef SCSI_NCR_PROFILE_SUPPORT
++np->profile.num_fly;
--- linux/drivers/scsi/ncr53c8xx.h.1.3g Sun Jul 25 18:55:09 1999
+++ linux/drivers/scsi/ncr53c8xx.h Tue Jul 27 00:08:04 1999
@@ -42,6 +42,14 @@
#ifndef NCR53C8XX_H
#define NCR53C8XX_H

+/*
+** We may have to reap completions on some architectures because
+** of the host-pci bridge not following PCI ordering rules.
+*/
+#if !defined(__i386__) && !defined(__powerpc__)
+#define SCSI_NCR_REAP_COMPLETIONS
+#endif
+
#include "sym53c8xx_defs.h"

/*
--- linux/drivers/scsi/ncr53c8xx.c.1.3g Tue Jul 27 00:27:50 1999
+++ linux/drivers/scsi/ncr53c8xx.c Mon Jul 26 23:47:34 1999
@@ -6666,6 +6666,10 @@
#endif
}

+#ifdef SCSI_NCR_REAP_COMPLETIONS
+ ncr_wakeup_done(np);
+#endif
+
#ifdef SCSI_NCR_BROKEN_INTR
if (INB(nc_istat) & (INTF|SIP|DIP)) {

--------------------- END OF DIFFS ---------------------

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/