18 Oct, 2014

1 commit

  • Remove calling cancel_delayed_work_sync() for runtime suspend,
    because it would cause dead lock. Instead, return -EBUSY to
    avoid the device enters suspending if the net is running and
    the delayed work is pending or running. The delayed work would
    try to wake up the device later, so the suspending is not
    necessary.

    Signed-off-by: Hayes Wang
    Signed-off-by: David S. Miller

    hayeswang
     

10 Oct, 2014

3 commits


09 Oct, 2014

2 commits

  • Pull networking updates from David Miller:
    "Most notable changes in here:

    1) By far the biggest accomplishment, thanks to a large range of
    contributors, is the addition of multi-send for transmit. This is
    the result of discussions back in Chicago, and the hard work of
    several individuals.

    Now, when the ->ndo_start_xmit() method of a driver sees
    skb->xmit_more as true, it can choose to defer the doorbell
    telling the driver to start processing the new TX queue entires.

    skb->xmit_more means that the generic networking is guaranteed to
    call the driver immediately with another SKB to send.

    There is logic added to the qdisc layer to dequeue multiple
    packets at a time, and the handling mis-predicted offloads in
    software is now done with no locks held.

    Finally, pktgen is extended to have a "burst" parameter that can
    be used to test a multi-send implementation.

    Several drivers have xmit_more support: i40e, igb, ixgbe, mlx4,
    virtio_net

    Adding support is almost trivial, so export more drivers to
    support this optimization soon.

    I want to thank, in no particular or implied order, Jesper
    Dangaard Brouer, Eric Dumazet, Alexander Duyck, Tom Herbert, Jamal
    Hadi Salim, John Fastabend, Florian Westphal, Daniel Borkmann,
    David Tat, Hannes Frederic Sowa, and Rusty Russell.

    2) PTP and timestamping support in bnx2x, from Michal Kalderon.

    3) Allow adjusting the rx_copybreak threshold for a driver via
    ethtool, and add rx_copybreak support to enic driver. From
    Govindarajulu Varadarajan.

    4) Significant enhancements to the generic PHY layer and the bcm7xxx
    driver in particular (EEE support, auto power down, etc.) from
    Florian Fainelli.

    5) Allow raw buffers to be used for flow dissection, allowing drivers
    to determine the optimal "linear pull" size for devices that DMA
    into pools of pages. The objective is to get exactly the
    necessary amount of headers into the linear SKB area pre-pulled,
    but no more. The new interface drivers use is eth_get_headlen().
    From WANG Cong, with driver conversions (several had their own
    by-hand duplicated implementations) by Alexander Duyck and Eric
    Dumazet.

    6) Support checksumming more smoothly and efficiently for
    encapsulations, and add "foo over UDP" facility. From Tom
    Herbert.

    7) Add Broadcom SF2 switch driver to DSA layer, from Florian
    Fainelli.

    8) eBPF now can load programs via a system call and has an extensive
    testsuite. Alexei Starovoitov and Daniel Borkmann.

    9) Major overhaul of the packet scheduler to use RCU in several major
    areas such as the classifiers and rate estimators. From John
    Fastabend.

    10) Add driver for Intel FM10000 Ethernet Switch, from Alexander
    Duyck.

    11) Rearrange TCP_SKB_CB() to reduce cache line misses, from Eric
    Dumazet.

    12) Add Datacenter TCP congestion control algorithm support, From
    Florian Westphal.

    13) Reorganize sk_buff so that __copy_skb_header() is significantly
    faster. From Eric Dumazet"

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1558 commits)
    netlabel: directly return netlbl_unlabel_genl_init()
    net: add netdev_txq_bql_{enqueue, complete}_prefetchw() helpers
    net: description of dma_cookie cause make xmldocs warning
    cxgb4: clean up a type issue
    cxgb4: potential shift wrapping bug
    i40e: skb->xmit_more support
    net: fs_enet: Add NAPI TX
    net: fs_enet: Remove non NAPI RX
    r8169:add support for RTL8168EP
    net_sched: copy exts->type in tcf_exts_change()
    wimax: convert printk to pr_foo()
    af_unix: remove 0 assignment on static
    ipv6: Do not warn for informational ICMP messages, regardless of type.
    Update Intel Ethernet Driver maintainers list
    bridge: Save frag_max_size between PRE_ROUTING and POST_ROUTING
    tipc: fix bug in multicast congestion handling
    net: better IFF_XMIT_DST_RELEASE support
    net/mlx4_en: remove NETDEV_TX_BUSY
    3c59x: fix bad split of cpu_to_le32(pci_map_single())
    net: bcmgenet: fix Tx ring priority programming
    ...

    Linus Torvalds
     
  • David S. Miller
     

