No. ScsiBus is a BUS driver. it would enumerate all ATAPI devices at SATA/IDE 
host controller and install child device path for each of ATAPI devics. The 
DevicePath opened by ScsiBus is the "parent" device path. The DevicePath that 
the Partition driver is opening is the "child" device created by ScsiBus.

-----Original Message-----
From: Ramesh R. [mailto:rame...@ami.com] 
Sent: Friday, July 19, 2013 12:53
To: Tian, Feng; edk2-devel@lists.sourceforge.net
Subject: RE: Partition Driver

Hi Tian,

  Thanks for your reply. Is there any rule that when do we use BY_DRIVER or 
GET_PROTOCOL.

My understanding that if the BUS driver doesn't want other BUS driver not to 
handle the device or protocol, we should be using the BY_DRIVER.

In case of ScsiBus, the Parition driver will not be loaded because ScSibus 
Driver opened the devicepath using BY_DRIVER attribute and I think that is 
wrong also. It should have done BY_DRIVER only for controller handle ( PCI IO 
protocol).

Please share your input on this.

Thanks,
Ramesh
 
-----Original Message-----
From: Tian, Feng [mailto:feng.t...@intel.com] 
Sent: Thursday, July 18, 2013 7:34 AM
To: Ramesh R.; edk2-devel@lists.sourceforge.net
Cc: Tian, Feng
Subject: RE: Partition Driver


Partition driver in fact consuming BlockIo, BlockIo2, DiskIo and DevicePath. 
Why some of them are opened with BY_DRIVER and others are opened with 
GET_PROTOCOL is because of EDKII concrete implementation.

Partition driver would use Parent Device Path info to create child's device 
path. And the "parent" device paths, created by AtaBus or ScsiBus for their 
enumerated childs, now aren't opened by lower layer driver with BY_DRIVER, so 
we could open it like that.

Another sample is in AtaBus & ScsiBus. You can see DevicePath is opened by 
AtaBus with OPEN_PROTOCOL but by ScsiBus with BY_DRIVER. It's just due to 
AtaBus was developed after ScsiBus and we want to layer them above 
AtaAtapiPassThru driver to manage ATA devices and ATAPI devices separately.

-----Original Message-----
From: Ramesh R. [mailto:rame...@ami.com] 
Sent: Thursday, July 18, 2013 01:39
To: edk2-devel@lists.sourceforge.net
Subject: [edk2] Partition Driver

Hi All,

  Partition driver consuming only the DiskIO , so it should be doing the 
EFI_OPEN_PROTOCOL_BY_DRIVER attribute only for the DiskIO protocol. Is there 
any reason why Partition driver does EFI_OPEN_PROTOCOL_BY_DRIVER attribute for 
the DevicePath protocol?


  Status = gBS->OpenProtocol (
                  ControllerHandle,
                  &gEfiDevicePathProtocolGuid,
                  (VOID **) &ParentDevicePath,
                  This->DriverBindingHandle,
                  ControllerHandle,
                  EFI_OPEN_PROTOCOL_BY_DRIVER
                  );

Thanks,
Ramesh
------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics Get end-to-end 
visibility with application monitoring from AppDynamics Isolate bottlenecks and 
diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&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