lkml.org 
[lkml]   [1998]   [Oct]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
DateThu, 1 Oct 1998 21:10:26 +0200 (MET DST)
FromGerard Roudier <>
SubjectNCR53C8XX SCSI fixes.


The attached patch should fix most of the problems encountered using
ncr53c8xx-3.0g and that disappear using ncr53c8xx-2.5f instead.

There is no real driver code fix in this patch, but:

1) Only start a negotiatiation when the LUN number corresponds to a device
that has previously succeeded at least 1 SCSI command. This is not
required by SCSI, so --> SCSI device firmware bug.

2) Wait for the SCSI selection to be complete prior to executing any
further SCRIPT instruction. SYMBIOS data manuals are very clear about
their Chips being featured to execute SCRIPTS instructions just after
Arbitration has been complete and thus seems to encourage using this
feature (the win was about 2 micro-second lower command latency). Using
this feature seems to affect the SCSI selection protocol, probably by
breaking some timing requirements.
So, --> Chip BUG or SYMBIOS wrong documentation.
(Has been reported to fix the M_REJECT problem using toshiba3401b)

This patch is the minimal change addressing these 2 problems and the patch
I will send to Linus in a couple of days will probably conflict with this
one.

Since I cannot send private replies to all mails reporting problems,
especially when they seem to address the same cause, I invite people who
still experience problems using driver 3.0g with this patch applied to
mail me again about. Sorry for the inconvenience.

This patch does not apply to the development driver at
ftp://ftp.tux.org/pub/roudier/896/
that seems to be affected by problem (2).
I will make available the corresponding patch at tux over the week-end.

Regards,
Gerard.
--- linux/drivers/scsi/ncr53c8xx.c.3.0i-1 Thu Oct 1 20:26:18 1998
+++ linux/drivers/scsi/ncr53c8xx.c Mon Sep 28 21:37:17 1998
@@ -2007,7 +2007,7 @@
ncrcmd start [ 5];
ncrcmd startpos [ 1];
ncrcmd select [ 6];
- ncrcmd select2 [ 7];
+ ncrcmd select2 [ 9];
ncrcmd loadpos [ 4];
ncrcmd send_ident [ 7];
ncrcmd prepare [ 6];
@@ -2336,6 +2336,15 @@
*/

/*
+ ** The M_REJECT problem seems to be due to a selection
+ ** timing problem.
+ ** Wait immediately for the selection to complete.
+ ** (2.5x behaves so)
+ */
+ SCR_JUMPR ^ IFFALSE (WHEN (SCR_MSG_OUT)),
+ 0,
+
+ /*
** Next time use the next slot.
*/
SCR_COPY (4),
@@ -4958,7 +4967,7 @@

nego = 0;

- if ((!tp->widedone || !tp->period) && !tp->nego_cp && tp->inq_done) {
+ if ((!tp->widedone || !tp->period) && !tp->nego_cp && tp->inq_done && lp) {

/*
** negotiate wide transfers ?
\
 
 \ /
  Last update: 2005-03-22 13:44    [from the cache]
©2003-2010