08 Oct, 2014

1 commit

  • Pull USB updates from Greg KH:
    "Here's the big USB patchset for 3.18-rc1. Also in here is the PHY
    tree, as it seems to fit well with the USB tree for various reasons...

    Anyway, lots of little changes in here, all over the place, full
    details in the changelog

    All have been in the linux-next tree for a while with no issues"

    * tag 'usb-3.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (244 commits)
    USB: host: st: fix typo 'CONFIG_USB_EHCI_HCD_ST'
    uas: Reduce number of function arguments for uas_alloc_foo functions
    xhci: Allow xHCI drivers to be built as separate modules
    xhci: Export symbols used by host-controller drivers
    xhci: Check for XHCI_COMP_MODE_QUIRK when disabling D3cold
    xhci: Introduce xhci_init_driver()
    usb: hcd: add generic PHY support
    usb: rename phy to usb_phy in HCD
    usb: gadget: uvc: fix up uvcg_v4l2_get_unmapped_area typo
    USB: host: st: fix ehci/ohci driver selection
    usb: host: ehci-exynos: Remove unnecessary usb-phy support
    usb: core: return -ENOTSUPP for all targeted hosts
    USB: Remove .owner field for driver
    usb: core: log higher level message on malformed LANGID descriptor
    usb: Add LED triggers for USB activity
    usb: Rename usb-common.c
    usb: gadget: Refactor request completion
    usb: gadget: Introduce usb_gadget_giveback_request()
    usb: dwc2/gadget: move phy bus legth initialization
    phy: remove .owner field for drivers using module_platform_driver
    ...

    Linus Torvalds
     

07 Oct, 2014

1 commit


04 Oct, 2014

2 commits

  • Resume the device before setting the MAC address.

    Signed-off-by: Hayes Wang
    Signed-off-by: David S. Miller

    hayeswang
     
  • I've noticed every time the interface is set to 'up,', the kernel
    reports that the link speed is set to 100 Mbps/Full Duplex, even
    when ethtool is used to set autonegotiation to 'off', half
    duplex, 10 Mbps.
    It can be tested by:
    ifconfig eth0 down
    ethtool -s eth0 autoneg off speed 10 duplex half
    ifconfig eth0 up

    Then checking 'dmesg' for the link speed.

    Signed-off-by: Michel Stam
    Signed-off-by: David S. Miller

    Michel Stam
     

03 Oct, 2014

1 commit


02 Oct, 2014

2 commits

  • The firmware would be clear when the power cut is enabled for
    RTL8153.

    Signed-off-by: Hayes Wang
    Signed-off-by: David S. Miller

    hayeswang
     
  • The xxx_clear_bp() is used to halt the firmware. It only necessary
    for updating the new firmware. Besides, depend on the version of
    the current firmware, it may have problem to halt the firmware
    directly. Finally, halt the firmware would let the firmware code
    useless, and the bugs which are fixed by the firmware would occur.

    Signed-off-by: Hayes Wang
    Signed-off-by: David S. Miller

    hayeswang
     

01 Oct, 2014

1 commit

  • The flag of RTL8152_UNPLUG should only be set when the device is
    unplugged, not each time the rtl8152_disconnect() is called.
    Otherwise, the device wouldn't be stopped normally.

    Signed-off-by: Hayes Wang
    Signed-off-by: David S. Miller

    hayeswang
     

29 Sep, 2014

3 commits


27 Sep, 2014

1 commit

  • netif_carrier_off would be called when autoresuming, even though
    the cable is plugged. This causes some applications do relative
    actions when detecting the carrier off. Keep the status of the
    carrier, and let it be modified when the linking change occurs.

    Signed-off-by: Hayes Wang
    Signed-off-by: David S. Miller

    hayeswang
     

