diff options
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/net/qeth_core.h | 1 | ||||
-rw-r--r-- | drivers/s390/net/qeth_core_main.c | 57 | ||||
-rw-r--r-- | drivers/s390/net/qeth_l2_main.c | 8 | ||||
-rw-r--r-- | drivers/s390/net/qeth_l3_main.c | 26 |
4 files changed, 63 insertions, 29 deletions
diff --git a/drivers/s390/net/qeth_core.h b/drivers/s390/net/qeth_core.h index d5ccce1643e4..e0c45574b0c8 100644 --- a/drivers/s390/net/qeth_core.h +++ b/drivers/s390/net/qeth_core.h | |||
@@ -643,7 +643,6 @@ struct qeth_card_options { | |||
643 | int macaddr_mode; | 643 | int macaddr_mode; |
644 | int fake_broadcast; | 644 | int fake_broadcast; |
645 | int add_hhlen; | 645 | int add_hhlen; |
646 | int fake_ll; | ||
647 | int layer2; | 646 | int layer2; |
648 | enum qeth_large_send_types large_send; | 647 | enum qeth_large_send_types large_send; |
649 | int performance_stats; | 648 | int performance_stats; |
diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c index e783644a2105..6811dd529f48 100644 --- a/drivers/s390/net/qeth_core_main.c +++ b/drivers/s390/net/qeth_core_main.c | |||
@@ -287,8 +287,15 @@ int qeth_set_large_send(struct qeth_card *card, | |||
287 | card->options.large_send = type; | 287 | card->options.large_send = type; |
288 | switch (card->options.large_send) { | 288 | switch (card->options.large_send) { |
289 | case QETH_LARGE_SEND_EDDP: | 289 | case QETH_LARGE_SEND_EDDP: |
290 | card->dev->features |= NETIF_F_TSO | NETIF_F_SG | | 290 | if (card->info.type != QETH_CARD_TYPE_IQD) { |
291 | card->dev->features |= NETIF_F_TSO | NETIF_F_SG | | ||
291 | NETIF_F_HW_CSUM; | 292 | NETIF_F_HW_CSUM; |
293 | } else { | ||
294 | card->dev->features &= ~(NETIF_F_TSO | NETIF_F_SG | | ||
295 | NETIF_F_HW_CSUM); | ||
296 | card->options.large_send = QETH_LARGE_SEND_NO; | ||
297 | rc = -EOPNOTSUPP; | ||
298 | } | ||
292 | break; | 299 | break; |
293 | case QETH_LARGE_SEND_TSO: | 300 | case QETH_LARGE_SEND_TSO: |
294 | if (qeth_is_supported(card, IPA_OUTBOUND_TSO)) { | 301 | if (qeth_is_supported(card, IPA_OUTBOUND_TSO)) { |
@@ -572,6 +579,10 @@ static void qeth_send_control_data_cb(struct qeth_channel *channel, | |||
572 | card = CARD_FROM_CDEV(channel->ccwdev); | 579 | card = CARD_FROM_CDEV(channel->ccwdev); |
573 | if (qeth_check_idx_response(iob->data)) { | 580 | if (qeth_check_idx_response(iob->data)) { |
574 | qeth_clear_ipacmd_list(card); | 581 | qeth_clear_ipacmd_list(card); |
582 | if (((iob->data[2] & 0xc0) == 0xc0) && iob->data[4] == 0xf6) | ||
583 | dev_err(&card->gdev->dev, | ||
584 | "The qeth device is not configured " | ||
585 | "for the OSI layer required by z/VM\n"); | ||
575 | qeth_schedule_recovery(card); | 586 | qeth_schedule_recovery(card); |
576 | goto out; | 587 | goto out; |
577 | } | 588 | } |
@@ -1072,7 +1083,6 @@ static void qeth_set_intial_options(struct qeth_card *card) | |||
1072 | card->options.macaddr_mode = QETH_TR_MACADDR_NONCANONICAL; | 1083 | card->options.macaddr_mode = QETH_TR_MACADDR_NONCANONICAL; |
1073 | card->options.fake_broadcast = 0; | 1084 | card->options.fake_broadcast = 0; |
1074 | card->options.add_hhlen = DEFAULT_ADD_HHLEN; | 1085 | card->options.add_hhlen = DEFAULT_ADD_HHLEN; |
1075 | card->options.fake_ll = 0; | ||
1076 | card->options.performance_stats = 0; | 1086 | card->options.performance_stats = 0; |
1077 | card->options.rx_sg_cb = QETH_RX_SG_CB; | 1087 | card->options.rx_sg_cb = QETH_RX_SG_CB; |
1078 | } | 1088 | } |
@@ -1682,6 +1692,7 @@ int qeth_send_control_data(struct qeth_card *card, int len, | |||
1682 | unsigned long flags; | 1692 | unsigned long flags; |
1683 | struct qeth_reply *reply = NULL; | 1693 | struct qeth_reply *reply = NULL; |
1684 | unsigned long timeout; | 1694 | unsigned long timeout; |
1695 | struct qeth_ipa_cmd *cmd; | ||
1685 | 1696 | ||
1686 | QETH_DBF_TEXT(TRACE, 2, "sendctl"); | 1697 | QETH_DBF_TEXT(TRACE, 2, "sendctl"); |
1687 | 1698 | ||
@@ -1728,17 +1739,34 @@ int qeth_send_control_data(struct qeth_card *card, int len, | |||
1728 | wake_up(&card->wait_q); | 1739 | wake_up(&card->wait_q); |
1729 | return rc; | 1740 | return rc; |
1730 | } | 1741 | } |
1731 | while (!atomic_read(&reply->received)) { | 1742 | |
1732 | if (time_after(jiffies, timeout)) { | 1743 | /* we have only one long running ipassist, since we can ensure |
1733 | spin_lock_irqsave(&reply->card->lock, flags); | 1744 | process context of this command we can sleep */ |
1734 | list_del_init(&reply->list); | 1745 | cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE); |
1735 | spin_unlock_irqrestore(&reply->card->lock, flags); | 1746 | if ((cmd->hdr.command == IPA_CMD_SETIP) && |
1736 | reply->rc = -ETIME; | 1747 | (cmd->hdr.prot_version == QETH_PROT_IPV4)) { |
1737 | atomic_inc(&reply->received); | 1748 | if (!wait_event_timeout(reply->wait_q, |
1738 | wake_up(&reply->wait_q); | 1749 | atomic_read(&reply->received), timeout)) |
1739 | } | 1750 | goto time_err; |
1740 | cpu_relax(); | 1751 | } else { |
1741 | }; | 1752 | while (!atomic_read(&reply->received)) { |
1753 | if (time_after(jiffies, timeout)) | ||
1754 | goto time_err; | ||
1755 | cpu_relax(); | ||
1756 | }; | ||
1757 | } | ||
1758 | |||
1759 | rc = reply->rc; | ||
1760 | qeth_put_reply(reply); | ||
1761 | return rc; | ||
1762 | |||
1763 | time_err: | ||
1764 | spin_lock_irqsave(&reply->card->lock, flags); | ||
1765 | list_del_init(&reply->list); | ||
1766 | spin_unlock_irqrestore(&reply->card->lock, flags); | ||
1767 | reply->rc = -ETIME; | ||
1768 | atomic_inc(&reply->received); | ||
1769 | wake_up(&reply->wait_q); | ||
1742 | rc = reply->rc; | 1770 | rc = reply->rc; |
1743 | qeth_put_reply(reply); | 1771 | qeth_put_reply(reply); |
1744 | return rc; | 1772 | return rc; |
@@ -2250,7 +2278,8 @@ void qeth_print_status_message(struct qeth_card *card) | |||
2250 | } | 2278 | } |
2251 | /* fallthrough */ | 2279 | /* fallthrough */ |
2252 | case QETH_CARD_TYPE_IQD: | 2280 | case QETH_CARD_TYPE_IQD: |
2253 | if (card->info.guestlan) { | 2281 | if ((card->info.guestlan) || |
2282 | (card->info.mcl_level[0] & 0x80)) { | ||
2254 | card->info.mcl_level[0] = (char) _ebcasc[(__u8) | 2283 | card->info.mcl_level[0] = (char) _ebcasc[(__u8) |
2255 | card->info.mcl_level[0]]; | 2284 | card->info.mcl_level[0]]; |
2256 | card->info.mcl_level[1] = (char) _ebcasc[(__u8) | 2285 | card->info.mcl_level[1] = (char) _ebcasc[(__u8) |
diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c index 2c48591ced44..21627ba3093b 100644 --- a/drivers/s390/net/qeth_l2_main.c +++ b/drivers/s390/net/qeth_l2_main.c | |||
@@ -1126,9 +1126,11 @@ static int qeth_l2_recover(void *ptr) | |||
1126 | dev_info(&card->gdev->dev, | 1126 | dev_info(&card->gdev->dev, |
1127 | "Device successfully recovered!\n"); | 1127 | "Device successfully recovered!\n"); |
1128 | else { | 1128 | else { |
1129 | rtnl_lock(); | 1129 | if (card->dev) { |
1130 | dev_close(card->dev); | 1130 | rtnl_lock(); |
1131 | rtnl_unlock(); | 1131 | dev_close(card->dev); |
1132 | rtnl_unlock(); | ||
1133 | } | ||
1132 | dev_warn(&card->gdev->dev, "The qeth device driver " | 1134 | dev_warn(&card->gdev->dev, "The qeth device driver " |
1133 | "failed to recover an error on the device\n"); | 1135 | "failed to recover an error on the device\n"); |
1134 | } | 1136 | } |
diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c index c0b30b25a5f1..cfda1ecffdf2 100644 --- a/drivers/s390/net/qeth_l3_main.c +++ b/drivers/s390/net/qeth_l3_main.c | |||
@@ -1047,7 +1047,7 @@ static int qeth_l3_setadapter_parms(struct qeth_card *card) | |||
1047 | rc = qeth_setadpparms_change_macaddr(card); | 1047 | rc = qeth_setadpparms_change_macaddr(card); |
1048 | if (rc) | 1048 | if (rc) |
1049 | dev_warn(&card->gdev->dev, "Reading the adapter MAC" | 1049 | dev_warn(&card->gdev->dev, "Reading the adapter MAC" |
1050 | " address failed\n", rc); | 1050 | " address failed\n"); |
1051 | } | 1051 | } |
1052 | 1052 | ||
1053 | if ((card->info.link_type == QETH_LINK_TYPE_HSTR) || | 1053 | if ((card->info.link_type == QETH_LINK_TYPE_HSTR) || |
@@ -1207,12 +1207,9 @@ static int qeth_l3_start_ipa_source_mac(struct qeth_card *card) | |||
1207 | 1207 | ||
1208 | QETH_DBF_TEXT(TRACE, 3, "stsrcmac"); | 1208 | QETH_DBF_TEXT(TRACE, 3, "stsrcmac"); |
1209 | 1209 | ||
1210 | if (!card->options.fake_ll) | ||
1211 | return -EOPNOTSUPP; | ||
1212 | |||
1213 | if (!qeth_is_supported(card, IPA_SOURCE_MAC)) { | 1210 | if (!qeth_is_supported(card, IPA_SOURCE_MAC)) { |
1214 | dev_info(&card->gdev->dev, | 1211 | dev_info(&card->gdev->dev, |
1215 | "Inbound source address not supported on %s\n", | 1212 | "Inbound source MAC-address not supported on %s\n", |
1216 | QETH_CARD_IFNAME(card)); | 1213 | QETH_CARD_IFNAME(card)); |
1217 | return -EOPNOTSUPP; | 1214 | return -EOPNOTSUPP; |
1218 | } | 1215 | } |
@@ -1221,7 +1218,7 @@ static int qeth_l3_start_ipa_source_mac(struct qeth_card *card) | |||
1221 | IPA_CMD_ASS_START, 0); | 1218 | IPA_CMD_ASS_START, 0); |
1222 | if (rc) | 1219 | if (rc) |
1223 | dev_warn(&card->gdev->dev, | 1220 | dev_warn(&card->gdev->dev, |
1224 | "Starting proxy ARP support for %s failed\n", | 1221 | "Starting source MAC-address support for %s failed\n", |
1225 | QETH_CARD_IFNAME(card)); | 1222 | QETH_CARD_IFNAME(card)); |
1226 | return rc; | 1223 | return rc; |
1227 | } | 1224 | } |
@@ -1921,8 +1918,13 @@ static inline __u16 qeth_l3_rebuild_skb(struct qeth_card *card, | |||
1921 | memcpy(tg_addr, card->dev->dev_addr, | 1918 | memcpy(tg_addr, card->dev->dev_addr, |
1922 | card->dev->addr_len); | 1919 | card->dev->addr_len); |
1923 | } | 1920 | } |
1924 | card->dev->header_ops->create(skb, card->dev, prot, tg_addr, | 1921 | if (hdr->hdr.l3.ext_flags & QETH_HDR_EXT_SRC_MAC_ADDR) |
1925 | "FAKELL", card->dev->addr_len); | 1922 | card->dev->header_ops->create(skb, card->dev, prot, |
1923 | tg_addr, &hdr->hdr.l3.dest_addr[2], | ||
1924 | card->dev->addr_len); | ||
1925 | else | ||
1926 | card->dev->header_ops->create(skb, card->dev, prot, | ||
1927 | tg_addr, "FAKELL", card->dev->addr_len); | ||
1926 | } | 1928 | } |
1927 | 1929 | ||
1928 | #ifdef CONFIG_TR | 1930 | #ifdef CONFIG_TR |
@@ -2080,9 +2082,11 @@ static int qeth_l3_stop_card(struct qeth_card *card, int recovery_mode) | |||
2080 | if (recovery_mode) | 2082 | if (recovery_mode) |
2081 | qeth_l3_stop(card->dev); | 2083 | qeth_l3_stop(card->dev); |
2082 | else { | 2084 | else { |
2083 | rtnl_lock(); | 2085 | if (card->dev) { |
2084 | dev_close(card->dev); | 2086 | rtnl_lock(); |
2085 | rtnl_unlock(); | 2087 | dev_close(card->dev); |
2088 | rtnl_unlock(); | ||
2089 | } | ||
2086 | } | 2090 | } |
2087 | if (!card->use_hard_stop) { | 2091 | if (!card->use_hard_stop) { |
2088 | rc = qeth_send_stoplan(card); | 2092 | rc = qeth_send_stoplan(card); |