Skip to content

Commit 8540336

Browse files
SandyWinterkuba-moo
authored andcommitted
s390/lcs: Remove FDDI option
The last s390 machine that supported FDDI was z900 ('7th generation', released in 2000). The oldest machine generation currently supported by the Linux kernel is MARCH_Z10 (released 2008). If there is still a usecase for connecting a Linux on s390 instance to a LAN Channel Station (LCS), it can only do so via Ethernet. Randy Dunlap[1] found that LCS over FDDI has never worked, when FDDI was compiled as module. Instead of fixing that, remove the FDDI option from the lcs driver. While at it, make the CONFIG_LCS description a bit more helpful. References: [1] https://lore.kernel.org/netdev/20230621213742.8245-1-rdunlap@infradead.org/ Signed-off-by: Alexandra Winter <wintera@linux.ibm.com> Acked-by: Christian Borntraeger <borntraeger@linux.ibm.com> Reviewed-by: Randy Dunlap <rdunlap@infradead.org> Reviewed-by: Simon Horman <simon.horman@corigine.com> Link: https://lore.kernel.org/r/20230724131546.3597001-1-wintera@linux.ibm.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent f080864 commit 8540336

File tree

2 files changed

+8
-36
lines changed

2 files changed

+8
-36
lines changed

drivers/s390/net/Kconfig

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,11 @@ menu "S/390 network device drivers"
55
config LCS
66
def_tristate m
77
prompt "Lan Channel Station Interface"
8-
depends on CCW && NETDEVICES && (ETHERNET || FDDI)
8+
depends on CCW && NETDEVICES && ETHERNET
99
help
1010
Select this option if you want to use LCS networking on IBM System z.
11-
This device driver supports FDDI (IEEE 802.7) and Ethernet.
1211
To compile as a module, choose M. The module name is lcs.
13-
If you do not know what it is, it's safe to choose Y.
12+
If you do not use LCS, choose N.
1413

1514
config CTCM
1615
def_tristate m

drivers/s390/net/lcs.c

Lines changed: 6 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
#include <linux/if.h>
1818
#include <linux/netdevice.h>
1919
#include <linux/etherdevice.h>
20-
#include <linux/fddidevice.h>
2120
#include <linux/inetdevice.h>
2221
#include <linux/in.h>
2322
#include <linux/igmp.h>
@@ -36,10 +35,6 @@
3635
#include "lcs.h"
3736

3837

39-
#if !defined(CONFIG_ETHERNET) && !defined(CONFIG_FDDI)
40-
#error Cannot compile lcs.c without some net devices switched on.
41-
#endif
42-
4338
/*
4439
* initialization string for output
4540
*/
@@ -1601,19 +1596,11 @@ lcs_startlan_auto(struct lcs_card *card)
16011596
int rc;
16021597

16031598
LCS_DBF_TEXT(2, trace, "strtauto");
1604-
#ifdef CONFIG_ETHERNET
16051599
card->lan_type = LCS_FRAME_TYPE_ENET;
16061600
rc = lcs_send_startlan(card, LCS_INITIATOR_TCPIP);
16071601
if (rc == 0)
16081602
return 0;
16091603

1610-
#endif
1611-
#ifdef CONFIG_FDDI
1612-
card->lan_type = LCS_FRAME_TYPE_FDDI;
1613-
rc = lcs_send_startlan(card, LCS_INITIATOR_TCPIP);
1614-
if (rc == 0)
1615-
return 0;
1616-
#endif
16171604
return -EIO;
16181605
}
16191606

@@ -1806,22 +1793,16 @@ lcs_get_frames_cb(struct lcs_channel *channel, struct lcs_buffer *buffer)
18061793
card->stats.rx_errors++;
18071794
return;
18081795
}
1809-
/* What kind of frame is it? */
1810-
if (lcs_hdr->type == LCS_FRAME_TYPE_CONTROL) {
1811-
/* Control frame. */
1796+
if (lcs_hdr->type == LCS_FRAME_TYPE_CONTROL)
18121797
lcs_get_control(card, (struct lcs_cmd *) lcs_hdr);
1813-
} else if (lcs_hdr->type == LCS_FRAME_TYPE_ENET ||
1814-
lcs_hdr->type == LCS_FRAME_TYPE_TR ||
1815-
lcs_hdr->type == LCS_FRAME_TYPE_FDDI) {
1816-
/* Normal network packet. */
1798+
else if (lcs_hdr->type == LCS_FRAME_TYPE_ENET)
18171799
lcs_get_skb(card, (char *)(lcs_hdr + 1),
18181800
lcs_hdr->offset - offset -
18191801
sizeof(struct lcs_header));
1820-
} else {
1821-
/* Unknown frame type. */
1822-
; // FIXME: error message ?
1823-
}
1824-
/* Proceed to next frame. */
1802+
else
1803+
dev_info_once(&card->dev->dev,
1804+
"Unknown frame type %d\n",
1805+
lcs_hdr->type);
18251806
offset = lcs_hdr->offset;
18261807
lcs_hdr->offset = LCS_ILLEGAL_OFFSET;
18271808
lcs_hdr = (struct lcs_header *) (buffer->data + offset);
@@ -2140,18 +2121,10 @@ lcs_new_device(struct ccwgroup_device *ccwgdev)
21402121
goto netdev_out;
21412122
}
21422123
switch (card->lan_type) {
2143-
#ifdef CONFIG_ETHERNET
21442124
case LCS_FRAME_TYPE_ENET:
21452125
card->lan_type_trans = eth_type_trans;
21462126
dev = alloc_etherdev(0);
21472127
break;
2148-
#endif
2149-
#ifdef CONFIG_FDDI
2150-
case LCS_FRAME_TYPE_FDDI:
2151-
card->lan_type_trans = fddi_type_trans;
2152-
dev = alloc_fddidev(0);
2153-
break;
2154-
#endif
21552128
default:
21562129
LCS_DBF_TEXT(3, setup, "errinit");
21572130
pr_err(" Initialization failed\n");

0 commit comments

Comments
 (0)