On 04/01/20 00:56, Liran Alon wrote:
> Previous to this change, PvScsiFreeRings() was not undoing all
> operations that was done by PvScsiInitRings().
> This is because PvScsiInitRings() was both preparing rings (Allocate
> memory and map it for device DMA) and setup the rings against device by
> issueing a device command. While PvScsiFreeRings() only unmaps the rings
> and free their memory.
> 
> Driver do not have a functional error as it makes sure to reset device
> before every call site to PvScsiFreeRings(). However, this is not
> intuitive.
> 
> Therefore, prefer to refactor the setup of the ring against device to a
> separate function than PvScsiInitRings().
> 
> Signed-off-by: Liran Alon <liran.a...@oracle.com>
> ---
>  OvmfPkg/PvScsiDxe/PvScsi.c | 163 +++++++++++++++++++------------------
>  1 file changed, 85 insertions(+), 78 deletions(-)

Pushed as commit e210fc130e5c9738909dca432bbf8bf277ba6e37, via
<https://github.com/tianocore/edk2/pull/491>.

Thanks!
Laszlo


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#56856): https://edk2.groups.io/g/devel/message/56856
Mute This Topic: https://groups.io/mt/72688992/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to