2016-03-18 09:27:31

by Nicholas Mc Guire

[permalink] [raw]
Subject: [PATCH] net: consolidate lock/unlock into unlock_wait

The spin_lock()/spin_unlock() is synchronizing on the adapter->work_lock
as the comment also suggests, which is equivalent to spin_unlock_wait()
but the later should be more efficient.

Signed-off-by: Nicholas Mc Guire <[email protected]>
---

Problem located by coccinelle spatch

Patch was compile tested with: x86_64_defconfig + CONFIG_CHELSIO_T1=m

Patch is against linux-next (localversion-next is next-20160318)

drivers/net/ethernet/chelsio/cxgb/cxgb2.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/chelsio/cxgb/cxgb2.c b/drivers/net/ethernet/chelsio/cxgb/cxgb2.c
index f5f1b0b..c5a38dc 100644
--- a/drivers/net/ethernet/chelsio/cxgb/cxgb2.c
+++ b/drivers/net/ethernet/chelsio/cxgb/cxgb2.c
@@ -282,8 +282,8 @@ static int cxgb_close(struct net_device *dev)
!(adapter->open_device_map & PORT_MASK)) {
/* Stop statistics accumulation. */
smp_mb__after_atomic();
- spin_lock(&adapter->work_lock); /* sync with update task */
- spin_unlock(&adapter->work_lock);
+ /* sync with update task */
+ spin_unlock_wait(&adapter->work_lock);
cancel_mac_stats_update(adapter);
}

--
2.1.4


2016-03-18 21:37:08

by David Miller

[permalink] [raw]
Subject: Re: [PATCH] net: consolidate lock/unlock into unlock_wait

From: Nicholas Mc Guire <[email protected]>
Date: Fri, 18 Mar 2016 10:32:05 +0100

> The spin_lock()/spin_unlock() is synchronizing on the adapter->work_lock
> as the comment also suggests, which is equivalent to spin_unlock_wait()
> but the later should be more efficient.
>
> Signed-off-by: Nicholas Mc Guire <[email protected]>

There really is no justification for this change.

This is an optimization in a slow-path of the driver.

The device is a rarely used older piece of hardware.

The amount of testers of this driver is probably approximating zero.

So there is only risk of breakage from this change, and absolutely
zero upside.

Therefore, I'm not applying this patch, and I'd kindly like to ask
you to please consider such issues in the future for these kinds of
transformations.

Thanks.

2016-03-18 22:35:24

by Joe Perches

[permalink] [raw]
Subject: Re: [PATCH] net: consolidate lock/unlock into unlock_wait

On Fri, 2016-03-18 at 17:37 -0400, David Miller wrote:
> From: Nicholas Mc Guire <[email protected]>
> > The spin_lock()/spin_unlock() is synchronizing on the adapter->work_lock
> > as the comment also suggests, which is equivalent to spin_unlock_wait()
> > but the later should be more efficient.
[]
> There really is no justification for this change.
> This is an optimization in a slow-path of the driver.
> The device is a rarely used older piece of hardware.

It really might be nice to take some of the ancient
hardware drivers in drivers/net and move them into
some separate subdirectory like:

drivers/net/ancient
or
drivers/net/antiques
or
drivers/net/archaic
etc...

so there's some clear designation that these crufty
old drivers don't need to be touched anymore except
for maybe when kernel wide changes occur.

2016-03-19 00:33:39

by Joe Perches

[permalink] [raw]
Subject: [RFC net-next 0/2] Create ancient subdirectories for old hardware

Maybe something like this:

Old, rare, and unsupported hardware should be exposed as ancient.

The drivers for these ancient hardwares are generally untested with
current kernels.

Joe Perches (2):
drivers/net: Create an ANCIENT_NETDEVICES symbol
chelsio: Move original cxgb driver into ancient subdirectory

