diff options
Diffstat (limited to 'drivers/s390/net')
-rw-r--r-- | drivers/s390/net/claw.c | 13 | ||||
-rw-r--r-- | drivers/s390/net/netiucv.c | 23 | ||||
-rw-r--r-- | drivers/s390/net/qeth_eddp.c | 3 | ||||
-rw-r--r-- | drivers/s390/net/qeth_main.c | 52 |
4 files changed, 39 insertions, 52 deletions
diff --git a/drivers/s390/net/claw.c b/drivers/s390/net/claw.c index 6dd64d0c8d45..348bb7b82771 100644 --- a/drivers/s390/net/claw.c +++ b/drivers/s390/net/claw.c | |||
@@ -3912,6 +3912,7 @@ static int | |||
3912 | add_channel(struct ccw_device *cdev,int i,struct claw_privbk *privptr) | 3912 | add_channel(struct ccw_device *cdev,int i,struct claw_privbk *privptr) |
3913 | { | 3913 | { |
3914 | struct chbk *p_ch; | 3914 | struct chbk *p_ch; |
3915 | struct ccw_dev_id dev_id; | ||
3915 | 3916 | ||
3916 | #ifdef FUNCTRACE | 3917 | #ifdef FUNCTRACE |
3917 | printk(KERN_INFO "%s:%s Enter\n",cdev->dev.bus_id,__FUNCTION__); | 3918 | printk(KERN_INFO "%s:%s Enter\n",cdev->dev.bus_id,__FUNCTION__); |
@@ -3921,7 +3922,8 @@ add_channel(struct ccw_device *cdev,int i,struct claw_privbk *privptr) | |||
3921 | p_ch = &privptr->channel[i]; | 3922 | p_ch = &privptr->channel[i]; |
3922 | p_ch->cdev = cdev; | 3923 | p_ch->cdev = cdev; |
3923 | snprintf(p_ch->id, CLAW_ID_SIZE, "cl-%s", cdev->dev.bus_id); | 3924 | snprintf(p_ch->id, CLAW_ID_SIZE, "cl-%s", cdev->dev.bus_id); |
3924 | sscanf(cdev->dev.bus_id+4,"%x",&p_ch->devno); | 3925 | ccw_device_get_id(cdev, &dev_id); |
3926 | p_ch->devno = dev_id.devno; | ||
3925 | if ((p_ch->irb = kmalloc(sizeof (struct irb),GFP_KERNEL)) == NULL) { | 3927 | if ((p_ch->irb = kmalloc(sizeof (struct irb),GFP_KERNEL)) == NULL) { |
3926 | printk(KERN_WARNING "%s Out of memory in %s for irb\n", | 3928 | printk(KERN_WARNING "%s Out of memory in %s for irb\n", |
3927 | p_ch->id,__FUNCTION__); | 3929 | p_ch->id,__FUNCTION__); |
@@ -3955,6 +3957,7 @@ claw_new_device(struct ccwgroup_device *cgdev) | |||
3955 | struct claw_env *p_env; | 3957 | struct claw_env *p_env; |
3956 | struct net_device *dev; | 3958 | struct net_device *dev; |
3957 | int ret; | 3959 | int ret; |
3960 | struct ccw_dev_id dev_id; | ||
3958 | 3961 | ||
3959 | pr_debug("%s() called\n", __FUNCTION__); | 3962 | pr_debug("%s() called\n", __FUNCTION__); |
3960 | printk(KERN_INFO "claw: add for %s\n",cgdev->cdev[READ]->dev.bus_id); | 3963 | printk(KERN_INFO "claw: add for %s\n",cgdev->cdev[READ]->dev.bus_id); |
@@ -3965,10 +3968,10 @@ claw_new_device(struct ccwgroup_device *cgdev) | |||
3965 | if (!privptr) | 3968 | if (!privptr) |
3966 | return -ENODEV; | 3969 | return -ENODEV; |
3967 | p_env = privptr->p_env; | 3970 | p_env = privptr->p_env; |
3968 | sscanf(cgdev->cdev[READ]->dev.bus_id+4,"%x", | 3971 | ccw_device_get_id(cgdev->cdev[READ], &dev_id); |
3969 | &p_env->devno[READ]); | 3972 | p_env->devno[READ] = dev_id.devno; |
3970 | sscanf(cgdev->cdev[WRITE]->dev.bus_id+4,"%x", | 3973 | ccw_device_get_id(cgdev->cdev[WRITE], &dev_id); |
3971 | &p_env->devno[WRITE]); | 3974 | p_env->devno[WRITE] = dev_id.devno; |
3972 | ret = add_channel(cgdev->cdev[0],0,privptr); | 3975 | ret = add_channel(cgdev->cdev[0],0,privptr); |
3973 | if (ret == 0) | 3976 | if (ret == 0) |
3974 | ret = add_channel(cgdev->cdev[1],1,privptr); | 3977 | ret = add_channel(cgdev->cdev[1],1,privptr); |
diff --git a/drivers/s390/net/netiucv.c b/drivers/s390/net/netiucv.c index c358764f3264..3d28e1a5bf79 100644 --- a/drivers/s390/net/netiucv.c +++ b/drivers/s390/net/netiucv.c | |||
@@ -134,18 +134,6 @@ PRINT_##importance(header "%02x %02x %02x %02x %02x %02x %02x %02x " \ | |||
134 | *(((char*)ptr)+28),*(((char*)ptr)+29), \ | 134 | *(((char*)ptr)+28),*(((char*)ptr)+29), \ |
135 | *(((char*)ptr)+30),*(((char*)ptr)+31)); | 135 | *(((char*)ptr)+30),*(((char*)ptr)+31)); |
136 | 136 | ||
137 | static inline void iucv_hex_dump(unsigned char *buf, size_t len) | ||
138 | { | ||
139 | size_t i; | ||
140 | |||
141 | for (i = 0; i < len; i++) { | ||
142 | if (i && !(i % 16)) | ||
143 | printk("\n"); | ||
144 | printk("%02x ", *(buf + i)); | ||
145 | } | ||
146 | printk("\n"); | ||
147 | } | ||
148 | |||
149 | #define PRINTK_HEADER " iucv: " /* for debugging */ | 137 | #define PRINTK_HEADER " iucv: " /* for debugging */ |
150 | 138 | ||
151 | static struct device_driver netiucv_driver = { | 139 | static struct device_driver netiucv_driver = { |
@@ -212,7 +200,7 @@ struct iucv_connection { | |||
212 | */ | 200 | */ |
213 | static struct list_head iucv_connection_list = | 201 | static struct list_head iucv_connection_list = |
214 | LIST_HEAD_INIT(iucv_connection_list); | 202 | LIST_HEAD_INIT(iucv_connection_list); |
215 | static rwlock_t iucv_connection_rwlock = RW_LOCK_UNLOCKED; | 203 | static DEFINE_RWLOCK(iucv_connection_rwlock); |
216 | 204 | ||
217 | /** | 205 | /** |
218 | * Representation of event-data for the | 206 | * Representation of event-data for the |
@@ -280,7 +268,7 @@ static u8 iucvMagic[16] = { | |||
280 | * | 268 | * |
281 | * @returns The printable string (static data!!) | 269 | * @returns The printable string (static data!!) |
282 | */ | 270 | */ |
283 | static inline char *netiucv_printname(char *name) | 271 | static char *netiucv_printname(char *name) |
284 | { | 272 | { |
285 | static char tmp[9]; | 273 | static char tmp[9]; |
286 | char *p = tmp; | 274 | char *p = tmp; |
@@ -1315,7 +1303,8 @@ static int netiucv_tx(struct sk_buff *skb, struct net_device *dev) | |||
1315 | * and throw away packet. | 1303 | * and throw away packet. |
1316 | */ | 1304 | */ |
1317 | if (fsm_getstate(privptr->fsm) != DEV_STATE_RUNNING) { | 1305 | if (fsm_getstate(privptr->fsm) != DEV_STATE_RUNNING) { |
1318 | fsm_event(privptr->fsm, DEV_EVENT_START, dev); | 1306 | if (!in_atomic()) |
1307 | fsm_event(privptr->fsm, DEV_EVENT_START, dev); | ||
1319 | dev_kfree_skb(skb); | 1308 | dev_kfree_skb(skb); |
1320 | privptr->stats.tx_dropped++; | 1309 | privptr->stats.tx_dropped++; |
1321 | privptr->stats.tx_errors++; | 1310 | privptr->stats.tx_errors++; |
@@ -1729,7 +1718,7 @@ static struct attribute_group netiucv_stat_attr_group = { | |||
1729 | .attrs = netiucv_stat_attrs, | 1718 | .attrs = netiucv_stat_attrs, |
1730 | }; | 1719 | }; |
1731 | 1720 | ||
1732 | static inline int netiucv_add_files(struct device *dev) | 1721 | static int netiucv_add_files(struct device *dev) |
1733 | { | 1722 | { |
1734 | int ret; | 1723 | int ret; |
1735 | 1724 | ||
@@ -1743,7 +1732,7 @@ static inline int netiucv_add_files(struct device *dev) | |||
1743 | return ret; | 1732 | return ret; |
1744 | } | 1733 | } |
1745 | 1734 | ||
1746 | static inline void netiucv_remove_files(struct device *dev) | 1735 | static void netiucv_remove_files(struct device *dev) |
1747 | { | 1736 | { |
1748 | IUCV_DBF_TEXT(trace, 3, __FUNCTION__); | 1737 | IUCV_DBF_TEXT(trace, 3, __FUNCTION__); |
1749 | sysfs_remove_group(&dev->kobj, &netiucv_stat_attr_group); | 1738 | sysfs_remove_group(&dev->kobj, &netiucv_stat_attr_group); |
diff --git a/drivers/s390/net/qeth_eddp.c b/drivers/s390/net/qeth_eddp.c index 4640f32daae5..70108fb16906 100644 --- a/drivers/s390/net/qeth_eddp.c +++ b/drivers/s390/net/qeth_eddp.c | |||
@@ -424,8 +424,7 @@ __qeth_eddp_fill_context_tcp(struct qeth_eddp_context *ctx, | |||
424 | /* prepare qdio hdr */ | 424 | /* prepare qdio hdr */ |
425 | if (eddp->qh.hdr.l2.id == QETH_HEADER_TYPE_LAYER2){ | 425 | if (eddp->qh.hdr.l2.id == QETH_HEADER_TYPE_LAYER2){ |
426 | eddp->qh.hdr.l2.pkt_length = data_len + ETH_HLEN + | 426 | eddp->qh.hdr.l2.pkt_length = data_len + ETH_HLEN + |
427 | eddp->nhl + eddp->thl - | 427 | eddp->nhl + eddp->thl; |
428 | sizeof(struct qeth_hdr); | ||
429 | #ifdef CONFIG_QETH_VLAN | 428 | #ifdef CONFIG_QETH_VLAN |
430 | if (eddp->mac.h_proto == __constant_htons(ETH_P_8021Q)) | 429 | if (eddp->mac.h_proto == __constant_htons(ETH_P_8021Q)) |
431 | eddp->qh.hdr.l2.pkt_length += VLAN_HLEN; | 430 | eddp->qh.hdr.l2.pkt_length += VLAN_HLEN; |
diff --git a/drivers/s390/net/qeth_main.c b/drivers/s390/net/qeth_main.c index 0b96d49dd636..86b0c44165c1 100644 --- a/drivers/s390/net/qeth_main.c +++ b/drivers/s390/net/qeth_main.c | |||
@@ -986,15 +986,15 @@ qeth_recover(void *ptr) | |||
986 | card->use_hard_stop = 1; | 986 | card->use_hard_stop = 1; |
987 | __qeth_set_offline(card->gdev,1); | 987 | __qeth_set_offline(card->gdev,1); |
988 | rc = __qeth_set_online(card->gdev,1); | 988 | rc = __qeth_set_online(card->gdev,1); |
989 | /* don't run another scheduled recovery */ | ||
990 | qeth_clear_thread_start_bit(card, QETH_RECOVER_THREAD); | ||
991 | qeth_clear_thread_running_bit(card, QETH_RECOVER_THREAD); | ||
989 | if (!rc) | 992 | if (!rc) |
990 | PRINT_INFO("Device %s successfully recovered!\n", | 993 | PRINT_INFO("Device %s successfully recovered!\n", |
991 | CARD_BUS_ID(card)); | 994 | CARD_BUS_ID(card)); |
992 | else | 995 | else |
993 | PRINT_INFO("Device %s could not be recovered!\n", | 996 | PRINT_INFO("Device %s could not be recovered!\n", |
994 | CARD_BUS_ID(card)); | 997 | CARD_BUS_ID(card)); |
995 | /* don't run another scheduled recovery */ | ||
996 | qeth_clear_thread_start_bit(card, QETH_RECOVER_THREAD); | ||
997 | qeth_clear_thread_running_bit(card, QETH_RECOVER_THREAD); | ||
998 | return 0; | 998 | return 0; |
999 | } | 999 | } |
1000 | 1000 | ||
@@ -2176,13 +2176,6 @@ qeth_ulp_enable(struct qeth_card *card) | |||
2176 | 2176 | ||
2177 | } | 2177 | } |
2178 | 2178 | ||
2179 | static inline __u16 | ||
2180 | __raw_devno_from_bus_id(char *id) | ||
2181 | { | ||
2182 | id += (strlen(id) - 4); | ||
2183 | return (__u16) simple_strtoul(id, &id, 16); | ||
2184 | } | ||
2185 | |||
2186 | static int | 2179 | static int |
2187 | qeth_ulp_setup_cb(struct qeth_card *card, struct qeth_reply *reply, | 2180 | qeth_ulp_setup_cb(struct qeth_card *card, struct qeth_reply *reply, |
2188 | unsigned long data) | 2181 | unsigned long data) |
@@ -2205,6 +2198,7 @@ qeth_ulp_setup(struct qeth_card *card) | |||
2205 | int rc; | 2198 | int rc; |
2206 | __u16 temp; | 2199 | __u16 temp; |
2207 | struct qeth_cmd_buffer *iob; | 2200 | struct qeth_cmd_buffer *iob; |
2201 | struct ccw_dev_id dev_id; | ||
2208 | 2202 | ||
2209 | QETH_DBF_TEXT(setup,2,"ulpsetup"); | 2203 | QETH_DBF_TEXT(setup,2,"ulpsetup"); |
2210 | 2204 | ||
@@ -2218,8 +2212,8 @@ qeth_ulp_setup(struct qeth_card *card) | |||
2218 | memcpy(QETH_ULP_SETUP_FILTER_TOKEN(iob->data), | 2212 | memcpy(QETH_ULP_SETUP_FILTER_TOKEN(iob->data), |
2219 | &card->token.ulp_filter_r, QETH_MPC_TOKEN_LENGTH); | 2213 | &card->token.ulp_filter_r, QETH_MPC_TOKEN_LENGTH); |
2220 | 2214 | ||
2221 | temp = __raw_devno_from_bus_id(CARD_DDEV_ID(card)); | 2215 | ccw_device_get_id(CARD_DDEV(card), &dev_id); |
2222 | memcpy(QETH_ULP_SETUP_CUA(iob->data), &temp, 2); | 2216 | memcpy(QETH_ULP_SETUP_CUA(iob->data), &dev_id.devno, 2); |
2223 | temp = (card->info.cula << 8) + card->info.unit_addr2; | 2217 | temp = (card->info.cula << 8) + card->info.unit_addr2; |
2224 | memcpy(QETH_ULP_SETUP_REAL_DEVADDR(iob->data), &temp, 2); | 2218 | memcpy(QETH_ULP_SETUP_REAL_DEVADDR(iob->data), &temp, 2); |
2225 | rc = qeth_send_control_data(card, ULP_SETUP_SIZE, iob, | 2219 | rc = qeth_send_control_data(card, ULP_SETUP_SIZE, iob, |
@@ -5850,9 +5844,9 @@ qeth_add_vlan_mc6(struct qeth_card *card) | |||
5850 | in_dev = in6_dev_get(netdev); | 5844 | in_dev = in6_dev_get(netdev); |
5851 | if (!in_dev) | 5845 | if (!in_dev) |
5852 | continue; | 5846 | continue; |
5853 | read_lock(&in_dev->lock); | 5847 | read_lock_bh(&in_dev->lock); |
5854 | qeth_add_mc6(card,in_dev); | 5848 | qeth_add_mc6(card,in_dev); |
5855 | read_unlock(&in_dev->lock); | 5849 | read_unlock_bh(&in_dev->lock); |
5856 | in6_dev_put(in_dev); | 5850 | in6_dev_put(in_dev); |
5857 | } | 5851 | } |
5858 | #endif /* CONFIG_QETH_VLAN */ | 5852 | #endif /* CONFIG_QETH_VLAN */ |
@@ -5869,10 +5863,10 @@ qeth_add_multicast_ipv6(struct qeth_card *card) | |||
5869 | in6_dev = in6_dev_get(card->dev); | 5863 | in6_dev = in6_dev_get(card->dev); |
5870 | if (in6_dev == NULL) | 5864 | if (in6_dev == NULL) |
5871 | return; | 5865 | return; |
5872 | read_lock(&in6_dev->lock); | 5866 | read_lock_bh(&in6_dev->lock); |
5873 | qeth_add_mc6(card, in6_dev); | 5867 | qeth_add_mc6(card, in6_dev); |
5874 | qeth_add_vlan_mc6(card); | 5868 | qeth_add_vlan_mc6(card); |
5875 | read_unlock(&in6_dev->lock); | 5869 | read_unlock_bh(&in6_dev->lock); |
5876 | in6_dev_put(in6_dev); | 5870 | in6_dev_put(in6_dev); |
5877 | } | 5871 | } |
5878 | #endif /* CONFIG_QETH_IPV6 */ | 5872 | #endif /* CONFIG_QETH_IPV6 */ |
@@ -7476,11 +7470,11 @@ qeth_softsetup_card(struct qeth_card *card) | |||
7476 | QETH_DBF_TEXT_(setup, 2, "1err%d", rc); | 7470 | QETH_DBF_TEXT_(setup, 2, "1err%d", rc); |
7477 | if (rc == 0xe080){ | 7471 | if (rc == 0xe080){ |
7478 | PRINT_WARN("LAN on card %s if offline! " | 7472 | PRINT_WARN("LAN on card %s if offline! " |
7479 | "Continuing softsetup.\n", | 7473 | "Waiting for STARTLAN from card.\n", |
7480 | CARD_BUS_ID(card)); | 7474 | CARD_BUS_ID(card)); |
7481 | card->lan_online = 0; | 7475 | card->lan_online = 0; |
7482 | } else | 7476 | } |
7483 | return rc; | 7477 | return rc; |
7484 | } else | 7478 | } else |
7485 | card->lan_online = 1; | 7479 | card->lan_online = 1; |
7486 | if (card->info.type==QETH_CARD_TYPE_OSN) | 7480 | if (card->info.type==QETH_CARD_TYPE_OSN) |
@@ -7797,15 +7791,17 @@ qeth_print_status_message(struct qeth_card *card) | |||
7797 | } | 7791 | } |
7798 | /* fallthrough */ | 7792 | /* fallthrough */ |
7799 | case QETH_CARD_TYPE_IQD: | 7793 | case QETH_CARD_TYPE_IQD: |
7800 | card->info.mcl_level[0] = (char) _ebcasc[(__u8) | 7794 | if (card->info.guestlan) { |
7801 | card->info.mcl_level[0]]; | 7795 | card->info.mcl_level[0] = (char) _ebcasc[(__u8) |
7802 | card->info.mcl_level[1] = (char) _ebcasc[(__u8) | 7796 | card->info.mcl_level[0]]; |
7803 | card->info.mcl_level[1]]; | 7797 | card->info.mcl_level[1] = (char) _ebcasc[(__u8) |
7804 | card->info.mcl_level[2] = (char) _ebcasc[(__u8) | 7798 | card->info.mcl_level[1]]; |
7805 | card->info.mcl_level[2]]; | 7799 | card->info.mcl_level[2] = (char) _ebcasc[(__u8) |
7806 | card->info.mcl_level[3] = (char) _ebcasc[(__u8) | 7800 | card->info.mcl_level[2]]; |
7807 | card->info.mcl_level[3]]; | 7801 | card->info.mcl_level[3] = (char) _ebcasc[(__u8) |
7808 | card->info.mcl_level[QETH_MCL_LENGTH] = 0; | 7802 | card->info.mcl_level[3]]; |
7803 | card->info.mcl_level[QETH_MCL_LENGTH] = 0; | ||
7804 | } | ||
7809 | break; | 7805 | break; |
7810 | default: | 7806 | default: |
7811 | memset(&card->info.mcl_level[0], 0, QETH_MCL_LENGTH + 1); | 7807 | memset(&card->info.mcl_level[0], 0, QETH_MCL_LENGTH + 1); |