Merge ../linus
[powerpc.git] / drivers / s390 / net / qeth_main.c
index 9e671a4..e1327b8 100644 (file)
@@ -27,7 +27,6 @@
  */
 
 
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/moduleparam.h>
 #include <linux/string.h>
@@ -85,6 +84,8 @@ static debug_info_t *qeth_dbf_qerr = NULL;
 
 DEFINE_PER_CPU(char[256], qeth_dbf_txt_buf);
 
+static struct lock_class_key qdio_out_skb_queue_key;
+
 /**
  * some more definitions and declarations
  */
@@ -3230,6 +3231,9 @@ qeth_alloc_qdio_buffers(struct qeth_card *card)
                                &card->qdio.out_qs[i]->qdio_bufs[j];
                        skb_queue_head_init(&card->qdio.out_qs[i]->bufs[j].
                                            skb_list);
+                       lockdep_set_class(
+                               &card->qdio.out_qs[i]->bufs[j].skb_list.lock,
+                               &qdio_out_skb_queue_key);
                        INIT_LIST_HEAD(&card->qdio.out_qs[i]->bufs[j].ctx_list);
                }
        }
@@ -4416,8 +4420,10 @@ qeth_send_packet(struct qeth_card *card, struct sk_buff *skb)
        enum qeth_large_send_types large_send = QETH_LARGE_SEND_NO;
        struct qeth_eddp_context *ctx = NULL;
        int tx_bytes = skb->len;
+#ifdef CONFIG_QETH_PERF_STATS
        unsigned short nr_frags = skb_shinfo(skb)->nr_frags;
-       unsigned short tso_size = skb_shinfo(skb)->tso_size;
+       unsigned short tso_size = skb_shinfo(skb)->gso_size;
+#endif
        int rc;
 
        QETH_DBF_TEXT(trace, 6, "sendpkt");
@@ -4453,7 +4459,7 @@ qeth_send_packet(struct qeth_card *card, struct sk_buff *skb)
        queue = card->qdio.out_qs
                [qeth_get_priority_queue(card, skb, ipv, cast_type)];
 
-       if (skb_shinfo(skb)->tso_size)
+       if (skb_is_gso(skb))
                large_send = card->options.large_send;
 
        /*are we able to do TSO ? If so ,prepare and send it from here */
@@ -4798,7 +4804,7 @@ static struct qeth_cmd_buffer *
 qeth_get_setassparms_cmd(struct qeth_card *, enum qeth_ipa_funcs,
                         __u16, __u16, enum qeth_prot_versions);
 static int
-qeth_arp_query(struct qeth_card *card, char *udata)
+qeth_arp_query(struct qeth_card *card, char __user *udata)
 {
        struct qeth_cmd_buffer *iob;
        struct qeth_arp_query_info qinfo = {0, };
@@ -4931,7 +4937,7 @@ qeth_get_adapter_cmd(struct qeth_card *card, __u32 command, __u32 cmdlen)
  * function to send SNMP commands to OSA-E card
  */
 static int
-qeth_snmp_command(struct qeth_card *card, char *udata)
+qeth_snmp_command(struct qeth_card *card, char __user *udata)
 {
        struct qeth_cmd_buffer *iob;
        struct qeth_ipa_cmd *cmd;
@@ -5273,6 +5279,7 @@ qeth_free_vlan_buffer(struct qeth_card *card, struct qeth_qdio_out_buffer *buf,
        struct sk_buff_head tmp_list;
 
        skb_queue_head_init(&tmp_list);
+       lockdep_set_class(&tmp_list.lock, &qdio_out_skb_queue_key);
        for(i = 0; i < QETH_MAX_BUFFER_ELEMENTS(card); ++i){
                while ((skb = skb_dequeue(&buf->skb_list))){
                        if (vlan_tx_tag_present(skb) &&
@@ -7902,9 +7909,9 @@ qeth_set_online(struct ccwgroup_device *gdev)
 }
 
 static struct ccw_device_id qeth_ids[] = {
-       {CCW_DEVICE(0x1731, 0x01), driver_info:QETH_CARD_TYPE_OSAE},
-       {CCW_DEVICE(0x1731, 0x05), driver_info:QETH_CARD_TYPE_IQD},
-       {CCW_DEVICE(0x1731, 0x06), driver_info:QETH_CARD_TYPE_OSN},
+       {CCW_DEVICE(0x1731, 0x01), .driver_info = QETH_CARD_TYPE_OSAE},
+       {CCW_DEVICE(0x1731, 0x05), .driver_info = QETH_CARD_TYPE_IQD},
+       {CCW_DEVICE(0x1731, 0x06), .driver_info = QETH_CARD_TYPE_OSN},
        {},
 };
 MODULE_DEVICE_TABLE(ccw, qeth_ids);
@@ -8373,7 +8380,7 @@ out:
 
 static struct notifier_block qeth_ip_notifier = {
        qeth_ip_event,
-       0
+       NULL,
 };
 
 #ifdef CONFIG_QETH_IPV6
@@ -8426,7 +8433,7 @@ out:
 
 static struct notifier_block qeth_ip6_notifier = {
        qeth_ip6_event,
-       0
+       NULL,
 };
 #endif
 
@@ -8444,16 +8451,17 @@ __qeth_reboot_event_card(struct device *dev, void *data)
 static int
 qeth_reboot_event(struct notifier_block *this, unsigned long event, void *ptr)
 {
+       int ret;
 
-       driver_for_each_device(&qeth_ccwgroup_driver.driver, NULL, NULL,
-                              __qeth_reboot_event_card);
-       return NOTIFY_DONE;
+       ret = driver_for_each_device(&qeth_ccwgroup_driver.driver, NULL, NULL,
+                                    __qeth_reboot_event_card);
+       return ret ? NOTIFY_BAD : NOTIFY_DONE;
 }
 
 
 static struct notifier_block qeth_reboot_notifier = {
        qeth_reboot_event,
-       0
+       NULL,
 };
 
 static int
@@ -8502,9 +8510,9 @@ static int
 qeth_ipv6_init(void)
 {
        qeth_old_arp_constructor = arp_tbl.constructor;
-       write_lock(&arp_tbl.lock);
+       write_lock_bh(&arp_tbl.lock);
        arp_tbl.constructor = qeth_arp_constructor;
-       write_unlock(&arp_tbl.lock);
+       write_unlock_bh(&arp_tbl.lock);
 
        arp_direct_ops = (struct neigh_ops*)
                kmalloc(sizeof(struct neigh_ops), GFP_KERNEL);
@@ -8520,9 +8528,9 @@ qeth_ipv6_init(void)
 static void
 qeth_ipv6_uninit(void)
 {
-       write_lock(&arp_tbl.lock);
+       write_lock_bh(&arp_tbl.lock);
        arp_tbl.constructor = qeth_old_arp_constructor;
-       write_unlock(&arp_tbl.lock);
+       write_unlock_bh(&arp_tbl.lock);
        kfree(arp_direct_ops);
 }
 #endif /* CONFIG_QETH_IPV6 */