All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net v4] r8169:  Add bios support.
@ 2016-02-06  6:31 Corcodel Marian
  2016-02-06  7:39 ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Corcodel Marian @ 2016-02-06  6:31 UTC (permalink / raw)
  To: netdev; +Cc: Corcodel Marian

  This patch help do not compile functions relative to setting latency,
  setting bus master wich have provided on bios.Davem says "The chip
  can be used on systems without a BIOS and that should still
  work."

Signed-off-by: Corcodel Marian <asd@marian1000.go.ro>
---
 drivers/Kconfig                      | 4 ++++
 drivers/net/ethernet/realtek/r8169.c | 3 ++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/Kconfig b/drivers/Kconfig
index d2ac339..46bdd2b 100644
--- a/drivers/Kconfig
+++ b/drivers/Kconfig
@@ -1,5 +1,9 @@
 menu "Device Drivers"
 
+config BIOS_SUPPORT
+	bool "bios support for systems wich have one"
+	def_bool y
+
 source "drivers/amba/Kconfig"
 
 source "drivers/base/Kconfig"
diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
index 6a2b7bb..2e83059 100644
--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
@@ -8262,8 +8262,9 @@ static int rtl_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
 	rtl_hw_reset(tp);
 
 	rtl_ack_events(tp, 0xffff);
-
+#ifndef CONFIG_BIOS_SUPPORT
 	pci_set_master(pdev);
+#endif
 
 	rtl_init_mdio_ops(tp);
 	rtl_init_pll_power_ops(tp);
-- 
2.5.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net v4] r8169: Add bios support.
  2016-02-06  6:31 [PATCH net v4] r8169: Add bios support Corcodel Marian
@ 2016-02-06  7:39 ` David Miller
  2016-02-06 13:57   ` Corcodel Marian
  0 siblings, 1 reply; 3+ messages in thread
From: David Miller @ 2016-02-06  7:39 UTC (permalink / raw)
  To: asd; +Cc: netdev

From: Corcodel Marian <asd@marian1000.go.ro>
Date: Sat,  6 Feb 2016 08:31:26 +0200

> @@ -8262,8 +8262,9 @@ static int rtl_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
>  	rtl_hw_reset(tp);
>  
>  	rtl_ack_events(tp, 0xffff);
> -
> +#ifndef CONFIG_BIOS_SUPPORT
>  	pci_set_master(pdev);
> +#endif

I already made it clear to you that it is perfectly fine to unconditionally
call pci_set_master() from the driver in any circumstance.

Look across all of the drivers under drivers/net/ that invoke this function,
it's meant to be used this way and it's fine.

There is absolutely no reason to conditionalize it.

Thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net v4] r8169: Add bios support.
  2016-02-06  7:39 ` David Miller
@ 2016-02-06 13:57   ` Corcodel Marian
  0 siblings, 0 replies; 3+ messages in thread
From: Corcodel Marian @ 2016-02-06 13:57 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

On Sat, 2016-02-06 at 02:39 -0500, David Miller wrote:
> From: Corcodel Marian <asd@marian1000.go.ro>
> Date: Sat,  6 Feb 2016 08:31:26 +0200
> 
> > @@ -8262,8 +8262,9 @@ static int rtl_init_one(struct pci_dev *pdev,
> const struct pci_device_id *ent)
> >       rtl_hw_reset(tp);
> >  
> >       rtl_ack_events(tp, 0xffff);
> > -
> > +#ifndef CONFIG_BIOS_SUPPORT
> >       pci_set_master(pdev);
> > +#endif
> 
> I already made it clear to you that it is perfectly fine to
> unconditionally
> call pci_set_master() from the driver in any circumstance.
> 
> Look across all of the drivers under drivers/net/ that invoke this
> function,
> it's meant to be used this way and it's fine.
> 
> There is absolutely no reason to conditionalize it.
> 
> Thanks.
> 

May be but i'm not sure this must tested on every driver.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-02-06 14:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-06  6:31 [PATCH net v4] r8169: Add bios support Corcodel Marian
2016-02-06  7:39 ` David Miller
2016-02-06 13:57   ` Corcodel Marian

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.