lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Sat, 12 Mar 2016 22:09:31 +0300
From:	Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To:	Corcodel Marian <asd@...ian1000.go.ro>, netdev@...r.kernel.org
Cc:	Francois Romieu <romieu@...zoreil.com>
Subject: Re: [PATCH net v3.16]r8169: Not enable/disable bus mastering when is
 enabled on BIOS

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@...ian1000.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