diff options
-rw-r--r-- | drivers/net/ehea/ehea.h | 2 | ||||
-rw-r--r-- | drivers/net/ehea/ehea_qmr.c | 57 | ||||
-rw-r--r-- | drivers/net/ehea/ehea_qmr.h | 3 | ||||
-rw-r--r-- | drivers/net/ibm_newemac/core.c | 2 | ||||
-rw-r--r-- | drivers/net/mlx4/en_main.c | 1 | ||||
-rw-r--r-- | drivers/net/mlx4/fw.c | 2 | ||||
-rw-r--r-- | drivers/net/tulip/dmfe.c | 12 | ||||
-rw-r--r-- | drivers/net/usb/dm9601.c | 15 | ||||
-rw-r--r-- | drivers/net/via-velocity.c | 11 | ||||
-rw-r--r-- | drivers/net/wan/syncppp.c | 5 | ||||
-rw-r--r-- | drivers/s390/net/qeth_core_main.c | 3 | ||||
-rw-r--r-- | drivers/s390/net/qeth_l2_main.c | 27 | ||||
-rw-r--r-- | drivers/s390/net/qeth_l3_main.c | 13 | ||||
-rw-r--r-- | drivers/s390/net/qeth_l3_sys.c | 7 |
14 files changed, 106 insertions, 54 deletions
diff --git a/drivers/net/ehea/ehea.h b/drivers/net/ehea/ehea.h index 82dd1a891ce7..002d918fb4c7 100644 --- a/drivers/net/ehea/ehea.h +++ b/drivers/net/ehea/ehea.h | |||
@@ -40,7 +40,7 @@ | |||
40 | #include <asm/io.h> | 40 | #include <asm/io.h> |
41 | 41 | ||
42 | #define DRV_NAME "ehea" | 42 | #define DRV_NAME "ehea" |
43 | #define DRV_VERSION "EHEA_0094" | 43 | #define DRV_VERSION "EHEA_0095" |
44 | 44 | ||
45 | /* eHEA capability flags */ | 45 | /* eHEA capability flags */ |
46 | #define DLPAR_PORT_ADD_REM 1 | 46 | #define DLPAR_PORT_ADD_REM 1 |
diff --git a/drivers/net/ehea/ehea_qmr.c b/drivers/net/ehea/ehea_qmr.c index 9b61dc9865d1..9d006878f045 100644 --- a/drivers/net/ehea/ehea_qmr.c +++ b/drivers/net/ehea/ehea_qmr.c | |||
@@ -632,10 +632,13 @@ static void ehea_rebuild_busmap(void) | |||
632 | } | 632 | } |
633 | } | 633 | } |
634 | 634 | ||
635 | static int ehea_update_busmap(unsigned long pfn, unsigned long pgnum, int add) | 635 | static int ehea_update_busmap(unsigned long pfn, unsigned long nr_pages, int add) |
636 | { | 636 | { |
637 | unsigned long i, start_section, end_section; | 637 | unsigned long i, start_section, end_section; |
638 | 638 | ||
639 | if (!nr_pages) | ||
640 | return 0; | ||
641 | |||
639 | if (!ehea_bmap) { | 642 | if (!ehea_bmap) { |
640 | ehea_bmap = kzalloc(sizeof(struct ehea_bmap), GFP_KERNEL); | 643 | ehea_bmap = kzalloc(sizeof(struct ehea_bmap), GFP_KERNEL); |
641 | if (!ehea_bmap) | 644 | if (!ehea_bmap) |
@@ -643,7 +646,7 @@ static int ehea_update_busmap(unsigned long pfn, unsigned long pgnum, int add) | |||
643 | } | 646 | } |
644 | 647 | ||
645 | start_section = (pfn * PAGE_SIZE) / EHEA_SECTSIZE; | 648 | start_section = (pfn * PAGE_SIZE) / EHEA_SECTSIZE; |
646 | end_section = start_section + ((pgnum * PAGE_SIZE) / EHEA_SECTSIZE); | 649 | end_section = start_section + ((nr_pages * PAGE_SIZE) / EHEA_SECTSIZE); |
647 | /* Mark entries as valid or invalid only; address is assigned later */ | 650 | /* Mark entries as valid or invalid only; address is assigned later */ |
648 | for (i = start_section; i < end_section; i++) { | 651 | for (i = start_section; i < end_section; i++) { |
649 | u64 flag; | 652 | u64 flag; |
@@ -692,10 +695,54 @@ int ehea_rem_sect_bmap(unsigned long pfn, unsigned long nr_pages) | |||
692 | return ret; | 695 | return ret; |
693 | } | 696 | } |
694 | 697 | ||
695 | static int ehea_create_busmap_callback(unsigned long pfn, | 698 | static int ehea_is_hugepage(unsigned long pfn) |
696 | unsigned long nr_pages, void *arg) | 699 | { |
700 | int page_order; | ||
701 | |||
702 | if (pfn & EHEA_HUGEPAGE_PFN_MASK) | ||
703 | return 0; | ||
704 | |||
705 | page_order = compound_order(pfn_to_page(pfn)); | ||
706 | if (page_order + PAGE_SHIFT != EHEA_HUGEPAGESHIFT) | ||
707 | return 0; | ||
708 | |||
709 | return 1; | ||
710 | } | ||
711 | |||
712 | static int ehea_create_busmap_callback(unsigned long initial_pfn, | ||
713 | unsigned long total_nr_pages, void *arg) | ||
697 | { | 714 | { |
698 | return ehea_update_busmap(pfn, nr_pages, EHEA_BUSMAP_ADD_SECT); | 715 | int ret; |
716 | unsigned long pfn, start_pfn, end_pfn, nr_pages; | ||
717 | |||
718 | if ((total_nr_pages * PAGE_SIZE) < EHEA_HUGEPAGE_SIZE) | ||
719 | return ehea_update_busmap(initial_pfn, total_nr_pages, | ||
720 | EHEA_BUSMAP_ADD_SECT); | ||
721 | |||
722 | /* Given chunk is >= 16GB -> check for hugepages */ | ||
723 | start_pfn = initial_pfn; | ||
724 | end_pfn = initial_pfn + total_nr_pages; | ||
725 | pfn = start_pfn; | ||
726 | |||
727 | while (pfn < end_pfn) { | ||
728 | if (ehea_is_hugepage(pfn)) { | ||
729 | /* Add mem found in front of the hugepage */ | ||
730 | nr_pages = pfn - start_pfn; | ||
731 | ret = ehea_update_busmap(start_pfn, nr_pages, | ||
732 | EHEA_BUSMAP_ADD_SECT); | ||
733 | if (ret) | ||
734 | return ret; | ||
735 | |||
736 | /* Skip the hugepage */ | ||
737 | pfn += (EHEA_HUGEPAGE_SIZE / PAGE_SIZE); | ||
738 | start_pfn = pfn; | ||
739 | } else | ||
740 | pfn += (EHEA_SECTSIZE / PAGE_SIZE); | ||
741 | } | ||
742 | |||
743 | /* Add mem found behind the hugepage(s) */ | ||
744 | nr_pages = pfn - start_pfn; | ||
745 | return ehea_update_busmap(start_pfn, nr_pages, EHEA_BUSMAP_ADD_SECT); | ||
699 | } | 746 | } |
700 | 747 | ||
701 | int ehea_create_busmap(void) | 748 | int ehea_create_busmap(void) |
diff --git a/drivers/net/ehea/ehea_qmr.h b/drivers/net/ehea/ehea_qmr.h index 1e58dc06b7d2..0817c1e74a19 100644 --- a/drivers/net/ehea/ehea_qmr.h +++ b/drivers/net/ehea/ehea_qmr.h | |||
@@ -40,6 +40,9 @@ | |||
40 | #define EHEA_PAGESIZE (1UL << EHEA_PAGESHIFT) | 40 | #define EHEA_PAGESIZE (1UL << EHEA_PAGESHIFT) |
41 | #define EHEA_SECTSIZE (1UL << 24) | 41 | #define EHEA_SECTSIZE (1UL << 24) |
42 | #define EHEA_PAGES_PER_SECTION (EHEA_SECTSIZE >> EHEA_PAGESHIFT) | 42 | #define EHEA_PAGES_PER_SECTION (EHEA_SECTSIZE >> EHEA_PAGESHIFT) |
43 | #define EHEA_HUGEPAGESHIFT 34 | ||
44 | #define EHEA_HUGEPAGE_SIZE (1UL << EHEA_HUGEPAGESHIFT) | ||
45 | #define EHEA_HUGEPAGE_PFN_MASK ((EHEA_HUGEPAGE_SIZE - 1) >> PAGE_SHIFT) | ||
43 | 46 | ||
44 | #if ((1UL << SECTION_SIZE_BITS) < EHEA_SECTSIZE) | 47 | #if ((1UL << SECTION_SIZE_BITS) < EHEA_SECTSIZE) |
45 | #error eHEA module cannot work if kernel sectionsize < ehea sectionsize | 48 | #error eHEA module cannot work if kernel sectionsize < ehea sectionsize |
diff --git a/drivers/net/ibm_newemac/core.c b/drivers/net/ibm_newemac/core.c index 2ee2622258f5..901212aa37cb 100644 --- a/drivers/net/ibm_newemac/core.c +++ b/drivers/net/ibm_newemac/core.c | |||
@@ -2605,7 +2605,7 @@ static int __devinit emac_init_config(struct emac_instance *dev) | |||
2605 | of_device_is_compatible(np, "ibm,emac-440gr")) | 2605 | of_device_is_compatible(np, "ibm,emac-440gr")) |
2606 | dev->features |= EMAC_FTR_440EP_PHY_CLK_FIX; | 2606 | dev->features |= EMAC_FTR_440EP_PHY_CLK_FIX; |
2607 | if (of_device_is_compatible(np, "ibm,emac-405ez")) { | 2607 | if (of_device_is_compatible(np, "ibm,emac-405ez")) { |
2608 | #ifdef CONFIG_IBM_NEW_EMAC_NO_FLOW_CONTROL | 2608 | #ifdef CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL |
2609 | dev->features |= EMAC_FTR_NO_FLOW_CONTROL_40x; | 2609 | dev->features |= EMAC_FTR_NO_FLOW_CONTROL_40x; |
2610 | #else | 2610 | #else |
2611 | printk(KERN_ERR "%s: Flow control not disabled!\n", | 2611 | printk(KERN_ERR "%s: Flow control not disabled!\n", |
diff --git a/drivers/net/mlx4/en_main.c b/drivers/net/mlx4/en_main.c index 1b0eebf84f76..4b9794e97a79 100644 --- a/drivers/net/mlx4/en_main.c +++ b/drivers/net/mlx4/en_main.c | |||
@@ -35,7 +35,6 @@ | |||
35 | #include <linux/module.h> | 35 | #include <linux/module.h> |
36 | #include <linux/delay.h> | 36 | #include <linux/delay.h> |
37 | #include <linux/netdevice.h> | 37 | #include <linux/netdevice.h> |
38 | #include <linux/cpumask.h> | ||
39 | 38 | ||
40 | #include <linux/mlx4/driver.h> | 39 | #include <linux/mlx4/driver.h> |
41 | #include <linux/mlx4/device.h> | 40 | #include <linux/mlx4/device.h> |
diff --git a/drivers/net/mlx4/fw.c b/drivers/net/mlx4/fw.c index be09fdb79cb8..cee199ceba2f 100644 --- a/drivers/net/mlx4/fw.c +++ b/drivers/net/mlx4/fw.c | |||
@@ -360,9 +360,9 @@ int mlx4_QUERY_DEV_CAP(struct mlx4_dev *dev, struct mlx4_dev_cap *dev_cap) | |||
360 | #define QUERY_PORT_ETH_MTU_OFFSET 0x02 | 360 | #define QUERY_PORT_ETH_MTU_OFFSET 0x02 |
361 | #define QUERY_PORT_WIDTH_OFFSET 0x06 | 361 | #define QUERY_PORT_WIDTH_OFFSET 0x06 |
362 | #define QUERY_PORT_MAX_GID_PKEY_OFFSET 0x07 | 362 | #define QUERY_PORT_MAX_GID_PKEY_OFFSET 0x07 |
363 | #define QUERY_PORT_MAC_OFFSET 0x08 | ||
364 | #define QUERY_PORT_MAX_MACVLAN_OFFSET 0x0a | 363 | #define QUERY_PORT_MAX_MACVLAN_OFFSET 0x0a |
365 | #define QUERY_PORT_MAX_VL_OFFSET 0x0b | 364 | #define QUERY_PORT_MAX_VL_OFFSET 0x0b |
365 | #define QUERY_PORT_MAC_OFFSET 0x10 | ||
366 | 366 | ||
367 | for (i = 1; i <= dev_cap->num_ports; ++i) { | 367 | for (i = 1; i <= dev_cap->num_ports; ++i) { |
368 | err = mlx4_cmd_box(dev, 0, mailbox->dma, i, 0, MLX4_CMD_QUERY_PORT, | 368 | err = mlx4_cmd_box(dev, 0, mailbox->dma, i, 0, MLX4_CMD_QUERY_PORT, |
diff --git a/drivers/net/tulip/dmfe.c b/drivers/net/tulip/dmfe.c index 8e46a513a252..c91852f49a48 100644 --- a/drivers/net/tulip/dmfe.c +++ b/drivers/net/tulip/dmfe.c | |||
@@ -420,9 +420,13 @@ static int __devinit dmfe_init_one (struct pci_dev *pdev, | |||
420 | /* Allocate Tx/Rx descriptor memory */ | 420 | /* Allocate Tx/Rx descriptor memory */ |
421 | db->desc_pool_ptr = pci_alloc_consistent(pdev, sizeof(struct tx_desc) * | 421 | db->desc_pool_ptr = pci_alloc_consistent(pdev, sizeof(struct tx_desc) * |
422 | DESC_ALL_CNT + 0x20, &db->desc_pool_dma_ptr); | 422 | DESC_ALL_CNT + 0x20, &db->desc_pool_dma_ptr); |
423 | if (!db->desc_pool_ptr) | ||
424 | goto err_out_res; | ||
423 | 425 | ||
424 | db->buf_pool_ptr = pci_alloc_consistent(pdev, TX_BUF_ALLOC * | 426 | db->buf_pool_ptr = pci_alloc_consistent(pdev, TX_BUF_ALLOC * |
425 | TX_DESC_CNT + 4, &db->buf_pool_dma_ptr); | 427 | TX_DESC_CNT + 4, &db->buf_pool_dma_ptr); |
428 | if (!db->buf_pool_ptr) | ||
429 | goto err_out_free_desc; | ||
426 | 430 | ||
427 | db->first_tx_desc = (struct tx_desc *) db->desc_pool_ptr; | 431 | db->first_tx_desc = (struct tx_desc *) db->desc_pool_ptr; |
428 | db->first_tx_desc_dma = db->desc_pool_dma_ptr; | 432 | db->first_tx_desc_dma = db->desc_pool_dma_ptr; |
@@ -469,7 +473,7 @@ static int __devinit dmfe_init_one (struct pci_dev *pdev, | |||
469 | 473 | ||
470 | err = register_netdev (dev); | 474 | err = register_netdev (dev); |
471 | if (err) | 475 | if (err) |
472 | goto err_out_res; | 476 | goto err_out_free_buf; |
473 | 477 | ||
474 | printk(KERN_INFO "%s: Davicom DM%04lx at pci%s, " | 478 | printk(KERN_INFO "%s: Davicom DM%04lx at pci%s, " |
475 | "%s, irq %d.\n", | 479 | "%s, irq %d.\n", |
@@ -483,6 +487,12 @@ static int __devinit dmfe_init_one (struct pci_dev *pdev, | |||
483 | 487 | ||
484 | return 0; | 488 | return 0; |
485 | 489 | ||
490 | err_out_free_buf: | ||
491 | pci_free_consistent(pdev, TX_BUF_ALLOC * TX_DESC_CNT + 4, | ||
492 | db->buf_pool_ptr, db->buf_pool_dma_ptr); | ||
493 | err_out_free_desc: | ||
494 | pci_free_consistent(pdev, sizeof(struct tx_desc) * DESC_ALL_CNT + 0x20, | ||
495 | db->desc_pool_ptr, db->desc_pool_dma_ptr); | ||
486 | err_out_res: | 496 | err_out_res: |
487 | pci_release_regions(pdev); | 497 | pci_release_regions(pdev); |
488 | err_out_disable: | 498 | err_out_disable: |
diff --git a/drivers/net/usb/dm9601.c b/drivers/net/usb/dm9601.c index 78df2be8a728..db3377dae9d5 100644 --- a/drivers/net/usb/dm9601.c +++ b/drivers/net/usb/dm9601.c | |||
@@ -396,6 +396,20 @@ static void dm9601_set_multicast(struct net_device *net) | |||
396 | dm_write_reg_async(dev, DM_RX_CTRL, rx_ctl); | 396 | dm_write_reg_async(dev, DM_RX_CTRL, rx_ctl); |
397 | } | 397 | } |
398 | 398 | ||
399 | static int dm9601_set_mac_address(struct net_device *net, void *p) | ||
400 | { | ||
401 | struct sockaddr *addr = p; | ||
402 | struct usbnet *dev = netdev_priv(net); | ||
403 | |||
404 | if (!is_valid_ether_addr(addr->sa_data)) | ||
405 | return -EINVAL; | ||
406 | |||
407 | memcpy(net->dev_addr, addr->sa_data, net->addr_len); | ||
408 | dm_write_async(dev, DM_PHY_ADDR, net->addr_len, net->dev_addr); | ||
409 | |||
410 | return 0; | ||
411 | } | ||
412 | |||
399 | static int dm9601_bind(struct usbnet *dev, struct usb_interface *intf) | 413 | static int dm9601_bind(struct usbnet *dev, struct usb_interface *intf) |
400 | { | 414 | { |
401 | int ret; | 415 | int ret; |
@@ -406,6 +420,7 @@ static int dm9601_bind(struct usbnet *dev, struct usb_interface *intf) | |||
406 | 420 | ||
407 | dev->net->do_ioctl = dm9601_ioctl; | 421 | dev->net->do_ioctl = dm9601_ioctl; |
408 | dev->net->set_multicast_list = dm9601_set_multicast; | 422 | dev->net->set_multicast_list = dm9601_set_multicast; |
423 | dev->net->set_mac_address = dm9601_set_mac_address; | ||
409 | dev->net->ethtool_ops = &dm9601_ethtool_ops; | 424 | dev->net->ethtool_ops = &dm9601_ethtool_ops; |
410 | dev->net->hard_header_len += DM_TX_OVERHEAD; | 425 | dev->net->hard_header_len += DM_TX_OVERHEAD; |
411 | dev->hard_mtu = dev->net->mtu + dev->net->hard_header_len; | 426 | dev->hard_mtu = dev->net->mtu + dev->net->hard_header_len; |
diff --git a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c index 2dced383bcfb..3590ea5a902d 100644 --- a/drivers/net/via-velocity.c +++ b/drivers/net/via-velocity.c | |||
@@ -521,7 +521,7 @@ static void __devexit velocity_remove1(struct pci_dev *pdev) | |||
521 | * we don't duplicate code for each option. | 521 | * we don't duplicate code for each option. |
522 | */ | 522 | */ |
523 | 523 | ||
524 | static void __devinit velocity_set_int_opt(int *opt, int val, int min, int max, int def, char *name, char *devname) | 524 | static void __devinit velocity_set_int_opt(int *opt, int val, int min, int max, int def, char *name, const char *devname) |
525 | { | 525 | { |
526 | if (val == -1) | 526 | if (val == -1) |
527 | *opt = def; | 527 | *opt = def; |
@@ -550,7 +550,7 @@ static void __devinit velocity_set_int_opt(int *opt, int val, int min, int max, | |||
550 | * we don't duplicate code for each option. | 550 | * we don't duplicate code for each option. |
551 | */ | 551 | */ |
552 | 552 | ||
553 | static void __devinit velocity_set_bool_opt(u32 * opt, int val, int def, u32 flag, char *name, char *devname) | 553 | static void __devinit velocity_set_bool_opt(u32 * opt, int val, int def, u32 flag, char *name, const char *devname) |
554 | { | 554 | { |
555 | (*opt) &= (~flag); | 555 | (*opt) &= (~flag); |
556 | if (val == -1) | 556 | if (val == -1) |
@@ -576,7 +576,7 @@ static void __devinit velocity_set_bool_opt(u32 * opt, int val, int def, u32 fla | |||
576 | * for the current device | 576 | * for the current device |
577 | */ | 577 | */ |
578 | 578 | ||
579 | static void __devinit velocity_get_options(struct velocity_opt *opts, int index, char *devname) | 579 | static void __devinit velocity_get_options(struct velocity_opt *opts, int index, const char *devname) |
580 | { | 580 | { |
581 | 581 | ||
582 | velocity_set_int_opt(&opts->rx_thresh, rx_thresh[index], RX_THRESH_MIN, RX_THRESH_MAX, RX_THRESH_DEF, "rx_thresh", devname); | 582 | velocity_set_int_opt(&opts->rx_thresh, rx_thresh[index], RX_THRESH_MIN, RX_THRESH_MAX, RX_THRESH_DEF, "rx_thresh", devname); |
@@ -863,6 +863,7 @@ static int __devinit velocity_found1(struct pci_dev *pdev, const struct pci_devi | |||
863 | static int first = 1; | 863 | static int first = 1; |
864 | struct net_device *dev; | 864 | struct net_device *dev; |
865 | int i; | 865 | int i; |
866 | const char *drv_string; | ||
866 | const struct velocity_info_tbl *info = &chip_info_table[ent->driver_data]; | 867 | const struct velocity_info_tbl *info = &chip_info_table[ent->driver_data]; |
867 | struct velocity_info *vptr; | 868 | struct velocity_info *vptr; |
868 | struct mac_regs __iomem * regs; | 869 | struct mac_regs __iomem * regs; |
@@ -935,7 +936,9 @@ static int __devinit velocity_found1(struct pci_dev *pdev, const struct pci_devi | |||
935 | dev->dev_addr[i] = readb(®s->PAR[i]); | 936 | dev->dev_addr[i] = readb(®s->PAR[i]); |
936 | 937 | ||
937 | 938 | ||
938 | velocity_get_options(&vptr->options, velocity_nics, dev->name); | 939 | drv_string = dev_driver_string(&pdev->dev); |
940 | |||
941 | velocity_get_options(&vptr->options, velocity_nics, drv_string); | ||
939 | 942 | ||
940 | /* | 943 | /* |
941 | * Mask out the options cannot be set to the chip | 944 | * Mask out the options cannot be set to the chip |
diff --git a/drivers/net/wan/syncppp.c b/drivers/net/wan/syncppp.c index 327d58589e12..6e92f7b44b1a 100644 --- a/drivers/net/wan/syncppp.c +++ b/drivers/net/wan/syncppp.c | |||
@@ -756,10 +756,11 @@ static void sppp_cisco_input (struct sppp *sp, struct sk_buff *skb) | |||
756 | case CISCO_ADDR_REQ: | 756 | case CISCO_ADDR_REQ: |
757 | /* Stolen from net/ipv4/devinet.c -- SIOCGIFADDR ioctl */ | 757 | /* Stolen from net/ipv4/devinet.c -- SIOCGIFADDR ioctl */ |
758 | { | 758 | { |
759 | struct in_device *in_dev; | ||
760 | struct in_ifaddr *ifa; | ||
761 | __be32 addr = 0, mask = htonl(~0U); /* FIXME: is the mask correct? */ | 759 | __be32 addr = 0, mask = htonl(~0U); /* FIXME: is the mask correct? */ |
762 | #ifdef CONFIG_INET | 760 | #ifdef CONFIG_INET |
761 | struct in_device *in_dev; | ||
762 | struct in_ifaddr *ifa; | ||
763 | |||
763 | rcu_read_lock(); | 764 | rcu_read_lock(); |
764 | if ((in_dev = __in_dev_get_rcu(dev)) != NULL) | 765 | if ((in_dev = __in_dev_get_rcu(dev)) != NULL) |
765 | { | 766 | { |
diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c index 7de410d5be4a..52d26592c72c 100644 --- a/drivers/s390/net/qeth_core_main.c +++ b/drivers/s390/net/qeth_core_main.c | |||
@@ -3025,7 +3025,7 @@ static inline void __qeth_fill_buffer(struct sk_buff *skb, | |||
3025 | struct qdio_buffer *buffer, int is_tso, int *next_element_to_fill, | 3025 | struct qdio_buffer *buffer, int is_tso, int *next_element_to_fill, |
3026 | int offset) | 3026 | int offset) |
3027 | { | 3027 | { |
3028 | int length = skb->len - offset; | 3028 | int length = skb->len; |
3029 | int length_here; | 3029 | int length_here; |
3030 | int element; | 3030 | int element; |
3031 | char *data; | 3031 | char *data; |
@@ -3037,6 +3037,7 @@ static inline void __qeth_fill_buffer(struct sk_buff *skb, | |||
3037 | 3037 | ||
3038 | if (offset >= 0) { | 3038 | if (offset >= 0) { |
3039 | data = skb->data + offset; | 3039 | data = skb->data + offset; |
3040 | length -= offset; | ||
3040 | first_lap = 0; | 3041 | first_lap = 0; |
3041 | } | 3042 | } |
3042 | 3043 | ||
diff --git a/drivers/s390/net/qeth_l2_main.c b/drivers/s390/net/qeth_l2_main.c index 955ba7a31b90..1b1e80336d2c 100644 --- a/drivers/s390/net/qeth_l2_main.c +++ b/drivers/s390/net/qeth_l2_main.c | |||
@@ -373,8 +373,6 @@ static int qeth_l2_stop_card(struct qeth_card *card, int recovery_mode) | |||
373 | QETH_DBF_HEX(SETUP, 2, &card, sizeof(void *)); | 373 | QETH_DBF_HEX(SETUP, 2, &card, sizeof(void *)); |
374 | 374 | ||
375 | qeth_set_allowed_threads(card, 0, 1); | 375 | qeth_set_allowed_threads(card, 0, 1); |
376 | if (qeth_wait_for_threads(card, ~QETH_RECOVER_THREAD)) | ||
377 | return -ERESTARTSYS; | ||
378 | if (card->read.state == CH_STATE_UP && | 376 | if (card->read.state == CH_STATE_UP && |
379 | card->write.state == CH_STATE_UP && | 377 | card->write.state == CH_STATE_UP && |
380 | (card->state == CARD_STATE_UP)) { | 378 | (card->state == CARD_STATE_UP)) { |
@@ -451,12 +449,15 @@ static void qeth_l2_process_inbound_buffer(struct qeth_card *card, | |||
451 | netif_rx(skb); | 449 | netif_rx(skb); |
452 | break; | 450 | break; |
453 | case QETH_HEADER_TYPE_OSN: | 451 | case QETH_HEADER_TYPE_OSN: |
454 | skb_push(skb, sizeof(struct qeth_hdr)); | 452 | if (card->info.type == QETH_CARD_TYPE_OSN) { |
455 | skb_copy_to_linear_data(skb, hdr, | 453 | skb_push(skb, sizeof(struct qeth_hdr)); |
454 | skb_copy_to_linear_data(skb, hdr, | ||
456 | sizeof(struct qeth_hdr)); | 455 | sizeof(struct qeth_hdr)); |
457 | len = skb->len; | 456 | len = skb->len; |
458 | card->osn_info.data_cb(skb); | 457 | card->osn_info.data_cb(skb); |
459 | break; | 458 | break; |
459 | } | ||
460 | /* else unknown */ | ||
460 | default: | 461 | default: |
461 | dev_kfree_skb_any(skb); | 462 | dev_kfree_skb_any(skb); |
462 | QETH_DBF_TEXT(TRACE, 3, "inbunkno"); | 463 | QETH_DBF_TEXT(TRACE, 3, "inbunkno"); |
@@ -975,12 +976,6 @@ static int __qeth_l2_set_online(struct ccwgroup_device *gdev, int recovery_mode) | |||
975 | QETH_DBF_HEX(SETUP, 2, &card, sizeof(void *)); | 976 | QETH_DBF_HEX(SETUP, 2, &card, sizeof(void *)); |
976 | 977 | ||
977 | qeth_set_allowed_threads(card, QETH_RECOVER_THREAD, 1); | 978 | qeth_set_allowed_threads(card, QETH_RECOVER_THREAD, 1); |
978 | if (qeth_wait_for_threads(card, ~QETH_RECOVER_THREAD)) { | ||
979 | PRINT_WARN("set_online of card %s interrupted by user!\n", | ||
980 | CARD_BUS_ID(card)); | ||
981 | return -ERESTARTSYS; | ||
982 | } | ||
983 | |||
984 | recover_flag = card->state; | 979 | recover_flag = card->state; |
985 | rc = ccw_device_set_online(CARD_RDEV(card)); | 980 | rc = ccw_device_set_online(CARD_RDEV(card)); |
986 | if (rc) { | 981 | if (rc) { |
@@ -1091,11 +1086,7 @@ static int __qeth_l2_set_offline(struct ccwgroup_device *cgdev, | |||
1091 | if (card->dev && netif_carrier_ok(card->dev)) | 1086 | if (card->dev && netif_carrier_ok(card->dev)) |
1092 | netif_carrier_off(card->dev); | 1087 | netif_carrier_off(card->dev); |
1093 | recover_flag = card->state; | 1088 | recover_flag = card->state; |
1094 | if (qeth_l2_stop_card(card, recovery_mode) == -ERESTARTSYS) { | 1089 | qeth_l2_stop_card(card, recovery_mode); |
1095 | PRINT_WARN("Stopping card %s interrupted by user!\n", | ||
1096 | CARD_BUS_ID(card)); | ||
1097 | return -ERESTARTSYS; | ||
1098 | } | ||
1099 | rc = ccw_device_set_offline(CARD_DDEV(card)); | 1090 | rc = ccw_device_set_offline(CARD_DDEV(card)); |
1100 | rc2 = ccw_device_set_offline(CARD_WDEV(card)); | 1091 | rc2 = ccw_device_set_offline(CARD_WDEV(card)); |
1101 | rc3 = ccw_device_set_offline(CARD_RDEV(card)); | 1092 | rc3 = ccw_device_set_offline(CARD_RDEV(card)); |
diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c index 99547dea44de..ed59fedd5922 100644 --- a/drivers/s390/net/qeth_l3_main.c +++ b/drivers/s390/net/qeth_l3_main.c | |||
@@ -2064,8 +2064,6 @@ static int qeth_l3_stop_card(struct qeth_card *card, int recovery_mode) | |||
2064 | QETH_DBF_HEX(SETUP, 2, &card, sizeof(void *)); | 2064 | QETH_DBF_HEX(SETUP, 2, &card, sizeof(void *)); |
2065 | 2065 | ||
2066 | qeth_set_allowed_threads(card, 0, 1); | 2066 | qeth_set_allowed_threads(card, 0, 1); |
2067 | if (qeth_wait_for_threads(card, ~QETH_RECOVER_THREAD)) | ||
2068 | return -ERESTARTSYS; | ||
2069 | if (card->read.state == CH_STATE_UP && | 2067 | if (card->read.state == CH_STATE_UP && |
2070 | card->write.state == CH_STATE_UP && | 2068 | card->write.state == CH_STATE_UP && |
2071 | (card->state == CARD_STATE_UP)) { | 2069 | (card->state == CARD_STATE_UP)) { |
@@ -3049,11 +3047,6 @@ static int __qeth_l3_set_online(struct ccwgroup_device *gdev, int recovery_mode) | |||
3049 | QETH_DBF_HEX(SETUP, 2, &card, sizeof(void *)); | 3047 | QETH_DBF_HEX(SETUP, 2, &card, sizeof(void *)); |
3050 | 3048 | ||
3051 | qeth_set_allowed_threads(card, QETH_RECOVER_THREAD, 1); | 3049 | qeth_set_allowed_threads(card, QETH_RECOVER_THREAD, 1); |
3052 | if (qeth_wait_for_threads(card, ~QETH_RECOVER_THREAD)) { | ||
3053 | PRINT_WARN("set_online of card %s interrupted by user!\n", | ||
3054 | CARD_BUS_ID(card)); | ||
3055 | return -ERESTARTSYS; | ||
3056 | } | ||
3057 | 3050 | ||
3058 | recover_flag = card->state; | 3051 | recover_flag = card->state; |
3059 | rc = ccw_device_set_online(CARD_RDEV(card)); | 3052 | rc = ccw_device_set_online(CARD_RDEV(card)); |
@@ -3170,11 +3163,7 @@ static int __qeth_l3_set_offline(struct ccwgroup_device *cgdev, | |||
3170 | if (card->dev && netif_carrier_ok(card->dev)) | 3163 | if (card->dev && netif_carrier_ok(card->dev)) |
3171 | netif_carrier_off(card->dev); | 3164 | netif_carrier_off(card->dev); |
3172 | recover_flag = card->state; | 3165 | recover_flag = card->state; |
3173 | if (qeth_l3_stop_card(card, recovery_mode) == -ERESTARTSYS) { | 3166 | qeth_l3_stop_card(card, recovery_mode); |
3174 | PRINT_WARN("Stopping card %s interrupted by user!\n", | ||
3175 | CARD_BUS_ID(card)); | ||
3176 | return -ERESTARTSYS; | ||
3177 | } | ||
3178 | rc = ccw_device_set_offline(CARD_DDEV(card)); | 3167 | rc = ccw_device_set_offline(CARD_DDEV(card)); |
3179 | rc2 = ccw_device_set_offline(CARD_WDEV(card)); | 3168 | rc2 = ccw_device_set_offline(CARD_WDEV(card)); |
3180 | rc3 = ccw_device_set_offline(CARD_RDEV(card)); | 3169 | rc3 = ccw_device_set_offline(CARD_RDEV(card)); |
diff --git a/drivers/s390/net/qeth_l3_sys.c b/drivers/s390/net/qeth_l3_sys.c index 210ddb639748..c144b9924d52 100644 --- a/drivers/s390/net/qeth_l3_sys.c +++ b/drivers/s390/net/qeth_l3_sys.c | |||
@@ -121,9 +121,6 @@ static ssize_t qeth_l3_dev_route6_show(struct device *dev, | |||
121 | if (!card) | 121 | if (!card) |
122 | return -EINVAL; | 122 | return -EINVAL; |
123 | 123 | ||
124 | if (!qeth_is_supported(card, IPA_IPV6)) | ||
125 | return sprintf(buf, "%s\n", "n/a"); | ||
126 | |||
127 | return qeth_l3_dev_route_show(card, &card->options.route6, buf); | 124 | return qeth_l3_dev_route_show(card, &card->options.route6, buf); |
128 | } | 125 | } |
129 | 126 | ||
@@ -135,10 +132,6 @@ static ssize_t qeth_l3_dev_route6_store(struct device *dev, | |||
135 | if (!card) | 132 | if (!card) |
136 | return -EINVAL; | 133 | return -EINVAL; |
137 | 134 | ||
138 | if (!qeth_is_supported(card, IPA_IPV6)) { | ||
139 | return -EOPNOTSUPP; | ||
140 | } | ||
141 | |||
142 | return qeth_l3_dev_route_store(card, &card->options.route6, | 135 | return qeth_l3_dev_route_store(card, &card->options.route6, |
143 | QETH_PROT_IPV6, buf, count); | 136 | QETH_PROT_IPV6, buf, count); |
144 | } | 137 | } |