[SCSI] mac_esp: fix PIO mode, take 2
The mac_esp PIO algorithm no longer works in 2.6.31 and crashes my Centris 660av. So here's a better one. Also, force async with esp_set_offset() rather than esp_slave_configure(). One of the SCSI drives I tested still doesn't like the PIO mode and fails with "esp: esp0: Reconnect IRQ2 timeout" (the same drive works fine in PDMA mode). This failure happens when esp_reconnect_with_tag() tries to read in two tag bytes but the chip only provides one (0x20). I don't know what causes this. I decided not to waste any more time trying to fix it because the best solution is to rip out the PIO mode altogether and use the DMA engine. Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
This commit is contained in:
committed by
James Bottomley
parent
f2818663c8
commit
02507a80b3
@@ -1449,9 +1449,6 @@ static void esp_msgin_sdtr(struct esp *esp, struct esp_target_data *tp)
|
||||
if (offset > 15)
|
||||
goto do_reject;
|
||||
|
||||
if (esp->flags & ESP_FLAG_DISABLE_SYNC)
|
||||
offset = 0;
|
||||
|
||||
if (offset) {
|
||||
int one_clock;
|
||||
|
||||
@@ -2405,12 +2402,6 @@ static int esp_slave_configure(struct scsi_device *dev)
|
||||
struct esp_target_data *tp = &esp->target[dev->id];
|
||||
int goal_tags, queue_depth;
|
||||
|
||||
if (esp->flags & ESP_FLAG_DISABLE_SYNC) {
|
||||
/* Bypass async domain validation */
|
||||
dev->ppr = 0;
|
||||
dev->sdtr = 0;
|
||||
}
|
||||
|
||||
goal_tags = 0;
|
||||
|
||||
if (dev->tagged_supported) {
|
||||
@@ -2660,7 +2651,10 @@ static void esp_set_offset(struct scsi_target *target, int offset)
|
||||
struct esp *esp = shost_priv(host);
|
||||
struct esp_target_data *tp = &esp->target[target->id];
|
||||
|
||||
tp->nego_goal_offset = offset;
|
||||
if (esp->flags & ESP_FLAG_DISABLE_SYNC)
|
||||
tp->nego_goal_offset = 0;
|
||||
else
|
||||
tp->nego_goal_offset = offset;
|
||||
tp->flags |= ESP_TGT_CHECK_NEGO;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user