Skip to contentSkip to conversation

mmc_test Correct xfer_size at write

DISCUSSION James Hogan 2 participants 3 messages Jun 28, 2011 – Jun 29, 2011 MMC, SD and SDIO

lore
Share & tools
lore
#0 lore raw

Hi,

I'm trying to figure out why the broken write transfer tests in mmc_test require the result to be -ETIMEDOUT, so that I can make dw_mmc pass these tests. Perhaps somebody could explain.

I can understand for reads, that the controller is waiting for the start bit on the data lines and so it can timeout after a while if it doesn't see any. However for writes (as far as I can glean from the physical layer spec and a logic analyser) the data response token which is normally sent by the card in response to a write transfer is clocked out immediately after the data so is either there or it isn't.

Have I misunderstood it or is -ETIMEDOUT just the error that is required by convention when the data response token is not detected?

Thanks

James

#1 lore raw
Quoted 13 lines · On Tue, 28 Jun 2011 11:37:25 +0100 James Hogan <[email protected]> wrote:

Hi,

I'm trying to figure out why the broken write transfer tests in mmc_test require the result to be -ETIMEDOUT, so that I can make dw_mmc pass these tests. Perhaps somebody could explain.

I can understand for reads, that the controller is waiting for the start bit on the data lines and so it can timeout after a while if it doesn't see any. However for writes (as far as I can glean from the physical layer spec and a logic analyser) the data response token which is normally sent by the card in response to a write transfer is clocked out immediately after the data so is either there or it isn't.

Quoted 3 lines

Have I misunderstood it or is -ETIMEDOUT just the error that is required by convention when the data response token is not detected?

It's more or less by convention. ETIMEDOUT is the closest thing we have to "we expected a response from the card but got bupkis". You can find some informal definitions here:

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=include/linux/mmc/core.h;h=b6718e549a510780e0f8c9a3be17e64753d6c2f5;hb=HEAD#l81

Rgds

Signature · 6 lines
     -- Pierre Ossman

  WARNING: This correspondence is being monitored by FRA, a
  Swedish intelligence agency. Make sure your server uses
  encryption for SMTP traffic and consider using PGP for
  end-to-end encryption.
#2 lore raw
Quoted 20 lines · Pierre Ossman
Quoted 13 lines · On Tue, 28 Jun 2011 11:37:25 +0100 James Hogan <[email protected]> wrote:

Hi,

I'm trying to figure out why the broken write transfer tests in mmc_test require the result to be -ETIMEDOUT, so that I can make dw_mmc pass these tests. Perhaps somebody could explain.

I can understand for reads, that the controller is waiting for the start bit on the data lines and so it can timeout after a while if it doesn't see any. However for writes (as far as I can glean from the physical layer spec and a logic analyser) the data response token which is normally sent by the card in response to a write transfer is clocked out immediately after the data so is either there or it isn't.

Quoted 3 lines

Have I misunderstood it or is -ETIMEDOUT just the error that is required by convention when the data response token is not detected?

Quoted 7 lines

It's more or less by convention. ETIMEDOUT is the closest thing we have to "we expected a response from the card but got bupkis". You can find some informal definitions here:

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=include/linux/mmc/core.h;h=b6718e549a510780e0f8c9a3be17e64753d6c2f5;hb=HEAD#l81

Rgds

Thanks for the info Pierre

James