diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-04 14:47:58 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-04 14:47:58 -0400 |
commit | 6ba74014c1ab0e37af7de6f64b4eccbbae3cb9e7 (patch) | |
tree | 8f3892fc44f1e403675a6d7e88fda5c70e56ee4c /drivers/s390 | |
parent | 5abd9ccced7a726c817dd6b5b96bc933859138d1 (diff) | |
parent | 3ff1c25927e3af61c6bf0e4ed959504058ae4565 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1443 commits)
phy/marvell: add 88ec048 support
igb: Program MDICNFG register prior to PHY init
e1000e: correct MAC-PHY interconnect register offset for 82579
hso: Add new product ID
can: Add driver for esd CAN-USB/2 device
l2tp: fix export of header file for userspace
can-raw: Fix skb_orphan_try handling
Revert "net: remove zap_completion_queue"
net: cleanup inclusion
phy/marvell: add 88e1121 interface mode support
u32: negative offset fix
net: Fix a typo from "dev" to "ndev"
igb: Use irq_synchronize per vector when using MSI-X
ixgbevf: fix null pointer dereference due to filter being set for VLAN 0
e1000e: Fix irq_synchronize in MSI-X case
e1000e: register pm_qos request on hardware activation
ip_fragment: fix subtracting PPPOE_SES_HLEN from mtu twice
net: Add getsockopt support for TCP thin-streams
cxgb4: update driver version
cxgb4: add new PCI IDs
...
Manually fix up conflicts in:
- drivers/net/e1000e/netdev.c: due to pm_qos registration
infrastructure changes
- drivers/net/phy/marvell.c: conflict between adding 88ec048 support
and cleaning up the IDs
- drivers/net/wireless/ipw2x00/ipw2100.c: trivial ipw2100_pm_qos_req
conflict (registration change vs marking it static)
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/net/claw.c | 2 | ||||
-rw-r--r-- | drivers/s390/net/qeth_core.h | 27 | ||||
-rw-r--r-- | drivers/s390/net/qeth_core_main.c | 423 | ||||
-rw-r--r-- | drivers/s390/net/qeth_core_mpc.h | 5 | ||||
-rw-r--r-- | drivers/s390/net/qeth_core_sys.c | 5 | ||||
-rw-r--r-- | drivers/s390/net/qeth_l2_main.c | 108 | ||||
-rw-r--r-- | drivers/s390/net/qeth_l3.h | 1 | ||||
-rw-r--r-- | drivers/s390/net/qeth_l3_main.c | 262 | ||||
-rw-r--r-- | drivers/s390/net/qeth_l3_sys.c | 14 | ||||
-rw-r--r-- | drivers/s390/net/smsgiucv.c | 11 |
10 files changed, 446 insertions, 412 deletions
diff --git a/drivers/s390/net/claw.c b/drivers/s390/net/claw.c index 147bb1a69aba..a75ed3083a6a 100644 --- a/drivers/s390/net/claw.c +++ b/drivers/s390/net/claw.c | |||
@@ -295,7 +295,7 @@ claw_driver_group_store(struct device_driver *ddrv, const char *buf, | |||
295 | int err; | 295 | int err; |
296 | err = ccwgroup_create_from_string(claw_root_dev, | 296 | err = ccwgroup_create_from_string(claw_root_dev, |
297 | claw_group_driver.driver_id, | 297 | claw_group_driver.driver_id, |
298 | &claw_ccw_driver, 3, buf); | 298 | &claw_ccw_driver, 2, buf); |
299 | return err ? err : count; | 299 | return err ? err : count; |
300 | } | 300 | } |
301 | 301 | ||
diff --git a/drivers/s390/net/qeth_core.h b/drivers/s390/net/qeth_core.h index 7a44c38aaf65..d1257768be90 100644 --- a/drivers/s390/net/qeth_core.h +++ b/drivers/s390/net/qeth_core.h | |||
@@ -40,11 +40,7 @@ | |||
40 | */ | 40 | */ |
41 | enum qeth_dbf_names { | 41 | enum qeth_dbf_names { |
42 | QETH_DBF_SETUP, | 42 | QETH_DBF_SETUP, |
43 | QETH_DBF_QERR, | ||
44 | QETH_DBF_TRACE, | ||
45 | QETH_DBF_MSG, | 43 | QETH_DBF_MSG, |
46 | QETH_DBF_SENSE, | ||
47 | QETH_DBF_MISC, | ||
48 | QETH_DBF_CTRL, | 44 | QETH_DBF_CTRL, |
49 | QETH_DBF_INFOS /* must be last element */ | 45 | QETH_DBF_INFOS /* must be last element */ |
50 | }; | 46 | }; |
@@ -71,7 +67,19 @@ struct qeth_dbf_info { | |||
71 | debug_sprintf_event(qeth_dbf[QETH_DBF_MSG].id, level, text) | 67 | debug_sprintf_event(qeth_dbf[QETH_DBF_MSG].id, level, text) |
72 | 68 | ||
73 | #define QETH_DBF_TEXT_(name, level, text...) \ | 69 | #define QETH_DBF_TEXT_(name, level, text...) \ |
74 | qeth_dbf_longtext(QETH_DBF_##name, level, text) | 70 | qeth_dbf_longtext(qeth_dbf[QETH_DBF_##name].id, level, text) |
71 | |||
72 | #define QETH_CARD_TEXT(card, level, text) \ | ||
73 | debug_text_event(card->debug, level, text) | ||
74 | |||
75 | #define QETH_CARD_HEX(card, level, addr, len) \ | ||
76 | debug_event(card->debug, level, (void *)(addr), len) | ||
77 | |||
78 | #define QETH_CARD_MESSAGE(card, text...) \ | ||
79 | debug_sprintf_event(card->debug, level, text) | ||
80 | |||
81 | #define QETH_CARD_TEXT_(card, level, text...) \ | ||
82 | qeth_dbf_longtext(card->debug, level, text) | ||
75 | 83 | ||
76 | #define SENSE_COMMAND_REJECT_BYTE 0 | 84 | #define SENSE_COMMAND_REJECT_BYTE 0 |
77 | #define SENSE_COMMAND_REJECT_FLAG 0x80 | 85 | #define SENSE_COMMAND_REJECT_FLAG 0x80 |
@@ -180,8 +188,7 @@ static inline int qeth_is_ipa_enabled(struct qeth_ipa_info *ipa, | |||
180 | qeth_is_enabled6(c, f) : qeth_is_enabled(c, f)) | 188 | qeth_is_enabled6(c, f) : qeth_is_enabled(c, f)) |
181 | 189 | ||
182 | #define QETH_IDX_FUNC_LEVEL_OSD 0x0101 | 190 | #define QETH_IDX_FUNC_LEVEL_OSD 0x0101 |
183 | #define QETH_IDX_FUNC_LEVEL_IQD_ENA_IPAT 0x4108 | 191 | #define QETH_IDX_FUNC_LEVEL_IQD 0x4108 |
184 | #define QETH_IDX_FUNC_LEVEL_IQD_DIS_IPAT 0x5108 | ||
185 | 192 | ||
186 | #define QETH_MODELLIST_ARRAY \ | 193 | #define QETH_MODELLIST_ARRAY \ |
187 | {{0x1731, 0x01, 0x1732, QETH_CARD_TYPE_OSD, QETH_MAX_QUEUES, 0}, \ | 194 | {{0x1731, 0x01, 0x1732, QETH_CARD_TYPE_OSD, QETH_MAX_QUEUES, 0}, \ |
@@ -733,12 +740,15 @@ struct qeth_card { | |||
733 | struct qeth_qdio_info qdio; | 740 | struct qeth_qdio_info qdio; |
734 | struct qeth_perf_stats perf_stats; | 741 | struct qeth_perf_stats perf_stats; |
735 | int use_hard_stop; | 742 | int use_hard_stop; |
743 | int read_or_write_problem; | ||
736 | struct qeth_osn_info osn_info; | 744 | struct qeth_osn_info osn_info; |
737 | struct qeth_discipline discipline; | 745 | struct qeth_discipline discipline; |
738 | atomic_t force_alloc_skb; | 746 | atomic_t force_alloc_skb; |
739 | struct service_level qeth_service_level; | 747 | struct service_level qeth_service_level; |
740 | struct qdio_ssqd_desc ssqd; | 748 | struct qdio_ssqd_desc ssqd; |
749 | debug_info_t *debug; | ||
741 | struct mutex conf_mutex; | 750 | struct mutex conf_mutex; |
751 | struct mutex discipline_mutex; | ||
742 | }; | 752 | }; |
743 | 753 | ||
744 | struct qeth_card_list_struct { | 754 | struct qeth_card_list_struct { |
@@ -857,9 +867,10 @@ void qeth_core_get_ethtool_stats(struct net_device *, | |||
857 | struct ethtool_stats *, u64 *); | 867 | struct ethtool_stats *, u64 *); |
858 | void qeth_core_get_strings(struct net_device *, u32, u8 *); | 868 | void qeth_core_get_strings(struct net_device *, u32, u8 *); |
859 | void qeth_core_get_drvinfo(struct net_device *, struct ethtool_drvinfo *); | 869 | void qeth_core_get_drvinfo(struct net_device *, struct ethtool_drvinfo *); |
860 | void qeth_dbf_longtext(enum qeth_dbf_names dbf_nix, int level, char *text, ...); | 870 | void qeth_dbf_longtext(debug_info_t *id, int level, char *text, ...); |
861 | int qeth_core_ethtool_get_settings(struct net_device *, struct ethtool_cmd *); | 871 | int qeth_core_ethtool_get_settings(struct net_device *, struct ethtool_cmd *); |
862 | int qeth_set_access_ctrl_online(struct qeth_card *card); | 872 | int qeth_set_access_ctrl_online(struct qeth_card *card); |
873 | int qeth_hdr_chk_and_bounce(struct sk_buff *, int); | ||
863 | 874 | ||
864 | /* exports for OSN */ | 875 | /* exports for OSN */ |
865 | int qeth_osn_assist(struct net_device *, void *, int); | 876 | int qeth_osn_assist(struct net_device *, void *, int); |
diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c index 13ef46b9d388..3a5a18a0fc28 100644 --- a/drivers/s390/net/qeth_core_main.c +++ b/drivers/s390/net/qeth_core_main.c | |||
@@ -32,16 +32,8 @@ struct qeth_dbf_info qeth_dbf[QETH_DBF_INFOS] = { | |||
32 | /* N P A M L V H */ | 32 | /* N P A M L V H */ |
33 | [QETH_DBF_SETUP] = {"qeth_setup", | 33 | [QETH_DBF_SETUP] = {"qeth_setup", |
34 | 8, 1, 8, 5, &debug_hex_ascii_view, NULL}, | 34 | 8, 1, 8, 5, &debug_hex_ascii_view, NULL}, |
35 | [QETH_DBF_QERR] = {"qeth_qerr", | ||
36 | 2, 1, 8, 2, &debug_hex_ascii_view, NULL}, | ||
37 | [QETH_DBF_TRACE] = {"qeth_trace", | ||
38 | 4, 1, 8, 3, &debug_hex_ascii_view, NULL}, | ||
39 | [QETH_DBF_MSG] = {"qeth_msg", | 35 | [QETH_DBF_MSG] = {"qeth_msg", |
40 | 8, 1, 128, 3, &debug_sprintf_view, NULL}, | 36 | 8, 1, 128, 3, &debug_sprintf_view, NULL}, |
41 | [QETH_DBF_SENSE] = {"qeth_sense", | ||
42 | 2, 1, 64, 2, &debug_hex_ascii_view, NULL}, | ||
43 | [QETH_DBF_MISC] = {"qeth_misc", | ||
44 | 2, 1, 256, 2, &debug_hex_ascii_view, NULL}, | ||
45 | [QETH_DBF_CTRL] = {"qeth_control", | 37 | [QETH_DBF_CTRL] = {"qeth_control", |
46 | 8, 1, QETH_DBF_CTRL_LEN, 5, &debug_hex_ascii_view, NULL}, | 38 | 8, 1, QETH_DBF_CTRL_LEN, 5, &debug_hex_ascii_view, NULL}, |
47 | }; | 39 | }; |
@@ -65,48 +57,6 @@ static void qeth_free_buffer_pool(struct qeth_card *); | |||
65 | static int qeth_qdio_establish(struct qeth_card *); | 57 | static int qeth_qdio_establish(struct qeth_card *); |
66 | 58 | ||
67 | 59 | ||
68 | static inline void __qeth_fill_buffer_frag(struct sk_buff *skb, | ||
69 | struct qdio_buffer *buffer, int is_tso, | ||
70 | int *next_element_to_fill) | ||
71 | { | ||
72 | struct skb_frag_struct *frag; | ||
73 | int fragno; | ||
74 | unsigned long addr; | ||
75 | int element, cnt, dlen; | ||
76 | |||
77 | fragno = skb_shinfo(skb)->nr_frags; | ||
78 | element = *next_element_to_fill; | ||
79 | dlen = 0; | ||
80 | |||
81 | if (is_tso) | ||
82 | buffer->element[element].flags = | ||
83 | SBAL_FLAGS_MIDDLE_FRAG; | ||
84 | else | ||
85 | buffer->element[element].flags = | ||
86 | SBAL_FLAGS_FIRST_FRAG; | ||
87 | dlen = skb->len - skb->data_len; | ||
88 | if (dlen) { | ||
89 | buffer->element[element].addr = skb->data; | ||
90 | buffer->element[element].length = dlen; | ||
91 | element++; | ||
92 | } | ||
93 | for (cnt = 0; cnt < fragno; cnt++) { | ||
94 | frag = &skb_shinfo(skb)->frags[cnt]; | ||
95 | addr = (page_to_pfn(frag->page) << PAGE_SHIFT) + | ||
96 | frag->page_offset; | ||
97 | buffer->element[element].addr = (char *)addr; | ||
98 | buffer->element[element].length = frag->size; | ||
99 | if (cnt < (fragno - 1)) | ||
100 | buffer->element[element].flags = | ||
101 | SBAL_FLAGS_MIDDLE_FRAG; | ||
102 | else | ||
103 | buffer->element[element].flags = | ||
104 | SBAL_FLAGS_LAST_FRAG; | ||
105 | element++; | ||
106 | } | ||
107 | *next_element_to_fill = element; | ||
108 | } | ||
109 | |||
110 | static inline const char *qeth_get_cardname(struct qeth_card *card) | 60 | static inline const char *qeth_get_cardname(struct qeth_card *card) |
111 | { | 61 | { |
112 | if (card->info.guestlan) { | 62 | if (card->info.guestlan) { |
@@ -232,7 +182,7 @@ void qeth_clear_working_pool_list(struct qeth_card *card) | |||
232 | { | 182 | { |
233 | struct qeth_buffer_pool_entry *pool_entry, *tmp; | 183 | struct qeth_buffer_pool_entry *pool_entry, *tmp; |
234 | 184 | ||
235 | QETH_DBF_TEXT(TRACE, 5, "clwrklst"); | 185 | QETH_CARD_TEXT(card, 5, "clwrklst"); |
236 | list_for_each_entry_safe(pool_entry, tmp, | 186 | list_for_each_entry_safe(pool_entry, tmp, |
237 | &card->qdio.in_buf_pool.entry_list, list){ | 187 | &card->qdio.in_buf_pool.entry_list, list){ |
238 | list_del(&pool_entry->list); | 188 | list_del(&pool_entry->list); |
@@ -246,7 +196,7 @@ static int qeth_alloc_buffer_pool(struct qeth_card *card) | |||
246 | void *ptr; | 196 | void *ptr; |
247 | int i, j; | 197 | int i, j; |
248 | 198 | ||
249 | QETH_DBF_TEXT(TRACE, 5, "alocpool"); | 199 | QETH_CARD_TEXT(card, 5, "alocpool"); |
250 | for (i = 0; i < card->qdio.init_pool.buf_count; ++i) { | 200 | for (i = 0; i < card->qdio.init_pool.buf_count; ++i) { |
251 | pool_entry = kmalloc(sizeof(*pool_entry), GFP_KERNEL); | 201 | pool_entry = kmalloc(sizeof(*pool_entry), GFP_KERNEL); |
252 | if (!pool_entry) { | 202 | if (!pool_entry) { |
@@ -273,7 +223,7 @@ static int qeth_alloc_buffer_pool(struct qeth_card *card) | |||
273 | 223 | ||
274 | int qeth_realloc_buffer_pool(struct qeth_card *card, int bufcnt) | 224 | int qeth_realloc_buffer_pool(struct qeth_card *card, int bufcnt) |
275 | { | 225 | { |
276 | QETH_DBF_TEXT(TRACE, 2, "realcbp"); | 226 | QETH_CARD_TEXT(card, 2, "realcbp"); |
277 | 227 | ||
278 | if ((card->state != CARD_STATE_DOWN) && | 228 | if ((card->state != CARD_STATE_DOWN) && |
279 | (card->state != CARD_STATE_RECOVER)) | 229 | (card->state != CARD_STATE_RECOVER)) |
@@ -293,7 +243,7 @@ static int qeth_issue_next_read(struct qeth_card *card) | |||
293 | int rc; | 243 | int rc; |
294 | struct qeth_cmd_buffer *iob; | 244 | struct qeth_cmd_buffer *iob; |
295 | 245 | ||
296 | QETH_DBF_TEXT(TRACE, 5, "issnxrd"); | 246 | QETH_CARD_TEXT(card, 5, "issnxrd"); |
297 | if (card->read.state != CH_STATE_UP) | 247 | if (card->read.state != CH_STATE_UP) |
298 | return -EIO; | 248 | return -EIO; |
299 | iob = qeth_get_buffer(&card->read); | 249 | iob = qeth_get_buffer(&card->read); |
@@ -305,13 +255,14 @@ static int qeth_issue_next_read(struct qeth_card *card) | |||
305 | return -ENOMEM; | 255 | return -ENOMEM; |
306 | } | 256 | } |
307 | qeth_setup_ccw(&card->read, iob->data, QETH_BUFSIZE); | 257 | qeth_setup_ccw(&card->read, iob->data, QETH_BUFSIZE); |
308 | QETH_DBF_TEXT(TRACE, 6, "noirqpnd"); | 258 | QETH_CARD_TEXT(card, 6, "noirqpnd"); |
309 | rc = ccw_device_start(card->read.ccwdev, &card->read.ccw, | 259 | rc = ccw_device_start(card->read.ccwdev, &card->read.ccw, |
310 | (addr_t) iob, 0, 0); | 260 | (addr_t) iob, 0, 0); |
311 | if (rc) { | 261 | if (rc) { |
312 | QETH_DBF_MESSAGE(2, "%s error in starting next read ccw! " | 262 | QETH_DBF_MESSAGE(2, "%s error in starting next read ccw! " |
313 | "rc=%i\n", dev_name(&card->gdev->dev), rc); | 263 | "rc=%i\n", dev_name(&card->gdev->dev), rc); |
314 | atomic_set(&card->read.irq_pending, 0); | 264 | atomic_set(&card->read.irq_pending, 0); |
265 | card->read_or_write_problem = 1; | ||
315 | qeth_schedule_recovery(card); | 266 | qeth_schedule_recovery(card); |
316 | wake_up(&card->wait_q); | 267 | wake_up(&card->wait_q); |
317 | } | 268 | } |
@@ -364,7 +315,7 @@ static struct qeth_ipa_cmd *qeth_check_ipa_data(struct qeth_card *card, | |||
364 | { | 315 | { |
365 | struct qeth_ipa_cmd *cmd = NULL; | 316 | struct qeth_ipa_cmd *cmd = NULL; |
366 | 317 | ||
367 | QETH_DBF_TEXT(TRACE, 5, "chkipad"); | 318 | QETH_CARD_TEXT(card, 5, "chkipad"); |
368 | if (IS_IPA(iob->data)) { | 319 | if (IS_IPA(iob->data)) { |
369 | cmd = (struct qeth_ipa_cmd *) PDU_ENCAPSULATION(iob->data); | 320 | cmd = (struct qeth_ipa_cmd *) PDU_ENCAPSULATION(iob->data); |
370 | if (IS_IPA_REPLY(cmd)) { | 321 | if (IS_IPA_REPLY(cmd)) { |
@@ -400,10 +351,10 @@ static struct qeth_ipa_cmd *qeth_check_ipa_data(struct qeth_card *card, | |||
400 | case IPA_CMD_MODCCID: | 351 | case IPA_CMD_MODCCID: |
401 | return cmd; | 352 | return cmd; |
402 | case IPA_CMD_REGISTER_LOCAL_ADDR: | 353 | case IPA_CMD_REGISTER_LOCAL_ADDR: |
403 | QETH_DBF_TEXT(TRACE, 3, "irla"); | 354 | QETH_CARD_TEXT(card, 3, "irla"); |
404 | break; | 355 | break; |
405 | case IPA_CMD_UNREGISTER_LOCAL_ADDR: | 356 | case IPA_CMD_UNREGISTER_LOCAL_ADDR: |
406 | QETH_DBF_TEXT(TRACE, 3, "urla"); | 357 | QETH_CARD_TEXT(card, 3, "urla"); |
407 | break; | 358 | break; |
408 | default: | 359 | default: |
409 | QETH_DBF_MESSAGE(2, "Received data is IPA " | 360 | QETH_DBF_MESSAGE(2, "Received data is IPA " |
@@ -420,7 +371,7 @@ void qeth_clear_ipacmd_list(struct qeth_card *card) | |||
420 | struct qeth_reply *reply, *r; | 371 | struct qeth_reply *reply, *r; |
421 | unsigned long flags; | 372 | unsigned long flags; |
422 | 373 | ||
423 | QETH_DBF_TEXT(TRACE, 4, "clipalst"); | 374 | QETH_CARD_TEXT(card, 4, "clipalst"); |
424 | 375 | ||
425 | spin_lock_irqsave(&card->lock, flags); | 376 | spin_lock_irqsave(&card->lock, flags); |
426 | list_for_each_entry_safe(reply, r, &card->cmd_waiter_list, list) { | 377 | list_for_each_entry_safe(reply, r, &card->cmd_waiter_list, list) { |
@@ -432,6 +383,7 @@ void qeth_clear_ipacmd_list(struct qeth_card *card) | |||
432 | qeth_put_reply(reply); | 383 | qeth_put_reply(reply); |
433 | } | 384 | } |
434 | spin_unlock_irqrestore(&card->lock, flags); | 385 | spin_unlock_irqrestore(&card->lock, flags); |
386 | atomic_set(&card->write.irq_pending, 0); | ||
435 | } | 387 | } |
436 | EXPORT_SYMBOL_GPL(qeth_clear_ipacmd_list); | 388 | EXPORT_SYMBOL_GPL(qeth_clear_ipacmd_list); |
437 | 389 | ||
@@ -448,9 +400,9 @@ static int qeth_check_idx_response(struct qeth_card *card, | |||
448 | buffer[4], | 400 | buffer[4], |
449 | ((buffer[4] == 0x22) ? | 401 | ((buffer[4] == 0x22) ? |
450 | " -- try another portname" : "")); | 402 | " -- try another portname" : "")); |
451 | QETH_DBF_TEXT(TRACE, 2, "ckidxres"); | 403 | QETH_CARD_TEXT(card, 2, "ckidxres"); |
452 | QETH_DBF_TEXT(TRACE, 2, " idxterm"); | 404 | QETH_CARD_TEXT(card, 2, " idxterm"); |
453 | QETH_DBF_TEXT_(TRACE, 2, " rc%d", -EIO); | 405 | QETH_CARD_TEXT_(card, 2, " rc%d", -EIO); |
454 | if (buffer[4] == 0xf6) { | 406 | if (buffer[4] == 0xf6) { |
455 | dev_err(&card->gdev->dev, | 407 | dev_err(&card->gdev->dev, |
456 | "The qeth device is not configured " | 408 | "The qeth device is not configured " |
@@ -467,8 +419,8 @@ static void qeth_setup_ccw(struct qeth_channel *channel, unsigned char *iob, | |||
467 | { | 419 | { |
468 | struct qeth_card *card; | 420 | struct qeth_card *card; |
469 | 421 | ||
470 | QETH_DBF_TEXT(TRACE, 4, "setupccw"); | ||
471 | card = CARD_FROM_CDEV(channel->ccwdev); | 422 | card = CARD_FROM_CDEV(channel->ccwdev); |
423 | QETH_CARD_TEXT(card, 4, "setupccw"); | ||
472 | if (channel == &card->read) | 424 | if (channel == &card->read) |
473 | memcpy(&channel->ccw, READ_CCW, sizeof(struct ccw1)); | 425 | memcpy(&channel->ccw, READ_CCW, sizeof(struct ccw1)); |
474 | else | 426 | else |
@@ -481,7 +433,7 @@ static struct qeth_cmd_buffer *__qeth_get_buffer(struct qeth_channel *channel) | |||
481 | { | 433 | { |
482 | __u8 index; | 434 | __u8 index; |
483 | 435 | ||
484 | QETH_DBF_TEXT(TRACE, 6, "getbuff"); | 436 | QETH_CARD_TEXT(CARD_FROM_CDEV(channel->ccwdev), 6, "getbuff"); |
485 | index = channel->io_buf_no; | 437 | index = channel->io_buf_no; |
486 | do { | 438 | do { |
487 | if (channel->iob[index].state == BUF_STATE_FREE) { | 439 | if (channel->iob[index].state == BUF_STATE_FREE) { |
@@ -502,7 +454,7 @@ void qeth_release_buffer(struct qeth_channel *channel, | |||
502 | { | 454 | { |
503 | unsigned long flags; | 455 | unsigned long flags; |
504 | 456 | ||
505 | QETH_DBF_TEXT(TRACE, 6, "relbuff"); | 457 | QETH_CARD_TEXT(CARD_FROM_CDEV(channel->ccwdev), 6, "relbuff"); |
506 | spin_lock_irqsave(&channel->iob_lock, flags); | 458 | spin_lock_irqsave(&channel->iob_lock, flags); |
507 | memset(iob->data, 0, QETH_BUFSIZE); | 459 | memset(iob->data, 0, QETH_BUFSIZE); |
508 | iob->state = BUF_STATE_FREE; | 460 | iob->state = BUF_STATE_FREE; |
@@ -553,9 +505,8 @@ static void qeth_send_control_data_cb(struct qeth_channel *channel, | |||
553 | int keep_reply; | 505 | int keep_reply; |
554 | int rc = 0; | 506 | int rc = 0; |
555 | 507 | ||
556 | QETH_DBF_TEXT(TRACE, 4, "sndctlcb"); | ||
557 | |||
558 | card = CARD_FROM_CDEV(channel->ccwdev); | 508 | card = CARD_FROM_CDEV(channel->ccwdev); |
509 | QETH_CARD_TEXT(card, 4, "sndctlcb"); | ||
559 | rc = qeth_check_idx_response(card, iob->data); | 510 | rc = qeth_check_idx_response(card, iob->data); |
560 | switch (rc) { | 511 | switch (rc) { |
561 | case 0: | 512 | case 0: |
@@ -563,6 +514,7 @@ static void qeth_send_control_data_cb(struct qeth_channel *channel, | |||
563 | case -EIO: | 514 | case -EIO: |
564 | qeth_clear_ipacmd_list(card); | 515 | qeth_clear_ipacmd_list(card); |
565 | qeth_schedule_recovery(card); | 516 | qeth_schedule_recovery(card); |
517 | /* fall through */ | ||
566 | default: | 518 | default: |
567 | goto out; | 519 | goto out; |
568 | } | 520 | } |
@@ -722,7 +674,7 @@ EXPORT_SYMBOL_GPL(qeth_do_run_thread); | |||
722 | 674 | ||
723 | void qeth_schedule_recovery(struct qeth_card *card) | 675 | void qeth_schedule_recovery(struct qeth_card *card) |
724 | { | 676 | { |
725 | QETH_DBF_TEXT(TRACE, 2, "startrec"); | 677 | QETH_CARD_TEXT(card, 2, "startrec"); |
726 | if (qeth_set_thread_start_bit(card, QETH_RECOVER_THREAD) == 0) | 678 | if (qeth_set_thread_start_bit(card, QETH_RECOVER_THREAD) == 0) |
727 | schedule_work(&card->kernel_thread_starter); | 679 | schedule_work(&card->kernel_thread_starter); |
728 | } | 680 | } |
@@ -732,15 +684,17 @@ static int qeth_get_problem(struct ccw_device *cdev, struct irb *irb) | |||
732 | { | 684 | { |
733 | int dstat, cstat; | 685 | int dstat, cstat; |
734 | char *sense; | 686 | char *sense; |
687 | struct qeth_card *card; | ||
735 | 688 | ||
736 | sense = (char *) irb->ecw; | 689 | sense = (char *) irb->ecw; |
737 | cstat = irb->scsw.cmd.cstat; | 690 | cstat = irb->scsw.cmd.cstat; |
738 | dstat = irb->scsw.cmd.dstat; | 691 | dstat = irb->scsw.cmd.dstat; |
692 | card = CARD_FROM_CDEV(cdev); | ||
739 | 693 | ||
740 | if (cstat & (SCHN_STAT_CHN_CTRL_CHK | SCHN_STAT_INTF_CTRL_CHK | | 694 | if (cstat & (SCHN_STAT_CHN_CTRL_CHK | SCHN_STAT_INTF_CTRL_CHK | |
741 | SCHN_STAT_CHN_DATA_CHK | SCHN_STAT_CHAIN_CHECK | | 695 | SCHN_STAT_CHN_DATA_CHK | SCHN_STAT_CHAIN_CHECK | |
742 | SCHN_STAT_PROT_CHECK | SCHN_STAT_PROG_CHECK)) { | 696 | SCHN_STAT_PROT_CHECK | SCHN_STAT_PROG_CHECK)) { |
743 | QETH_DBF_TEXT(TRACE, 2, "CGENCHK"); | 697 | QETH_CARD_TEXT(card, 2, "CGENCHK"); |
744 | dev_warn(&cdev->dev, "The qeth device driver " | 698 | dev_warn(&cdev->dev, "The qeth device driver " |
745 | "failed to recover an error on the device\n"); | 699 | "failed to recover an error on the device\n"); |
746 | QETH_DBF_MESSAGE(2, "%s check on device dstat=x%x, cstat=x%x\n", | 700 | QETH_DBF_MESSAGE(2, "%s check on device dstat=x%x, cstat=x%x\n", |
@@ -753,23 +707,23 @@ static int qeth_get_problem(struct ccw_device *cdev, struct irb *irb) | |||
753 | if (dstat & DEV_STAT_UNIT_CHECK) { | 707 | if (dstat & DEV_STAT_UNIT_CHECK) { |
754 | if (sense[SENSE_RESETTING_EVENT_BYTE] & | 708 | if (sense[SENSE_RESETTING_EVENT_BYTE] & |
755 | SENSE_RESETTING_EVENT_FLAG) { | 709 | SENSE_RESETTING_EVENT_FLAG) { |
756 | QETH_DBF_TEXT(TRACE, 2, "REVIND"); | 710 | QETH_CARD_TEXT(card, 2, "REVIND"); |
757 | return 1; | 711 | return 1; |
758 | } | 712 | } |
759 | if (sense[SENSE_COMMAND_REJECT_BYTE] & | 713 | if (sense[SENSE_COMMAND_REJECT_BYTE] & |
760 | SENSE_COMMAND_REJECT_FLAG) { | 714 | SENSE_COMMAND_REJECT_FLAG) { |
761 | QETH_DBF_TEXT(TRACE, 2, "CMDREJi"); | 715 | QETH_CARD_TEXT(card, 2, "CMDREJi"); |
762 | return 1; | 716 | return 1; |
763 | } | 717 | } |
764 | if ((sense[2] == 0xaf) && (sense[3] == 0xfe)) { | 718 | if ((sense[2] == 0xaf) && (sense[3] == 0xfe)) { |
765 | QETH_DBF_TEXT(TRACE, 2, "AFFE"); | 719 | QETH_CARD_TEXT(card, 2, "AFFE"); |
766 | return 1; | 720 | return 1; |
767 | } | 721 | } |
768 | if ((!sense[0]) && (!sense[1]) && (!sense[2]) && (!sense[3])) { | 722 | if ((!sense[0]) && (!sense[1]) && (!sense[2]) && (!sense[3])) { |
769 | QETH_DBF_TEXT(TRACE, 2, "ZEROSEN"); | 723 | QETH_CARD_TEXT(card, 2, "ZEROSEN"); |
770 | return 0; | 724 | return 0; |
771 | } | 725 | } |
772 | QETH_DBF_TEXT(TRACE, 2, "DGENCHK"); | 726 | QETH_CARD_TEXT(card, 2, "DGENCHK"); |
773 | return 1; | 727 | return 1; |
774 | } | 728 | } |
775 | return 0; | 729 | return 0; |
@@ -778,6 +732,10 @@ static int qeth_get_problem(struct ccw_device *cdev, struct irb *irb) | |||
778 | static long __qeth_check_irb_error(struct ccw_device *cdev, | 732 | static long __qeth_check_irb_error(struct ccw_device *cdev, |
779 | unsigned long intparm, struct irb *irb) | 733 | unsigned long intparm, struct irb *irb) |
780 | { | 734 | { |
735 | struct qeth_card *card; | ||
736 | |||
737 | card = CARD_FROM_CDEV(cdev); | ||
738 | |||
781 | if (!IS_ERR(irb)) | 739 | if (!IS_ERR(irb)) |
782 | return 0; | 740 | return 0; |
783 | 741 | ||
@@ -785,17 +743,15 @@ static long __qeth_check_irb_error(struct ccw_device *cdev, | |||
785 | case -EIO: | 743 | case -EIO: |
786 | QETH_DBF_MESSAGE(2, "%s i/o-error on device\n", | 744 | QETH_DBF_MESSAGE(2, "%s i/o-error on device\n", |
787 | dev_name(&cdev->dev)); | 745 | dev_name(&cdev->dev)); |
788 | QETH_DBF_TEXT(TRACE, 2, "ckirberr"); | 746 | QETH_CARD_TEXT(card, 2, "ckirberr"); |
789 | QETH_DBF_TEXT_(TRACE, 2, " rc%d", -EIO); | 747 | QETH_CARD_TEXT_(card, 2, " rc%d", -EIO); |
790 | break; | 748 | break; |
791 | case -ETIMEDOUT: | 749 | case -ETIMEDOUT: |
792 | dev_warn(&cdev->dev, "A hardware operation timed out" | 750 | dev_warn(&cdev->dev, "A hardware operation timed out" |
793 | " on the device\n"); | 751 | " on the device\n"); |
794 | QETH_DBF_TEXT(TRACE, 2, "ckirberr"); | 752 | QETH_CARD_TEXT(card, 2, "ckirberr"); |
795 | QETH_DBF_TEXT_(TRACE, 2, " rc%d", -ETIMEDOUT); | 753 | QETH_CARD_TEXT_(card, 2, " rc%d", -ETIMEDOUT); |
796 | if (intparm == QETH_RCD_PARM) { | 754 | if (intparm == QETH_RCD_PARM) { |
797 | struct qeth_card *card = CARD_FROM_CDEV(cdev); | ||
798 | |||
799 | if (card && (card->data.ccwdev == cdev)) { | 755 | if (card && (card->data.ccwdev == cdev)) { |
800 | card->data.state = CH_STATE_DOWN; | 756 | card->data.state = CH_STATE_DOWN; |
801 | wake_up(&card->wait_q); | 757 | wake_up(&card->wait_q); |
@@ -805,8 +761,8 @@ static long __qeth_check_irb_error(struct ccw_device *cdev, | |||
805 | default: | 761 | default: |
806 | QETH_DBF_MESSAGE(2, "%s unknown error %ld on device\n", | 762 | QETH_DBF_MESSAGE(2, "%s unknown error %ld on device\n", |
807 | dev_name(&cdev->dev), PTR_ERR(irb)); | 763 | dev_name(&cdev->dev), PTR_ERR(irb)); |
808 | QETH_DBF_TEXT(TRACE, 2, "ckirberr"); | 764 | QETH_CARD_TEXT(card, 2, "ckirberr"); |
809 | QETH_DBF_TEXT(TRACE, 2, " rc???"); | 765 | QETH_CARD_TEXT(card, 2, " rc???"); |
810 | } | 766 | } |
811 | return PTR_ERR(irb); | 767 | return PTR_ERR(irb); |
812 | } | 768 | } |
@@ -822,8 +778,6 @@ static void qeth_irq(struct ccw_device *cdev, unsigned long intparm, | |||
822 | struct qeth_cmd_buffer *iob; | 778 | struct qeth_cmd_buffer *iob; |
823 | __u8 index; | 779 | __u8 index; |
824 | 780 | ||
825 | QETH_DBF_TEXT(TRACE, 5, "irq"); | ||
826 | |||
827 | if (__qeth_check_irb_error(cdev, intparm, irb)) | 781 | if (__qeth_check_irb_error(cdev, intparm, irb)) |
828 | return; | 782 | return; |
829 | cstat = irb->scsw.cmd.cstat; | 783 | cstat = irb->scsw.cmd.cstat; |
@@ -833,15 +787,17 @@ static void qeth_irq(struct ccw_device *cdev, unsigned long intparm, | |||
833 | if (!card) | 787 | if (!card) |
834 | return; | 788 | return; |
835 | 789 | ||
790 | QETH_CARD_TEXT(card, 5, "irq"); | ||
791 | |||
836 | if (card->read.ccwdev == cdev) { | 792 | if (card->read.ccwdev == cdev) { |
837 | channel = &card->read; | 793 | channel = &card->read; |
838 | QETH_DBF_TEXT(TRACE, 5, "read"); | 794 | QETH_CARD_TEXT(card, 5, "read"); |
839 | } else if (card->write.ccwdev == cdev) { | 795 | } else if (card->write.ccwdev == cdev) { |
840 | channel = &card->write; | 796 | channel = &card->write; |
841 | QETH_DBF_TEXT(TRACE, 5, "write"); | 797 | QETH_CARD_TEXT(card, 5, "write"); |
842 | } else { | 798 | } else { |
843 | channel = &card->data; | 799 | channel = &card->data; |
844 | QETH_DBF_TEXT(TRACE, 5, "data"); | 800 | QETH_CARD_TEXT(card, 5, "data"); |
845 | } | 801 | } |
846 | atomic_set(&channel->irq_pending, 0); | 802 | atomic_set(&channel->irq_pending, 0); |
847 | 803 | ||
@@ -857,12 +813,12 @@ static void qeth_irq(struct ccw_device *cdev, unsigned long intparm, | |||
857 | goto out; | 813 | goto out; |
858 | 814 | ||
859 | if (intparm == QETH_CLEAR_CHANNEL_PARM) { | 815 | if (intparm == QETH_CLEAR_CHANNEL_PARM) { |
860 | QETH_DBF_TEXT(TRACE, 6, "clrchpar"); | 816 | QETH_CARD_TEXT(card, 6, "clrchpar"); |
861 | /* we don't have to handle this further */ | 817 | /* we don't have to handle this further */ |
862 | intparm = 0; | 818 | intparm = 0; |
863 | } | 819 | } |
864 | if (intparm == QETH_HALT_CHANNEL_PARM) { | 820 | if (intparm == QETH_HALT_CHANNEL_PARM) { |
865 | QETH_DBF_TEXT(TRACE, 6, "hltchpar"); | 821 | QETH_CARD_TEXT(card, 6, "hltchpar"); |
866 | /* we don't have to handle this further */ | 822 | /* we don't have to handle this further */ |
867 | intparm = 0; | 823 | intparm = 0; |
868 | } | 824 | } |
@@ -963,7 +919,7 @@ void qeth_clear_qdio_buffers(struct qeth_card *card) | |||
963 | { | 919 | { |
964 | int i, j; | 920 | int i, j; |
965 | 921 | ||
966 | QETH_DBF_TEXT(TRACE, 2, "clearqdbf"); | 922 | QETH_CARD_TEXT(card, 2, "clearqdbf"); |
967 | /* clear outbound buffers to free skbs */ | 923 | /* clear outbound buffers to free skbs */ |
968 | for (i = 0; i < card->qdio.no_out_queues; ++i) | 924 | for (i = 0; i < card->qdio.no_out_queues; ++i) |
969 | if (card->qdio.out_qs[i]) { | 925 | if (card->qdio.out_qs[i]) { |
@@ -978,7 +934,6 @@ static void qeth_free_buffer_pool(struct qeth_card *card) | |||
978 | { | 934 | { |
979 | struct qeth_buffer_pool_entry *pool_entry, *tmp; | 935 | struct qeth_buffer_pool_entry *pool_entry, *tmp; |
980 | int i = 0; | 936 | int i = 0; |
981 | QETH_DBF_TEXT(TRACE, 5, "freepool"); | ||
982 | list_for_each_entry_safe(pool_entry, tmp, | 937 | list_for_each_entry_safe(pool_entry, tmp, |
983 | &card->qdio.init_pool.entry_list, init_list){ | 938 | &card->qdio.init_pool.entry_list, init_list){ |
984 | for (i = 0; i < QETH_MAX_BUFFER_ELEMENTS(card); ++i) | 939 | for (i = 0; i < QETH_MAX_BUFFER_ELEMENTS(card); ++i) |
@@ -992,7 +947,6 @@ static void qeth_free_qdio_buffers(struct qeth_card *card) | |||
992 | { | 947 | { |
993 | int i, j; | 948 | int i, j; |
994 | 949 | ||
995 | QETH_DBF_TEXT(TRACE, 2, "freeqdbf"); | ||
996 | if (atomic_xchg(&card->qdio.state, QETH_QDIO_UNINITIALIZED) == | 950 | if (atomic_xchg(&card->qdio.state, QETH_QDIO_UNINITIALIZED) == |
997 | QETH_QDIO_UNINITIALIZED) | 951 | QETH_QDIO_UNINITIALIZED) |
998 | return; | 952 | return; |
@@ -1089,7 +1043,7 @@ static int qeth_do_start_thread(struct qeth_card *card, unsigned long thread) | |||
1089 | int rc = 0; | 1043 | int rc = 0; |
1090 | 1044 | ||
1091 | spin_lock_irqsave(&card->thread_mask_lock, flags); | 1045 | spin_lock_irqsave(&card->thread_mask_lock, flags); |
1092 | QETH_DBF_TEXT_(TRACE, 4, " %02x%02x%02x", | 1046 | QETH_CARD_TEXT_(card, 4, " %02x%02x%02x", |
1093 | (u8) card->thread_start_mask, | 1047 | (u8) card->thread_start_mask, |
1094 | (u8) card->thread_allowed_mask, | 1048 | (u8) card->thread_allowed_mask, |
1095 | (u8) card->thread_running_mask); | 1049 | (u8) card->thread_running_mask); |
@@ -1102,7 +1056,7 @@ static void qeth_start_kernel_thread(struct work_struct *work) | |||
1102 | { | 1056 | { |
1103 | struct qeth_card *card = container_of(work, struct qeth_card, | 1057 | struct qeth_card *card = container_of(work, struct qeth_card, |
1104 | kernel_thread_starter); | 1058 | kernel_thread_starter); |
1105 | QETH_DBF_TEXT(TRACE , 2, "strthrd"); | 1059 | QETH_CARD_TEXT(card , 2, "strthrd"); |
1106 | 1060 | ||
1107 | if (card->read.state != CH_STATE_UP && | 1061 | if (card->read.state != CH_STATE_UP && |
1108 | card->write.state != CH_STATE_UP) | 1062 | card->write.state != CH_STATE_UP) |
@@ -1124,6 +1078,7 @@ static int qeth_setup_card(struct qeth_card *card) | |||
1124 | card->state = CARD_STATE_DOWN; | 1078 | card->state = CARD_STATE_DOWN; |
1125 | card->lan_online = 0; | 1079 | card->lan_online = 0; |
1126 | card->use_hard_stop = 0; | 1080 | card->use_hard_stop = 0; |
1081 | card->read_or_write_problem = 0; | ||
1127 | card->dev = NULL; | 1082 | card->dev = NULL; |
1128 | spin_lock_init(&card->vlanlock); | 1083 | spin_lock_init(&card->vlanlock); |
1129 | spin_lock_init(&card->mclock); | 1084 | spin_lock_init(&card->mclock); |
@@ -1132,6 +1087,7 @@ static int qeth_setup_card(struct qeth_card *card) | |||
1132 | spin_lock_init(&card->ip_lock); | 1087 | spin_lock_init(&card->ip_lock); |
1133 | spin_lock_init(&card->thread_mask_lock); | 1088 | spin_lock_init(&card->thread_mask_lock); |
1134 | mutex_init(&card->conf_mutex); | 1089 | mutex_init(&card->conf_mutex); |
1090 | mutex_init(&card->discipline_mutex); | ||
1135 | card->thread_start_mask = 0; | 1091 | card->thread_start_mask = 0; |
1136 | card->thread_allowed_mask = 0; | 1092 | card->thread_allowed_mask = 0; |
1137 | card->thread_running_mask = 0; | 1093 | card->thread_running_mask = 0; |
@@ -1229,8 +1185,8 @@ static int qeth_clear_channel(struct qeth_channel *channel) | |||
1229 | struct qeth_card *card; | 1185 | struct qeth_card *card; |
1230 | int rc; | 1186 | int rc; |
1231 | 1187 | ||
1232 | QETH_DBF_TEXT(TRACE, 3, "clearch"); | ||
1233 | card = CARD_FROM_CDEV(channel->ccwdev); | 1188 | card = CARD_FROM_CDEV(channel->ccwdev); |
1189 | QETH_CARD_TEXT(card, 3, "clearch"); | ||
1234 | spin_lock_irqsave(get_ccwdev_lock(channel->ccwdev), flags); | 1190 | spin_lock_irqsave(get_ccwdev_lock(channel->ccwdev), flags); |
1235 | rc = ccw_device_clear(channel->ccwdev, QETH_CLEAR_CHANNEL_PARM); | 1191 | rc = ccw_device_clear(channel->ccwdev, QETH_CLEAR_CHANNEL_PARM); |
1236 | spin_unlock_irqrestore(get_ccwdev_lock(channel->ccwdev), flags); | 1192 | spin_unlock_irqrestore(get_ccwdev_lock(channel->ccwdev), flags); |
@@ -1253,8 +1209,8 @@ static int qeth_halt_channel(struct qeth_channel *channel) | |||
1253 | struct qeth_card *card; | 1209 | struct qeth_card *card; |
1254 | int rc; | 1210 | int rc; |
1255 | 1211 | ||
1256 | QETH_DBF_TEXT(TRACE, 3, "haltch"); | ||
1257 | card = CARD_FROM_CDEV(channel->ccwdev); | 1212 | card = CARD_FROM_CDEV(channel->ccwdev); |
1213 | QETH_CARD_TEXT(card, 3, "haltch"); | ||
1258 | spin_lock_irqsave(get_ccwdev_lock(channel->ccwdev), flags); | 1214 | spin_lock_irqsave(get_ccwdev_lock(channel->ccwdev), flags); |
1259 | rc = ccw_device_halt(channel->ccwdev, QETH_HALT_CHANNEL_PARM); | 1215 | rc = ccw_device_halt(channel->ccwdev, QETH_HALT_CHANNEL_PARM); |
1260 | spin_unlock_irqrestore(get_ccwdev_lock(channel->ccwdev), flags); | 1216 | spin_unlock_irqrestore(get_ccwdev_lock(channel->ccwdev), flags); |
@@ -1274,7 +1230,7 @@ static int qeth_halt_channels(struct qeth_card *card) | |||
1274 | { | 1230 | { |
1275 | int rc1 = 0, rc2 = 0, rc3 = 0; | 1231 | int rc1 = 0, rc2 = 0, rc3 = 0; |
1276 | 1232 | ||
1277 | QETH_DBF_TEXT(TRACE, 3, "haltchs"); | 1233 | QETH_CARD_TEXT(card, 3, "haltchs"); |
1278 | rc1 = qeth_halt_channel(&card->read); | 1234 | rc1 = qeth_halt_channel(&card->read); |
1279 | rc2 = qeth_halt_channel(&card->write); | 1235 | rc2 = qeth_halt_channel(&card->write); |
1280 | rc3 = qeth_halt_channel(&card->data); | 1236 | rc3 = qeth_halt_channel(&card->data); |
@@ -1289,7 +1245,7 @@ static int qeth_clear_channels(struct qeth_card *card) | |||
1289 | { | 1245 | { |
1290 | int rc1 = 0, rc2 = 0, rc3 = 0; | 1246 | int rc1 = 0, rc2 = 0, rc3 = 0; |
1291 | 1247 | ||
1292 | QETH_DBF_TEXT(TRACE, 3, "clearchs"); | 1248 | QETH_CARD_TEXT(card, 3, "clearchs"); |
1293 | rc1 = qeth_clear_channel(&card->read); | 1249 | rc1 = qeth_clear_channel(&card->read); |
1294 | rc2 = qeth_clear_channel(&card->write); | 1250 | rc2 = qeth_clear_channel(&card->write); |
1295 | rc3 = qeth_clear_channel(&card->data); | 1251 | rc3 = qeth_clear_channel(&card->data); |
@@ -1304,8 +1260,7 @@ static int qeth_clear_halt_card(struct qeth_card *card, int halt) | |||
1304 | { | 1260 | { |
1305 | int rc = 0; | 1261 | int rc = 0; |
1306 | 1262 | ||
1307 | QETH_DBF_TEXT(TRACE, 3, "clhacrd"); | 1263 | QETH_CARD_TEXT(card, 3, "clhacrd"); |
1308 | QETH_DBF_HEX(TRACE, 3, &card, sizeof(void *)); | ||
1309 | 1264 | ||
1310 | if (halt) | 1265 | if (halt) |
1311 | rc = qeth_halt_channels(card); | 1266 | rc = qeth_halt_channels(card); |
@@ -1318,7 +1273,7 @@ int qeth_qdio_clear_card(struct qeth_card *card, int use_halt) | |||
1318 | { | 1273 | { |
1319 | int rc = 0; | 1274 | int rc = 0; |
1320 | 1275 | ||
1321 | QETH_DBF_TEXT(TRACE, 3, "qdioclr"); | 1276 | QETH_CARD_TEXT(card, 3, "qdioclr"); |
1322 | switch (atomic_cmpxchg(&card->qdio.state, QETH_QDIO_ESTABLISHED, | 1277 | switch (atomic_cmpxchg(&card->qdio.state, QETH_QDIO_ESTABLISHED, |
1323 | QETH_QDIO_CLEANING)) { | 1278 | QETH_QDIO_CLEANING)) { |
1324 | case QETH_QDIO_ESTABLISHED: | 1279 | case QETH_QDIO_ESTABLISHED: |
@@ -1329,7 +1284,7 @@ int qeth_qdio_clear_card(struct qeth_card *card, int use_halt) | |||
1329 | rc = qdio_shutdown(CARD_DDEV(card), | 1284 | rc = qdio_shutdown(CARD_DDEV(card), |
1330 | QDIO_FLAG_CLEANUP_USING_CLEAR); | 1285 | QDIO_FLAG_CLEANUP_USING_CLEAR); |
1331 | if (rc) | 1286 | if (rc) |
1332 | QETH_DBF_TEXT_(TRACE, 3, "1err%d", rc); | 1287 | QETH_CARD_TEXT_(card, 3, "1err%d", rc); |
1333 | qdio_free(CARD_DDEV(card)); | 1288 | qdio_free(CARD_DDEV(card)); |
1334 | atomic_set(&card->qdio.state, QETH_QDIO_ALLOCATED); | 1289 | atomic_set(&card->qdio.state, QETH_QDIO_ALLOCATED); |
1335 | break; | 1290 | break; |
@@ -1340,7 +1295,7 @@ int qeth_qdio_clear_card(struct qeth_card *card, int use_halt) | |||
1340 | } | 1295 | } |
1341 | rc = qeth_clear_halt_card(card, use_halt); | 1296 | rc = qeth_clear_halt_card(card, use_halt); |
1342 | if (rc) | 1297 | if (rc) |
1343 | QETH_DBF_TEXT_(TRACE, 3, "2err%d", rc); | 1298 | QETH_CARD_TEXT_(card, 3, "2err%d", rc); |
1344 | card->state = CARD_STATE_DOWN; | 1299 | card->state = CARD_STATE_DOWN; |
1345 | return rc; | 1300 | return rc; |
1346 | } | 1301 | } |
@@ -1432,14 +1387,10 @@ static void qeth_init_func_level(struct qeth_card *card) | |||
1432 | { | 1387 | { |
1433 | switch (card->info.type) { | 1388 | switch (card->info.type) { |
1434 | case QETH_CARD_TYPE_IQD: | 1389 | case QETH_CARD_TYPE_IQD: |
1435 | if (card->ipato.enabled) | 1390 | card->info.func_level = QETH_IDX_FUNC_LEVEL_IQD; |
1436 | card->info.func_level = | ||
1437 | QETH_IDX_FUNC_LEVEL_IQD_ENA_IPAT; | ||
1438 | else | ||
1439 | card->info.func_level = | ||
1440 | QETH_IDX_FUNC_LEVEL_IQD_DIS_IPAT; | ||
1441 | break; | 1391 | break; |
1442 | case QETH_CARD_TYPE_OSD: | 1392 | case QETH_CARD_TYPE_OSD: |
1393 | case QETH_CARD_TYPE_OSN: | ||
1443 | card->info.func_level = QETH_IDX_FUNC_LEVEL_OSD; | 1394 | card->info.func_level = QETH_IDX_FUNC_LEVEL_OSD; |
1444 | break; | 1395 | break; |
1445 | default: | 1396 | default: |
@@ -1637,15 +1588,18 @@ static void qeth_idx_read_cb(struct qeth_channel *channel, | |||
1637 | "host\n"); | 1588 | "host\n"); |
1638 | break; | 1589 | break; |
1639 | case QETH_IDX_ACT_ERR_AUTH: | 1590 | case QETH_IDX_ACT_ERR_AUTH: |
1591 | case QETH_IDX_ACT_ERR_AUTH_USER: | ||
1640 | dev_err(&card->read.ccwdev->dev, | 1592 | dev_err(&card->read.ccwdev->dev, |
1641 | "Setting the device online failed because of " | 1593 | "Setting the device online failed because of " |
1642 | "insufficient LPAR authorization\n"); | 1594 | "insufficient authorization\n"); |
1643 | break; | 1595 | break; |
1644 | default: | 1596 | default: |
1645 | QETH_DBF_MESSAGE(2, "%s IDX_ACTIVATE on read channel:" | 1597 | QETH_DBF_MESSAGE(2, "%s IDX_ACTIVATE on read channel:" |
1646 | " negative reply\n", | 1598 | " negative reply\n", |
1647 | dev_name(&card->read.ccwdev->dev)); | 1599 | dev_name(&card->read.ccwdev->dev)); |
1648 | } | 1600 | } |
1601 | QETH_CARD_TEXT_(card, 2, "idxread%c", | ||
1602 | QETH_IDX_ACT_CAUSE_CODE(iob->data)); | ||
1649 | goto out; | 1603 | goto out; |
1650 | } | 1604 | } |
1651 | 1605 | ||
@@ -1705,8 +1659,12 @@ int qeth_send_control_data(struct qeth_card *card, int len, | |||
1705 | unsigned long timeout, event_timeout; | 1659 | unsigned long timeout, event_timeout; |
1706 | struct qeth_ipa_cmd *cmd; | 1660 | struct qeth_ipa_cmd *cmd; |
1707 | 1661 | ||
1708 | QETH_DBF_TEXT(TRACE, 2, "sendctl"); | 1662 | QETH_CARD_TEXT(card, 2, "sendctl"); |
1709 | 1663 | ||
1664 | if (card->read_or_write_problem) { | ||
1665 | qeth_release_buffer(iob->channel, iob); | ||
1666 | return -EIO; | ||
1667 | } | ||
1710 | reply = qeth_alloc_reply(card); | 1668 | reply = qeth_alloc_reply(card); |
1711 | if (!reply) { | 1669 | if (!reply) { |
1712 | return -ENOMEM; | 1670 | return -ENOMEM; |
@@ -1732,7 +1690,7 @@ int qeth_send_control_data(struct qeth_card *card, int len, | |||
1732 | event_timeout = QETH_TIMEOUT; | 1690 | event_timeout = QETH_TIMEOUT; |
1733 | timeout = jiffies + event_timeout; | 1691 | timeout = jiffies + event_timeout; |
1734 | 1692 | ||
1735 | QETH_DBF_TEXT(TRACE, 6, "noirqpnd"); | 1693 | QETH_CARD_TEXT(card, 6, "noirqpnd"); |
1736 | spin_lock_irqsave(get_ccwdev_lock(card->write.ccwdev), flags); | 1694 | spin_lock_irqsave(get_ccwdev_lock(card->write.ccwdev), flags); |
1737 | rc = ccw_device_start(card->write.ccwdev, &card->write.ccw, | 1695 | rc = ccw_device_start(card->write.ccwdev, &card->write.ccw, |
1738 | (addr_t) iob, 0, 0); | 1696 | (addr_t) iob, 0, 0); |
@@ -1741,7 +1699,7 @@ int qeth_send_control_data(struct qeth_card *card, int len, | |||
1741 | QETH_DBF_MESSAGE(2, "%s qeth_send_control_data: " | 1699 | QETH_DBF_MESSAGE(2, "%s qeth_send_control_data: " |
1742 | "ccw_device_start rc = %i\n", | 1700 | "ccw_device_start rc = %i\n", |
1743 | dev_name(&card->write.ccwdev->dev), rc); | 1701 | dev_name(&card->write.ccwdev->dev), rc); |
1744 | QETH_DBF_TEXT_(TRACE, 2, " err%d", rc); | 1702 | QETH_CARD_TEXT_(card, 2, " err%d", rc); |
1745 | spin_lock_irqsave(&card->lock, flags); | 1703 | spin_lock_irqsave(&card->lock, flags); |
1746 | list_del_init(&reply->list); | 1704 | list_del_init(&reply->list); |
1747 | qeth_put_reply(reply); | 1705 | qeth_put_reply(reply); |
@@ -1778,6 +1736,9 @@ time_err: | |||
1778 | spin_unlock_irqrestore(&reply->card->lock, flags); | 1736 | spin_unlock_irqrestore(&reply->card->lock, flags); |
1779 | reply->rc = -ETIME; | 1737 | reply->rc = -ETIME; |
1780 | atomic_inc(&reply->received); | 1738 | atomic_inc(&reply->received); |
1739 | atomic_set(&card->write.irq_pending, 0); | ||
1740 | qeth_release_buffer(iob->channel, iob); | ||
1741 | card->write.buf_no = (card->write.buf_no + 1) % QETH_CMD_BUFFER_NO; | ||
1781 | wake_up(&reply->wait_q); | 1742 | wake_up(&reply->wait_q); |
1782 | rc = reply->rc; | 1743 | rc = reply->rc; |
1783 | qeth_put_reply(reply); | 1744 | qeth_put_reply(reply); |
@@ -1978,7 +1939,7 @@ static int qeth_ulp_enable_cb(struct qeth_card *card, struct qeth_reply *reply, | |||
1978 | card->info.link_type = link_type; | 1939 | card->info.link_type = link_type; |
1979 | } else | 1940 | } else |
1980 | card->info.link_type = 0; | 1941 | card->info.link_type = 0; |
1981 | QETH_DBF_TEXT_(SETUP, 2, "link%d", link_type); | 1942 | QETH_DBF_TEXT_(SETUP, 2, "link%d", card->info.link_type); |
1982 | QETH_DBF_TEXT_(SETUP, 2, " rc%d", iob->rc); | 1943 | QETH_DBF_TEXT_(SETUP, 2, " rc%d", iob->rc); |
1983 | return 0; | 1944 | return 0; |
1984 | } | 1945 | } |
@@ -2035,7 +1996,7 @@ static int qeth_ulp_setup_cb(struct qeth_card *card, struct qeth_reply *reply, | |||
2035 | QETH_DBF_TEXT(SETUP, 2, "olmlimit"); | 1996 | QETH_DBF_TEXT(SETUP, 2, "olmlimit"); |
2036 | dev_err(&card->gdev->dev, "A connection could not be " | 1997 | dev_err(&card->gdev->dev, "A connection could not be " |
2037 | "established because of an OLM limit\n"); | 1998 | "established because of an OLM limit\n"); |
2038 | rc = -EMLINK; | 1999 | iob->rc = -EMLINK; |
2039 | } | 2000 | } |
2040 | QETH_DBF_TEXT_(SETUP, 2, " rc%d", iob->rc); | 2001 | QETH_DBF_TEXT_(SETUP, 2, " rc%d", iob->rc); |
2041 | return rc; | 2002 | return rc; |
@@ -2335,7 +2296,7 @@ static void qeth_initialize_working_pool_list(struct qeth_card *card) | |||
2335 | { | 2296 | { |
2336 | struct qeth_buffer_pool_entry *entry; | 2297 | struct qeth_buffer_pool_entry *entry; |
2337 | 2298 | ||
2338 | QETH_DBF_TEXT(TRACE, 5, "inwrklst"); | 2299 | QETH_CARD_TEXT(card, 5, "inwrklst"); |
2339 | 2300 | ||
2340 | list_for_each_entry(entry, | 2301 | list_for_each_entry(entry, |
2341 | &card->qdio.init_pool.entry_list, init_list) { | 2302 | &card->qdio.init_pool.entry_list, init_list) { |
@@ -2522,7 +2483,7 @@ int qeth_send_ipa_cmd(struct qeth_card *card, struct qeth_cmd_buffer *iob, | |||
2522 | int rc; | 2483 | int rc; |
2523 | char prot_type; | 2484 | char prot_type; |
2524 | 2485 | ||
2525 | QETH_DBF_TEXT(TRACE, 4, "sendipa"); | 2486 | QETH_CARD_TEXT(card, 4, "sendipa"); |
2526 | 2487 | ||
2527 | if (card->options.layer2) | 2488 | if (card->options.layer2) |
2528 | if (card->info.type == QETH_CARD_TYPE_OSN) | 2489 | if (card->info.type == QETH_CARD_TYPE_OSN) |
@@ -2534,6 +2495,10 @@ int qeth_send_ipa_cmd(struct qeth_card *card, struct qeth_cmd_buffer *iob, | |||
2534 | qeth_prepare_ipa_cmd(card, iob, prot_type); | 2495 | qeth_prepare_ipa_cmd(card, iob, prot_type); |
2535 | rc = qeth_send_control_data(card, IPA_CMD_LENGTH, | 2496 | rc = qeth_send_control_data(card, IPA_CMD_LENGTH, |
2536 | iob, reply_cb, reply_param); | 2497 | iob, reply_cb, reply_param); |
2498 | if (rc == -ETIME) { | ||
2499 | qeth_clear_ipacmd_list(card); | ||
2500 | qeth_schedule_recovery(card); | ||
2501 | } | ||
2537 | return rc; | 2502 | return rc; |
2538 | } | 2503 | } |
2539 | EXPORT_SYMBOL_GPL(qeth_send_ipa_cmd); | 2504 | EXPORT_SYMBOL_GPL(qeth_send_ipa_cmd); |
@@ -2582,7 +2547,7 @@ int qeth_default_setadapterparms_cb(struct qeth_card *card, | |||
2582 | { | 2547 | { |
2583 | struct qeth_ipa_cmd *cmd; | 2548 | struct qeth_ipa_cmd *cmd; |
2584 | 2549 | ||
2585 | QETH_DBF_TEXT(TRACE, 4, "defadpcb"); | 2550 | QETH_CARD_TEXT(card, 4, "defadpcb"); |
2586 | 2551 | ||
2587 | cmd = (struct qeth_ipa_cmd *) data; | 2552 | cmd = (struct qeth_ipa_cmd *) data; |
2588 | if (cmd->hdr.return_code == 0) | 2553 | if (cmd->hdr.return_code == 0) |
@@ -2597,7 +2562,7 @@ static int qeth_query_setadapterparms_cb(struct qeth_card *card, | |||
2597 | { | 2562 | { |
2598 | struct qeth_ipa_cmd *cmd; | 2563 | struct qeth_ipa_cmd *cmd; |
2599 | 2564 | ||
2600 | QETH_DBF_TEXT(TRACE, 3, "quyadpcb"); | 2565 | QETH_CARD_TEXT(card, 3, "quyadpcb"); |
2601 | 2566 | ||
2602 | cmd = (struct qeth_ipa_cmd *) data; | 2567 | cmd = (struct qeth_ipa_cmd *) data; |
2603 | if (cmd->data.setadapterparms.data.query_cmds_supp.lan_type & 0x7f) { | 2568 | if (cmd->data.setadapterparms.data.query_cmds_supp.lan_type & 0x7f) { |
@@ -2633,7 +2598,7 @@ int qeth_query_setadapterparms(struct qeth_card *card) | |||
2633 | int rc; | 2598 | int rc; |
2634 | struct qeth_cmd_buffer *iob; | 2599 | struct qeth_cmd_buffer *iob; |
2635 | 2600 | ||
2636 | QETH_DBF_TEXT(TRACE, 3, "queryadp"); | 2601 | QETH_CARD_TEXT(card, 3, "queryadp"); |
2637 | iob = qeth_get_adapter_cmd(card, IPA_SETADP_QUERY_COMMANDS_SUPPORTED, | 2602 | iob = qeth_get_adapter_cmd(card, IPA_SETADP_QUERY_COMMANDS_SUPPORTED, |
2638 | sizeof(struct qeth_ipacmd_setadpparms)); | 2603 | sizeof(struct qeth_ipacmd_setadpparms)); |
2639 | rc = qeth_send_ipa_cmd(card, iob, qeth_query_setadapterparms_cb, NULL); | 2604 | rc = qeth_send_ipa_cmd(card, iob, qeth_query_setadapterparms_cb, NULL); |
@@ -2645,13 +2610,12 @@ int qeth_check_qdio_errors(struct qeth_card *card, struct qdio_buffer *buf, | |||
2645 | unsigned int qdio_error, const char *dbftext) | 2610 | unsigned int qdio_error, const char *dbftext) |
2646 | { | 2611 | { |
2647 | if (qdio_error) { | 2612 | if (qdio_error) { |
2648 | QETH_DBF_TEXT(TRACE, 2, dbftext); | 2613 | QETH_CARD_TEXT(card, 2, dbftext); |
2649 | QETH_DBF_TEXT(QERR, 2, dbftext); | 2614 | QETH_CARD_TEXT_(card, 2, " F15=%02X", |
2650 | QETH_DBF_TEXT_(QERR, 2, " F15=%02X", | ||
2651 | buf->element[15].flags & 0xff); | 2615 | buf->element[15].flags & 0xff); |
2652 | QETH_DBF_TEXT_(QERR, 2, " F14=%02X", | 2616 | QETH_CARD_TEXT_(card, 2, " F14=%02X", |
2653 | buf->element[14].flags & 0xff); | 2617 | buf->element[14].flags & 0xff); |
2654 | QETH_DBF_TEXT_(QERR, 2, " qerr=%X", qdio_error); | 2618 | QETH_CARD_TEXT_(card, 2, " qerr=%X", qdio_error); |
2655 | if ((buf->element[15].flags & 0xff) == 0x12) { | 2619 | if ((buf->element[15].flags & 0xff) == 0x12) { |
2656 | card->stats.rx_dropped++; | 2620 | card->stats.rx_dropped++; |
2657 | return 0; | 2621 | return 0; |
@@ -2717,8 +2681,7 @@ void qeth_queue_input_buffer(struct qeth_card *card, int index) | |||
2717 | if (rc) { | 2681 | if (rc) { |
2718 | dev_warn(&card->gdev->dev, | 2682 | dev_warn(&card->gdev->dev, |
2719 | "QDIO reported an error, rc=%i\n", rc); | 2683 | "QDIO reported an error, rc=%i\n", rc); |
2720 | QETH_DBF_TEXT(TRACE, 2, "qinberr"); | 2684 | QETH_CARD_TEXT(card, 2, "qinberr"); |
2721 | QETH_DBF_TEXT_(TRACE, 2, "%s", CARD_BUS_ID(card)); | ||
2722 | } | 2685 | } |
2723 | queue->next_buf_to_init = (queue->next_buf_to_init + count) % | 2686 | queue->next_buf_to_init = (queue->next_buf_to_init + count) % |
2724 | QDIO_MAX_BUFFERS_PER_Q; | 2687 | QDIO_MAX_BUFFERS_PER_Q; |
@@ -2731,7 +2694,7 @@ static int qeth_handle_send_error(struct qeth_card *card, | |||
2731 | { | 2694 | { |
2732 | int sbalf15 = buffer->buffer->element[15].flags & 0xff; | 2695 | int sbalf15 = buffer->buffer->element[15].flags & 0xff; |
2733 | 2696 | ||
2734 | QETH_DBF_TEXT(TRACE, 6, "hdsnderr"); | 2697 | QETH_CARD_TEXT(card, 6, "hdsnderr"); |
2735 | if (card->info.type == QETH_CARD_TYPE_IQD) { | 2698 | if (card->info.type == QETH_CARD_TYPE_IQD) { |
2736 | if (sbalf15 == 0) { | 2699 | if (sbalf15 == 0) { |
2737 | qdio_err = 0; | 2700 | qdio_err = 0; |
@@ -2747,9 +2710,8 @@ static int qeth_handle_send_error(struct qeth_card *card, | |||
2747 | if ((sbalf15 >= 15) && (sbalf15 <= 31)) | 2710 | if ((sbalf15 >= 15) && (sbalf15 <= 31)) |
2748 | return QETH_SEND_ERROR_RETRY; | 2711 | return QETH_SEND_ERROR_RETRY; |
2749 | 2712 | ||
2750 | QETH_DBF_TEXT(TRACE, 1, "lnkfail"); | 2713 | QETH_CARD_TEXT(card, 1, "lnkfail"); |
2751 | QETH_DBF_TEXT_(TRACE, 1, "%s", CARD_BUS_ID(card)); | 2714 | QETH_CARD_TEXT_(card, 1, "%04x %02x", |
2752 | QETH_DBF_TEXT_(TRACE, 1, "%04x %02x", | ||
2753 | (u16)qdio_err, (u8)sbalf15); | 2715 | (u16)qdio_err, (u8)sbalf15); |
2754 | return QETH_SEND_ERROR_LINK_FAILURE; | 2716 | return QETH_SEND_ERROR_LINK_FAILURE; |
2755 | } | 2717 | } |
@@ -2764,7 +2726,7 @@ static void qeth_switch_to_packing_if_needed(struct qeth_qdio_out_q *queue) | |||
2764 | if (atomic_read(&queue->used_buffers) | 2726 | if (atomic_read(&queue->used_buffers) |
2765 | >= QETH_HIGH_WATERMARK_PACK){ | 2727 | >= QETH_HIGH_WATERMARK_PACK){ |
2766 | /* switch non-PACKING -> PACKING */ | 2728 | /* switch non-PACKING -> PACKING */ |
2767 | QETH_DBF_TEXT(TRACE, 6, "np->pack"); | 2729 | QETH_CARD_TEXT(queue->card, 6, "np->pack"); |
2768 | if (queue->card->options.performance_stats) | 2730 | if (queue->card->options.performance_stats) |
2769 | queue->card->perf_stats.sc_dp_p++; | 2731 | queue->card->perf_stats.sc_dp_p++; |
2770 | queue->do_pack = 1; | 2732 | queue->do_pack = 1; |
@@ -2787,7 +2749,7 @@ static int qeth_switch_to_nonpacking_if_needed(struct qeth_qdio_out_q *queue) | |||
2787 | if (atomic_read(&queue->used_buffers) | 2749 | if (atomic_read(&queue->used_buffers) |
2788 | <= QETH_LOW_WATERMARK_PACK) { | 2750 | <= QETH_LOW_WATERMARK_PACK) { |
2789 | /* switch PACKING -> non-PACKING */ | 2751 | /* switch PACKING -> non-PACKING */ |
2790 | QETH_DBF_TEXT(TRACE, 6, "pack->np"); | 2752 | QETH_CARD_TEXT(queue->card, 6, "pack->np"); |
2791 | if (queue->card->options.performance_stats) | 2753 | if (queue->card->options.performance_stats) |
2792 | queue->card->perf_stats.sc_p_dp++; | 2754 | queue->card->perf_stats.sc_p_dp++; |
2793 | queue->do_pack = 0; | 2755 | queue->do_pack = 0; |
@@ -2896,9 +2858,8 @@ static void qeth_flush_buffers(struct qeth_qdio_out_q *queue, int index, | |||
2896 | /* ignore temporary SIGA errors without busy condition */ | 2858 | /* ignore temporary SIGA errors without busy condition */ |
2897 | if (rc == QDIO_ERROR_SIGA_TARGET) | 2859 | if (rc == QDIO_ERROR_SIGA_TARGET) |
2898 | return; | 2860 | return; |
2899 | QETH_DBF_TEXT(TRACE, 2, "flushbuf"); | 2861 | QETH_CARD_TEXT(queue->card, 2, "flushbuf"); |
2900 | QETH_DBF_TEXT_(TRACE, 2, " err%d", rc); | 2862 | QETH_CARD_TEXT_(queue->card, 2, " err%d", rc); |
2901 | QETH_DBF_TEXT_(TRACE, 2, "%s", CARD_DDEV_ID(queue->card)); | ||
2902 | 2863 | ||
2903 | /* this must not happen under normal circumstances. if it | 2864 | /* this must not happen under normal circumstances. if it |
2904 | * happens something is really wrong -> recover */ | 2865 | * happens something is really wrong -> recover */ |
@@ -2960,10 +2921,9 @@ void qeth_qdio_output_handler(struct ccw_device *ccwdev, | |||
2960 | int i; | 2921 | int i; |
2961 | unsigned qeth_send_err; | 2922 | unsigned qeth_send_err; |
2962 | 2923 | ||
2963 | QETH_DBF_TEXT(TRACE, 6, "qdouhdl"); | 2924 | QETH_CARD_TEXT(card, 6, "qdouhdl"); |
2964 | if (qdio_error & QDIO_ERROR_ACTIVATE_CHECK_CONDITION) { | 2925 | if (qdio_error & QDIO_ERROR_ACTIVATE_CHECK_CONDITION) { |
2965 | QETH_DBF_TEXT(TRACE, 2, "achkcond"); | 2926 | QETH_CARD_TEXT(card, 2, "achkcond"); |
2966 | QETH_DBF_TEXT_(TRACE, 2, "%s", CARD_BUS_ID(card)); | ||
2967 | netif_stop_queue(card->dev); | 2927 | netif_stop_queue(card->dev); |
2968 | qeth_schedule_recovery(card); | 2928 | qeth_schedule_recovery(card); |
2969 | return; | 2929 | return; |
@@ -3033,13 +2993,11 @@ EXPORT_SYMBOL_GPL(qeth_get_priority_queue); | |||
3033 | int qeth_get_elements_no(struct qeth_card *card, void *hdr, | 2993 | int qeth_get_elements_no(struct qeth_card *card, void *hdr, |
3034 | struct sk_buff *skb, int elems) | 2994 | struct sk_buff *skb, int elems) |
3035 | { | 2995 | { |
3036 | int elements_needed = 0; | 2996 | int dlen = skb->len - skb->data_len; |
2997 | int elements_needed = PFN_UP((unsigned long)skb->data + dlen - 1) - | ||
2998 | PFN_DOWN((unsigned long)skb->data); | ||
3037 | 2999 | ||
3038 | if (skb_shinfo(skb)->nr_frags > 0) | 3000 | elements_needed += skb_shinfo(skb)->nr_frags; |
3039 | elements_needed = (skb_shinfo(skb)->nr_frags + 1); | ||
3040 | if (elements_needed == 0) | ||
3041 | elements_needed = 1 + (((((unsigned long) skb->data) % | ||
3042 | PAGE_SIZE) + skb->len) >> PAGE_SHIFT); | ||
3043 | if ((elements_needed + elems) > QETH_MAX_BUFFER_ELEMENTS(card)) { | 3001 | if ((elements_needed + elems) > QETH_MAX_BUFFER_ELEMENTS(card)) { |
3044 | QETH_DBF_MESSAGE(2, "Invalid size of IP packet " | 3002 | QETH_DBF_MESSAGE(2, "Invalid size of IP packet " |
3045 | "(Number=%d / Length=%d). Discarded.\n", | 3003 | "(Number=%d / Length=%d). Discarded.\n", |
@@ -3050,15 +3008,35 @@ int qeth_get_elements_no(struct qeth_card *card, void *hdr, | |||
3050 | } | 3008 | } |
3051 | EXPORT_SYMBOL_GPL(qeth_get_elements_no); | 3009 | EXPORT_SYMBOL_GPL(qeth_get_elements_no); |
3052 | 3010 | ||
3011 | int qeth_hdr_chk_and_bounce(struct sk_buff *skb, int len) | ||
3012 | { | ||
3013 | int hroom, inpage, rest; | ||
3014 | |||
3015 | if (((unsigned long)skb->data & PAGE_MASK) != | ||
3016 | (((unsigned long)skb->data + len - 1) & PAGE_MASK)) { | ||
3017 | hroom = skb_headroom(skb); | ||
3018 | inpage = PAGE_SIZE - ((unsigned long) skb->data % PAGE_SIZE); | ||
3019 | rest = len - inpage; | ||
3020 | if (rest > hroom) | ||
3021 | return 1; | ||
3022 | memmove(skb->data - rest, skb->data, skb->len - skb->data_len); | ||
3023 | skb->data -= rest; | ||
3024 | QETH_DBF_MESSAGE(2, "skb bounce len: %d rest: %d\n", len, rest); | ||
3025 | } | ||
3026 | return 0; | ||
3027 | } | ||
3028 | EXPORT_SYMBOL_GPL(qeth_hdr_chk_and_bounce); | ||
3029 | |||
3053 | static inline void __qeth_fill_buffer(struct sk_buff *skb, | 3030 | static inline void __qeth_fill_buffer(struct sk_buff *skb, |
3054 | struct qdio_buffer *buffer, int is_tso, int *next_element_to_fill, | 3031 | struct qdio_buffer *buffer, int is_tso, int *next_element_to_fill, |
3055 | int offset) | 3032 | int offset) |
3056 | { | 3033 | { |
3057 | int length = skb->len; | 3034 | int length = skb->len - skb->data_len; |
3058 | int length_here; | 3035 | int length_here; |
3059 | int element; | 3036 | int element; |
3060 | char *data; | 3037 | char *data; |
3061 | int first_lap ; | 3038 | int first_lap, cnt; |
3039 | struct skb_frag_struct *frag; | ||
3062 | 3040 | ||
3063 | element = *next_element_to_fill; | 3041 | element = *next_element_to_fill; |
3064 | data = skb->data; | 3042 | data = skb->data; |
@@ -3081,10 +3059,14 @@ static inline void __qeth_fill_buffer(struct sk_buff *skb, | |||
3081 | length -= length_here; | 3059 | length -= length_here; |
3082 | if (!length) { | 3060 | if (!length) { |
3083 | if (first_lap) | 3061 | if (first_lap) |
3084 | buffer->element[element].flags = 0; | 3062 | if (skb_shinfo(skb)->nr_frags) |
3063 | buffer->element[element].flags = | ||
3064 | SBAL_FLAGS_FIRST_FRAG; | ||
3065 | else | ||
3066 | buffer->element[element].flags = 0; | ||
3085 | else | 3067 | else |
3086 | buffer->element[element].flags = | 3068 | buffer->element[element].flags = |
3087 | SBAL_FLAGS_LAST_FRAG; | 3069 | SBAL_FLAGS_MIDDLE_FRAG; |
3088 | } else { | 3070 | } else { |
3089 | if (first_lap) | 3071 | if (first_lap) |
3090 | buffer->element[element].flags = | 3072 | buffer->element[element].flags = |
@@ -3097,6 +3079,18 @@ static inline void __qeth_fill_buffer(struct sk_buff *skb, | |||
3097 | element++; | 3079 | element++; |
3098 | first_lap = 0; | 3080 | first_lap = 0; |
3099 | } | 3081 | } |
3082 | |||
3083 | for (cnt = 0; cnt < skb_shinfo(skb)->nr_frags; cnt++) { | ||
3084 | frag = &skb_shinfo(skb)->frags[cnt]; | ||
3085 | buffer->element[element].addr = (char *)page_to_phys(frag->page) | ||
3086 | + frag->page_offset; | ||
3087 | buffer->element[element].length = frag->size; | ||
3088 | buffer->element[element].flags = SBAL_FLAGS_MIDDLE_FRAG; | ||
3089 | element++; | ||
3090 | } | ||
3091 | |||
3092 | if (buffer->element[element - 1].flags) | ||
3093 | buffer->element[element - 1].flags = SBAL_FLAGS_LAST_FRAG; | ||
3100 | *next_element_to_fill = element; | 3094 | *next_element_to_fill = element; |
3101 | } | 3095 | } |
3102 | 3096 | ||
@@ -3137,20 +3131,16 @@ static inline int qeth_fill_buffer(struct qeth_qdio_out_q *queue, | |||
3137 | buf->next_element_to_fill++; | 3131 | buf->next_element_to_fill++; |
3138 | } | 3132 | } |
3139 | 3133 | ||
3140 | if (skb_shinfo(skb)->nr_frags == 0) | 3134 | __qeth_fill_buffer(skb, buffer, large_send, |
3141 | __qeth_fill_buffer(skb, buffer, large_send, | 3135 | (int *)&buf->next_element_to_fill, offset); |
3142 | (int *)&buf->next_element_to_fill, offset); | ||
3143 | else | ||
3144 | __qeth_fill_buffer_frag(skb, buffer, large_send, | ||
3145 | (int *)&buf->next_element_to_fill); | ||
3146 | 3136 | ||
3147 | if (!queue->do_pack) { | 3137 | if (!queue->do_pack) { |
3148 | QETH_DBF_TEXT(TRACE, 6, "fillbfnp"); | 3138 | QETH_CARD_TEXT(queue->card, 6, "fillbfnp"); |
3149 | /* set state to PRIMED -> will be flushed */ | 3139 | /* set state to PRIMED -> will be flushed */ |
3150 | atomic_set(&buf->state, QETH_QDIO_BUF_PRIMED); | 3140 | atomic_set(&buf->state, QETH_QDIO_BUF_PRIMED); |
3151 | flush_cnt = 1; | 3141 | flush_cnt = 1; |
3152 | } else { | 3142 | } else { |
3153 | QETH_DBF_TEXT(TRACE, 6, "fillbfpa"); | 3143 | QETH_CARD_TEXT(queue->card, 6, "fillbfpa"); |
3154 | if (queue->card->options.performance_stats) | 3144 | if (queue->card->options.performance_stats) |
3155 | queue->card->perf_stats.skbs_sent_pack++; | 3145 | queue->card->perf_stats.skbs_sent_pack++; |
3156 | if (buf->next_element_to_fill >= | 3146 | if (buf->next_element_to_fill >= |
@@ -3210,7 +3200,7 @@ int qeth_do_send_packet_fast(struct qeth_card *card, | |||
3210 | rc = dev_queue_xmit(skb); | 3200 | rc = dev_queue_xmit(skb); |
3211 | } else { | 3201 | } else { |
3212 | dev_kfree_skb_any(skb); | 3202 | dev_kfree_skb_any(skb); |
3213 | QETH_DBF_TEXT(QERR, 2, "qrdrop"); | 3203 | QETH_CARD_TEXT(card, 2, "qrdrop"); |
3214 | } | 3204 | } |
3215 | } | 3205 | } |
3216 | return 0; | 3206 | return 0; |
@@ -3312,14 +3302,14 @@ static int qeth_setadp_promisc_mode_cb(struct qeth_card *card, | |||
3312 | struct qeth_ipa_cmd *cmd; | 3302 | struct qeth_ipa_cmd *cmd; |
3313 | struct qeth_ipacmd_setadpparms *setparms; | 3303 | struct qeth_ipacmd_setadpparms *setparms; |
3314 | 3304 | ||
3315 | QETH_DBF_TEXT(TRACE, 4, "prmadpcb"); | 3305 | QETH_CARD_TEXT(card, 4, "prmadpcb"); |
3316 | 3306 | ||
3317 | cmd = (struct qeth_ipa_cmd *) data; | 3307 | cmd = (struct qeth_ipa_cmd *) data; |
3318 | setparms = &(cmd->data.setadapterparms); | 3308 | setparms = &(cmd->data.setadapterparms); |
3319 | 3309 | ||
3320 | qeth_default_setadapterparms_cb(card, reply, (unsigned long)cmd); | 3310 | qeth_default_setadapterparms_cb(card, reply, (unsigned long)cmd); |
3321 | if (cmd->hdr.return_code) { | 3311 | if (cmd->hdr.return_code) { |
3322 | QETH_DBF_TEXT_(TRACE, 4, "prmrc%2.2x", cmd->hdr.return_code); | 3312 | QETH_CARD_TEXT_(card, 4, "prmrc%2.2x", cmd->hdr.return_code); |
3323 | setparms->data.mode = SET_PROMISC_MODE_OFF; | 3313 | setparms->data.mode = SET_PROMISC_MODE_OFF; |
3324 | } | 3314 | } |
3325 | card->info.promisc_mode = setparms->data.mode; | 3315 | card->info.promisc_mode = setparms->data.mode; |
@@ -3333,7 +3323,7 @@ void qeth_setadp_promisc_mode(struct qeth_card *card) | |||
3333 | struct qeth_cmd_buffer *iob; | 3323 | struct qeth_cmd_buffer *iob; |
3334 | struct qeth_ipa_cmd *cmd; | 3324 | struct qeth_ipa_cmd *cmd; |
3335 | 3325 | ||
3336 | QETH_DBF_TEXT(TRACE, 4, "setprom"); | 3326 | QETH_CARD_TEXT(card, 4, "setprom"); |
3337 | 3327 | ||
3338 | if (((dev->flags & IFF_PROMISC) && | 3328 | if (((dev->flags & IFF_PROMISC) && |
3339 | (card->info.promisc_mode == SET_PROMISC_MODE_ON)) || | 3329 | (card->info.promisc_mode == SET_PROMISC_MODE_ON)) || |
@@ -3343,7 +3333,7 @@ void qeth_setadp_promisc_mode(struct qeth_card *card) | |||
3343 | mode = SET_PROMISC_MODE_OFF; | 3333 | mode = SET_PROMISC_MODE_OFF; |
3344 | if (dev->flags & IFF_PROMISC) | 3334 | if (dev->flags & IFF_PROMISC) |
3345 | mode = SET_PROMISC_MODE_ON; | 3335 | mode = SET_PROMISC_MODE_ON; |
3346 | QETH_DBF_TEXT_(TRACE, 4, "mode:%x", mode); | 3336 | QETH_CARD_TEXT_(card, 4, "mode:%x", mode); |
3347 | 3337 | ||
3348 | iob = qeth_get_adapter_cmd(card, IPA_SETADP_SET_PROMISC_MODE, | 3338 | iob = qeth_get_adapter_cmd(card, IPA_SETADP_SET_PROMISC_MODE, |
3349 | sizeof(struct qeth_ipacmd_setadpparms)); | 3339 | sizeof(struct qeth_ipacmd_setadpparms)); |
@@ -3360,9 +3350,9 @@ int qeth_change_mtu(struct net_device *dev, int new_mtu) | |||
3360 | 3350 | ||
3361 | card = dev->ml_priv; | 3351 | card = dev->ml_priv; |
3362 | 3352 | ||
3363 | QETH_DBF_TEXT(TRACE, 4, "chgmtu"); | 3353 | QETH_CARD_TEXT(card, 4, "chgmtu"); |
3364 | sprintf(dbf_text, "%8x", new_mtu); | 3354 | sprintf(dbf_text, "%8x", new_mtu); |
3365 | QETH_DBF_TEXT(TRACE, 4, dbf_text); | 3355 | QETH_CARD_TEXT(card, 4, dbf_text); |
3366 | 3356 | ||
3367 | if (new_mtu < 64) | 3357 | if (new_mtu < 64) |
3368 | return -EINVAL; | 3358 | return -EINVAL; |
@@ -3382,7 +3372,7 @@ struct net_device_stats *qeth_get_stats(struct net_device *dev) | |||
3382 | 3372 | ||
3383 | card = dev->ml_priv; | 3373 | card = dev->ml_priv; |
3384 | 3374 | ||
3385 | QETH_DBF_TEXT(TRACE, 5, "getstat"); | 3375 | QETH_CARD_TEXT(card, 5, "getstat"); |
3386 | 3376 | ||
3387 | return &card->stats; | 3377 | return &card->stats; |
3388 | } | 3378 | } |
@@ -3393,7 +3383,7 @@ static int qeth_setadpparms_change_macaddr_cb(struct qeth_card *card, | |||
3393 | { | 3383 | { |
3394 | struct qeth_ipa_cmd *cmd; | 3384 | struct qeth_ipa_cmd *cmd; |
3395 | 3385 | ||
3396 | QETH_DBF_TEXT(TRACE, 4, "chgmaccb"); | 3386 | QETH_CARD_TEXT(card, 4, "chgmaccb"); |
3397 | 3387 | ||
3398 | cmd = (struct qeth_ipa_cmd *) data; | 3388 | cmd = (struct qeth_ipa_cmd *) data; |
3399 | if (!card->options.layer2 || | 3389 | if (!card->options.layer2 || |
@@ -3413,7 +3403,7 @@ int qeth_setadpparms_change_macaddr(struct qeth_card *card) | |||
3413 | struct qeth_cmd_buffer *iob; | 3403 | struct qeth_cmd_buffer *iob; |
3414 | struct qeth_ipa_cmd *cmd; | 3404 | struct qeth_ipa_cmd *cmd; |
3415 | 3405 | ||
3416 | QETH_DBF_TEXT(TRACE, 4, "chgmac"); | 3406 | QETH_CARD_TEXT(card, 4, "chgmac"); |
3417 | 3407 | ||
3418 | iob = qeth_get_adapter_cmd(card, IPA_SETADP_ALTER_MAC_ADDRESS, | 3408 | iob = qeth_get_adapter_cmd(card, IPA_SETADP_ALTER_MAC_ADDRESS, |
3419 | sizeof(struct qeth_ipacmd_setadpparms)); | 3409 | sizeof(struct qeth_ipacmd_setadpparms)); |
@@ -3433,9 +3423,8 @@ static int qeth_setadpparms_set_access_ctrl_cb(struct qeth_card *card, | |||
3433 | { | 3423 | { |
3434 | struct qeth_ipa_cmd *cmd; | 3424 | struct qeth_ipa_cmd *cmd; |
3435 | struct qeth_set_access_ctrl *access_ctrl_req; | 3425 | struct qeth_set_access_ctrl *access_ctrl_req; |
3436 | int rc; | ||
3437 | 3426 | ||
3438 | QETH_DBF_TEXT(TRACE, 4, "setaccb"); | 3427 | QETH_CARD_TEXT(card, 4, "setaccb"); |
3439 | 3428 | ||
3440 | cmd = (struct qeth_ipa_cmd *) data; | 3429 | cmd = (struct qeth_ipa_cmd *) data; |
3441 | access_ctrl_req = &cmd->data.setadapterparms.data.set_access_ctrl; | 3430 | access_ctrl_req = &cmd->data.setadapterparms.data.set_access_ctrl; |
@@ -3460,7 +3449,6 @@ static int qeth_setadpparms_set_access_ctrl_cb(struct qeth_card *card, | |||
3460 | card->gdev->dev.kobj.name, | 3449 | card->gdev->dev.kobj.name, |
3461 | access_ctrl_req->subcmd_code, | 3450 | access_ctrl_req->subcmd_code, |
3462 | cmd->data.setadapterparms.hdr.return_code); | 3451 | cmd->data.setadapterparms.hdr.return_code); |
3463 | rc = 0; | ||
3464 | break; | 3452 | break; |
3465 | } | 3453 | } |
3466 | case SET_ACCESS_CTRL_RC_NOT_SUPPORTED: | 3454 | case SET_ACCESS_CTRL_RC_NOT_SUPPORTED: |
@@ -3474,7 +3462,6 @@ static int qeth_setadpparms_set_access_ctrl_cb(struct qeth_card *card, | |||
3474 | 3462 | ||
3475 | /* ensure isolation mode is "none" */ | 3463 | /* ensure isolation mode is "none" */ |
3476 | card->options.isolation = ISOLATION_MODE_NONE; | 3464 | card->options.isolation = ISOLATION_MODE_NONE; |
3477 | rc = -EOPNOTSUPP; | ||
3478 | break; | 3465 | break; |
3479 | } | 3466 | } |
3480 | case SET_ACCESS_CTRL_RC_NONE_SHARED_ADAPTER: | 3467 | case SET_ACCESS_CTRL_RC_NONE_SHARED_ADAPTER: |
@@ -3489,7 +3476,6 @@ static int qeth_setadpparms_set_access_ctrl_cb(struct qeth_card *card, | |||
3489 | 3476 | ||
3490 | /* ensure isolation mode is "none" */ | 3477 | /* ensure isolation mode is "none" */ |
3491 | card->options.isolation = ISOLATION_MODE_NONE; | 3478 | card->options.isolation = ISOLATION_MODE_NONE; |
3492 | rc = -EOPNOTSUPP; | ||
3493 | break; | 3479 | break; |
3494 | } | 3480 | } |
3495 | case SET_ACCESS_CTRL_RC_ACTIVE_CHECKSUM_OFF: | 3481 | case SET_ACCESS_CTRL_RC_ACTIVE_CHECKSUM_OFF: |
@@ -3503,7 +3489,6 @@ static int qeth_setadpparms_set_access_ctrl_cb(struct qeth_card *card, | |||
3503 | 3489 | ||
3504 | /* ensure isolation mode is "none" */ | 3490 | /* ensure isolation mode is "none" */ |
3505 | card->options.isolation = ISOLATION_MODE_NONE; | 3491 | card->options.isolation = ISOLATION_MODE_NONE; |
3506 | rc = -EPERM; | ||
3507 | break; | 3492 | break; |
3508 | } | 3493 | } |
3509 | default: | 3494 | default: |
@@ -3517,12 +3502,11 @@ static int qeth_setadpparms_set_access_ctrl_cb(struct qeth_card *card, | |||
3517 | 3502 | ||
3518 | /* ensure isolation mode is "none" */ | 3503 | /* ensure isolation mode is "none" */ |
3519 | card->options.isolation = ISOLATION_MODE_NONE; | 3504 | card->options.isolation = ISOLATION_MODE_NONE; |
3520 | rc = 0; | ||
3521 | break; | 3505 | break; |
3522 | } | 3506 | } |
3523 | } | 3507 | } |
3524 | qeth_default_setadapterparms_cb(card, reply, (unsigned long) cmd); | 3508 | qeth_default_setadapterparms_cb(card, reply, (unsigned long) cmd); |
3525 | return rc; | 3509 | return 0; |
3526 | } | 3510 | } |
3527 | 3511 | ||
3528 | static int qeth_setadpparms_set_access_ctrl(struct qeth_card *card, | 3512 | static int qeth_setadpparms_set_access_ctrl(struct qeth_card *card, |
@@ -3533,7 +3517,7 @@ static int qeth_setadpparms_set_access_ctrl(struct qeth_card *card, | |||
3533 | struct qeth_ipa_cmd *cmd; | 3517 | struct qeth_ipa_cmd *cmd; |
3534 | struct qeth_set_access_ctrl *access_ctrl_req; | 3518 | struct qeth_set_access_ctrl *access_ctrl_req; |
3535 | 3519 | ||
3536 | QETH_DBF_TEXT(TRACE, 4, "setacctl"); | 3520 | QETH_CARD_TEXT(card, 4, "setacctl"); |
3537 | 3521 | ||
3538 | QETH_DBF_TEXT_(SETUP, 2, "setacctl"); | 3522 | QETH_DBF_TEXT_(SETUP, 2, "setacctl"); |
3539 | QETH_DBF_TEXT_(SETUP, 2, "%s", card->gdev->dev.kobj.name); | 3523 | QETH_DBF_TEXT_(SETUP, 2, "%s", card->gdev->dev.kobj.name); |
@@ -3555,7 +3539,7 @@ int qeth_set_access_ctrl_online(struct qeth_card *card) | |||
3555 | { | 3539 | { |
3556 | int rc = 0; | 3540 | int rc = 0; |
3557 | 3541 | ||
3558 | QETH_DBF_TEXT(TRACE, 4, "setactlo"); | 3542 | QETH_CARD_TEXT(card, 4, "setactlo"); |
3559 | 3543 | ||
3560 | if ((card->info.type == QETH_CARD_TYPE_OSD || | 3544 | if ((card->info.type == QETH_CARD_TYPE_OSD || |
3561 | card->info.type == QETH_CARD_TYPE_OSX) && | 3545 | card->info.type == QETH_CARD_TYPE_OSX) && |
@@ -3583,8 +3567,8 @@ void qeth_tx_timeout(struct net_device *dev) | |||
3583 | { | 3567 | { |
3584 | struct qeth_card *card; | 3568 | struct qeth_card *card; |
3585 | 3569 | ||
3586 | QETH_DBF_TEXT(TRACE, 4, "txtimeo"); | ||
3587 | card = dev->ml_priv; | 3570 | card = dev->ml_priv; |
3571 | QETH_CARD_TEXT(card, 4, "txtimeo"); | ||
3588 | card->stats.tx_errors++; | 3572 | card->stats.tx_errors++; |
3589 | qeth_schedule_recovery(card); | 3573 | qeth_schedule_recovery(card); |
3590 | } | 3574 | } |
@@ -3663,7 +3647,7 @@ static int qeth_send_ipa_snmp_cmd(struct qeth_card *card, | |||
3663 | { | 3647 | { |
3664 | u16 s1, s2; | 3648 | u16 s1, s2; |
3665 | 3649 | ||
3666 | QETH_DBF_TEXT(TRACE, 4, "sendsnmp"); | 3650 | QETH_CARD_TEXT(card, 4, "sendsnmp"); |
3667 | 3651 | ||
3668 | memcpy(iob->data, IPA_PDU_HEADER, IPA_PDU_HEADER_SIZE); | 3652 | memcpy(iob->data, IPA_PDU_HEADER, IPA_PDU_HEADER_SIZE); |
3669 | memcpy(QETH_IPA_CMD_DEST_ADDR(iob->data), | 3653 | memcpy(QETH_IPA_CMD_DEST_ADDR(iob->data), |
@@ -3688,7 +3672,7 @@ static int qeth_snmp_command_cb(struct qeth_card *card, | |||
3688 | unsigned char *data; | 3672 | unsigned char *data; |
3689 | __u16 data_len; | 3673 | __u16 data_len; |
3690 | 3674 | ||
3691 | QETH_DBF_TEXT(TRACE, 3, "snpcmdcb"); | 3675 | QETH_CARD_TEXT(card, 3, "snpcmdcb"); |
3692 | 3676 | ||
3693 | cmd = (struct qeth_ipa_cmd *) sdata; | 3677 | cmd = (struct qeth_ipa_cmd *) sdata; |
3694 | data = (unsigned char *)((char *)cmd - reply->offset); | 3678 | data = (unsigned char *)((char *)cmd - reply->offset); |
@@ -3696,13 +3680,13 @@ static int qeth_snmp_command_cb(struct qeth_card *card, | |||
3696 | snmp = &cmd->data.setadapterparms.data.snmp; | 3680 | snmp = &cmd->data.setadapterparms.data.snmp; |
3697 | 3681 | ||
3698 | if (cmd->hdr.return_code) { | 3682 | if (cmd->hdr.return_code) { |
3699 | QETH_DBF_TEXT_(TRACE, 4, "scer1%i", cmd->hdr.return_code); | 3683 | QETH_CARD_TEXT_(card, 4, "scer1%i", cmd->hdr.return_code); |
3700 | return 0; | 3684 | return 0; |
3701 | } | 3685 | } |
3702 | if (cmd->data.setadapterparms.hdr.return_code) { | 3686 | if (cmd->data.setadapterparms.hdr.return_code) { |
3703 | cmd->hdr.return_code = | 3687 | cmd->hdr.return_code = |
3704 | cmd->data.setadapterparms.hdr.return_code; | 3688 | cmd->data.setadapterparms.hdr.return_code; |
3705 | QETH_DBF_TEXT_(TRACE, 4, "scer2%i", cmd->hdr.return_code); | 3689 | QETH_CARD_TEXT_(card, 4, "scer2%i", cmd->hdr.return_code); |
3706 | return 0; | 3690 | return 0; |
3707 | } | 3691 | } |
3708 | data_len = *((__u16 *)QETH_IPA_PDU_LEN_PDU1(data)); | 3692 | data_len = *((__u16 *)QETH_IPA_PDU_LEN_PDU1(data)); |
@@ -3713,13 +3697,13 @@ static int qeth_snmp_command_cb(struct qeth_card *card, | |||
3713 | 3697 | ||
3714 | /* check if there is enough room in userspace */ | 3698 | /* check if there is enough room in userspace */ |
3715 | if ((qinfo->udata_len - qinfo->udata_offset) < data_len) { | 3699 | if ((qinfo->udata_len - qinfo->udata_offset) < data_len) { |
3716 | QETH_DBF_TEXT_(TRACE, 4, "scer3%i", -ENOMEM); | 3700 | QETH_CARD_TEXT_(card, 4, "scer3%i", -ENOMEM); |
3717 | cmd->hdr.return_code = -ENOMEM; | 3701 | cmd->hdr.return_code = -ENOMEM; |
3718 | return 0; | 3702 | return 0; |
3719 | } | 3703 | } |
3720 | QETH_DBF_TEXT_(TRACE, 4, "snore%i", | 3704 | QETH_CARD_TEXT_(card, 4, "snore%i", |
3721 | cmd->data.setadapterparms.hdr.used_total); | 3705 | cmd->data.setadapterparms.hdr.used_total); |
3722 | QETH_DBF_TEXT_(TRACE, 4, "sseqn%i", | 3706 | QETH_CARD_TEXT_(card, 4, "sseqn%i", |
3723 | cmd->data.setadapterparms.hdr.seq_no); | 3707 | cmd->data.setadapterparms.hdr.seq_no); |
3724 | /*copy entries to user buffer*/ | 3708 | /*copy entries to user buffer*/ |
3725 | if (cmd->data.setadapterparms.hdr.seq_no == 1) { | 3709 | if (cmd->data.setadapterparms.hdr.seq_no == 1) { |
@@ -3733,9 +3717,9 @@ static int qeth_snmp_command_cb(struct qeth_card *card, | |||
3733 | } | 3717 | } |
3734 | qinfo->udata_offset += data_len; | 3718 | qinfo->udata_offset += data_len; |
3735 | /* check if all replies received ... */ | 3719 | /* check if all replies received ... */ |
3736 | QETH_DBF_TEXT_(TRACE, 4, "srtot%i", | 3720 | QETH_CARD_TEXT_(card, 4, "srtot%i", |
3737 | cmd->data.setadapterparms.hdr.used_total); | 3721 | cmd->data.setadapterparms.hdr.used_total); |
3738 | QETH_DBF_TEXT_(TRACE, 4, "srseq%i", | 3722 | QETH_CARD_TEXT_(card, 4, "srseq%i", |
3739 | cmd->data.setadapterparms.hdr.seq_no); | 3723 | cmd->data.setadapterparms.hdr.seq_no); |
3740 | if (cmd->data.setadapterparms.hdr.seq_no < | 3724 | if (cmd->data.setadapterparms.hdr.seq_no < |
3741 | cmd->data.setadapterparms.hdr.used_total) | 3725 | cmd->data.setadapterparms.hdr.used_total) |
@@ -3752,7 +3736,7 @@ int qeth_snmp_command(struct qeth_card *card, char __user *udata) | |||
3752 | struct qeth_arp_query_info qinfo = {0, }; | 3736 | struct qeth_arp_query_info qinfo = {0, }; |
3753 | int rc = 0; | 3737 | int rc = 0; |
3754 | 3738 | ||
3755 | QETH_DBF_TEXT(TRACE, 3, "snmpcmd"); | 3739 | QETH_CARD_TEXT(card, 3, "snmpcmd"); |
3756 | 3740 | ||
3757 | if (card->info.guestlan) | 3741 | if (card->info.guestlan) |
3758 | return -EOPNOTSUPP; | 3742 | return -EOPNOTSUPP; |
@@ -3764,15 +3748,10 @@ int qeth_snmp_command(struct qeth_card *card, char __user *udata) | |||
3764 | /* skip 4 bytes (data_len struct member) to get req_len */ | 3748 | /* skip 4 bytes (data_len struct member) to get req_len */ |
3765 | if (copy_from_user(&req_len, udata + sizeof(int), sizeof(int))) | 3749 | if (copy_from_user(&req_len, udata + sizeof(int), sizeof(int))) |
3766 | return -EFAULT; | 3750 | return -EFAULT; |
3767 | ureq = kmalloc(req_len+sizeof(struct qeth_snmp_ureq_hdr), GFP_KERNEL); | 3751 | ureq = memdup_user(udata, req_len + sizeof(struct qeth_snmp_ureq_hdr)); |
3768 | if (!ureq) { | 3752 | if (IS_ERR(ureq)) { |
3769 | QETH_DBF_TEXT(TRACE, 2, "snmpnome"); | 3753 | QETH_CARD_TEXT(card, 2, "snmpnome"); |
3770 | return -ENOMEM; | 3754 | return PTR_ERR(ureq); |
3771 | } | ||
3772 | if (copy_from_user(ureq, udata, | ||
3773 | req_len + sizeof(struct qeth_snmp_ureq_hdr))) { | ||
3774 | kfree(ureq); | ||
3775 | return -EFAULT; | ||
3776 | } | 3755 | } |
3777 | qinfo.udata_len = ureq->hdr.data_len; | 3756 | qinfo.udata_len = ureq->hdr.data_len; |
3778 | qinfo.udata = kzalloc(qinfo.udata_len, GFP_KERNEL); | 3757 | qinfo.udata = kzalloc(qinfo.udata_len, GFP_KERNEL); |
@@ -3991,6 +3970,7 @@ retriable: | |||
3991 | else | 3970 | else |
3992 | goto retry; | 3971 | goto retry; |
3993 | } | 3972 | } |
3973 | card->read_or_write_problem = 0; | ||
3994 | rc = qeth_mpc_initialize(card); | 3974 | rc = qeth_mpc_initialize(card); |
3995 | if (rc) { | 3975 | if (rc) { |
3996 | QETH_DBF_TEXT_(SETUP, 2, "5err%d", rc); | 3976 | QETH_DBF_TEXT_(SETUP, 2, "5err%d", rc); |
@@ -4120,13 +4100,8 @@ struct sk_buff *qeth_core_get_next_skb(struct qeth_card *card, | |||
4120 | skb_len -= data_len; | 4100 | skb_len -= data_len; |
4121 | if (skb_len) { | 4101 | if (skb_len) { |
4122 | if (qeth_is_last_sbale(element)) { | 4102 | if (qeth_is_last_sbale(element)) { |
4123 | QETH_DBF_TEXT(TRACE, 4, "unexeob"); | 4103 | QETH_CARD_TEXT(card, 4, "unexeob"); |
4124 | QETH_DBF_TEXT_(TRACE, 4, "%s", | 4104 | QETH_CARD_HEX(card, 2, buffer, sizeof(void *)); |
4125 | CARD_BUS_ID(card)); | ||
4126 | QETH_DBF_TEXT(QERR, 2, "unexeob"); | ||
4127 | QETH_DBF_TEXT_(QERR, 2, "%s", | ||
4128 | CARD_BUS_ID(card)); | ||
4129 | QETH_DBF_HEX(MISC, 4, buffer, sizeof(*buffer)); | ||
4130 | dev_kfree_skb_any(skb); | 4105 | dev_kfree_skb_any(skb); |
4131 | card->stats.rx_errors++; | 4106 | card->stats.rx_errors++; |
4132 | return NULL; | 4107 | return NULL; |
@@ -4147,8 +4122,7 @@ struct sk_buff *qeth_core_get_next_skb(struct qeth_card *card, | |||
4147 | return skb; | 4122 | return skb; |
4148 | no_mem: | 4123 | no_mem: |
4149 | if (net_ratelimit()) { | 4124 | if (net_ratelimit()) { |
4150 | QETH_DBF_TEXT(TRACE, 2, "noskbmem"); | 4125 | QETH_CARD_TEXT(card, 2, "noskbmem"); |
4151 | QETH_DBF_TEXT_(TRACE, 2, "%s", CARD_BUS_ID(card)); | ||
4152 | } | 4126 | } |
4153 | card->stats.rx_dropped++; | 4127 | card->stats.rx_dropped++; |
4154 | return NULL; | 4128 | return NULL; |
@@ -4164,17 +4138,17 @@ static void qeth_unregister_dbf_views(void) | |||
4164 | } | 4138 | } |
4165 | } | 4139 | } |
4166 | 4140 | ||
4167 | void qeth_dbf_longtext(enum qeth_dbf_names dbf_nix, int level, char *fmt, ...) | 4141 | void qeth_dbf_longtext(debug_info_t *id, int level, char *fmt, ...) |
4168 | { | 4142 | { |
4169 | char dbf_txt_buf[32]; | 4143 | char dbf_txt_buf[32]; |
4170 | va_list args; | 4144 | va_list args; |
4171 | 4145 | ||
4172 | if (level > (qeth_dbf[dbf_nix].id)->level) | 4146 | if (level > id->level) |
4173 | return; | 4147 | return; |
4174 | va_start(args, fmt); | 4148 | va_start(args, fmt); |
4175 | vsnprintf(dbf_txt_buf, sizeof(dbf_txt_buf), fmt, args); | 4149 | vsnprintf(dbf_txt_buf, sizeof(dbf_txt_buf), fmt, args); |
4176 | va_end(args); | 4150 | va_end(args); |
4177 | debug_text_event(qeth_dbf[dbf_nix].id, level, dbf_txt_buf); | 4151 | debug_text_event(id, level, dbf_txt_buf); |
4178 | } | 4152 | } |
4179 | EXPORT_SYMBOL_GPL(qeth_dbf_longtext); | 4153 | EXPORT_SYMBOL_GPL(qeth_dbf_longtext); |
4180 | 4154 | ||
@@ -4282,6 +4256,7 @@ static int qeth_core_probe_device(struct ccwgroup_device *gdev) | |||
4282 | struct device *dev; | 4256 | struct device *dev; |
4283 | int rc; | 4257 | int rc; |
4284 | unsigned long flags; | 4258 | unsigned long flags; |
4259 | char dbf_name[20]; | ||
4285 | 4260 | ||
4286 | QETH_DBF_TEXT(SETUP, 2, "probedev"); | 4261 | QETH_DBF_TEXT(SETUP, 2, "probedev"); |
4287 | 4262 | ||
@@ -4297,6 +4272,17 @@ static int qeth_core_probe_device(struct ccwgroup_device *gdev) | |||
4297 | rc = -ENOMEM; | 4272 | rc = -ENOMEM; |
4298 | goto err_dev; | 4273 | goto err_dev; |
4299 | } | 4274 | } |
4275 | |||
4276 | snprintf(dbf_name, sizeof(dbf_name), "qeth_card_%s", | ||
4277 | dev_name(&gdev->dev)); | ||
4278 | card->debug = debug_register(dbf_name, 2, 1, 8); | ||
4279 | if (!card->debug) { | ||
4280 | QETH_DBF_TEXT_(SETUP, 2, "%s", "qcdbf"); | ||
4281 | rc = -ENOMEM; | ||
4282 | goto err_card; | ||
4283 | } | ||
4284 | debug_register_view(card->debug, &debug_hex_ascii_view); | ||
4285 | |||
4300 | card->read.ccwdev = gdev->cdev[0]; | 4286 | card->read.ccwdev = gdev->cdev[0]; |
4301 | card->write.ccwdev = gdev->cdev[1]; | 4287 | card->write.ccwdev = gdev->cdev[1]; |
4302 | card->data.ccwdev = gdev->cdev[2]; | 4288 | card->data.ccwdev = gdev->cdev[2]; |
@@ -4309,12 +4295,12 @@ static int qeth_core_probe_device(struct ccwgroup_device *gdev) | |||
4309 | rc = qeth_determine_card_type(card); | 4295 | rc = qeth_determine_card_type(card); |
4310 | if (rc) { | 4296 | if (rc) { |
4311 | QETH_DBF_TEXT_(SETUP, 2, "3err%d", rc); | 4297 | QETH_DBF_TEXT_(SETUP, 2, "3err%d", rc); |
4312 | goto err_card; | 4298 | goto err_dbf; |
4313 | } | 4299 | } |
4314 | rc = qeth_setup_card(card); | 4300 | rc = qeth_setup_card(card); |
4315 | if (rc) { | 4301 | if (rc) { |
4316 | QETH_DBF_TEXT_(SETUP, 2, "2err%d", rc); | 4302 | QETH_DBF_TEXT_(SETUP, 2, "2err%d", rc); |
4317 | goto err_card; | 4303 | goto err_dbf; |
4318 | } | 4304 | } |
4319 | 4305 | ||
4320 | if (card->info.type == QETH_CARD_TYPE_OSN) | 4306 | if (card->info.type == QETH_CARD_TYPE_OSN) |
@@ -4322,7 +4308,7 @@ static int qeth_core_probe_device(struct ccwgroup_device *gdev) | |||
4322 | else | 4308 | else |
4323 | rc = qeth_core_create_device_attributes(dev); | 4309 | rc = qeth_core_create_device_attributes(dev); |
4324 | if (rc) | 4310 | if (rc) |
4325 | goto err_card; | 4311 | goto err_dbf; |
4326 | switch (card->info.type) { | 4312 | switch (card->info.type) { |
4327 | case QETH_CARD_TYPE_OSN: | 4313 | case QETH_CARD_TYPE_OSN: |
4328 | case QETH_CARD_TYPE_OSM: | 4314 | case QETH_CARD_TYPE_OSM: |
@@ -4352,6 +4338,8 @@ err_attr: | |||
4352 | qeth_core_remove_osn_attributes(dev); | 4338 | qeth_core_remove_osn_attributes(dev); |
4353 | else | 4339 | else |
4354 | qeth_core_remove_device_attributes(dev); | 4340 | qeth_core_remove_device_attributes(dev); |
4341 | err_dbf: | ||
4342 | debug_unregister(card->debug); | ||
4355 | err_card: | 4343 | err_card: |
4356 | qeth_core_free_card(card); | 4344 | qeth_core_free_card(card); |
4357 | err_dev: | 4345 | err_dev: |
@@ -4365,16 +4353,19 @@ static void qeth_core_remove_device(struct ccwgroup_device *gdev) | |||
4365 | struct qeth_card *card = dev_get_drvdata(&gdev->dev); | 4353 | struct qeth_card *card = dev_get_drvdata(&gdev->dev); |
4366 | 4354 | ||
4367 | QETH_DBF_TEXT(SETUP, 2, "removedv"); | 4355 | QETH_DBF_TEXT(SETUP, 2, "removedv"); |
4368 | if (card->discipline.ccwgdriver) { | ||
4369 | card->discipline.ccwgdriver->remove(gdev); | ||
4370 | qeth_core_free_discipline(card); | ||
4371 | } | ||
4372 | 4356 | ||
4373 | if (card->info.type == QETH_CARD_TYPE_OSN) { | 4357 | if (card->info.type == QETH_CARD_TYPE_OSN) { |
4374 | qeth_core_remove_osn_attributes(&gdev->dev); | 4358 | qeth_core_remove_osn_attributes(&gdev->dev); |
4375 | } else { | 4359 | } else { |
4376 | qeth_core_remove_device_attributes(&gdev->dev); | 4360 | qeth_core_remove_device_attributes(&gdev->dev); |
4377 | } | 4361 | } |
4362 | |||
4363 | if (card->discipline.ccwgdriver) { | ||
4364 | card->discipline.ccwgdriver->remove(gdev); | ||
4365 | qeth_core_free_discipline(card); | ||
4366 | } | ||
4367 | |||
4368 | debug_unregister(card->debug); | ||
4378 | write_lock_irqsave(&qeth_core_card_list.rwlock, flags); | 4369 | write_lock_irqsave(&qeth_core_card_list.rwlock, flags); |
4379 | list_del(&card->list); | 4370 | list_del(&card->list); |
4380 | write_unlock_irqrestore(&qeth_core_card_list.rwlock, flags); | 4371 | write_unlock_irqrestore(&qeth_core_card_list.rwlock, flags); |
diff --git a/drivers/s390/net/qeth_core_mpc.h b/drivers/s390/net/qeth_core_mpc.h index f9ed24de7514..e37dd8c4bf4e 100644 --- a/drivers/s390/net/qeth_core_mpc.h +++ b/drivers/s390/net/qeth_core_mpc.h | |||
@@ -616,8 +616,9 @@ extern unsigned char IDX_ACTIVATE_WRITE[]; | |||
616 | #define QETH_IS_IDX_ACT_POS_REPLY(buffer) (((buffer)[0x08] & 3) == 2) | 616 | #define QETH_IS_IDX_ACT_POS_REPLY(buffer) (((buffer)[0x08] & 3) == 2) |
617 | #define QETH_IDX_REPLY_LEVEL(buffer) (buffer + 0x12) | 617 | #define QETH_IDX_REPLY_LEVEL(buffer) (buffer + 0x12) |
618 | #define QETH_IDX_ACT_CAUSE_CODE(buffer) (buffer)[0x09] | 618 | #define QETH_IDX_ACT_CAUSE_CODE(buffer) (buffer)[0x09] |
619 | #define QETH_IDX_ACT_ERR_EXCL 0x19 | 619 | #define QETH_IDX_ACT_ERR_EXCL 0x19 |
620 | #define QETH_IDX_ACT_ERR_AUTH 0x1E | 620 | #define QETH_IDX_ACT_ERR_AUTH 0x1E |
621 | #define QETH_IDX_ACT_ERR_AUTH_USER 0x20 | ||
621 | 622 | ||
622 | #define PDU_ENCAPSULATION(buffer) \ | 623 | #define PDU_ENCAPSULATION(buffer) \ |
623 | (buffer + *(buffer + (*(buffer + 0x0b)) + \ | 624 | (buffer + *(buffer + (*(buffer + 0x0b)) + \ |
diff --git a/drivers/s390/net/qeth_core_sys.c b/drivers/s390/net/qeth_core_sys.c index 2eb022ff2610..42fa783a70c8 100644 --- a/drivers/s390/net/qeth_core_sys.c +++ b/drivers/s390/net/qeth_core_sys.c | |||
@@ -411,7 +411,7 @@ static ssize_t qeth_dev_layer2_store(struct device *dev, | |||
411 | if (!card) | 411 | if (!card) |
412 | return -EINVAL; | 412 | return -EINVAL; |
413 | 413 | ||
414 | mutex_lock(&card->conf_mutex); | 414 | mutex_lock(&card->discipline_mutex); |
415 | if (card->state != CARD_STATE_DOWN) { | 415 | if (card->state != CARD_STATE_DOWN) { |
416 | rc = -EPERM; | 416 | rc = -EPERM; |
417 | goto out; | 417 | goto out; |
@@ -433,6 +433,7 @@ static ssize_t qeth_dev_layer2_store(struct device *dev, | |||
433 | if (card->options.layer2 == newdis) | 433 | if (card->options.layer2 == newdis) |
434 | goto out; | 434 | goto out; |
435 | else { | 435 | else { |
436 | card->info.mac_bits = 0; | ||
436 | if (card->discipline.ccwgdriver) { | 437 | if (card->discipline.ccwgdriver) { |
437 | card->discipline.ccwgdriver->remove(card->gdev); | 438 | card->discipline.ccwgdriver->remove(card->gdev); |
438 | qeth_core_free_discipline(card); | 439 | qeth_core_free_discipline(card); |
@@ -445,7 +446,7 @@ static ssize_t qeth_dev_layer2_store(struct device *dev, | |||
445 | 446 | ||
446 | rc = card->discipline.ccwgdriver->probe(card->gdev); | 447 | rc = card->discipline.ccwgdriver->probe(card->gdev); |
447 | out: | 448 | out: |
448 | mutex_unlock(&card->conf_mutex); | 449 | mutex_unlock(&card->discipline_mutex); |
449 | return rc ? rc : count; | 450 | return rc ? rc : count; |
450 | } | 451 | } |
451 | 452 | ||
diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c index d43f57a4ac66..830d63524d61 100644 --- a/drivers/s390/net/qeth_l2_main.c +++ b/drivers/s390/net/qeth_l2_main.c | |||
@@ -79,7 +79,7 @@ static int qeth_l2_do_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) | |||
79 | rc = -EOPNOTSUPP; | 79 | rc = -EOPNOTSUPP; |
80 | } | 80 | } |
81 | if (rc) | 81 | if (rc) |
82 | QETH_DBF_TEXT_(TRACE, 2, "ioce%d", rc); | 82 | QETH_CARD_TEXT_(card, 2, "ioce%d", rc); |
83 | return rc; | 83 | return rc; |
84 | } | 84 | } |
85 | 85 | ||
@@ -130,7 +130,7 @@ static int qeth_l2_send_setgroupmac_cb(struct qeth_card *card, | |||
130 | struct qeth_ipa_cmd *cmd; | 130 | struct qeth_ipa_cmd *cmd; |
131 | __u8 *mac; | 131 | __u8 *mac; |
132 | 132 | ||
133 | QETH_DBF_TEXT(TRACE, 2, "L2Sgmacb"); | 133 | QETH_CARD_TEXT(card, 2, "L2Sgmacb"); |
134 | cmd = (struct qeth_ipa_cmd *) data; | 134 | cmd = (struct qeth_ipa_cmd *) data; |
135 | mac = &cmd->data.setdelmac.mac[0]; | 135 | mac = &cmd->data.setdelmac.mac[0]; |
136 | /* MAC already registered, needed in couple/uncouple case */ | 136 | /* MAC already registered, needed in couple/uncouple case */ |
@@ -147,7 +147,7 @@ static int qeth_l2_send_setgroupmac_cb(struct qeth_card *card, | |||
147 | 147 | ||
148 | static int qeth_l2_send_setgroupmac(struct qeth_card *card, __u8 *mac) | 148 | static int qeth_l2_send_setgroupmac(struct qeth_card *card, __u8 *mac) |
149 | { | 149 | { |
150 | QETH_DBF_TEXT(TRACE, 2, "L2Sgmac"); | 150 | QETH_CARD_TEXT(card, 2, "L2Sgmac"); |
151 | return qeth_l2_send_setdelmac(card, mac, IPA_CMD_SETGMAC, | 151 | return qeth_l2_send_setdelmac(card, mac, IPA_CMD_SETGMAC, |
152 | qeth_l2_send_setgroupmac_cb); | 152 | qeth_l2_send_setgroupmac_cb); |
153 | } | 153 | } |
@@ -159,7 +159,7 @@ static int qeth_l2_send_delgroupmac_cb(struct qeth_card *card, | |||
159 | struct qeth_ipa_cmd *cmd; | 159 | struct qeth_ipa_cmd *cmd; |
160 | __u8 *mac; | 160 | __u8 *mac; |
161 | 161 | ||
162 | QETH_DBF_TEXT(TRACE, 2, "L2Dgmacb"); | 162 | QETH_CARD_TEXT(card, 2, "L2Dgmacb"); |
163 | cmd = (struct qeth_ipa_cmd *) data; | 163 | cmd = (struct qeth_ipa_cmd *) data; |
164 | mac = &cmd->data.setdelmac.mac[0]; | 164 | mac = &cmd->data.setdelmac.mac[0]; |
165 | if (cmd->hdr.return_code) | 165 | if (cmd->hdr.return_code) |
@@ -170,7 +170,7 @@ static int qeth_l2_send_delgroupmac_cb(struct qeth_card *card, | |||
170 | 170 | ||
171 | static int qeth_l2_send_delgroupmac(struct qeth_card *card, __u8 *mac) | 171 | static int qeth_l2_send_delgroupmac(struct qeth_card *card, __u8 *mac) |
172 | { | 172 | { |
173 | QETH_DBF_TEXT(TRACE, 2, "L2Dgmac"); | 173 | QETH_CARD_TEXT(card, 2, "L2Dgmac"); |
174 | return qeth_l2_send_setdelmac(card, mac, IPA_CMD_DELGMAC, | 174 | return qeth_l2_send_setdelmac(card, mac, IPA_CMD_DELGMAC, |
175 | qeth_l2_send_delgroupmac_cb); | 175 | qeth_l2_send_delgroupmac_cb); |
176 | } | 176 | } |
@@ -262,15 +262,14 @@ static int qeth_l2_send_setdelvlan_cb(struct qeth_card *card, | |||
262 | { | 262 | { |
263 | struct qeth_ipa_cmd *cmd; | 263 | struct qeth_ipa_cmd *cmd; |
264 | 264 | ||
265 | QETH_DBF_TEXT(TRACE, 2, "L2sdvcb"); | 265 | QETH_CARD_TEXT(card, 2, "L2sdvcb"); |
266 | cmd = (struct qeth_ipa_cmd *) data; | 266 | cmd = (struct qeth_ipa_cmd *) data; |
267 | if (cmd->hdr.return_code) { | 267 | if (cmd->hdr.return_code) { |
268 | QETH_DBF_MESSAGE(2, "Error in processing VLAN %i on %s: 0x%x. " | 268 | QETH_DBF_MESSAGE(2, "Error in processing VLAN %i on %s: 0x%x. " |
269 | "Continuing\n", cmd->data.setdelvlan.vlan_id, | 269 | "Continuing\n", cmd->data.setdelvlan.vlan_id, |
270 | QETH_CARD_IFNAME(card), cmd->hdr.return_code); | 270 | QETH_CARD_IFNAME(card), cmd->hdr.return_code); |
271 | QETH_DBF_TEXT_(TRACE, 2, "L2VL%4x", cmd->hdr.command); | 271 | QETH_CARD_TEXT_(card, 2, "L2VL%4x", cmd->hdr.command); |
272 | QETH_DBF_TEXT_(TRACE, 2, "L2%s", CARD_BUS_ID(card)); | 272 | QETH_CARD_TEXT_(card, 2, "err%d", cmd->hdr.return_code); |
273 | QETH_DBF_TEXT_(TRACE, 2, "err%d", cmd->hdr.return_code); | ||
274 | } | 273 | } |
275 | return 0; | 274 | return 0; |
276 | } | 275 | } |
@@ -281,7 +280,7 @@ static int qeth_l2_send_setdelvlan(struct qeth_card *card, __u16 i, | |||
281 | struct qeth_ipa_cmd *cmd; | 280 | struct qeth_ipa_cmd *cmd; |
282 | struct qeth_cmd_buffer *iob; | 281 | struct qeth_cmd_buffer *iob; |
283 | 282 | ||
284 | QETH_DBF_TEXT_(TRACE, 4, "L2sdv%x", ipacmd); | 283 | QETH_CARD_TEXT_(card, 4, "L2sdv%x", ipacmd); |
285 | iob = qeth_get_ipacmd_buffer(card, ipacmd, QETH_PROT_IPV4); | 284 | iob = qeth_get_ipacmd_buffer(card, ipacmd, QETH_PROT_IPV4); |
286 | cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE); | 285 | cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE); |
287 | cmd->data.setdelvlan.vlan_id = i; | 286 | cmd->data.setdelvlan.vlan_id = i; |
@@ -292,7 +291,7 @@ static int qeth_l2_send_setdelvlan(struct qeth_card *card, __u16 i, | |||
292 | static void qeth_l2_process_vlans(struct qeth_card *card, int clear) | 291 | static void qeth_l2_process_vlans(struct qeth_card *card, int clear) |
293 | { | 292 | { |
294 | struct qeth_vlan_vid *id; | 293 | struct qeth_vlan_vid *id; |
295 | QETH_DBF_TEXT(TRACE, 3, "L2prcvln"); | 294 | QETH_CARD_TEXT(card, 3, "L2prcvln"); |
296 | spin_lock_bh(&card->vlanlock); | 295 | spin_lock_bh(&card->vlanlock); |
297 | list_for_each_entry(id, &card->vid_list, list) { | 296 | list_for_each_entry(id, &card->vid_list, list) { |
298 | if (clear) | 297 | if (clear) |
@@ -310,13 +309,13 @@ static void qeth_l2_vlan_rx_add_vid(struct net_device *dev, unsigned short vid) | |||
310 | struct qeth_card *card = dev->ml_priv; | 309 | struct qeth_card *card = dev->ml_priv; |
311 | struct qeth_vlan_vid *id; | 310 | struct qeth_vlan_vid *id; |
312 | 311 | ||
313 | QETH_DBF_TEXT_(TRACE, 4, "aid:%d", vid); | 312 | QETH_CARD_TEXT_(card, 4, "aid:%d", vid); |
314 | if (card->info.type == QETH_CARD_TYPE_OSM) { | 313 | if (card->info.type == QETH_CARD_TYPE_OSM) { |
315 | QETH_DBF_TEXT(TRACE, 3, "aidOSM"); | 314 | QETH_CARD_TEXT(card, 3, "aidOSM"); |
316 | return; | 315 | return; |
317 | } | 316 | } |
318 | if (qeth_wait_for_threads(card, QETH_RECOVER_THREAD)) { | 317 | if (qeth_wait_for_threads(card, QETH_RECOVER_THREAD)) { |
319 | QETH_DBF_TEXT(TRACE, 3, "aidREC"); | 318 | QETH_CARD_TEXT(card, 3, "aidREC"); |
320 | return; | 319 | return; |
321 | } | 320 | } |
322 | id = kmalloc(sizeof(struct qeth_vlan_vid), GFP_ATOMIC); | 321 | id = kmalloc(sizeof(struct qeth_vlan_vid), GFP_ATOMIC); |
@@ -334,13 +333,13 @@ static void qeth_l2_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid) | |||
334 | struct qeth_vlan_vid *id, *tmpid = NULL; | 333 | struct qeth_vlan_vid *id, *tmpid = NULL; |
335 | struct qeth_card *card = dev->ml_priv; | 334 | struct qeth_card *card = dev->ml_priv; |
336 | 335 | ||
337 | QETH_DBF_TEXT_(TRACE, 4, "kid:%d", vid); | 336 | QETH_CARD_TEXT_(card, 4, "kid:%d", vid); |
338 | if (card->info.type == QETH_CARD_TYPE_OSM) { | 337 | if (card->info.type == QETH_CARD_TYPE_OSM) { |
339 | QETH_DBF_TEXT(TRACE, 3, "kidOSM"); | 338 | QETH_CARD_TEXT(card, 3, "kidOSM"); |
340 | return; | 339 | return; |
341 | } | 340 | } |
342 | if (qeth_wait_for_threads(card, QETH_RECOVER_THREAD)) { | 341 | if (qeth_wait_for_threads(card, QETH_RECOVER_THREAD)) { |
343 | QETH_DBF_TEXT(TRACE, 3, "kidREC"); | 342 | QETH_CARD_TEXT(card, 3, "kidREC"); |
344 | return; | 343 | return; |
345 | } | 344 | } |
346 | spin_lock_bh(&card->vlanlock); | 345 | spin_lock_bh(&card->vlanlock); |
@@ -456,7 +455,7 @@ static void qeth_l2_process_inbound_buffer(struct qeth_card *card, | |||
456 | /* else unknown */ | 455 | /* else unknown */ |
457 | default: | 456 | default: |
458 | dev_kfree_skb_any(skb); | 457 | dev_kfree_skb_any(skb); |
459 | QETH_DBF_TEXT(TRACE, 3, "inbunkno"); | 458 | QETH_CARD_TEXT(card, 3, "inbunkno"); |
460 | QETH_DBF_HEX(CTRL, 3, hdr, QETH_DBF_CTRL_LEN); | 459 | QETH_DBF_HEX(CTRL, 3, hdr, QETH_DBF_CTRL_LEN); |
461 | continue; | 460 | continue; |
462 | } | 461 | } |
@@ -474,7 +473,7 @@ static int qeth_l2_send_setdelmac(struct qeth_card *card, __u8 *mac, | |||
474 | struct qeth_ipa_cmd *cmd; | 473 | struct qeth_ipa_cmd *cmd; |
475 | struct qeth_cmd_buffer *iob; | 474 | struct qeth_cmd_buffer *iob; |
476 | 475 | ||
477 | QETH_DBF_TEXT(TRACE, 2, "L2sdmac"); | 476 | QETH_CARD_TEXT(card, 2, "L2sdmac"); |
478 | iob = qeth_get_ipacmd_buffer(card, ipacmd, QETH_PROT_IPV4); | 477 | iob = qeth_get_ipacmd_buffer(card, ipacmd, QETH_PROT_IPV4); |
479 | cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE); | 478 | cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE); |
480 | cmd->data.setdelmac.mac_length = OSA_ADDR_LEN; | 479 | cmd->data.setdelmac.mac_length = OSA_ADDR_LEN; |
@@ -488,10 +487,10 @@ static int qeth_l2_send_setmac_cb(struct qeth_card *card, | |||
488 | { | 487 | { |
489 | struct qeth_ipa_cmd *cmd; | 488 | struct qeth_ipa_cmd *cmd; |
490 | 489 | ||
491 | QETH_DBF_TEXT(TRACE, 2, "L2Smaccb"); | 490 | QETH_CARD_TEXT(card, 2, "L2Smaccb"); |
492 | cmd = (struct qeth_ipa_cmd *) data; | 491 | cmd = (struct qeth_ipa_cmd *) data; |
493 | if (cmd->hdr.return_code) { | 492 | if (cmd->hdr.return_code) { |
494 | QETH_DBF_TEXT_(TRACE, 2, "L2er%x", cmd->hdr.return_code); | 493 | QETH_CARD_TEXT_(card, 2, "L2er%x", cmd->hdr.return_code); |
495 | card->info.mac_bits &= ~QETH_LAYER2_MAC_REGISTERED; | 494 | card->info.mac_bits &= ~QETH_LAYER2_MAC_REGISTERED; |
496 | switch (cmd->hdr.return_code) { | 495 | switch (cmd->hdr.return_code) { |
497 | case IPA_RC_L2_DUP_MAC: | 496 | case IPA_RC_L2_DUP_MAC: |
@@ -523,7 +522,7 @@ static int qeth_l2_send_setmac_cb(struct qeth_card *card, | |||
523 | 522 | ||
524 | static int qeth_l2_send_setmac(struct qeth_card *card, __u8 *mac) | 523 | static int qeth_l2_send_setmac(struct qeth_card *card, __u8 *mac) |
525 | { | 524 | { |
526 | QETH_DBF_TEXT(TRACE, 2, "L2Setmac"); | 525 | QETH_CARD_TEXT(card, 2, "L2Setmac"); |
527 | return qeth_l2_send_setdelmac(card, mac, IPA_CMD_SETVMAC, | 526 | return qeth_l2_send_setdelmac(card, mac, IPA_CMD_SETVMAC, |
528 | qeth_l2_send_setmac_cb); | 527 | qeth_l2_send_setmac_cb); |
529 | } | 528 | } |
@@ -534,10 +533,10 @@ static int qeth_l2_send_delmac_cb(struct qeth_card *card, | |||
534 | { | 533 | { |
535 | struct qeth_ipa_cmd *cmd; | 534 | struct qeth_ipa_cmd *cmd; |
536 | 535 | ||
537 | QETH_DBF_TEXT(TRACE, 2, "L2Dmaccb"); | 536 | QETH_CARD_TEXT(card, 2, "L2Dmaccb"); |
538 | cmd = (struct qeth_ipa_cmd *) data; | 537 | cmd = (struct qeth_ipa_cmd *) data; |
539 | if (cmd->hdr.return_code) { | 538 | if (cmd->hdr.return_code) { |
540 | QETH_DBF_TEXT_(TRACE, 2, "err%d", cmd->hdr.return_code); | 539 | QETH_CARD_TEXT_(card, 2, "err%d", cmd->hdr.return_code); |
541 | cmd->hdr.return_code = -EIO; | 540 | cmd->hdr.return_code = -EIO; |
542 | return 0; | 541 | return 0; |
543 | } | 542 | } |
@@ -548,7 +547,7 @@ static int qeth_l2_send_delmac_cb(struct qeth_card *card, | |||
548 | 547 | ||
549 | static int qeth_l2_send_delmac(struct qeth_card *card, __u8 *mac) | 548 | static int qeth_l2_send_delmac(struct qeth_card *card, __u8 *mac) |
550 | { | 549 | { |
551 | QETH_DBF_TEXT(TRACE, 2, "L2Delmac"); | 550 | QETH_CARD_TEXT(card, 2, "L2Delmac"); |
552 | if (!(card->info.mac_bits & QETH_LAYER2_MAC_REGISTERED)) | 551 | if (!(card->info.mac_bits & QETH_LAYER2_MAC_REGISTERED)) |
553 | return 0; | 552 | return 0; |
554 | return qeth_l2_send_setdelmac(card, mac, IPA_CMD_DELVMAC, | 553 | return qeth_l2_send_setdelmac(card, mac, IPA_CMD_DELVMAC, |
@@ -594,23 +593,22 @@ static int qeth_l2_set_mac_address(struct net_device *dev, void *p) | |||
594 | struct qeth_card *card = dev->ml_priv; | 593 | struct qeth_card *card = dev->ml_priv; |
595 | int rc = 0; | 594 | int rc = 0; |
596 | 595 | ||
597 | QETH_DBF_TEXT(TRACE, 3, "setmac"); | 596 | QETH_CARD_TEXT(card, 3, "setmac"); |
598 | 597 | ||
599 | if (qeth_l2_verify_dev(dev) != QETH_REAL_CARD) { | 598 | if (qeth_l2_verify_dev(dev) != QETH_REAL_CARD) { |
600 | QETH_DBF_TEXT(TRACE, 3, "setmcINV"); | 599 | QETH_CARD_TEXT(card, 3, "setmcINV"); |
601 | return -EOPNOTSUPP; | 600 | return -EOPNOTSUPP; |
602 | } | 601 | } |
603 | 602 | ||
604 | if (card->info.type == QETH_CARD_TYPE_OSN || | 603 | if (card->info.type == QETH_CARD_TYPE_OSN || |
605 | card->info.type == QETH_CARD_TYPE_OSM || | 604 | card->info.type == QETH_CARD_TYPE_OSM || |
606 | card->info.type == QETH_CARD_TYPE_OSX) { | 605 | card->info.type == QETH_CARD_TYPE_OSX) { |
607 | QETH_DBF_TEXT(TRACE, 3, "setmcTYP"); | 606 | QETH_CARD_TEXT(card, 3, "setmcTYP"); |
608 | return -EOPNOTSUPP; | 607 | return -EOPNOTSUPP; |
609 | } | 608 | } |
610 | QETH_DBF_TEXT_(TRACE, 3, "%s", CARD_BUS_ID(card)); | 609 | QETH_CARD_HEX(card, 3, addr->sa_data, OSA_ADDR_LEN); |
611 | QETH_DBF_HEX(TRACE, 3, addr->sa_data, OSA_ADDR_LEN); | ||
612 | if (qeth_wait_for_threads(card, QETH_RECOVER_THREAD)) { | 610 | if (qeth_wait_for_threads(card, QETH_RECOVER_THREAD)) { |
613 | QETH_DBF_TEXT(TRACE, 3, "setmcREC"); | 611 | QETH_CARD_TEXT(card, 3, "setmcREC"); |
614 | return -ERESTARTSYS; | 612 | return -ERESTARTSYS; |
615 | } | 613 | } |
616 | rc = qeth_l2_send_delmac(card, &card->dev->dev_addr[0]); | 614 | rc = qeth_l2_send_delmac(card, &card->dev->dev_addr[0]); |
@@ -627,7 +625,7 @@ static void qeth_l2_set_multicast_list(struct net_device *dev) | |||
627 | if (card->info.type == QETH_CARD_TYPE_OSN) | 625 | if (card->info.type == QETH_CARD_TYPE_OSN) |
628 | return ; | 626 | return ; |
629 | 627 | ||
630 | QETH_DBF_TEXT(TRACE, 3, "setmulti"); | 628 | QETH_CARD_TEXT(card, 3, "setmulti"); |
631 | if (qeth_threads_running(card, QETH_RECOVER_THREAD) && | 629 | if (qeth_threads_running(card, QETH_RECOVER_THREAD) && |
632 | (card->state != CARD_STATE_UP)) | 630 | (card->state != CARD_STATE_UP)) |
633 | return; | 631 | return; |
@@ -714,10 +712,13 @@ static int qeth_l2_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
714 | goto tx_drop; | 712 | goto tx_drop; |
715 | } | 713 | } |
716 | 714 | ||
717 | if (card->info.type != QETH_CARD_TYPE_IQD) | 715 | if (card->info.type != QETH_CARD_TYPE_IQD) { |
716 | if (qeth_hdr_chk_and_bounce(new_skb, | ||
717 | sizeof(struct qeth_hdr_layer2))) | ||
718 | goto tx_drop; | ||
718 | rc = qeth_do_send_packet(card, queue, new_skb, hdr, | 719 | rc = qeth_do_send_packet(card, queue, new_skb, hdr, |
719 | elements); | 720 | elements); |
720 | else | 721 | } else |
721 | rc = qeth_do_send_packet_fast(card, queue, new_skb, hdr, | 722 | rc = qeth_do_send_packet_fast(card, queue, new_skb, hdr, |
722 | elements, data_offset, hd_len); | 723 | elements, data_offset, hd_len); |
723 | if (!rc) { | 724 | if (!rc) { |
@@ -771,11 +772,10 @@ static void qeth_l2_qdio_input_handler(struct ccw_device *ccwdev, | |||
771 | card->perf_stats.inbound_start_time = qeth_get_micros(); | 772 | card->perf_stats.inbound_start_time = qeth_get_micros(); |
772 | } | 773 | } |
773 | if (qdio_err & QDIO_ERROR_ACTIVATE_CHECK_CONDITION) { | 774 | if (qdio_err & QDIO_ERROR_ACTIVATE_CHECK_CONDITION) { |
774 | QETH_DBF_TEXT(TRACE, 1, "qdinchk"); | 775 | QETH_CARD_TEXT(card, 1, "qdinchk"); |
775 | QETH_DBF_TEXT_(TRACE, 1, "%s", CARD_BUS_ID(card)); | 776 | QETH_CARD_TEXT_(card, 1, "%04X%04X", first_element, |
776 | QETH_DBF_TEXT_(TRACE, 1, "%04X%04X", first_element, | ||
777 | count); | 777 | count); |
778 | QETH_DBF_TEXT_(TRACE, 1, "%04X", queue); | 778 | QETH_CARD_TEXT_(card, 1, "%04X", queue); |
779 | qeth_schedule_recovery(card); | 779 | qeth_schedule_recovery(card); |
780 | return; | 780 | return; |
781 | } | 781 | } |
@@ -799,13 +799,13 @@ static int qeth_l2_open(struct net_device *dev) | |||
799 | { | 799 | { |
800 | struct qeth_card *card = dev->ml_priv; | 800 | struct qeth_card *card = dev->ml_priv; |
801 | 801 | ||
802 | QETH_DBF_TEXT(TRACE, 4, "qethopen"); | 802 | QETH_CARD_TEXT(card, 4, "qethopen"); |
803 | if (card->state != CARD_STATE_SOFTSETUP) | 803 | if (card->state != CARD_STATE_SOFTSETUP) |
804 | return -ENODEV; | 804 | return -ENODEV; |
805 | 805 | ||
806 | if ((card->info.type != QETH_CARD_TYPE_OSN) && | 806 | if ((card->info.type != QETH_CARD_TYPE_OSN) && |
807 | (!(card->info.mac_bits & QETH_LAYER2_MAC_REGISTERED))) { | 807 | (!(card->info.mac_bits & QETH_LAYER2_MAC_REGISTERED))) { |
808 | QETH_DBF_TEXT(TRACE, 4, "nomacadr"); | 808 | QETH_CARD_TEXT(card, 4, "nomacadr"); |
809 | return -EPERM; | 809 | return -EPERM; |
810 | } | 810 | } |
811 | card->data.state = CH_STATE_UP; | 811 | card->data.state = CH_STATE_UP; |
@@ -822,7 +822,7 @@ static int qeth_l2_stop(struct net_device *dev) | |||
822 | { | 822 | { |
823 | struct qeth_card *card = dev->ml_priv; | 823 | struct qeth_card *card = dev->ml_priv; |
824 | 824 | ||
825 | QETH_DBF_TEXT(TRACE, 4, "qethstop"); | 825 | QETH_CARD_TEXT(card, 4, "qethstop"); |
826 | netif_tx_disable(dev); | 826 | netif_tx_disable(dev); |
827 | if (card->state == CARD_STATE_UP) | 827 | if (card->state == CARD_STATE_UP) |
828 | card->state = CARD_STATE_SOFTSETUP; | 828 | card->state = CARD_STATE_SOFTSETUP; |
@@ -860,8 +860,6 @@ static void qeth_l2_remove_device(struct ccwgroup_device *cgdev) | |||
860 | unregister_netdev(card->dev); | 860 | unregister_netdev(card->dev); |
861 | card->dev = NULL; | 861 | card->dev = NULL; |
862 | } | 862 | } |
863 | |||
864 | qeth_l2_del_all_mc(card); | ||
865 | return; | 863 | return; |
866 | } | 864 | } |
867 | 865 | ||
@@ -935,6 +933,7 @@ static int __qeth_l2_set_online(struct ccwgroup_device *gdev, int recovery_mode) | |||
935 | enum qeth_card_states recover_flag; | 933 | enum qeth_card_states recover_flag; |
936 | 934 | ||
937 | BUG_ON(!card); | 935 | BUG_ON(!card); |
936 | mutex_lock(&card->discipline_mutex); | ||
938 | mutex_lock(&card->conf_mutex); | 937 | mutex_lock(&card->conf_mutex); |
939 | QETH_DBF_TEXT(SETUP, 2, "setonlin"); | 938 | QETH_DBF_TEXT(SETUP, 2, "setonlin"); |
940 | QETH_DBF_HEX(SETUP, 2, &card, sizeof(void *)); | 939 | QETH_DBF_HEX(SETUP, 2, &card, sizeof(void *)); |
@@ -1012,6 +1011,7 @@ static int __qeth_l2_set_online(struct ccwgroup_device *gdev, int recovery_mode) | |||
1012 | kobject_uevent(&gdev->dev.kobj, KOBJ_CHANGE); | 1011 | kobject_uevent(&gdev->dev.kobj, KOBJ_CHANGE); |
1013 | out: | 1012 | out: |
1014 | mutex_unlock(&card->conf_mutex); | 1013 | mutex_unlock(&card->conf_mutex); |
1014 | mutex_unlock(&card->discipline_mutex); | ||
1015 | return 0; | 1015 | return 0; |
1016 | 1016 | ||
1017 | out_remove: | 1017 | out_remove: |
@@ -1025,6 +1025,7 @@ out_remove: | |||
1025 | else | 1025 | else |
1026 | card->state = CARD_STATE_DOWN; | 1026 | card->state = CARD_STATE_DOWN; |
1027 | mutex_unlock(&card->conf_mutex); | 1027 | mutex_unlock(&card->conf_mutex); |
1028 | mutex_unlock(&card->discipline_mutex); | ||
1028 | return rc; | 1029 | return rc; |
1029 | } | 1030 | } |
1030 | 1031 | ||
@@ -1040,6 +1041,7 @@ static int __qeth_l2_set_offline(struct ccwgroup_device *cgdev, | |||
1040 | int rc = 0, rc2 = 0, rc3 = 0; | 1041 | int rc = 0, rc2 = 0, rc3 = 0; |
1041 | enum qeth_card_states recover_flag; | 1042 | enum qeth_card_states recover_flag; |
1042 | 1043 | ||
1044 | mutex_lock(&card->discipline_mutex); | ||
1043 | mutex_lock(&card->conf_mutex); | 1045 | mutex_lock(&card->conf_mutex); |
1044 | QETH_DBF_TEXT(SETUP, 3, "setoffl"); | 1046 | QETH_DBF_TEXT(SETUP, 3, "setoffl"); |
1045 | QETH_DBF_HEX(SETUP, 3, &card, sizeof(void *)); | 1047 | QETH_DBF_HEX(SETUP, 3, &card, sizeof(void *)); |
@@ -1060,6 +1062,7 @@ static int __qeth_l2_set_offline(struct ccwgroup_device *cgdev, | |||
1060 | /* let user_space know that device is offline */ | 1062 | /* let user_space know that device is offline */ |
1061 | kobject_uevent(&cgdev->dev.kobj, KOBJ_CHANGE); | 1063 | kobject_uevent(&cgdev->dev.kobj, KOBJ_CHANGE); |
1062 | mutex_unlock(&card->conf_mutex); | 1064 | mutex_unlock(&card->conf_mutex); |
1065 | mutex_unlock(&card->discipline_mutex); | ||
1063 | return 0; | 1066 | return 0; |
1064 | } | 1067 | } |
1065 | 1068 | ||
@@ -1074,11 +1077,10 @@ static int qeth_l2_recover(void *ptr) | |||
1074 | int rc = 0; | 1077 | int rc = 0; |
1075 | 1078 | ||
1076 | card = (struct qeth_card *) ptr; | 1079 | card = (struct qeth_card *) ptr; |
1077 | QETH_DBF_TEXT(TRACE, 2, "recover1"); | 1080 | QETH_CARD_TEXT(card, 2, "recover1"); |
1078 | QETH_DBF_HEX(TRACE, 2, &card, sizeof(void *)); | ||
1079 | if (!qeth_do_run_thread(card, QETH_RECOVER_THREAD)) | 1081 | if (!qeth_do_run_thread(card, QETH_RECOVER_THREAD)) |
1080 | return 0; | 1082 | return 0; |
1081 | QETH_DBF_TEXT(TRACE, 2, "recover2"); | 1083 | QETH_CARD_TEXT(card, 2, "recover2"); |
1082 | dev_warn(&card->gdev->dev, | 1084 | dev_warn(&card->gdev->dev, |
1083 | "A recovery process has been started for the device\n"); | 1085 | "A recovery process has been started for the device\n"); |
1084 | card->use_hard_stop = 1; | 1086 | card->use_hard_stop = 1; |
@@ -1181,12 +1183,12 @@ static int qeth_osn_send_control_data(struct qeth_card *card, int len, | |||
1181 | unsigned long flags; | 1183 | unsigned long flags; |
1182 | int rc = 0; | 1184 | int rc = 0; |
1183 | 1185 | ||
1184 | QETH_DBF_TEXT(TRACE, 5, "osndctrd"); | 1186 | QETH_CARD_TEXT(card, 5, "osndctrd"); |
1185 | 1187 | ||
1186 | wait_event(card->wait_q, | 1188 | wait_event(card->wait_q, |
1187 | atomic_cmpxchg(&card->write.irq_pending, 0, 1) == 0); | 1189 | atomic_cmpxchg(&card->write.irq_pending, 0, 1) == 0); |
1188 | qeth_prepare_control_data(card, len, iob); | 1190 | qeth_prepare_control_data(card, len, iob); |
1189 | QETH_DBF_TEXT(TRACE, 6, "osnoirqp"); | 1191 | QETH_CARD_TEXT(card, 6, "osnoirqp"); |
1190 | spin_lock_irqsave(get_ccwdev_lock(card->write.ccwdev), flags); | 1192 | spin_lock_irqsave(get_ccwdev_lock(card->write.ccwdev), flags); |
1191 | rc = ccw_device_start(card->write.ccwdev, &card->write.ccw, | 1193 | rc = ccw_device_start(card->write.ccwdev, &card->write.ccw, |
1192 | (addr_t) iob, 0, 0); | 1194 | (addr_t) iob, 0, 0); |
@@ -1194,7 +1196,7 @@ static int qeth_osn_send_control_data(struct qeth_card *card, int len, | |||
1194 | if (rc) { | 1196 | if (rc) { |
1195 | QETH_DBF_MESSAGE(2, "qeth_osn_send_control_data: " | 1197 | QETH_DBF_MESSAGE(2, "qeth_osn_send_control_data: " |
1196 | "ccw_device_start rc = %i\n", rc); | 1198 | "ccw_device_start rc = %i\n", rc); |
1197 | QETH_DBF_TEXT_(TRACE, 2, " err%d", rc); | 1199 | QETH_CARD_TEXT_(card, 2, " err%d", rc); |
1198 | qeth_release_buffer(iob->channel, iob); | 1200 | qeth_release_buffer(iob->channel, iob); |
1199 | atomic_set(&card->write.irq_pending, 0); | 1201 | atomic_set(&card->write.irq_pending, 0); |
1200 | wake_up(&card->wait_q); | 1202 | wake_up(&card->wait_q); |
@@ -1207,7 +1209,7 @@ static int qeth_osn_send_ipa_cmd(struct qeth_card *card, | |||
1207 | { | 1209 | { |
1208 | u16 s1, s2; | 1210 | u16 s1, s2; |
1209 | 1211 | ||
1210 | QETH_DBF_TEXT(TRACE, 4, "osndipa"); | 1212 | QETH_CARD_TEXT(card, 4, "osndipa"); |
1211 | 1213 | ||
1212 | qeth_prepare_ipa_cmd(card, iob, QETH_PROT_OSN2); | 1214 | qeth_prepare_ipa_cmd(card, iob, QETH_PROT_OSN2); |
1213 | s1 = (u16)(IPA_PDU_HEADER_SIZE + data_len); | 1215 | s1 = (u16)(IPA_PDU_HEADER_SIZE + data_len); |
@@ -1225,12 +1227,12 @@ int qeth_osn_assist(struct net_device *dev, void *data, int data_len) | |||
1225 | struct qeth_card *card; | 1227 | struct qeth_card *card; |
1226 | int rc; | 1228 | int rc; |
1227 | 1229 | ||
1228 | QETH_DBF_TEXT(TRACE, 2, "osnsdmc"); | ||
1229 | if (!dev) | 1230 | if (!dev) |
1230 | return -ENODEV; | 1231 | return -ENODEV; |
1231 | card = dev->ml_priv; | 1232 | card = dev->ml_priv; |
1232 | if (!card) | 1233 | if (!card) |
1233 | return -ENODEV; | 1234 | return -ENODEV; |
1235 | QETH_CARD_TEXT(card, 2, "osnsdmc"); | ||
1234 | if ((card->state != CARD_STATE_UP) && | 1236 | if ((card->state != CARD_STATE_UP) && |
1235 | (card->state != CARD_STATE_SOFTSETUP)) | 1237 | (card->state != CARD_STATE_SOFTSETUP)) |
1236 | return -ENODEV; | 1238 | return -ENODEV; |
@@ -1247,13 +1249,13 @@ int qeth_osn_register(unsigned char *read_dev_no, struct net_device **dev, | |||
1247 | { | 1249 | { |
1248 | struct qeth_card *card; | 1250 | struct qeth_card *card; |
1249 | 1251 | ||
1250 | QETH_DBF_TEXT(TRACE, 2, "osnreg"); | ||
1251 | *dev = qeth_l2_netdev_by_devno(read_dev_no); | 1252 | *dev = qeth_l2_netdev_by_devno(read_dev_no); |
1252 | if (*dev == NULL) | 1253 | if (*dev == NULL) |
1253 | return -ENODEV; | 1254 | return -ENODEV; |
1254 | card = (*dev)->ml_priv; | 1255 | card = (*dev)->ml_priv; |
1255 | if (!card) | 1256 | if (!card) |
1256 | return -ENODEV; | 1257 | return -ENODEV; |
1258 | QETH_CARD_TEXT(card, 2, "osnreg"); | ||
1257 | if ((assist_cb == NULL) || (data_cb == NULL)) | 1259 | if ((assist_cb == NULL) || (data_cb == NULL)) |
1258 | return -EINVAL; | 1260 | return -EINVAL; |
1259 | card->osn_info.assist_cb = assist_cb; | 1261 | card->osn_info.assist_cb = assist_cb; |
@@ -1266,12 +1268,12 @@ void qeth_osn_deregister(struct net_device *dev) | |||
1266 | { | 1268 | { |
1267 | struct qeth_card *card; | 1269 | struct qeth_card *card; |
1268 | 1270 | ||
1269 | QETH_DBF_TEXT(TRACE, 2, "osndereg"); | ||
1270 | if (!dev) | 1271 | if (!dev) |
1271 | return; | 1272 | return; |
1272 | card = dev->ml_priv; | 1273 | card = dev->ml_priv; |
1273 | if (!card) | 1274 | if (!card) |
1274 | return; | 1275 | return; |
1276 | QETH_CARD_TEXT(card, 2, "osndereg"); | ||
1275 | card->osn_info.assist_cb = NULL; | 1277 | card->osn_info.assist_cb = NULL; |
1276 | card->osn_info.data_cb = NULL; | 1278 | card->osn_info.data_cb = NULL; |
1277 | return; | 1279 | return; |
diff --git a/drivers/s390/net/qeth_l3.h b/drivers/s390/net/qeth_l3.h index 8447d233d0b3..e705b27ec7dc 100644 --- a/drivers/s390/net/qeth_l3.h +++ b/drivers/s390/net/qeth_l3.h | |||
@@ -64,5 +64,6 @@ void qeth_l3_del_rxip(struct qeth_card *card, enum qeth_prot_versions, | |||
64 | const u8 *); | 64 | const u8 *); |
65 | int qeth_l3_set_large_send(struct qeth_card *, enum qeth_large_send_types); | 65 | int qeth_l3_set_large_send(struct qeth_card *, enum qeth_large_send_types); |
66 | int qeth_l3_set_rx_csum(struct qeth_card *, enum qeth_checksum_types); | 66 | int qeth_l3_set_rx_csum(struct qeth_card *, enum qeth_checksum_types); |
67 | int qeth_l3_is_addr_covered_by_ipato(struct qeth_card *, struct qeth_ipaddr *); | ||
67 | 68 | ||
68 | #endif /* __QETH_L3_H__ */ | 69 | #endif /* __QETH_L3_H__ */ |
diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c index 61adae21a464..e22ae248f613 100644 --- a/drivers/s390/net/qeth_l3_main.c +++ b/drivers/s390/net/qeth_l3_main.c | |||
@@ -195,7 +195,7 @@ static void qeth_l3_convert_addr_to_bits(u8 *addr, u8 *bits, int len) | |||
195 | } | 195 | } |
196 | } | 196 | } |
197 | 197 | ||
198 | static int qeth_l3_is_addr_covered_by_ipato(struct qeth_card *card, | 198 | int qeth_l3_is_addr_covered_by_ipato(struct qeth_card *card, |
199 | struct qeth_ipaddr *addr) | 199 | struct qeth_ipaddr *addr) |
200 | { | 200 | { |
201 | struct qeth_ipato_entry *ipatoe; | 201 | struct qeth_ipato_entry *ipatoe; |
@@ -287,7 +287,7 @@ static int __qeth_l3_insert_ip_todo(struct qeth_card *card, | |||
287 | addr->users += add ? 1 : -1; | 287 | addr->users += add ? 1 : -1; |
288 | if (add && (addr->type == QETH_IP_TYPE_NORMAL) && | 288 | if (add && (addr->type == QETH_IP_TYPE_NORMAL) && |
289 | qeth_l3_is_addr_covered_by_ipato(card, addr)) { | 289 | qeth_l3_is_addr_covered_by_ipato(card, addr)) { |
290 | QETH_DBF_TEXT(TRACE, 2, "tkovaddr"); | 290 | QETH_CARD_TEXT(card, 2, "tkovaddr"); |
291 | addr->set_flags |= QETH_IPA_SETIP_TAKEOVER_FLAG; | 291 | addr->set_flags |= QETH_IPA_SETIP_TAKEOVER_FLAG; |
292 | } | 292 | } |
293 | list_add_tail(&addr->entry, card->ip_tbd_list); | 293 | list_add_tail(&addr->entry, card->ip_tbd_list); |
@@ -301,13 +301,13 @@ static int qeth_l3_delete_ip(struct qeth_card *card, struct qeth_ipaddr *addr) | |||
301 | unsigned long flags; | 301 | unsigned long flags; |
302 | int rc = 0; | 302 | int rc = 0; |
303 | 303 | ||
304 | QETH_DBF_TEXT(TRACE, 4, "delip"); | 304 | QETH_CARD_TEXT(card, 4, "delip"); |
305 | 305 | ||
306 | if (addr->proto == QETH_PROT_IPV4) | 306 | if (addr->proto == QETH_PROT_IPV4) |
307 | QETH_DBF_HEX(TRACE, 4, &addr->u.a4.addr, 4); | 307 | QETH_CARD_HEX(card, 4, &addr->u.a4.addr, 4); |
308 | else { | 308 | else { |
309 | QETH_DBF_HEX(TRACE, 4, &addr->u.a6.addr, 8); | 309 | QETH_CARD_HEX(card, 4, &addr->u.a6.addr, 8); |
310 | QETH_DBF_HEX(TRACE, 4, ((char *)&addr->u.a6.addr) + 8, 8); | 310 | QETH_CARD_HEX(card, 4, ((char *)&addr->u.a6.addr) + 8, 8); |
311 | } | 311 | } |
312 | spin_lock_irqsave(&card->ip_lock, flags); | 312 | spin_lock_irqsave(&card->ip_lock, flags); |
313 | rc = __qeth_l3_insert_ip_todo(card, addr, 0); | 313 | rc = __qeth_l3_insert_ip_todo(card, addr, 0); |
@@ -320,12 +320,12 @@ static int qeth_l3_add_ip(struct qeth_card *card, struct qeth_ipaddr *addr) | |||
320 | unsigned long flags; | 320 | unsigned long flags; |
321 | int rc = 0; | 321 | int rc = 0; |
322 | 322 | ||
323 | QETH_DBF_TEXT(TRACE, 4, "addip"); | 323 | QETH_CARD_TEXT(card, 4, "addip"); |
324 | if (addr->proto == QETH_PROT_IPV4) | 324 | if (addr->proto == QETH_PROT_IPV4) |
325 | QETH_DBF_HEX(TRACE, 4, &addr->u.a4.addr, 4); | 325 | QETH_CARD_HEX(card, 4, &addr->u.a4.addr, 4); |
326 | else { | 326 | else { |
327 | QETH_DBF_HEX(TRACE, 4, &addr->u.a6.addr, 8); | 327 | QETH_CARD_HEX(card, 4, &addr->u.a6.addr, 8); |
328 | QETH_DBF_HEX(TRACE, 4, ((char *)&addr->u.a6.addr) + 8, 8); | 328 | QETH_CARD_HEX(card, 4, ((char *)&addr->u.a6.addr) + 8, 8); |
329 | } | 329 | } |
330 | spin_lock_irqsave(&card->ip_lock, flags); | 330 | spin_lock_irqsave(&card->ip_lock, flags); |
331 | rc = __qeth_l3_insert_ip_todo(card, addr, 1); | 331 | rc = __qeth_l3_insert_ip_todo(card, addr, 1); |
@@ -353,10 +353,10 @@ static void qeth_l3_delete_mc_addresses(struct qeth_card *card) | |||
353 | struct qeth_ipaddr *iptodo; | 353 | struct qeth_ipaddr *iptodo; |
354 | unsigned long flags; | 354 | unsigned long flags; |
355 | 355 | ||
356 | QETH_DBF_TEXT(TRACE, 4, "delmc"); | 356 | QETH_CARD_TEXT(card, 4, "delmc"); |
357 | iptodo = qeth_l3_get_addr_buffer(QETH_PROT_IPV4); | 357 | iptodo = qeth_l3_get_addr_buffer(QETH_PROT_IPV4); |
358 | if (!iptodo) { | 358 | if (!iptodo) { |
359 | QETH_DBF_TEXT(TRACE, 2, "dmcnomem"); | 359 | QETH_CARD_TEXT(card, 2, "dmcnomem"); |
360 | return; | 360 | return; |
361 | } | 361 | } |
362 | iptodo->type = QETH_IP_TYPE_DEL_ALL_MC; | 362 | iptodo->type = QETH_IP_TYPE_DEL_ALL_MC; |
@@ -457,8 +457,8 @@ static void qeth_l3_set_ip_addr_list(struct qeth_card *card) | |||
457 | unsigned long flags; | 457 | unsigned long flags; |
458 | int rc; | 458 | int rc; |
459 | 459 | ||
460 | QETH_DBF_TEXT(TRACE, 2, "sdiplist"); | 460 | QETH_CARD_TEXT(card, 2, "sdiplist"); |
461 | QETH_DBF_HEX(TRACE, 2, &card, sizeof(void *)); | 461 | QETH_CARD_HEX(card, 2, &card, sizeof(void *)); |
462 | 462 | ||
463 | if (card->options.sniffer) | 463 | if (card->options.sniffer) |
464 | return; | 464 | return; |
@@ -466,7 +466,7 @@ static void qeth_l3_set_ip_addr_list(struct qeth_card *card) | |||
466 | tbd_list = card->ip_tbd_list; | 466 | tbd_list = card->ip_tbd_list; |
467 | card->ip_tbd_list = kmalloc(sizeof(struct list_head), GFP_ATOMIC); | 467 | card->ip_tbd_list = kmalloc(sizeof(struct list_head), GFP_ATOMIC); |
468 | if (!card->ip_tbd_list) { | 468 | if (!card->ip_tbd_list) { |
469 | QETH_DBF_TEXT(TRACE, 0, "silnomem"); | 469 | QETH_CARD_TEXT(card, 0, "silnomem"); |
470 | card->ip_tbd_list = tbd_list; | 470 | card->ip_tbd_list = tbd_list; |
471 | spin_unlock_irqrestore(&card->ip_lock, flags); | 471 | spin_unlock_irqrestore(&card->ip_lock, flags); |
472 | return; | 472 | return; |
@@ -517,7 +517,7 @@ static void qeth_l3_clear_ip_list(struct qeth_card *card, int clean, | |||
517 | struct qeth_ipaddr *addr, *tmp; | 517 | struct qeth_ipaddr *addr, *tmp; |
518 | unsigned long flags; | 518 | unsigned long flags; |
519 | 519 | ||
520 | QETH_DBF_TEXT(TRACE, 4, "clearip"); | 520 | QETH_CARD_TEXT(card, 4, "clearip"); |
521 | if (recover && card->options.sniffer) | 521 | if (recover && card->options.sniffer) |
522 | return; | 522 | return; |
523 | spin_lock_irqsave(&card->ip_lock, flags); | 523 | spin_lock_irqsave(&card->ip_lock, flags); |
@@ -577,7 +577,7 @@ static int qeth_l3_send_setdelmc(struct qeth_card *card, | |||
577 | struct qeth_cmd_buffer *iob; | 577 | struct qeth_cmd_buffer *iob; |
578 | struct qeth_ipa_cmd *cmd; | 578 | struct qeth_ipa_cmd *cmd; |
579 | 579 | ||
580 | QETH_DBF_TEXT(TRACE, 4, "setdelmc"); | 580 | QETH_CARD_TEXT(card, 4, "setdelmc"); |
581 | 581 | ||
582 | iob = qeth_get_ipacmd_buffer(card, ipacmd, addr->proto); | 582 | iob = qeth_get_ipacmd_buffer(card, ipacmd, addr->proto); |
583 | cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE); | 583 | cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE); |
@@ -615,8 +615,8 @@ static int qeth_l3_send_setdelip(struct qeth_card *card, | |||
615 | struct qeth_ipa_cmd *cmd; | 615 | struct qeth_ipa_cmd *cmd; |
616 | __u8 netmask[16]; | 616 | __u8 netmask[16]; |
617 | 617 | ||
618 | QETH_DBF_TEXT(TRACE, 4, "setdelip"); | 618 | QETH_CARD_TEXT(card, 4, "setdelip"); |
619 | QETH_DBF_TEXT_(TRACE, 4, "flags%02X", flags); | 619 | QETH_CARD_TEXT_(card, 4, "flags%02X", flags); |
620 | 620 | ||
621 | iob = qeth_get_ipacmd_buffer(card, ipacmd, addr->proto); | 621 | iob = qeth_get_ipacmd_buffer(card, ipacmd, addr->proto); |
622 | cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE); | 622 | cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE); |
@@ -645,7 +645,7 @@ static int qeth_l3_send_setrouting(struct qeth_card *card, | |||
645 | struct qeth_ipa_cmd *cmd; | 645 | struct qeth_ipa_cmd *cmd; |
646 | struct qeth_cmd_buffer *iob; | 646 | struct qeth_cmd_buffer *iob; |
647 | 647 | ||
648 | QETH_DBF_TEXT(TRACE, 4, "setroutg"); | 648 | QETH_CARD_TEXT(card, 4, "setroutg"); |
649 | iob = qeth_get_ipacmd_buffer(card, IPA_CMD_SETRTG, prot); | 649 | iob = qeth_get_ipacmd_buffer(card, IPA_CMD_SETRTG, prot); |
650 | cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE); | 650 | cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE); |
651 | cmd->data.setrtg.type = (type); | 651 | cmd->data.setrtg.type = (type); |
@@ -689,7 +689,7 @@ int qeth_l3_setrouting_v4(struct qeth_card *card) | |||
689 | { | 689 | { |
690 | int rc; | 690 | int rc; |
691 | 691 | ||
692 | QETH_DBF_TEXT(TRACE, 3, "setrtg4"); | 692 | QETH_CARD_TEXT(card, 3, "setrtg4"); |
693 | 693 | ||
694 | qeth_l3_correct_routing_type(card, &card->options.route4.type, | 694 | qeth_l3_correct_routing_type(card, &card->options.route4.type, |
695 | QETH_PROT_IPV4); | 695 | QETH_PROT_IPV4); |
@@ -709,7 +709,7 @@ int qeth_l3_setrouting_v6(struct qeth_card *card) | |||
709 | { | 709 | { |
710 | int rc = 0; | 710 | int rc = 0; |
711 | 711 | ||
712 | QETH_DBF_TEXT(TRACE, 3, "setrtg6"); | 712 | QETH_CARD_TEXT(card, 3, "setrtg6"); |
713 | #ifdef CONFIG_QETH_IPV6 | 713 | #ifdef CONFIG_QETH_IPV6 |
714 | 714 | ||
715 | if (!qeth_is_supported(card, IPA_IPV6)) | 715 | if (!qeth_is_supported(card, IPA_IPV6)) |
@@ -753,7 +753,7 @@ int qeth_l3_add_ipato_entry(struct qeth_card *card, | |||
753 | unsigned long flags; | 753 | unsigned long flags; |
754 | int rc = 0; | 754 | int rc = 0; |
755 | 755 | ||
756 | QETH_DBF_TEXT(TRACE, 2, "addipato"); | 756 | QETH_CARD_TEXT(card, 2, "addipato"); |
757 | spin_lock_irqsave(&card->ip_lock, flags); | 757 | spin_lock_irqsave(&card->ip_lock, flags); |
758 | list_for_each_entry(ipatoe, &card->ipato.entries, entry) { | 758 | list_for_each_entry(ipatoe, &card->ipato.entries, entry) { |
759 | if (ipatoe->proto != new->proto) | 759 | if (ipatoe->proto != new->proto) |
@@ -778,7 +778,7 @@ void qeth_l3_del_ipato_entry(struct qeth_card *card, | |||
778 | struct qeth_ipato_entry *ipatoe, *tmp; | 778 | struct qeth_ipato_entry *ipatoe, *tmp; |
779 | unsigned long flags; | 779 | unsigned long flags; |
780 | 780 | ||
781 | QETH_DBF_TEXT(TRACE, 2, "delipato"); | 781 | QETH_CARD_TEXT(card, 2, "delipato"); |
782 | spin_lock_irqsave(&card->ip_lock, flags); | 782 | spin_lock_irqsave(&card->ip_lock, flags); |
783 | list_for_each_entry_safe(ipatoe, tmp, &card->ipato.entries, entry) { | 783 | list_for_each_entry_safe(ipatoe, tmp, &card->ipato.entries, entry) { |
784 | if (ipatoe->proto != proto) | 784 | if (ipatoe->proto != proto) |
@@ -806,11 +806,11 @@ int qeth_l3_add_vipa(struct qeth_card *card, enum qeth_prot_versions proto, | |||
806 | ipaddr = qeth_l3_get_addr_buffer(proto); | 806 | ipaddr = qeth_l3_get_addr_buffer(proto); |
807 | if (ipaddr) { | 807 | if (ipaddr) { |
808 | if (proto == QETH_PROT_IPV4) { | 808 | if (proto == QETH_PROT_IPV4) { |
809 | QETH_DBF_TEXT(TRACE, 2, "addvipa4"); | 809 | QETH_CARD_TEXT(card, 2, "addvipa4"); |
810 | memcpy(&ipaddr->u.a4.addr, addr, 4); | 810 | memcpy(&ipaddr->u.a4.addr, addr, 4); |
811 | ipaddr->u.a4.mask = 0; | 811 | ipaddr->u.a4.mask = 0; |
812 | } else if (proto == QETH_PROT_IPV6) { | 812 | } else if (proto == QETH_PROT_IPV6) { |
813 | QETH_DBF_TEXT(TRACE, 2, "addvipa6"); | 813 | QETH_CARD_TEXT(card, 2, "addvipa6"); |
814 | memcpy(&ipaddr->u.a6.addr, addr, 16); | 814 | memcpy(&ipaddr->u.a6.addr, addr, 16); |
815 | ipaddr->u.a6.pfxlen = 0; | 815 | ipaddr->u.a6.pfxlen = 0; |
816 | } | 816 | } |
@@ -841,11 +841,11 @@ void qeth_l3_del_vipa(struct qeth_card *card, enum qeth_prot_versions proto, | |||
841 | ipaddr = qeth_l3_get_addr_buffer(proto); | 841 | ipaddr = qeth_l3_get_addr_buffer(proto); |
842 | if (ipaddr) { | 842 | if (ipaddr) { |
843 | if (proto == QETH_PROT_IPV4) { | 843 | if (proto == QETH_PROT_IPV4) { |
844 | QETH_DBF_TEXT(TRACE, 2, "delvipa4"); | 844 | QETH_CARD_TEXT(card, 2, "delvipa4"); |
845 | memcpy(&ipaddr->u.a4.addr, addr, 4); | 845 | memcpy(&ipaddr->u.a4.addr, addr, 4); |
846 | ipaddr->u.a4.mask = 0; | 846 | ipaddr->u.a4.mask = 0; |
847 | } else if (proto == QETH_PROT_IPV6) { | 847 | } else if (proto == QETH_PROT_IPV6) { |
848 | QETH_DBF_TEXT(TRACE, 2, "delvipa6"); | 848 | QETH_CARD_TEXT(card, 2, "delvipa6"); |
849 | memcpy(&ipaddr->u.a6.addr, addr, 16); | 849 | memcpy(&ipaddr->u.a6.addr, addr, 16); |
850 | ipaddr->u.a6.pfxlen = 0; | 850 | ipaddr->u.a6.pfxlen = 0; |
851 | } | 851 | } |
@@ -870,11 +870,11 @@ int qeth_l3_add_rxip(struct qeth_card *card, enum qeth_prot_versions proto, | |||
870 | ipaddr = qeth_l3_get_addr_buffer(proto); | 870 | ipaddr = qeth_l3_get_addr_buffer(proto); |
871 | if (ipaddr) { | 871 | if (ipaddr) { |
872 | if (proto == QETH_PROT_IPV4) { | 872 | if (proto == QETH_PROT_IPV4) { |
873 | QETH_DBF_TEXT(TRACE, 2, "addrxip4"); | 873 | QETH_CARD_TEXT(card, 2, "addrxip4"); |
874 | memcpy(&ipaddr->u.a4.addr, addr, 4); | 874 | memcpy(&ipaddr->u.a4.addr, addr, 4); |
875 | ipaddr->u.a4.mask = 0; | 875 | ipaddr->u.a4.mask = 0; |
876 | } else if (proto == QETH_PROT_IPV6) { | 876 | } else if (proto == QETH_PROT_IPV6) { |
877 | QETH_DBF_TEXT(TRACE, 2, "addrxip6"); | 877 | QETH_CARD_TEXT(card, 2, "addrxip6"); |
878 | memcpy(&ipaddr->u.a6.addr, addr, 16); | 878 | memcpy(&ipaddr->u.a6.addr, addr, 16); |
879 | ipaddr->u.a6.pfxlen = 0; | 879 | ipaddr->u.a6.pfxlen = 0; |
880 | } | 880 | } |
@@ -905,11 +905,11 @@ void qeth_l3_del_rxip(struct qeth_card *card, enum qeth_prot_versions proto, | |||
905 | ipaddr = qeth_l3_get_addr_buffer(proto); | 905 | ipaddr = qeth_l3_get_addr_buffer(proto); |
906 | if (ipaddr) { | 906 | if (ipaddr) { |
907 | if (proto == QETH_PROT_IPV4) { | 907 | if (proto == QETH_PROT_IPV4) { |
908 | QETH_DBF_TEXT(TRACE, 2, "addrxip4"); | 908 | QETH_CARD_TEXT(card, 2, "addrxip4"); |
909 | memcpy(&ipaddr->u.a4.addr, addr, 4); | 909 | memcpy(&ipaddr->u.a4.addr, addr, 4); |
910 | ipaddr->u.a4.mask = 0; | 910 | ipaddr->u.a4.mask = 0; |
911 | } else if (proto == QETH_PROT_IPV6) { | 911 | } else if (proto == QETH_PROT_IPV6) { |
912 | QETH_DBF_TEXT(TRACE, 2, "addrxip6"); | 912 | QETH_CARD_TEXT(card, 2, "addrxip6"); |
913 | memcpy(&ipaddr->u.a6.addr, addr, 16); | 913 | memcpy(&ipaddr->u.a6.addr, addr, 16); |
914 | ipaddr->u.a6.pfxlen = 0; | 914 | ipaddr->u.a6.pfxlen = 0; |
915 | } | 915 | } |
@@ -929,15 +929,15 @@ static int qeth_l3_register_addr_entry(struct qeth_card *card, | |||
929 | int cnt = 3; | 929 | int cnt = 3; |
930 | 930 | ||
931 | if (addr->proto == QETH_PROT_IPV4) { | 931 | if (addr->proto == QETH_PROT_IPV4) { |
932 | QETH_DBF_TEXT(TRACE, 2, "setaddr4"); | 932 | QETH_CARD_TEXT(card, 2, "setaddr4"); |
933 | QETH_DBF_HEX(TRACE, 3, &addr->u.a4.addr, sizeof(int)); | 933 | QETH_CARD_HEX(card, 3, &addr->u.a4.addr, sizeof(int)); |
934 | } else if (addr->proto == QETH_PROT_IPV6) { | 934 | } else if (addr->proto == QETH_PROT_IPV6) { |
935 | QETH_DBF_TEXT(TRACE, 2, "setaddr6"); | 935 | QETH_CARD_TEXT(card, 2, "setaddr6"); |
936 | QETH_DBF_HEX(TRACE, 3, &addr->u.a6.addr, 8); | 936 | QETH_CARD_HEX(card, 3, &addr->u.a6.addr, 8); |
937 | QETH_DBF_HEX(TRACE, 3, ((char *)&addr->u.a6.addr) + 8, 8); | 937 | QETH_CARD_HEX(card, 3, ((char *)&addr->u.a6.addr) + 8, 8); |
938 | } else { | 938 | } else { |
939 | QETH_DBF_TEXT(TRACE, 2, "setaddr?"); | 939 | QETH_CARD_TEXT(card, 2, "setaddr?"); |
940 | QETH_DBF_HEX(TRACE, 3, addr, sizeof(struct qeth_ipaddr)); | 940 | QETH_CARD_HEX(card, 3, addr, sizeof(struct qeth_ipaddr)); |
941 | } | 941 | } |
942 | do { | 942 | do { |
943 | if (addr->is_multicast) | 943 | if (addr->is_multicast) |
@@ -946,10 +946,10 @@ static int qeth_l3_register_addr_entry(struct qeth_card *card, | |||
946 | rc = qeth_l3_send_setdelip(card, addr, IPA_CMD_SETIP, | 946 | rc = qeth_l3_send_setdelip(card, addr, IPA_CMD_SETIP, |
947 | addr->set_flags); | 947 | addr->set_flags); |
948 | if (rc) | 948 | if (rc) |
949 | QETH_DBF_TEXT(TRACE, 2, "failed"); | 949 | QETH_CARD_TEXT(card, 2, "failed"); |
950 | } while ((--cnt > 0) && rc); | 950 | } while ((--cnt > 0) && rc); |
951 | if (rc) { | 951 | if (rc) { |
952 | QETH_DBF_TEXT(TRACE, 2, "FAILED"); | 952 | QETH_CARD_TEXT(card, 2, "FAILED"); |
953 | qeth_l3_ipaddr_to_string(addr->proto, (u8 *)&addr->u, buf); | 953 | qeth_l3_ipaddr_to_string(addr->proto, (u8 *)&addr->u, buf); |
954 | dev_warn(&card->gdev->dev, | 954 | dev_warn(&card->gdev->dev, |
955 | "Registering IP address %s failed\n", buf); | 955 | "Registering IP address %s failed\n", buf); |
@@ -963,15 +963,15 @@ static int qeth_l3_deregister_addr_entry(struct qeth_card *card, | |||
963 | int rc = 0; | 963 | int rc = 0; |
964 | 964 | ||
965 | if (addr->proto == QETH_PROT_IPV4) { | 965 | if (addr->proto == QETH_PROT_IPV4) { |
966 | QETH_DBF_TEXT(TRACE, 2, "deladdr4"); | 966 | QETH_CARD_TEXT(card, 2, "deladdr4"); |
967 | QETH_DBF_HEX(TRACE, 3, &addr->u.a4.addr, sizeof(int)); | 967 | QETH_CARD_HEX(card, 3, &addr->u.a4.addr, sizeof(int)); |
968 | } else if (addr->proto == QETH_PROT_IPV6) { | 968 | } else if (addr->proto == QETH_PROT_IPV6) { |
969 | QETH_DBF_TEXT(TRACE, 2, "deladdr6"); | 969 | QETH_CARD_TEXT(card, 2, "deladdr6"); |
970 | QETH_DBF_HEX(TRACE, 3, &addr->u.a6.addr, 8); | 970 | QETH_CARD_HEX(card, 3, &addr->u.a6.addr, 8); |
971 | QETH_DBF_HEX(TRACE, 3, ((char *)&addr->u.a6.addr) + 8, 8); | 971 | QETH_CARD_HEX(card, 3, ((char *)&addr->u.a6.addr) + 8, 8); |
972 | } else { | 972 | } else { |
973 | QETH_DBF_TEXT(TRACE, 2, "deladdr?"); | 973 | QETH_CARD_TEXT(card, 2, "deladdr?"); |
974 | QETH_DBF_HEX(TRACE, 3, addr, sizeof(struct qeth_ipaddr)); | 974 | QETH_CARD_HEX(card, 3, addr, sizeof(struct qeth_ipaddr)); |
975 | } | 975 | } |
976 | if (addr->is_multicast) | 976 | if (addr->is_multicast) |
977 | rc = qeth_l3_send_setdelmc(card, addr, IPA_CMD_DELIPM); | 977 | rc = qeth_l3_send_setdelmc(card, addr, IPA_CMD_DELIPM); |
@@ -979,7 +979,7 @@ static int qeth_l3_deregister_addr_entry(struct qeth_card *card, | |||
979 | rc = qeth_l3_send_setdelip(card, addr, IPA_CMD_DELIP, | 979 | rc = qeth_l3_send_setdelip(card, addr, IPA_CMD_DELIP, |
980 | addr->del_flags); | 980 | addr->del_flags); |
981 | if (rc) | 981 | if (rc) |
982 | QETH_DBF_TEXT(TRACE, 2, "failed"); | 982 | QETH_CARD_TEXT(card, 2, "failed"); |
983 | 983 | ||
984 | return rc; | 984 | return rc; |
985 | } | 985 | } |
@@ -1012,7 +1012,7 @@ static int qeth_l3_send_setadp_mode(struct qeth_card *card, __u32 command, | |||
1012 | struct qeth_cmd_buffer *iob; | 1012 | struct qeth_cmd_buffer *iob; |
1013 | struct qeth_ipa_cmd *cmd; | 1013 | struct qeth_ipa_cmd *cmd; |
1014 | 1014 | ||
1015 | QETH_DBF_TEXT(TRACE, 4, "adpmode"); | 1015 | QETH_CARD_TEXT(card, 4, "adpmode"); |
1016 | 1016 | ||
1017 | iob = qeth_get_adapter_cmd(card, command, | 1017 | iob = qeth_get_adapter_cmd(card, command, |
1018 | sizeof(struct qeth_ipacmd_setadpparms)); | 1018 | sizeof(struct qeth_ipacmd_setadpparms)); |
@@ -1027,7 +1027,7 @@ static int qeth_l3_setadapter_hstr(struct qeth_card *card) | |||
1027 | { | 1027 | { |
1028 | int rc; | 1028 | int rc; |
1029 | 1029 | ||
1030 | QETH_DBF_TEXT(TRACE, 4, "adphstr"); | 1030 | QETH_CARD_TEXT(card, 4, "adphstr"); |
1031 | 1031 | ||
1032 | if (qeth_adp_supported(card, IPA_SETADP_SET_BROADCAST_MODE)) { | 1032 | if (qeth_adp_supported(card, IPA_SETADP_SET_BROADCAST_MODE)) { |
1033 | rc = qeth_l3_send_setadp_mode(card, | 1033 | rc = qeth_l3_send_setadp_mode(card, |
@@ -1093,7 +1093,7 @@ static int qeth_l3_default_setassparms_cb(struct qeth_card *card, | |||
1093 | { | 1093 | { |
1094 | struct qeth_ipa_cmd *cmd; | 1094 | struct qeth_ipa_cmd *cmd; |
1095 | 1095 | ||
1096 | QETH_DBF_TEXT(TRACE, 4, "defadpcb"); | 1096 | QETH_CARD_TEXT(card, 4, "defadpcb"); |
1097 | 1097 | ||
1098 | cmd = (struct qeth_ipa_cmd *) data; | 1098 | cmd = (struct qeth_ipa_cmd *) data; |
1099 | if (cmd->hdr.return_code == 0) { | 1099 | if (cmd->hdr.return_code == 0) { |
@@ -1106,13 +1106,13 @@ static int qeth_l3_default_setassparms_cb(struct qeth_card *card, | |||
1106 | if (cmd->data.setassparms.hdr.assist_no == IPA_INBOUND_CHECKSUM && | 1106 | if (cmd->data.setassparms.hdr.assist_no == IPA_INBOUND_CHECKSUM && |
1107 | cmd->data.setassparms.hdr.command_code == IPA_CMD_ASS_START) { | 1107 | cmd->data.setassparms.hdr.command_code == IPA_CMD_ASS_START) { |
1108 | card->info.csum_mask = cmd->data.setassparms.data.flags_32bit; | 1108 | card->info.csum_mask = cmd->data.setassparms.data.flags_32bit; |
1109 | QETH_DBF_TEXT_(TRACE, 3, "csum:%d", card->info.csum_mask); | 1109 | QETH_CARD_TEXT_(card, 3, "csum:%d", card->info.csum_mask); |
1110 | } | 1110 | } |
1111 | if (cmd->data.setassparms.hdr.assist_no == IPA_OUTBOUND_CHECKSUM && | 1111 | if (cmd->data.setassparms.hdr.assist_no == IPA_OUTBOUND_CHECKSUM && |
1112 | cmd->data.setassparms.hdr.command_code == IPA_CMD_ASS_START) { | 1112 | cmd->data.setassparms.hdr.command_code == IPA_CMD_ASS_START) { |
1113 | card->info.tx_csum_mask = | 1113 | card->info.tx_csum_mask = |
1114 | cmd->data.setassparms.data.flags_32bit; | 1114 | cmd->data.setassparms.data.flags_32bit; |
1115 | QETH_DBF_TEXT_(TRACE, 3, "tcsu:%d", card->info.tx_csum_mask); | 1115 | QETH_CARD_TEXT_(card, 3, "tcsu:%d", card->info.tx_csum_mask); |
1116 | } | 1116 | } |
1117 | 1117 | ||
1118 | return 0; | 1118 | return 0; |
@@ -1125,7 +1125,7 @@ static struct qeth_cmd_buffer *qeth_l3_get_setassparms_cmd( | |||
1125 | struct qeth_cmd_buffer *iob; | 1125 | struct qeth_cmd_buffer *iob; |
1126 | struct qeth_ipa_cmd *cmd; | 1126 | struct qeth_ipa_cmd *cmd; |
1127 | 1127 | ||
1128 | QETH_DBF_TEXT(TRACE, 4, "getasscm"); | 1128 | QETH_CARD_TEXT(card, 4, "getasscm"); |
1129 | iob = qeth_get_ipacmd_buffer(card, IPA_CMD_SETASSPARMS, prot); | 1129 | iob = qeth_get_ipacmd_buffer(card, IPA_CMD_SETASSPARMS, prot); |
1130 | 1130 | ||
1131 | cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE); | 1131 | cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE); |
@@ -1147,7 +1147,7 @@ static int qeth_l3_send_setassparms(struct qeth_card *card, | |||
1147 | int rc; | 1147 | int rc; |
1148 | struct qeth_ipa_cmd *cmd; | 1148 | struct qeth_ipa_cmd *cmd; |
1149 | 1149 | ||
1150 | QETH_DBF_TEXT(TRACE, 4, "sendassp"); | 1150 | QETH_CARD_TEXT(card, 4, "sendassp"); |
1151 | 1151 | ||
1152 | cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE); | 1152 | cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE); |
1153 | if (len <= sizeof(__u32)) | 1153 | if (len <= sizeof(__u32)) |
@@ -1166,7 +1166,7 @@ static int qeth_l3_send_simple_setassparms_ipv6(struct qeth_card *card, | |||
1166 | int rc; | 1166 | int rc; |
1167 | struct qeth_cmd_buffer *iob; | 1167 | struct qeth_cmd_buffer *iob; |
1168 | 1168 | ||
1169 | QETH_DBF_TEXT(TRACE, 4, "simassp6"); | 1169 | QETH_CARD_TEXT(card, 4, "simassp6"); |
1170 | iob = qeth_l3_get_setassparms_cmd(card, ipa_func, cmd_code, | 1170 | iob = qeth_l3_get_setassparms_cmd(card, ipa_func, cmd_code, |
1171 | 0, QETH_PROT_IPV6); | 1171 | 0, QETH_PROT_IPV6); |
1172 | rc = qeth_l3_send_setassparms(card, iob, 0, 0, | 1172 | rc = qeth_l3_send_setassparms(card, iob, 0, 0, |
@@ -1182,7 +1182,7 @@ static int qeth_l3_send_simple_setassparms(struct qeth_card *card, | |||
1182 | int length = 0; | 1182 | int length = 0; |
1183 | struct qeth_cmd_buffer *iob; | 1183 | struct qeth_cmd_buffer *iob; |
1184 | 1184 | ||
1185 | QETH_DBF_TEXT(TRACE, 4, "simassp4"); | 1185 | QETH_CARD_TEXT(card, 4, "simassp4"); |
1186 | if (data) | 1186 | if (data) |
1187 | length = sizeof(__u32); | 1187 | length = sizeof(__u32); |
1188 | iob = qeth_l3_get_setassparms_cmd(card, ipa_func, cmd_code, | 1188 | iob = qeth_l3_get_setassparms_cmd(card, ipa_func, cmd_code, |
@@ -1196,7 +1196,7 @@ static int qeth_l3_start_ipa_arp_processing(struct qeth_card *card) | |||
1196 | { | 1196 | { |
1197 | int rc; | 1197 | int rc; |
1198 | 1198 | ||
1199 | QETH_DBF_TEXT(TRACE, 3, "ipaarp"); | 1199 | QETH_CARD_TEXT(card, 3, "ipaarp"); |
1200 | 1200 | ||
1201 | if (!qeth_is_supported(card, IPA_ARP_PROCESSING)) { | 1201 | if (!qeth_is_supported(card, IPA_ARP_PROCESSING)) { |
1202 | dev_info(&card->gdev->dev, | 1202 | dev_info(&card->gdev->dev, |
@@ -1218,7 +1218,7 @@ static int qeth_l3_start_ipa_ip_fragmentation(struct qeth_card *card) | |||
1218 | { | 1218 | { |
1219 | int rc; | 1219 | int rc; |
1220 | 1220 | ||
1221 | QETH_DBF_TEXT(TRACE, 3, "ipaipfrg"); | 1221 | QETH_CARD_TEXT(card, 3, "ipaipfrg"); |
1222 | 1222 | ||
1223 | if (!qeth_is_supported(card, IPA_IP_FRAGMENTATION)) { | 1223 | if (!qeth_is_supported(card, IPA_IP_FRAGMENTATION)) { |
1224 | dev_info(&card->gdev->dev, | 1224 | dev_info(&card->gdev->dev, |
@@ -1243,7 +1243,7 @@ static int qeth_l3_start_ipa_source_mac(struct qeth_card *card) | |||
1243 | { | 1243 | { |
1244 | int rc; | 1244 | int rc; |
1245 | 1245 | ||
1246 | QETH_DBF_TEXT(TRACE, 3, "stsrcmac"); | 1246 | QETH_CARD_TEXT(card, 3, "stsrcmac"); |
1247 | 1247 | ||
1248 | if (!qeth_is_supported(card, IPA_SOURCE_MAC)) { | 1248 | if (!qeth_is_supported(card, IPA_SOURCE_MAC)) { |
1249 | dev_info(&card->gdev->dev, | 1249 | dev_info(&card->gdev->dev, |
@@ -1265,7 +1265,7 @@ static int qeth_l3_start_ipa_vlan(struct qeth_card *card) | |||
1265 | { | 1265 | { |
1266 | int rc = 0; | 1266 | int rc = 0; |
1267 | 1267 | ||
1268 | QETH_DBF_TEXT(TRACE, 3, "strtvlan"); | 1268 | QETH_CARD_TEXT(card, 3, "strtvlan"); |
1269 | 1269 | ||
1270 | if (!qeth_is_supported(card, IPA_FULL_VLAN)) { | 1270 | if (!qeth_is_supported(card, IPA_FULL_VLAN)) { |
1271 | dev_info(&card->gdev->dev, | 1271 | dev_info(&card->gdev->dev, |
@@ -1289,7 +1289,7 @@ static int qeth_l3_start_ipa_multicast(struct qeth_card *card) | |||
1289 | { | 1289 | { |
1290 | int rc; | 1290 | int rc; |
1291 | 1291 | ||
1292 | QETH_DBF_TEXT(TRACE, 3, "stmcast"); | 1292 | QETH_CARD_TEXT(card, 3, "stmcast"); |
1293 | 1293 | ||
1294 | if (!qeth_is_supported(card, IPA_MULTICASTING)) { | 1294 | if (!qeth_is_supported(card, IPA_MULTICASTING)) { |
1295 | dev_info(&card->gdev->dev, | 1295 | dev_info(&card->gdev->dev, |
@@ -1349,7 +1349,7 @@ static int qeth_l3_softsetup_ipv6(struct qeth_card *card) | |||
1349 | { | 1349 | { |
1350 | int rc; | 1350 | int rc; |
1351 | 1351 | ||
1352 | QETH_DBF_TEXT(TRACE, 3, "softipv6"); | 1352 | QETH_CARD_TEXT(card, 3, "softipv6"); |
1353 | 1353 | ||
1354 | if (card->info.type == QETH_CARD_TYPE_IQD) | 1354 | if (card->info.type == QETH_CARD_TYPE_IQD) |
1355 | goto out; | 1355 | goto out; |
@@ -1395,7 +1395,7 @@ static int qeth_l3_start_ipa_ipv6(struct qeth_card *card) | |||
1395 | { | 1395 | { |
1396 | int rc = 0; | 1396 | int rc = 0; |
1397 | 1397 | ||
1398 | QETH_DBF_TEXT(TRACE, 3, "strtipv6"); | 1398 | QETH_CARD_TEXT(card, 3, "strtipv6"); |
1399 | 1399 | ||
1400 | if (!qeth_is_supported(card, IPA_IPV6)) { | 1400 | if (!qeth_is_supported(card, IPA_IPV6)) { |
1401 | dev_info(&card->gdev->dev, | 1401 | dev_info(&card->gdev->dev, |
@@ -1412,7 +1412,7 @@ static int qeth_l3_start_ipa_broadcast(struct qeth_card *card) | |||
1412 | { | 1412 | { |
1413 | int rc; | 1413 | int rc; |
1414 | 1414 | ||
1415 | QETH_DBF_TEXT(TRACE, 3, "stbrdcst"); | 1415 | QETH_CARD_TEXT(card, 3, "stbrdcst"); |
1416 | card->info.broadcast_capable = 0; | 1416 | card->info.broadcast_capable = 0; |
1417 | if (!qeth_is_supported(card, IPA_FILTERING)) { | 1417 | if (!qeth_is_supported(card, IPA_FILTERING)) { |
1418 | dev_info(&card->gdev->dev, | 1418 | dev_info(&card->gdev->dev, |
@@ -1512,7 +1512,7 @@ static int qeth_l3_start_ipa_checksum(struct qeth_card *card) | |||
1512 | { | 1512 | { |
1513 | int rc = 0; | 1513 | int rc = 0; |
1514 | 1514 | ||
1515 | QETH_DBF_TEXT(TRACE, 3, "strtcsum"); | 1515 | QETH_CARD_TEXT(card, 3, "strtcsum"); |
1516 | 1516 | ||
1517 | if (card->options.checksum_type == NO_CHECKSUMMING) { | 1517 | if (card->options.checksum_type == NO_CHECKSUMMING) { |
1518 | dev_info(&card->gdev->dev, | 1518 | dev_info(&card->gdev->dev, |
@@ -1569,7 +1569,7 @@ static int qeth_l3_start_ipa_tso(struct qeth_card *card) | |||
1569 | { | 1569 | { |
1570 | int rc; | 1570 | int rc; |
1571 | 1571 | ||
1572 | QETH_DBF_TEXT(TRACE, 3, "sttso"); | 1572 | QETH_CARD_TEXT(card, 3, "sttso"); |
1573 | 1573 | ||
1574 | if (!qeth_is_supported(card, IPA_OUTBOUND_TSO)) { | 1574 | if (!qeth_is_supported(card, IPA_OUTBOUND_TSO)) { |
1575 | dev_info(&card->gdev->dev, | 1575 | dev_info(&card->gdev->dev, |
@@ -1596,7 +1596,7 @@ static int qeth_l3_start_ipa_tso(struct qeth_card *card) | |||
1596 | 1596 | ||
1597 | static int qeth_l3_start_ipassists(struct qeth_card *card) | 1597 | static int qeth_l3_start_ipassists(struct qeth_card *card) |
1598 | { | 1598 | { |
1599 | QETH_DBF_TEXT(TRACE, 3, "strtipas"); | 1599 | QETH_CARD_TEXT(card, 3, "strtipas"); |
1600 | 1600 | ||
1601 | qeth_set_access_ctrl_online(card); /* go on*/ | 1601 | qeth_set_access_ctrl_online(card); /* go on*/ |
1602 | qeth_l3_start_ipa_arp_processing(card); /* go on*/ | 1602 | qeth_l3_start_ipa_arp_processing(card); /* go on*/ |
@@ -1619,7 +1619,7 @@ static int qeth_l3_put_unique_id(struct qeth_card *card) | |||
1619 | struct qeth_cmd_buffer *iob; | 1619 | struct qeth_cmd_buffer *iob; |
1620 | struct qeth_ipa_cmd *cmd; | 1620 | struct qeth_ipa_cmd *cmd; |
1621 | 1621 | ||
1622 | QETH_DBF_TEXT(TRACE, 2, "puniqeid"); | 1622 | QETH_CARD_TEXT(card, 2, "puniqeid"); |
1623 | 1623 | ||
1624 | if ((card->info.unique_id & UNIQUE_ID_NOT_BY_CARD) == | 1624 | if ((card->info.unique_id & UNIQUE_ID_NOT_BY_CARD) == |
1625 | UNIQUE_ID_NOT_BY_CARD) | 1625 | UNIQUE_ID_NOT_BY_CARD) |
@@ -1723,7 +1723,7 @@ qeth_diags_trace_cb(struct qeth_card *card, struct qeth_reply *reply, | |||
1723 | cmd = (struct qeth_ipa_cmd *)data; | 1723 | cmd = (struct qeth_ipa_cmd *)data; |
1724 | rc = cmd->hdr.return_code; | 1724 | rc = cmd->hdr.return_code; |
1725 | if (rc) | 1725 | if (rc) |
1726 | QETH_DBF_TEXT_(TRACE, 2, "dxter%x", rc); | 1726 | QETH_CARD_TEXT_(card, 2, "dxter%x", rc); |
1727 | switch (cmd->data.diagass.action) { | 1727 | switch (cmd->data.diagass.action) { |
1728 | case QETH_DIAGS_CMD_TRACE_QUERY: | 1728 | case QETH_DIAGS_CMD_TRACE_QUERY: |
1729 | break; | 1729 | break; |
@@ -1800,7 +1800,7 @@ static void qeth_l3_add_mc(struct qeth_card *card, struct in_device *in4_dev) | |||
1800 | struct ip_mc_list *im4; | 1800 | struct ip_mc_list *im4; |
1801 | char buf[MAX_ADDR_LEN]; | 1801 | char buf[MAX_ADDR_LEN]; |
1802 | 1802 | ||
1803 | QETH_DBF_TEXT(TRACE, 4, "addmc"); | 1803 | QETH_CARD_TEXT(card, 4, "addmc"); |
1804 | for (im4 = in4_dev->mc_list; im4; im4 = im4->next) { | 1804 | for (im4 = in4_dev->mc_list; im4; im4 = im4->next) { |
1805 | qeth_l3_get_mac_for_ipm(im4->multiaddr, buf, in4_dev->dev); | 1805 | qeth_l3_get_mac_for_ipm(im4->multiaddr, buf, in4_dev->dev); |
1806 | ipm = qeth_l3_get_addr_buffer(QETH_PROT_IPV4); | 1806 | ipm = qeth_l3_get_addr_buffer(QETH_PROT_IPV4); |
@@ -1820,7 +1820,7 @@ static void qeth_l3_add_vlan_mc(struct qeth_card *card) | |||
1820 | struct vlan_group *vg; | 1820 | struct vlan_group *vg; |
1821 | int i; | 1821 | int i; |
1822 | 1822 | ||
1823 | QETH_DBF_TEXT(TRACE, 4, "addmcvl"); | 1823 | QETH_CARD_TEXT(card, 4, "addmcvl"); |
1824 | if (!qeth_is_supported(card, IPA_FULL_VLAN) || (card->vlangrp == NULL)) | 1824 | if (!qeth_is_supported(card, IPA_FULL_VLAN) || (card->vlangrp == NULL)) |
1825 | return; | 1825 | return; |
1826 | 1826 | ||
@@ -1844,7 +1844,7 @@ static void qeth_l3_add_multicast_ipv4(struct qeth_card *card) | |||
1844 | { | 1844 | { |
1845 | struct in_device *in4_dev; | 1845 | struct in_device *in4_dev; |
1846 | 1846 | ||
1847 | QETH_DBF_TEXT(TRACE, 4, "chkmcv4"); | 1847 | QETH_CARD_TEXT(card, 4, "chkmcv4"); |
1848 | in4_dev = in_dev_get(card->dev); | 1848 | in4_dev = in_dev_get(card->dev); |
1849 | if (in4_dev == NULL) | 1849 | if (in4_dev == NULL) |
1850 | return; | 1850 | return; |
@@ -1862,7 +1862,7 @@ static void qeth_l3_add_mc6(struct qeth_card *card, struct inet6_dev *in6_dev) | |||
1862 | struct ifmcaddr6 *im6; | 1862 | struct ifmcaddr6 *im6; |
1863 | char buf[MAX_ADDR_LEN]; | 1863 | char buf[MAX_ADDR_LEN]; |
1864 | 1864 | ||
1865 | QETH_DBF_TEXT(TRACE, 4, "addmc6"); | 1865 | QETH_CARD_TEXT(card, 4, "addmc6"); |
1866 | for (im6 = in6_dev->mc_list; im6 != NULL; im6 = im6->next) { | 1866 | for (im6 = in6_dev->mc_list; im6 != NULL; im6 = im6->next) { |
1867 | ndisc_mc_map(&im6->mca_addr, buf, in6_dev->dev, 0); | 1867 | ndisc_mc_map(&im6->mca_addr, buf, in6_dev->dev, 0); |
1868 | ipm = qeth_l3_get_addr_buffer(QETH_PROT_IPV6); | 1868 | ipm = qeth_l3_get_addr_buffer(QETH_PROT_IPV6); |
@@ -1883,7 +1883,7 @@ static void qeth_l3_add_vlan_mc6(struct qeth_card *card) | |||
1883 | struct vlan_group *vg; | 1883 | struct vlan_group *vg; |
1884 | int i; | 1884 | int i; |
1885 | 1885 | ||
1886 | QETH_DBF_TEXT(TRACE, 4, "admc6vl"); | 1886 | QETH_CARD_TEXT(card, 4, "admc6vl"); |
1887 | if (!qeth_is_supported(card, IPA_FULL_VLAN) || (card->vlangrp == NULL)) | 1887 | if (!qeth_is_supported(card, IPA_FULL_VLAN) || (card->vlangrp == NULL)) |
1888 | return; | 1888 | return; |
1889 | 1889 | ||
@@ -1907,7 +1907,7 @@ static void qeth_l3_add_multicast_ipv6(struct qeth_card *card) | |||
1907 | { | 1907 | { |
1908 | struct inet6_dev *in6_dev; | 1908 | struct inet6_dev *in6_dev; |
1909 | 1909 | ||
1910 | QETH_DBF_TEXT(TRACE, 4, "chkmcv6"); | 1910 | QETH_CARD_TEXT(card, 4, "chkmcv6"); |
1911 | if (!qeth_is_supported(card, IPA_IPV6)) | 1911 | if (!qeth_is_supported(card, IPA_IPV6)) |
1912 | return ; | 1912 | return ; |
1913 | in6_dev = in6_dev_get(card->dev); | 1913 | in6_dev = in6_dev_get(card->dev); |
@@ -1928,7 +1928,7 @@ static void qeth_l3_free_vlan_addresses4(struct qeth_card *card, | |||
1928 | struct in_ifaddr *ifa; | 1928 | struct in_ifaddr *ifa; |
1929 | struct qeth_ipaddr *addr; | 1929 | struct qeth_ipaddr *addr; |
1930 | 1930 | ||
1931 | QETH_DBF_TEXT(TRACE, 4, "frvaddr4"); | 1931 | QETH_CARD_TEXT(card, 4, "frvaddr4"); |
1932 | 1932 | ||
1933 | in_dev = in_dev_get(vlan_group_get_device(card->vlangrp, vid)); | 1933 | in_dev = in_dev_get(vlan_group_get_device(card->vlangrp, vid)); |
1934 | if (!in_dev) | 1934 | if (!in_dev) |
@@ -1954,7 +1954,7 @@ static void qeth_l3_free_vlan_addresses6(struct qeth_card *card, | |||
1954 | struct inet6_ifaddr *ifa; | 1954 | struct inet6_ifaddr *ifa; |
1955 | struct qeth_ipaddr *addr; | 1955 | struct qeth_ipaddr *addr; |
1956 | 1956 | ||
1957 | QETH_DBF_TEXT(TRACE, 4, "frvaddr6"); | 1957 | QETH_CARD_TEXT(card, 4, "frvaddr6"); |
1958 | 1958 | ||
1959 | in6_dev = in6_dev_get(vlan_group_get_device(card->vlangrp, vid)); | 1959 | in6_dev = in6_dev_get(vlan_group_get_device(card->vlangrp, vid)); |
1960 | if (!in6_dev) | 1960 | if (!in6_dev) |
@@ -1989,7 +1989,7 @@ static void qeth_l3_vlan_rx_register(struct net_device *dev, | |||
1989 | struct qeth_card *card = dev->ml_priv; | 1989 | struct qeth_card *card = dev->ml_priv; |
1990 | unsigned long flags; | 1990 | unsigned long flags; |
1991 | 1991 | ||
1992 | QETH_DBF_TEXT(TRACE, 4, "vlanreg"); | 1992 | QETH_CARD_TEXT(card, 4, "vlanreg"); |
1993 | spin_lock_irqsave(&card->vlanlock, flags); | 1993 | spin_lock_irqsave(&card->vlanlock, flags); |
1994 | card->vlangrp = grp; | 1994 | card->vlangrp = grp; |
1995 | spin_unlock_irqrestore(&card->vlanlock, flags); | 1995 | spin_unlock_irqrestore(&card->vlanlock, flags); |
@@ -2005,9 +2005,9 @@ static void qeth_l3_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid) | |||
2005 | struct qeth_card *card = dev->ml_priv; | 2005 | struct qeth_card *card = dev->ml_priv; |
2006 | unsigned long flags; | 2006 | unsigned long flags; |
2007 | 2007 | ||
2008 | QETH_DBF_TEXT_(TRACE, 4, "kid:%d", vid); | 2008 | QETH_CARD_TEXT_(card, 4, "kid:%d", vid); |
2009 | if (qeth_wait_for_threads(card, QETH_RECOVER_THREAD)) { | 2009 | if (qeth_wait_for_threads(card, QETH_RECOVER_THREAD)) { |
2010 | QETH_DBF_TEXT(TRACE, 3, "kidREC"); | 2010 | QETH_CARD_TEXT(card, 3, "kidREC"); |
2011 | return; | 2011 | return; |
2012 | } | 2012 | } |
2013 | spin_lock_irqsave(&card->vlanlock, flags); | 2013 | spin_lock_irqsave(&card->vlanlock, flags); |
@@ -2162,7 +2162,7 @@ static void qeth_l3_process_inbound_buffer(struct qeth_card *card, | |||
2162 | break; | 2162 | break; |
2163 | default: | 2163 | default: |
2164 | dev_kfree_skb_any(skb); | 2164 | dev_kfree_skb_any(skb); |
2165 | QETH_DBF_TEXT(TRACE, 3, "inbunkno"); | 2165 | QETH_CARD_TEXT(card, 3, "inbunkno"); |
2166 | QETH_DBF_HEX(CTRL, 3, hdr, QETH_DBF_CTRL_LEN); | 2166 | QETH_DBF_HEX(CTRL, 3, hdr, QETH_DBF_CTRL_LEN); |
2167 | continue; | 2167 | continue; |
2168 | } | 2168 | } |
@@ -2229,7 +2229,8 @@ static struct qeth_card *qeth_l3_get_card_from_dev(struct net_device *dev) | |||
2229 | card = vlan_dev_real_dev(dev)->ml_priv; | 2229 | card = vlan_dev_real_dev(dev)->ml_priv; |
2230 | if (card && card->options.layer2) | 2230 | if (card && card->options.layer2) |
2231 | card = NULL; | 2231 | card = NULL; |
2232 | QETH_DBF_TEXT_(TRACE, 4, "%d", rc); | 2232 | if (card) |
2233 | QETH_CARD_TEXT_(card, 4, "%d", rc); | ||
2233 | return card ; | 2234 | return card ; |
2234 | } | 2235 | } |
2235 | 2236 | ||
@@ -2307,10 +2308,10 @@ qeth_l3_handle_promisc_mode(struct qeth_card *card) | |||
2307 | } else if (card->options.sniffer && /* HiperSockets trace */ | 2308 | } else if (card->options.sniffer && /* HiperSockets trace */ |
2308 | qeth_adp_supported(card, IPA_SETADP_SET_DIAG_ASSIST)) { | 2309 | qeth_adp_supported(card, IPA_SETADP_SET_DIAG_ASSIST)) { |
2309 | if (dev->flags & IFF_PROMISC) { | 2310 | if (dev->flags & IFF_PROMISC) { |
2310 | QETH_DBF_TEXT(TRACE, 3, "+promisc"); | 2311 | QETH_CARD_TEXT(card, 3, "+promisc"); |
2311 | qeth_diags_trace(card, QETH_DIAGS_CMD_TRACE_ENABLE); | 2312 | qeth_diags_trace(card, QETH_DIAGS_CMD_TRACE_ENABLE); |
2312 | } else { | 2313 | } else { |
2313 | QETH_DBF_TEXT(TRACE, 3, "-promisc"); | 2314 | QETH_CARD_TEXT(card, 3, "-promisc"); |
2314 | qeth_diags_trace(card, QETH_DIAGS_CMD_TRACE_DISABLE); | 2315 | qeth_diags_trace(card, QETH_DIAGS_CMD_TRACE_DISABLE); |
2315 | } | 2316 | } |
2316 | } | 2317 | } |
@@ -2320,7 +2321,7 @@ static void qeth_l3_set_multicast_list(struct net_device *dev) | |||
2320 | { | 2321 | { |
2321 | struct qeth_card *card = dev->ml_priv; | 2322 | struct qeth_card *card = dev->ml_priv; |
2322 | 2323 | ||
2323 | QETH_DBF_TEXT(TRACE, 3, "setmulti"); | 2324 | QETH_CARD_TEXT(card, 3, "setmulti"); |
2324 | if (qeth_threads_running(card, QETH_RECOVER_THREAD) && | 2325 | if (qeth_threads_running(card, QETH_RECOVER_THREAD) && |
2325 | (card->state != CARD_STATE_UP)) | 2326 | (card->state != CARD_STATE_UP)) |
2326 | return; | 2327 | return; |
@@ -2365,7 +2366,7 @@ static int qeth_l3_arp_set_no_entries(struct qeth_card *card, int no_entries) | |||
2365 | int tmp; | 2366 | int tmp; |
2366 | int rc; | 2367 | int rc; |
2367 | 2368 | ||
2368 | QETH_DBF_TEXT(TRACE, 3, "arpstnoe"); | 2369 | QETH_CARD_TEXT(card, 3, "arpstnoe"); |
2369 | 2370 | ||
2370 | /* | 2371 | /* |
2371 | * currently GuestLAN only supports the ARP assist function | 2372 | * currently GuestLAN only supports the ARP assist function |
@@ -2417,17 +2418,17 @@ static int qeth_l3_arp_query_cb(struct qeth_card *card, | |||
2417 | int uentry_size; | 2418 | int uentry_size; |
2418 | int i; | 2419 | int i; |
2419 | 2420 | ||
2420 | QETH_DBF_TEXT(TRACE, 4, "arpquecb"); | 2421 | QETH_CARD_TEXT(card, 4, "arpquecb"); |
2421 | 2422 | ||
2422 | qinfo = (struct qeth_arp_query_info *) reply->param; | 2423 | qinfo = (struct qeth_arp_query_info *) reply->param; |
2423 | cmd = (struct qeth_ipa_cmd *) data; | 2424 | cmd = (struct qeth_ipa_cmd *) data; |
2424 | if (cmd->hdr.return_code) { | 2425 | if (cmd->hdr.return_code) { |
2425 | QETH_DBF_TEXT_(TRACE, 4, "qaer1%i", cmd->hdr.return_code); | 2426 | QETH_CARD_TEXT_(card, 4, "qaer1%i", cmd->hdr.return_code); |
2426 | return 0; | 2427 | return 0; |
2427 | } | 2428 | } |
2428 | if (cmd->data.setassparms.hdr.return_code) { | 2429 | if (cmd->data.setassparms.hdr.return_code) { |
2429 | cmd->hdr.return_code = cmd->data.setassparms.hdr.return_code; | 2430 | cmd->hdr.return_code = cmd->data.setassparms.hdr.return_code; |
2430 | QETH_DBF_TEXT_(TRACE, 4, "qaer2%i", cmd->hdr.return_code); | 2431 | QETH_CARD_TEXT_(card, 4, "qaer2%i", cmd->hdr.return_code); |
2431 | return 0; | 2432 | return 0; |
2432 | } | 2433 | } |
2433 | qdata = &cmd->data.setassparms.data.query_arp; | 2434 | qdata = &cmd->data.setassparms.data.query_arp; |
@@ -2449,14 +2450,14 @@ static int qeth_l3_arp_query_cb(struct qeth_card *card, | |||
2449 | /* check if there is enough room in userspace */ | 2450 | /* check if there is enough room in userspace */ |
2450 | if ((qinfo->udata_len - qinfo->udata_offset) < | 2451 | if ((qinfo->udata_len - qinfo->udata_offset) < |
2451 | qdata->no_entries * uentry_size){ | 2452 | qdata->no_entries * uentry_size){ |
2452 | QETH_DBF_TEXT_(TRACE, 4, "qaer3%i", -ENOMEM); | 2453 | QETH_CARD_TEXT_(card, 4, "qaer3%i", -ENOMEM); |
2453 | cmd->hdr.return_code = -ENOMEM; | 2454 | cmd->hdr.return_code = -ENOMEM; |
2454 | goto out_error; | 2455 | goto out_error; |
2455 | } | 2456 | } |
2456 | QETH_DBF_TEXT_(TRACE, 4, "anore%i", | 2457 | QETH_CARD_TEXT_(card, 4, "anore%i", |
2457 | cmd->data.setassparms.hdr.number_of_replies); | 2458 | cmd->data.setassparms.hdr.number_of_replies); |
2458 | QETH_DBF_TEXT_(TRACE, 4, "aseqn%i", cmd->data.setassparms.hdr.seq_no); | 2459 | QETH_CARD_TEXT_(card, 4, "aseqn%i", cmd->data.setassparms.hdr.seq_no); |
2459 | QETH_DBF_TEXT_(TRACE, 4, "anoen%i", qdata->no_entries); | 2460 | QETH_CARD_TEXT_(card, 4, "anoen%i", qdata->no_entries); |
2460 | 2461 | ||
2461 | if (qinfo->mask_bits & QETH_QARP_STRIP_ENTRIES) { | 2462 | if (qinfo->mask_bits & QETH_QARP_STRIP_ENTRIES) { |
2462 | /* strip off "media specific information" */ | 2463 | /* strip off "media specific information" */ |
@@ -2492,7 +2493,7 @@ static int qeth_l3_send_ipa_arp_cmd(struct qeth_card *card, | |||
2492 | unsigned long), | 2493 | unsigned long), |
2493 | void *reply_param) | 2494 | void *reply_param) |
2494 | { | 2495 | { |
2495 | QETH_DBF_TEXT(TRACE, 4, "sendarp"); | 2496 | QETH_CARD_TEXT(card, 4, "sendarp"); |
2496 | 2497 | ||
2497 | memcpy(iob->data, IPA_PDU_HEADER, IPA_PDU_HEADER_SIZE); | 2498 | memcpy(iob->data, IPA_PDU_HEADER, IPA_PDU_HEADER_SIZE); |
2498 | memcpy(QETH_IPA_CMD_DEST_ADDR(iob->data), | 2499 | memcpy(QETH_IPA_CMD_DEST_ADDR(iob->data), |
@@ -2508,7 +2509,7 @@ static int qeth_l3_arp_query(struct qeth_card *card, char __user *udata) | |||
2508 | int tmp; | 2509 | int tmp; |
2509 | int rc; | 2510 | int rc; |
2510 | 2511 | ||
2511 | QETH_DBF_TEXT(TRACE, 3, "arpquery"); | 2512 | QETH_CARD_TEXT(card, 3, "arpquery"); |
2512 | 2513 | ||
2513 | if (!qeth_is_supported(card,/*IPA_QUERY_ARP_ADDR_INFO*/ | 2514 | if (!qeth_is_supported(card,/*IPA_QUERY_ARP_ADDR_INFO*/ |
2514 | IPA_ARP_PROCESSING)) { | 2515 | IPA_ARP_PROCESSING)) { |
@@ -2551,7 +2552,7 @@ static int qeth_l3_arp_add_entry(struct qeth_card *card, | |||
2551 | int tmp; | 2552 | int tmp; |
2552 | int rc; | 2553 | int rc; |
2553 | 2554 | ||
2554 | QETH_DBF_TEXT(TRACE, 3, "arpadent"); | 2555 | QETH_CARD_TEXT(card, 3, "arpadent"); |
2555 | 2556 | ||
2556 | /* | 2557 | /* |
2557 | * currently GuestLAN only supports the ARP assist function | 2558 | * currently GuestLAN only supports the ARP assist function |
@@ -2590,7 +2591,7 @@ static int qeth_l3_arp_remove_entry(struct qeth_card *card, | |||
2590 | int tmp; | 2591 | int tmp; |
2591 | int rc; | 2592 | int rc; |
2592 | 2593 | ||
2593 | QETH_DBF_TEXT(TRACE, 3, "arprment"); | 2594 | QETH_CARD_TEXT(card, 3, "arprment"); |
2594 | 2595 | ||
2595 | /* | 2596 | /* |
2596 | * currently GuestLAN only supports the ARP assist function | 2597 | * currently GuestLAN only supports the ARP assist function |
@@ -2626,7 +2627,7 @@ static int qeth_l3_arp_flush_cache(struct qeth_card *card) | |||
2626 | int rc; | 2627 | int rc; |
2627 | int tmp; | 2628 | int tmp; |
2628 | 2629 | ||
2629 | QETH_DBF_TEXT(TRACE, 3, "arpflush"); | 2630 | QETH_CARD_TEXT(card, 3, "arpflush"); |
2630 | 2631 | ||
2631 | /* | 2632 | /* |
2632 | * currently GuestLAN only supports the ARP assist function | 2633 | * currently GuestLAN only supports the ARP assist function |
@@ -2734,7 +2735,7 @@ static int qeth_l3_do_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) | |||
2734 | rc = -EOPNOTSUPP; | 2735 | rc = -EOPNOTSUPP; |
2735 | } | 2736 | } |
2736 | if (rc) | 2737 | if (rc) |
2737 | QETH_DBF_TEXT_(TRACE, 2, "ioce%d", rc); | 2738 | QETH_CARD_TEXT_(card, 2, "ioce%d", rc); |
2738 | return rc; | 2739 | return rc; |
2739 | } | 2740 | } |
2740 | 2741 | ||
@@ -2903,19 +2904,11 @@ static inline int qeth_l3_tso_elements(struct sk_buff *skb) | |||
2903 | unsigned long tcpd = (unsigned long)tcp_hdr(skb) + | 2904 | unsigned long tcpd = (unsigned long)tcp_hdr(skb) + |
2904 | tcp_hdr(skb)->doff * 4; | 2905 | tcp_hdr(skb)->doff * 4; |
2905 | int tcpd_len = skb->len - (tcpd - (unsigned long)skb->data); | 2906 | int tcpd_len = skb->len - (tcpd - (unsigned long)skb->data); |
2906 | int elements = PFN_UP(tcpd + tcpd_len) - PFN_DOWN(tcpd); | 2907 | int elements = PFN_UP(tcpd + tcpd_len - 1) - PFN_DOWN(tcpd); |
2907 | elements += skb_shinfo(skb)->nr_frags; | 2908 | elements += skb_shinfo(skb)->nr_frags; |
2908 | return elements; | 2909 | return elements; |
2909 | } | 2910 | } |
2910 | 2911 | ||
2911 | static inline int qeth_l3_tso_check(struct sk_buff *skb) | ||
2912 | { | ||
2913 | int len = ((unsigned long)tcp_hdr(skb) + tcp_hdr(skb)->doff * 4) - | ||
2914 | (unsigned long)skb->data; | ||
2915 | return (((unsigned long)skb->data & PAGE_MASK) != | ||
2916 | (((unsigned long)skb->data + len) & PAGE_MASK)); | ||
2917 | } | ||
2918 | |||
2919 | static int qeth_l3_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) | 2912 | static int qeth_l3_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) |
2920 | { | 2913 | { |
2921 | int rc; | 2914 | int rc; |
@@ -3015,8 +3008,6 @@ static int qeth_l3_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
3015 | (cast_type == RTN_UNSPEC)) { | 3008 | (cast_type == RTN_UNSPEC)) { |
3016 | hdr = (struct qeth_hdr *)skb_push(new_skb, | 3009 | hdr = (struct qeth_hdr *)skb_push(new_skb, |
3017 | sizeof(struct qeth_hdr_tso)); | 3010 | sizeof(struct qeth_hdr_tso)); |
3018 | if (qeth_l3_tso_check(new_skb)) | ||
3019 | QETH_DBF_MESSAGE(2, "tso skb misaligned\n"); | ||
3020 | memset(hdr, 0, sizeof(struct qeth_hdr_tso)); | 3011 | memset(hdr, 0, sizeof(struct qeth_hdr_tso)); |
3021 | qeth_l3_fill_header(card, hdr, new_skb, ipv, cast_type); | 3012 | qeth_l3_fill_header(card, hdr, new_skb, ipv, cast_type); |
3022 | qeth_tso_fill_header(card, hdr, new_skb); | 3013 | qeth_tso_fill_header(card, hdr, new_skb); |
@@ -3047,10 +3038,20 @@ static int qeth_l3_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
3047 | elements_needed += elems; | 3038 | elements_needed += elems; |
3048 | nr_frags = skb_shinfo(new_skb)->nr_frags; | 3039 | nr_frags = skb_shinfo(new_skb)->nr_frags; |
3049 | 3040 | ||
3050 | if (card->info.type != QETH_CARD_TYPE_IQD) | 3041 | if (card->info.type != QETH_CARD_TYPE_IQD) { |
3042 | int len; | ||
3043 | if (large_send == QETH_LARGE_SEND_TSO) | ||
3044 | len = ((unsigned long)tcp_hdr(new_skb) + | ||
3045 | tcp_hdr(new_skb)->doff * 4) - | ||
3046 | (unsigned long)new_skb->data; | ||
3047 | else | ||
3048 | len = sizeof(struct qeth_hdr_layer3); | ||
3049 | |||
3050 | if (qeth_hdr_chk_and_bounce(new_skb, len)) | ||
3051 | goto tx_drop; | ||
3051 | rc = qeth_do_send_packet(card, queue, new_skb, hdr, | 3052 | rc = qeth_do_send_packet(card, queue, new_skb, hdr, |
3052 | elements_needed); | 3053 | elements_needed); |
3053 | else | 3054 | } else |
3054 | rc = qeth_do_send_packet_fast(card, queue, new_skb, hdr, | 3055 | rc = qeth_do_send_packet_fast(card, queue, new_skb, hdr, |
3055 | elements_needed, data_offset, 0); | 3056 | elements_needed, data_offset, 0); |
3056 | 3057 | ||
@@ -3103,7 +3104,7 @@ static int qeth_l3_open(struct net_device *dev) | |||
3103 | { | 3104 | { |
3104 | struct qeth_card *card = dev->ml_priv; | 3105 | struct qeth_card *card = dev->ml_priv; |
3105 | 3106 | ||
3106 | QETH_DBF_TEXT(TRACE, 4, "qethopen"); | 3107 | QETH_CARD_TEXT(card, 4, "qethopen"); |
3107 | if (card->state != CARD_STATE_SOFTSETUP) | 3108 | if (card->state != CARD_STATE_SOFTSETUP) |
3108 | return -ENODEV; | 3109 | return -ENODEV; |
3109 | card->data.state = CH_STATE_UP; | 3110 | card->data.state = CH_STATE_UP; |
@@ -3119,7 +3120,7 @@ static int qeth_l3_stop(struct net_device *dev) | |||
3119 | { | 3120 | { |
3120 | struct qeth_card *card = dev->ml_priv; | 3121 | struct qeth_card *card = dev->ml_priv; |
3121 | 3122 | ||
3122 | QETH_DBF_TEXT(TRACE, 4, "qethstop"); | 3123 | QETH_CARD_TEXT(card, 4, "qethstop"); |
3123 | netif_tx_disable(dev); | 3124 | netif_tx_disable(dev); |
3124 | if (card->state == CARD_STATE_UP) | 3125 | if (card->state == CARD_STATE_UP) |
3125 | card->state = CARD_STATE_SOFTSETUP; | 3126 | card->state = CARD_STATE_SOFTSETUP; |
@@ -3312,11 +3313,10 @@ static void qeth_l3_qdio_input_handler(struct ccw_device *ccwdev, | |||
3312 | card->perf_stats.inbound_start_time = qeth_get_micros(); | 3313 | card->perf_stats.inbound_start_time = qeth_get_micros(); |
3313 | } | 3314 | } |
3314 | if (qdio_err & QDIO_ERROR_ACTIVATE_CHECK_CONDITION) { | 3315 | if (qdio_err & QDIO_ERROR_ACTIVATE_CHECK_CONDITION) { |
3315 | QETH_DBF_TEXT(TRACE, 1, "qdinchk"); | 3316 | QETH_CARD_TEXT(card, 1, "qdinchk"); |
3316 | QETH_DBF_TEXT_(TRACE, 1, "%s", CARD_BUS_ID(card)); | 3317 | QETH_CARD_TEXT_(card, 1, "%04X%04X", |
3317 | QETH_DBF_TEXT_(TRACE, 1, "%04X%04X", | ||
3318 | first_element, count); | 3318 | first_element, count); |
3319 | QETH_DBF_TEXT_(TRACE, 1, "%04X", queue); | 3319 | QETH_CARD_TEXT_(card, 1, "%04X", queue); |
3320 | qeth_schedule_recovery(card); | 3320 | qeth_schedule_recovery(card); |
3321 | return; | 3321 | return; |
3322 | } | 3322 | } |
@@ -3354,6 +3354,8 @@ static void qeth_l3_remove_device(struct ccwgroup_device *cgdev) | |||
3354 | { | 3354 | { |
3355 | struct qeth_card *card = dev_get_drvdata(&cgdev->dev); | 3355 | struct qeth_card *card = dev_get_drvdata(&cgdev->dev); |
3356 | 3356 | ||
3357 | qeth_l3_remove_device_attributes(&cgdev->dev); | ||
3358 | |||
3357 | qeth_set_allowed_threads(card, 0, 1); | 3359 | qeth_set_allowed_threads(card, 0, 1); |
3358 | wait_event(card->wait_q, qeth_threads_running(card, 0xffffffff) == 0); | 3360 | wait_event(card->wait_q, qeth_threads_running(card, 0xffffffff) == 0); |
3359 | 3361 | ||
@@ -3367,7 +3369,6 @@ static void qeth_l3_remove_device(struct ccwgroup_device *cgdev) | |||
3367 | card->dev = NULL; | 3369 | card->dev = NULL; |
3368 | } | 3370 | } |
3369 | 3371 | ||
3370 | qeth_l3_remove_device_attributes(&cgdev->dev); | ||
3371 | qeth_l3_clear_ip_list(card, 0, 0); | 3372 | qeth_l3_clear_ip_list(card, 0, 0); |
3372 | qeth_l3_clear_ipato_list(card); | 3373 | qeth_l3_clear_ipato_list(card); |
3373 | return; | 3374 | return; |
@@ -3380,6 +3381,7 @@ static int __qeth_l3_set_online(struct ccwgroup_device *gdev, int recovery_mode) | |||
3380 | enum qeth_card_states recover_flag; | 3381 | enum qeth_card_states recover_flag; |
3381 | 3382 | ||
3382 | BUG_ON(!card); | 3383 | BUG_ON(!card); |
3384 | mutex_lock(&card->discipline_mutex); | ||
3383 | mutex_lock(&card->conf_mutex); | 3385 | mutex_lock(&card->conf_mutex); |
3384 | QETH_DBF_TEXT(SETUP, 2, "setonlin"); | 3386 | QETH_DBF_TEXT(SETUP, 2, "setonlin"); |
3385 | QETH_DBF_HEX(SETUP, 2, &card, sizeof(void *)); | 3387 | QETH_DBF_HEX(SETUP, 2, &card, sizeof(void *)); |
@@ -3461,6 +3463,7 @@ static int __qeth_l3_set_online(struct ccwgroup_device *gdev, int recovery_mode) | |||
3461 | kobject_uevent(&gdev->dev.kobj, KOBJ_CHANGE); | 3463 | kobject_uevent(&gdev->dev.kobj, KOBJ_CHANGE); |
3462 | out: | 3464 | out: |
3463 | mutex_unlock(&card->conf_mutex); | 3465 | mutex_unlock(&card->conf_mutex); |
3466 | mutex_unlock(&card->discipline_mutex); | ||
3464 | return 0; | 3467 | return 0; |
3465 | out_remove: | 3468 | out_remove: |
3466 | card->use_hard_stop = 1; | 3469 | card->use_hard_stop = 1; |
@@ -3473,6 +3476,7 @@ out_remove: | |||
3473 | else | 3476 | else |
3474 | card->state = CARD_STATE_DOWN; | 3477 | card->state = CARD_STATE_DOWN; |
3475 | mutex_unlock(&card->conf_mutex); | 3478 | mutex_unlock(&card->conf_mutex); |
3479 | mutex_unlock(&card->discipline_mutex); | ||
3476 | return rc; | 3480 | return rc; |
3477 | } | 3481 | } |
3478 | 3482 | ||
@@ -3488,6 +3492,7 @@ static int __qeth_l3_set_offline(struct ccwgroup_device *cgdev, | |||
3488 | int rc = 0, rc2 = 0, rc3 = 0; | 3492 | int rc = 0, rc2 = 0, rc3 = 0; |
3489 | enum qeth_card_states recover_flag; | 3493 | enum qeth_card_states recover_flag; |
3490 | 3494 | ||
3495 | mutex_lock(&card->discipline_mutex); | ||
3491 | mutex_lock(&card->conf_mutex); | 3496 | mutex_lock(&card->conf_mutex); |
3492 | QETH_DBF_TEXT(SETUP, 3, "setoffl"); | 3497 | QETH_DBF_TEXT(SETUP, 3, "setoffl"); |
3493 | QETH_DBF_HEX(SETUP, 3, &card, sizeof(void *)); | 3498 | QETH_DBF_HEX(SETUP, 3, &card, sizeof(void *)); |
@@ -3508,6 +3513,7 @@ static int __qeth_l3_set_offline(struct ccwgroup_device *cgdev, | |||
3508 | /* let user_space know that device is offline */ | 3513 | /* let user_space know that device is offline */ |
3509 | kobject_uevent(&cgdev->dev.kobj, KOBJ_CHANGE); | 3514 | kobject_uevent(&cgdev->dev.kobj, KOBJ_CHANGE); |
3510 | mutex_unlock(&card->conf_mutex); | 3515 | mutex_unlock(&card->conf_mutex); |
3516 | mutex_unlock(&card->discipline_mutex); | ||
3511 | return 0; | 3517 | return 0; |
3512 | } | 3518 | } |
3513 | 3519 | ||
@@ -3522,11 +3528,11 @@ static int qeth_l3_recover(void *ptr) | |||
3522 | int rc = 0; | 3528 | int rc = 0; |
3523 | 3529 | ||
3524 | card = (struct qeth_card *) ptr; | 3530 | card = (struct qeth_card *) ptr; |
3525 | QETH_DBF_TEXT(TRACE, 2, "recover1"); | 3531 | QETH_CARD_TEXT(card, 2, "recover1"); |
3526 | QETH_DBF_HEX(TRACE, 2, &card, sizeof(void *)); | 3532 | QETH_CARD_HEX(card, 2, &card, sizeof(void *)); |
3527 | if (!qeth_do_run_thread(card, QETH_RECOVER_THREAD)) | 3533 | if (!qeth_do_run_thread(card, QETH_RECOVER_THREAD)) |
3528 | return 0; | 3534 | return 0; |
3529 | QETH_DBF_TEXT(TRACE, 2, "recover2"); | 3535 | QETH_CARD_TEXT(card, 2, "recover2"); |
3530 | dev_warn(&card->gdev->dev, | 3536 | dev_warn(&card->gdev->dev, |
3531 | "A recovery process has been started for the device\n"); | 3537 | "A recovery process has been started for the device\n"); |
3532 | card->use_hard_stop = 1; | 3538 | card->use_hard_stop = 1; |
@@ -3624,8 +3630,8 @@ static int qeth_l3_ip_event(struct notifier_block *this, | |||
3624 | if (dev_net(dev) != &init_net) | 3630 | if (dev_net(dev) != &init_net) |
3625 | return NOTIFY_DONE; | 3631 | return NOTIFY_DONE; |
3626 | 3632 | ||
3627 | QETH_DBF_TEXT(TRACE, 3, "ipevent"); | ||
3628 | card = qeth_l3_get_card_from_dev(dev); | 3633 | card = qeth_l3_get_card_from_dev(dev); |
3634 | QETH_CARD_TEXT(card, 3, "ipevent"); | ||
3629 | if (!card) | 3635 | if (!card) |
3630 | return NOTIFY_DONE; | 3636 | return NOTIFY_DONE; |
3631 | 3637 | ||
@@ -3671,11 +3677,11 @@ static int qeth_l3_ip6_event(struct notifier_block *this, | |||
3671 | struct qeth_ipaddr *addr; | 3677 | struct qeth_ipaddr *addr; |
3672 | struct qeth_card *card; | 3678 | struct qeth_card *card; |
3673 | 3679 | ||
3674 | QETH_DBF_TEXT(TRACE, 3, "ip6event"); | ||
3675 | 3680 | ||
3676 | card = qeth_l3_get_card_from_dev(dev); | 3681 | card = qeth_l3_get_card_from_dev(dev); |
3677 | if (!card) | 3682 | if (!card) |
3678 | return NOTIFY_DONE; | 3683 | return NOTIFY_DONE; |
3684 | QETH_CARD_TEXT(card, 3, "ip6event"); | ||
3679 | if (!qeth_is_supported(card, IPA_IPV6)) | 3685 | if (!qeth_is_supported(card, IPA_IPV6)) |
3680 | return NOTIFY_DONE; | 3686 | return NOTIFY_DONE; |
3681 | 3687 | ||
@@ -3714,7 +3720,7 @@ static int qeth_l3_register_notifiers(void) | |||
3714 | { | 3720 | { |
3715 | int rc; | 3721 | int rc; |
3716 | 3722 | ||
3717 | QETH_DBF_TEXT(TRACE, 5, "regnotif"); | 3723 | QETH_DBF_TEXT(SETUP, 5, "regnotif"); |
3718 | rc = register_inetaddr_notifier(&qeth_l3_ip_notifier); | 3724 | rc = register_inetaddr_notifier(&qeth_l3_ip_notifier); |
3719 | if (rc) | 3725 | if (rc) |
3720 | return rc; | 3726 | return rc; |
@@ -3733,7 +3739,7 @@ static int qeth_l3_register_notifiers(void) | |||
3733 | static void qeth_l3_unregister_notifiers(void) | 3739 | static void qeth_l3_unregister_notifiers(void) |
3734 | { | 3740 | { |
3735 | 3741 | ||
3736 | QETH_DBF_TEXT(TRACE, 5, "unregnot"); | 3742 | QETH_DBF_TEXT(SETUP, 5, "unregnot"); |
3737 | BUG_ON(unregister_inetaddr_notifier(&qeth_l3_ip_notifier)); | 3743 | BUG_ON(unregister_inetaddr_notifier(&qeth_l3_ip_notifier)); |
3738 | #ifdef CONFIG_QETH_IPV6 | 3744 | #ifdef CONFIG_QETH_IPV6 |
3739 | BUG_ON(unregister_inet6addr_notifier(&qeth_l3_ip6_notifier)); | 3745 | BUG_ON(unregister_inet6addr_notifier(&qeth_l3_ip6_notifier)); |
diff --git a/drivers/s390/net/qeth_l3_sys.c b/drivers/s390/net/qeth_l3_sys.c index fb5318b30e99..67cfa68dcf1b 100644 --- a/drivers/s390/net/qeth_l3_sys.c +++ b/drivers/s390/net/qeth_l3_sys.c | |||
@@ -479,6 +479,7 @@ static ssize_t qeth_l3_dev_ipato_enable_store(struct device *dev, | |||
479 | struct device_attribute *attr, const char *buf, size_t count) | 479 | struct device_attribute *attr, const char *buf, size_t count) |
480 | { | 480 | { |
481 | struct qeth_card *card = dev_get_drvdata(dev); | 481 | struct qeth_card *card = dev_get_drvdata(dev); |
482 | struct qeth_ipaddr *tmpipa, *t; | ||
482 | char *tmp; | 483 | char *tmp; |
483 | int rc = 0; | 484 | int rc = 0; |
484 | 485 | ||
@@ -497,8 +498,21 @@ static ssize_t qeth_l3_dev_ipato_enable_store(struct device *dev, | |||
497 | card->ipato.enabled = (card->ipato.enabled)? 0 : 1; | 498 | card->ipato.enabled = (card->ipato.enabled)? 0 : 1; |
498 | } else if (!strcmp(tmp, "1")) { | 499 | } else if (!strcmp(tmp, "1")) { |
499 | card->ipato.enabled = 1; | 500 | card->ipato.enabled = 1; |
501 | list_for_each_entry_safe(tmpipa, t, card->ip_tbd_list, entry) { | ||
502 | if ((tmpipa->type == QETH_IP_TYPE_NORMAL) && | ||
503 | qeth_l3_is_addr_covered_by_ipato(card, tmpipa)) | ||
504 | tmpipa->set_flags |= | ||
505 | QETH_IPA_SETIP_TAKEOVER_FLAG; | ||
506 | } | ||
507 | |||
500 | } else if (!strcmp(tmp, "0")) { | 508 | } else if (!strcmp(tmp, "0")) { |
501 | card->ipato.enabled = 0; | 509 | card->ipato.enabled = 0; |
510 | list_for_each_entry_safe(tmpipa, t, card->ip_tbd_list, entry) { | ||
511 | if (tmpipa->set_flags & | ||
512 | QETH_IPA_SETIP_TAKEOVER_FLAG) | ||
513 | tmpipa->set_flags &= | ||
514 | ~QETH_IPA_SETIP_TAKEOVER_FLAG; | ||
515 | } | ||
502 | } else | 516 | } else |
503 | rc = -EINVAL; | 517 | rc = -EINVAL; |
504 | out: | 518 | out: |
diff --git a/drivers/s390/net/smsgiucv.c b/drivers/s390/net/smsgiucv.c index 70491274da16..65e1cf104943 100644 --- a/drivers/s390/net/smsgiucv.c +++ b/drivers/s390/net/smsgiucv.c | |||
@@ -47,6 +47,7 @@ static struct device *smsg_dev; | |||
47 | 47 | ||
48 | static DEFINE_SPINLOCK(smsg_list_lock); | 48 | static DEFINE_SPINLOCK(smsg_list_lock); |
49 | static LIST_HEAD(smsg_list); | 49 | static LIST_HEAD(smsg_list); |
50 | static int iucv_path_connected; | ||
50 | 51 | ||
51 | static int smsg_path_pending(struct iucv_path *, u8 ipvmid[8], u8 ipuser[16]); | 52 | static int smsg_path_pending(struct iucv_path *, u8 ipvmid[8], u8 ipuser[16]); |
52 | static void smsg_message_pending(struct iucv_path *, struct iucv_message *); | 53 | static void smsg_message_pending(struct iucv_path *, struct iucv_message *); |
@@ -142,8 +143,10 @@ static int smsg_pm_freeze(struct device *dev) | |||
142 | #ifdef CONFIG_PM_DEBUG | 143 | #ifdef CONFIG_PM_DEBUG |
143 | printk(KERN_WARNING "smsg_pm_freeze\n"); | 144 | printk(KERN_WARNING "smsg_pm_freeze\n"); |
144 | #endif | 145 | #endif |
145 | if (smsg_path) | 146 | if (smsg_path && iucv_path_connected) { |
146 | iucv_path_sever(smsg_path, NULL); | 147 | iucv_path_sever(smsg_path, NULL); |
148 | iucv_path_connected = 0; | ||
149 | } | ||
147 | return 0; | 150 | return 0; |
148 | } | 151 | } |
149 | 152 | ||
@@ -154,7 +157,7 @@ static int smsg_pm_restore_thaw(struct device *dev) | |||
154 | #ifdef CONFIG_PM_DEBUG | 157 | #ifdef CONFIG_PM_DEBUG |
155 | printk(KERN_WARNING "smsg_pm_restore_thaw\n"); | 158 | printk(KERN_WARNING "smsg_pm_restore_thaw\n"); |
156 | #endif | 159 | #endif |
157 | if (smsg_path) { | 160 | if (smsg_path && iucv_path_connected) { |
158 | memset(smsg_path, 0, sizeof(*smsg_path)); | 161 | memset(smsg_path, 0, sizeof(*smsg_path)); |
159 | smsg_path->msglim = 255; | 162 | smsg_path->msglim = 255; |
160 | smsg_path->flags = 0; | 163 | smsg_path->flags = 0; |
@@ -165,6 +168,8 @@ static int smsg_pm_restore_thaw(struct device *dev) | |||
165 | printk(KERN_ERR | 168 | printk(KERN_ERR |
166 | "iucv_path_connect returned with rc %i\n", rc); | 169 | "iucv_path_connect returned with rc %i\n", rc); |
167 | #endif | 170 | #endif |
171 | if (!rc) | ||
172 | iucv_path_connected = 1; | ||
168 | cpcmd("SET SMSG IUCV", NULL, 0, NULL); | 173 | cpcmd("SET SMSG IUCV", NULL, 0, NULL); |
169 | } | 174 | } |
170 | return 0; | 175 | return 0; |
@@ -214,6 +219,8 @@ static int __init smsg_init(void) | |||
214 | NULL, NULL, NULL); | 219 | NULL, NULL, NULL); |
215 | if (rc) | 220 | if (rc) |
216 | goto out_free_path; | 221 | goto out_free_path; |
222 | else | ||
223 | iucv_path_connected = 1; | ||
217 | smsg_dev = kzalloc(sizeof(struct device), GFP_KERNEL); | 224 | smsg_dev = kzalloc(sizeof(struct device), GFP_KERNEL); |
218 | if (!smsg_dev) { | 225 | if (!smsg_dev) { |
219 | rc = -ENOMEM; | 226 | rc = -ENOMEM; |