diff options
author | Matthew Wilcox <matthew@wil.cx> | 2005-11-29 23:08:40 -0500 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.(none)> | 2005-12-13 19:27:10 -0500 |
commit | 322e079f1b606e46b79bb8b8e6cf6110b5f2aa3f (patch) | |
tree | 541a03bb0d7ff2809069122e5b10431072124587 /drivers/scsi/sym53c8xx_2 | |
parent | 1a68de5c08be8c77c4ad208306187bd95107c7cd (diff) |
[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>
Diffstat (limited to 'drivers/scsi/sym53c8xx_2')
-rw-r--r-- | drivers/scsi/sym53c8xx_2/sym_hipd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/sym53c8xx_2/sym_hipd.c b/drivers/scsi/sym53c8xx_2/sym_hipd.c index a7420cad4547..1564ca203a3e 100644 --- a/drivers/scsi/sym53c8xx_2/sym_hipd.c +++ b/drivers/scsi/sym53c8xx_2/sym_hipd.c | |||
@@ -1405,7 +1405,6 @@ static void sym_check_goals(struct sym_hcb *np, struct scsi_target *starget, | |||
1405 | goal->iu = 0; | 1405 | goal->iu = 0; |
1406 | goal->dt = 0; | 1406 | goal->dt = 0; |
1407 | goal->qas = 0; | 1407 | goal->qas = 0; |
1408 | goal->period = 0; | ||
1409 | goal->offset = 0; | 1408 | goal->offset = 0; |
1410 | return; | 1409 | return; |
1411 | } | 1410 | } |
@@ -1465,7 +1464,8 @@ static int sym_prepare_nego(struct sym_hcb *np, struct sym_ccb *cp, u_char *msgp | |||
1465 | * Many devices implement PPR in a buggy way, so only use it if we | 1464 | * Many devices implement PPR in a buggy way, so only use it if we |
1466 | * really want to. | 1465 | * really want to. |
1467 | */ | 1466 | */ |
1468 | if (goal->iu || goal->dt || goal->qas || (goal->period < 0xa)) { | 1467 | if (goal->offset && |
1468 | (goal->iu || goal->dt || goal->qas || (goal->period < 0xa))) { | ||
1469 | nego = NS_PPR; | 1469 | nego = NS_PPR; |
1470 | } else if (spi_width(starget) != goal->width) { | 1470 | } else if (spi_width(starget) != goal->width) { |
1471 | nego = NS_WIDE; | 1471 | nego = NS_WIDE; |