diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-13 17:50:18 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-13 17:50:18 -0500 |
commit | d89b218b801fd93ea95880f1c7fde348cbcc51c5 (patch) | |
tree | cd3c34e1811f9b2bc10ecfb957bf26cbd04c677e /drivers/s390 | |
parent | 80a186074e72e2cd61f6716d90cf32ce54981a56 (diff) | |
parent | bec68ff1637ca00bb1585a03a7be8a13380084de (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (108 commits)
bridge: ensure to unlock in error path in br_multicast_query().
drivers/net/tulip/eeprom.c: fix bogus "(null)" in tulip init messages
sky2: Avoid rtnl_unlock without rtnl_lock
ipv6: Send netlink notification when DAD fails
drivers/net/tg3.c: change the field used with the TG3_FLAG_10_100_ONLY constant
ipconfig: Handle devices which take some time to come up.
mac80211: Fix memory leak in ieee80211_if_write()
mac80211: Fix (dynamic) power save entry
ipw2200: use kmalloc for large local variables
ath5k: read eeprom IQ calibration values correctly for G mode
ath5k: fix I/Q calibration (for real)
ath5k: fix TSF reset
ath5k: use fixed antenna for tx descriptors
libipw: split ieee->networks into small pieces
mac80211: Fix sta_mtx unlocking on insert STA failure path
rt2x00: remove KSEG1ADDR define from rt2x00soc.h
net: add ColdFire support to the smc91x driver
asix: fix setting mac address for AX88772
ipv6 ip6_tunnel: eliminate unused recursion field from ip6_tnl{}.
net: Fix dev_mc_add()
...
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/net/qeth_core.h | 3 | ||||
-rw-r--r-- | drivers/s390/net/qeth_core_main.c | 5 | ||||
-rw-r--r-- | drivers/s390/net/qeth_core_sys.c | 3 | ||||
-rw-r--r-- | drivers/s390/net/qeth_l2_main.c | 16 | ||||
-rw-r--r-- | drivers/s390/net/qeth_l3_main.c | 82 |
5 files changed, 53 insertions, 56 deletions
diff --git a/drivers/s390/net/qeth_core.h b/drivers/s390/net/qeth_core.h index a3ac4456e0b1..fcd005aad989 100644 --- a/drivers/s390/net/qeth_core.h +++ b/drivers/s390/net/qeth_core.h | |||
@@ -763,7 +763,8 @@ static inline int qeth_get_micros(void) | |||
763 | 763 | ||
764 | static inline int qeth_get_ip_version(struct sk_buff *skb) | 764 | static inline int qeth_get_ip_version(struct sk_buff *skb) |
765 | { | 765 | { |
766 | switch (skb->protocol) { | 766 | struct ethhdr *ehdr = (struct ethhdr *)skb->data; |
767 | switch (ehdr->h_proto) { | ||
767 | case ETH_P_IPV6: | 768 | case ETH_P_IPV6: |
768 | return 6; | 769 | return 6; |
769 | case ETH_P_IP: | 770 | case ETH_P_IP: |
diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c index 7d25bdd443cd..3bd4206f3470 100644 --- a/drivers/s390/net/qeth_core_main.c +++ b/drivers/s390/net/qeth_core_main.c | |||
@@ -537,7 +537,8 @@ static void qeth_send_control_data_cb(struct qeth_channel *channel, | |||
537 | dev_err(&card->gdev->dev, | 537 | dev_err(&card->gdev->dev, |
538 | "The qeth device is not configured " | 538 | "The qeth device is not configured " |
539 | "for the OSI layer required by z/VM\n"); | 539 | "for the OSI layer required by z/VM\n"); |
540 | qeth_schedule_recovery(card); | 540 | else |
541 | qeth_schedule_recovery(card); | ||
541 | goto out; | 542 | goto out; |
542 | } | 543 | } |
543 | 544 | ||
@@ -1113,8 +1114,6 @@ static int qeth_setup_card(struct qeth_card *card) | |||
1113 | card->ipato.enabled = 0; | 1114 | card->ipato.enabled = 0; |
1114 | card->ipato.invert4 = 0; | 1115 | card->ipato.invert4 = 0; |
1115 | card->ipato.invert6 = 0; | 1116 | card->ipato.invert6 = 0; |
1116 | if (card->info.type == QETH_CARD_TYPE_IQD) | ||
1117 | card->options.checksum_type = NO_CHECKSUMMING; | ||
1118 | /* init QDIO stuff */ | 1117 | /* init QDIO stuff */ |
1119 | qeth_init_qdio_info(card); | 1118 | qeth_init_qdio_info(card); |
1120 | return 0; | 1119 | return 0; |
diff --git a/drivers/s390/net/qeth_core_sys.c b/drivers/s390/net/qeth_core_sys.c index 88ae4357136a..25dfd5abd19b 100644 --- a/drivers/s390/net/qeth_core_sys.c +++ b/drivers/s390/net/qeth_core_sys.c | |||
@@ -8,6 +8,9 @@ | |||
8 | * Frank Blaschka <frank.blaschka@de.ibm.com> | 8 | * Frank Blaschka <frank.blaschka@de.ibm.com> |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #define KMSG_COMPONENT "qeth" | ||
12 | #define pr_fmt(fmt) KMSG_COMPONENT ": " fmt | ||
13 | |||
11 | #include <linux/list.h> | 14 | #include <linux/list.h> |
12 | #include <linux/rwsem.h> | 15 | #include <linux/rwsem.h> |
13 | #include <asm/ebcdic.h> | 16 | #include <asm/ebcdic.h> |
diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c index 51fde6f2e0b8..6f1e3036bafd 100644 --- a/drivers/s390/net/qeth_l2_main.c +++ b/drivers/s390/net/qeth_l2_main.c | |||
@@ -1071,11 +1071,9 @@ static int qeth_l2_recover(void *ptr) | |||
1071 | dev_info(&card->gdev->dev, | 1071 | dev_info(&card->gdev->dev, |
1072 | "Device successfully recovered!\n"); | 1072 | "Device successfully recovered!\n"); |
1073 | else { | 1073 | else { |
1074 | if (card->dev) { | 1074 | rtnl_lock(); |
1075 | rtnl_lock(); | 1075 | dev_close(card->dev); |
1076 | dev_close(card->dev); | 1076 | rtnl_unlock(); |
1077 | rtnl_unlock(); | ||
1078 | } | ||
1079 | dev_warn(&card->gdev->dev, "The qeth device driver " | 1077 | dev_warn(&card->gdev->dev, "The qeth device driver " |
1080 | "failed to recover an error on the device\n"); | 1078 | "failed to recover an error on the device\n"); |
1081 | } | 1079 | } |
@@ -1129,11 +1127,9 @@ static int qeth_l2_pm_resume(struct ccwgroup_device *gdev) | |||
1129 | if (card->state == CARD_STATE_RECOVER) { | 1127 | if (card->state == CARD_STATE_RECOVER) { |
1130 | rc = __qeth_l2_set_online(card->gdev, 1); | 1128 | rc = __qeth_l2_set_online(card->gdev, 1); |
1131 | if (rc) { | 1129 | if (rc) { |
1132 | if (card->dev) { | 1130 | rtnl_lock(); |
1133 | rtnl_lock(); | 1131 | dev_close(card->dev); |
1134 | dev_close(card->dev); | 1132 | rtnl_unlock(); |
1135 | rtnl_unlock(); | ||
1136 | } | ||
1137 | } | 1133 | } |
1138 | } else | 1134 | } else |
1139 | rc = __qeth_l2_set_online(card->gdev, 0); | 1135 | rc = __qeth_l2_set_online(card->gdev, 0); |
diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c index 5475834ab916..b3b6e872d806 100644 --- a/drivers/s390/net/qeth_l3_main.c +++ b/drivers/s390/net/qeth_l3_main.c | |||
@@ -1691,39 +1691,43 @@ qeth_diags_trace_cb(struct qeth_card *card, struct qeth_reply *reply, | |||
1691 | 1691 | ||
1692 | cmd = (struct qeth_ipa_cmd *)data; | 1692 | cmd = (struct qeth_ipa_cmd *)data; |
1693 | rc = cmd->hdr.return_code; | 1693 | rc = cmd->hdr.return_code; |
1694 | if (rc) { | 1694 | if (rc) |
1695 | QETH_DBF_TEXT_(TRACE, 2, "dxter%x", rc); | 1695 | QETH_DBF_TEXT_(TRACE, 2, "dxter%x", rc); |
1696 | if (cmd->data.diagass.action == QETH_DIAGS_CMD_TRACE_ENABLE) { | ||
1697 | switch (rc) { | ||
1698 | case IPA_RC_HARDWARE_AUTH_ERROR: | ||
1699 | dev_warn(&card->gdev->dev, "The device is not " | ||
1700 | "authorized to run as a HiperSockets " | ||
1701 | "network traffic analyzer\n"); | ||
1702 | break; | ||
1703 | case IPA_RC_TRACE_ALREADY_ACTIVE: | ||
1704 | dev_warn(&card->gdev->dev, "A HiperSockets " | ||
1705 | "network traffic analyzer is already " | ||
1706 | "active in the HiperSockets LAN\n"); | ||
1707 | break; | ||
1708 | default: | ||
1709 | break; | ||
1710 | } | ||
1711 | } | ||
1712 | return 0; | ||
1713 | } | ||
1714 | |||
1715 | switch (cmd->data.diagass.action) { | 1696 | switch (cmd->data.diagass.action) { |
1716 | case QETH_DIAGS_CMD_TRACE_QUERY: | 1697 | case QETH_DIAGS_CMD_TRACE_QUERY: |
1717 | break; | 1698 | break; |
1718 | case QETH_DIAGS_CMD_TRACE_DISABLE: | 1699 | case QETH_DIAGS_CMD_TRACE_DISABLE: |
1719 | card->info.promisc_mode = SET_PROMISC_MODE_OFF; | 1700 | switch (rc) { |
1720 | dev_info(&card->gdev->dev, "The HiperSockets network traffic " | 1701 | case 0: |
1721 | "analyzer is deactivated\n"); | 1702 | case IPA_RC_INVALID_SUBCMD: |
1703 | card->info.promisc_mode = SET_PROMISC_MODE_OFF; | ||
1704 | dev_info(&card->gdev->dev, "The HiperSockets network " | ||
1705 | "traffic analyzer is deactivated\n"); | ||
1706 | break; | ||
1707 | default: | ||
1708 | break; | ||
1709 | } | ||
1722 | break; | 1710 | break; |
1723 | case QETH_DIAGS_CMD_TRACE_ENABLE: | 1711 | case QETH_DIAGS_CMD_TRACE_ENABLE: |
1724 | card->info.promisc_mode = SET_PROMISC_MODE_ON; | 1712 | switch (rc) { |
1725 | dev_info(&card->gdev->dev, "The HiperSockets network traffic " | 1713 | case 0: |
1726 | "analyzer is activated\n"); | 1714 | card->info.promisc_mode = SET_PROMISC_MODE_ON; |
1715 | dev_info(&card->gdev->dev, "The HiperSockets network " | ||
1716 | "traffic analyzer is activated\n"); | ||
1717 | break; | ||
1718 | case IPA_RC_HARDWARE_AUTH_ERROR: | ||
1719 | dev_warn(&card->gdev->dev, "The device is not " | ||
1720 | "authorized to run as a HiperSockets network " | ||
1721 | "traffic analyzer\n"); | ||
1722 | break; | ||
1723 | case IPA_RC_TRACE_ALREADY_ACTIVE: | ||
1724 | dev_warn(&card->gdev->dev, "A HiperSockets " | ||
1725 | "network traffic analyzer is already " | ||
1726 | "active in the HiperSockets LAN\n"); | ||
1727 | break; | ||
1728 | default: | ||
1729 | break; | ||
1730 | } | ||
1727 | break; | 1731 | break; |
1728 | default: | 1732 | default: |
1729 | QETH_DBF_MESSAGE(2, "Unknown sniffer action (0x%04x) on %s\n", | 1733 | QETH_DBF_MESSAGE(2, "Unknown sniffer action (0x%04x) on %s\n", |
@@ -2215,11 +2219,9 @@ static int qeth_l3_stop_card(struct qeth_card *card, int recovery_mode) | |||
2215 | if (recovery_mode) | 2219 | if (recovery_mode) |
2216 | qeth_l3_stop(card->dev); | 2220 | qeth_l3_stop(card->dev); |
2217 | else { | 2221 | else { |
2218 | if (card->dev) { | 2222 | rtnl_lock(); |
2219 | rtnl_lock(); | 2223 | dev_close(card->dev); |
2220 | dev_close(card->dev); | 2224 | rtnl_unlock(); |
2221 | rtnl_unlock(); | ||
2222 | } | ||
2223 | } | 2225 | } |
2224 | if (!card->use_hard_stop) { | 2226 | if (!card->use_hard_stop) { |
2225 | rc = qeth_send_stoplan(card); | 2227 | rc = qeth_send_stoplan(card); |
@@ -2900,10 +2902,8 @@ static int qeth_l3_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
2900 | int data_offset = -1; | 2902 | int data_offset = -1; |
2901 | int nr_frags; | 2903 | int nr_frags; |
2902 | 2904 | ||
2903 | if ((card->info.type == QETH_CARD_TYPE_IQD) && | 2905 | if (((card->info.type == QETH_CARD_TYPE_IQD) && (!ipv)) || |
2904 | (((skb->protocol != htons(ETH_P_IPV6)) && | 2906 | card->options.sniffer) |
2905 | (skb->protocol != htons(ETH_P_IP))) || | ||
2906 | card->options.sniffer)) | ||
2907 | goto tx_drop; | 2907 | goto tx_drop; |
2908 | 2908 | ||
2909 | if ((card->state != CARD_STATE_UP) || !card->lan_online) { | 2909 | if ((card->state != CARD_STATE_UP) || !card->lan_online) { |
@@ -2949,14 +2949,14 @@ static int qeth_l3_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
2949 | if (data_offset < 0) | 2949 | if (data_offset < 0) |
2950 | skb_pull(new_skb, ETH_HLEN); | 2950 | skb_pull(new_skb, ETH_HLEN); |
2951 | } else { | 2951 | } else { |
2952 | if (new_skb->protocol == htons(ETH_P_IP)) { | 2952 | if (ipv == 4) { |
2953 | if (card->dev->type == ARPHRD_IEEE802_TR) | 2953 | if (card->dev->type == ARPHRD_IEEE802_TR) |
2954 | skb_pull(new_skb, TR_HLEN); | 2954 | skb_pull(new_skb, TR_HLEN); |
2955 | else | 2955 | else |
2956 | skb_pull(new_skb, ETH_HLEN); | 2956 | skb_pull(new_skb, ETH_HLEN); |
2957 | } | 2957 | } |
2958 | 2958 | ||
2959 | if (new_skb->protocol == ETH_P_IPV6 && card->vlangrp && | 2959 | if (ipv == 6 && card->vlangrp && |
2960 | vlan_tx_tag_present(new_skb)) { | 2960 | vlan_tx_tag_present(new_skb)) { |
2961 | skb_push(new_skb, VLAN_HLEN); | 2961 | skb_push(new_skb, VLAN_HLEN); |
2962 | skb_copy_to_linear_data(new_skb, new_skb->data + 4, 4); | 2962 | skb_copy_to_linear_data(new_skb, new_skb->data + 4, 4); |
@@ -3534,11 +3534,9 @@ static int qeth_l3_pm_resume(struct ccwgroup_device *gdev) | |||
3534 | if (card->state == CARD_STATE_RECOVER) { | 3534 | if (card->state == CARD_STATE_RECOVER) { |
3535 | rc = __qeth_l3_set_online(card->gdev, 1); | 3535 | rc = __qeth_l3_set_online(card->gdev, 1); |
3536 | if (rc) { | 3536 | if (rc) { |
3537 | if (card->dev) { | 3537 | rtnl_lock(); |
3538 | rtnl_lock(); | 3538 | dev_close(card->dev); |
3539 | dev_close(card->dev); | 3539 | rtnl_unlock(); |
3540 | rtnl_unlock(); | ||
3541 | } | ||
3542 | } | 3540 | } |
3543 | } else | 3541 | } else |
3544 | rc = __qeth_l3_set_online(card->gdev, 0); | 3542 | rc = __qeth_l3_set_online(card->gdev, 0); |