diff options
Diffstat (limited to 'drivers/scsi/ncr53c8xx.c')
-rw-r--r-- | drivers/scsi/ncr53c8xx.c | 25 |
1 files changed, 5 insertions, 20 deletions
diff --git a/drivers/scsi/ncr53c8xx.c b/drivers/scsi/ncr53c8xx.c index abb1859bff09..22f913127f08 100644 --- a/drivers/scsi/ncr53c8xx.c +++ b/drivers/scsi/ncr53c8xx.c | |||
@@ -4105,17 +4105,11 @@ static int ncr_prepare_nego(struct ncb *np, struct ccb *cp, u_char *msgptr) | |||
4105 | 4105 | ||
4106 | switch (nego) { | 4106 | switch (nego) { |
4107 | case NS_SYNC: | 4107 | case NS_SYNC: |
4108 | msgptr[msglen++] = EXTENDED_MESSAGE; | 4108 | msglen += spi_populate_sync_msg(msgptr + msglen, |
4109 | msgptr[msglen++] = 3; | 4109 | tp->maxoffs ? tp->minsync : 0, tp->maxoffs); |
4110 | msgptr[msglen++] = EXTENDED_SDTR; | ||
4111 | msgptr[msglen++] = tp->maxoffs ? tp->minsync : 0; | ||
4112 | msgptr[msglen++] = tp->maxoffs; | ||
4113 | break; | 4110 | break; |
4114 | case NS_WIDE: | 4111 | case NS_WIDE: |
4115 | msgptr[msglen++] = EXTENDED_MESSAGE; | 4112 | msglen += spi_populate_width_msg(msgptr + msglen, tp->usrwide); |
4116 | msgptr[msglen++] = 2; | ||
4117 | msgptr[msglen++] = EXTENDED_WDTR; | ||
4118 | msgptr[msglen++] = tp->usrwide; | ||
4119 | break; | 4113 | break; |
4120 | } | 4114 | } |
4121 | 4115 | ||
@@ -6989,12 +6983,7 @@ void ncr_int_sir (struct ncb *np) | |||
6989 | spi_offset(starget) = ofs; | 6983 | spi_offset(starget) = ofs; |
6990 | ncr_setsync(np, cp, scntl3, (fak<<5)|ofs); | 6984 | ncr_setsync(np, cp, scntl3, (fak<<5)|ofs); |
6991 | 6985 | ||
6992 | np->msgout[0] = EXTENDED_MESSAGE; | 6986 | spi_populate_sync_msg(np->msgout, per, ofs); |
6993 | np->msgout[1] = 3; | ||
6994 | np->msgout[2] = EXTENDED_SDTR; | ||
6995 | np->msgout[3] = per; | ||
6996 | np->msgout[4] = ofs; | ||
6997 | |||
6998 | cp->nego_status = NS_SYNC; | 6987 | cp->nego_status = NS_SYNC; |
6999 | 6988 | ||
7000 | if (DEBUG_FLAGS & DEBUG_NEGO) { | 6989 | if (DEBUG_FLAGS & DEBUG_NEGO) { |
@@ -7080,11 +7069,7 @@ void ncr_int_sir (struct ncb *np) | |||
7080 | 7069 | ||
7081 | spi_width(starget) = wide; | 7070 | spi_width(starget) = wide; |
7082 | ncr_setwide(np, cp, wide, 1); | 7071 | ncr_setwide(np, cp, wide, 1); |
7083 | 7072 | spi_populate_width_msg(np->msgout, wide); | |
7084 | np->msgout[0] = EXTENDED_MESSAGE; | ||
7085 | np->msgout[1] = 2; | ||
7086 | np->msgout[2] = EXTENDED_WDTR; | ||
7087 | np->msgout[3] = wide; | ||
7088 | 7073 | ||
7089 | np->msgin [0] = NOP; | 7074 | np->msgin [0] = NOP; |
7090 | 7075 | ||