25 Sep, 2014

1 commit


24 Sep, 2014

2 commits

  • USB hub has started to use a workqueue instead of kthread. Let's update
    the documentation and comments here and there.

    This patch mostly just replaces "khubd" with "hub_wq". There are only few
    exceptions where the whole sentence was updated. These more complicated
    changes can be found in the following files:

    Documentation/usb/hotplug.txt
    drivers/net/usb/usbnet.c
    drivers/usb/core/hcd.c
    drivers/usb/host/ohci-hcd.c
    drivers/usb/host/xhci.c

    Signed-off-by: Petr Mladek
    Acked-by: Alan Stern
    Signed-off-by: Greg Kroah-Hartman

    Petr Mladek
     
  • Conflicts:
    arch/mips/net/bpf_jit.c
    drivers/net/can/flexcan.c

    Both the flexcan and MIPS bpf_jit conflicts were cases of simple
    overlapping changes.

    Signed-off-by: David S. Miller

    David S. Miller
     

23 Sep, 2014

1 commit

  • If the hw is in ALDPS mode, the hw may have no response for accessing
    the most registers. Therefore, the ALDPS should be disabled before
    accessing the hw in rtl_ops.init(), rtl_ops.disable(), rtl_ops.up(),
    and rtl_ops.down(). Regardless of rtl_ops.enable(), because the hw
    wouldn't enter ALDPS mode when linking on. The hw would enter the
    ALDPS mode after several seconds when link down occurs and the ALDPS
    is enabled.

    Signed-off-by: Hayes Wang
    Signed-off-by: David S. Miller

    hayeswang
     

14 Sep, 2014

1 commit


10 Sep, 2014

1 commit


06 Sep, 2014

2 commits


02 Sep, 2014

2 commits

  • The variable "rx_buf_sz" is used by both tx and rx buffers. Replace
    it with "agg_buf_sz".

    Signed-off-by: Hayes Wang
    Signed-off-by: David S. Miller

    hayeswang
     
  • Because the Tx has the features of stopping queue and aggregation,
    We don't need many tx buffers. Change the tx number from 10 to 4
    to reduce the usage of the memory. This could save 16K * 6 bytes
    memory.

    Signed-off-by: Hayes Wang
    Signed-off-by: David S. Miller

    hayeswang
     

28 Aug, 2014

1 commit


26 Aug, 2014

1 commit

  • 626: CHECK: Alignment should match open parenthesis
    646: CHECK: Alignment should match open parenthesis
    655: CHECK: Alignment should match open parenthesis
    695: CHECK: Alignment should match open parenthesis
    729: CHECK: Alignment should match open parenthesis
    739: CHECK: Alignment should match open parenthesis
    976: WARNING: externs should be avoided in .c files
    1314: CHECK: Alignment should match open parenthesis
    1358: WARNING: networking block comments don't use an empty /* line, use /* Comment...
    1402: WARNING: networking block comments don't use an empty /* line, use /* Comment...
    1521: CHECK: multiple assignments should be avoided
    1775: CHECK: Alignment should match open parenthesis
    1838: CHECK: multiple assignments should be avoided
    1843: CHECK: multiple assignments should be avoided
    1847: CHECK: multiple assignments should be avoided
    1850: WARNING: Missing a blank line after declarations
    1864: CHECK: Alignment should match open parenthesis
    1872: CHECK: braces {} should be used on all arms of this statement
    1906: CHECK: usleep_range is preferred over udelay
    2865: WARNING: networking block comments don't use an empty /* line, use /* Comment...
    3088: CHECK: Alignment should match open parenthesis
    total: 0 errors, 5 warnings, 16 checks, 3567 lines checked

    Signed-off-by: Hayes Wang
    Signed-off-by: David S. Miller

    hayeswang
     

07 Aug, 2014

1 commit

  • It must be tristate to avoid broken dependencies with kernel built-in
    usb network drivers when usb support is module only.

    When net config option is set, least surprize default should match usb.

    Wireless RNDIS USB driver used to select USB_USBNET. USB_USBNET now
    depends on USB_NET_DRIVERS so the latter should be selected as well.

    Signed-off-by: Francois Romieu
    Signed-off-by: David S. Miller

    Francois Romieu
     