drivers/net/Kconfig | 19 +++++++++++++++++++
drivers/net/ethernet/chelsio/Kconfig | 2 +-
drivers/net/ethernet/chelsio/Makefile | 2 +-
drivers/net/ethernet/chelsio/ancient/Makefile | 1 +
.../net/ethernet/chelsio/{ => ancient}/cxgb/Makefile | 0
.../net/ethernet/chelsio/{ => ancient}/cxgb/common.h | 0
.../net/ethernet/chelsio/{ => ancient}/cxgb/cphy.h | 0
.../ethernet/chelsio/{ => ancient}/cxgb/cpl5_cmd.h | 0
.../net/ethernet/chelsio/{ => ancient}/cxgb/cxgb2.c | 0
.../net/ethernet/chelsio/{ => ancient}/cxgb/elmer0.h | 0
.../net/ethernet/chelsio/{ => ancient}/cxgb/espi.c | 0
.../net/ethernet/chelsio/{ => ancient}/cxgb/espi.h | 0
.../ethernet/chelsio/{ => ancient}/cxgb/fpga_defs.h | 0
.../net/ethernet/chelsio/{ => ancient}/cxgb/gmac.h | 0
.../ethernet/chelsio/{ => ancient}/cxgb/mv88e1xxx.c | 0
.../ethernet/chelsio/{ => ancient}/cxgb/mv88e1xxx.h | 0
.../ethernet/chelsio/{ => ancient}/cxgb/mv88x201x.c | 0
.../net/ethernet/chelsio/{ => ancient}/cxgb/my3126.c | 0
.../net/ethernet/chelsio/{ => ancient}/cxgb/pm3393.c | 0
.../net/ethernet/chelsio/{ => ancient}/cxgb/regs.h | 0
drivers/net/ethernet/chelsio/{ => ancient}/cxgb/sge.c | 0
drivers/net/ethernet/chelsio/{ => ancient}/cxgb/sge.h | 0
.../net/ethernet/chelsio/{ => ancient}/cxgb/subr.c | 0
.../chelsio/{ => ancient}/cxgb/suni1x10gexp_regs.h | 0
drivers/net/ethernet/chelsio/{ => ancient}/cxgb/tp.c | 0
drivers/net/ethernet/chelsio/{ => ancient}/cxgb/tp.h | 0
.../net/ethernet/chelsio/{ => ancient}/cxgb/vsc7326.c | 0
.../ethernet/chelsio/{ => ancient}/cxgb/vsc7326_reg.h | 0
28 files changed, 22 insertions(+), 2 deletions(-)
create mode 100644 drivers/net/ethernet/chelsio/ancient/Makefile
rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/Makefile (100%)
rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/common.h (100%)
rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/cphy.h (100%)
rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/cpl5_cmd.h (100%)
rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/cxgb2.c (100%)
rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/elmer0.h (100%)
rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/espi.c (100%)
rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/espi.h (100%)
rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/fpga_defs.h (100%)
rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/gmac.h (100%)
rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/mv88e1xxx.c (100%)
rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/mv88e1xxx.h (100%)
rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/mv88x201x.c (100%)
rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/my3126.c (100%)
rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/pm3393.c (100%)
rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/regs.h (100%)
rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/sge.c (100%)
rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/sge.h (100%)
rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/subr.c (100%)
rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/suni1x10gexp_regs.h (100%)
rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/tp.c (100%)
rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/tp.h (100%)
rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/vsc7326.c (100%)
rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/vsc7326_reg.h (100%)

--
2.6.3.368.gf34be46

2016-03-19 00:33:52

by Joe Perches

[permalink] [raw]
Subject: [RFC net-next 1/2] drivers/net: Create an ANCIENT_NETDEVICES symbol

Many drivers are ancient and written for hardware that is no longer
available. These drivers are effectively untested under current
kernels. Add a symbol that could guard inclusions of these drivers
into modern kernels unless specifically requested.

Signed-off-by: Joe Perches <[email protected]>
---
drivers/net/Kconfig | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)

diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index 2a1ba62b..0878363 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -21,6 +21,25 @@ menuconfig NETDEVICES

If unsure, say Y.

+menuconfig ANCIENT_NETDEVICES
+ default n
+ depends on NET && NETDEVICES
+ bool "Network ancient device support"
+ ---help---
+ Many old devices are no longer manufactured.
+
+ The drivers for these devices likely worked with the original
+ kernel version when the devices were manufactured, but do not
+ necessarily function well today.
+
+ If these devices still exist and are still functional, the drivers
+ for these devices get scant testing.
+
+ The drivers for these devices are unmaintained and not supported by
+ the vendor.
+
+ If you are unsure that you need drivers for old hardware, say N.
+
# All the following symbols are dependent on NETDEVICES - do not repeat
# that for each of the symbols.
if NETDEVICES
--
2.6.3.368.gf34be46

2016-03-19 00:34:03

by Joe Perches

[permalink] [raw]
Subject: [RFC net-next 2/2] chelsio: Move original cxgb driver into ancient subdirectory

This hardware is no longer sold or supported by Chelsio.
The hardware is relatively rare, so move it to an ancient subdirectory.

Signed-off-by: Joe Perches <[email protected]>
---
drivers/net/ethernet/chelsio/Kconfig | 2 +-
drivers/net/ethernet/chelsio/Makefile | 2 +-
drivers/net/ethernet/chelsio/ancient/Makefile | 1 +
drivers/net/ethernet/chelsio/{ => ancient}/cxgb/Makefile | 0
drivers/net/ethernet/chelsio/{ => ancient}/cxgb/common.h | 0
drivers/net/ethernet/chelsio/{ => ancient}/cxgb/cphy.h | 0
drivers/net/ethernet/chelsio/{ => ancient}/cxgb/cpl5_cmd.h | 0
drivers/net/ethernet/chelsio/{ => ancient}/cxgb/cxgb2.c | 0
drivers/net/ethernet/chelsio/{ => ancient}/cxgb/elmer0.h | 0
drivers/net/ethernet/chelsio/{ => ancient}/cxgb/espi.c | 0
drivers/net/ethernet/chelsio/{ => ancient}/cxgb/espi.h | 0
drivers/net/ethernet/chelsio/{ => ancient}/cxgb/fpga_defs.h | 0
drivers/net/ethernet/chelsio/{ => ancient}/cxgb/gmac.h | 0
drivers/net/ethernet/chelsio/{ => ancient}/cxgb/mv88e1xxx.c | 0
drivers/net/ethernet/chelsio/{ => ancient}/cxgb/mv88e1xxx.h | 0
drivers/net/ethernet/chelsio/{ => ancient}/cxgb/mv88x201x.c | 0
drivers/net/ethernet/chelsio/{ => ancient}/cxgb/my3126.c | 0
drivers/net/ethernet/chelsio/{ => ancient}/cxgb/pm3393.c | 0
drivers/net/ethernet/chelsio/{ => ancient}/cxgb/regs.h | 0
drivers/net/ethernet/chelsio/{ => ancient}/cxgb/sge.c | 0
drivers/net/ethernet/chelsio/{ => ancient}/cxgb/sge.h | 0
drivers/net/ethernet/chelsio/{ => ancient}/cxgb/subr.c | 0
drivers/net/ethernet/chelsio/{ => ancient}/cxgb/suni1x10gexp_regs.h | 0
drivers/net/ethernet/chelsio/{ => ancient}/cxgb/tp.c | 0
drivers/net/ethernet/chelsio/{ => ancient}/cxgb/tp.h | 0
drivers/net/ethernet/chelsio/{ => ancient}/cxgb/vsc7326.c | 0
drivers/net/ethernet/chelsio/{ => ancient}/cxgb/vsc7326_reg.h | 0
27 files changed, 3 insertions(+), 2 deletions(-)
create mode 100644 drivers/net/ethernet/chelsio/ancient/Makefile
rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/Makefile (100%)
rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/common.h (100%)
rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/cphy.h (100%)
rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/cpl5_cmd.h (100%)
rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/cxgb2.c (100%)
rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/elmer0.h (100%)
rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/espi.c (100%)
rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/espi.h (100%)
rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/fpga_defs.h (100%)
rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/gmac.h (100%)
rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/mv88e1xxx.c (100%)
rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/mv88e1xxx.h (100%)
rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/mv88x201x.c (100%)
rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/my3126.c (100%)
rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/pm3393.c (100%)
rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/regs.h (100%)
rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/sge.c (100%)
rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/sge.h (100%)
rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/subr.c (100%)
rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/suni1x10gexp_regs.h (100%)
rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/tp.c (100%)
rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/tp.h (100%)
rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/vsc7326.c (100%)
rename drivers/net/ethernet/chelsio/{ => ancient}/cxgb/vsc7326_reg.h (100%)

diff --git a/drivers/net/ethernet/chelsio/Kconfig b/drivers/net/ethernet/chelsio/Kconfig
index 4d187f2..25f4931 100644
--- a/drivers/net/ethernet/chelsio/Kconfig
+++ b/drivers/net/ethernet/chelsio/Kconfig
@@ -18,7 +18,7 @@ if NET_VENDOR_CHELSIO

config CHELSIO_T1
tristate "Chelsio 10Gb Ethernet support"
- depends on PCI
+ depends on PCI && ANCIENT_NETDEVICES
select CRC32
select MDIO
---help---
diff --git a/drivers/net/ethernet/chelsio/Makefile b/drivers/net/ethernet/chelsio/Makefile
index 390510b..10a8f92 100644
--- a/drivers/net/ethernet/chelsio/Makefile
+++ b/drivers/net/ethernet/chelsio/Makefile
@@ -2,7 +2,7 @@
# Makefile for the Chelsio network device drivers.
#

-obj-$(CONFIG_CHELSIO_T1) += cxgb/
+obj-y += ancient/
obj-$(CONFIG_CHELSIO_T3) += cxgb3/
obj-$(CONFIG_CHELSIO_T4) += cxgb4/
obj-$(CONFIG_CHELSIO_T4VF) += cxgb4vf/
diff --git a/drivers/net/ethernet/chelsio/ancient/Makefile b/drivers/net/ethernet/chelsio/ancient/Makefile
new file mode 100644
index 0000000..f60dbde
--- /dev/null
+++ b/drivers/net/ethernet/chelsio/ancient/Makefile
@@ -0,0 +1 @@
+obj-$(CONFIG_CHELSIO_T1) += cxgb/
diff --git a/drivers/net/ethernet/chelsio/cxgb/Makefile b/drivers/net/ethernet/chelsio/ancient/cxgb/Makefile
similarity index 100%
rename from drivers/net/ethernet/chelsio/cxgb/Makefile
rename to drivers/net/ethernet/chelsio/ancient/cxgb/Makefile
diff --git a/drivers/net/ethernet/chelsio/cxgb/common.h b/drivers/net/ethernet/chelsio/ancient/cxgb/common.h
similarity index 100%
rename from drivers/net/ethernet/chelsio/cxgb/common.h
rename to drivers/net/ethernet/chelsio/ancient/cxgb/common.h
diff --git a/drivers/net/ethernet/chelsio/cxgb/cphy.h b/drivers/net/ethernet/chelsio/ancient/cxgb/cphy.h
similarity index 100%
rename from drivers/net/ethernet/chelsio/cxgb/cphy.h
rename to drivers/net/ethernet/chelsio/ancient/cxgb/cphy.h
diff --git a/drivers/net/ethernet/chelsio/cxgb/cpl5_cmd.h b/drivers/net/ethernet/chelsio/ancient/cxgb/cpl5_cmd.h
similarity index 100%
rename from drivers/net/ethernet/chelsio/cxgb/cpl5_cmd.h
rename to drivers/net/ethernet/chelsio/ancient/cxgb/cpl5_cmd.h
diff --git a/drivers/net/ethernet/chelsio/cxgb/cxgb2.c b/drivers/net/ethernet/chelsio/ancient/cxgb/cxgb2.c
similarity index 100%
rename from drivers/net/ethernet/chelsio/cxgb/cxgb2.c
rename to drivers/net/ethernet/chelsio/ancient/cxgb/cxgb2.c
diff --git a/drivers/net/ethernet/chelsio/cxgb/elmer0.h b/drivers/net/ethernet/chelsio/ancient/cxgb/elmer0.h
similarity index 100%
rename from drivers/net/ethernet/chelsio/cxgb/elmer0.h
rename to drivers/net/ethernet/chelsio/ancient/cxgb/elmer0.h
diff --git a/drivers/net/ethernet/chelsio/cxgb/espi.c b/drivers/net/ethernet/chelsio/ancient/cxgb/espi.c
similarity index 100%
rename from drivers/net/ethernet/chelsio/cxgb/espi.c
rename to drivers/net/ethernet/chelsio/ancient/cxgb/espi.c
diff --git a/drivers/net/ethernet/chelsio/cxgb/espi.h b/drivers/net/ethernet/chelsio/ancient/cxgb/espi.h
similarity index 100%
rename from drivers/net/ethernet/chelsio/cxgb/espi.h
rename to drivers/net/ethernet/chelsio/ancient/cxgb/espi.h
diff --git a/drivers/net/ethernet/chelsio/cxgb/fpga_defs.h b/drivers/net/ethernet/chelsio/ancient/cxgb/fpga_defs.h
similarity index 100%
rename from drivers/net/ethernet/chelsio/cxgb/fpga_defs.h
rename to drivers/net/ethernet/chelsio/ancient/cxgb/fpga_defs.h
diff --git a/drivers/net/ethernet/chelsio/cxgb/gmac.h b/drivers/net/ethernet/chelsio/ancient/cxgb/gmac.h
similarity index 100%
rename from drivers/net/ethernet/chelsio/cxgb/gmac.h
rename to drivers/net/ethernet/chelsio/ancient/cxgb/gmac.h
diff --git a/drivers/net/ethernet/chelsio/cxgb/mv88e1xxx.c b/drivers/net/ethernet/chelsio/ancient/cxgb/mv88e1xxx.c
similarity index 100%
rename from drivers/net/ethernet/chelsio/cxgb/mv88e1xxx.c
rename to drivers/net/ethernet/chelsio/ancient/cxgb/mv88e1xxx.c
diff --git a/drivers/net/ethernet/chelsio/cxgb/mv88e1xxx.h b/drivers/net/ethernet/chelsio/ancient/cxgb/mv88e1xxx.h
similarity index 100%
rename from drivers/net/ethernet/chelsio/cxgb/mv88e1xxx.h
rename to drivers/net/ethernet/chelsio/ancient/cxgb/mv88e1xxx.h
diff --git a/drivers/net/ethernet/chelsio/cxgb/mv88x201x.c b/drivers/net/ethernet/chelsio/ancient/cxgb/mv88x201x.c
similarity index 100%
rename from drivers/net/ethernet/chelsio/cxgb/mv88x201x.c
rename to drivers/net/ethernet/chelsio/ancient/cxgb/mv88x201x.c
diff --git a/drivers/net/ethernet/chelsio/cxgb/my3126.c b/drivers/net/ethernet/chelsio/ancient/cxgb/my3126.c
similarity index 100%
rename from drivers/net/ethernet/chelsio/cxgb/my3126.c
rename to drivers/net/ethernet/chelsio/ancient/cxgb/my3126.c
diff --git a/drivers/net/ethernet/chelsio/cxgb/pm3393.c b/drivers/net/ethernet/chelsio/ancient/cxgb/pm3393.c
similarity index 100%
rename from drivers/net/ethernet/chelsio/cxgb/pm3393.c
rename to drivers/net/ethernet/chelsio/ancient/cxgb/pm3393.c
diff --git a/drivers/net/ethernet/chelsio/cxgb/regs.h b/drivers/net/ethernet/chelsio/ancient/cxgb/regs.h
similarity index 100%
rename from drivers/net/ethernet/chelsio/cxgb/regs.h
rename to drivers/net/ethernet/chelsio/ancient/cxgb/regs.h
diff --git a/drivers/net/ethernet/chelsio/cxgb/sge.c b/drivers/net/ethernet/chelsio/ancient/cxgb/sge.c
similarity index 100%
rename from drivers/net/ethernet/chelsio/cxgb/sge.c
rename to drivers/net/ethernet/chelsio/ancient/cxgb/sge.c
diff --git a/drivers/net/ethernet/chelsio/cxgb/sge.h b/drivers/net/ethernet/chelsio/ancient/cxgb/sge.h
similarity index 100%
rename from drivers/net/ethernet/chelsio/cxgb/sge.h
rename to drivers/net/ethernet/chelsio/ancient/cxgb/sge.h
diff --git a/drivers/net/ethernet/chelsio/cxgb/subr.c b/drivers/net/ethernet/chelsio/ancient/cxgb/subr.c
similarity index 100%
rename from drivers/net/ethernet/chelsio/cxgb/subr.c
rename to drivers/net/ethernet/chelsio/ancient/cxgb/subr.c
diff --git a/drivers/net/ethernet/chelsio/cxgb/suni1x10gexp_regs.h b/drivers/net/ethernet/chelsio/ancient/cxgb/suni1x10gexp_regs.h
similarity index 100%
rename from drivers/net/ethernet/chelsio/cxgb/suni1x10gexp_regs.h
rename to drivers/net/ethernet/chelsio/ancient/cxgb/suni1x10gexp_regs.h
diff --git a/drivers/net/ethernet/chelsio/cxgb/tp.c b/drivers/net/ethernet/chelsio/ancient/cxgb/tp.c
similarity index 100%
rename from drivers/net/ethernet/chelsio/cxgb/tp.c
rename to drivers/net/ethernet/chelsio/ancient/cxgb/tp.c
diff --git a/drivers/net/ethernet/chelsio/cxgb/tp.h b/drivers/net/ethernet/chelsio/ancient/cxgb/tp.h
similarity index 100%
rename from drivers/net/ethernet/chelsio/cxgb/tp.h
rename to drivers/net/ethernet/chelsio/ancient/cxgb/tp.h
diff --git a/drivers/net/ethernet/chelsio/cxgb/vsc7326.c b/drivers/net/ethernet/chelsio/ancient/cxgb/vsc7326.c
similarity index 100%
rename from drivers/net/ethernet/chelsio/cxgb/vsc7326.c
rename to drivers/net/ethernet/chelsio/ancient/cxgb/vsc7326.c
diff --git a/drivers/net/ethernet/chelsio/cxgb/vsc7326_reg.h b/drivers/net/ethernet/chelsio/ancient/cxgb/vsc7326_reg.h
similarity index 100%
rename from drivers/net/ethernet/chelsio/cxgb/vsc7326_reg.h
rename to drivers/net/ethernet/chelsio/ancient/cxgb/vsc7326_reg.h
--
2.6.3.368.gf34be46

2016-03-19 02:12:10

by David Miller

[permalink] [raw]
Subject: Re: [RFC net-next 0/2] Create ancient subdirectories for old hardware

From: Joe Perches <[email protected]>
Date: Fri, 18 Mar 2016 17:33:29 -0700

> Maybe something like this:
>
> Old, rare, and unsupported hardware should be exposed as ancient.
>
> The drivers for these ancient hardwares are generally untested with
> current kernels.

Moving drivers has a long term maintainence cost.

If they've moved into drivers/net proper, we have to maintain
them there forever.

2016-03-19 02:28:10

by Joe Perches

[permalink] [raw]
Subject: Re: [RFC net-next 0/2] Create ancient subdirectories for old hardware

On Fri, 2016-03-18 at 22:11 -0400, David Miller wrote:
> From: Joe Perches <[email protected]>
> Date: Fri, 18 Mar 2016 17:33:29 -0700
>
> > Maybe something like this:
> >?
> > Old, rare, and unsupported hardware should be exposed as ancient.
> >?
> > The drivers for these ancient hardwares are generally untested with
> > current kernels.
>
> Moving drivers has a long term maintainence cost.
>
> If they've moved into drivers/net proper, we have to maintain
> them there forever.

I don't doubt that.

All files are still in drivers/net, just possibly in
separate subdirectories for easier visibility to
determine if changes like what were proposed for cxgb
should actually be done or not.

