Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F133018567
D20199.id57175.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
934 B
Referenced Files
None
Subscribers
None
D20199.id57175.diff
View Options
Index: sys/arm/broadcom/bcm2835/bcm2835_sdhci.c
===================================================================
--- sys/arm/broadcom/bcm2835/bcm2835_sdhci.c
+++ sys/arm/broadcom/bcm2835/bcm2835_sdhci.c
@@ -539,6 +539,22 @@
left = min(BCM_SDHCI_BUFFER_SIZE,
slot->curcmd->data->len - slot->offset);
+ /*
+ * If there is less than buffer size outstanding, we would not handle
+ * it anymore using DMA if bcm_sdhci_will_handle_transfer() were asked.
+ * Re-enable interrupts and return and let the SDHCI state machine
+ * finish the job.
+ */
+ if (left < BCM_SDHCI_BUFFER_SIZE) {
+ /* Re-enable data interrupts. */
+ slot->intmask |= SDHCI_INT_DATA_AVAIL | SDHCI_INT_SPACE_AVAIL |
+ SDHCI_INT_DATA_END;
+ bcm_sdhci_write_4(slot->bus, slot, SDHCI_SIGNAL_ENABLE,
+ slot->intmask);
+ mtx_unlock(&slot->mtx);
+ return;
+ }
+
/* DATA END? */
reg = bcm_sdhci_read_4(slot->bus, slot, SDHCI_INT_STATUS);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Oct 23, 3:06 AM (11 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
24079806
Default Alt Text
D20199.id57175.diff (934 B)
Attached To
Mode
D20199: bcm2835_sdhci.c: exit DMA if not enough data left to avoid timeout errors
Attached
Detach File
Event Timeline
Log In to Comment