2.1.21 patch for linux/drivers/scsi/seagate.[ch]

Leslie Donaldson (leslied@std.teradyne.com)
Wed, 15 Jan 1997 08:27:27 -0800 (PST)


*** linux/drivers/scsi/seagate.h.0 Thu Nov 28 13:15:35 1996
--- linux/drivers/scsi/seagate.h Thu Nov 28 13:27:40 1996
***************
*** 37,50 ****
1, 7, SG_ALL, 1, 0, 0, DISABLE_CLUSTERING}
#endif

-
- /*
- defining PARITY causes parity data to be checked
- */
-
- #define PARITY
-
-
/*
Thanks to Brian Antoine for the example code in his Messy-Loss ST-01
driver, and Mitsugu Suzuki for information on the ST-01
--- 37,42 ----
***************
*** 67,77 ****
/*
STATUS
*/

#define STAT_BSY 0x01
- #define STAT_MSG 0x02
#define STAT_IO 0x04
- #define STAT_CD 0x08
#define STAT_REQ 0x10
#define STAT_SEL 0x20
#define STAT_PARITY 0x40
--- 59,74 ----
/*
STATUS
*/
+ #ifdef SWAPSTAT
+ #define STAT_MSG 0x08
+ #define STAT_CD 0x02
+ #else
+ #define STAT_MSG 0x02
+ #define STAT_CD 0x08
+ #endif

#define STAT_BSY 0x01
#define STAT_IO 0x04
#define STAT_REQ 0x10
#define STAT_SEL 0x20
#define STAT_PARITY 0x40
*** linux/drivers/scsi/seagate.c.0 Thu Nov 28 13:15:24 1996
--- linux/drivers/scsi/seagate.c Thu Nov 28 13:32:21 1996
***************
*** 44,49 ****
--- 44,58 ----
*
* -DSLOW_RATE=x, x some number will let you specify a default
* transfer rate if handshaking isn't working correctly.
+ *
+ * -DPARITY This will enable parity.
+ *
+ * The following to options are patches from the SCSI.HOWTO
+ *
+ * -DSWAPSTAT This will swap the definitions for STAT_MSG and STAT_CD.
+ *
+ * -DSWAPCNTDATA This will swap the order that seagate.c messes with
+ * the CONTROL an DATA registers.
*/

#include <linux/module.h>
***************
*** 372,380 ****
#ifdef ARBITRATE
" ARBITRATE"
#endif
- #ifdef SLOW_HANDSHAKE
- " SLOW_HANDSHAKE"
- #endif
#ifdef FAST
#ifdef FAST32
" FAST32"
--- 381,386 ----
***************
*** 385,390 ****
--- 391,405 ----
#ifdef LINKED
" LINKED"
#endif
+ #ifdef PARITY
+ " PARITY"
+ #endif
+ #ifdef SLOW_HANDSHAKE
+ " SLOW_HANDSHAKE"
+ #endif
+ #ifdef SWAPSTAT
+ " SWAPSTAT"
+ #endif
"\n", tpnt->name);
return 1;
}
***************
*** 879,889 ****
--- 894,913 ----
* try this with a SCSI protocol or logic analyzer to see what is
* going on.
*/
+ #ifdef SWAPCNTDATA
+ cli();
+ WRITE_CONTROL (BASE_CMD | CMD_DRVR_ENABLE | CMD_SEL |
+ (reselect ? CMD_ATTN : 0));
+ WRITE_DATA ((unsigned char) ((1 << target) |
+ (controller_type == SEAGATE ? 0x80 : 0x40)));
+ sti ();
+ #else
cli ();
WRITE_DATA ((unsigned char) ((1 << target) |
(controller_type == SEAGATE ? 0x80 : 0x40)));
WRITE_CONTROL (BASE_CMD | CMD_DRVR_ENABLE | CMD_SEL |
(reselect ? CMD_ATTN : 0));
sti ();
+ #endif
while (!((status_read = STATUS) & STAT_BSY) && (jiffies < clock)
&& !st0x_aborted)