nfctype5: Don't issue RMB command when formatting

Currently, when neard is formatting a Type 5 tag, it issues the Read
Multiple Blocks (RMB) command to see if the tag supports it.  If the
command succeeds, the appropriate bit in the CC is set so the RMB
command can be used in the future.  The problem is that when the tag
doesn't support the command, a failure is returned by the kernel causing
the neard adapter code to disconnect from the tag.  This effectively
makes the tag unusable by neard.

To avoid this issue, don't bother checking to see if the RMB command
is supported and just assume that it isn't (and therefore, do not set
the MBREAD bit in the CC).  This has the benefit of formatting Type 5
tags that don't support RMB at the cost of forcing future readers to
use a series of Read Single Block commands for multi-block reads (i.e.,
slower than a single multi-block read).

Signed-off-by: Mark Greer <mgreer@animalcreek.com>
1 file changed