06 Aug, 2014

3 commits

  • Conflicts:
    drivers/net/Makefile
    net/ipv6/sysctl_net_ipv6.c

    Two ipv6_table_template[] additions overlap, so the index
    of the ipv6_table[x] assignments needed to be adjusted.

    In the drivers/net/Makefile case, we've gotten rid of the
    garbage whereby we had to list every single USB networking
    driver in the top-level Makefile, there is just one
    "USB_NETWORKING" that guards everything.

    Signed-off-by: David S. Miller

    David S. Miller
     
  • USB network drivers are already handled in drivers/net/usb/Kconfig.
    Let's save the maintenance burden of dependencies in drivers/net/Makefile.

    The newly introduced USB_NET_DRIVERS umbrella config option defaults
    to 'y' so as to minimize the changes of behavior.

    Signed-off-by: Francois Romieu
    Signed-off-by: David S. Miller

    Francois Romieu
     
  • After this patch:

    [ 32.985530] hso: drivers/net/usb/hso.c: Option Wireless
    [ 33.000452] hso 2-1.4:1.7: Not our interface
    [ 33.001849] usbcore: registered new interface driver hso

    root@qt5022:~# ls /dev/ttyHS*
    /dev/ttyHS0 /dev/ttyHS1 /dev/ttyHS2 /dev/ttyHS3 /dev/ttyHS4
    /dev/ttyHS5

    root@qt5022:~# lsusb -d 0af0: -vvv

    Bus 002 Device 003: ID 0af0:9200 Option
    Device Descriptor:
    bLength 18
    bDescriptorType 1
    bcdUSB 2.00
    bDeviceClass 255 Vendor Specific Class
    bDeviceSubClass 255 Vendor Specific Subclass
    bDeviceProtocol 255 Vendor Specific Protocol
    bMaxPacketSize0 64
    idVendor 0x0af0 Option
    idProduct 0x9200
    bcdDevice 0.00
    iManufacturer 3 Option N.V.
    iProduct 2 Globetrotter HSUPA Modem
    iSerial 0
    bNumConfigurations 1
    Configuration Descriptor:
    bLength 9
    bDescriptorType 2
    wTotalLength 200
    bNumInterfaces 8
    bConfigurationValue 1
    iConfiguration 1 Option Configuration
    bmAttributes 0xe0
    Self Powered
    Remote Wakeup
    MaxPower 100mA
    Interface Descriptor:
    bLength 9
    bDescriptorType 4
    bInterfaceNumber 0
    bAlternateSetting 0
    bNumEndpoints 2
    bInterfaceClass 255 Vendor Specific Class
    bInterfaceSubClass 255 Vendor Specific Subclass
    bInterfaceProtocol 255 Vendor Specific Protocol
    iInterface 0
    Endpoint Descriptor:
    bLength 7
    bDescriptorType 5
    bEndpointAddress 0x81 EP 1 IN
    bmAttributes 2
    Transfer Type Bulk
    Synch Type None
    Usage Type Data
    wMaxPacketSize 0x0200 1x 512 bytes
    bInterval 32
    Endpoint Descriptor:
    bLength 7
    bDescriptorType 5
    bEndpointAddress 0x01 EP 1 OUT
    bmAttributes 2
    Transfer Type Bulk
    Synch Type None
    Usage Type Data
    wMaxPacketSize 0x0200 1x 512 bytes
    bInterval 32
    Interface Descriptor:
    bLength 9
    bDescriptorType 4
    bInterfaceNumber 1
    bAlternateSetting 0
    bNumEndpoints 2
    bInterfaceClass 255 Vendor Specific Class
    bInterfaceSubClass 255 Vendor Specific Subclass
    bInterfaceProtocol 255 Vendor Specific Protocol
    iInterface 0
    Endpoint Descriptor:
    bLength 7
    bDescriptorType 5
    bEndpointAddress 0x82 EP 2 IN
    bmAttributes 2
    Transfer Type Bulk
    Synch Type None
    Usage Type Data
    wMaxPacketSize 0x0200 1x 512 bytes
    bInterval 32
    Endpoint Descriptor:
    bLength 7
    bDescriptorType 5
    bEndpointAddress 0x02 EP 2 OUT
    bmAttributes 2
    Transfer Type Bulk
    Synch Type None
    Usage Type Data
    wMaxPacketSize 0x0200 1x 512 bytes
    bInterval 32
    Interface Descriptor:
    bLength 9
    bDescriptorType 4
    bInterfaceNumber 2
    bAlternateSetting 0
    bNumEndpoints 2
    bInterfaceClass 255 Vendor Specific Class
    bInterfaceSubClass 255 Vendor Specific Subclass
    bInterfaceProtocol 255 Vendor Specific Protocol
    iInterface 0
    Endpoint Descriptor:
    bLength 7
    bDescriptorType 5
    bEndpointAddress 0x83 EP 3 IN
    bmAttributes 2
    Transfer Type Bulk
    Synch Type None
    Usage Type Data
    wMaxPacketSize 0x0200 1x 512 bytes
    bInterval 32
    Endpoint Descriptor:
    bLength 7
    bDescriptorType 5
    bEndpointAddress 0x03 EP 3 OUT
    bmAttributes 2
    Transfer Type Bulk
    Synch Type None
    Usage Type Data
    wMaxPacketSize 0x0200 1x 512 bytes
    bInterval 32
    Interface Descriptor:
    bLength 9
    bDescriptorType 4
    bInterfaceNumber 3
    bAlternateSetting 0
    bNumEndpoints 2
    bInterfaceClass 255 Vendor Specific Class
    bInterfaceSubClass 255 Vendor Specific Subclass
    bInterfaceProtocol 255 Vendor Specific Protocol
    iInterface 0
    Endpoint Descriptor:
    bLength 7
    bDescriptorType 5
    bEndpointAddress 0x84 EP 4 IN
    bmAttributes 2
    Transfer Type Bulk
    Synch Type None
    Usage Type Data
    wMaxPacketSize 0x0200 1x 512 bytes
    bInterval 32
    Endpoint Descriptor:
    bLength 7
    bDescriptorType 5
    bEndpointAddress 0x04 EP 4 OUT
    bmAttributes 2
    Transfer Type Bulk
    Synch Type None
    Usage Type Data
    wMaxPacketSize 0x0200 1x 512 bytes
    bInterval 32
    Interface Descriptor:
    bLength 9
    bDescriptorType 4
    bInterfaceNumber 4
    bAlternateSetting 0
    bNumEndpoints 2
    bInterfaceClass 255 Vendor Specific Class
    bInterfaceSubClass 255 Vendor Specific Subclass
    bInterfaceProtocol 255 Vendor Specific Protocol
    iInterface 0
    Endpoint Descriptor:
    bLength 7
    bDescriptorType 5
    bEndpointAddress 0x85 EP 5 IN
    bmAttributes 2
    Transfer Type Bulk
    Synch Type None
    Usage Type Data
    wMaxPacketSize 0x0200 1x 512 bytes
    bInterval 32
    Endpoint Descriptor:
    bLength 7
    bDescriptorType 5
    bEndpointAddress 0x05 EP 5 OUT
    bmAttributes 2
    Transfer Type Bulk
    Synch Type None
    Usage Type Data
    wMaxPacketSize 0x0200 1x 512 bytes
    bInterval 32
    Interface Descriptor:
    bLength 9
    bDescriptorType 4
    bInterfaceNumber 5
    bAlternateSetting 0
    bNumEndpoints 2
    bInterfaceClass 255 Vendor Specific Class
    bInterfaceSubClass 255 Vendor Specific Subclass
    bInterfaceProtocol 255 Vendor Specific Protocol
    iInterface 0
    Endpoint Descriptor:
    bLength 7
    bDescriptorType 5
    bEndpointAddress 0x06 EP 6 OUT
    bmAttributes 2
    Transfer Type Bulk
    Synch Type None
    Usage Type Data
    wMaxPacketSize 0x0200 1x 512 bytes
    bInterval 32
    Endpoint Descriptor:
    bLength 7
    bDescriptorType 5
    bEndpointAddress 0x86 EP 6 IN
    bmAttributes 2
    Transfer Type Bulk
    Synch Type None
    Usage Type Data
    wMaxPacketSize 0x0200 1x 512 bytes
    bInterval 32
    Interface Descriptor:
    bLength 9
    bDescriptorType 4
    bInterfaceNumber 6
    bAlternateSetting 0
    bNumEndpoints 3
    bInterfaceClass 255 Vendor Specific Class
    bInterfaceSubClass 255 Vendor Specific Subclass
    bInterfaceProtocol 255 Vendor Specific Protocol
    iInterface 0
    Endpoint Descriptor:
    bLength 7
    bDescriptorType 5
    bEndpointAddress 0x87 EP 7 IN
    bmAttributes 3
    Transfer Type Interrupt
    Synch Type None
    Usage Type Data
    wMaxPacketSize 0x0040 1x 64 bytes
    bInterval 5
    Endpoint Descriptor:
    bLength 7
    bDescriptorType 5
    bEndpointAddress 0x88 EP 8 IN
    bmAttributes 2
    Transfer Type Bulk
    Synch Type None
    Usage Type Data
    wMaxPacketSize 0x0200 1x 512 bytes
    bInterval 32
    Endpoint Descriptor:
    bLength 7
    bDescriptorType 5
    bEndpointAddress 0x07 EP 7 OUT
    bmAttributes 2
    Transfer Type Bulk
    Synch Type None
    Usage Type Data
    wMaxPacketSize 0x0200 1x 512 bytes
    bInterval 32
    Interface Descriptor:
    bLength 9
    bDescriptorType 4
    bInterfaceNumber 7
    bAlternateSetting 0
    bNumEndpoints 2
    bInterfaceClass 8 Mass Storage
    bInterfaceSubClass 6 SCSI
    bInterfaceProtocol 80 Bulk-Only
    iInterface 0
    Endpoint Descriptor:
    bLength 7
    bDescriptorType 5
    bEndpointAddress 0x08 EP 8 OUT
    bmAttributes 2
    Transfer Type Bulk
    Synch Type None
    Usage Type Data
    wMaxPacketSize 0x0200 1x 512 bytes
    bInterval 1
    Endpoint Descriptor:
    bLength 7
    bDescriptorType 5
    bEndpointAddress 0x89 EP 9 IN
    bmAttributes 2
    Transfer Type Bulk
    Synch Type None
    Usage Type Data
    wMaxPacketSize 0x0200 1x 512 bytes
    bInterval 1
    Device Qualifier (for other device speed):
    bLength 10
    bDescriptorType 6
    bcdUSB 2.00
    bDeviceClass 255 Vendor Specific Class
    bDeviceSubClass 255 Vendor Specific Subclass
    bDeviceProtocol 255 Vendor Specific Protocol
    bMaxPacketSize0 64
    bNumConfigurations 1
    Device Status: 0x0001
    Self Powered

    Signed-off-by: Ricardo Ribalda Delgado
    Acked-by: Dan Williams
    Signed-off-by: David S. Miller

    Ricardo Ribalda
     

