Skip to content

Commit 0b992b8

Browse files
committed
Merge branch 's390-qeth-next'
Julian Wiedmann says: ==================== s390/qeth: updates 2020-03-27 please apply the following patch series for qeth to netdev's net-next tree. Spring clean edition: - remove one sysfs attribute that was never put in use, - make support for OSN and OSX devices optional, and - probe for removal of the obsolete OSN support. ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents 4bd27ee + fb64de1 commit 0b992b8

File tree

6 files changed

+37
-36
lines changed

6 files changed

+37
-36
lines changed

drivers/s390/net/Kconfig

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,23 @@ config QETH_L3
9191
To compile as a module choose M. The module name is qeth_l3.
9292
If unsure, choose Y.
9393

94+
config QETH_OSN
95+
def_bool !HAVE_MARCH_Z14_FEATURES
96+
prompt "qeth OSN device support"
97+
depends on QETH
98+
help
99+
This enables the qeth driver to support devices in OSN mode.
100+
This feature will be removed in 2021.
101+
If unsure, choose N.
102+
103+
config QETH_OSX
104+
def_bool !HAVE_MARCH_Z15_FEATURES
105+
prompt "qeth OSX device support"
106+
depends on QETH
107+
help
108+
This enables the qeth driver to support devices in OSX mode.
109+
If unsure, choose N.
110+
94111
config CCWGROUP
95112
tristate
96113
default (LCS || CTCM || QETH)

drivers/s390/net/qeth_core.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,6 @@ struct qeth_card_options {
710710
struct qeth_ipa_caps adp; /* Adapter parameters */
711711
struct qeth_sbp_info sbp; /* SETBRIDGEPORT options */
712712
struct qeth_vnicc_info vnicc; /* VNICC options */
713-
int fake_broadcast;
714713
enum qeth_discipline_id layer;
715714
enum qeth_ipa_isolation_modes isolation;
716715
enum qeth_ipa_isolation_modes prev_isolation;

drivers/s390/net/qeth_core_main.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4951,12 +4951,16 @@ static struct ccw_device_id qeth_ids[] = {
49514951
.driver_info = QETH_CARD_TYPE_OSD},
49524952
{CCW_DEVICE_DEVTYPE(0x1731, 0x05, 0x1732, 0x05),
49534953
.driver_info = QETH_CARD_TYPE_IQD},
4954+
#ifdef CONFIG_QETH_OSN
49544955
{CCW_DEVICE_DEVTYPE(0x1731, 0x06, 0x1732, 0x06),
49554956
.driver_info = QETH_CARD_TYPE_OSN},
4957+
#endif
49564958
{CCW_DEVICE_DEVTYPE(0x1731, 0x02, 0x1732, 0x03),
49574959
.driver_info = QETH_CARD_TYPE_OSM},
4960+
#ifdef CONFIG_QETH_OSX
49584961
{CCW_DEVICE_DEVTYPE(0x1731, 0x02, 0x1732, 0x02),
49594962
.driver_info = QETH_CARD_TYPE_OSX},
4963+
#endif
49604964
{},
49614965
};
49624966
MODULE_DEVICE_TABLE(ccw, qeth_ids);

