Re: [PATCH 2/2] MEMSTICK: Add driver for Ricoh R5C592 Card reader.

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Maxim Levitsky
Date: Tuesday, August 10, 2010 - 2:47 am

On Tue, 2010-08-10 at 01:12 -0700, Alex Dubov wrote: 

I know everything you have just said.
I just want to point out that code in many places assumes that register
window is the same as set on device initialization.

However some code changes the register window, and therefore has to
change it back at the end of execution.
If error happens, window can be left changed, while rest of code thinks
it isn't changed.
Thats is why a tracking of it would eliminate the problem safely.

But what if I fill extra register with 0xFF?
And besides on reads, the fact that I *write* the extra register before
I execute read command shouldn't matter at all regardless of what I
write there.
On writes however I *do* need to write extra register anyway with proper
values.

Therefore I see no reason why I can't set write window to cover both
param and extra register, and leave it always like that.

Indeed. Maybe I too should just send the MS_TPC_SET_RW_REG_ADRS at start
of command, and know that nothing will go south....

Even if that reduces performance by 0.2%, it isn't big deal. Data
corruptions is very big deal.


Best regards,
Maxim Levitsky

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

Messages in current thread:
Re: [PATCH 2/2] MEMSTICK: Add driver for Ricoh R5C592 Card ..., Maxim Levitsky, (Tue Aug 10, 2:47 am)