Commit 9535fff3 authored by Hannes Reinecke's avatar Hannes Reinecke Committed by Christoph Hellwig

esp_scsi: read status registers

A read to ESP_INTRPT will clear ESP_STATUS and ESP_SSTEP. So read
all status registers in one go to avoid losing information.
Reviewed-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
Acked-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarHannes Reinecke <hare@suse.de>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent 1af6f603
...@@ -982,7 +982,6 @@ static int esp_check_spur_intr(struct esp *esp) ...@@ -982,7 +982,6 @@ static int esp_check_spur_intr(struct esp *esp)
default: default:
if (!(esp->sreg & ESP_STAT_INTR)) { if (!(esp->sreg & ESP_STAT_INTR)) {
esp->ireg = esp_read8(ESP_INTRPT);
if (esp->ireg & ESP_INTR_SR) if (esp->ireg & ESP_INTR_SR)
return 1; return 1;
...@@ -2056,7 +2055,12 @@ static void __esp_interrupt(struct esp *esp) ...@@ -2056,7 +2055,12 @@ static void __esp_interrupt(struct esp *esp)
int finish_reset, intr_done; int finish_reset, intr_done;
u8 phase; u8 phase;
/*
* Once INTRPT is read STATUS and SSTEP are cleared.
*/
esp->sreg = esp_read8(ESP_STATUS); esp->sreg = esp_read8(ESP_STATUS);
esp->seqreg = esp_read8(ESP_SSTEP);
esp->ireg = esp_read8(ESP_INTRPT);
if (esp->flags & ESP_FLAG_RESETTING) { if (esp->flags & ESP_FLAG_RESETTING) {
finish_reset = 1; finish_reset = 1;
...@@ -2069,8 +2073,6 @@ static void __esp_interrupt(struct esp *esp) ...@@ -2069,8 +2073,6 @@ static void __esp_interrupt(struct esp *esp)
return; return;
} }
esp->ireg = esp_read8(ESP_INTRPT);
if (esp->ireg & ESP_INTR_SR) if (esp->ireg & ESP_INTR_SR)
finish_reset = 1; finish_reset = 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment