netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH/RFC net-next 0/4] Delete token ring support.
@ 2012-05-16  0:35 Paul Gortmaker
  2012-05-16  0:35 ` [PATCH net-next 1/4] s390: delete any traces of " Paul Gortmaker
                   ` (6 more replies)
  0 siblings, 7 replies; 12+ messages in thread
From: Paul Gortmaker @ 2012-05-16  0:35 UTC (permalink / raw)
  To: davem
  Cc: netdev, Paul Gortmaker, Martin Schwidefsky, Heiko Carstens,
	linux390, linux-s390

This may not be for 35-next, but for addition to feature-removal.txt
and application at a later date.  But what I would like to get is
consensus that this is something that we want to proceed with before I
spend any more time on it.  If folks are OK with the idea, then I am
open to suggestions as to the best time for it to happen.

So, why you might ask?  It is in tree already, it is "free" to leave it
there, right?  Well, no.

What led me here was the creation of a patch to remove CONFIG_MCA.  In
doing so, I found I was deleting most of the token ring drivers, and 
altering the remaining few ISA/MCA ones to be just ISA only.

But it really didn't make sense to me, to just leave the skeletal
remains of token ring there -- vs removing TR 1st, and then the MCA
removal will be a lot smaller and cleaner commit.

Removal: does it make sense?

The biggest data point I can suggest to folks is to run:

	git whatchanged --follow drivers/net/tokenring

and when you are quickly paging over the changes, note two things.
(1) the amount of time spent by folks cleaning and maintaining the
code, and (2) - most important -- is that essentially all the commits
are of the tree-wide cleanup nature, or API change nature.

What I mean by (2) is the implicit absence of anyone fixing _runtime_
bugs, going all the way back to 2.6.12 in 2005.  If the code was being
_used_, we'd see runtime regressions reported and their associated fixes.

A search on the internet for users tends to show that even the die hard
enthusiasts who cared to poke at MCA/TR just for hobby sake have pretty
much all given up somewhere in the 2003-2005 "pre-git" timeframe, and
never really moved off their 2.4.x kernels.

This is no surprise, since on x86, MCA (and hence most tokenring
users) was limited to the lowly 386sx-16 PS/2 with typically 4MB RAM.
Some "high end" 486 machines existed, and in theory could be fitted
with max 64MB RAM (default 16MB).  I don't think anyone will debate
that such hardware with such limited memory is ever going to be useful
in a 3.x kernel use case.

The one thing I wasn't aware of, until actually creating the commits
to remove tokenring, was that s390 also had support for it.  I'm
guessing that it is just as unused there as it is on x86, but the s390
folks are CC'd for their input.

I've created separate commits for the removal of the core networking
support (i.e. net/*) vs. the drivers removal (i.e. drivers/net).  This
is a somewhat artifical separation, since one is useless without the
other, but it makes for easier review, and is still fully bisectable.
These can easily be squished into one commit if folks have a
preference one way or the other.

I still want to double check a few things, but it is at a point where
people can clearly see what will be removed, so I think checking for
input now as an RFC makes sense.  Since it is an RFC, I've told git to
omit showing the full line-by-line deletion of whole files.  The
baseline used is net-next from today.

Thanks,
Paul.

---
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: linux390@de.ibm.com
Cc: linux-s390@vger.kernel.org


Paul Gortmaker (4):
  s390: delete any traces of token ring support
  atm: remove the coupling to token ring support
  net: delete all instances of special processing for token ring
  tokenring: delete all remaining driver support

 Documentation/filesystems/proc.txt    |    1 -
 Documentation/networking/00-INDEX     |    8 -
 Documentation/networking/3c359.txt    |   58 -
 Documentation/networking/olympic.txt  |   79 -
 Documentation/networking/smctr.txt    |   66 -
 Documentation/networking/tms380tr.txt |  147 -
 arch/mips/configs/mtx1_defconfig      |    4 -
 arch/xtensa/configs/common_defconfig  |    5 -
 drivers/message/fusion/mptlan.h       |    1 -
 drivers/net/Kconfig                   |    2 -
 drivers/net/Makefile                  |    1 -
 drivers/net/Space.c                   |   46 -
 drivers/net/tokenring/3c359.c         | 1831 -----------
 drivers/net/tokenring/3c359.h         |  291 --
 drivers/net/tokenring/Kconfig         |  199 --
 drivers/net/tokenring/Makefile        |   16 -
 drivers/net/tokenring/abyss.c         |  468 ---
 drivers/net/tokenring/abyss.h         |   58 -
 drivers/net/tokenring/ibmtr.c         | 1964 -----------
 drivers/net/tokenring/ibmtr_cs.c      |  370 ---
 drivers/net/tokenring/lanstreamer.c   | 1909 -----------
 drivers/net/tokenring/lanstreamer.h   |  343 --
 drivers/net/tokenring/madgemc.c       |  761 -----
 drivers/net/tokenring/madgemc.h       |   70 -
 drivers/net/tokenring/olympic.c       | 1737 ----------
 drivers/net/tokenring/olympic.h       |  321 --
 drivers/net/tokenring/proteon.c       |  422 ---
 drivers/net/tokenring/skisa.c         |  432 ---
 drivers/net/tokenring/smctr.c         | 5717 ---------------------------------
 drivers/net/tokenring/smctr.h         | 1585 ---------
 drivers/net/tokenring/tms380tr.c      | 2306 -------------
 drivers/net/tokenring/tms380tr.h      | 1141 -------
 drivers/net/tokenring/tmspci.c        |  236 --
 drivers/s390/net/Kconfig              |    5 +-
 drivers/s390/net/lcs.c                |   21 +-
 drivers/s390/net/qeth_core.h          |    2 -
 drivers/s390/net/qeth_core_main.c     |    6 +-
 drivers/s390/net/qeth_l3_main.c       |   35 +-
 firmware/3com/3C359.bin.ihex          | 1573 ---------
 firmware/Makefile                     |    2 -
 firmware/WHENCE                       |   38 -
 firmware/tr_smctr.bin.ihex            |  477 ---
 include/linux/Kbuild                  |    1 -
 include/linux/atmlec.h                |    7 -
 include/linux/ibmtr.h                 |  373 ---
 include/linux/if_arp.h                |    2 +-
 include/linux/if_tr.h                 |  103 -
 include/linux/ipx.h                   |    2 +-
 include/linux/trdevice.h              |   37 -
 include/net/if_inet6.h                |   54 -
 include/net/ip.h                      |   17 -
 include/net/llc_pdu.h                 |    7 -
 net/802/Makefile                      |    1 -
 net/802/p8022.c                       |    3 +-
 net/802/tr.c                          |  670 ----
 net/atm/lec.c                         |  138 +-
 net/atm/lec.h                         |    1 -
 net/core/dev.c                        |   14 +-
 net/ipv4/Kconfig                      |    4 +-
 net/ipv4/arp.c                        |   13 +-
 net/ipv4/ipconfig.c                   |    2 -
 net/ipv6/addrconf.c                   |    2 -
 net/ipv6/ndisc.c                      |   17 -
 net/ipx/af_ipx.c                      |   10 +-
 net/llc/af_llc.c                      |    3 +-
 net/llc/llc_output.c                  |    3 -
 net/llc/llc_sap.c                     |    4 -
 net/sysctl_net.c                      |    4 -
 68 files changed, 33 insertions(+), 26213 deletions(-)
 delete mode 100644 Documentation/networking/3c359.txt
 delete mode 100644 Documentation/networking/olympic.txt
 delete mode 100644 Documentation/networking/smctr.txt
 delete mode 100644 Documentation/networking/tms380tr.txt
 delete mode 100644 drivers/net/tokenring/3c359.c
 delete mode 100644 drivers/net/tokenring/3c359.h
 delete mode 100644 drivers/net/tokenring/Kconfig
 delete mode 100644 drivers/net/tokenring/Makefile
 delete mode 100644 drivers/net/tokenring/abyss.c
 delete mode 100644 drivers/net/tokenring/abyss.h
 delete mode 100644 drivers/net/tokenring/ibmtr.c
 delete mode 100644 drivers/net/tokenring/ibmtr_cs.c
 delete mode 100644 drivers/net/tokenring/lanstreamer.c
 delete mode 100644 drivers/net/tokenring/lanstreamer.h
 delete mode 100644 drivers/net/tokenring/madgemc.c
 delete mode 100644 drivers/net/tokenring/madgemc.h
 delete mode 100644 drivers/net/tokenring/olympic.c
 delete mode 100644 drivers/net/tokenring/olympic.h
 delete mode 100644 drivers/net/tokenring/proteon.c
 delete mode 100644 drivers/net/tokenring/skisa.c
 delete mode 100644 drivers/net/tokenring/smctr.c
 delete mode 100644 drivers/net/tokenring/smctr.h
 delete mode 100644 drivers/net/tokenring/tms380tr.c
 delete mode 100644 drivers/net/tokenring/tms380tr.h
 delete mode 100644 drivers/net/tokenring/tmspci.c
 delete mode 100644 firmware/3com/3C359.bin.ihex
 delete mode 100644 firmware/tr_smctr.bin.ihex
 delete mode 100644 include/linux/ibmtr.h
 delete mode 100644 include/linux/if_tr.h
 delete mode 100644 include/linux/trdevice.h
 delete mode 100644 net/802/tr.c

-- 
1.7.9.1

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

* [PATCH net-next 1/4] s390: delete any traces of token ring support
  2012-05-16  0:35 [PATCH/RFC net-next 0/4] Delete token ring support Paul Gortmaker
@ 2012-05-16  0:35 ` Paul Gortmaker
  2012-05-16  0:35 ` [PATCH net-next 2/4] atm: remove the coupling to " Paul Gortmaker
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 12+ messages in thread
From: Paul Gortmaker @ 2012-05-16  0:35 UTC (permalink / raw)
  To: davem
  Cc: netdev, Paul Gortmaker, Martin Schwidefsky, Heiko Carstens,
	linux390, linux-s390

The token ring support is going away from the core kernel.
Divorce the S390 drivers from it in advance.

Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: linux390@de.ibm.com
Cc: linux-s390@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 drivers/s390/net/Kconfig          |    5 ++---
 drivers/s390/net/lcs.c            |   21 ++-------------------
 drivers/s390/net/qeth_core.h      |    2 --
 drivers/s390/net/qeth_core_main.c |    6 +-----
 drivers/s390/net/qeth_l3_main.c   |   35 ++++++-----------------------------
 5 files changed, 11 insertions(+), 58 deletions(-)

diff --git a/drivers/s390/net/Kconfig b/drivers/s390/net/Kconfig
index 9b66d2d..dfda748 100644
--- a/drivers/s390/net/Kconfig
+++ b/drivers/s390/net/Kconfig
@@ -4,11 +4,10 @@ menu "S/390 network device drivers"
 config LCS
 	def_tristate m
 	prompt "Lan Channel Station Interface"
-	depends on CCW && NETDEVICES && (ETHERNET || TR || FDDI)
+	depends on CCW && NETDEVICES && (ETHERNET || FDDI)
 	help
 	   Select this option if you want to use LCS networking on IBM System z.
-	   This device driver supports Token Ring (IEEE 802.5),
-	   FDDI (IEEE 802.7) and Ethernet.
+	   This device driver supports FDDI (IEEE 802.7) and Ethernet.
 	   To compile as a module, choose M. The module name is lcs.
 	   If you do not know what it is, it's safe to choose Y.
 
diff --git a/drivers/s390/net/lcs.c b/drivers/s390/net/lcs.c
index 687efe4..6056cf6 100644
--- a/drivers/s390/net/lcs.c
+++ b/drivers/s390/net/lcs.c
@@ -30,7 +30,6 @@
 #include <linux/if.h>
 #include <linux/netdevice.h>
 #include <linux/etherdevice.h>
-#include <linux/trdevice.h>
 #include <linux/fddidevice.h>
 #include <linux/inetdevice.h>
 #include <linux/in.h>
@@ -50,8 +49,7 @@
 #include "lcs.h"
 
 
-#if !defined(CONFIG_ETHERNET) && \
-    !defined(CONFIG_TR) && !defined(CONFIG_FDDI)
+#if !defined(CONFIG_ETHERNET) && !defined(CONFIG_FDDI)
 #error Cannot compile lcs.c without some net devices switched on.
 #endif
 
@@ -1166,10 +1164,7 @@ static void
 lcs_get_mac_for_ipm(__be32 ipm, char *mac, struct net_device *dev)
 {
 	LCS_DBF_TEXT(4,trace, "getmac");
-	if (dev->type == ARPHRD_IEEE802_TR)
-		ip_tr_mc_map(ipm, mac);
-	else
-		ip_eth_mc_map(ipm, mac);
+	ip_eth_mc_map(ipm, mac);
 }
 
 /**
@@ -1641,12 +1636,6 @@ lcs_startlan_auto(struct lcs_card *card)
 		return 0;
 
 #endif
-#ifdef CONFIG_TR
-	card->lan_type = LCS_FRAME_TYPE_TR;
-	rc = lcs_send_startlan(card, LCS_INITIATOR_TCPIP);
-	if (rc == 0)
-		return 0;
-#endif
 #ifdef CONFIG_FDDI
 	card->lan_type = LCS_FRAME_TYPE_FDDI;
 	rc = lcs_send_startlan(card, LCS_INITIATOR_TCPIP);
@@ -2172,12 +2161,6 @@ lcs_new_device(struct ccwgroup_device *ccwgdev)
 		dev = alloc_etherdev(0);
 		break;
 #endif
-#ifdef CONFIG_TR
-	case LCS_FRAME_TYPE_TR:
-		card->lan_type_trans = tr_type_trans;
-		dev = alloc_trdev(0);
-		break;
-#endif
 #ifdef CONFIG_FDDI
 	case LCS_FRAME_TYPE_FDDI:
 		card->lan_type_trans = fddi_type_trans;
diff --git a/drivers/s390/net/qeth_core.h b/drivers/s390/net/qeth_core.h
index ec7921b..bb7190f 100644
--- a/drivers/s390/net/qeth_core.h
+++ b/drivers/s390/net/qeth_core.h
@@ -13,8 +13,6 @@
 
 #include <linux/if.h>
 #include <linux/if_arp.h>
-#include <linux/if_tr.h>
-#include <linux/trdevice.h>
 #include <linux/etherdevice.h>
 #include <linux/if_vlan.h>
 #include <linux/ctype.h>
diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c
index 8334dad..83b0d2f 100644
--- a/drivers/s390/net/qeth_core_main.c
+++ b/drivers/s390/net/qeth_core_main.c
@@ -4911,11 +4911,7 @@ struct sk_buff *qeth_core_get_next_skb(struct qeth_card *card,
 		break;
 	case QETH_HEADER_TYPE_LAYER3:
 		skb_len = (*hdr)->hdr.l3.length;
-		if ((card->info.link_type == QETH_LINK_TYPE_LANE_TR) ||
-		    (card->info.link_type == QETH_LINK_TYPE_HSTR))
-			headroom = TR_HLEN;
-		else
-			headroom = ETH_HLEN;
+		headroom = ETH_HLEN;
 		break;
 	case QETH_HEADER_TYPE_OSN:
 		skb_len = (*hdr)->hdr.osn.pdu_length;
diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c
index f859216..74ebeaf 100644
--- a/drivers/s390/net/qeth_l3_main.c
+++ b/drivers/s390/net/qeth_l3_main.c
@@ -1671,10 +1671,7 @@ qeth_diags_trace(struct qeth_card *card, enum qeth_diags_trace_cmds diags_cmd)
 static void qeth_l3_get_mac_for_ipm(__u32 ipm, char *mac,
 				struct net_device *dev)
 {
-	if (dev->type == ARPHRD_IEEE802_TR)
-		ip_tr_mc_map(ipm, mac);
-	else
-		ip_eth_mc_map(ipm, mac);
+	ip_eth_mc_map(ipm, mac);
 }
 
 static void qeth_l3_add_mc(struct qeth_card *card, struct in_device *in4_dev)
@@ -1922,8 +1919,6 @@ static inline int qeth_l3_rebuild_skb(struct qeth_card *card,
 #endif
 			case __constant_htons(ETH_P_IP):
 				ip_hdr = (struct iphdr *)skb->data;
-				(card->dev->type == ARPHRD_IEEE802_TR) ?
-				ip_tr_mc_map(ip_hdr->daddr, tg_addr):
 				ip_eth_mc_map(ip_hdr->daddr, tg_addr);
 				break;
 			default:
@@ -1959,12 +1954,7 @@ static inline int qeth_l3_rebuild_skb(struct qeth_card *card,
 				tg_addr, "FAKELL", card->dev->addr_len);
 	}
 
-#ifdef CONFIG_TR
-	if (card->dev->type == ARPHRD_IEEE802_TR)
-		skb->protocol = tr_type_trans(skb, card->dev);
-	else
-#endif
-		skb->protocol = eth_type_trans(skb, card->dev);
+	skb->protocol = eth_type_trans(skb, card->dev);
 
 	if (hdr->hdr.l3.ext_flags &
 	    (QETH_HDR_EXT_VLAN_FRAME | QETH_HDR_EXT_INCLUDE_VLAN_TAG)) {
@@ -2883,13 +2873,7 @@ static void qeth_l3_fill_header(struct qeth_card *card, struct qeth_hdr *hdr,
 			hdr->hdr.l3.flags &= ~QETH_HDR_PASSTHRU;
 		memcpy(hdr->hdr.l3.dest_addr, pkey, 16);
 	} else {
-		/* passthrough */
-		if ((skb->dev->type == ARPHRD_IEEE802_TR) &&
-			!memcmp(skb->data + sizeof(struct qeth_hdr) +
-			sizeof(__u16), skb->dev->broadcast, 6)) {
-			hdr->hdr.l3.flags = QETH_CAST_BROADCAST |
-						QETH_HDR_PASSTHRU;
-		} else if (!memcmp(skb->data + sizeof(struct qeth_hdr),
+		if (!memcmp(skb->data + sizeof(struct qeth_hdr),
 			    skb->dev->broadcast, 6)) {
 			/* broadcast? */
 			hdr->hdr.l3.flags = QETH_CAST_BROADCAST |
@@ -3031,10 +3015,7 @@ static int qeth_l3_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
 			skb_pull(new_skb, ETH_HLEN);
 	} else {
 		if (ipv == 4) {
-			if (card->dev->type == ARPHRD_IEEE802_TR)
-				skb_pull(new_skb, TR_HLEN);
-			else
-				skb_pull(new_skb, ETH_HLEN);
+			skb_pull(new_skb, ETH_HLEN);
 		}
 
 		if (ipv != 4 && vlan_tx_tag_present(new_skb)) {
@@ -3318,12 +3299,8 @@ static int qeth_l3_setup_netdev(struct qeth_card *card)
 	    card->info.type == QETH_CARD_TYPE_OSX) {
 		if ((card->info.link_type == QETH_LINK_TYPE_LANE_TR) ||
 		    (card->info.link_type == QETH_LINK_TYPE_HSTR)) {
-#ifdef CONFIG_TR
-			card->dev = alloc_trdev(0);
-#endif
-			if (!card->dev)
-				return -ENODEV;
-			card->dev->netdev_ops = &qeth_l3_netdev_ops;
+			pr_info("qeth_l3: ignoring TR device\n");
+			return -ENODEV;
 		} else {
 			card->dev = alloc_etherdev(0);
 			if (!card->dev)
-- 
1.7.9.1

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

* [PATCH net-next 2/4] atm: remove the coupling to token ring support
  2012-05-16  0:35 [PATCH/RFC net-next 0/4] Delete token ring support Paul Gortmaker
  2012-05-16  0:35 ` [PATCH net-next 1/4] s390: delete any traces of " Paul Gortmaker
@ 2012-05-16  0:35 ` Paul Gortmaker
  2012-05-16  0:35 ` [PATCH net-next 3/4] net: delete all instances of special processing for token ring Paul Gortmaker
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 12+ messages in thread
From: Paul Gortmaker @ 2012-05-16  0:35 UTC (permalink / raw)
  To: davem; +Cc: netdev, Paul Gortmaker

The token ring support is going away, so decouple
the atm support from it in advance.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 include/linux/atmlec.h |    7 ---
 net/atm/lec.c          |  138 +++---------------------------------------------
 net/atm/lec.h          |    1 -
 3 files changed, 8 insertions(+), 138 deletions(-)

diff --git a/include/linux/atmlec.h b/include/linux/atmlec.h
index 39c917f..302791e 100644
--- a/include/linux/atmlec.h
+++ b/include/linux/atmlec.h
@@ -21,13 +21,6 @@
 /* Maximum number of LEC interfaces (tweakable) */
 #define MAX_LEC_ITF 48
 
-/*
- * From the total of MAX_LEC_ITF, last NUM_TR_DEVS are reserved for Token Ring.
- * E.g. if MAX_LEC_ITF = 48 and NUM_TR_DEVS = 8, then lec0-lec39 are for
- * Ethernet ELANs and lec40-lec47 are for Token Ring ELANS.
- */
-#define NUM_TR_DEVS 8
-
 typedef enum {
 	l_set_mac_addr,
 	l_del_mac_addr,
diff --git a/net/atm/lec.c b/net/atm/lec.c
index bb35cb7..a7d1721 100644
--- a/net/atm/lec.c
+++ b/net/atm/lec.c
@@ -26,11 +26,6 @@
 #include <linux/spinlock.h>
 #include <linux/seq_file.h>
 
-/* TokenRing if needed */
-#ifdef CONFIG_TR
-#include <linux/trdevice.h>
-#endif
-
 /* And atm device */
 #include <linux/atmdev.h>
 #include <linux/atmlec.h>
@@ -163,50 +158,6 @@ static void lec_handle_bridge(struct sk_buff *skb, struct net_device *dev)
 #endif /* defined(CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE) */
 
 /*
- * Modelled after tr_type_trans
- * All multicast and ARE or STE frames go to BUS.
- * Non source routed frames go by destination address.
- * Last hop source routed frames go by destination address.
- * Not last hop source routed frames go by _next_ route descriptor.
- * Returns pointer to destination MAC address or fills in rdesc
- * and returns NULL.
- */
-#ifdef CONFIG_TR
-static unsigned char *get_tr_dst(unsigned char *packet, unsigned char *rdesc)
-{
-	struct trh_hdr *trh;
-	unsigned int riflen, num_rdsc;
-
-	trh = (struct trh_hdr *)packet;
-	if (trh->daddr[0] & (uint8_t) 0x80)
-		return bus_mac;	/* multicast */
-
-	if (trh->saddr[0] & TR_RII) {
-		riflen = (ntohs(trh->rcf) & TR_RCF_LEN_MASK) >> 8;
-		if ((ntohs(trh->rcf) >> 13) != 0)
-			return bus_mac;	/* ARE or STE */
-	} else
-		return trh->daddr;	/* not source routed */
-
-	if (riflen < 6)
-		return trh->daddr;	/* last hop, source routed */
-
-	/* riflen is 6 or more, packet has more than one route descriptor */
-	num_rdsc = (riflen / 2) - 1;
-	memset(rdesc, 0, ETH_ALEN);
-	/* offset 4 comes from LAN destination field in LE control frames */
-	if (trh->rcf & htons((uint16_t) TR_RCF_DIR_BIT))
-		memcpy(&rdesc[4], &trh->rseg[num_rdsc - 2], sizeof(__be16));
-	else {
-		memcpy(&rdesc[4], &trh->rseg[1], sizeof(__be16));
-		rdesc[5] = ((ntohs(trh->rseg[0]) & 0x000f) | (rdesc[5] & 0xf0));
-	}
-
-	return NULL;
-}
-#endif /* CONFIG_TR */
-
-/*
  * Open/initialize the netdevice. This is called (in the current kernel)
  * sometime after booting when the 'ifconfig' program is run.
  *
@@ -257,9 +208,6 @@ static netdev_tx_t lec_start_xmit(struct sk_buff *skb,
 	struct lec_arp_table *entry;
 	unsigned char *dst;
 	int min_frame_size;
-#ifdef CONFIG_TR
-	unsigned char rdesc[ETH_ALEN];	/* Token Ring route descriptor */
-#endif
 	int is_rdesc;
 
 	pr_debug("called\n");
@@ -290,24 +238,10 @@ static netdev_tx_t lec_start_xmit(struct sk_buff *skb,
 	}
 	skb_push(skb, 2);
 
-	/* Put le header to place, works for TokenRing too */
+	/* Put le header to place */
 	lec_h = (struct lecdatahdr_8023 *)skb->data;
 	lec_h->le_header = htons(priv->lecid);
 
-#ifdef CONFIG_TR
-	/*
-	 * Ugly. Use this to realign Token Ring packets for
-	 * e.g. PCA-200E driver.
-	 */
-	if (priv->is_trdev) {
-		skb2 = skb_realloc_headroom(skb, LEC_HEADER_LEN);
-		kfree_skb(skb);
-		if (skb2 == NULL)
-			return NETDEV_TX_OK;
-		skb = skb2;
-	}
-#endif
-
 #if DUMP_PACKETS >= 2
 #define MAX_DUMP_SKB 99
 #elif DUMP_PACKETS >= 1
@@ -321,12 +255,7 @@ static netdev_tx_t lec_start_xmit(struct sk_buff *skb,
 #endif /* DUMP_PACKETS >= 1 */
 
 	/* Minimum ethernet-frame size */
-#ifdef CONFIG_TR
-	if (priv->is_trdev)
-		min_frame_size = LEC_MINIMUM_8025_SIZE;
-	else
-#endif
-		min_frame_size = LEC_MINIMUM_8023_SIZE;
+	min_frame_size = LEC_MINIMUM_8023_SIZE;
 	if (skb->len < min_frame_size) {
 		if ((skb->len + skb_tailroom(skb)) < min_frame_size) {
 			skb2 = skb_copy_expand(skb, 0,
@@ -345,15 +274,6 @@ static netdev_tx_t lec_start_xmit(struct sk_buff *skb,
 	/* Send to right vcc */
 	is_rdesc = 0;
 	dst = lec_h->h_dest;
-#ifdef CONFIG_TR
-	if (priv->is_trdev) {
-		dst = get_tr_dst(skb->data + 2, rdesc);
-		if (dst == NULL) {
-			dst = rdesc;
-			is_rdesc = 1;
-		}
-	}
-#endif
 	entry = NULL;
 	vcc = lec_arp_resolve(priv, dst, is_rdesc, &entry);
 	pr_debug("%s:vcc:%p vcc_flags:%lx, entry:%p\n",
@@ -710,12 +630,7 @@ static void lec_push(struct atm_vcc *vcc, struct sk_buff *skb)
 			dev_kfree_skb(skb);
 			return;
 		}
-#ifdef CONFIG_TR
-		if (priv->is_trdev)
-			dst = ((struct lecdatahdr_8025 *)skb->data)->h_dest;
-		else
-#endif
-			dst = ((struct lecdatahdr_8023 *)skb->data)->h_dest;
+		dst = ((struct lecdatahdr_8023 *)skb->data)->h_dest;
 
 		/*
 		 * If this is a Data Direct VCC, and the VCC does not match
@@ -723,16 +638,7 @@ static void lec_push(struct atm_vcc *vcc, struct sk_buff *skb)
 		 */
 		spin_lock_irqsave(&priv->lec_arp_lock, flags);
 		if (lec_is_data_direct(vcc)) {
-#ifdef CONFIG_TR
-			if (priv->is_trdev)
-				src =
-				    ((struct lecdatahdr_8025 *)skb->data)->
-				    h_source;
-			else
-#endif
-				src =
-				    ((struct lecdatahdr_8023 *)skb->data)->
-				    h_source;
+			src = ((struct lecdatahdr_8023 *)skb->data)->h_source;
 			entry = lec_arp_find(priv, src);
 			if (entry && entry->vcc != vcc) {
 				lec_arp_remove(priv, entry);
@@ -750,12 +656,7 @@ static void lec_push(struct atm_vcc *vcc, struct sk_buff *skb)
 		if (!hlist_empty(&priv->lec_arp_empty_ones))
 			lec_arp_check_empties(priv, vcc, skb);
 		skb_pull(skb, 2);	/* skip lec_id */
-#ifdef CONFIG_TR
-		if (priv->is_trdev)
-			skb->protocol = tr_type_trans(skb, dev);
-		else
-#endif
-			skb->protocol = eth_type_trans(skb, dev);
+		skb->protocol = eth_type_trans(skb, dev);
 		dev->stats.rx_packets++;
 		dev->stats.rx_bytes += skb->len;
 		memset(ATM_SKB(skb), 0, sizeof(struct atm_skb_data));
@@ -827,27 +728,13 @@ static int lecd_attach(struct atm_vcc *vcc, int arg)
 		i = 0;
 	else
 		i = arg;
-#ifdef CONFIG_TR
 	if (arg >= MAX_LEC_ITF)
 		return -EINVAL;
-#else				/* Reserve the top NUM_TR_DEVS for TR */
-	if (arg >= (MAX_LEC_ITF - NUM_TR_DEVS))
-		return -EINVAL;
-#endif
 	if (!dev_lec[i]) {
-		int is_trdev, size;
-
-		is_trdev = 0;
-		if (i >= (MAX_LEC_ITF - NUM_TR_DEVS))
-			is_trdev = 1;
+		int size;
 
 		size = sizeof(struct lec_priv);
-#ifdef CONFIG_TR
-		if (is_trdev)
-			dev_lec[i] = alloc_trdev(size);
-		else
-#endif
-			dev_lec[i] = alloc_etherdev(size);
+		dev_lec[i] = alloc_etherdev(size);
 		if (!dev_lec[i])
 			return -ENOMEM;
 		dev_lec[i]->netdev_ops = &lec_netdev_ops;
@@ -858,7 +745,6 @@ static int lecd_attach(struct atm_vcc *vcc, int arg)
 		}
 
 		priv = netdev_priv(dev_lec[i]);
-		priv->is_trdev = is_trdev;
 	} else {
 		priv = netdev_priv(dev_lec[i]);
 		if (priv->lecd)
@@ -2372,15 +2258,7 @@ lec_arp_check_empties(struct lec_priv *priv,
 	struct hlist_node *node, *next;
 	struct lec_arp_table *entry, *tmp;
 	struct lecdatahdr_8023 *hdr = (struct lecdatahdr_8023 *)skb->data;
-	unsigned char *src;
-#ifdef CONFIG_TR
-	struct lecdatahdr_8025 *tr_hdr = (struct lecdatahdr_8025 *)skb->data;
-
-	if (priv->is_trdev)
-		src = tr_hdr->h_source;
-	else
-#endif
-		src = hdr->h_source;
+	unsigned char *src = hdr->h_source;
 
 	spin_lock_irqsave(&priv->lec_arp_lock, flags);
 	hlist_for_each_entry_safe(entry, node, next,
diff --git a/net/atm/lec.h b/net/atm/lec.h
index dfc0719..c730e57 100644
--- a/net/atm/lec.h
+++ b/net/atm/lec.h
@@ -142,7 +142,6 @@ struct lec_priv {
 	int itfnum;				/* e.g. 2 for lec2, 5 for lec5 */
 	struct lane2_ops *lane2_ops;		/* can be NULL for LANE v1 */
 	int is_proxy;				/* bridge between ATM and Ethernet */
-	int is_trdev;				/* Device type, 0 = Ethernet, 1 = TokenRing */
 };
 
 struct lec_vcc_priv {
-- 
1.7.9.1

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

* [PATCH net-next 3/4] net: delete all instances of special processing for token ring
  2012-05-16  0:35 [PATCH/RFC net-next 0/4] Delete token ring support Paul Gortmaker
  2012-05-16  0:35 ` [PATCH net-next 1/4] s390: delete any traces of " Paul Gortmaker
  2012-05-16  0:35 ` [PATCH net-next 2/4] atm: remove the coupling to " Paul Gortmaker
@ 2012-05-16  0:35 ` Paul Gortmaker
  2012-05-16  0:35 ` [PATCH net-next 4/4] tokenring: delete all remaining driver support Paul Gortmaker
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 12+ messages in thread
From: Paul Gortmaker @ 2012-05-16  0:35 UTC (permalink / raw)
  To: davem; +Cc: netdev, Paul Gortmaker

We are going to delete the Token ring support.  This removes any
special processing in the core networking for token ring, (aside
from net/tr.c itself), leaving the drivers and remaining tokenring
support present but inert.

The mass removal of the drivers and net/tr.c will be in a separate
commit, so that the history of these files that we still care
about won't have the giant deletion tied into their history.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 include/linux/if_arp.h |    2 +-
 include/linux/ipx.h    |    2 +-
 include/net/if_inet6.h |   54 ------------------------------------------------
 include/net/ip.h       |   17 ---------------
 include/net/llc_pdu.h  |    7 ------
 net/802/p8022.c        |    3 +-
 net/802/tr.c           |    1 -
 net/core/dev.c         |   14 +++++-------
 net/ipv4/Kconfig       |    4 +-
 net/ipv4/arp.c         |   13 +----------
 net/ipv4/ipconfig.c    |    2 -
 net/ipv6/addrconf.c    |    2 -
 net/ipv6/ndisc.c       |   17 ---------------
 net/ipx/af_ipx.c       |   10 +--------
 net/llc/af_llc.c       |    3 +-
 net/llc/llc_output.c   |    3 --
 net/llc/llc_sap.c      |    4 ---
 net/sysctl_net.c       |    4 ---
 18 files changed, 14 insertions(+), 148 deletions(-)

diff --git a/include/linux/if_arp.h b/include/linux/if_arp.h
index 6d722f4..3718acf 100644
--- a/include/linux/if_arp.h
+++ b/include/linux/if_arp.h
@@ -82,7 +82,7 @@
 #define ARPHRD_FCPL	786		/* Fibrechannel public loop	*/
 #define ARPHRD_FCFABRIC	787		/* Fibrechannel fabric		*/
 	/* 787->799 reserved for fibrechannel media types */
-#define ARPHRD_IEEE802_TR 800		/* Magic type ident for TR	*/
+/* 800 used to be used for token ring */
 #define ARPHRD_IEEE80211 801		/* IEEE 802.11			*/
 #define ARPHRD_IEEE80211_PRISM 802	/* IEEE 802.11 + Prism2 header  */
 #define ARPHRD_IEEE80211_RADIOTAP 803	/* IEEE 802.11 + radiotap header */
diff --git a/include/linux/ipx.h b/include/linux/ipx.h
index 3d48014..8f02439 100644
--- a/include/linux/ipx.h
+++ b/include/linux/ipx.h
@@ -38,7 +38,7 @@ struct ipx_interface_definition {
 #define IPX_FRAME_8022		2
 #define IPX_FRAME_ETHERII	3
 #define IPX_FRAME_8023		4
-#define IPX_FRAME_TR_8022       5 /* obsolete */
+/* obsolete token ring was	5 */
 	unsigned char ipx_special;
 #define IPX_SPECIAL_NONE	0
 #define IPX_PRIMARY		1
diff --git a/include/net/if_inet6.h b/include/net/if_inet6.h
index 50f325f..9356322 100644
--- a/include/net/if_inet6.h
+++ b/include/net/if_inet6.h
@@ -209,60 +209,6 @@ static inline void ipv6_eth_mc_map(const struct in6_addr *addr, char *buf)
 	memcpy(buf + 2, &addr->s6_addr32[3], sizeof(__u32));
 }
 
-static inline void ipv6_tr_mc_map(const struct in6_addr *addr, char *buf)
-{
-	/* All nodes FF01::1, FF02::1, FF02::1:FFxx:xxxx */
-
-	if (((addr->s6_addr[0] == 0xFF) &&
-	    ((addr->s6_addr[1] == 0x01) || (addr->s6_addr[1] == 0x02)) &&
-	     (addr->s6_addr16[1] == 0) &&
-	     (addr->s6_addr32[1] == 0) &&
-	     (addr->s6_addr32[2] == 0) &&
-	     (addr->s6_addr16[6] == 0) &&
-	     (addr->s6_addr[15] == 1)) ||
-	    ((addr->s6_addr[0] == 0xFF) &&
-	     (addr->s6_addr[1] == 0x02) &&
-	     (addr->s6_addr16[1] == 0) &&
-	     (addr->s6_addr32[1] == 0) &&
-	     (addr->s6_addr16[4] == 0) &&
-	     (addr->s6_addr[10] == 0) &&
-	     (addr->s6_addr[11] == 1) &&
-	     (addr->s6_addr[12] == 0xff)))
-	{
-		buf[0]=0xC0;
-		buf[1]=0x00;
-		buf[2]=0x01;
-		buf[3]=0x00;
-		buf[4]=0x00;
-		buf[5]=0x00;
-	/* All routers FF0x::2 */
-	} else if ((addr->s6_addr[0] ==0xff) &&
-		((addr->s6_addr[1] & 0xF0) == 0) &&
-		(addr->s6_addr16[1] == 0) &&
-		(addr->s6_addr32[1] == 0) &&
-		(addr->s6_addr32[2] == 0) &&
-		(addr->s6_addr16[6] == 0) &&
-		(addr->s6_addr[15] == 2))
-	{
-		buf[0]=0xC0;
-		buf[1]=0x00;
-		buf[2]=0x02;
-		buf[3]=0x00;
-		buf[4]=0x00;
-		buf[5]=0x00;
-	} else {
-		unsigned char i ; 
-		
-		i = addr->s6_addr[15] & 7 ; 
-		buf[0]=0xC0;
-		buf[1]=0x00;
-		buf[2]=0x00;
-		buf[3]=0x01 << i ; 
-		buf[4]=0x00;
-		buf[5]=0x00;
-	}
-}
-
 static inline void ipv6_arcnet_mc_map(const struct in6_addr *addr, char *buf)
 {
 	buf[0] = 0x00;
diff --git a/include/net/ip.h b/include/net/ip.h
index 94ddb69c..83e0619 100644
--- a/include/net/ip.h
+++ b/include/net/ip.h
@@ -141,23 +141,6 @@ static inline struct sk_buff *ip_finish_skb(struct sock *sk, struct flowi4 *fl4)
 extern int		ip4_datagram_connect(struct sock *sk, 
 					     struct sockaddr *uaddr, int addr_len);
 
-/*
- *	Map a multicast IP onto multicast MAC for type Token Ring.
- *      This conforms to RFC1469 Option 2 Multicasting i.e.
- *      using a functional address to transmit / receive 
- *      multicast packets.
- */
-
-static inline void ip_tr_mc_map(__be32 addr, char *buf)
-{
-	buf[0]=0xC0;
-	buf[1]=0x00;
-	buf[2]=0x00;
-	buf[3]=0x04;
-	buf[4]=0x00;
-	buf[5]=0x00;
-}
-
 struct ip_reply_arg {
 	struct kvec iov[1];   
 	int	    flags;
diff --git a/include/net/llc_pdu.h b/include/net/llc_pdu.h
index f57e7d4..5a93d13 100644
--- a/include/net/llc_pdu.h
+++ b/include/net/llc_pdu.h
@@ -13,7 +13,6 @@
  */
 
 #include <linux/if_ether.h>
-#include <linux/if_tr.h>
 
 /* Lengths of frame formats */
 #define LLC_PDU_LEN_I	4       /* header and 2 control bytes */
@@ -253,10 +252,6 @@ static inline void llc_pdu_decode_sa(struct sk_buff *skb, u8 *sa)
 {
 	if (skb->protocol == htons(ETH_P_802_2))
 		memcpy(sa, eth_hdr(skb)->h_source, ETH_ALEN);
-	else if (skb->protocol == htons(ETH_P_TR_802_2)) {
-		memcpy(sa, tr_hdr(skb)->saddr, ETH_ALEN);
-		*sa &= 0x7F;
-	}
 }
 
 /**
@@ -270,8 +265,6 @@ static inline void llc_pdu_decode_da(struct sk_buff *skb, u8 *da)
 {
 	if (skb->protocol == htons(ETH_P_802_2))
 		memcpy(da, eth_hdr(skb)->h_dest, ETH_ALEN);
-	else if (skb->protocol == htons(ETH_P_TR_802_2))
-		memcpy(da, tr_hdr(skb)->daddr, ETH_ALEN);
 }
 
 /**
diff --git a/net/802/p8022.c b/net/802/p8022.c
index 7f353c4..0bda8de 100644
--- a/net/802/p8022.c
+++ b/net/802/p8022.c
@@ -1,6 +1,5 @@
 /*
- *	NET3:	Support for 802.2 demultiplexing off Ethernet (Token ring
- *		is kept separate see p8022tr.c)
+ *	NET3:	Support for 802.2 demultiplexing off Ethernet
  *		This program is free software; you can redistribute it and/or
  *		modify it under the terms of the GNU General Public License
  *		as published by the Free Software Foundation; either version
diff --git a/net/802/tr.c b/net/802/tr.c
index 30a352e..175243b 100644
--- a/net/802/tr.c
+++ b/net/802/tr.c
@@ -604,7 +604,6 @@ static void tr_setup(struct net_device *dev)
 
 	dev->header_ops	= &tr_header_ops;
 
-	dev->type		= ARPHRD_IEEE802_TR;
 	dev->hard_header_len	= TR_HLEN;
 	dev->mtu		= 2000;
 	dev->addr_len		= TR_ALEN;
diff --git a/net/core/dev.c b/net/core/dev.c
index 3dd8539..66cae6e 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -300,10 +300,9 @@ static const unsigned short netdev_lock_type[] =
 	 ARPHRD_BIF, ARPHRD_SIT, ARPHRD_IPDDP, ARPHRD_IPGRE,
 	 ARPHRD_PIMREG, ARPHRD_HIPPI, ARPHRD_ASH, ARPHRD_ECONET,
 	 ARPHRD_IRDA, ARPHRD_FCPP, ARPHRD_FCAL, ARPHRD_FCPL,
-	 ARPHRD_FCFABRIC, ARPHRD_IEEE802_TR, ARPHRD_IEEE80211,
-	 ARPHRD_IEEE80211_PRISM, ARPHRD_IEEE80211_RADIOTAP, ARPHRD_PHONET,
-	 ARPHRD_PHONET_PIPE, ARPHRD_IEEE802154,
-	 ARPHRD_VOID, ARPHRD_NONE};
+	 ARPHRD_FCFABRIC, ARPHRD_IEEE80211, ARPHRD_IEEE80211_PRISM,
+	 ARPHRD_IEEE80211_RADIOTAP, ARPHRD_PHONET, ARPHRD_PHONET_PIPE,
+	 ARPHRD_IEEE802154, ARPHRD_VOID, ARPHRD_NONE};
 
 static const char *const netdev_lock_name[] =
 	{"_xmit_NETROM", "_xmit_ETHER", "_xmit_EETHER", "_xmit_AX25",
@@ -318,10 +317,9 @@ static const char *const netdev_lock_name[] =
 	 "_xmit_BIF", "_xmit_SIT", "_xmit_IPDDP", "_xmit_IPGRE",
 	 "_xmit_PIMREG", "_xmit_HIPPI", "_xmit_ASH", "_xmit_ECONET",
 	 "_xmit_IRDA", "_xmit_FCPP", "_xmit_FCAL", "_xmit_FCPL",
-	 "_xmit_FCFABRIC", "_xmit_IEEE802_TR", "_xmit_IEEE80211",
-	 "_xmit_IEEE80211_PRISM", "_xmit_IEEE80211_RADIOTAP", "_xmit_PHONET",
-	 "_xmit_PHONET_PIPE", "_xmit_IEEE802154",
-	 "_xmit_VOID", "_xmit_NONE"};
+	 "_xmit_FCFABRIC", "_xmit_IEEE80211", "_xmit_IEEE80211_PRISM",
+	 "_xmit_IEEE80211_RADIOTAP", "_xmit_PHONET", "_xmit_PHONET_PIPE",
+	 "_xmit_IEEE802154", "_xmit_VOID", "_xmit_NONE"};
 
 static struct lock_class_key netdev_xmit_lock_key[ARRAY_SIZE(netdev_lock_type)];
 static struct lock_class_key netdev_addr_lock_key[ARRAY_SIZE(netdev_lock_type)];
diff --git a/net/ipv4/Kconfig b/net/ipv4/Kconfig
index 2c8febd..20f1cb5 100644
--- a/net/ipv4/Kconfig
+++ b/net/ipv4/Kconfig
@@ -262,8 +262,8 @@ config ARPD
 	bool "IP: ARP daemon support"
 	---help---
 	  The kernel maintains an internal cache which maps IP addresses to
-	  hardware addresses on the local network, so that Ethernet/Token Ring/
-	  etc. frames are sent to the proper address on the physical networking
+	  hardware addresses on the local network, so that Ethernet
+	  frames are sent to the proper address on the physical networking
 	  layer. Normally, kernel uses the ARP protocol to resolve these
 	  mappings.
 
diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c
index 373b56b..5097571 100644
--- a/net/ipv4/arp.c
+++ b/net/ipv4/arp.c
@@ -89,7 +89,6 @@
 #include <linux/etherdevice.h>
 #include <linux/fddidevice.h>
 #include <linux/if_arp.h>
-#include <linux/trdevice.h>
 #include <linux/skbuff.h>
 #include <linux/proc_fs.h>
 #include <linux/seq_file.h>
@@ -193,9 +192,6 @@ int arp_mc_map(__be32 addr, u8 *haddr, struct net_device *dev, int dir)
 	case ARPHRD_IEEE802:
 		ip_eth_mc_map(addr, haddr);
 		return 0;
-	case ARPHRD_IEEE802_TR:
-		ip_tr_mc_map(addr, haddr);
-		return 0;
 	case ARPHRD_INFINIBAND:
 		ip_ib_mc_map(addr, dev->broadcast, haddr);
 		return 0;
@@ -648,12 +644,6 @@ struct sk_buff *arp_create(int type, int ptype, __be32 dest_ip,
 		arp->ar_pro = htons(ETH_P_IP);
 		break;
 #endif
-#if IS_ENABLED(CONFIG_TR)
-	case ARPHRD_IEEE802_TR:
-		arp->ar_hrd = htons(ARPHRD_IEEE802);
-		arp->ar_pro = htons(ETH_P_IP);
-		break;
-#endif
 	}
 
 	arp->ar_hln = dev->addr_len;
@@ -751,11 +741,10 @@ static int arp_process(struct sk_buff *skb)
 			goto out;
 		break;
 	case ARPHRD_ETHER:
-	case ARPHRD_IEEE802_TR:
 	case ARPHRD_FDDI:
 	case ARPHRD_IEEE802:
 		/*
-		 * ETHERNET, Token Ring and Fibre Channel (which are IEEE 802
+		 * ETHERNET, and Fibre Channel (which are IEEE 802
 		 * devices, according to RFC 2625) devices will accept ARP
 		 * hardware types of either 1 (Ethernet) or 6 (IEEE 802.2).
 		 * This is the case also of FDDI, where the RFC 1390 says that
diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c
index 24a3df9..4300150 100644
--- a/net/ipv4/ipconfig.c
+++ b/net/ipv4/ipconfig.c
@@ -808,8 +808,6 @@ static void __init ic_bootp_send_if(struct ic_device *d, unsigned long jiffies_d
 	b->op = BOOTP_REQUEST;
 	if (dev->type < 256) /* check for false types */
 		b->htype = dev->type;
-	else if (dev->type == ARPHRD_IEEE802_TR) /* fix for token ring */
-		b->htype = ARPHRD_IEEE802;
 	else if (dev->type == ARPHRD_FDDI)
 		b->htype = ARPHRD_ETHER;
 	else {
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 4d1d51a..f6b5b8a 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -1575,7 +1575,6 @@ static int ipv6_generate_eui64(u8 *eui, struct net_device *dev)
 	switch (dev->type) {
 	case ARPHRD_ETHER:
 	case ARPHRD_FDDI:
-	case ARPHRD_IEEE802_TR:
 		return addrconf_ifid_eui48(eui, dev);
 	case ARPHRD_ARCNET:
 		return addrconf_ifid_arcnet(eui, dev);
@@ -2444,7 +2443,6 @@ static void addrconf_dev_config(struct net_device *dev)
 
 	if ((dev->type != ARPHRD_ETHER) &&
 	    (dev->type != ARPHRD_FDDI) &&
-	    (dev->type != ARPHRD_IEEE802_TR) &&
 	    (dev->type != ARPHRD_ARCNET) &&
 	    (dev->type != ARPHRD_INFINIBAND) &&
 	    (dev->type != ARPHRD_IEEE802154)) {
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
index 35615c6..56963f1 100644
--- a/net/ipv6/ndisc.c
+++ b/net/ipv6/ndisc.c
@@ -327,9 +327,6 @@ int ndisc_mc_map(const struct in6_addr *addr, char *buf, struct net_device *dev,
 	case ARPHRD_FDDI:
 		ipv6_eth_mc_map(addr, buf);
 		return 0;
-	case ARPHRD_IEEE802_TR:
-		ipv6_tr_mc_map(addr,buf);
-		return 0;
 	case ARPHRD_ARCNET:
 		ipv6_arcnet_mc_map(addr, buf);
 		return 0;
@@ -795,20 +792,6 @@ static void ndisc_recv_ns(struct sk_buff *skb)
 
 		if (ifp->flags & (IFA_F_TENTATIVE|IFA_F_OPTIMISTIC)) {
 			if (dad) {
-				if (dev->type == ARPHRD_IEEE802_TR) {
-					const unsigned char *sadr;
-					sadr = skb_mac_header(skb);
-					if (((sadr[8] ^ dev->dev_addr[0]) & 0x7f) == 0 &&
-					    sadr[9] == dev->dev_addr[1] &&
-					    sadr[10] == dev->dev_addr[2] &&
-					    sadr[11] == dev->dev_addr[3] &&
-					    sadr[12] == dev->dev_addr[4] &&
-					    sadr[13] == dev->dev_addr[5]) {
-						/* looped-back to us */
-						goto out;
-					}
-				}
-
 				/*
 				 * We are colliding with another node
 				 * who is doing DAD
diff --git a/net/ipx/af_ipx.c b/net/ipx/af_ipx.c
index 9680226..824d4a3 100644
--- a/net/ipx/af_ipx.c
+++ b/net/ipx/af_ipx.c
@@ -983,10 +983,6 @@ static int ipxitf_create(struct ipx_interface_definition *idef)
 		goto out;
 
 	switch (idef->ipx_dlink_type) {
-	case IPX_FRAME_TR_8022:
-		printk(KERN_WARNING "IPX frame type 802.2TR is "
-			"obsolete Use 802.2 instead.\n");
-		/* fall through */
 	case IPX_FRAME_8022:
 		dlink_type 	= htons(ETH_P_802_2);
 		datalink 	= p8022_datalink;
@@ -996,10 +992,7 @@ static int ipxitf_create(struct ipx_interface_definition *idef)
 			dlink_type 	= htons(ETH_P_IPX);
 			datalink 	= pEII_datalink;
 			break;
-		} else
-			printk(KERN_WARNING "IPX frame type EtherII over "
-					"token-ring is obsolete. Use SNAP "
-					"instead.\n");
+		}
 		/* fall through */
 	case IPX_FRAME_SNAP:
 		dlink_type 	= htons(ETH_P_SNAP);
@@ -1275,7 +1268,6 @@ const char *ipx_frame_name(__be16 frame)
 	case ETH_P_802_2:	rc = "802.2";	break;
 	case ETH_P_SNAP:	rc = "SNAP";	break;
 	case ETH_P_802_3:	rc = "802.3";	break;
-	case ETH_P_TR_802_2:	rc = "802.2TR";	break;
 	}
 
 	return rc;
diff --git a/net/llc/af_llc.c b/net/llc/af_llc.c
index 78424f4..e944075 100644
--- a/net/llc/af_llc.c
+++ b/net/llc/af_llc.c
@@ -71,8 +71,7 @@ static inline u16 llc_ui_next_link_no(int sap)
  */
 static inline __be16 llc_proto_type(u16 arphrd)
 {
-	return arphrd == ARPHRD_IEEE802_TR ?
-			 htons(ETH_P_TR_802_2) : htons(ETH_P_802_2);
+	return htons(ETH_P_802_2);
 }
 
 /**
diff --git a/net/llc/llc_output.c b/net/llc/llc_output.c
index b658cba..2dae8a5 100644
--- a/net/llc/llc_output.c
+++ b/net/llc/llc_output.c
@@ -14,9 +14,7 @@
  */
 
 #include <linux/if_arp.h>
-#include <linux/if_tr.h>
 #include <linux/netdevice.h>
-#include <linux/trdevice.h>
 #include <linux/skbuff.h>
 #include <linux/export.h>
 #include <net/llc.h>
@@ -37,7 +35,6 @@ int llc_mac_hdr_init(struct sk_buff *skb,
 	int rc = -EINVAL;
 
 	switch (skb->dev->type) {
-	case ARPHRD_IEEE802_TR:
 	case ARPHRD_ETHER:
 	case ARPHRD_LOOPBACK:
 		rc = dev_hard_header(skb, skb->dev, ETH_P_802_2, da, sa,
diff --git a/net/llc/llc_sap.c b/net/llc/llc_sap.c
index 94e7fca..7c5073b 100644
--- a/net/llc/llc_sap.c
+++ b/net/llc/llc_sap.c
@@ -31,10 +31,6 @@ static int llc_mac_header_len(unsigned short devtype)
 	case ARPHRD_ETHER:
 	case ARPHRD_LOOPBACK:
 		return sizeof(struct ethhdr);
-#if defined(CONFIG_TR) || defined(CONFIG_TR_MODULE)
-	case ARPHRD_IEEE802_TR:
-		return sizeof(struct trh_hdr);
-#endif
 	}
 	return 0;
 }
diff --git a/net/sysctl_net.c b/net/sysctl_net.c
index f3e813a..e3a6e37 100644
--- a/net/sysctl_net.c
+++ b/net/sysctl_net.c
@@ -26,10 +26,6 @@
 #include <linux/if_ether.h>
 #endif
 
-#ifdef CONFIG_TR
-#include <linux/if_tr.h>
-#endif
-
 static struct ctl_table_set *
 net_ctl_header_lookup(struct ctl_table_root *root, struct nsproxy *namespaces)
 {
-- 
1.7.9.1

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

* [PATCH net-next 4/4] tokenring: delete all remaining driver support
  2012-05-16  0:35 [PATCH/RFC net-next 0/4] Delete token ring support Paul Gortmaker
                   ` (2 preceding siblings ...)
  2012-05-16  0:35 ` [PATCH net-next 3/4] net: delete all instances of special processing for token ring Paul Gortmaker
@ 2012-05-16  0:35 ` Paul Gortmaker
  2012-05-16  0:48 ` [PATCH/RFC net-next 0/4] Delete token ring support Andi Kleen
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 12+ messages in thread
From: Paul Gortmaker @ 2012-05-16  0:35 UTC (permalink / raw)
  To: davem; +Cc: netdev, Paul Gortmaker

This represents the mass deletion of the of the tokenring support.

It gets rid of:
  - the net/tr.c which the drivers depended on
  - the drivers/net component
  - the Kbuild infrastructure around it
  - any tokenring related CONFIG_ settings in any defconfigs
  - the tokenring headers in the include/linux dir
  - the firmware associated with the tokenring drivers.
  - any associated token ring documentation.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 Documentation/filesystems/proc.txt    |    1 -
 Documentation/networking/00-INDEX     |    8 -
 Documentation/networking/3c359.txt    |   58 -
 Documentation/networking/olympic.txt  |   79 -
 Documentation/networking/smctr.txt    |   66 -
 Documentation/networking/tms380tr.txt |  147 -
 arch/mips/configs/mtx1_defconfig      |    4 -
 arch/xtensa/configs/common_defconfig  |    5 -
 drivers/message/fusion/mptlan.h       |    1 -
 drivers/net/Kconfig                   |    2 -
 drivers/net/Makefile                  |    1 -
 drivers/net/Space.c                   |   46 -
 drivers/net/tokenring/3c359.c         | 1831 -----------
 drivers/net/tokenring/3c359.h         |  291 --
 drivers/net/tokenring/Kconfig         |  199 --
 drivers/net/tokenring/Makefile        |   16 -
 drivers/net/tokenring/abyss.c         |  468 ---
 drivers/net/tokenring/abyss.h         |   58 -
 drivers/net/tokenring/ibmtr.c         | 1964 -----------
 drivers/net/tokenring/ibmtr_cs.c      |  370 ---
 drivers/net/tokenring/lanstreamer.c   | 1909 -----------
 drivers/net/tokenring/lanstreamer.h   |  343 --
 drivers/net/tokenring/madgemc.c       |  761 -----
 drivers/net/tokenring/madgemc.h       |   70 -
 drivers/net/tokenring/olympic.c       | 1737 ----------
 drivers/net/tokenring/olympic.h       |  321 --
 drivers/net/tokenring/proteon.c       |  422 ---
 drivers/net/tokenring/skisa.c         |  432 ---
 drivers/net/tokenring/smctr.c         | 5717 ---------------------------------
 drivers/net/tokenring/smctr.h         | 1585 ---------
 drivers/net/tokenring/tms380tr.c      | 2306 -------------
 drivers/net/tokenring/tms380tr.h      | 1141 -------
 drivers/net/tokenring/tmspci.c        |  236 --
 firmware/3com/3C359.bin.ihex          | 1573 ---------
 firmware/Makefile                     |    2 -
 firmware/WHENCE                       |   38 -
 firmware/tr_smctr.bin.ihex            |  477 ---
 include/linux/Kbuild                  |    1 -
 include/linux/ibmtr.h                 |  373 ---
 include/linux/if_tr.h                 |  103 -
 include/linux/trdevice.h              |   37 -
 net/802/Makefile                      |    1 -
 net/802/tr.c                          |  669 ----
 43 files changed, 0 insertions(+), 25869 deletions(-)
 delete mode 100644 Documentation/networking/3c359.txt
 delete mode 100644 Documentation/networking/olympic.txt
 delete mode 100644 Documentation/networking/smctr.txt
 delete mode 100644 Documentation/networking/tms380tr.txt
 delete mode 100644 drivers/net/tokenring/3c359.c
 delete mode 100644 drivers/net/tokenring/3c359.h
 delete mode 100644 drivers/net/tokenring/Kconfig
 delete mode 100644 drivers/net/tokenring/Makefile
 delete mode 100644 drivers/net/tokenring/abyss.c
 delete mode 100644 drivers/net/tokenring/abyss.h
 delete mode 100644 drivers/net/tokenring/ibmtr.c
 delete mode 100644 drivers/net/tokenring/ibmtr_cs.c
 delete mode 100644 drivers/net/tokenring/lanstreamer.c
 delete mode 100644 drivers/net/tokenring/lanstreamer.h
 delete mode 100644 drivers/net/tokenring/madgemc.c
 delete mode 100644 drivers/net/tokenring/madgemc.h
 delete mode 100644 drivers/net/tokenring/olympic.c
 delete mode 100644 drivers/net/tokenring/olympic.h
 delete mode 100644 drivers/net/tokenring/proteon.c
 delete mode 100644 drivers/net/tokenring/skisa.c
 delete mode 100644 drivers/net/tokenring/smctr.c
 delete mode 100644 drivers/net/tokenring/smctr.h
 delete mode 100644 drivers/net/tokenring/tms380tr.c
 delete mode 100644 drivers/net/tokenring/tms380tr.h
 delete mode 100644 drivers/net/tokenring/tmspci.c
 delete mode 100644 firmware/3com/3C359.bin.ihex
 delete mode 100644 firmware/tr_smctr.bin.ihex
 delete mode 100644 include/linux/ibmtr.h
 delete mode 100644 include/linux/if_tr.h
 delete mode 100644 include/linux/trdevice.h
 delete mode 100644 net/802/tr.c

diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt
index b7413cb..ef088e5 100644
--- a/Documentation/filesystems/proc.txt
+++ b/Documentation/filesystems/proc.txt
@@ -996,7 +996,6 @@ Table 1-9: Network info in /proc/net
  snmp          SNMP data                                                       
  sockstat      Socket statistics                                               
  tcp           TCP  sockets                                                    
- tr_rif        Token ring RIF routing table                                    
  udp           UDP sockets                                                     
  unix          UNIX domain sockets                                             
  wireless      Wireless interface data (Wavelan etc)                           
diff --git a/Documentation/networking/00-INDEX b/Documentation/networking/00-INDEX
index 9ad9dde..2cc3c77 100644
--- a/Documentation/networking/00-INDEX
+++ b/Documentation/networking/00-INDEX
@@ -1,7 +1,5 @@
 00-INDEX
 	- this file
-3c359.txt
-	- information on the 3Com TokenLink Velocity XL (3c5359) driver.
 3c505.txt
 	- information on the 3Com EtherLink Plus (3c505) driver.
 3c509.txt
@@ -142,8 +140,6 @@ netif-msg.txt
 	- Design of the network interface message level setting (NETIF_MSG_*).
 nfc.txt
 	- The Linux Near Field Communication (NFS) subsystem.
-olympic.txt
-	- IBM PCI Pit/Pit-Phy/Olympic Token Ring driver info.
 openvswitch.txt
 	- Open vSwitch developer documentation.
 operstates.txt
@@ -184,8 +180,6 @@ skfp.txt
 	- SysKonnect FDDI (SK-5xxx, Compaq Netelligent) driver info.
 smc9.txt
 	- the driver for SMC's 9000 series of Ethernet cards
-smctr.txt
-	- SMC TokenCard TokenRing Linux driver info.
 spider-net.txt
 	- README for the Spidernet Driver (as found in PS3 / Cell BE).
 stmmac.txt
@@ -200,8 +194,6 @@ tcp-thin.txt
 	- kernel tuning options for low rate 'thin' TCP streams.
 tlan.txt
 	- ThunderLAN (Compaq Netelligent 10/100, Olicom OC-2xxx) driver info.
-tms380tr.txt
-	- SysKonnect Token Ring ISA/PCI adapter driver info.
 tproxy.txt
 	- Transparent proxy support user guide.
 tuntap.txt
diff --git a/Documentation/networking/3c359.txt b/Documentation/networking/3c359.txt
deleted file mode 100644
index dadfe81..0000000
diff --git a/Documentation/networking/olympic.txt b/Documentation/networking/olympic.txt
deleted file mode 100644
index b95b5bf..0000000
diff --git a/Documentation/networking/smctr.txt b/Documentation/networking/smctr.txt
deleted file mode 100644
index 9af25b8..0000000
diff --git a/Documentation/networking/tms380tr.txt b/Documentation/networking/tms380tr.txt
deleted file mode 100644
index 1f73e13..0000000
diff --git a/arch/mips/configs/mtx1_defconfig b/arch/mips/configs/mtx1_defconfig
index 807c97e..46c61edc 100644
--- a/arch/mips/configs/mtx1_defconfig
+++ b/arch/mips/configs/mtx1_defconfig
@@ -346,11 +346,8 @@ CONFIG_CHELSIO_T1=m
 CONFIG_IXGB=m
 CONFIG_S2IO=m
 CONFIG_MYRI10GE=m
-CONFIG_TR=y
 CONFIG_IBMOL=m
 CONFIG_IBMLS=m
-CONFIG_3C359=m
-CONFIG_TMS380TR=m
 CONFIG_TMSPCI=m
 CONFIG_ABYSS=m
 CONFIG_USB_CATC=m
@@ -376,7 +373,6 @@ CONFIG_PCMCIA_SMC91C92=m
 CONFIG_PCMCIA_XIRC2PS=m
 CONFIG_PCMCIA_AXNET=m
 CONFIG_ARCNET_COM20020_CS=m
-CONFIG_PCMCIA_IBMTR=m
 CONFIG_WAN=y
 CONFIG_LANMEDIA=m
 CONFIG_HDLC=m
diff --git a/arch/xtensa/configs/common_defconfig b/arch/xtensa/configs/common_defconfig
index b90038e..a182a4e 100644
--- a/arch/xtensa/configs/common_defconfig
+++ b/arch/xtensa/configs/common_defconfig
@@ -333,11 +333,6 @@ CONFIG_XT2000_SONIC=y
 # CONFIG_S2IO is not set
 
 #
-# Token Ring devices
-#
-# CONFIG_TR is not set
-
-#
 # Wireless LAN (non-hamradio)
 #
 CONFIG_NET_RADIO=y
diff --git a/drivers/message/fusion/mptlan.h b/drivers/message/fusion/mptlan.h
index c171afa..69e9d54 100644
--- a/drivers/message/fusion/mptlan.h
+++ b/drivers/message/fusion/mptlan.h
@@ -69,7 +69,6 @@
 #include <linux/spinlock.h>
 #include <linux/workqueue.h>
 #include <linux/delay.h>
-// #include <linux/trdevice.h>
 
 #include <asm/uaccess.h>
 #include <asm/io.h>
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index 78a6259..0c2bd80 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -282,8 +282,6 @@ source "drivers/net/slip/Kconfig"
 
 source "drivers/s390/net/Kconfig"
 
-source "drivers/net/tokenring/Kconfig"
-
 source "drivers/net/usb/Kconfig"
 
 source "drivers/net/wireless/Kconfig"
diff --git a/drivers/net/Makefile b/drivers/net/Makefile
index a6b8ce1..3d375ca 100644
--- a/drivers/net/Makefile
+++ b/drivers/net/Makefile
@@ -50,7 +50,6 @@ obj-$(CONFIG_SLIP) += slip/
 obj-$(CONFIG_SLHC) += slip/
 obj-$(CONFIG_NET_SB1000) += sb1000.o
 obj-$(CONFIG_SUNGEM_PHY) += sungem_phy.o
-obj-$(CONFIG_TR) += tokenring/
 obj-$(CONFIG_WAN) += wan/
 obj-$(CONFIG_WLAN) += wireless/
 obj-$(CONFIG_WIMAX) += wimax/
diff --git a/drivers/net/Space.c b/drivers/net/Space.c
index 88bbd8f..486e2dc 100644
--- a/drivers/net/Space.c
+++ b/drivers/net/Space.c
@@ -29,7 +29,6 @@
  */
 #include <linux/netdevice.h>
 #include <linux/etherdevice.h>
-#include <linux/trdevice.h>
 #include <linux/errno.h>
 #include <linux/init.h>
 #include <linux/netlink.h>
@@ -284,46 +283,6 @@ static void __init ethif_probe2(int unit)
 		probe_list2(unit, parport_probes, base_addr == 0));
 }
 
-#ifdef CONFIG_TR
-/* Token-ring device probe */
-extern int ibmtr_probe_card(struct net_device *);
-extern struct net_device *smctr_probe(int unit);
-
-static struct devprobe2 tr_probes2[] __initdata = {
-#ifdef CONFIG_SMCTR
-	{smctr_probe, 0},
-#endif
-	{NULL, 0},
-};
-
-static __init int trif_probe(int unit)
-{
-	int err = -ENODEV;
-#ifdef CONFIG_IBMTR
-	struct net_device *dev = alloc_trdev(0);
-	if (!dev)
-		return -ENOMEM;
-
-	sprintf(dev->name, "tr%d", unit);
-	netdev_boot_setup_check(dev);
-	err = ibmtr_probe_card(dev);
-	if (err)
-		free_netdev(dev);
-#endif
-	return err;
-}
-
-static void __init trif_probe2(int unit)
-{
-	unsigned long base_addr = netdev_boot_base("tr", unit);
-
-	if (base_addr == 1)
-		return;
-	probe_list2(unit, tr_probes2, base_addr == 0);
-}
-#endif
-
-
 /*  Statically configured drivers -- order matters here. */
 static int __init net_olddevs_init(void)
 {
@@ -333,11 +292,6 @@ static int __init net_olddevs_init(void)
 	for (num = 0; num < 8; ++num)
 		sbni_probe(num);
 #endif
-#ifdef CONFIG_TR
-	for (num = 0; num < 8; ++num)
-		if (!trif_probe(num))
-			trif_probe2(num);
-#endif
 	for (num = 0; num < 8; ++num)
 		ethif_probe2(num);
 
diff --git a/drivers/net/tokenring/3c359.c b/drivers/net/tokenring/3c359.c
deleted file mode 100644
index 0924f57..0000000
diff --git a/drivers/net/tokenring/3c359.h b/drivers/net/tokenring/3c359.h
deleted file mode 100644
index bcb1a6b..0000000
diff --git a/drivers/net/tokenring/Kconfig b/drivers/net/tokenring/Kconfig
deleted file mode 100644
index ef3bb13..0000000
diff --git a/drivers/net/tokenring/Makefile b/drivers/net/tokenring/Makefile
deleted file mode 100644
index f1be8d9..0000000
diff --git a/drivers/net/tokenring/abyss.c b/drivers/net/tokenring/abyss.c
deleted file mode 100644
index b715e6b..0000000
diff --git a/drivers/net/tokenring/abyss.h b/drivers/net/tokenring/abyss.h
deleted file mode 100644
index b0a473b..0000000
diff --git a/drivers/net/tokenring/ibmtr.c b/drivers/net/tokenring/ibmtr.c
deleted file mode 100644
index b5c8c18..0000000
diff --git a/drivers/net/tokenring/ibmtr_cs.c b/drivers/net/tokenring/ibmtr_cs.c
deleted file mode 100644
index 356e28e..0000000
diff --git a/drivers/net/tokenring/lanstreamer.c b/drivers/net/tokenring/lanstreamer.c
deleted file mode 100644
index 97e4c65..0000000
diff --git a/drivers/net/tokenring/lanstreamer.h b/drivers/net/tokenring/lanstreamer.h
deleted file mode 100644
index 3c58d6a..0000000
diff --git a/drivers/net/tokenring/madgemc.c b/drivers/net/tokenring/madgemc.c
deleted file mode 100644
index 28adcdf..0000000
diff --git a/drivers/net/tokenring/madgemc.h b/drivers/net/tokenring/madgemc.h
deleted file mode 100644
index fe88e27..0000000
diff --git a/drivers/net/tokenring/olympic.c b/drivers/net/tokenring/olympic.c
deleted file mode 100644
index 4d45fe8..0000000
diff --git a/drivers/net/tokenring/olympic.h b/drivers/net/tokenring/olympic.h
deleted file mode 100644
index 30631ba..0000000
diff --git a/drivers/net/tokenring/proteon.c b/drivers/net/tokenring/proteon.c
deleted file mode 100644
index 62d90e4..0000000
diff --git a/drivers/net/tokenring/skisa.c b/drivers/net/tokenring/skisa.c
deleted file mode 100644
index ee11e93..0000000
diff --git a/drivers/net/tokenring/smctr.c b/drivers/net/tokenring/smctr.c
deleted file mode 100644
index cb35fb7..0000000
diff --git a/drivers/net/tokenring/smctr.h b/drivers/net/tokenring/smctr.h
deleted file mode 100644
index 6e5700a..0000000
diff --git a/drivers/net/tokenring/tms380tr.c b/drivers/net/tokenring/tms380tr.c
deleted file mode 100644
index b5e0855..0000000
diff --git a/drivers/net/tokenring/tms380tr.h b/drivers/net/tokenring/tms380tr.h
deleted file mode 100644
index e5a617c..0000000
diff --git a/drivers/net/tokenring/tmspci.c b/drivers/net/tokenring/tmspci.c
deleted file mode 100644
index 90f3fa4..0000000
diff --git a/firmware/3com/3C359.bin.ihex b/firmware/3com/3C359.bin.ihex
deleted file mode 100644
index 781bac3..0000000
diff --git a/firmware/Makefile b/firmware/Makefile
index 0d15a3d..344713b 100644
--- a/firmware/Makefile
+++ b/firmware/Makefile
@@ -26,7 +26,6 @@ fw-shipped- += acenic/tg1.bin
 else
 acenic-objs := acenic/tg1.bin acenic/tg2.bin
 endif
-fw-shipped-$(CONFIG_3C359) += 3com/3C359.bin
 fw-shipped-$(CONFIG_ACENIC) += $(acenic-objs)
 fw-shipped-$(CONFIG_ADAPTEC_STARFIRE) += adaptec/starfire_rx.bin \
 					 adaptec/starfire_tx.bin
@@ -86,7 +85,6 @@ fw-shipped-$(CONFIG_SCSI_QLOGIC_1280) += qlogic/1040.bin qlogic/1280.bin \
 					 qlogic/12160.bin
 fw-shipped-$(CONFIG_SCSI_QLOGICPTI) += qlogic/isp1000.bin
 fw-shipped-$(CONFIG_INFINIBAND_QIB) += qlogic/sd7220.fw
-fw-shipped-$(CONFIG_SMCTR) += tr_smctr.bin
 fw-shipped-$(CONFIG_SND_KORG1212) += korg/k1212.dsp
 fw-shipped-$(CONFIG_SND_MAESTRO3) += ess/maestro3_assp_kernel.fw \
 				     ess/maestro3_assp_minisrc.fw
diff --git a/firmware/WHENCE b/firmware/WHENCE
index 182ecb6..8388f02 100644
--- a/firmware/WHENCE
+++ b/firmware/WHENCE
@@ -89,18 +89,6 @@ Licence: Allegedly GPLv2+, but no source visible. Marked:
   Copyright (C) 2001 Qlogic Corporation (www.qlogic.com)
 
 --------------------------------------------------------------------------
-Driver: smctr -- SMC ISA/MCA Token Ring adapter
-
-File: tr_smctr.bin
-Info: MCT.BIN v6.3C1 03/01/95
-
-Original licence info:
-
- * This firmware is licensed to you strictly for use in conjunction
- * with the use of SMC TokenRing adapters. There is no waranty
- * expressed or implied about its fitness for any purpose.
-
---------------------------------------------------------------------------
 
 Driver: kaweth -- USB KLSI KL5USB101-based Ethernet device
 
@@ -567,32 +555,6 @@ Found in hex form in kernel source.
 
 --------------------------------------------------------------------------
 
-Driver: 3C359 - 3Com 3C359 Token Link Velocity XL adapter
-
-File: 3com/3C359.bin
-
-Licence:
-/*
- * The firmware this driver downloads into the tokenring card is a
- * separate program and is not GPL'd source code, even though the Linux
- * side driver and the routine that loads this data into the card are.
- *
- * This firmware is licensed to you strictly for use in conjunction
- * with the use of 3Com 3C359 TokenRing adapters. There is no
- * waranty expressed or implied about its fitness for any purpose.
- */
-/* 3c359_microcode.mac: 3Com 3C359 Tokenring microcode.
- *
- * Notes:
- *  - Loaded from xl_init upon adapter initialization.
- *
- * Available from 3Com as part of their standard 3C359 driver.
- */
-
-Found in hex form in kernel source.
-
---------------------------------------------------------------------------
-
 Driver: PCMCIA_PCNET - NE2000 compatible PCMCIA adapter
 
 File: cis/LA-PCM.cis
diff --git a/firmware/tr_smctr.bin.ihex b/firmware/tr_smctr.bin.ihex
deleted file mode 100644
index 6797451..0000000
diff --git a/include/linux/Kbuild b/include/linux/Kbuild
index 3c9b616..b738f2d 100644
--- a/include/linux/Kbuild
+++ b/include/linux/Kbuild
@@ -186,7 +186,6 @@ header-y += if_pppox.h
 header-y += if_slip.h
 header-y += if_strip.h
 header-y += if_team.h
-header-y += if_tr.h
 header-y += if_tun.h
 header-y += if_tunnel.h
 header-y += if_vlan.h
diff --git a/include/linux/ibmtr.h b/include/linux/ibmtr.h
deleted file mode 100644
index 06695b7..0000000
diff --git a/include/linux/if_tr.h b/include/linux/if_tr.h
deleted file mode 100644
index fc23aeb..0000000
diff --git a/include/linux/trdevice.h b/include/linux/trdevice.h
deleted file mode 100644
index bfc84a7..0000000
diff --git a/net/802/Makefile b/net/802/Makefile
index 7893d67..a30d6e3 100644
--- a/net/802/Makefile
+++ b/net/802/Makefile
@@ -4,7 +4,6 @@
 
 # Check the p8022 selections against net/core/Makefile.
 obj-$(CONFIG_LLC)	+= p8022.o psnap.o
-obj-$(CONFIG_TR)	+= p8022.o psnap.o tr.o
 obj-$(CONFIG_NET_FC)	+=                 fc.o
 obj-$(CONFIG_FDDI)	+=                 fddi.o
 obj-$(CONFIG_HIPPI)	+=                 hippi.o
diff --git a/net/802/tr.c b/net/802/tr.c
deleted file mode 100644
index 175243b..0000000
-- 
1.7.9.1

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

* Re: [PATCH/RFC net-next 0/4] Delete token ring support.
  2012-05-16  0:35 [PATCH/RFC net-next 0/4] Delete token ring support Paul Gortmaker
                   ` (3 preceding siblings ...)
  2012-05-16  0:35 ` [PATCH net-next 4/4] tokenring: delete all remaining driver support Paul Gortmaker
@ 2012-05-16  0:48 ` Andi Kleen
  2012-05-16  1:00   ` David Miller
  2012-05-16  7:43 ` Martin Schwidefsky
  2012-05-16  9:29 ` Bjørn Mork
  6 siblings, 1 reply; 12+ messages in thread
From: Andi Kleen @ 2012-05-16  0:48 UTC (permalink / raw)
  To: Paul Gortmaker
  Cc: davem, netdev, Martin Schwidefsky, Heiko Carstens, linux390, linux-s390

Paul Gortmaker <paul.gortmaker@windriver.com> writes:
>
> What I mean by (2) is the implicit absence of anyone fixing _runtime_
> bugs, going all the way back to 2.6.12 in 2005.  If the code was being
> _used_, we'd see runtime regressions reported and their associated
> fixes.

Removal sounds good to me. In fact I would argue to remove any other driver
which did not get a real change since 2005 too.

-Andi

-- 
ak@linux.intel.com -- Speaking for myself only

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

* Re: [PATCH/RFC net-next 0/4] Delete token ring support.
  2012-05-16  0:48 ` [PATCH/RFC net-next 0/4] Delete token ring support Andi Kleen
@ 2012-05-16  1:00   ` David Miller
  2012-05-16  1:38     ` Paul Gortmaker
  2012-05-16  3:05     ` Paul Gortmaker
  0 siblings, 2 replies; 12+ messages in thread
From: David Miller @ 2012-05-16  1:00 UTC (permalink / raw)
  To: andi
  Cc: paul.gortmaker, netdev, schwidefsky, heiko.carstens, linux390,
	linux-s390

From: Andi Kleen <andi@firstfloor.org>
Date: Tue, 15 May 2012 17:48:15 -0700

> Paul Gortmaker <paul.gortmaker@windriver.com> writes:
>>
>> What I mean by (2) is the implicit absence of anyone fixing _runtime_
>> bugs, going all the way back to 2.6.12 in 2005.  If the code was being
>> _used_, we'd see runtime regressions reported and their associated
>> fixes.
> 
> Removal sounds good to me. In fact I would argue to remove any other driver
> which did not get a real change since 2005 too.

I also support removing the token ring stuff, and in fact I'm more
than happy to add your patch set to the net-next tree right now.

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

* Re: [PATCH/RFC net-next 0/4] Delete token ring support.
  2012-05-16  1:00   ` David Miller
@ 2012-05-16  1:38     ` Paul Gortmaker
  2012-05-16  3:05     ` Paul Gortmaker
  1 sibling, 0 replies; 12+ messages in thread
From: Paul Gortmaker @ 2012-05-16  1:38 UTC (permalink / raw)
  To: David Miller
  Cc: andi, netdev, schwidefsky, heiko.carstens, linux390, linux-s390

[Re: [PATCH/RFC net-next 0/4] Delete token ring support.] On 15/05/2012 (Tue 21:00) David Miller wrote:

> From: Andi Kleen <andi@firstfloor.org>
> Date: Tue, 15 May 2012 17:48:15 -0700
> 
> > Paul Gortmaker <paul.gortmaker@windriver.com> writes:
> >>
> >> What I mean by (2) is the implicit absence of anyone fixing _runtime_
> >> bugs, going all the way back to 2.6.12 in 2005.  If the code was being
> >> _used_, we'd see runtime regressions reported and their associated
> >> fixes.
> > 
> > Removal sounds good to me. In fact I would argue to remove any other driver
> > which did not get a real change since 2005 too.

3c501.c is on my radar.  The 8bit ISA hardware with discrete TTL
components everywhere was crap back in the early 1990s, and it sure as
hell has not got better with age.

> 
> I also support removing the token ring stuff, and in fact I'm more
> than happy to add your patch set to the net-next tree right now.

Great -- that was the kind of response I was hoping for, but not
expecting to get.  Let me run one last allyesconfig/allmodconfig
and I'll send a pull request.  I've already run the defconfig
build on s390 to make sure I didn't break them.

Thanks,
Paul.

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

* Re: [PATCH/RFC net-next 0/4] Delete token ring support.
  2012-05-16  1:00   ` David Miller
  2012-05-16  1:38     ` Paul Gortmaker
@ 2012-05-16  3:05     ` Paul Gortmaker
  2012-05-16  5:04       ` David Miller
  1 sibling, 1 reply; 12+ messages in thread
From: Paul Gortmaker @ 2012-05-16  3:05 UTC (permalink / raw)
  To: David Miller
  Cc: andi, netdev, schwidefsky, heiko.carstens, linux390, linux-s390

[Re: [PATCH/RFC net-next 0/4] Delete token ring support.] On 15/05/2012 (Tue 21:00) David Miller wrote:

> From: Andi Kleen <andi@firstfloor.org>
> Date: Tue, 15 May 2012 17:48:15 -0700
> 
> > Paul Gortmaker <paul.gortmaker@windriver.com> writes:
> >>
> >> What I mean by (2) is the implicit absence of anyone fixing _runtime_
> >> bugs, going all the way back to 2.6.12 in 2005.  If the code was being
> >> _used_, we'd see runtime regressions reported and their associated
> >> fixes.
> > 
> > Removal sounds good to me. In fact I would argue to remove any other driver
> > which did not get a real change since 2005 too.
> 
> I also support removing the token ring stuff, and in fact I'm more
> than happy to add your patch set to the net-next tree right now.

I've re-run i386 allyesconfig/allmodconfig, since I'd not re-run that
after deleting the firmware blobs.   Fortunately nothing showed up, so
this pull is unchanged from the RFC sent earlier today.  (I'd run the
s390 defconfig just hours ago, so I knew that arch was OK already)

Thanks,
Paul.
---

Please pull:

The following changes since commit e87cc4728f0e2fb663e592a1141742b1d6c63256:

  net: Convert net_ratelimit uses to net_<level>_ratelimited (2012-05-15 13:45:03 -0400)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux.git delete-tokenring

for you to fetch changes up to ee446fd5e6dafee4a16fd1bd345d2571dcfd6f5d:

  tokenring: delete all remaining driver support (2012-05-15 20:23:16 -0400)

----------------------------------------------------------------
Paul Gortmaker (4):
      s390: delete any traces of token ring support
      atm: remove the coupling to token ring support
      net: delete all instances of special processing for token ring
      tokenring: delete all remaining driver support

 Documentation/filesystems/proc.txt    |    1 -
 Documentation/networking/00-INDEX     |    8 -
 Documentation/networking/3c359.txt    |   58 -
 Documentation/networking/olympic.txt  |   79 -
 Documentation/networking/smctr.txt    |   66 -
 Documentation/networking/tms380tr.txt |  147 -
 arch/mips/configs/mtx1_defconfig      |    4 -
 arch/xtensa/configs/common_defconfig  |    5 -
 drivers/message/fusion/mptlan.h       |    1 -
 drivers/net/Kconfig                   |    2 -
 drivers/net/Makefile                  |    1 -
 drivers/net/Space.c                   |   46 -
 drivers/net/tokenring/3c359.c         | 1831 -----------
 drivers/net/tokenring/3c359.h         |  291 --
 drivers/net/tokenring/Kconfig         |  199 --
 drivers/net/tokenring/Makefile        |   16 -
 drivers/net/tokenring/abyss.c         |  468 ---
 drivers/net/tokenring/abyss.h         |   58 -
 drivers/net/tokenring/ibmtr.c         | 1964 -----------
 drivers/net/tokenring/ibmtr_cs.c      |  370 ---
 drivers/net/tokenring/lanstreamer.c   | 1909 -----------
 drivers/net/tokenring/lanstreamer.h   |  343 --
 drivers/net/tokenring/madgemc.c       |  761 -----
 drivers/net/tokenring/madgemc.h       |   70 -
 drivers/net/tokenring/olympic.c       | 1737 ----------
 drivers/net/tokenring/olympic.h       |  321 --
 drivers/net/tokenring/proteon.c       |  422 ---
 drivers/net/tokenring/skisa.c         |  432 ---
 drivers/net/tokenring/smctr.c         | 5717 ---------------------------------
 drivers/net/tokenring/smctr.h         | 1585 ---------
 drivers/net/tokenring/tms380tr.c      | 2306 -------------
 drivers/net/tokenring/tms380tr.h      | 1141 -------
 drivers/net/tokenring/tmspci.c        |  236 --
 drivers/s390/net/Kconfig              |    5 +-
 drivers/s390/net/lcs.c                |   21 +-
 drivers/s390/net/qeth_core.h          |    2 -
 drivers/s390/net/qeth_core_main.c     |    6 +-
 drivers/s390/net/qeth_l3_main.c       |   35 +-
 firmware/3com/3C359.bin.ihex          | 1573 ---------
 firmware/Makefile                     |    2 -
 firmware/WHENCE                       |   38 -
 firmware/tr_smctr.bin.ihex            |  477 ---
 include/linux/Kbuild                  |    1 -
 include/linux/atmlec.h                |    7 -
 include/linux/ibmtr.h                 |  373 ---
 include/linux/if_arp.h                |    2 +-
 include/linux/if_tr.h                 |  103 -
 include/linux/ipx.h                   |    2 +-
 include/linux/trdevice.h              |   37 -
 include/net/if_inet6.h                |   54 -
 include/net/ip.h                      |   17 -
 include/net/llc_pdu.h                 |    7 -
 net/802/Makefile                      |    1 -
 net/802/p8022.c                       |    3 +-
 net/802/tr.c                          |  670 ----
 net/atm/lec.c                         |  138 +-
 net/atm/lec.h                         |    1 -
 net/core/dev.c                        |   14 +-
 net/ipv4/Kconfig                      |    4 +-
 net/ipv4/arp.c                        |   13 +-
 net/ipv4/ipconfig.c                   |    2 -
 net/ipv6/addrconf.c                   |    2 -
 net/ipv6/ndisc.c                      |   17 -
 net/ipx/af_ipx.c                      |   10 +-
 net/llc/af_llc.c                      |    3 +-
 net/llc/llc_output.c                  |    3 -
 net/llc/llc_sap.c                     |    4 -
 net/sysctl_net.c                      |    4 -
 68 files changed, 33 insertions(+), 26213 deletions(-)
 delete mode 100644 Documentation/networking/3c359.txt
 delete mode 100644 Documentation/networking/olympic.txt
 delete mode 100644 Documentation/networking/smctr.txt
 delete mode 100644 Documentation/networking/tms380tr.txt
 delete mode 100644 drivers/net/tokenring/3c359.c
 delete mode 100644 drivers/net/tokenring/3c359.h
 delete mode 100644 drivers/net/tokenring/Kconfig
 delete mode 100644 drivers/net/tokenring/Makefile
 delete mode 100644 drivers/net/tokenring/abyss.c
 delete mode 100644 drivers/net/tokenring/abyss.h
 delete mode 100644 drivers/net/tokenring/ibmtr.c
 delete mode 100644 drivers/net/tokenring/ibmtr_cs.c
 delete mode 100644 drivers/net/tokenring/lanstreamer.c
 delete mode 100644 drivers/net/tokenring/lanstreamer.h
 delete mode 100644 drivers/net/tokenring/madgemc.c
 delete mode 100644 drivers/net/tokenring/madgemc.h
 delete mode 100644 drivers/net/tokenring/olympic.c
 delete mode 100644 drivers/net/tokenring/olympic.h
 delete mode 100644 drivers/net/tokenring/proteon.c
 delete mode 100644 drivers/net/tokenring/skisa.c
 delete mode 100644 drivers/net/tokenring/smctr.c
 delete mode 100644 drivers/net/tokenring/smctr.h
 delete mode 100644 drivers/net/tokenring/tms380tr.c
 delete mode 100644 drivers/net/tokenring/tms380tr.h
 delete mode 100644 drivers/net/tokenring/tmspci.c
 delete mode 100644 firmware/3com/3C359.bin.ihex
 delete mode 100644 firmware/tr_smctr.bin.ihex
 delete mode 100644 include/linux/ibmtr.h
 delete mode 100644 include/linux/if_tr.h
 delete mode 100644 include/linux/trdevice.h
 delete mode 100644 net/802/tr.c

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

* Re: [PATCH/RFC net-next 0/4] Delete token ring support.
  2012-05-16  3:05     ` Paul Gortmaker
@ 2012-05-16  5:04       ` David Miller
  0 siblings, 0 replies; 12+ messages in thread
From: David Miller @ 2012-05-16  5:04 UTC (permalink / raw)
  To: paul.gortmaker
  Cc: andi, netdev, schwidefsky, heiko.carstens, linux390, linux-s390

From: Paul Gortmaker <paul.gortmaker@windriver.com>
Date: Tue, 15 May 2012 23:05:10 -0400

> The following changes since commit e87cc4728f0e2fb663e592a1141742b1d6c63256:
> 
>   net: Convert net_ratelimit uses to net_<level>_ratelimited (2012-05-15 13:45:03 -0400)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux.git delete-tokenring

Pulled, thanks Paul.

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

* Re: [PATCH/RFC net-next 0/4] Delete token ring support.
  2012-05-16  0:35 [PATCH/RFC net-next 0/4] Delete token ring support Paul Gortmaker
                   ` (4 preceding siblings ...)
  2012-05-16  0:48 ` [PATCH/RFC net-next 0/4] Delete token ring support Andi Kleen
@ 2012-05-16  7:43 ` Martin Schwidefsky
  2012-05-16  9:29 ` Bjørn Mork
  6 siblings, 0 replies; 12+ messages in thread
From: Martin Schwidefsky @ 2012-05-16  7:43 UTC (permalink / raw)
  To: Paul Gortmaker; +Cc: davem, netdev, Heiko Carstens, linux390, linux-s390

On Tue, 15 May 2012 20:35:40 -0400
Paul Gortmaker <paul.gortmaker@windriver.com> wrote:

> The one thing I wasn't aware of, until actually creating the commits
> to remove tokenring, was that s390 also had support for it.  I'm
> guessing that it is just as unused there as it is on x86, but the s390
> folks are CC'd for their input.

The LCS and OSA cards still have the token-ring mode. I can't remember
when we last tested this though, the last token-ring I have seen is like
10 years ago. I guess it is time to move on and get rid of it.

-- 
blue skies,
   Martin.

"Reality continues to ruin my life." - Calvin.

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

* Re: [PATCH/RFC net-next 0/4] Delete token ring support.
  2012-05-16  0:35 [PATCH/RFC net-next 0/4] Delete token ring support Paul Gortmaker
                   ` (5 preceding siblings ...)
  2012-05-16  7:43 ` Martin Schwidefsky
@ 2012-05-16  9:29 ` Bjørn Mork
  6 siblings, 0 replies; 12+ messages in thread
From: Bjørn Mork @ 2012-05-16  9:29 UTC (permalink / raw)
  To: Paul Gortmaker
  Cc: davem, netdev, Martin Schwidefsky, Heiko Carstens, linux390, linux-s390

Paul Gortmaker <paul.gortmaker@windriver.com> writes:

> This may not be for 35-next, but for addition to feature-removal.txt
> and application at a later date.  But what I would like to get is
> consensus that this is something that we want to proceed with before I
> spend any more time on it.  If folks are OK with the idea, then I am
> open to suggestions as to the best time for it to happen.
>
> So, why you might ask?  It is in tree already, it is "free" to leave it
> there, right?  Well, no.
>
> What led me here was the creation of a patch to remove CONFIG_MCA.  In
> doing so, I found I was deleting most of the token ring drivers, and 
> altering the remaining few ISA/MCA ones to be just ISA only.

With all due respect, I do not think you have looked thoroughly enough
at the remaining drivers...

> But it really didn't make sense to me, to just leave the skeletal
> remains of token ring there -- vs removing TR 1st, and then the MCA
> removal will be a lot smaller and cleaner commit.
>
> Removal: does it make sense?
>
> The biggest data point I can suggest to folks is to run:
>
> 	git whatchanged --follow drivers/net/tokenring
>
> and when you are quickly paging over the changes, note two things.
> (1) the amount of time spent by folks cleaning and maintaining the
> code, and (2) - most important -- is that essentially all the commits
> are of the tree-wide cleanup nature, or API change nature.
>
> What I mean by (2) is the implicit absence of anyone fixing _runtime_
> bugs, going all the way back to 2.6.12 in 2005.  If the code was being
> _used_, we'd see runtime regressions reported and their associated fixes.

I think you underestimate the girls(?) and guys doing tree-wide cleanups
and API changes.  Network driver regressions are pretty much limited to
actively developed and maintained drivers.

> A search on the internet for users tends to show that even the die hard
> enthusiasts who cared to poke at MCA/TR just for hobby sake have pretty
> much all given up somewhere in the 2003-2005 "pre-git" timeframe, and
> never really moved off their 2.4.x kernels.
>
> This is no surprise, since on x86, MCA (and hence most tokenring
> users) was limited to the lowly 386sx-16 PS/2 with typically 4MB RAM.
> Some "high end" 486 machines existed, and in theory could be fitted
> with max 64MB RAM (default 16MB).  I don't think anyone will debate
> that such hardware with such limited memory is ever going to be useful
> in a 3.x kernel use case.

Beware, I am considering sending you a triple lanstreamer PCI card  :-)

Seriously, there are both PCI and PCMCIA TokenRing cards, and nothing
prevents them from being used with modern x86 hardware.  The lanstreamer
driver is disabled for 64bit systems, but I still don't think removing
it is appropriate.  It will work in 32bit mode in any shiny new PC still
having PCI slots.  And the 3c359 should work in any laptop with a
Cardbus slot, if those still exist.  But I don't see anyone proposing
removing the PCMCIA/Cardbus support just yet....



Bjørn

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

end of thread, other threads:[~2012-05-16  9:30 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-16  0:35 [PATCH/RFC net-next 0/4] Delete token ring support Paul Gortmaker
2012-05-16  0:35 ` [PATCH net-next 1/4] s390: delete any traces of " Paul Gortmaker
2012-05-16  0:35 ` [PATCH net-next 2/4] atm: remove the coupling to " Paul Gortmaker
2012-05-16  0:35 ` [PATCH net-next 3/4] net: delete all instances of special processing for token ring Paul Gortmaker
2012-05-16  0:35 ` [PATCH net-next 4/4] tokenring: delete all remaining driver support Paul Gortmaker
2012-05-16  0:48 ` [PATCH/RFC net-next 0/4] Delete token ring support Andi Kleen
2012-05-16  1:00   ` David Miller
2012-05-16  1:38     ` Paul Gortmaker
2012-05-16  3:05     ` Paul Gortmaker
2012-05-16  5:04       ` David Miller
2012-05-16  7:43 ` Martin Schwidefsky
2012-05-16  9:29 ` Bjørn Mork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).