[if gte mso 9]>

Re: [edk2] Protocol for ejecting CD/DVD from disc drive Programmatically

Subject: Re: [edk2] Protocol for ejecting CD/DVD from disc drive Programmatically

From: "Tian, Feng" <feng.tian@intel.com>

To: "edk2-devel@lists.sourceforge.net" <edk2-devel@lists.sourceforge.net>

Date: 2011-11-09 06:15:03

1)      Locate ScsiIo Protocol;

2)      Get Device Type by ScsiIo interface;

If (DeviceType == CDROM) then

  Construct and Send Eject cmd;

 

Please refer to ScsiReadCapacityCommand() in UefiScsiLib.c. It shows how to construct and send ATAPI cmds to lower level driver.

 

Thanks

Feng

 

From: Suraj Joshi [mailto:suraj.joshi@zensar.in]
Sent: Tuesday, November 08, 2011 13:49
To: edk2-devel@lists.sourceforge.net
Subject: Re: [edk2] Protocol for ejecting CD/DVD from disc drive Programmatically

 

Hi Feng,

 

I found Load Unload ATAPI commands which can be used for ejecting.

Please provide me sample pseudo code of implementation of these commands using EFI_EXT_SCSI_PASS_THRU_PROTOCOL.

 

Thanks & Regards,

Suraj Joshi

 

 

 

From: Tian, Feng [mailto:feng.tian@intel.com]
Sent: Tuesday, November 08, 2011 10:29 AM
To: edk2-devel@lists.sourceforge.net
Subject: Re: [edk2] Protocol for ejecting CD/DVD from disc drive Programmatically

 

 

The EXT_SCSI_PASS_THRU_PROTOCOL is produced by AtaAtapiPassThru driver in MdeModulePkg\Bus\Ata.

 

There is no such eject code, but you can refer to UefiScsiLib in MdePkg\Library to find out how to construct EFI_SCSI_IO_SCSI_REQUEST_PACKET to execute ATAPI cmds.

 

Note: ScsiIo protocol is produced by ScsiBus driver in MdeModulePkg upon EXT_SCSI_PASS_THRU_PROTOCOL.

 

Thanks

Feng

 

From: Suraj Joshi [mailto:suraj.joshi@zensar.in]
Sent: Tuesday, November 08, 2011 12:30
To: edk2-devel@lists.sourceforge.net
Subject: Re: [edk2] Protocol for ejecting CD/DVD from disc drive Programmatically

 

Hi Feng,

 

Thanks for your reply!

 

Do you have sample code which contains implementation of EXT_SCSI_PASS_THRU_PROTOCOL to eject drive.

 

Please let me know in which directory of UDK2010 example of EXT_SCSI_PASS_THRU_PROTOCOL is given.

 

Thanks in adv.

 

Regards,

Suraj Joshi

 

From: Tian, Feng [mailto:feng.tian@intel.com]
Sent: Tuesday, November 08, 2011 6:53 AM
To: edk2-devel@lists.sourceforge.net
Subject: Re: [edk2] Protocol for ejecting CD/DVD from disc drive Programmatically

 

Hi, Joshi

 

If I recall correctly, EDK1.6 was using IdeBus driver which just produces BlockIo protocol. And this protocol doesn’t support send ATAPI cmds to ATAPI devices.

 

But UDK2010 now updates its ATA stack implementation. It supports EXT_SCSI_PASS_THRU_PROTOCOL by which user can send eject cmd to the ATAPI devices.

 

Thanks
Feng

 

From: Suraj Joshi [mailto:suraj.joshi@zensar.in]
Sent: Monday, November 07, 2011 19:35
To: edk2-devel@lists.sourceforge.net
Subject: [edk2] Protocol for ejecting CD/DVD from disc drive Programmatically

 

Hello experts,

 

I am developing application for eject CD/DVD from CD/DVD ROM. I have taken EDK 1.6 source code as base version.

 

Are there any apis exist in EFI for eject drive like in windows MCI protocol which did the same taks.

 

Thanks in adv.

 

Regards,

Suraj Joshi