git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge to kernel-2.6.20-1.2949.fc6.vs2.2.0.1
[linux-2.6.git]
/
drivers
/
scsi
/
ncr53c8xx.c
diff --git
a/drivers/scsi/ncr53c8xx.c
b/drivers/scsi/ncr53c8xx.c
index
3235070
..
bbf521c
100644
(file)
--- a/
drivers/scsi/ncr53c8xx.c
+++ b/
drivers/scsi/ncr53c8xx.c
@@
-69,6
+69,10
@@
** Low PCI traffic for command handling when on-chip RAM is present.
** Aggressive SCSI SCRIPTS optimizations.
**
** Low PCI traffic for command handling when on-chip RAM is present.
** Aggressive SCSI SCRIPTS optimizations.
**
+** 2005 by Matthew Wilcox and James Bottomley
+** PCI-ectomy. This driver now supports only the 720 chip (see the
+** NCR_Q720 and zalon drivers for the bus probe logic).
+**
*******************************************************************************
*/
*******************************************************************************
*/
@@
-90,13
+94,6
@@
#define SCSI_NCR_DEBUG_FLAGS (0)
#define SCSI_NCR_DEBUG_FLAGS (0)
-/*==========================================================
-**
-** Include files
-**
-**==========================================================
-*/
-
#include <linux/blkdev.h>
#include <linux/delay.h>
#include <linux/dma-mapping.h>
#include <linux/blkdev.h>
#include <linux/delay.h>
#include <linux/dma-mapping.h>
@@
-121,6
+118,7
@@
#include <scsi/scsi.h>
#include <scsi/scsi_cmnd.h>
#include <scsi/scsi.h>
#include <scsi/scsi_cmnd.h>
+#include <scsi/scsi_dbg.h>
#include <scsi/scsi_device.h>
#include <scsi/scsi_tcq.h>
#include <scsi/scsi_transport.h>
#include <scsi/scsi_device.h>
#include <scsi/scsi_tcq.h>
#include <scsi/scsi_transport.h>
@@
-128,10
+126,8
@@
#include "ncr53c8xx.h"
#include "ncr53c8xx.h"
-#define NAME53C "ncr53c"
#define NAME53C8XX "ncr53c8xx"
#define NAME53C8XX "ncr53c8xx"
-
/*==========================================================
**
** Debugging tags
/*==========================================================
**
** Debugging tags
@@
-189,7
+185,7
@@
static inline struct list_head *ncr_list_pop(struct list_head *head)
** power of 2 cache line size.
** Enhanced in linux-2.3.44 to provide a memory pool
** per pcidev to support dynamic dma mapping. (I would
** power of 2 cache line size.
** Enhanced in linux-2.3.44 to provide a memory pool
** per pcidev to support dynamic dma mapping. (I would
-** have preferred a real bus astraction, btw).
+** have preferred a real bus a
b
straction, btw).
**
**==========================================================
*/
**
**==========================================================
*/
@@
-533,7
+529,7
@@
static void __unmap_scsi_data(struct device *dev, struct scsi_cmnd *cmd)
{
switch(cmd->__data_mapped) {
case 2:
{
switch(cmd->__data_mapped) {
case 2:
- dma_unmap_sg(dev, cmd->buffer, cmd->use_sg,
+ dma_unmap_sg(dev, cmd->
request_
buffer, cmd->use_sg,
cmd->sc_data_direction);
break;
case 1:
cmd->sc_data_direction);
break;
case 1:
@@
-568,7
+564,7
@@
static int __map_scsi_sg_data(struct device *dev, struct scsi_cmnd *cmd)
if (cmd->use_sg == 0)
return 0;
if (cmd->use_sg == 0)
return 0;
- use_sg = dma_map_sg(dev, cmd->buffer, cmd->use_sg,
+ use_sg = dma_map_sg(dev, cmd->
request_
buffer, cmd->use_sg,
cmd->sc_data_direction);
cmd->__data_mapped = 2;
cmd->__data_mapping = use_sg;
cmd->sc_data_direction);
cmd->__data_mapped = 2;
cmd->__data_mapping = use_sg;
@@
-593,10
+589,12
@@
static int __map_scsi_sg_data(struct device *dev, struct scsi_cmnd *cmd)
static struct ncr_driver_setup
driver_setup = SCSI_NCR_DRIVER_SETUP;
static struct ncr_driver_setup
driver_setup = SCSI_NCR_DRIVER_SETUP;
+#ifndef MODULE
#ifdef SCSI_NCR_BOOT_COMMAND_LINE_SUPPORT
static struct ncr_driver_setup
driver_safe_setup __initdata = SCSI_NCR_DRIVER_SAFE_SETUP;
#endif
#ifdef SCSI_NCR_BOOT_COMMAND_LINE_SUPPORT
static struct ncr_driver_setup
driver_safe_setup __initdata = SCSI_NCR_DRIVER_SAFE_SETUP;
#endif
+#endif /* !MODULE */
#define initverbose (driver_setup.verbose)
#define bootverbose (np->verbose)
#define initverbose (driver_setup.verbose)
#define bootverbose (np->verbose)
@@
-645,6
+643,13
@@
static struct ncr_driver_setup
#define OPT_IARB 26
#endif
#define OPT_IARB 26
#endif
+#ifdef MODULE
+#define ARG_SEP ' '
+#else
+#define ARG_SEP ','
+#endif
+
+#ifndef MODULE
static char setup_token[] __initdata =
"tags:" "mpar:"
"spar:" "disc:"
static char setup_token[] __initdata =
"tags:" "mpar:"
"spar:" "disc:"
@@
-664,12
+669,6
@@
static char setup_token[] __initdata =
#endif
; /* DONNOT REMOVE THIS ';' */
#endif
; /* DONNOT REMOVE THIS ';' */
-#ifdef MODULE
-#define ARG_SEP ' '
-#else
-#define ARG_SEP ','
-#endif
-
static int __init get_setup_token(char *p)
{
char *cur = setup_token;
static int __init get_setup_token(char *p)
{
char *cur = setup_token;
@@
-686,7
+685,6
@@
static int __init get_setup_token(char *p)
return 0;
}
return 0;
}
-
static int __init sym53c8xx__setup(char *str)
{
#ifdef SCSI_NCR_BOOT_COMMAND_LINE_SUPPORT
static int __init sym53c8xx__setup(char *str)
{
#ifdef SCSI_NCR_BOOT_COMMAND_LINE_SUPPORT
@@
-808,6
+806,7
@@
static int __init sym53c8xx__setup(char *str)
#endif /* SCSI_NCR_BOOT_COMMAND_LINE_SUPPORT */
return 1;
}
#endif /* SCSI_NCR_BOOT_COMMAND_LINE_SUPPORT */
return 1;
}
+#endif /* !MODULE */
/*===================================================================
**
/*===================================================================
**
@@
-1442,7
+1441,7
@@
struct head {
** The first four bytes (scr_st[4]) are used inside the script by
** "COPY" commands.
** Because source and destination must have the same alignment
** The first four bytes (scr_st[4]) are used inside the script by
** "COPY" commands.
** Because source and destination must have the same alignment
-** in a DWORD, the fields HAVE to be at the cho
o
sen offsets.
+** in a DWORD, the fields HAVE to be at the chosen offsets.
** xerr_st 0 (0x34) scratcha
** sync_st 1 (0x05) sxfer
** wide_st 3 (0x03) scntl3
** xerr_st 0 (0x34) scratcha
** sync_st 1 (0x05) sxfer
** wide_st 3 (0x03) scntl3
@@
-1502,7
+1501,7
@@
struct head {
** the DSA (data structure address) register points
** to this substructure of the ccb.
** This substructure contains the header with
** the DSA (data structure address) register points
** to this substructure of the ccb.
** This substructure contains the header with
-** the script-processor-changable data and
+** the script-processor-chang
e
able data and
** data blocks for the indirect move commands.
**
**----------------------------------------------------------
** data blocks for the indirect move commands.
**
**----------------------------------------------------------
@@
-2111,7
+2110,7
@@
static struct script script0 __initdata = {
*/
/*
*/
/*
- ** The M_REJECT problem seems to be due to a selection
+ ** The M
ESSAGE
_REJECT problem seems to be due to a selection
** timing problem.
** Wait immediately for the selection to complete.
** (2.5x behaves so)
** timing problem.
** Wait immediately for the selection to complete.
** (2.5x behaves so)
@@
-2162,7
+2161,7
@@
static struct script script0 __initdata = {
/*
** Selection complete.
** Send the IDENTIFY and SIMPLE_TAG messages
/*
** Selection complete.
** Send the IDENTIFY and SIMPLE_TAG messages
- ** (and the
M_X_SYNC_REQ
message)
+ ** (and the
EXTENDED_SDTR
message)
*/
SCR_MOVE_TBL ^ SCR_MSG_OUT,
offsetof (struct dsb, smsg),
*/
SCR_MOVE_TBL ^ SCR_MSG_OUT,
offsetof (struct dsb, smsg),
@@
-2191,7
+2190,7
@@
static struct script script0 __initdata = {
/*
** Initialize the msgout buffer with a NOOP message.
*/
/*
** Initialize the msgout buffer with a NOOP message.
*/
- SCR_LOAD_REG (scratcha,
M_NO
OP),
+ SCR_LOAD_REG (scratcha,
N
OP),
0,
SCR_COPY (1),
RADDR (scratcha),
0,
SCR_COPY (1),
RADDR (scratcha),
@@
-2343,21
+2342,21
@@
static struct script script0 __initdata = {
/*
** Handle this message.
*/
/*
** Handle this message.
*/
- SCR_JUMP ^ IFTRUE (DATA (
M
_COMPLETE)),
+ SCR_JUMP ^ IFTRUE (DATA (
COMMAND
_COMPLETE)),
PADDR (complete),
PADDR (complete),
- SCR_JUMP ^ IFTRUE (DATA (
M_
DISCONNECT)),
+ SCR_JUMP ^ IFTRUE (DATA (DISCONNECT)),
PADDR (disconnect),
PADDR (disconnect),
- SCR_JUMP ^ IFTRUE (DATA (
M_SAVE_DP
)),
+ SCR_JUMP ^ IFTRUE (DATA (
SAVE_POINTERS
)),
PADDR (save_dp),
PADDR (save_dp),
- SCR_JUMP ^ IFTRUE (DATA (
M_RESTORE_DP
)),
+ SCR_JUMP ^ IFTRUE (DATA (
RESTORE_POINTERS
)),
PADDR (restore_dp),
PADDR (restore_dp),
- SCR_JUMP ^ IFTRUE (DATA (
M_EXTENDED
)),
+ SCR_JUMP ^ IFTRUE (DATA (
EXTENDED_MESSAGE
)),
PADDRH (msg_extended),
PADDRH (msg_extended),
- SCR_JUMP ^ IFTRUE (DATA (
M_NO
OP)),
+ SCR_JUMP ^ IFTRUE (DATA (
N
OP)),
PADDR (clrack),
PADDR (clrack),
- SCR_JUMP ^ IFTRUE (DATA (M_REJECT)),
+ SCR_JUMP ^ IFTRUE (DATA (M
ESSAGE
_REJECT)),
PADDRH (msg_reject),
PADDRH (msg_reject),
- SCR_JUMP ^ IFTRUE (DATA (
M_IGN
_RESIDUE)),
+ SCR_JUMP ^ IFTRUE (DATA (
IGNORE_WIDE
_RESIDUE)),
PADDRH (msg_ign_residue),
/*
** Rest of the messages left as
PADDRH (msg_ign_residue),
/*
** Rest of the messages left as
@@
-2372,7
+2371,7
@@
static struct script script0 __initdata = {
*/
SCR_INT,
SIR_REJECT_SENT,
*/
SCR_INT,
SIR_REJECT_SENT,
- SCR_LOAD_REG (scratcha, M_REJECT),
+ SCR_LOAD_REG (scratcha, M
ESSAGE
_REJECT),
0,
}/*-------------------------< SETMSG >----------------------*/,{
SCR_COPY (1),
0,
}/*-------------------------< SETMSG >----------------------*/,{
SCR_COPY (1),
@@
-2564,7
+2563,7
@@
static struct script script0 __initdata = {
/*
** If it was no ABORT message ...
*/
/*
** If it was no ABORT message ...
*/
- SCR_JUMP ^ IFTRUE (DATA (
M_ABOR
T)),
+ SCR_JUMP ^ IFTRUE (DATA (
ABORT_TASK_SE
T)),
PADDRH (msg_out_abort),
/*
** ... wait for the next phase
PADDRH (msg_out_abort),
/*
** ... wait for the next phase
@@
-2576,7
+2575,7
@@
static struct script script0 __initdata = {
/*
** ... else clear the message ...
*/
/*
** ... else clear the message ...
*/
- SCR_LOAD_REG (scratcha,
M_NO
OP),
+ SCR_LOAD_REG (scratcha,
N
OP),
0,
SCR_COPY (4),
RADDR (scratcha),
0,
SCR_COPY (4),
RADDR (scratcha),
@@
-3035,7
+3034,7
@@
static struct scripth scripth0 __initdata = {
*/
SCR_MOVE_ABS (1) ^ SCR_MSG_IN,
NADDR (msgin[2]),
*/
SCR_MOVE_ABS (1) ^ SCR_MSG_IN,
NADDR (msgin[2]),
- SCR_JUMP ^ IFTRUE (DATA (
M_X_WIDE_REQ
)),
+ SCR_JUMP ^ IFTRUE (DATA (
EXTENDED_WDTR
)),
PADDRH (msg_wdtr),
/*
** unknown extended message
PADDRH (msg_wdtr),
/*
** unknown extended message
@@
-3069,7
+3068,7
@@
static struct scripth scripth0 __initdata = {
}/*-------------------------< SEND_WDTR >----------------*/,{
/*
}/*-------------------------< SEND_WDTR >----------------*/,{
/*
- ** Send the
M_X_WIDE_REQ
+ ** Send the
EXTENDED_WDTR
*/
SCR_MOVE_ABS (4) ^ SCR_MSG_OUT,
NADDR (msgout),
*/
SCR_MOVE_ABS (4) ^ SCR_MSG_OUT,
NADDR (msgout),
@@
-3089,7
+3088,7
@@
static struct scripth scripth0 __initdata = {
*/
SCR_MOVE_ABS (1) ^ SCR_MSG_IN,
NADDR (msgin[2]),
*/
SCR_MOVE_ABS (1) ^ SCR_MSG_IN,
NADDR (msgin[2]),
- SCR_JUMP ^ IFTRUE (DATA (
M_X_SYNC_REQ
)),
+ SCR_JUMP ^ IFTRUE (DATA (
EXTENDED_SDTR
)),
PADDRH (msg_sdtr),
/*
** unknown extended message
PADDRH (msg_sdtr),
/*
** unknown extended message
@@
-3124,7
+3123,7
@@
static struct scripth scripth0 __initdata = {
}/*-------------------------< SEND_SDTR >-------------*/,{
/*
}/*-------------------------< SEND_SDTR >-------------*/,{
/*
- ** Send the
M_X_SYNC_REQ
+ ** Send the
EXTENDED_SDTR
*/
SCR_MOVE_ABS (5) ^ SCR_MSG_OUT,
NADDR (msgout),
*/
SCR_MOVE_ABS (5) ^ SCR_MSG_OUT,
NADDR (msgout),
@@
-3202,10
+3201,10
@@
static struct scripth scripth0 __initdata = {
}/*-------------------------< RESET >----------------------*/,{
/*
}/*-------------------------< RESET >----------------------*/,{
/*
- ** Send a
M
_RESET message if bad IDENTIFY
+ ** Send a
TARGET
_RESET message if bad IDENTIFY
** received on reselection.
*/
** received on reselection.
*/
- SCR_LOAD_REG (scratcha,
M_ABORT_TAG
),
+ SCR_LOAD_REG (scratcha,
ABORT_TASK
),
0,
SCR_JUMP,
PADDRH (abort_resel),
0,
SCR_JUMP,
PADDRH (abort_resel),
@@
-3213,7
+3212,7
@@
static struct scripth scripth0 __initdata = {
/*
** Abort a wrong tag received on reselection.
*/
/*
** Abort a wrong tag received on reselection.
*/
- SCR_LOAD_REG (scratcha,
M_ABORT_TAG
),
+ SCR_LOAD_REG (scratcha,
ABORT_TASK
),
0,
SCR_JUMP,
PADDRH (abort_resel),
0,
SCR_JUMP,
PADDRH (abort_resel),
@@
-3221,7
+3220,7
@@
static struct scripth scripth0 __initdata = {
/*
** Abort a reselection when no active CCB.
*/
/*
** Abort a reselection when no active CCB.
*/
- SCR_LOAD_REG (scratcha,
M_ABOR
T),
+ SCR_LOAD_REG (scratcha,
ABORT_TASK_SE
T),
0,
}/*-------------------------< ABORT_RESEL >----------------*/,{
SCR_COPY (1),
0,
}/*-------------------------< ABORT_RESEL >----------------*/,{
SCR_COPY (1),
@@
-3333,7
+3332,7
@@
static struct scripth scripth0 __initdata = {
** Read the message, since we got it directly
** from the SCSI BUS data lines.
** Signal problem to C code for logging the event.
** Read the message, since we got it directly
** from the SCSI BUS data lines.
** Signal problem to C code for logging the event.
- ** Send a
M_ABOR
T to clear all pending tasks.
+ ** Send a
n ABORT_TASK_SE
T to clear all pending tasks.
*/
SCR_INT,
SIR_RESEL_BAD_LUN,
*/
SCR_INT,
SIR_RESEL_BAD_LUN,
@@
-3345,7
+3344,7
@@
static struct scripth scripth0 __initdata = {
/*
** We donnot have a task for that I_T_L.
** Signal problem to C code for logging the event.
/*
** We donnot have a task for that I_T_L.
** Signal problem to C code for logging the event.
- ** Send a
M_ABOR
T message.
+ ** Send a
n ABORT_TASK_SE
T message.
*/
SCR_INT,
SIR_RESEL_BAD_I_T_L,
*/
SCR_INT,
SIR_RESEL_BAD_I_T_L,
@@
-3355,7
+3354,7
@@
static struct scripth scripth0 __initdata = {
/*
** We donnot have a task that matches the tag.
** Signal problem to C code for logging the event.
/*
** We donnot have a task that matches the tag.
** Signal problem to C code for logging the event.
- ** Send a
M_ABORTTAG
message.
+ ** Send a
n ABORT_TASK
message.
*/
SCR_INT,
SIR_RESEL_BAD_I_T_L_Q,
*/
SCR_INT,
SIR_RESEL_BAD_I_T_L_Q,
@@
-3366,7
+3365,7
@@
static struct scripth scripth0 __initdata = {
** We donnot know the target that reselected us.
** Grab the first message if any (IDENTIFY).
** Signal problem to C code for logging the event.
** We donnot know the target that reselected us.
** Grab the first message if any (IDENTIFY).
** Signal problem to C code for logging the event.
- **
M
_RESET message.
+ **
TARGET
_RESET message.
*/
SCR_INT,
SIR_RESEL_BAD_TARGET,
*/
SCR_INT,
SIR_RESEL_BAD_TARGET,
@@
-4109,17
+4108,11
@@
static int ncr_prepare_nego(struct ncb *np, struct ccb *cp, u_char *msgptr)
switch (nego) {
case NS_SYNC:
switch (nego) {
case NS_SYNC:
- msgptr[msglen++] = M_EXTENDED;
- msgptr[msglen++] = 3;
- msgptr[msglen++] = M_X_SYNC_REQ;
- msgptr[msglen++] = tp->maxoffs ? tp->minsync : 0;
- msgptr[msglen++] = tp->maxoffs;
+ msglen += spi_populate_sync_msg(msgptr + msglen,
+ tp->maxoffs ? tp->minsync : 0, tp->maxoffs);
break;
case NS_WIDE:
break;
case NS_WIDE:
- msgptr[msglen++] = M_EXTENDED;
- msgptr[msglen++] = 2;
- msgptr[msglen++] = M_X_WIDE_REQ;
- msgptr[msglen++] = tp->usrwide;
+ msglen += spi_populate_width_msg(msgptr + msglen, tp->usrwide);
break;
}
break;
}
@@
-4220,7
+4213,7
@@
static int ncr_queue_command (struct ncb *np, struct scsi_cmnd *cmd)
**----------------------------------------------------
*/
**----------------------------------------------------
*/
- idmsg =
M_IDENTIFY | sdev->lun
;
+ idmsg =
IDENTIFY(0, sdev->lun)
;
if (cp ->tag != NO_TAG ||
(cp != np->ccb && np->disc && !(tp->usrflag & UF_NODISC)))
if (cp ->tag != NO_TAG ||
(cp != np->ccb && np->disc && !(tp->usrflag & UF_NODISC)))
@@
-4239,7
+4232,7
@@
static int ncr_queue_command (struct ncb *np, struct scsi_cmnd *cmd)
*/
if (lp && time_after(jiffies, lp->tags_stime)) {
if (lp->tags_smap) {
*/
if (lp && time_after(jiffies, lp->tags_stime)) {
if (lp->tags_smap) {
- order =
M_ORDERED
_TAG;
+ order =
ORDERED_QUEUE
_TAG;
if ((DEBUG_FLAGS & DEBUG_TAGS)||bootverbose>2){
PRINT_ADDR(cmd,
"ordered tag forced.\n");
if ((DEBUG_FLAGS & DEBUG_TAGS)||bootverbose>2){
PRINT_ADDR(cmd,
"ordered tag forced.\n");
@@
-4257,10
+4250,10
@@
static int ncr_queue_command (struct ncb *np, struct scsi_cmnd *cmd)
case 0x08: /* READ_SMALL (6) */
case 0x28: /* READ_BIG (10) */
case 0xa8: /* READ_HUGE (12) */
case 0x08: /* READ_SMALL (6) */
case 0x28: /* READ_BIG (10) */
case 0xa8: /* READ_HUGE (12) */
- order =
M_SIMPL
E_TAG;
+ order =
SIMPLE_QUEU
E_TAG;
break;
default:
break;
default:
- order =
M_ORDERED
_TAG;
+ order =
ORDERED_QUEUE
_TAG;
}
}
msgptr[msglen++] = order;
}
}
msgptr[msglen++] = order;
@@
-5117,7
+5110,7
@@
void ncr_complete (struct ncb *np, struct ccb *cp)
/*
** This CCB has been skipped by the NCR.
/*
** This CCB has been skipped by the NCR.
-** Queue it in the correponding unit queue.
+** Queue it in the corre
s
ponding unit queue.
*/
static void ncr_ccb_skipped(struct ncb *np, struct ccb *cp)
{
*/
static void ncr_ccb_skipped(struct ncb *np, struct ccb *cp)
{
@@
-5128,8
+5121,7
@@
static void ncr_ccb_skipped(struct ncb *np, struct ccb *cp)
cp->host_status &= ~HS_SKIPMASK;
cp->start.schedule.l_paddr =
cpu_to_scr(NCB_SCRIPT_PHYS (np, select));
cp->host_status &= ~HS_SKIPMASK;
cp->start.schedule.l_paddr =
cpu_to_scr(NCB_SCRIPT_PHYS (np, select));
- list_del(&cp->link_ccbq);
- list_add_tail(&cp->link_ccbq, &lp->skip_ccbq);
+ list_move_tail(&cp->link_ccbq, &lp->skip_ccbq);
if (cp->queued) {
--lp->queuedccbs;
}
if (cp->queued) {
--lp->queuedccbs;
}
@@
-5907,8
+5899,8
@@
static void ncr_log_hard_error(struct ncb *np, u16 sist, u_char dstat)
**
** In normal cases, interrupt conditions occur one at a
** time. The ncr is able to stack in some extra registers
**
** In normal cases, interrupt conditions occur one at a
** time. The ncr is able to stack in some extra registers
-** other interrupts that will occur
s
after the first one.
-** But
several
l interrupts may occur at the same time.
+** other interrupts that will occur after the first one.
+** But
, severa
l interrupts may occur at the same time.
**
** We probably should only try to deal with the normal
** case, but it seems that multiple interrupts occur in
**
** We probably should only try to deal with the normal
** case, but it seems that multiple interrupts occur in
@@
-6229,9
+6221,9
@@
static int ncr_int_par (struct ncb *np)
if (!(dbc & 0xc0000000))
phase = (dbc >> 24) & 7;
if (phase == 7)
if (!(dbc & 0xc0000000))
phase = (dbc >> 24) & 7;
if (phase == 7)
- msg = M
_PARITY
;
+ msg = M
SG_PARITY_ERROR
;
else
else
- msg =
M_ID
_ERROR;
+ msg =
INITIATOR
_ERROR;
/*
/*
@@
-6795,6
+6787,8
@@
void ncr_int_sir (struct ncb *np)
/*-----------------------------------------------------------------------------
**
** Was Sie schon immer ueber transfermode negotiation wissen wollten ...
/*-----------------------------------------------------------------------------
**
** Was Sie schon immer ueber transfermode negotiation wissen wollten ...
+** ("Everything you've always wanted to know about transfer mode
+** negotiation")
**
** We try to negotiate sync and wide transfer only after
** a successful inquire command. We look at byte 7 of the
**
** We try to negotiate sync and wide transfer only after
** a successful inquire command. We look at byte 7 of the
@@
-6805,7
+6799,7
@@
void ncr_int_sir (struct ncb *np)
** The host status field is set to HS_NEGOTIATE to mark this
** situation.
**
** The host status field is set to HS_NEGOTIATE to mark this
** situation.
**
-** If the target doesn't answer this message imm
i
diately
+** If the target doesn't answer this message imm
e
diately
** (as required by the standard), the SIR_NEGO_FAIL interrupt
** will be raised eventually.
** The handler removes the HS_NEGOTIATE status, and sets the
** (as required by the standard), the SIR_NEGO_FAIL interrupt
** will be raised eventually.
** The handler removes the HS_NEGOTIATE status, and sets the
@@
-6896,8
+6890,8
@@
void ncr_int_sir (struct ncb *np)
break;
}
break;
}
- np->msgin [0] =
M_NO
OP;
- np->msgout[0] =
M_NO
OP;
+ np->msgin [0] =
N
OP;
+ np->msgout[0] =
N
OP;
cp->nego_status = 0;
break;
cp->nego_status = 0;
break;
@@
-6991,12
+6985,7
@@
void ncr_int_sir (struct ncb *np)
spi_offset(starget) = ofs;
ncr_setsync(np, cp, scntl3, (fak<<5)|ofs);
spi_offset(starget) = ofs;
ncr_setsync(np, cp, scntl3, (fak<<5)|ofs);
- np->msgout[0] = M_EXTENDED;
- np->msgout[1] = 3;
- np->msgout[2] = M_X_SYNC_REQ;
- np->msgout[3] = per;
- np->msgout[4] = ofs;
-
+ spi_populate_sync_msg(np->msgout, per, ofs);
cp->nego_status = NS_SYNC;
if (DEBUG_FLAGS & DEBUG_NEGO) {
cp->nego_status = NS_SYNC;
if (DEBUG_FLAGS & DEBUG_NEGO) {
@@
-7007,7
+6996,7
@@
void ncr_int_sir (struct ncb *np)
OUTL_DSP (NCB_SCRIPT_PHYS (np, msg_bad));
return;
}
OUTL_DSP (NCB_SCRIPT_PHYS (np, msg_bad));
return;
}
- np->msgin [0] =
M_NO
OP;
+ np->msgin [0] =
N
OP;
break;
break;
@@
-7082,13
+7071,9
@@
void ncr_int_sir (struct ncb *np)
spi_width(starget) = wide;
ncr_setwide(np, cp, wide, 1);
spi_width(starget) = wide;
ncr_setwide(np, cp, wide, 1);
+ spi_populate_width_msg(np->msgout, wide);
- np->msgout[0] = M_EXTENDED;
- np->msgout[1] = 2;
- np->msgout[2] = M_X_WIDE_REQ;
- np->msgout[3] = wide;
-
- np->msgin [0] = M_NOOP;
+ np->msgin [0] = NOP;
cp->nego_status = NS_WIDE;
cp->nego_status = NS_WIDE;
@@
-7107,12
+7092,12
@@
void ncr_int_sir (struct ncb *np)
case SIR_REJECT_RECEIVED:
/*-----------------------------------------------
**
case SIR_REJECT_RECEIVED:
/*-----------------------------------------------
**
- ** We received a M
_REJECT message
.
+ ** We received a M
ESSAGE_REJECT
.
**
**-----------------------------------------------
*/
**
**-----------------------------------------------
*/
- PRINT_ADDR(cp->cmd, "M_REJECT received (%x:%x).\n",
+ PRINT_ADDR(cp->cmd, "M
ESSAGE
_REJECT received (%x:%x).\n",
(unsigned)scr_to_cpu(np->lastmsg), np->msgout[0]);
break;
(unsigned)scr_to_cpu(np->lastmsg), np->msgout[0]);
break;
@@
-7124,7
+7109,7
@@
void ncr_int_sir (struct ncb *np)
**-----------------------------------------------
*/
**-----------------------------------------------
*/
- ncr_print_msg(cp, "M_REJECT sent for", np->msgin);
+ ncr_print_msg(cp, "M
ESSAGE
_REJECT sent for", np->msgin);
break;
/*--------------------------------------------------------------------
break;
/*--------------------------------------------------------------------
@@
-7143,7
+7128,7
@@
void ncr_int_sir (struct ncb *np)
**-----------------------------------------------
*/
**-----------------------------------------------
*/
- PRINT_ADDR(cp->cmd, "
M_IGN
_RESIDUE received, but not yet "
+ PRINT_ADDR(cp->cmd, "
IGNORE_WIDE
_RESIDUE received, but not yet "
"implemented.\n");
break;
#if 0
"implemented.\n");
break;
#if 0
@@
-7156,7
+7141,7
@@
void ncr_int_sir (struct ncb *np)
**-----------------------------------------------
*/
**-----------------------------------------------
*/
- PRINT_ADDR(cp->cmd, "
M_
DISCONNECT received, but datapointer "
+ PRINT_ADDR(cp->cmd, "DISCONNECT received, but datapointer "
"not saved: data=%x save=%x goal=%x.\n",
(unsigned) INL (nc_temp),
(unsigned) scr_to_cpu(np->header.savep),
"not saved: data=%x save=%x goal=%x.\n",
(unsigned) INL (nc_temp),
(unsigned) scr_to_cpu(np->header.savep),
@@
-7714,7
+7699,7
@@
static int ncr_scatter(struct ncb *np, struct ccb *cp, struct scsi_cmnd *cmd)
if (!use_sg)
segment = ncr_scatter_no_sglist(np, cp, cmd);
else if ((use_sg = map_scsi_sg_data(np, cmd)) > 0) {
if (!use_sg)
segment = ncr_scatter_no_sglist(np, cp, cmd);
else if ((use_sg = map_scsi_sg_data(np, cmd)) > 0) {
- struct scatterlist *scatter = (struct scatterlist *)cmd->buffer;
+ struct scatterlist *scatter = (struct scatterlist *)cmd->
request_
buffer;
struct scr_tblmove *data;
if (use_sg > MAX_SCATTER) {
struct scr_tblmove *data;
if (use_sg > MAX_SCATTER) {
@@
-7862,7
+7847,7
@@
static int __init ncr_snooptest (struct ncb* np)
**==========================================================
**
** Note: we have to return the correct value.
**==========================================================
**
** Note: we have to return the correct value.
-** THERE IS NO SA
V
E DEFAULT VALUE.
+** THERE IS NO SA
F
E DEFAULT VALUE.
**
** Most NCR/SYMBIOS boards are delivered with a 40 Mhz clock.
** 53C860 and 53C875 rev. 1 support fast20 transfers but
**
** Most NCR/SYMBIOS boards are delivered with a 40 Mhz clock.
** 53C860 and 53C875 rev. 1 support fast20 transfers but
@@
-8129,7
+8114,7
@@
printk("ncr53c8xx : command successfully queued\n");
return sts;
}
return sts;
}
-irqreturn_t ncr53c8xx_intr(int irq, void *dev_id
, struct pt_regs * regs
)
+irqreturn_t ncr53c8xx_intr(int irq, void *dev_id)
{
unsigned long flags;
struct Scsi_Host *shost = (struct Scsi_Host *)dev_id;
{
unsigned long flags;
struct Scsi_Host *shost = (struct Scsi_Host *)dev_id;
@@
-8339,12
+8324,12
@@
char *ncr53c8xx; /* command line passed by insmod */
module_param(ncr53c8xx, charp, 0);
#endif
module_param(ncr53c8xx, charp, 0);
#endif
+#ifndef MODULE
static int __init ncr53c8xx_setup(char *str)
{
return sym53c8xx__setup(str);
}
static int __init ncr53c8xx_setup(char *str)
{
return sym53c8xx__setup(str);
}
-#ifndef MODULE
__setup("ncr53c8xx=", ncr53c8xx_setup);
#endif
__setup("ncr53c8xx=", ncr53c8xx_setup);
#endif
@@
-8562,7
+8547,7
@@
struct Scsi_Host * __init ncr_attach(struct scsi_host_template *tpnt,
/* use SIMPLE TAG messages by default */
#ifdef SCSI_NCR_ALWAYS_SIMPLE_TAG
/* use SIMPLE TAG messages by default */
#ifdef SCSI_NCR_ALWAYS_SIMPLE_TAG
- np->order =
M_SIMPL
E_TAG;
+ np->order =
SIMPLE_QUEU
E_TAG;
#endif
spin_unlock_irqrestore(&np->smp_lock, flags);
#endif
spin_unlock_irqrestore(&np->smp_lock, flags);