Re: [PATCH] MMC/SD host driver for Ricoh Bay1Controllers

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Sascha Sommer
Date: Sunday, May 18, 2008 - 5:05 am

Hi,

thanks for the review. See my comments below.

On Montag, 12. Mai 2008, Pierre Ossman wrote:

I will fix that then.


The driver should compile without it and it should not crash without it. 
However it will never get activated without a driver for the yenta bridge.



That is the point where I'm not sure about. While I agree that the driver 
theoretically shouldn't care about the commands it currently cannot handle 
all commands that read or write a data block. In this context the commands 
itself are the problem and not some integer values.


I will try to fix that with a later patch.


Hm it seems like you are right here. I was confused by the opcode |= 64 and 
the fact that the scr command never really worked so linux would never 
activate the 4-bit bus mode. Windows does this unconditionally for SD cards.
It also looks like all ACMDS have this |= 64


I think I found the register now where one can adjust the transfer size but 
this requires a lot more testing.


What do you propose instead? Moving this code into a seperate thread?



See below.


From my point of view this is such an unlikely case. From what I currently 
know all opcodes that are required to read a data block and that are not 
listed above very likely do not work. When I for example let the EXT_CSD 
command through this filter the command itself will succeed but the bit that 
notifies us if the data is available for read does not get set. The status 
doesn't change. If I leave out the checks and just read from the data 
register only zeros are returned. 
Note that the windows driver does not use any of these commands.
Do you know of a case where a broken card caused such a behaviour?
Unfortunatelly I do not have another card reader or other MMC cards to test.


Well that is one of these extra special handling hacks. While leaving out the 
SEND_SCR command for my SD card makes no difference a user reported that his 
SDHC card won't work without it. In any case the MMC layer requires that this 
command succeeds but reading the data block doesn't work. When I do a |= 64
like for the BUS_WIDTH command I can read something but I'm not sure yet if 
this is the SCR or some random values. When I need to do the |= 64 I also 
would need to know for every command if this they are an ACMD or not. I think 
it would be nice if the mmc layer could give a hint here.



This is some cruft from the early days.


What would you say if I want to keep them ;)? For testing and debugging I find 
it a lot easier to just play with some local debug statements instead of 
checking back with the mmc framework when what values gets printed etc.


I think this can be avoided now.


It is. See sdricoh_get_ro(). There also seem to be different versions of the 
window driver for different notebooks that compensate for this behaviour...

Regards

Sascha

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] MMC/SD host driver for Ricoh Bay1Controllers, Sascha Sommer, (Sun Apr 27, 7:17 am)
Re: [PATCH] MMC/SD host driver for Ricoh Bay1Controllers, Sascha Sommer, (Sun May 11, 1:50 am)
Re: [PATCH] MMC/SD host driver for Ricoh Bay1Controllers, Pierre Ossman, (Mon May 12, 10:54 am)
Re: [PATCH] MMC/SD host driver for Ricoh Bay1Controllers, Sascha Sommer, (Sun May 18, 5:05 am)
Re: [PATCH] MMC/SD host driver for Ricoh Bay1Controllers, Pierre Ossman, (Sun May 25, 3:46 am)
Re: [PATCH] MMC/SD host driver for Ricoh Bay1Controllers, Pierre Ossman, (Sun May 25, 3:54 am)
Re: [PATCH] MMC/SD host driver for Ricoh Bay1Controllers, Sascha Sommer, (Sun May 25, 5:33 am)