#1579 closed enhancement (fixed)

spi-sd-card: use gradually increasing sleep times when waiting for write to finish

Reported by: Arnout Vandecappelle Owned by: Sebastian Huber
Priority: normal Milestone: 4.11
Component: unspecified Version: 4.11
Severity: minor Keywords:
Cc: joel.sherrill@… Blocked By:
Blocking:

Description

The function sd_card_wait() waits for a block write to finish on the SD card before issuing a new commands. This is done by polling the SPI bus. Although the processor is yielded while waiting, this polling loop still blocks lower-priority tasks while waiting. In practice, when writing a lot of data (which fills up the buffers inside the SD card), the wait times can run up to 250ms.

Attached patch uses increasing sleep times instead of just yielding. It depends on attachment 792 to bug 1567.

Attachments (1)

0001-c-src-libchip-i2c-spi-sd-card.c-use-gradually-increa.patch (1.7 KB) - added by Arnout Vandecappelle on Jun 21, 2010 at 3:53:14 PM.
spi-sd-card.c: use gradually increasing sleep times while waiting for write to finish

Download all attachments as: .zip

Change History (4)

Changed on Jun 21, 2010 at 3:53:14 PM by Arnout Vandecappelle

spi-sd-card.c: use gradually increasing sleep times while waiting for write to finish

comment:1 Changed on Jun 22, 2010 at 7:41:37 AM by Sebastian Huber

Resolution: fixed
Status: newclosed

Applied to CVS head.

comment:2 Changed on Nov 24, 2014 at 6:58:28 PM by Gedare

Version: HEAD4.11

Replace Version=HEAD with Version=4.11 for the tickets with Milestone >= 4.11

comment:3 Changed on Oct 10, 2017 at 6:35:44 AM by Sebastian Huber

Component: miscunspecified
Note: See TracTickets for help on using tickets.