Hi,

On Nov 12, 2013, at 7:43 PM, "Tian, Feng" <feng.t...@intel.com> wrote:

>> From h/w view, SCSI CD_ROM could support r/w media, Just like SATA CD_ROM. 
>> right?
> So treating all SCSI CD_ROM to read only is proper here? Shall we write the 
> media first, if fail, then get sense data to judge if write protected?

Thanks for looking at my snippet.

I think the simple answer is that, yes, all SCSI CD-ROM devices should be 
considered read only for the purposes of this module.  That mirrors the IDE 
ATAPI implementation:

        IntelFrameworkModulePkg/Bus/Pci/IdeBusDxe/Atapi.c:ATAPIIdentify():
                …
                  //
                  // CD-ROM
                  //
                  case 0x05:
                    …
                    IdeDev->BlkIo.Media->ReadOnly   = TRUE;
                    break;
                ...     

Plus, it also seems like a safer default than attempting a write operation to 
determine the writability of the media.  Imagine if indeed the device is a 
reader/(re)writer and the user has loaded write-once media, then I think they'd 
be surprised if the media was consumed during a search of bootable devices.

Tycho
------------------------------------------------------------------------------
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to