03 Aug, 2014

1 commit


01 Aug, 2014

1 commit


31 Jul, 2014

1 commit


30 Jul, 2014

3 commits

  • This reverts commit 20fbe3ae990fd54fc7d1f889d61958bc8b38f254.

    As reported by Stephen Rothwell, it causes compile failures in certain
    configurations:

    drivers/net/usb/cdc_subset.c:360:15: error: 'dummy_prereset' undeclared here (not in a function)
    .pre_reset = dummy_prereset,
    ^
    drivers/net/usb/cdc_subset.c:361:16: error: 'dummy_postreset' undeclared here (not in a function)
    .post_reset = dummy_postreset,
    ^

    Reported-by: Stephen Rothwell
    Acked-by: David Miller
    Cc: Oliver Neukum
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • There are devices that don't do reset all the way. So the packet filter should
    be set to a sane initial value. Failure to do so leads to intermittent failures
    of DHCP on some systems under some conditions.

    Signed-off-by: Oliver Neukum
    Signed-off-by: David S. Miller

    Oliver Neukum
     
  • This device needs to be reset to recover from a timeout.
    Unfortunately this can be handled only at the level of
    the subdrivers.

    Signed-off-by: Oliver Neukum
    Signed-off-by: David S. Miller

    Oliver Neukum