diff options
Diffstat (limited to 'drivers/scsi/ncr53c8xx.c')
-rw-r--r-- | drivers/scsi/ncr53c8xx.c | 127 |
1 files changed, 55 insertions, 72 deletions
diff --git a/drivers/scsi/ncr53c8xx.c b/drivers/scsi/ncr53c8xx.c index 32350707b940..22f913127f08 100644 --- a/drivers/scsi/ncr53c8xx.c +++ b/drivers/scsi/ncr53c8xx.c | |||
@@ -69,6 +69,10 @@ | |||
69 | ** Low PCI traffic for command handling when on-chip RAM is present. | 69 | ** Low PCI traffic for command handling when on-chip RAM is present. |
70 | ** Aggressive SCSI SCRIPTS optimizations. | 70 | ** Aggressive SCSI SCRIPTS optimizations. |
71 | ** | 71 | ** |
72 | ** 2005 by Matthew Wilcox and James Bottomley | ||
73 | ** PCI-ectomy. This driver now supports only the 720 chip (see the | ||
74 | ** NCR_Q720 and zalon drivers for the bus probe logic). | ||
75 | ** | ||
72 | ******************************************************************************* | 76 | ******************************************************************************* |
73 | */ | 77 | */ |
74 | 78 | ||
@@ -90,13 +94,6 @@ | |||
90 | 94 | ||
91 | #define SCSI_NCR_DEBUG_FLAGS (0) | 95 | #define SCSI_NCR_DEBUG_FLAGS (0) |
92 | 96 | ||
93 | /*========================================================== | ||
94 | ** | ||
95 | ** Include files | ||
96 | ** | ||
97 | **========================================================== | ||
98 | */ | ||
99 | |||
100 | #include <linux/blkdev.h> | 97 | #include <linux/blkdev.h> |
101 | #include <linux/delay.h> | 98 | #include <linux/delay.h> |
102 | #include <linux/dma-mapping.h> | 99 | #include <linux/dma-mapping.h> |
@@ -121,6 +118,7 @@ | |||
121 | 118 | ||
122 | #include <scsi/scsi.h> | 119 | #include <scsi/scsi.h> |
123 | #include <scsi/scsi_cmnd.h> | 120 | #include <scsi/scsi_cmnd.h> |
121 | #include <scsi/scsi_dbg.h> | ||
124 | #include <scsi/scsi_device.h> | 122 | #include <scsi/scsi_device.h> |
125 | #include <scsi/scsi_tcq.h> | 123 | #include <scsi/scsi_tcq.h> |
126 | #include <scsi/scsi_transport.h> | 124 | #include <scsi/scsi_transport.h> |
@@ -128,10 +126,8 @@ | |||
128 | 126 | ||
129 | #include "ncr53c8xx.h" | 127 | #include "ncr53c8xx.h" |
130 | 128 | ||
131 | #define NAME53C "ncr53c" | ||
132 | #define NAME53C8XX "ncr53c8xx" | 129 | #define NAME53C8XX "ncr53c8xx" |
133 | 130 | ||
134 | |||
135 | /*========================================================== | 131 | /*========================================================== |
136 | ** | 132 | ** |
137 | ** Debugging tags | 133 | ** Debugging tags |
@@ -2111,7 +2107,7 @@ static struct script script0 __initdata = { | |||
2111 | */ | 2107 | */ |
2112 | 2108 | ||
2113 | /* | 2109 | /* |
2114 | ** The M_REJECT problem seems to be due to a selection | 2110 | ** The MESSAGE_REJECT problem seems to be due to a selection |
2115 | ** timing problem. | 2111 | ** timing problem. |
2116 | ** Wait immediately for the selection to complete. | 2112 | ** Wait immediately for the selection to complete. |
2117 | ** (2.5x behaves so) | 2113 | ** (2.5x behaves so) |
@@ -2162,7 +2158,7 @@ static struct script script0 __initdata = { | |||
2162 | /* | 2158 | /* |
2163 | ** Selection complete. | 2159 | ** Selection complete. |
2164 | ** Send the IDENTIFY and SIMPLE_TAG messages | 2160 | ** Send the IDENTIFY and SIMPLE_TAG messages |
2165 | ** (and the M_X_SYNC_REQ message) | 2161 | ** (and the EXTENDED_SDTR message) |
2166 | */ | 2162 | */ |
2167 | SCR_MOVE_TBL ^ SCR_MSG_OUT, | 2163 | SCR_MOVE_TBL ^ SCR_MSG_OUT, |
2168 | offsetof (struct dsb, smsg), | 2164 | offsetof (struct dsb, smsg), |
@@ -2191,7 +2187,7 @@ static struct script script0 __initdata = { | |||
2191 | /* | 2187 | /* |
2192 | ** Initialize the msgout buffer with a NOOP message. | 2188 | ** Initialize the msgout buffer with a NOOP message. |
2193 | */ | 2189 | */ |
2194 | SCR_LOAD_REG (scratcha, M_NOOP), | 2190 | SCR_LOAD_REG (scratcha, NOP), |
2195 | 0, | 2191 | 0, |
2196 | SCR_COPY (1), | 2192 | SCR_COPY (1), |
2197 | RADDR (scratcha), | 2193 | RADDR (scratcha), |
@@ -2343,21 +2339,21 @@ static struct script script0 __initdata = { | |||
2343 | /* | 2339 | /* |
2344 | ** Handle this message. | 2340 | ** Handle this message. |
2345 | */ | 2341 | */ |
2346 | SCR_JUMP ^ IFTRUE (DATA (M_COMPLETE)), | 2342 | SCR_JUMP ^ IFTRUE (DATA (COMMAND_COMPLETE)), |
2347 | PADDR (complete), | 2343 | PADDR (complete), |
2348 | SCR_JUMP ^ IFTRUE (DATA (M_DISCONNECT)), | 2344 | SCR_JUMP ^ IFTRUE (DATA (DISCONNECT)), |
2349 | PADDR (disconnect), | 2345 | PADDR (disconnect), |
2350 | SCR_JUMP ^ IFTRUE (DATA (M_SAVE_DP)), | 2346 | SCR_JUMP ^ IFTRUE (DATA (SAVE_POINTERS)), |
2351 | PADDR (save_dp), | 2347 | PADDR (save_dp), |
2352 | SCR_JUMP ^ IFTRUE (DATA (M_RESTORE_DP)), | 2348 | SCR_JUMP ^ IFTRUE (DATA (RESTORE_POINTERS)), |
2353 | PADDR (restore_dp), | 2349 | PADDR (restore_dp), |
2354 | SCR_JUMP ^ IFTRUE (DATA (M_EXTENDED)), | 2350 | SCR_JUMP ^ IFTRUE (DATA (EXTENDED_MESSAGE)), |
2355 | PADDRH (msg_extended), | 2351 | PADDRH (msg_extended), |
2356 | SCR_JUMP ^ IFTRUE (DATA (M_NOOP)), | 2352 | SCR_JUMP ^ IFTRUE (DATA (NOP)), |
2357 | PADDR (clrack), | 2353 | PADDR (clrack), |
2358 | SCR_JUMP ^ IFTRUE (DATA (M_REJECT)), | 2354 | SCR_JUMP ^ IFTRUE (DATA (MESSAGE_REJECT)), |
2359 | PADDRH (msg_reject), | 2355 | PADDRH (msg_reject), |
2360 | SCR_JUMP ^ IFTRUE (DATA (M_IGN_RESIDUE)), | 2356 | SCR_JUMP ^ IFTRUE (DATA (IGNORE_WIDE_RESIDUE)), |
2361 | PADDRH (msg_ign_residue), | 2357 | PADDRH (msg_ign_residue), |
2362 | /* | 2358 | /* |
2363 | ** Rest of the messages left as | 2359 | ** Rest of the messages left as |
@@ -2372,7 +2368,7 @@ static struct script script0 __initdata = { | |||
2372 | */ | 2368 | */ |
2373 | SCR_INT, | 2369 | SCR_INT, |
2374 | SIR_REJECT_SENT, | 2370 | SIR_REJECT_SENT, |
2375 | SCR_LOAD_REG (scratcha, M_REJECT), | 2371 | SCR_LOAD_REG (scratcha, MESSAGE_REJECT), |
2376 | 0, | 2372 | 0, |
2377 | }/*-------------------------< SETMSG >----------------------*/,{ | 2373 | }/*-------------------------< SETMSG >----------------------*/,{ |
2378 | SCR_COPY (1), | 2374 | SCR_COPY (1), |
@@ -2564,7 +2560,7 @@ static struct script script0 __initdata = { | |||
2564 | /* | 2560 | /* |
2565 | ** If it was no ABORT message ... | 2561 | ** If it was no ABORT message ... |
2566 | */ | 2562 | */ |
2567 | SCR_JUMP ^ IFTRUE (DATA (M_ABORT)), | 2563 | SCR_JUMP ^ IFTRUE (DATA (ABORT_TASK_SET)), |
2568 | PADDRH (msg_out_abort), | 2564 | PADDRH (msg_out_abort), |
2569 | /* | 2565 | /* |
2570 | ** ... wait for the next phase | 2566 | ** ... wait for the next phase |
@@ -2576,7 +2572,7 @@ static struct script script0 __initdata = { | |||
2576 | /* | 2572 | /* |
2577 | ** ... else clear the message ... | 2573 | ** ... else clear the message ... |
2578 | */ | 2574 | */ |
2579 | SCR_LOAD_REG (scratcha, M_NOOP), | 2575 | SCR_LOAD_REG (scratcha, NOP), |
2580 | 0, | 2576 | 0, |
2581 | SCR_COPY (4), | 2577 | SCR_COPY (4), |
2582 | RADDR (scratcha), | 2578 | RADDR (scratcha), |
@@ -3035,7 +3031,7 @@ static struct scripth scripth0 __initdata = { | |||
3035 | */ | 3031 | */ |
3036 | SCR_MOVE_ABS (1) ^ SCR_MSG_IN, | 3032 | SCR_MOVE_ABS (1) ^ SCR_MSG_IN, |
3037 | NADDR (msgin[2]), | 3033 | NADDR (msgin[2]), |
3038 | SCR_JUMP ^ IFTRUE (DATA (M_X_WIDE_REQ)), | 3034 | SCR_JUMP ^ IFTRUE (DATA (EXTENDED_WDTR)), |
3039 | PADDRH (msg_wdtr), | 3035 | PADDRH (msg_wdtr), |
3040 | /* | 3036 | /* |
3041 | ** unknown extended message | 3037 | ** unknown extended message |
@@ -3069,7 +3065,7 @@ static struct scripth scripth0 __initdata = { | |||
3069 | 3065 | ||
3070 | }/*-------------------------< SEND_WDTR >----------------*/,{ | 3066 | }/*-------------------------< SEND_WDTR >----------------*/,{ |
3071 | /* | 3067 | /* |
3072 | ** Send the M_X_WIDE_REQ | 3068 | ** Send the EXTENDED_WDTR |
3073 | */ | 3069 | */ |
3074 | SCR_MOVE_ABS (4) ^ SCR_MSG_OUT, | 3070 | SCR_MOVE_ABS (4) ^ SCR_MSG_OUT, |
3075 | NADDR (msgout), | 3071 | NADDR (msgout), |
@@ -3089,7 +3085,7 @@ static struct scripth scripth0 __initdata = { | |||
3089 | */ | 3085 | */ |
3090 | SCR_MOVE_ABS (1) ^ SCR_MSG_IN, | 3086 | SCR_MOVE_ABS (1) ^ SCR_MSG_IN, |
3091 | NADDR (msgin[2]), | 3087 | NADDR (msgin[2]), |
3092 | SCR_JUMP ^ IFTRUE (DATA (M_X_SYNC_REQ)), | 3088 | SCR_JUMP ^ IFTRUE (DATA (EXTENDED_SDTR)), |
3093 | PADDRH (msg_sdtr), | 3089 | PADDRH (msg_sdtr), |
3094 | /* | 3090 | /* |
3095 | ** unknown extended message | 3091 | ** unknown extended message |
@@ -3124,7 +3120,7 @@ static struct scripth scripth0 __initdata = { | |||
3124 | 3120 | ||
3125 | }/*-------------------------< SEND_SDTR >-------------*/,{ | 3121 | }/*-------------------------< SEND_SDTR >-------------*/,{ |
3126 | /* | 3122 | /* |
3127 | ** Send the M_X_SYNC_REQ | 3123 | ** Send the EXTENDED_SDTR |
3128 | */ | 3124 | */ |
3129 | SCR_MOVE_ABS (5) ^ SCR_MSG_OUT, | 3125 | SCR_MOVE_ABS (5) ^ SCR_MSG_OUT, |
3130 | NADDR (msgout), | 3126 | NADDR (msgout), |
@@ -3202,10 +3198,10 @@ static struct scripth scripth0 __initdata = { | |||
3202 | 3198 | ||
3203 | }/*-------------------------< RESET >----------------------*/,{ | 3199 | }/*-------------------------< RESET >----------------------*/,{ |
3204 | /* | 3200 | /* |
3205 | ** Send a M_RESET message if bad IDENTIFY | 3201 | ** Send a TARGET_RESET message if bad IDENTIFY |
3206 | ** received on reselection. | 3202 | ** received on reselection. |
3207 | */ | 3203 | */ |
3208 | SCR_LOAD_REG (scratcha, M_ABORT_TAG), | 3204 | SCR_LOAD_REG (scratcha, ABORT_TASK), |
3209 | 0, | 3205 | 0, |
3210 | SCR_JUMP, | 3206 | SCR_JUMP, |
3211 | PADDRH (abort_resel), | 3207 | PADDRH (abort_resel), |
@@ -3213,7 +3209,7 @@ static struct scripth scripth0 __initdata = { | |||
3213 | /* | 3209 | /* |
3214 | ** Abort a wrong tag received on reselection. | 3210 | ** Abort a wrong tag received on reselection. |
3215 | */ | 3211 | */ |
3216 | SCR_LOAD_REG (scratcha, M_ABORT_TAG), | 3212 | SCR_LOAD_REG (scratcha, ABORT_TASK), |
3217 | 0, | 3213 | 0, |
3218 | SCR_JUMP, | 3214 | SCR_JUMP, |
3219 | PADDRH (abort_resel), | 3215 | PADDRH (abort_resel), |
@@ -3221,7 +3217,7 @@ static struct scripth scripth0 __initdata = { | |||
3221 | /* | 3217 | /* |
3222 | ** Abort a reselection when no active CCB. | 3218 | ** Abort a reselection when no active CCB. |
3223 | */ | 3219 | */ |
3224 | SCR_LOAD_REG (scratcha, M_ABORT), | 3220 | SCR_LOAD_REG (scratcha, ABORT_TASK_SET), |
3225 | 0, | 3221 | 0, |
3226 | }/*-------------------------< ABORT_RESEL >----------------*/,{ | 3222 | }/*-------------------------< ABORT_RESEL >----------------*/,{ |
3227 | SCR_COPY (1), | 3223 | SCR_COPY (1), |
@@ -3333,7 +3329,7 @@ static struct scripth scripth0 __initdata = { | |||
3333 | ** Read the message, since we got it directly | 3329 | ** Read the message, since we got it directly |
3334 | ** from the SCSI BUS data lines. | 3330 | ** from the SCSI BUS data lines. |
3335 | ** Signal problem to C code for logging the event. | 3331 | ** Signal problem to C code for logging the event. |
3336 | ** Send a M_ABORT to clear all pending tasks. | 3332 | ** Send an ABORT_TASK_SET to clear all pending tasks. |
3337 | */ | 3333 | */ |
3338 | SCR_INT, | 3334 | SCR_INT, |
3339 | SIR_RESEL_BAD_LUN, | 3335 | SIR_RESEL_BAD_LUN, |
@@ -3345,7 +3341,7 @@ static struct scripth scripth0 __initdata = { | |||
3345 | /* | 3341 | /* |
3346 | ** We donnot have a task for that I_T_L. | 3342 | ** We donnot have a task for that I_T_L. |
3347 | ** Signal problem to C code for logging the event. | 3343 | ** Signal problem to C code for logging the event. |
3348 | ** Send a M_ABORT message. | 3344 | ** Send an ABORT_TASK_SET message. |
3349 | */ | 3345 | */ |
3350 | SCR_INT, | 3346 | SCR_INT, |
3351 | SIR_RESEL_BAD_I_T_L, | 3347 | SIR_RESEL_BAD_I_T_L, |
@@ -3355,7 +3351,7 @@ static struct scripth scripth0 __initdata = { | |||
3355 | /* | 3351 | /* |
3356 | ** We donnot have a task that matches the tag. | 3352 | ** We donnot have a task that matches the tag. |
3357 | ** Signal problem to C code for logging the event. | 3353 | ** Signal problem to C code for logging the event. |
3358 | ** Send a M_ABORTTAG message. | 3354 | ** Send an ABORT_TASK message. |
3359 | */ | 3355 | */ |
3360 | SCR_INT, | 3356 | SCR_INT, |
3361 | SIR_RESEL_BAD_I_T_L_Q, | 3357 | SIR_RESEL_BAD_I_T_L_Q, |
@@ -3366,7 +3362,7 @@ static struct scripth scripth0 __initdata = { | |||
3366 | ** We donnot know the target that reselected us. | 3362 | ** We donnot know the target that reselected us. |
3367 | ** Grab the first message if any (IDENTIFY). | 3363 | ** Grab the first message if any (IDENTIFY). |
3368 | ** Signal problem to C code for logging the event. | 3364 | ** Signal problem to C code for logging the event. |
3369 | ** M_RESET message. | 3365 | ** TARGET_RESET message. |
3370 | */ | 3366 | */ |
3371 | SCR_INT, | 3367 | SCR_INT, |
3372 | SIR_RESEL_BAD_TARGET, | 3368 | SIR_RESEL_BAD_TARGET, |
@@ -4109,17 +4105,11 @@ static int ncr_prepare_nego(struct ncb *np, struct ccb *cp, u_char *msgptr) | |||
4109 | 4105 | ||
4110 | switch (nego) { | 4106 | switch (nego) { |
4111 | case NS_SYNC: | 4107 | case NS_SYNC: |
4112 | msgptr[msglen++] = M_EXTENDED; | 4108 | msglen += spi_populate_sync_msg(msgptr + msglen, |
4113 | msgptr[msglen++] = 3; | 4109 | tp->maxoffs ? tp->minsync : 0, tp->maxoffs); |
4114 | msgptr[msglen++] = M_X_SYNC_REQ; | ||
4115 | msgptr[msglen++] = tp->maxoffs ? tp->minsync : 0; | ||
4116 | msgptr[msglen++] = tp->maxoffs; | ||
4117 | break; | 4110 | break; |
4118 | case NS_WIDE: | 4111 | case NS_WIDE: |
4119 | msgptr[msglen++] = M_EXTENDED; | 4112 | msglen += spi_populate_width_msg(msgptr + msglen, tp->usrwide); |
4120 | msgptr[msglen++] = 2; | ||
4121 | msgptr[msglen++] = M_X_WIDE_REQ; | ||
4122 | msgptr[msglen++] = tp->usrwide; | ||
4123 | break; | 4113 | break; |
4124 | } | 4114 | } |
4125 | 4115 | ||
@@ -4220,7 +4210,7 @@ static int ncr_queue_command (struct ncb *np, struct scsi_cmnd *cmd) | |||
4220 | **---------------------------------------------------- | 4210 | **---------------------------------------------------- |
4221 | */ | 4211 | */ |
4222 | 4212 | ||
4223 | idmsg = M_IDENTIFY | sdev->lun; | 4213 | idmsg = IDENTIFY(0, sdev->lun); |
4224 | 4214 | ||
4225 | if (cp ->tag != NO_TAG || | 4215 | if (cp ->tag != NO_TAG || |
4226 | (cp != np->ccb && np->disc && !(tp->usrflag & UF_NODISC))) | 4216 | (cp != np->ccb && np->disc && !(tp->usrflag & UF_NODISC))) |
@@ -4239,7 +4229,7 @@ static int ncr_queue_command (struct ncb *np, struct scsi_cmnd *cmd) | |||
4239 | */ | 4229 | */ |
4240 | if (lp && time_after(jiffies, lp->tags_stime)) { | 4230 | if (lp && time_after(jiffies, lp->tags_stime)) { |
4241 | if (lp->tags_smap) { | 4231 | if (lp->tags_smap) { |
4242 | order = M_ORDERED_TAG; | 4232 | order = ORDERED_QUEUE_TAG; |
4243 | if ((DEBUG_FLAGS & DEBUG_TAGS)||bootverbose>2){ | 4233 | if ((DEBUG_FLAGS & DEBUG_TAGS)||bootverbose>2){ |
4244 | PRINT_ADDR(cmd, | 4234 | PRINT_ADDR(cmd, |
4245 | "ordered tag forced.\n"); | 4235 | "ordered tag forced.\n"); |
@@ -4257,10 +4247,10 @@ static int ncr_queue_command (struct ncb *np, struct scsi_cmnd *cmd) | |||
4257 | case 0x08: /* READ_SMALL (6) */ | 4247 | case 0x08: /* READ_SMALL (6) */ |
4258 | case 0x28: /* READ_BIG (10) */ | 4248 | case 0x28: /* READ_BIG (10) */ |
4259 | case 0xa8: /* READ_HUGE (12) */ | 4249 | case 0xa8: /* READ_HUGE (12) */ |
4260 | order = M_SIMPLE_TAG; | 4250 | order = SIMPLE_QUEUE_TAG; |
4261 | break; | 4251 | break; |
4262 | default: | 4252 | default: |
4263 | order = M_ORDERED_TAG; | 4253 | order = ORDERED_QUEUE_TAG; |
4264 | } | 4254 | } |
4265 | } | 4255 | } |
4266 | msgptr[msglen++] = order; | 4256 | msgptr[msglen++] = order; |
@@ -6229,9 +6219,9 @@ static int ncr_int_par (struct ncb *np) | |||
6229 | if (!(dbc & 0xc0000000)) | 6219 | if (!(dbc & 0xc0000000)) |
6230 | phase = (dbc >> 24) & 7; | 6220 | phase = (dbc >> 24) & 7; |
6231 | if (phase == 7) | 6221 | if (phase == 7) |
6232 | msg = M_PARITY; | 6222 | msg = MSG_PARITY_ERROR; |
6233 | else | 6223 | else |
6234 | msg = M_ID_ERROR; | 6224 | msg = INITIATOR_ERROR; |
6235 | 6225 | ||
6236 | 6226 | ||
6237 | /* | 6227 | /* |
@@ -6795,6 +6785,8 @@ void ncr_int_sir (struct ncb *np) | |||
6795 | /*----------------------------------------------------------------------------- | 6785 | /*----------------------------------------------------------------------------- |
6796 | ** | 6786 | ** |
6797 | ** Was Sie schon immer ueber transfermode negotiation wissen wollten ... | 6787 | ** Was Sie schon immer ueber transfermode negotiation wissen wollten ... |
6788 | ** ("Everything you've always wanted to know about transfer mode | ||
6789 | ** negotiation") | ||
6798 | ** | 6790 | ** |
6799 | ** We try to negotiate sync and wide transfer only after | 6791 | ** We try to negotiate sync and wide transfer only after |
6800 | ** a successful inquire command. We look at byte 7 of the | 6792 | ** a successful inquire command. We look at byte 7 of the |
@@ -6896,8 +6888,8 @@ void ncr_int_sir (struct ncb *np) | |||
6896 | break; | 6888 | break; |
6897 | 6889 | ||
6898 | } | 6890 | } |
6899 | np->msgin [0] = M_NOOP; | 6891 | np->msgin [0] = NOP; |
6900 | np->msgout[0] = M_NOOP; | 6892 | np->msgout[0] = NOP; |
6901 | cp->nego_status = 0; | 6893 | cp->nego_status = 0; |
6902 | break; | 6894 | break; |
6903 | 6895 | ||
@@ -6991,12 +6983,7 @@ void ncr_int_sir (struct ncb *np) | |||
6991 | spi_offset(starget) = ofs; | 6983 | spi_offset(starget) = ofs; |
6992 | ncr_setsync(np, cp, scntl3, (fak<<5)|ofs); | 6984 | ncr_setsync(np, cp, scntl3, (fak<<5)|ofs); |
6993 | 6985 | ||
6994 | np->msgout[0] = M_EXTENDED; | 6986 | spi_populate_sync_msg(np->msgout, per, ofs); |
6995 | np->msgout[1] = 3; | ||
6996 | np->msgout[2] = M_X_SYNC_REQ; | ||
6997 | np->msgout[3] = per; | ||
6998 | np->msgout[4] = ofs; | ||
6999 | |||
7000 | cp->nego_status = NS_SYNC; | 6987 | cp->nego_status = NS_SYNC; |
7001 | 6988 | ||
7002 | if (DEBUG_FLAGS & DEBUG_NEGO) { | 6989 | if (DEBUG_FLAGS & DEBUG_NEGO) { |
@@ -7007,7 +6994,7 @@ void ncr_int_sir (struct ncb *np) | |||
7007 | OUTL_DSP (NCB_SCRIPT_PHYS (np, msg_bad)); | 6994 | OUTL_DSP (NCB_SCRIPT_PHYS (np, msg_bad)); |
7008 | return; | 6995 | return; |
7009 | } | 6996 | } |
7010 | np->msgin [0] = M_NOOP; | 6997 | np->msgin [0] = NOP; |
7011 | 6998 | ||
7012 | break; | 6999 | break; |
7013 | 7000 | ||
@@ -7082,13 +7069,9 @@ void ncr_int_sir (struct ncb *np) | |||
7082 | 7069 | ||
7083 | spi_width(starget) = wide; | 7070 | spi_width(starget) = wide; |
7084 | ncr_setwide(np, cp, wide, 1); | 7071 | ncr_setwide(np, cp, wide, 1); |
7072 | spi_populate_width_msg(np->msgout, wide); | ||
7085 | 7073 | ||
7086 | np->msgout[0] = M_EXTENDED; | 7074 | np->msgin [0] = NOP; |
7087 | np->msgout[1] = 2; | ||
7088 | np->msgout[2] = M_X_WIDE_REQ; | ||
7089 | np->msgout[3] = wide; | ||
7090 | |||
7091 | np->msgin [0] = M_NOOP; | ||
7092 | 7075 | ||
7093 | cp->nego_status = NS_WIDE; | 7076 | cp->nego_status = NS_WIDE; |
7094 | 7077 | ||
@@ -7107,12 +7090,12 @@ void ncr_int_sir (struct ncb *np) | |||
7107 | case SIR_REJECT_RECEIVED: | 7090 | case SIR_REJECT_RECEIVED: |
7108 | /*----------------------------------------------- | 7091 | /*----------------------------------------------- |
7109 | ** | 7092 | ** |
7110 | ** We received a M_REJECT message. | 7093 | ** We received a MESSAGE_REJECT. |
7111 | ** | 7094 | ** |
7112 | **----------------------------------------------- | 7095 | **----------------------------------------------- |
7113 | */ | 7096 | */ |
7114 | 7097 | ||
7115 | PRINT_ADDR(cp->cmd, "M_REJECT received (%x:%x).\n", | 7098 | PRINT_ADDR(cp->cmd, "MESSAGE_REJECT received (%x:%x).\n", |
7116 | (unsigned)scr_to_cpu(np->lastmsg), np->msgout[0]); | 7099 | (unsigned)scr_to_cpu(np->lastmsg), np->msgout[0]); |
7117 | break; | 7100 | break; |
7118 | 7101 | ||
@@ -7124,7 +7107,7 @@ void ncr_int_sir (struct ncb *np) | |||
7124 | **----------------------------------------------- | 7107 | **----------------------------------------------- |
7125 | */ | 7108 | */ |
7126 | 7109 | ||
7127 | ncr_print_msg(cp, "M_REJECT sent for", np->msgin); | 7110 | ncr_print_msg(cp, "MESSAGE_REJECT sent for", np->msgin); |
7128 | break; | 7111 | break; |
7129 | 7112 | ||
7130 | /*-------------------------------------------------------------------- | 7113 | /*-------------------------------------------------------------------- |
@@ -7143,7 +7126,7 @@ void ncr_int_sir (struct ncb *np) | |||
7143 | **----------------------------------------------- | 7126 | **----------------------------------------------- |
7144 | */ | 7127 | */ |
7145 | 7128 | ||
7146 | PRINT_ADDR(cp->cmd, "M_IGN_RESIDUE received, but not yet " | 7129 | PRINT_ADDR(cp->cmd, "IGNORE_WIDE_RESIDUE received, but not yet " |
7147 | "implemented.\n"); | 7130 | "implemented.\n"); |
7148 | break; | 7131 | break; |
7149 | #if 0 | 7132 | #if 0 |
@@ -7156,7 +7139,7 @@ void ncr_int_sir (struct ncb *np) | |||
7156 | **----------------------------------------------- | 7139 | **----------------------------------------------- |
7157 | */ | 7140 | */ |
7158 | 7141 | ||
7159 | PRINT_ADDR(cp->cmd, "M_DISCONNECT received, but datapointer " | 7142 | PRINT_ADDR(cp->cmd, "DISCONNECT received, but datapointer " |
7160 | "not saved: data=%x save=%x goal=%x.\n", | 7143 | "not saved: data=%x save=%x goal=%x.\n", |
7161 | (unsigned) INL (nc_temp), | 7144 | (unsigned) INL (nc_temp), |
7162 | (unsigned) scr_to_cpu(np->header.savep), | 7145 | (unsigned) scr_to_cpu(np->header.savep), |
@@ -7862,7 +7845,7 @@ static int __init ncr_snooptest (struct ncb* np) | |||
7862 | **========================================================== | 7845 | **========================================================== |
7863 | ** | 7846 | ** |
7864 | ** Note: we have to return the correct value. | 7847 | ** Note: we have to return the correct value. |
7865 | ** THERE IS NO SAVE DEFAULT VALUE. | 7848 | ** THERE IS NO SAFE DEFAULT VALUE. |
7866 | ** | 7849 | ** |
7867 | ** Most NCR/SYMBIOS boards are delivered with a 40 Mhz clock. | 7850 | ** Most NCR/SYMBIOS boards are delivered with a 40 Mhz clock. |
7868 | ** 53C860 and 53C875 rev. 1 support fast20 transfers but | 7851 | ** 53C860 and 53C875 rev. 1 support fast20 transfers but |
@@ -8562,7 +8545,7 @@ struct Scsi_Host * __init ncr_attach(struct scsi_host_template *tpnt, | |||
8562 | 8545 | ||
8563 | /* use SIMPLE TAG messages by default */ | 8546 | /* use SIMPLE TAG messages by default */ |
8564 | #ifdef SCSI_NCR_ALWAYS_SIMPLE_TAG | 8547 | #ifdef SCSI_NCR_ALWAYS_SIMPLE_TAG |
8565 | np->order = M_SIMPLE_TAG; | 8548 | np->order = SIMPLE_QUEUE_TAG; |
8566 | #endif | 8549 | #endif |
8567 | 8550 | ||
8568 | spin_unlock_irqrestore(&np->smp_lock, flags); | 8551 | spin_unlock_irqrestore(&np->smp_lock, flags); |