diff options
author | Frank Blaschka <frank.blaschka@de.ibm.com> | 2012-05-15 21:28:25 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-05-16 15:32:50 -0400 |
commit | a8f40f7c8e52114550e6fa161d925bd6eca69e19 (patch) | |
tree | dc0b1bfbdebc28b623316d4ff3269ee7b2a522a8 /drivers/s390 | |
parent | 1b23a5dfc20469d4a4bb8a552dd224ac693c407c (diff) |
qeth: remove token ring part 2
Commit 1abd2296b4a1ee7b6a883541c3ede52042a09521 starts removing
token ring from qeth_l3. This patch removes the rest of token
ring related code from the driver.
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/net/qeth_core.h | 2 | ||||
-rw-r--r-- | drivers/s390/net/qeth_core_main.c | 2 | ||||
-rw-r--r-- | drivers/s390/net/qeth_core_mpc.h | 10 | ||||
-rw-r--r-- | drivers/s390/net/qeth_l3_main.c | 55 | ||||
-rw-r--r-- | drivers/s390/net/qeth_l3_sys.c | 112 |
5 files changed, 0 insertions, 181 deletions
diff --git a/drivers/s390/net/qeth_core.h b/drivers/s390/net/qeth_core.h index bb7190fdfbbe..40285dc9ae5c 100644 --- a/drivers/s390/net/qeth_core.h +++ b/drivers/s390/net/qeth_core.h | |||
@@ -674,8 +674,6 @@ struct qeth_card_options { | |||
674 | struct qeth_ipa_info adp; /*Adapter parameters*/ | 674 | struct qeth_ipa_info adp; /*Adapter parameters*/ |
675 | struct qeth_routing_info route6; | 675 | struct qeth_routing_info route6; |
676 | struct qeth_ipa_info ipa6; | 676 | struct qeth_ipa_info ipa6; |
677 | int broadcast_mode; | ||
678 | int macaddr_mode; | ||
679 | int fake_broadcast; | 677 | int fake_broadcast; |
680 | int add_hhlen; | 678 | int add_hhlen; |
681 | int layer2; | 679 | int layer2; |
diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c index 83b0d2feac09..e000001539bf 100644 --- a/drivers/s390/net/qeth_core_main.c +++ b/drivers/s390/net/qeth_core_main.c | |||
@@ -1329,8 +1329,6 @@ static void qeth_set_intial_options(struct qeth_card *card) | |||
1329 | { | 1329 | { |
1330 | card->options.route4.type = NO_ROUTER; | 1330 | card->options.route4.type = NO_ROUTER; |
1331 | card->options.route6.type = NO_ROUTER; | 1331 | card->options.route6.type = NO_ROUTER; |
1332 | card->options.broadcast_mode = QETH_TR_BROADCAST_ALLRINGS; | ||
1333 | card->options.macaddr_mode = QETH_TR_MACADDR_NONCANONICAL; | ||
1334 | card->options.fake_broadcast = 0; | 1332 | card->options.fake_broadcast = 0; |
1335 | card->options.add_hhlen = DEFAULT_ADD_HHLEN; | 1333 | card->options.add_hhlen = DEFAULT_ADD_HHLEN; |
1336 | card->options.performance_stats = 0; | 1334 | card->options.performance_stats = 0; |
diff --git a/drivers/s390/net/qeth_core_mpc.h b/drivers/s390/net/qeth_core_mpc.h index ff41e42004ac..a11b30c38423 100644 --- a/drivers/s390/net/qeth_core_mpc.h +++ b/drivers/s390/net/qeth_core_mpc.h | |||
@@ -70,16 +70,6 @@ enum qeth_link_types { | |||
70 | QETH_LINK_TYPE_ATM_NATIVE = 0x90, | 70 | QETH_LINK_TYPE_ATM_NATIVE = 0x90, |
71 | }; | 71 | }; |
72 | 72 | ||
73 | enum qeth_tr_macaddr_modes { | ||
74 | QETH_TR_MACADDR_NONCANONICAL = 0, | ||
75 | QETH_TR_MACADDR_CANONICAL = 1, | ||
76 | }; | ||
77 | |||
78 | enum qeth_tr_broadcast_modes { | ||
79 | QETH_TR_BROADCAST_ALLRINGS = 0, | ||
80 | QETH_TR_BROADCAST_LOCAL = 1, | ||
81 | }; | ||
82 | |||
83 | /* | 73 | /* |
84 | * Routing stuff | 74 | * Routing stuff |
85 | */ | 75 | */ |
diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c index 74ebeaf597a1..023657dfa84e 100644 --- a/drivers/s390/net/qeth_l3_main.c +++ b/drivers/s390/net/qeth_l3_main.c | |||
@@ -976,57 +976,6 @@ static inline u8 qeth_l3_get_qeth_hdr_flags6(int cast_type) | |||
976 | return ct | QETH_CAST_UNICAST; | 976 | return ct | QETH_CAST_UNICAST; |
977 | } | 977 | } |
978 | 978 | ||
979 | static int qeth_l3_send_setadp_mode(struct qeth_card *card, __u32 command, | ||
980 | __u32 mode) | ||
981 | { | ||
982 | int rc; | ||
983 | struct qeth_cmd_buffer *iob; | ||
984 | struct qeth_ipa_cmd *cmd; | ||
985 | |||
986 | QETH_CARD_TEXT(card, 4, "adpmode"); | ||
987 | |||
988 | iob = qeth_get_adapter_cmd(card, command, | ||
989 | sizeof(struct qeth_ipacmd_setadpparms)); | ||
990 | cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE); | ||
991 | cmd->data.setadapterparms.data.mode = mode; | ||
992 | rc = qeth_send_ipa_cmd(card, iob, qeth_default_setadapterparms_cb, | ||
993 | NULL); | ||
994 | return rc; | ||
995 | } | ||
996 | |||
997 | static int qeth_l3_setadapter_hstr(struct qeth_card *card) | ||
998 | { | ||
999 | int rc; | ||
1000 | |||
1001 | QETH_CARD_TEXT(card, 4, "adphstr"); | ||
1002 | |||
1003 | if (qeth_adp_supported(card, IPA_SETADP_SET_BROADCAST_MODE)) { | ||
1004 | rc = qeth_l3_send_setadp_mode(card, | ||
1005 | IPA_SETADP_SET_BROADCAST_MODE, | ||
1006 | card->options.broadcast_mode); | ||
1007 | if (rc) | ||
1008 | QETH_DBF_MESSAGE(2, "couldn't set broadcast mode on " | ||
1009 | "device %s: x%x\n", | ||
1010 | CARD_BUS_ID(card), rc); | ||
1011 | rc = qeth_l3_send_setadp_mode(card, | ||
1012 | IPA_SETADP_ALTER_MAC_ADDRESS, | ||
1013 | card->options.macaddr_mode); | ||
1014 | if (rc) | ||
1015 | QETH_DBF_MESSAGE(2, "couldn't set macaddr mode on " | ||
1016 | "device %s: x%x\n", CARD_BUS_ID(card), rc); | ||
1017 | return rc; | ||
1018 | } | ||
1019 | if (card->options.broadcast_mode == QETH_TR_BROADCAST_LOCAL) | ||
1020 | QETH_DBF_MESSAGE(2, "set adapter parameters not available " | ||
1021 | "to set broadcast mode, using ALLRINGS " | ||
1022 | "on device %s:\n", CARD_BUS_ID(card)); | ||
1023 | if (card->options.macaddr_mode == QETH_TR_MACADDR_CANONICAL) | ||
1024 | QETH_DBF_MESSAGE(2, "set adapter parameters not available " | ||
1025 | "to set macaddr mode, using NONCANONICAL " | ||
1026 | "on device %s:\n", CARD_BUS_ID(card)); | ||
1027 | return 0; | ||
1028 | } | ||
1029 | |||
1030 | static int qeth_l3_setadapter_parms(struct qeth_card *card) | 979 | static int qeth_l3_setadapter_parms(struct qeth_card *card) |
1031 | { | 980 | { |
1032 | int rc; | 981 | int rc; |
@@ -1052,10 +1001,6 @@ static int qeth_l3_setadapter_parms(struct qeth_card *card) | |||
1052 | " address failed\n"); | 1001 | " address failed\n"); |
1053 | } | 1002 | } |
1054 | 1003 | ||
1055 | if ((card->info.link_type == QETH_LINK_TYPE_HSTR) || | ||
1056 | (card->info.link_type == QETH_LINK_TYPE_LANE_TR)) | ||
1057 | rc = qeth_l3_setadapter_hstr(card); | ||
1058 | |||
1059 | return rc; | 1004 | return rc; |
1060 | } | 1005 | } |
1061 | 1006 | ||
diff --git a/drivers/s390/net/qeth_l3_sys.c b/drivers/s390/net/qeth_l3_sys.c index d979bb26522f..4cafedf950ad 100644 --- a/drivers/s390/net/qeth_l3_sys.c +++ b/drivers/s390/net/qeth_l3_sys.c | |||
@@ -175,116 +175,6 @@ out: | |||
175 | static DEVICE_ATTR(fake_broadcast, 0644, qeth_l3_dev_fake_broadcast_show, | 175 | static DEVICE_ATTR(fake_broadcast, 0644, qeth_l3_dev_fake_broadcast_show, |
176 | qeth_l3_dev_fake_broadcast_store); | 176 | qeth_l3_dev_fake_broadcast_store); |
177 | 177 | ||
178 | static ssize_t qeth_l3_dev_broadcast_mode_show(struct device *dev, | ||
179 | struct device_attribute *attr, char *buf) | ||
180 | { | ||
181 | struct qeth_card *card = dev_get_drvdata(dev); | ||
182 | |||
183 | if (!card) | ||
184 | return -EINVAL; | ||
185 | |||
186 | if (!((card->info.link_type == QETH_LINK_TYPE_HSTR) || | ||
187 | (card->info.link_type == QETH_LINK_TYPE_LANE_TR))) | ||
188 | return sprintf(buf, "n/a\n"); | ||
189 | |||
190 | return sprintf(buf, "%s\n", (card->options.broadcast_mode == | ||
191 | QETH_TR_BROADCAST_ALLRINGS)? | ||
192 | "all rings":"local"); | ||
193 | } | ||
194 | |||
195 | static ssize_t qeth_l3_dev_broadcast_mode_store(struct device *dev, | ||
196 | struct device_attribute *attr, const char *buf, size_t count) | ||
197 | { | ||
198 | struct qeth_card *card = dev_get_drvdata(dev); | ||
199 | char *tmp; | ||
200 | int rc = 0; | ||
201 | |||
202 | if (!card) | ||
203 | return -EINVAL; | ||
204 | |||
205 | mutex_lock(&card->conf_mutex); | ||
206 | if ((card->state != CARD_STATE_DOWN) && | ||
207 | (card->state != CARD_STATE_RECOVER)) { | ||
208 | rc = -EPERM; | ||
209 | goto out; | ||
210 | } | ||
211 | |||
212 | if (!((card->info.link_type == QETH_LINK_TYPE_HSTR) || | ||
213 | (card->info.link_type == QETH_LINK_TYPE_LANE_TR))) { | ||
214 | rc = -EINVAL; | ||
215 | goto out; | ||
216 | } | ||
217 | |||
218 | tmp = strsep((char **) &buf, "\n"); | ||
219 | |||
220 | if (!strcmp(tmp, "local")) | ||
221 | card->options.broadcast_mode = QETH_TR_BROADCAST_LOCAL; | ||
222 | else if (!strcmp(tmp, "all_rings")) | ||
223 | card->options.broadcast_mode = QETH_TR_BROADCAST_ALLRINGS; | ||
224 | else | ||
225 | rc = -EINVAL; | ||
226 | out: | ||
227 | mutex_unlock(&card->conf_mutex); | ||
228 | return rc ? rc : count; | ||
229 | } | ||
230 | |||
231 | static DEVICE_ATTR(broadcast_mode, 0644, qeth_l3_dev_broadcast_mode_show, | ||
232 | qeth_l3_dev_broadcast_mode_store); | ||
233 | |||
234 | static ssize_t qeth_l3_dev_canonical_macaddr_show(struct device *dev, | ||
235 | struct device_attribute *attr, char *buf) | ||
236 | { | ||
237 | struct qeth_card *card = dev_get_drvdata(dev); | ||
238 | |||
239 | if (!card) | ||
240 | return -EINVAL; | ||
241 | |||
242 | if (!((card->info.link_type == QETH_LINK_TYPE_HSTR) || | ||
243 | (card->info.link_type == QETH_LINK_TYPE_LANE_TR))) | ||
244 | return sprintf(buf, "n/a\n"); | ||
245 | |||
246 | return sprintf(buf, "%i\n", (card->options.macaddr_mode == | ||
247 | QETH_TR_MACADDR_CANONICAL)? 1:0); | ||
248 | } | ||
249 | |||
250 | static ssize_t qeth_l3_dev_canonical_macaddr_store(struct device *dev, | ||
251 | struct device_attribute *attr, const char *buf, size_t count) | ||
252 | { | ||
253 | struct qeth_card *card = dev_get_drvdata(dev); | ||
254 | char *tmp; | ||
255 | int i, rc = 0; | ||
256 | |||
257 | if (!card) | ||
258 | return -EINVAL; | ||
259 | |||
260 | mutex_lock(&card->conf_mutex); | ||
261 | if ((card->state != CARD_STATE_DOWN) && | ||
262 | (card->state != CARD_STATE_RECOVER)) { | ||
263 | rc = -EPERM; | ||
264 | goto out; | ||
265 | } | ||
266 | |||
267 | if (!((card->info.link_type == QETH_LINK_TYPE_HSTR) || | ||
268 | (card->info.link_type == QETH_LINK_TYPE_LANE_TR))) { | ||
269 | rc = -EINVAL; | ||
270 | goto out; | ||
271 | } | ||
272 | |||
273 | i = simple_strtoul(buf, &tmp, 16); | ||
274 | if ((i == 0) || (i == 1)) | ||
275 | card->options.macaddr_mode = i? | ||
276 | QETH_TR_MACADDR_CANONICAL : | ||
277 | QETH_TR_MACADDR_NONCANONICAL; | ||
278 | else | ||
279 | rc = -EINVAL; | ||
280 | out: | ||
281 | mutex_unlock(&card->conf_mutex); | ||
282 | return rc ? rc : count; | ||
283 | } | ||
284 | |||
285 | static DEVICE_ATTR(canonical_macaddr, 0644, qeth_l3_dev_canonical_macaddr_show, | ||
286 | qeth_l3_dev_canonical_macaddr_store); | ||
287 | |||
288 | static ssize_t qeth_l3_dev_sniffer_show(struct device *dev, | 178 | static ssize_t qeth_l3_dev_sniffer_show(struct device *dev, |
289 | struct device_attribute *attr, char *buf) | 179 | struct device_attribute *attr, char *buf) |
290 | { | 180 | { |
@@ -458,8 +348,6 @@ static struct attribute *qeth_l3_device_attrs[] = { | |||
458 | &dev_attr_route4.attr, | 348 | &dev_attr_route4.attr, |
459 | &dev_attr_route6.attr, | 349 | &dev_attr_route6.attr, |
460 | &dev_attr_fake_broadcast.attr, | 350 | &dev_attr_fake_broadcast.attr, |
461 | &dev_attr_broadcast_mode.attr, | ||
462 | &dev_attr_canonical_macaddr.attr, | ||
463 | &dev_attr_sniffer.attr, | 351 | &dev_attr_sniffer.attr, |
464 | &dev_attr_hsuid.attr, | 352 | &dev_attr_hsuid.attr, |
465 | NULL, | 353 | NULL, |