Really support Ultra-2 chips. Symbios redefined a register that
was available to the programmer to hold chip state information: Use the SDID register instead of CTEST3. This change actually simplifies the SCRIPTS code, but I'm not absolutely sure, that it is OK for all variants of NCR chips around and all device combinations. I have had this code running on several systems with 53c810, 875 and 895 controllers for several months. Suggested by: Gerard Roudier <groudier@club-internet.fr>
This commit is contained in:
parent
a127a70452
commit
de649cc42c
@ -1,6 +1,6 @@
|
||||
/**************************************************************************
|
||||
**
|
||||
** $Id: ncr.c,v 1.144 1999/05/06 20:16:37 ken Exp $
|
||||
** $Id: ncr.c,v 1.145 1999/05/09 17:07:09 peter Exp $
|
||||
**
|
||||
** Device driver for the NCR 53C8XX PCI-SCSI-Controller Family.
|
||||
**
|
||||
@ -1233,7 +1233,7 @@ struct script {
|
||||
ncrcmd skip [ 8];
|
||||
ncrcmd skip2 [ 3];
|
||||
ncrcmd idle [ 2];
|
||||
ncrcmd select [ 22];
|
||||
ncrcmd select [ 18];
|
||||
ncrcmd prepare [ 4];
|
||||
ncrcmd loadpos [ 14];
|
||||
ncrcmd prepare2 [ 24];
|
||||
@ -1285,11 +1285,11 @@ struct scripth {
|
||||
ncrcmd getcc [ 4];
|
||||
ncrcmd getcc1 [ 5];
|
||||
#ifdef NCR_GETCC_WITHMSG
|
||||
ncrcmd getcc2 [ 33];
|
||||
ncrcmd getcc2 [ 29];
|
||||
#else
|
||||
ncrcmd getcc2 [ 14];
|
||||
#endif
|
||||
ncrcmd getcc3 [ 10];
|
||||
ncrcmd getcc3 [ 6];
|
||||
ncrcmd aborttag [ 4];
|
||||
ncrcmd abort [ 22];
|
||||
ncrcmd snooptest [ 9];
|
||||
@ -1361,7 +1361,7 @@ static void ncr_attach (pcici_t tag, int unit);
|
||||
|
||||
#if !defined(lint)
|
||||
static const char ident[] =
|
||||
"\n$Id: ncr.c,v 1.144 1999/05/06 20:16:37 ken Exp $\n";
|
||||
"\n$Id: ncr.c,v 1.145 1999/05/09 17:07:09 peter Exp $\n";
|
||||
#endif
|
||||
|
||||
static const u_long ncr_version = NCR_VERSION * 11
|
||||
@ -1628,14 +1628,6 @@ static struct script script0 = {
|
||||
0,
|
||||
|
||||
/*
|
||||
** Save target id to ctest0 register
|
||||
*/
|
||||
|
||||
SCR_FROM_REG (sdid),
|
||||
0,
|
||||
SCR_TO_REG (ctest0),
|
||||
0,
|
||||
/*
|
||||
** Send the IDENTIFY and SIMPLE_TAG messages
|
||||
** (and the MSG_EXT_SDTR message)
|
||||
*/
|
||||
@ -2308,7 +2300,7 @@ static struct script script0 = {
|
||||
*/
|
||||
SCR_REG_SFBR (ssid, SCR_AND, 0x8F),
|
||||
0,
|
||||
SCR_TO_REG (ctest0),
|
||||
SCR_TO_REG (sdid),
|
||||
0,
|
||||
SCR_JUMP,
|
||||
NADDR (jump_tcb),
|
||||
@ -2889,13 +2881,6 @@ static struct scripth scripth0 = {
|
||||
SCR_SEL_TBL_ATN ^ offsetof (struct dsb, select),
|
||||
PADDR(badgetcc),
|
||||
/*
|
||||
** save target id.
|
||||
*/
|
||||
SCR_FROM_REG (sdid),
|
||||
0,
|
||||
SCR_TO_REG (ctest0),
|
||||
0,
|
||||
/*
|
||||
** Send the IDENTIFY message.
|
||||
** In case of short transfer, remove ATN.
|
||||
*/
|
||||
@ -2926,13 +2911,6 @@ static struct scripth scripth0 = {
|
||||
SCR_SEL_TBL ^ offsetof (struct dsb, select),
|
||||
PADDR(badgetcc),
|
||||
/*
|
||||
** save target id.
|
||||
*/
|
||||
SCR_FROM_REG (sdid),
|
||||
0,
|
||||
SCR_TO_REG (ctest0),
|
||||
0,
|
||||
/*
|
||||
** Force error if selection timeout
|
||||
*/
|
||||
SCR_JUMPR ^ IFTRUE (WHEN (SCR_MSG_IN)),
|
||||
@ -4999,7 +4977,7 @@ ncr_setsync(ncb_p np, nccb_p cp, u_char scntl3, u_char sxfer, u_char period)
|
||||
struct ccb_trans_settings neg;
|
||||
tcb_p tp;
|
||||
int div;
|
||||
u_int target = INB (nc_ctest0) & 0x0f;
|
||||
u_int target = INB (nc_sdid) & 0x0f;
|
||||
u_int period_10ns;
|
||||
|
||||
assert (cp);
|
||||
@ -5093,7 +5071,7 @@ static void ncr_setwide (ncb_p np, nccb_p cp, u_char wide, u_char ack)
|
||||
{
|
||||
union ccb *ccb;
|
||||
struct ccb_trans_settings neg;
|
||||
u_int target = INB (nc_ctest0) & 0x0f;
|
||||
u_int target = INB (nc_sdid) & 0x0f;
|
||||
tcb_p tp;
|
||||
u_char scntl3;
|
||||
u_char sxfer;
|
||||
@ -5335,7 +5313,7 @@ static void ncr_log_hard_error(ncb_p np, u_short sist, u_char dstat)
|
||||
}
|
||||
|
||||
printf ("%s:%d: ERROR (%x:%x) (%x-%x-%x) (%x/%x) @ (%s %x:%08x).\n",
|
||||
ncr_name (np), (unsigned)INB (nc_ctest0)&0x0f, dstat, sist,
|
||||
ncr_name (np), (unsigned)INB (nc_sdid)&0x0f, dstat, sist,
|
||||
(unsigned)INB (nc_socl), (unsigned)INB (nc_sbcl), (unsigned)INB (nc_sbdl),
|
||||
(unsigned)INB (nc_sxfer),(unsigned)INB (nc_scntl3), script_name, script_ofs,
|
||||
(unsigned)INL (nc_dbc));
|
||||
@ -5560,7 +5538,7 @@ void ncr_exception (ncb_p np)
|
||||
return;
|
||||
};
|
||||
printf ("%s: target %d doesn't release the bus.\n",
|
||||
ncr_name (np), INB (nc_ctest0)&0x0f);
|
||||
ncr_name (np), INB (nc_sdid)&0x0f);
|
||||
/*
|
||||
** return without restarting the NCR.
|
||||
** timeout will do the real work.
|
||||
@ -5935,7 +5913,7 @@ void ncr_int_sir (ncb_p np)
|
||||
u_char num = INB (nc_dsps);
|
||||
nccb_p cp=0;
|
||||
u_long dsa;
|
||||
u_int target = INB (nc_ctest0) & 0x0f;
|
||||
u_int target = INB (nc_sdid) & 0x0f;
|
||||
tcb_p tp = &np->target[target];
|
||||
int i;
|
||||
if (DEBUG_FLAGS & DEBUG_TINY) printf ("I#%d", num);
|
||||
|
Loading…
Reference in New Issue
Block a user