aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/net
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2006-08-30 18:30:38 -0400
committerDavid Woodhouse <dwmw2@infradead.org>2006-08-30 18:30:38 -0400
commit0a7d5f8ce960e74fa22986bda4af488539796e49 (patch)
treee29ad17808a5c3410518e22dae8dfe94801b59f3 /drivers/s390/net
parent0165508c80a2b5d5268d9c5dfa9b30c534a33693 (diff)
parentdc709bd190c130b299ac19d596594256265c042a (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'drivers/s390/net')
-rw-r--r--drivers/s390/net/claw.c2
-rw-r--r--drivers/s390/net/ctcmain.c21
-rw-r--r--drivers/s390/net/iucv.c2
-rw-r--r--drivers/s390/net/netiucv.c2
-rw-r--r--drivers/s390/net/qeth_main.c35
-rw-r--r--drivers/s390/net/qeth_sys.c4
-rw-r--r--drivers/s390/net/smsgiucv.c14
7 files changed, 48 insertions, 32 deletions
diff --git a/drivers/s390/net/claw.c b/drivers/s390/net/claw.c
index 23d53bf9daf1..95f4e105cb96 100644
--- a/drivers/s390/net/claw.c
+++ b/drivers/s390/net/claw.c
@@ -529,7 +529,7 @@ claw_open(struct net_device *dev)
529 printk(KERN_INFO "%s:%s Enter \n",dev->name,__FUNCTION__); 529 printk(KERN_INFO "%s:%s Enter \n",dev->name,__FUNCTION__);
530#endif 530#endif
531 CLAW_DBF_TEXT(4,trace,"open"); 531 CLAW_DBF_TEXT(4,trace,"open");
532 if (!dev | (dev->name[0] == 0x00)) { 532 if (!dev || (dev->name[0] == 0x00)) {
533 CLAW_DBF_TEXT(2,trace,"BadDev"); 533 CLAW_DBF_TEXT(2,trace,"BadDev");
534 printk(KERN_WARNING "claw: Bad device at open failing \n"); 534 printk(KERN_WARNING "claw: Bad device at open failing \n");
535 return -ENODEV; 535 return -ENODEV;
diff --git a/drivers/s390/net/ctcmain.c b/drivers/s390/net/ctcmain.c
index 20c8eb16f464..8a4b58120146 100644
--- a/drivers/s390/net/ctcmain.c
+++ b/drivers/s390/net/ctcmain.c
@@ -2686,9 +2686,17 @@ static struct attribute_group ctc_attr_group = {
2686static int 2686static int
2687ctc_add_attributes(struct device *dev) 2687ctc_add_attributes(struct device *dev)
2688{ 2688{
2689 device_create_file(dev, &dev_attr_loglevel); 2689 int rc;
2690 device_create_file(dev, &dev_attr_stats); 2690
2691 return 0; 2691 rc = device_create_file(dev, &dev_attr_loglevel);
2692 if (rc)
2693 goto out;
2694 rc = device_create_file(dev, &dev_attr_stats);
2695 if (!rc)
2696 goto out;
2697 device_remove_file(dev, &dev_attr_loglevel);
2698out:
2699 return rc;
2692} 2700}
2693 2701
2694static void 2702static void
@@ -2901,7 +2909,12 @@ ctc_new_device(struct ccwgroup_device *cgdev)
2901 goto out; 2909 goto out;
2902 } 2910 }
2903 2911
2904 ctc_add_attributes(&cgdev->dev); 2912 if (ctc_add_attributes(&cgdev->dev)) {
2913 ctc_netdev_unregister(dev);
2914 dev->priv = NULL;
2915 ctc_free_netdevice(dev, 1);
2916 goto out;
2917 }
2905 2918
2906 strlcpy(privptr->fsm->name, dev->name, sizeof (privptr->fsm->name)); 2919 strlcpy(privptr->fsm->name, dev->name, sizeof (privptr->fsm->name));
2907 2920
diff --git a/drivers/s390/net/iucv.c b/drivers/s390/net/iucv.c
index 189a49275433..0e863df4027a 100644
--- a/drivers/s390/net/iucv.c
+++ b/drivers/s390/net/iucv.c
@@ -692,7 +692,7 @@ iucv_retrieve_buffer (void)
692 iucv_debug(1, "entering"); 692 iucv_debug(1, "entering");
693 if (iucv_cpuid != -1) { 693 if (iucv_cpuid != -1) {
694 smp_call_function_on(iucv_retrieve_buffer_cpuid, 694 smp_call_function_on(iucv_retrieve_buffer_cpuid,
695 0, 0, 1, iucv_cpuid); 695 NULL, 0, 1, iucv_cpuid);
696 /* Release the cpu reserved by iucv_declare_buffer. */ 696 /* Release the cpu reserved by iucv_declare_buffer. */
697 smp_put_cpu(iucv_cpuid); 697 smp_put_cpu(iucv_cpuid);
698 iucv_cpuid = -1; 698 iucv_cpuid = -1;
diff --git a/drivers/s390/net/netiucv.c b/drivers/s390/net/netiucv.c
index b452cc1afd55..5d6e6cbfa360 100644
--- a/drivers/s390/net/netiucv.c
+++ b/drivers/s390/net/netiucv.c
@@ -2029,7 +2029,7 @@ remove_write (struct device_driver *drv, const char *buf, size_t count)
2029 count = IFNAMSIZ-1; 2029 count = IFNAMSIZ-1;
2030 2030
2031 for (i=0, p=(char *)buf; i<count && *p; i++, p++) { 2031 for (i=0, p=(char *)buf; i<count && *p; i++, p++) {
2032 if ((*p == '\n') | (*p == ' ')) { 2032 if ((*p == '\n') || (*p == ' ')) {
2033 /* trailing lf, grr */ 2033 /* trailing lf, grr */
2034 break; 2034 break;
2035 } else { 2035 } else {
diff --git a/drivers/s390/net/qeth_main.c b/drivers/s390/net/qeth_main.c
index 8e8963f15731..e1327b8fce00 100644
--- a/drivers/s390/net/qeth_main.c
+++ b/drivers/s390/net/qeth_main.c
@@ -4420,8 +4420,10 @@ qeth_send_packet(struct qeth_card *card, struct sk_buff *skb)
4420 enum qeth_large_send_types large_send = QETH_LARGE_SEND_NO; 4420 enum qeth_large_send_types large_send = QETH_LARGE_SEND_NO;
4421 struct qeth_eddp_context *ctx = NULL; 4421 struct qeth_eddp_context *ctx = NULL;
4422 int tx_bytes = skb->len; 4422 int tx_bytes = skb->len;
4423#ifdef CONFIG_QETH_PERF_STATS
4423 unsigned short nr_frags = skb_shinfo(skb)->nr_frags; 4424 unsigned short nr_frags = skb_shinfo(skb)->nr_frags;
4424 unsigned short tso_size = skb_shinfo(skb)->gso_size; 4425 unsigned short tso_size = skb_shinfo(skb)->gso_size;
4426#endif
4425 int rc; 4427 int rc;
4426 4428
4427 QETH_DBF_TEXT(trace, 6, "sendpkt"); 4429 QETH_DBF_TEXT(trace, 6, "sendpkt");
@@ -4457,7 +4459,7 @@ qeth_send_packet(struct qeth_card *card, struct sk_buff *skb)
4457 queue = card->qdio.out_qs 4459 queue = card->qdio.out_qs
4458 [qeth_get_priority_queue(card, skb, ipv, cast_type)]; 4460 [qeth_get_priority_queue(card, skb, ipv, cast_type)];
4459 4461
4460 if (skb_shinfo(skb)->gso_size) 4462 if (skb_is_gso(skb))
4461 large_send = card->options.large_send; 4463 large_send = card->options.large_send;
4462 4464
4463 /*are we able to do TSO ? If so ,prepare and send it from here */ 4465 /*are we able to do TSO ? If so ,prepare and send it from here */
@@ -4802,7 +4804,7 @@ static struct qeth_cmd_buffer *
4802qeth_get_setassparms_cmd(struct qeth_card *, enum qeth_ipa_funcs, 4804qeth_get_setassparms_cmd(struct qeth_card *, enum qeth_ipa_funcs,
4803 __u16, __u16, enum qeth_prot_versions); 4805 __u16, __u16, enum qeth_prot_versions);
4804static int 4806static int
4805qeth_arp_query(struct qeth_card *card, char *udata) 4807qeth_arp_query(struct qeth_card *card, char __user *udata)
4806{ 4808{
4807 struct qeth_cmd_buffer *iob; 4809 struct qeth_cmd_buffer *iob;
4808 struct qeth_arp_query_info qinfo = {0, }; 4810 struct qeth_arp_query_info qinfo = {0, };
@@ -4935,7 +4937,7 @@ qeth_get_adapter_cmd(struct qeth_card *card, __u32 command, __u32 cmdlen)
4935 * function to send SNMP commands to OSA-E card 4937 * function to send SNMP commands to OSA-E card
4936 */ 4938 */
4937static int 4939static int
4938qeth_snmp_command(struct qeth_card *card, char *udata) 4940qeth_snmp_command(struct qeth_card *card, char __user *udata)
4939{ 4941{
4940 struct qeth_cmd_buffer *iob; 4942 struct qeth_cmd_buffer *iob;
4941 struct qeth_ipa_cmd *cmd; 4943 struct qeth_ipa_cmd *cmd;
@@ -7907,9 +7909,9 @@ qeth_set_online(struct ccwgroup_device *gdev)
7907} 7909}
7908 7910
7909static struct ccw_device_id qeth_ids[] = { 7911static struct ccw_device_id qeth_ids[] = {
7910 {CCW_DEVICE(0x1731, 0x01), driver_info:QETH_CARD_TYPE_OSAE}, 7912 {CCW_DEVICE(0x1731, 0x01), .driver_info = QETH_CARD_TYPE_OSAE},
7911 {CCW_DEVICE(0x1731, 0x05), driver_info:QETH_CARD_TYPE_IQD}, 7913 {CCW_DEVICE(0x1731, 0x05), .driver_info = QETH_CARD_TYPE_IQD},
7912 {CCW_DEVICE(0x1731, 0x06), driver_info:QETH_CARD_TYPE_OSN}, 7914 {CCW_DEVICE(0x1731, 0x06), .driver_info = QETH_CARD_TYPE_OSN},
7913 {}, 7915 {},
7914}; 7916};
7915MODULE_DEVICE_TABLE(ccw, qeth_ids); 7917MODULE_DEVICE_TABLE(ccw, qeth_ids);
@@ -8378,7 +8380,7 @@ out:
8378 8380
8379static struct notifier_block qeth_ip_notifier = { 8381static struct notifier_block qeth_ip_notifier = {
8380 qeth_ip_event, 8382 qeth_ip_event,
8381 0 8383 NULL,
8382}; 8384};
8383 8385
8384#ifdef CONFIG_QETH_IPV6 8386#ifdef CONFIG_QETH_IPV6
@@ -8431,7 +8433,7 @@ out:
8431 8433
8432static struct notifier_block qeth_ip6_notifier = { 8434static struct notifier_block qeth_ip6_notifier = {
8433 qeth_ip6_event, 8435 qeth_ip6_event,
8434 0 8436 NULL,
8435}; 8437};
8436#endif 8438#endif
8437 8439
@@ -8449,16 +8451,17 @@ __qeth_reboot_event_card(struct device *dev, void *data)
8449static int 8451static int
8450qeth_reboot_event(struct notifier_block *this, unsigned long event, void *ptr) 8452qeth_reboot_event(struct notifier_block *this, unsigned long event, void *ptr)
8451{ 8453{
8454 int ret;
8452 8455
8453 driver_for_each_device(&qeth_ccwgroup_driver.driver, NULL, NULL, 8456 ret = driver_for_each_device(&qeth_ccwgroup_driver.driver, NULL, NULL,
8454 __qeth_reboot_event_card); 8457 __qeth_reboot_event_card);
8455 return NOTIFY_DONE; 8458 return ret ? NOTIFY_BAD : NOTIFY_DONE;
8456} 8459}
8457 8460
8458 8461
8459static struct notifier_block qeth_reboot_notifier = { 8462static struct notifier_block qeth_reboot_notifier = {
8460 qeth_reboot_event, 8463 qeth_reboot_event,
8461 0 8464 NULL,
8462}; 8465};
8463 8466
8464static int 8467static int
@@ -8507,9 +8510,9 @@ static int
8507qeth_ipv6_init(void) 8510qeth_ipv6_init(void)
8508{ 8511{
8509 qeth_old_arp_constructor = arp_tbl.constructor; 8512 qeth_old_arp_constructor = arp_tbl.constructor;
8510 write_lock(&arp_tbl.lock); 8513 write_lock_bh(&arp_tbl.lock);
8511 arp_tbl.constructor = qeth_arp_constructor; 8514 arp_tbl.constructor = qeth_arp_constructor;
8512 write_unlock(&arp_tbl.lock); 8515 write_unlock_bh(&arp_tbl.lock);
8513 8516
8514 arp_direct_ops = (struct neigh_ops*) 8517 arp_direct_ops = (struct neigh_ops*)
8515 kmalloc(sizeof(struct neigh_ops), GFP_KERNEL); 8518 kmalloc(sizeof(struct neigh_ops), GFP_KERNEL);
@@ -8525,9 +8528,9 @@ qeth_ipv6_init(void)
8525static void 8528static void
8526qeth_ipv6_uninit(void) 8529qeth_ipv6_uninit(void)
8527{ 8530{
8528 write_lock(&arp_tbl.lock); 8531 write_lock_bh(&arp_tbl.lock);
8529 arp_tbl.constructor = qeth_old_arp_constructor; 8532 arp_tbl.constructor = qeth_old_arp_constructor;
8530 write_unlock(&arp_tbl.lock); 8533 write_unlock_bh(&arp_tbl.lock);
8531 kfree(arp_direct_ops); 8534 kfree(arp_direct_ops);
8532} 8535}
8533#endif /* CONFIG_QETH_IPV6 */ 8536#endif /* CONFIG_QETH_IPV6 */
diff --git a/drivers/s390/net/qeth_sys.c b/drivers/s390/net/qeth_sys.c
index 185a9cfbcbdc..001497bbea16 100644
--- a/drivers/s390/net/qeth_sys.c
+++ b/drivers/s390/net/qeth_sys.c
@@ -1755,7 +1755,7 @@ qeth_driver_group_store(struct device_driver *ddrv, const char *buf,
1755} 1755}
1756 1756
1757 1757
1758static DRIVER_ATTR(group, 0200, 0, qeth_driver_group_store); 1758static DRIVER_ATTR(group, 0200, NULL, qeth_driver_group_store);
1759 1759
1760static ssize_t 1760static ssize_t
1761qeth_driver_notifier_register_store(struct device_driver *ddrv, const char *buf, 1761qeth_driver_notifier_register_store(struct device_driver *ddrv, const char *buf,
@@ -1783,7 +1783,7 @@ qeth_driver_notifier_register_store(struct device_driver *ddrv, const char *buf,
1783 return count; 1783 return count;
1784} 1784}
1785 1785
1786static DRIVER_ATTR(notifier_register, 0200, 0, 1786static DRIVER_ATTR(notifier_register, 0200, NULL,
1787 qeth_driver_notifier_register_store); 1787 qeth_driver_notifier_register_store);
1788 1788
1789int 1789int
diff --git a/drivers/s390/net/smsgiucv.c b/drivers/s390/net/smsgiucv.c
index 72118ee68954..b8179c27ceb6 100644
--- a/drivers/s390/net/smsgiucv.c
+++ b/drivers/s390/net/smsgiucv.c
@@ -66,7 +66,7 @@ smsg_message_pending(iucv_MessagePending *eib, void *pgm_data)
66 return; 66 return;
67 } 67 }
68 rc = iucv_receive(eib->ippathid, eib->ipmsgid, eib->iptrgcls, 68 rc = iucv_receive(eib->ippathid, eib->ipmsgid, eib->iptrgcls,
69 msg, len, 0, 0, 0); 69 msg, len, NULL, NULL, NULL);
70 if (rc == 0) { 70 if (rc == 0) {
71 msg[len] = 0; 71 msg[len] = 0;
72 EBCASC(msg, len); 72 EBCASC(msg, len);
@@ -122,7 +122,7 @@ smsg_unregister_callback(char *prefix, void (*callback)(char *from, char *str))
122 struct smsg_callback *cb, *tmp; 122 struct smsg_callback *cb, *tmp;
123 123
124 spin_lock(&smsg_list_lock); 124 spin_lock(&smsg_list_lock);
125 cb = 0; 125 cb = NULL;
126 list_for_each_entry(tmp, &smsg_list, list) 126 list_for_each_entry(tmp, &smsg_list, list)
127 if (tmp->callback == callback && 127 if (tmp->callback == callback &&
128 strcmp(tmp->prefix, prefix) == 0) { 128 strcmp(tmp->prefix, prefix) == 0) {
@@ -139,7 +139,7 @@ smsg_exit(void)
139{ 139{
140 if (smsg_handle > 0) { 140 if (smsg_handle > 0) {
141 cpcmd("SET SMSG OFF", NULL, 0, NULL); 141 cpcmd("SET SMSG OFF", NULL, 0, NULL);
142 iucv_sever(smsg_pathid, 0); 142 iucv_sever(smsg_pathid, NULL);
143 iucv_unregister_program(smsg_handle); 143 iucv_unregister_program(smsg_handle);
144 driver_unregister(&smsg_driver); 144 driver_unregister(&smsg_driver);
145 } 145 }
@@ -162,19 +162,19 @@ smsg_init(void)
162 return rc; 162 return rc;
163 } 163 }
164 smsg_handle = iucv_register_program("SMSGIUCV ", "*MSG ", 164 smsg_handle = iucv_register_program("SMSGIUCV ", "*MSG ",
165 pgmmask, &smsg_ops, 0); 165 pgmmask, &smsg_ops, NULL);
166 if (!smsg_handle) { 166 if (!smsg_handle) {
167 printk(KERN_ERR "SMSGIUCV: failed to register to iucv"); 167 printk(KERN_ERR "SMSGIUCV: failed to register to iucv");
168 driver_unregister(&smsg_driver); 168 driver_unregister(&smsg_driver);
169 return -EIO; /* better errno ? */ 169 return -EIO; /* better errno ? */
170 } 170 }
171 rc = iucv_connect (&smsg_pathid, 255, 0, "*MSG ", 0, 0, 0, 0, 171 rc = iucv_connect (&smsg_pathid, 255, NULL, "*MSG ", NULL, 0,
172 smsg_handle, 0); 172 NULL, NULL, smsg_handle, NULL);
173 if (rc) { 173 if (rc) {
174 printk(KERN_ERR "SMSGIUCV: failed to connect to *MSG"); 174 printk(KERN_ERR "SMSGIUCV: failed to connect to *MSG");
175 iucv_unregister_program(smsg_handle); 175 iucv_unregister_program(smsg_handle);
176 driver_unregister(&smsg_driver); 176 driver_unregister(&smsg_driver);
177 smsg_handle = 0; 177 smsg_handle = NULL;
178 return -EIO; 178 return -EIO;
179 } 179 }
180 cpcmd("SET SMSG IUCV", NULL, 0, NULL); 180 cpcmd("SET SMSG IUCV", NULL, 0, NULL);