qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jason Wang <jasowang@redhat.com>
To: Yuri Benditovich <yuri.benditovich@daynix.com>,
	dmitry.fleytman@gmail.com, qemu-devel@nongnu.org
Cc: yan@daynix.com
Subject: Re: [PATCH] e1000e: Avoid hw_error if legacy mode used
Date: Tue, 4 Feb 2020 12:08:38 +0800	[thread overview]
Message-ID: <03f0e2bd-87bd-21a9-1583-2881862808c8@redhat.com> (raw)
In-Reply-To: <20200127160312.31367-1-yuri.benditovich@daynix.com>


On 2020/1/28 上午12:03, Yuri Benditovich wrote:
> https://bugzilla.redhat.com/show_bug.cgi?id=1787142
> The emulation issues hw_error if PSRCTL register
> is written, for example, with zero value.
> Such configuration does not present any problem when
> DTYP bits of RCTL register define legacy format of
> transfer descriptors. Current commit discards check
> for BSIZE0 and BSIZE1 when legacy mode used.
>
> Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
> ---
>   hw/net/e1000e_core.c | 13 ++++++++-----
>   1 file changed, 8 insertions(+), 5 deletions(-)
>
> diff --git a/hw/net/e1000e_core.c b/hw/net/e1000e_core.c
> index 5b05c8ea8a..94ea34dca5 100644
> --- a/hw/net/e1000e_core.c
> +++ b/hw/net/e1000e_core.c
> @@ -2813,12 +2813,15 @@ e1000e_set_eitr(E1000ECore *core, int index, uint32_t val)
>   static void
>   e1000e_set_psrctl(E1000ECore *core, int index, uint32_t val)
>   {
> -    if ((val & E1000_PSRCTL_BSIZE0_MASK) == 0) {
> -        hw_error("e1000e: PSRCTL.BSIZE0 cannot be zero");
> -    }
> +    if (core->mac[RCTL] & E1000_RCTL_DTYP_MASK) {
> +
> +        if ((val & E1000_PSRCTL_BSIZE0_MASK) == 0) {
> +            hw_error("e1000e: PSRCTL.BSIZE0 cannot be zero");
> +        }
>   
> -    if ((val & E1000_PSRCTL_BSIZE1_MASK) == 0) {
> -        hw_error("e1000e: PSRCTL.BSIZE1 cannot be zero");
> +        if ((val & E1000_PSRCTL_BSIZE1_MASK) == 0) {
> +            hw_error("e1000e: PSRCTL.BSIZE1 cannot be zero");
> +        }
>       }
>   
>       core->mac[PSRCTL] = val;


Applied.

Thanks



      parent reply	other threads:[~2020-02-04  4:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-27 16:03 [PATCH] e1000e: Avoid hw_error if legacy mode used Yuri Benditovich
2020-01-29 16:08 ` Dmitry Fleytman
2020-02-04  4:08 ` Jason Wang [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-all 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=03f0e2bd-87bd-21a9-1583-2881862808c8@redhat.com \
    --to=jasowang@redhat.com \
    --cc=dmitry.fleytman@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=yan@daynix.com \
    --cc=yuri.benditovich@daynix.com \
    /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;
as well as URLs for NNTP newsgroup(s).