[stgt] [PATCH] MMC READ TOC, asking for track 0 is valid even if track 0 does not exist

ronnie sahlberg ronniesahlberg at gmail.com
Sun Dec 25 23:48:10 CET 2011


List, Tomo

Please find attached a patch for MMC.
Basically, if an initiator asks for "READ TOC track==0"
this is valid even if track 0 does not exist.

For single session media such as TGTD emulated, track 0 does not
exist, only track 1 exist, but
asking for track 0 is still valid.


The reason is that "READ TOC track==xyz" does NOT ask for "information
for track xyz only"
the CDB asks for "provide information for all tracks that exist,
starting at track xyz".

So for this case, we have to handle track==0 and track==1 the same.
Either if initiator asks for track starting at 0, or if initiator asks
for tracks starting at 1,
both cases we should return the information for track #1

Recent Ubuntu fails to handle/detect the CD/DVD without this fix.
Possibly other distros/applications might too.



regards
ronnie sahlberg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-MMC-READ-TOC-track-0-is-valid.patch.gz
Type: application/x-gzip
Size: 812 bytes
Desc: not available
URL: <http://lists.wpkg.org/pipermail/stgt/attachments/20111226/c64a2e09/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-MMC-READ-TOC-track-0-is-valid.patch
Type: text/x-diff
Size: 1485 bytes
Desc: not available
URL: <http://lists.wpkg.org/pipermail/stgt/attachments/20111226/c64a2e09/attachment-0001.patch>


More information about the stgt mailing list