Re: [PATCH v3 17/77] ncr5380: Keep BSY asserted when entering SELECTION phase

2015-12-21 Thread Hannes Reinecke

On 12/22/2015 02:17 AM, Finn Thain wrote:

NCR5380.c is not compliant with the SCSI-2 standard (at least, not with
the draft revision 10L that I have to refer to). The selection algorithm
in atari_NCR5380.c is correct, so use that.

Signed-off-by: Finn Thain 


Reviewed-by: Hannes Reinecke 

Cheers,

Hannes
--
Dr. Hannes Reinecke   zSeries & Storage
h...@suse.de  +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH v3 17/77] ncr5380: Keep BSY asserted when entering SELECTION phase

2015-12-21 Thread Finn Thain
NCR5380.c is not compliant with the SCSI-2 standard (at least, not with
the draft revision 10L that I have to refer to). The selection algorithm
in atari_NCR5380.c is correct, so use that.

Signed-off-by: Finn Thain 

---

The NCR 5380 Family datasheet has a flow chart to support this. Please see
http://pdf.datasheetarchive.com/indexerfiles/Scans-001/Scans-0031883.pdf

This is another old bug fix that was unfortunately never applied to the
original NCR5380.c core driver.

---
 drivers/scsi/NCR5380.c   |8 +++-
 drivers/scsi/atari_NCR5380.c |7 ---
 2 files changed, 11 insertions(+), 4 deletions(-)

Index: linux/drivers/scsi/NCR5380.c
===
--- linux.orig/drivers/scsi/NCR5380.c   2015-12-22 12:15:50.0 +1100
+++ linux/drivers/scsi/NCR5380.c2015-12-22 12:15:51.0 +1100
@@ -1236,7 +1236,13 @@ static int NCR5380_select(struct Scsi_Ho
dprintk(NDEBUG_ARBITRATION, "scsi%d : lost arbitration, 
deasserting MR_ARBITRATE\n", instance->host_no);
return -1;
}
-   NCR5380_write(INITIATOR_COMMAND_REG, ICR_BASE | ICR_ASSERT_SEL);
+
+   /* After/during arbitration, BSY should be asserted.
+* IBM DPES-31080 Version S31Q works now
+* Tnx to thomas_roe...@m2.maus.de for finding this! (Roman)
+*/
+   NCR5380_write(INITIATOR_COMMAND_REG,
+ ICR_BASE | ICR_ASSERT_SEL | ICR_ASSERT_BSY);
 
if (!(hostdata->flags & FLAG_DTC3181E) &&
/* RvC: DTC3181E has some trouble with this
Index: linux/drivers/scsi/atari_NCR5380.c
===
--- linux.orig/drivers/scsi/atari_NCR5380.c 2015-12-22 12:15:50.0 
+1100
+++ linux/drivers/scsi/atari_NCR5380.c  2015-12-22 12:15:51.0 +1100
@@ -1480,9 +1480,10 @@ static int NCR5380_select(struct Scsi_Ho
return -1;
}
 
-   /* after/during arbitration, BSY should be asserted.
-  IBM DPES-31080 Version S31Q works now */
-   /* Tnx to thomas_roe...@m2.maus.de for finding this! (Roman) */
+   /* After/during arbitration, BSY should be asserted.
+* IBM DPES-31080 Version S31Q works now
+* Tnx to thomas_roe...@m2.maus.de for finding this! (Roman)
+*/
NCR5380_write(INITIATOR_COMMAND_REG,
  ICR_BASE | ICR_ASSERT_SEL | ICR_ASSERT_BSY);
 


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH v3 17/77] ncr5380: Keep BSY asserted when entering SELECTION phase

2015-12-21 Thread Finn Thain
NCR5380.c is not compliant with the SCSI-2 standard (at least, not with
the draft revision 10L that I have to refer to). The selection algorithm
in atari_NCR5380.c is correct, so use that.

Signed-off-by: Finn Thain 

---

The NCR 5380 Family datasheet has a flow chart to support this. Please see
http://pdf.datasheetarchive.com/indexerfiles/Scans-001/Scans-0031883.pdf

This is another old bug fix that was unfortunately never applied to the
original NCR5380.c core driver.

---
 drivers/scsi/NCR5380.c   |8 +++-
 drivers/scsi/atari_NCR5380.c |7 ---
 2 files changed, 11 insertions(+), 4 deletions(-)

Index: linux/drivers/scsi/NCR5380.c
===
--- linux.orig/drivers/scsi/NCR5380.c   2015-12-22 12:15:50.0 +1100
+++ linux/drivers/scsi/NCR5380.c2015-12-22 12:15:51.0 +1100
@@ -1236,7 +1236,13 @@ static int NCR5380_select(struct Scsi_Ho
dprintk(NDEBUG_ARBITRATION, "scsi%d : lost arbitration, 
deasserting MR_ARBITRATE\n", instance->host_no);
return -1;
}
-   NCR5380_write(INITIATOR_COMMAND_REG, ICR_BASE | ICR_ASSERT_SEL);
+
+   /* After/during arbitration, BSY should be asserted.
+* IBM DPES-31080 Version S31Q works now
+* Tnx to thomas_roe...@m2.maus.de for finding this! (Roman)
+*/
+   NCR5380_write(INITIATOR_COMMAND_REG,
+ ICR_BASE | ICR_ASSERT_SEL | ICR_ASSERT_BSY);
 
if (!(hostdata->flags & FLAG_DTC3181E) &&
/* RvC: DTC3181E has some trouble with this
Index: linux/drivers/scsi/atari_NCR5380.c
===
--- linux.orig/drivers/scsi/atari_NCR5380.c 2015-12-22 12:15:50.0 
+1100
+++ linux/drivers/scsi/atari_NCR5380.c  2015-12-22 12:15:51.0 +1100
@@ -1480,9 +1480,10 @@ static int NCR5380_select(struct Scsi_Ho
return -1;
}
 
-   /* after/during arbitration, BSY should be asserted.
-  IBM DPES-31080 Version S31Q works now */
-   /* Tnx to thomas_roe...@m2.maus.de for finding this! (Roman) */
+   /* After/during arbitration, BSY should be asserted.
+* IBM DPES-31080 Version S31Q works now
+* Tnx to thomas_roe...@m2.maus.de for finding this! (Roman)
+*/
NCR5380_write(INITIATOR_COMMAND_REG,
  ICR_BASE | ICR_ASSERT_SEL | ICR_ASSERT_BSY);
 


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v3 17/77] ncr5380: Keep BSY asserted when entering SELECTION phase

2015-12-21 Thread Hannes Reinecke

On 12/22/2015 02:17 AM, Finn Thain wrote:

NCR5380.c is not compliant with the SCSI-2 standard (at least, not with
the draft revision 10L that I have to refer to). The selection algorithm
in atari_NCR5380.c is correct, so use that.

Signed-off-by: Finn Thain 


Reviewed-by: Hannes Reinecke 

Cheers,

Hannes
--
Dr. Hannes Reinecke   zSeries & Storage
h...@suse.de  +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/