From: "Laszlo Ersek" <lersek@redhat.com>
To: devel@edk2.groups.io, liran.alon@oracle.com
Cc: nikita.leshchenko@oracle.com, aaron.young@oracle.com,
jordan.l.justen@intel.com, ard.biesheuvel@linaro.org
Subject: Re: [edk2-devel] [PATCH v2] OvmfPkg/PvScsiDxe: Refactor setup of rings to separate function
Date: Wed, 1 Apr 2020 16:48:09 +0200 [thread overview]
Message-ID: <9c2e2178-cf77-70f8-ad46-4330e38bce37@redhat.com> (raw)
In-Reply-To: <20200331225637.123318-1-liran.alon@oracle.com>
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.alon@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
prev parent reply other threads:[~2020-04-01 14:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-31 22:56 [PATCH v2] OvmfPkg/PvScsiDxe: Refactor setup of rings to separate function Liran Alon
2020-04-01 10:41 ` Laszlo Ersek
2020-04-01 11:06 ` Liran Alon
2020-04-01 14:48 ` Laszlo Ersek [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9c2e2178-cf77-70f8-ad46-4330e38bce37@redhat.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox