Skip to contentSkip to conversation

net: consolidate lock/unlock into unlock_wait

PATCH In review Nicholas Mc Guire 4 participants 11 messages Mar 18, 2016 – Mar 19, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---

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(-)
drivers/net/ethernet/chelsio/cxgb/cxgb2.c +2 -2
index f5f1b0b..c5a38dc 100644
@@ -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);
 	}
 
Signature · 1 line
2.1.4
maintainer
#1 lore raw

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

Quoted 5 lines

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.

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.

#2 lore raw
Quoted 4 lines · David Miller

From: Nicholas Mc Guire <[email protected]>

Quoted 3 lines

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.

[]

Quoted 3 lines

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.

#3 lore raw

cover 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%)
Signature · 1 line
2.6.3.368.gf34be46
maintainer
#4 lore raw

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

Quoted 6 lines

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.

#5 lore raw

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

Quoted 10 lines · David Miller

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

Quoted 6 lines

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.

Quoted 4 lines

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.

maintainer
#6 lore raw

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

Quoted 16 lines · David Miller
Quoted 10 lines

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

Quoted 6 lines

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.

Quoted 4 lines

Moving drivers has a long term maintainence cost.

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

Quoted 6 lines

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.

#7 lore raw

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

Quoted 15 lines · David Miller

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

Quoted 14 lines · David Miller
Quoted 11 lines

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

Quoted 5 lines

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.

Quoted 10 lines
Quoted 4 lines

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.

#8 lore raw

RFC 1/2 drivers/net: Create an ANCIENT_NETDEVICES symbol

In reply to Joe Perches

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.

---
 drivers/net/Kconfig | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)
drivers/net/Kconfig +19 -0
index 2a1ba62b..0878363 100644
@@ -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
Signature · 1 line
2.6.3.368.gf34be46
#9 lore raw

RFC 2/2 chelsio: Move original cxgb driver into ancient subdirectory

In reply to Joe Perches

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

---
 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%)
drivers/net/ethernet/chelsio/Kconfig +1 -1
index 4d187f2..25f4931 100644
@@ -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---
drivers/net/ethernet/chelsio/Makefile +1 -1
index 390510b..10a8f92 100644
@@ -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/
drivers/net/ethernet/chelsio/ancient/Makefile new file +1 -0
new file mode 100644
index 0000000..f60dbde
@@ -0,0 +1 @@
+obj-$(CONFIG_CHELSIO_T1) += cxgb/
drivers/net/ethernet/chelsio/ancient/cxgb/Makefile renamed from drivers/net/ethernet/chelsio/cxgb/Makefile +0 -0
similarity index 100%
rename from drivers/net/ethernet/chelsio/cxgb/Makefile
rename to drivers/net/ethernet/chelsio/ancient/cxgb/Makefile
drivers/net/ethernet/chelsio/ancient/cxgb/common.h renamed from drivers/net/ethernet/chelsio/cxgb/common.h +0 -0
similarity index 100%
rename from drivers/net/ethernet/chelsio/cxgb/common.h
rename to drivers/net/ethernet/chelsio/ancient/cxgb/common.h
drivers/net/ethernet/chelsio/ancient/cxgb/cphy.h renamed from drivers/net/ethernet/chelsio/cxgb/cphy.h +0 -0
similarity index 100%
rename from drivers/net/ethernet/chelsio/cxgb/cphy.h
rename to drivers/net/ethernet/chelsio/ancient/cxgb/cphy.h
drivers/net/ethernet/chelsio/ancient/cxgb/cpl5_cmd.h renamed from drivers/net/ethernet/chelsio/cxgb/cpl5_cmd.h +0 -0
similarity index 100%
rename from drivers/net/ethernet/chelsio/cxgb/cpl5_cmd.h
rename to drivers/net/ethernet/chelsio/ancient/cxgb/cpl5_cmd.h
drivers/net/ethernet/chelsio/ancient/cxgb/cxgb2.c renamed from drivers/net/ethernet/chelsio/cxgb/cxgb2.c +0 -0
similarity index 100%
rename from drivers/net/ethernet/chelsio/cxgb/cxgb2.c
rename to drivers/net/ethernet/chelsio/ancient/cxgb/cxgb2.c
drivers/net/ethernet/chelsio/ancient/cxgb/elmer0.h renamed from drivers/net/ethernet/chelsio/cxgb/elmer0.h +0 -0
similarity index 100%
rename from drivers/net/ethernet/chelsio/cxgb/elmer0.h
rename to drivers/net/ethernet/chelsio/ancient/cxgb/elmer0.h
drivers/net/ethernet/chelsio/ancient/cxgb/espi.c renamed from drivers/net/ethernet/chelsio/cxgb/espi.c +0 -0
similarity index 100%
rename from drivers/net/ethernet/chelsio/cxgb/espi.c
rename to drivers/net/ethernet/chelsio/ancient/cxgb/espi.c
drivers/net/ethernet/chelsio/ancient/cxgb/espi.h renamed from drivers/net/ethernet/chelsio/cxgb/espi.h +0 -0
similarity index 100%
rename from drivers/net/ethernet/chelsio/cxgb/espi.h
rename to drivers/net/ethernet/chelsio/ancient/cxgb/espi.h
drivers/net/ethernet/chelsio/ancient/cxgb/fpga_defs.h renamed from drivers/net/ethernet/chelsio/cxgb/fpga_defs.h +0 -0
similarity index 100%
rename from drivers/net/ethernet/chelsio/cxgb/fpga_defs.h
rename to drivers/net/ethernet/chelsio/ancient/cxgb/fpga_defs.h
drivers/net/ethernet/chelsio/ancient/cxgb/gmac.h renamed from drivers/net/ethernet/chelsio/cxgb/gmac.h +0 -0
similarity index 100%
rename from drivers/net/ethernet/chelsio/cxgb/gmac.h
rename to drivers/net/ethernet/chelsio/ancient/cxgb/gmac.h
drivers/net/ethernet/chelsio/ancient/cxgb/mv88e1xxx.c renamed from drivers/net/ethernet/chelsio/cxgb/mv88e1xxx.c +0 -0
similarity index 100%
rename from drivers/net/ethernet/chelsio/cxgb/mv88e1xxx.c
rename to drivers/net/ethernet/chelsio/ancient/cxgb/mv88e1xxx.c
drivers/net/ethernet/chelsio/ancient/cxgb/mv88e1xxx.h renamed from drivers/net/ethernet/chelsio/cxgb/mv88e1xxx.h +0 -0
similarity index 100%
rename from drivers/net/ethernet/chelsio/cxgb/mv88e1xxx.h
rename to drivers/net/ethernet/chelsio/ancient/cxgb/mv88e1xxx.h
drivers/net/ethernet/chelsio/ancient/cxgb/mv88x201x.c renamed from drivers/net/ethernet/chelsio/cxgb/mv88x201x.c +0 -0
similarity index 100%
rename from drivers/net/ethernet/chelsio/cxgb/mv88x201x.c
rename to drivers/net/ethernet/chelsio/ancient/cxgb/mv88x201x.c
drivers/net/ethernet/chelsio/ancient/cxgb/my3126.c renamed from drivers/net/ethernet/chelsio/cxgb/my3126.c +0 -0
similarity index 100%
rename from drivers/net/ethernet/chelsio/cxgb/my3126.c
rename to drivers/net/ethernet/chelsio/ancient/cxgb/my3126.c
drivers/net/ethernet/chelsio/ancient/cxgb/pm3393.c renamed from drivers/net/ethernet/chelsio/cxgb/pm3393.c +0 -0
similarity index 100%
rename from drivers/net/ethernet/chelsio/cxgb/pm3393.c
rename to drivers/net/ethernet/chelsio/ancient/cxgb/pm3393.c
drivers/net/ethernet/chelsio/ancient/cxgb/regs.h renamed from drivers/net/ethernet/chelsio/cxgb/regs.h +0 -0
similarity index 100%
rename from drivers/net/ethernet/chelsio/cxgb/regs.h
rename to drivers/net/ethernet/chelsio/ancient/cxgb/regs.h
drivers/net/ethernet/chelsio/ancient/cxgb/sge.c renamed from drivers/net/ethernet/chelsio/cxgb/sge.c +0 -0
similarity index 100%
rename from drivers/net/ethernet/chelsio/cxgb/sge.c
rename to drivers/net/ethernet/chelsio/ancient/cxgb/sge.c
drivers/net/ethernet/chelsio/ancient/cxgb/sge.h renamed from drivers/net/ethernet/chelsio/cxgb/sge.h +0 -0
similarity index 100%
rename from drivers/net/ethernet/chelsio/cxgb/sge.h
rename to drivers/net/ethernet/chelsio/ancient/cxgb/sge.h
drivers/net/ethernet/chelsio/ancient/cxgb/subr.c renamed from drivers/net/ethernet/chelsio/cxgb/subr.c +0 -0
similarity index 100%
rename from drivers/net/ethernet/chelsio/cxgb/subr.c
rename to drivers/net/ethernet/chelsio/ancient/cxgb/subr.c
drivers/net/ethernet/chelsio/ancient/cxgb/suni1x10gexp_regs.h renamed from drivers/net/ethernet/chelsio/cxgb/suni1x10gexp_regs.h +0 -0
similarity index 100%
rename from drivers/net/ethernet/chelsio/cxgb/suni1x10gexp_regs.h
rename to drivers/net/ethernet/chelsio/ancient/cxgb/suni1x10gexp_regs.h
drivers/net/ethernet/chelsio/ancient/cxgb/tp.c renamed from drivers/net/ethernet/chelsio/cxgb/tp.c +0 -0
similarity index 100%
rename from drivers/net/ethernet/chelsio/cxgb/tp.c
rename to drivers/net/ethernet/chelsio/ancient/cxgb/tp.c
drivers/net/ethernet/chelsio/ancient/cxgb/tp.h renamed from drivers/net/ethernet/chelsio/cxgb/tp.h +0 -0
similarity index 100%
rename from drivers/net/ethernet/chelsio/cxgb/tp.h
rename to drivers/net/ethernet/chelsio/ancient/cxgb/tp.h
drivers/net/ethernet/chelsio/ancient/cxgb/vsc7326.c renamed from drivers/net/ethernet/chelsio/cxgb/vsc7326.c +0 -0
similarity index 100%
rename from drivers/net/ethernet/chelsio/cxgb/vsc7326.c
rename to drivers/net/ethernet/chelsio/ancient/cxgb/vsc7326.c
drivers/net/ethernet/chelsio/ancient/cxgb/vsc7326_reg.h renamed from drivers/net/ethernet/chelsio/cxgb/vsc7326_reg.h +0 -0
similarity index 100%
rename from drivers/net/ethernet/chelsio/cxgb/vsc7326_reg.h
rename to drivers/net/ethernet/chelsio/ancient/cxgb/vsc7326_reg.h
Signature · 1 line
2.6.3.368.gf34be46
#10 lore raw
In reply to Joe Perches
Quoted 21 lines · Joe Perches
Quoted 4 lines · David Miller

From: Nicholas Mc Guire <[email protected]>

Quoted 3 lines

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.

[]

Quoted 3 lines

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

Quoted 4 lines

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