2016-03-19 03:16:36

by David Miller

[permalink] [raw]
Subject: Re: [RFC net-next 0/2] Create ancient subdirectories for old hardware

From: Joe Perches <[email protected]>
Date: Fri, 18 Mar 2016 19:28:02 -0700

> On Fri, 2016-03-18 at 22:11 -0400, David Miller wrote:
>> From: Joe Perches <[email protected]>
>> Date: Fri, 18 Mar 2016 17:33:29 -0700
>>
>> > Maybe something like this:
>> >?
>> > Old, rare, and unsupported hardware should be exposed as ancient.
>> >?
>> > The drivers for these ancient hardwares are generally untested with
>> > current kernels.
>>
>> Moving drivers has a long term maintainence cost.
>>
>> If they've moved into drivers/net proper, we have to maintain
>> them there forever.
>
> I don't doubt that.
>
> All files are still in drivers/net, just possibly in
> separate subdirectories for easier visibility to
> determine if changes like what were proposed for cxgb
> should actually be done or not.

You don't understand my concern, backporting patches to -stable
releases is more painful if you move the driver anywhere other
than where it has been for years.

I'm not entertaining this idea, sorry Joe.

2016-03-19 08:28:17

by Nicholas Mc Guire

[permalink] [raw]
Subject: Re: [PATCH] net: consolidate lock/unlock into unlock_wait

On Fri, Mar 18, 2016 at 03:35:18PM -0700, Joe Perches wrote:
> On Fri, 2016-03-18 at 17:37 -0400, David Miller wrote:
> > From: Nicholas Mc Guire <[email protected]>
> > > The spin_lock()/spin_unlock() is synchronizing on the adapter->work_lock
> > > as the comment also suggests, which is equivalent to spin_unlock_wait()
> > > but the later should be more efficient.
> []
> > There really is no justification for this change.
> > This is an optimization in a slow-path of the driver.
> > The device is a rarely used older piece of hardware.
>
> It really might be nice to take some of the ancient
> hardware drivers in drivers/net and move them into
> some separate subdirectory like:
>
> drivers/net/ancient
> or
> drivers/net/antiques
> or
> drivers/net/archaic
> etc...
>
> so there's some clear designation that these crufty
> old drivers don't need to be touched anymore except
> for maybe when kernel wide changes occur.
>
actually thats just the problem - some of those did not
perform such kernel wide changes lock/unlock -> unlock_wait
being one of them. But having a distinction as proposed to
keep people like me from scanning them, sounds like a good idea.

Will add an "age of code" check before submitting API cleanups.

thx!
hofrat

2016-03-19 15:36:37

by Joe Perches

[permalink] [raw]
Subject: Re: [RFC net-next 0/2] Create ancient subdirectories for old hardware

On Fri, 2016-03-18 at 23:16 -0400, David Miller wrote:
> From: Joe Perches <[email protected]>?Date: Fri, 18 Mar 2016 19:28:02 -0700
> > On Fri, 2016-03-18 at 22:11 -0400, David Miller wrote:
> >> From: Joe Perches <[email protected]> Date: Fri, 18 Mar 2016 17:33:29 -0700
> >> > Maybe something like this:?
> >> > Old, rare, and unsupported hardware should be exposed as ancient.
> >> >?
> >> > The drivers for these ancient hardwares are generally untested with
> >> > current kernels.
> >>?
> >> Moving drivers has a long term maintainence cost.
> >>?
> >> If they've moved into drivers/net proper, we have to maintain
> >> them there forever.
> >?
> > I don't doubt that.

Actually I rather do kind of doubt that.

Look for instance at what's proposed now for drivers/isdn
which realistically, could have been in drivers/net.

Also, various bits of hardware support have already been
dropped from drivers/net. ?The 3c503, ni52 and others?
come to mind. Token Ring support too.

Today, I expect there aren't many Packet Engines devices,
either hamachi or yellowfin, still being used, especially
with kernel versions > 4.

> > All files are still in drivers/net, just possibly in
> > separate subdirectories for easier visibility to
> > determine if changes like what were proposed for cxgb
> > should actually be done or not.
>
> You don't understand my concern, backporting patches to -stable
> releases is more painful if you move the driver anywhere other
> than where it has been for years.
>
> I'm not entertaining this idea, sorry Joe.

I do understand your concern. ?Backporting patches to obsolete
hardware shouldn't much be necessary as obsolete hardware,
as you wrote yourself, simply doens't get much testing.

Archaic stuff should eventually get sifted out altogether.

Marking drivers as archaic at least allows people that use
use the older devices to object and maybe actually step up
to maintain them too.