From: Andrei Borzenkov <arvidjaar@gmail.com>
To: "Vladimir 'φ-coder/phcoder' Serbinenko" <phcoder@gmail.com>
Cc: The development of GNU GRUB <grub-devel@gnu.org>
Subject: Re: [edk2] [PATCH 2/2] efinet: fix lost packets due to active MNP instances
Date: Thu, 7 May 2015 20:39:51 +0300 [thread overview]
Message-ID: <20150507203951.5fa7c3e4@opensuse.site> (raw)
In-Reply-To: <5540E100.2000303@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1995 bytes --]
В Wed, 29 Apr 2015 15:47:44 +0200
Vladimir 'φ-coder/phcoder' Serbinenko <phcoder@gmail.com> пишет:
> On 25.04.2015 16:12, Andrei Borzenkov wrote:
> > ---
> > grub-core/net/drivers/efi/efinet.c | 101 ++++++++++++++++++++++++++++++++++++-
> > 1 file changed, 99 insertions(+), 2 deletions(-)
> >
> > diff --git a/grub-core/net/drivers/efi/efinet.c b/grub-core/net/drivers/efi/efinet.c
> > index f171f20..46e337a 100644
> > --- a/grub-core/net/drivers/efi/efinet.c
> > +++ b/grub-core/net/drivers/efi/efinet.c
> > @@ -142,9 +142,52 @@ get_card_packet (struct grub_net_card *dev)
> > return nb;
> > }
> >
> > +static grub_err_t
> > +open_card (struct grub_net_card *dev)
> > +{
> > + grub_efi_simple_network_t *net;
> > +
> > + /* Try to reopen SNP exlusively to close any active MNP protocol instance
> > + that may compete for packet polling
> > + */
> > + net = grub_efi_open_protocol (dev->efi_handle, &net_io_guid,
> > + GRUB_EFI_OPEN_PROTOCOL_BY_EXCLUSIVE);
> > + if (net)
> > + {
> > + if (net->mode->state == GRUB_EFI_NETWORK_STOPPED
> > + && efi_call_1 (net->start, net) != GRUB_EFI_SUCCESS)
> > + return GRUB_ERR_BAD_DEVICE;
> > +
> Please use proper grub_error.
> > + if (net->mode->state == GRUB_EFI_NETWORK_STOPPED)
> > + return GRUB_ERR_BAD_DEVICE;
> > +
> Ditto
> > + if (net->mode->state == GRUB_EFI_NETWORK_STARTED
> > + && efi_call_3 (net->initialize, net, 0, 0) != GRUB_EFI_SUCCESS)
> > + return GRUB_ERR_BAD_DEVICE;
> > +
> Ditto
>
> Otherwise patch looks good. If you're comfortable with it, please
> commit. Make sure to credit all relevant authors, feel free to use
> Also-By to credit several authors (AFAIU Martin as main author and you
> in Also-By)
>
I'm not really comfortable with it, but it has been in distributions
for quite some time so I expect it to work real life. I split it in two
patches - for filtering out extra SNP devices and actual exclusive open.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
next prev parent reply other threads:[~2015-05-07 17:40 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-19 8:01 [PATCH 1/2] efidisk: move device path helpers in core for efinet Andrei Borzenkov
2015-04-19 8:01 ` [PATCH 2/2] efinet: fix lost packets due to active MNP instances Andrei Borzenkov
2015-04-20 6:30 ` Michael Chang
2015-04-21 6:12 ` [edk2] " Michael Chang
2015-04-21 6:49 ` Michael Chang
2015-04-21 12:30 ` Laszlo Ersek
2015-04-22 9:57 ` Michael Chang
2015-04-22 10:50 ` Laszlo Ersek
2015-04-25 14:12 ` Andrei Borzenkov
2015-04-27 6:42 ` Michael Chang
2015-04-29 13:47 ` Vladimir 'φ-coder/phcoder' Serbinenko
2015-05-07 17:39 ` Andrei Borzenkov [this message]
2015-04-26 6:42 ` Andrei Borzenkov
2015-04-26 10:44 ` Andrei Borzenkov
2015-04-27 6:47 ` Michael Chang
2015-04-28 6:03 ` Michael Chang
2015-04-28 8:45 ` Michael Chang
2015-04-29 15:42 ` [PATCH 1/2] efidisk: move device path helpers in core for efinet Vladimir 'phcoder' Serbinenko
2015-05-07 14:53 ` Vladimir 'φ-coder/phcoder' Serbinenko
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=20150507203951.5fa7c3e4@opensuse.site \
--to=arvidjaar@gmail.com \
--cc=grub-devel@gnu.org \
--cc=phcoder@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.