Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F144463257
D4240.1774762673.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D4240.1774762673.diff
View Options
Index: sys/dev/ahci/ahci.c
===================================================================
--- sys/dev/ahci/ahci.c
+++ sys/dev/ahci/ahci.c
@@ -483,6 +483,10 @@
/* AHCI declares level triggered IS. */
if (!(ctlr->quirks & AHCI_Q_EDGEIS))
ATA_OUTL(ctlr->r_mem, AHCI_IS, is);
+#ifdef __arm__
+ /* Readback ensures that AHCI_IS is already updated in HW */
+ ATA_INL(ctlr->r_mem, AHCI_IS);
+#endif
}
/*
@@ -501,6 +505,10 @@
ctlr->interrupt[unit].function(arg);
/* AHCI declares level triggered IS. */
ATA_OUTL(ctlr->r_mem, AHCI_IS, 1 << unit);
+#ifdef __arm__
+ /* Readback ensures that AHCI_IS is already updated in HW */
+ ATA_INL(ctlr->r_mem, AHCI_IS);
+#endif
}
static void
@@ -516,6 +524,10 @@
ATA_OUTL(ctlr->r_mem, AHCI_IS, 1 << unit);
if ((arg = ctlr->interrupt[unit].argument))
ctlr->interrupt[unit].function(arg);
+#ifdef __arm__
+ /* Readback ensures that AHCI_IS is already updated in HW */
+ ATA_INL(ctlr->r_mem, AHCI_IS);
+#endif
}
struct resource *
@@ -1606,10 +1618,15 @@
if ((ch->quirks & AHCI_Q_NOBSYRES) == 0 &&
(ch->quirks & AHCI_Q_ATI_PMP_BUG) == 0 &&
softreset == 2 && et == AHCI_ERR_NONE) {
- while ((val = fis[2]) & ATA_S_BUSY) {
- DELAY(10);
- if (count++ >= timeout)
+ for ( ; count < timeout; count++) {
+ bus_dmamap_sync(ch->dma.rfis_tag,
+ ch->dma.rfis_map, BUS_DMASYNC_POSTREAD);
+ val = fis[2];
+ bus_dmamap_sync(ch->dma.rfis_tag,
+ ch->dma.rfis_map, BUS_DMASYNC_PREREAD);
+ if ((val & ATA_S_BUSY) == 0)
break;
+ DELAY(10);
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Mar 29, 5:37 AM (14 h, 58 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28221864
Default Alt Text
D4240.1774762673.diff (1 KB)
Attached To
Mode
D4240: AHCI: Fix AHCI driver for ARM platform.
Attached
Detach File
Event Timeline
Log In to Comment