drivers/s390/net/qeth_core_mpc.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,19 @@ enum qeth_card_types {
7474
#define IS_IQD(card) ((card)->info.type == QETH_CARD_TYPE_IQD)
7575
#define IS_OSD(card) ((card)->info.type == QETH_CARD_TYPE_OSD)
7676
#define IS_OSM(card) ((card)->info.type == QETH_CARD_TYPE_OSM)
77+
78+
#ifdef CONFIG_QETH_OSN
7779
#define IS_OSN(card) ((card)->info.type == QETH_CARD_TYPE_OSN)
80+
#else
81+
#define IS_OSN(card) false
82+
#endif
83+
84+
#ifdef CONFIG_QETH_OSX
7885
#define IS_OSX(card) ((card)->info.type == QETH_CARD_TYPE_OSX)
86+
#else
87+
#define IS_OSX(card) false
88+
#endif
89+
7990
#define IS_VM_NIC(card) ((card)->info.is_vm_nic)
8091

8192
#define QETH_MPC_DIFINFO_LEN_INDICATES_LINK_TYPE 0x18

drivers/s390/net/qeth_l2_main.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -587,6 +587,9 @@ static int qeth_l2_probe_device(struct ccwgroup_device *gdev)
587587
struct qeth_card *card = dev_get_drvdata(&gdev->dev);
588588
int rc;
589589

590+
if (IS_OSN(card))
591+
dev_notice(&gdev->dev, "OSN support will be dropped in 2021\n");
592+
590593
qeth_l2_vnicc_set_defaults(card);
591594
mutex_init(&card->sbp_lock);
592595

@@ -869,6 +872,7 @@ struct qeth_discipline qeth_l2_discipline = {
869872
};
870873
EXPORT_SYMBOL_GPL(qeth_l2_discipline);
871874

875+
#ifdef CONFIG_QETH_OSN
872876
static void qeth_osn_assist_cb(struct qeth_card *card,
873877
struct qeth_cmd_buffer *iob,
874878
unsigned int data_length)
@@ -945,6 +949,7 @@ void qeth_osn_deregister(struct net_device *dev)
945949
return;
946950
}
947951
EXPORT_SYMBOL(qeth_osn_deregister);
952+
#endif
948953

949954
/* SETBRIDGEPORT support, async notifications */
950955

drivers/s390/net/qeth_l3_sys.c

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -133,40 +133,6 @@ static ssize_t qeth_l3_dev_route6_store(struct device *dev,
133133
static DEVICE_ATTR(route6, 0644, qeth_l3_dev_route6_show,
134134
qeth_l3_dev_route6_store);
135135

136-
static ssize_t qeth_l3_dev_fake_broadcast_show(struct device *dev,
137-
struct device_attribute *attr, char *buf)
138-
{
139-
struct qeth_card *card = dev_get_drvdata(dev);
140-
141-
return sprintf(buf, "%i\n", card->options.fake_broadcast? 1:0);
142-
}
143-
144-
static ssize_t qeth_l3_dev_fake_broadcast_store(struct device *dev,
145-
struct device_attribute *attr, const char *buf, size_t count)
146-
{
147-
struct qeth_card *card = dev_get_drvdata(dev);
148-
char *tmp;
149-
int i, rc = 0;
150-
151-
mutex_lock(&card->conf_mutex);
152-
if (card->state != CARD_STATE_DOWN) {
153-
rc = -EPERM;
154-
goto out;
155-
}
156-
157-
i = simple_strtoul(buf, &tmp, 16);
158-
if ((i == 0) || (i == 1))
159-
card->options.fake_broadcast = i;
160-
else
161-
rc = -EINVAL;
162-
out:
163-
mutex_unlock(&card->conf_mutex);
164-
return rc ? rc : count;
165-
}
166-
167-
static DEVICE_ATTR(fake_broadcast, 0644, qeth_l3_dev_fake_broadcast_show,
168-
qeth_l3_dev_fake_broadcast_store);
169-
170136
static ssize_t qeth_l3_dev_sniffer_show(struct device *dev,
171137
struct device_attribute *attr, char *buf)
172138
{
@@ -305,7 +271,6 @@ static DEVICE_ATTR(hsuid, 0644, qeth_l3_dev_hsuid_show,
305271
static struct attribute *qeth_l3_device_attrs[] = {
306272
&dev_attr_route4.attr,
307273
&dev_attr_route6.attr,
308-
&dev_attr_fake_broadcast.attr,
309274
&dev_attr_sniffer.attr,
310275
&dev_attr_hsuid.attr,
311276
NULL,

0 commit comments

Comments
 (0)