public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Maxim Levitsky <maximlevitsky@gmail.com>
To: Alex Dubov <oakad@yahoo.com>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] MEMSTICK: Add driver for Ricoh R5C592 Card reader.
Date: Tue, 10 Aug 2010 12:50:05 +0300	[thread overview]
Message-ID: <1281433805.2016.36.camel@maxim-laptop> (raw)
In-Reply-To: <950622.87676.qm@web37605.mail.mud.yahoo.com>

On Tue, 2010-08-10 at 00:53 -0700, Alex Dubov wrote: 
> > About INT bits, I still don't
> > understand them exactly.
> > 
> > First of all we have 4 meaningful bits.
> > In parallel mode these are exposed on data lines, in serial
> > mode only 
> > MEMSTICK_INT_CED is.
> > And I can always send MS_TPC_GET_INT or just read the
> > registers.
> > 
> > #define MEMSTICK_INT_CMDNAK 0x01
> 
> This bit means command was not acknowledged by the media (media not ready).
> 
> > #define MEMSTICK_INT_BREQ   0x20
> 
> This bit means media is ready for long data transfer (either in or out).
> 
> > #define MEMSTICK_INT_ERR    0x40
> 
> This bit means that some error had occurred during command execution. 
> 
> > #define MEMSTICK_INT_CED    0x80
> 
> This bit marks a completion of the command, but it may switch value in
> between, so it is not that reliable by itself.
> 
> > 
> > 
> > Now, I send a command to device, say MS_CMD_BLOCK_READ.
> > What bits I need to poll until I can be sure that command
> > is completed?
> 
> All of them.
> 
> > 
> > Also the MEMSTICK_INT_BREQ tells that input is available in
> > firmware
> > buffer (to read using TPC_READ_LONG_DATA)?
> > 
> 
> Not exactly. BREQ signal indicated that media's state machine is in the
> mode to pump data in or out. You wait for it, than you do the data
> transfer (it works the same with READ and WRITE).
> 
> > 
> > 
> > Is that true that MEMSTICK_INT_BREQ is a summary of fifo
> > full/empty bits
> > in status0?
> 
> This can not be relied upon. Sony states, that only BREQ bit must be used
> in block transfer operations. BE/BF bits are probably of more use in
> memstick IO cards (there exists such a beast).
Even better. 
> 
> > 
> > And same about MEMSTICK_INT_ERR and status1.
> 
> status1 errors apply only to data errors (bit flips).
> There are errors in command execution that do not result in bit flips,
> rather data can not be delivered at all or command/parameters are invalid.
Understood.
However if I get MEMSTICK_INT_ERR, I should also look at status1,
because there might be correctable error.


Thank you very much.

Best regards,
Maxim Levitsky


  reply	other threads:[~2010-08-10  9:50 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-05  8:30 [PATCH 2/2] MEMSTICK: Add driver for Ricoh R5C592 Card reader Alex Dubov
2010-08-05 11:20 ` Maxim Levitsky
2010-08-05 11:48   ` Alex Dubov
2010-08-05 12:30     ` Maxim Levitsky
2010-08-05 17:47       ` Maxim Levitsky
2010-08-06  7:43         ` Alex Dubov
2010-08-06 10:56           ` Maxim Levitsky
2010-08-07 13:15             ` Alex Dubov
2010-08-07 15:58               ` Maxim Levitsky
2010-08-08 13:31                 ` Alex Dubov
2010-08-06  8:01       ` Alex Dubov
2010-08-05 12:46 ` Maxim Levitsky
2010-08-06  7:59   ` Alex Dubov
2010-08-06 10:59     ` Maxim Levitsky
2010-08-07 13:12       ` Alex Dubov
2010-08-07 16:03         ` Maxim Levitsky
2010-08-08 13:33           ` Alex Dubov
2010-08-07 20:22 ` Maxim Levitsky
2010-08-08 14:26   ` Alex Dubov
2010-08-08 15:07     ` Maxim Levitsky
2010-08-08 20:08       ` Maxim Levitsky
2010-08-09  6:31         ` Alex Dubov
2010-08-09  6:56           ` Maxim Levitsky
2010-08-09 15:30           ` Maxim Levitsky
2010-08-10  8:12             ` Alex Dubov
2010-08-10  9:47               ` Maxim Levitsky
2010-08-11  8:08                 ` Alex Dubov
2010-08-11  8:32                   ` Maxim Levitsky
2010-08-12  7:22                     ` Alex Dubov
2010-08-12  7:58                       ` Maxim Levitsky
2010-08-12  7:27                     ` JMicron chipset update Alex Dubov
2010-08-09 19:19           ` [PATCH 2/2] MEMSTICK: Add driver for Ricoh R5C592 Card reader Maxim Levitsky
2010-08-10  7:53             ` Alex Dubov
2010-08-10  9:50               ` Maxim Levitsky [this message]
2010-08-11  8:16                 ` Alex Dubov
  -- strict thread matches above, loose matches on Subject: below --
2010-12-09  2:39 MEMSTICK: Add my 2 drivers Maxim Levitsky
2010-12-09  2:42 ` [PATCH 2/2] memstick: Add driver for Ricoh R5C592 card reader Maxim Levitsky
2010-08-03 14:53 [PATCH 0/2] Driver for Ricoh cardreader Maxim Levitsky
2010-08-03 14:53 ` [PATCH 2/2] MEMSTICK: Add driver for Ricoh R5C592 Card reader Maxim Levitsky
2010-08-04  7:57   ` Alex Dubov
2010-08-04 16:48     ` Maxim Levitsky
2010-08-04 19:31       ` Maxim Levitsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1281433805.2016.36.camel@maxim-laptop \
    --to=maximlevitsky@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oakad@yahoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox