aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sym53c8xx_2/sym_hipd.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-03-22 13:47:24 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-22 13:47:24 -0500
commit2152f8536668a957ea3214735b4761e7b22ef7d8 (patch)
tree56723fc51445b1bc930c6400d4c00fd6fc831f88 /drivers/scsi/sym53c8xx_2/sym_hipd.c
parent7cae7e26f245151b9ccad868bf2edf8c8048d307 (diff)
parent30afc84cf7325e88fb9746340eba3c161080ff49 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (138 commits) [SCSI] libata: implement minimal transport template for ->eh_timed_out [SCSI] eliminate rphy allocation in favour of expander/end device allocation [SCSI] convert mptsas over to end_device/expander allocations [SCSI] allow displaying and setting of cache type via sysfs [SCSI] add scsi_mode_select to scsi_lib.c [SCSI] 3ware 9000 add big endian support [SCSI] qla2xxx: update MAINTAINERS [SCSI] scsi: move target_destroy call [SCSI] fusion - bump version [SCSI] fusion - expander hotplug suport in mptsas module [SCSI] fusion - exposing raid components in mptsas [SCSI] fusion - memory leak, and initializing fields [SCSI] fusion - exclosure misspelled [SCSI] fusion - cleanup mptsas event handling functions [SCSI] fusion - removing target_id/bus_id from the VirtDevice structure [SCSI] fusion - static fix's [SCSI] fusion - move some debug firmware event debug msgs to verbose level [SCSI] fusion - loginfo header update [SCSI] add scsi_reprobe_device [SCSI] megaraid_sas: fix extended timeout handling ...
Diffstat (limited to 'drivers/scsi/sym53c8xx_2/sym_hipd.c')
-rw-r--r--drivers/scsi/sym53c8xx_2/sym_hipd.c53
1 files changed, 12 insertions, 41 deletions
diff --git a/drivers/scsi/sym53c8xx_2/sym_hipd.c b/drivers/scsi/sym53c8xx_2/sym_hipd.c
index 2627000ca653..60850cbe3a85 100644
--- a/drivers/scsi/sym53c8xx_2/sym_hipd.c
+++ b/drivers/scsi/sym53c8xx_2/sym_hipd.c
@@ -40,7 +40,6 @@
40 40
41#include <linux/slab.h> 41#include <linux/slab.h>
42#include <asm/param.h> /* for timeouts in units of HZ */ 42#include <asm/param.h> /* for timeouts in units of HZ */
43#include <scsi/scsi_dbg.h>
44 43
45#include "sym_glue.h" 44#include "sym_glue.h"
46#include "sym_nvram.h" 45#include "sym_nvram.h"
@@ -1432,29 +1431,18 @@ static int sym_prepare_nego(struct sym_hcb *np, struct sym_ccb *cp, u_char *msgp
1432 1431
1433 switch (nego) { 1432 switch (nego) {
1434 case NS_SYNC: 1433 case NS_SYNC:
1435 msgptr[msglen++] = M_EXTENDED; 1434 msglen += spi_populate_sync_msg(msgptr + msglen, goal->period,
1436 msgptr[msglen++] = 3; 1435 goal->offset);
1437 msgptr[msglen++] = M_X_SYNC_REQ;
1438 msgptr[msglen++] = goal->period;
1439 msgptr[msglen++] = goal->offset;
1440 break; 1436 break;
1441 case NS_WIDE: 1437 case NS_WIDE:
1442 msgptr[msglen++] = M_EXTENDED; 1438 msglen += spi_populate_width_msg(msgptr + msglen, goal->width);
1443 msgptr[msglen++] = 2;
1444 msgptr[msglen++] = M_X_WIDE_REQ;
1445 msgptr[msglen++] = goal->width;
1446 break; 1439 break;
1447 case NS_PPR: 1440 case NS_PPR:
1448 msgptr[msglen++] = M_EXTENDED; 1441 msglen += spi_populate_ppr_msg(msgptr + msglen, goal->period,
1449 msgptr[msglen++] = 6; 1442 goal->offset, goal->width,
1450 msgptr[msglen++] = M_X_PPR_REQ; 1443 (goal->iu ? PPR_OPT_IU : 0) |
1451 msgptr[msglen++] = goal->period;
1452 msgptr[msglen++] = 0;
1453 msgptr[msglen++] = goal->offset;
1454 msgptr[msglen++] = goal->width;
1455 msgptr[msglen++] = (goal->iu ? PPR_OPT_IU : 0) |
1456 (goal->dt ? PPR_OPT_DT : 0) | 1444 (goal->dt ? PPR_OPT_DT : 0) |
1457 (goal->qas ? PPR_OPT_QAS : 0); 1445 (goal->qas ? PPR_OPT_QAS : 0));
1458 break; 1446 break;
1459 } 1447 }
1460 1448
@@ -3950,11 +3938,7 @@ sym_sync_nego_check(struct sym_hcb *np, int req, struct sym_ccb *cp)
3950 /* 3938 /*
3951 * It was a request. Prepare an answer message. 3939 * It was a request. Prepare an answer message.
3952 */ 3940 */
3953 np->msgout[0] = M_EXTENDED; 3941 spi_populate_sync_msg(np->msgout, per, ofs);
3954 np->msgout[1] = 3;
3955 np->msgout[2] = M_X_SYNC_REQ;
3956 np->msgout[3] = per;
3957 np->msgout[4] = ofs;
3958 3942
3959 if (DEBUG_FLAGS & DEBUG_NEGO) { 3943 if (DEBUG_FLAGS & DEBUG_NEGO) {
3960 sym_print_nego_msg(np, target, "sync msgout", np->msgout); 3944 sym_print_nego_msg(np, target, "sync msgout", np->msgout);
@@ -4080,14 +4064,7 @@ sym_ppr_nego_check(struct sym_hcb *np, int req, int target)
4080 /* 4064 /*
4081 * It was a request. Prepare an answer message. 4065 * It was a request. Prepare an answer message.
4082 */ 4066 */
4083 np->msgout[0] = M_EXTENDED; 4067 spi_populate_ppr_msg(np->msgout, per, ofs, wide, opts);
4084 np->msgout[1] = 6;
4085 np->msgout[2] = M_X_PPR_REQ;
4086 np->msgout[3] = per;
4087 np->msgout[4] = 0;
4088 np->msgout[5] = ofs;
4089 np->msgout[6] = wide;
4090 np->msgout[7] = opts;
4091 4068
4092 if (DEBUG_FLAGS & DEBUG_NEGO) { 4069 if (DEBUG_FLAGS & DEBUG_NEGO) {
4093 sym_print_nego_msg(np, target, "ppr msgout", np->msgout); 4070 sym_print_nego_msg(np, target, "ppr msgout", np->msgout);
@@ -4199,10 +4176,7 @@ sym_wide_nego_check(struct sym_hcb *np, int req, struct sym_ccb *cp)
4199 /* 4176 /*
4200 * It was a request. Prepare an answer message. 4177 * It was a request. Prepare an answer message.
4201 */ 4178 */
4202 np->msgout[0] = M_EXTENDED; 4179 spi_populate_width_msg(np->msgout, wide);
4203 np->msgout[1] = 2;
4204 np->msgout[2] = M_X_WIDE_REQ;
4205 np->msgout[3] = wide;
4206 4180
4207 np->msgin [0] = M_NOOP; 4181 np->msgin [0] = M_NOOP;
4208 4182
@@ -4247,11 +4221,8 @@ static void sym_wide_nego(struct sym_hcb *np, struct sym_tcb *tp, struct sym_ccb
4247 * a single SCSI command (Suggested by Justin Gibbs). 4221 * a single SCSI command (Suggested by Justin Gibbs).
4248 */ 4222 */
4249 if (tp->tgoal.offset) { 4223 if (tp->tgoal.offset) {
4250 np->msgout[0] = M_EXTENDED; 4224 spi_populate_sync_msg(np->msgout, tp->tgoal.period,
4251 np->msgout[1] = 3; 4225 tp->tgoal.offset);
4252 np->msgout[2] = M_X_SYNC_REQ;
4253 np->msgout[3] = tp->tgoal.period;
4254 np->msgout[4] = tp->tgoal.offset;
4255 4226
4256 if (DEBUG_FLAGS & DEBUG_NEGO) { 4227 if (DEBUG_FLAGS & DEBUG_NEGO) {
4257 sym_print_nego_msg(np, cp->target, 4228 sym_print_nego_msg(np, cp->target,