Browse Source

[SCSI] Negotiate correctly with async-only devices

When we got a device only capable of async, we would zero out goal->period
which would cause us to try PPR negotiations.  Leave goal->period alone,
and check goal->offset before doing PPR.  Kudos to Daniel Forsgren for
figuring this out.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Matthew Wilcox 19 years ago
parent
commit
322e079f1b
1 changed files with 2 additions and 2 deletions
  1. 2 2
      drivers/scsi/sym53c8xx_2/sym_hipd.c

+ 2 - 2
drivers/scsi/sym53c8xx_2/sym_hipd.c

@@ -1405,7 +1405,6 @@ static void sym_check_goals(struct sym_hcb *np, struct scsi_target *starget,
 		goal->iu = 0;
 		goal->iu = 0;
 		goal->dt = 0;
 		goal->dt = 0;
 		goal->qas = 0;
 		goal->qas = 0;
-		goal->period = 0;
 		goal->offset = 0;
 		goal->offset = 0;
 		return;
 		return;
 	}
 	}
@@ -1465,7 +1464,8 @@ static int sym_prepare_nego(struct sym_hcb *np, struct sym_ccb *cp, u_char *msgp
 	 * Many devices implement PPR in a buggy way, so only use it if we
 	 * Many devices implement PPR in a buggy way, so only use it if we
 	 * really want to.
 	 * really want to.
 	 */
 	 */
-	if (goal->iu || goal->dt || goal->qas || (goal->period < 0xa)) {
+	if (goal->offset &&
+	    (goal->iu || goal->dt || goal->qas || (goal->period < 0xa))) {
 		nego = NS_PPR;
 		nego = NS_PPR;
 	} else if (spi_width(starget) != goal->width) {
 	} else if (spi_width(starget) != goal->width) {
 		nego = NS_WIDE;
 		nego = NS_WIDE;