From: Sergei Shtylyov <sergei.shtylyov@cogentembedded•com>
To: Corcodel Marian <asd@marian1000•go.ro>, netdev@vger•kernel.org
Cc: Francois Romieu <romieu@fr•zoreil.com>
Subject: Re: [PATCH net v3.16]r8169: Not enable/disable bus mastering when is enabled on BIOS
Date: Sat, 12 Mar 2016 22:09:31 +0300 [thread overview]
Message-ID: <56E4696B.1050808@cogentembedded.com> (raw)
In-Reply-To: <1457764426-6578-1-git-send-email-asd@marian1000.go.ro>
Hello.
On 03/12/2016 09:33 AM, Corcodel Marian wrote:
> This patch not enable/disable bus mastering when is enabled on BIOS..
> pci_disable_device function also disable bus mastering for, disable bus mastering
> is dedicate function.
>
> Signed-off-by: Corcodel Marian <asd@marian1000•go.ro>
> ---
> drivers/net/ethernet/realtek/r8169.c | 29 ++++++++++++++++++++++++++---
> 1 file changed, 26 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
> index 02aec96..ec555e7 100644
> --- a/drivers/net/ethernet/realtek/r8169.c
> +++ b/drivers/net/ethernet/realtek/r8169.c
[...]
> @@ -7103,7 +7120,13 @@ rtl_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
>
> rtl_ack_events(tp, 0xffff);
>
> - pci_set_master(pdev);
> + pci_read_config_word(pdev, PCI_COMMAND, &cmd);
> + if (cmd & PCI_COMMAND_MASTER)
> + tp->bios_support = true;
> + else {
Documentation/CodingStyle requites {} on all branches of the *if*
statement if at least one branch has them.
> + tp->bios_support = false;
> + pci_set_master(pdev);
> + }
>
> /*
> * Pretend we are using VLANs; This bypasses a nasty bug where
MBR, Sergei
prev parent reply other threads:[~2016-03-12 19:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-12 6:33 [PATCH net v3.16]r8169: Not enable/disable bus mastering when is enabled on BIOS Corcodel Marian
2016-03-12 9:44 ` Francois Romieu
2016-03-12 10:48 ` Corcodel Marian
2016-03-12 12:15 ` Francois Romieu
2016-03-12 19:09 ` Sergei Shtylyov [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=56E4696B.1050808@cogentembedded.com \
--to=sergei.shtylyov@cogentembedded$(echo .)com \
--cc=asd@marian1000$(echo .)go.ro \
--cc=netdev@vger$(echo .)kernel.org \
--cc=romieu@fr$(echo .)zoreil.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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