14 Sep, 2013

1 commit

  • Pci_enable_device_mem() will set device power state to D0,
    so it's no need to do it again in alx_probe().
    Also remove redundant PM Cap find code, because pci core
    has been saved the pci device pm cap value.

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

    Yijing Wang
     

31 Jul, 2013

1 commit

  • On Mon, 2013-07-29 at 08:30 -0700, Eric Dumazet wrote:
    > On Mon, 2013-07-29 at 13:09 +0100, Luis Henriques wrote:
    >
    > >
    > > I confirm that I can't reproduce the issue using this patch.
    > >
    >
    > Thanks, I'll send a polished patch, as this one had an error if
    > build_skb() returns NULL (in case sk_buff allocation fails)

    Please try the following patch : It should use 2K frags instead of 4K
    for normal 1500 mtu

    Thanks !

    [PATCH] atl1c: use custom skb allocator

    We had reports ( https://bugzilla.kernel.org/show_bug.cgi?id=54021 )
    that using high order pages for skb allocations is problematic for atl1c

    We do not know exactly what the problem is, but we suspect that crossing
    4K pages is not well supported by this hardware.

    Use a custom allocator, using page allocator and 2K fragments for
    optimal stack behavior. We might make this allocator generic
    in future kernels.

    Signed-off-by: Eric Dumazet
    Cc: Luis Henriques
    Cc: Neil Horman
    Signed-off-by: David S. Miller

    Eric Dumazet
     

28 Jul, 2013

1 commit


27 Jul, 2013

1 commit

  • atl1c uses netdev_alloc_skb to refill its rx dma ring, but that call makes no
    guarantees about the suitability of the memory for use in DMA. As a result
    we've gotten reports of atl1c drivers occasionally hanging and needing to be
    reset:
    https://bugzilla.kernel.org/show_bug.cgi?id=54021

    Fix this by modifying the call to use the internal version __netdev_alloc_skb,
    where you can set the gfp_mask explicitly to include GFP_DMA.

    Tested by two reporters in the above bug, who have the hardware to validate it.
    Both report immediate cessation of the problem with this patch

    Signed-off-by: Neil Horman
    CC: Jay Cliburn
    CC: "David S. Miller"
    CC: stable@vger.kernel.org
    Tested-by: Luis Henriques
    Tested-by: Vincent Alquier
    Signed-off-by: David S. Miller

    Neil Horman
     

17 Jul, 2013

1 commit

  • Ben Hutchings pointed out that my recent update to atl1e
    in commit 352900b583b2852152a1e05ea0e8b579292e731e
    ("atl1e: fix dma mapping warnings") was missing a bit of code.

    Specifically it reset the hardware tx ring to its origional state when
    we hit a dma error, but didn't unmap any exiting mappings from the
    operation. This patch fixes that up. It also remembers to free the
    skb in the event that an error occurs, so we don't leak. Untested, as
    I don't have hardware. I think its pretty straightforward, but please
    review closely.

    Signed-off-by: Neil Horman
    CC: Ben Hutchings
    CC: Jay Cliburn
    CC: Chris Snook
    CC: "David S. Miller"
    Signed-off-by: David S. Miller

    Neil Horman
     

13 Jul, 2013

1 commit

  • Recently had this backtrace reported:
    WARNING: at lib/dma-debug.c:937 check_unmap+0x47d/0x930()
    Hardware name: System Product Name
    ATL1E 0000:02:00.0: DMA-API: device driver failed to check map error[device
    address=0x00000000cbfd1000] [size=90 bytes] [mapped as single]
    Modules linked in: xt_conntrack nf_conntrack ebtable_filter ebtables
    ip6table_filter ip6_tables snd_hda_codec_hdmi snd_hda_codec_realtek iTCO_wdt
    iTCO_vendor_support snd_hda_intel acpi_cpufreq mperf coretemp btrfs zlib_deflate
    snd_hda_codec snd_hwdep microcode raid6_pq libcrc32c snd_seq usblp serio_raw xor
    snd_seq_device joydev snd_pcm snd_page_alloc snd_timer snd lpc_ich i2c_i801
    soundcore mfd_core atl1e asus_atk0110 ata_generic pata_acpi radeon i2c_algo_bit
    drm_kms_helper ttm drm i2c_core pata_marvell uinput
    Pid: 314, comm: systemd-journal Not tainted 3.9.0-0.rc6.git2.3.fc19.x86_64 #1
    Call Trace:
    [] warn_slowpath_common+0x66/0x80
    [] warn_slowpath_fmt+0x4c/0x50
    [] check_unmap+0x47d/0x930
    [] ? sched_clock_cpu+0xa8/0x100
    [] debug_dma_unmap_page+0x5f/0x70
    [] ? unmap_single+0x20/0x30
    [] atl1e_intr+0x3a1/0x5b0 [atl1e]
    [] ? trace_hardirqs_off+0xd/0x10
    [] handle_irq_event_percpu+0x56/0x390
    [] handle_irq_event+0x3d/0x60
    [] handle_fasteoi_irq+0x5a/0x100
    [] handle_irq+0xbf/0x150
    [] ? file_sb_list_del+0x3f/0x50
    [] ? irq_enter+0x50/0xa0
    [] do_IRQ+0x4d/0xc0
    [] ? file_sb_list_del+0x3f/0x50
    [] common_interrupt+0x72/0x72
    [] ? lock_release+0xc2/0x310
    [] lg_local_unlock_cpu+0x24/0x50
    [] file_sb_list_del+0x3f/0x50
    [] fput+0x2d/0xc0
    [] filp_close+0x61/0x90
    [] __close_fd+0x8d/0x150
    [] sys_close+0x20/0x50
    [] system_call_fastpath+0x16/0x1b

    The usual straighforward failure to check for dma_mapping_error after a map
    operation is completed.

    This patch should fix it, the reporter wandered off after filing this bz:
    https://bugzilla.redhat.com/show_bug.cgi?id=954170

    and I don't have hardware to test, but the fix is pretty straightforward, so I
    figured I'd post it for review.

    Signed-off-by: Neil Horman
    CC: Jay Cliburn
    CC: Chris Snook
    CC: "David S. Miller"
    Signed-off-by: David S. Miller

    Neil Horman
     

12 Jul, 2013

1 commit


04 Jul, 2013

1 commit

  • Unfortunately, WoL is broken and the system will immediately
    resume after suspending, and I can't seem to figure out why.
    Remove WoL support until the issue can be found.

    Signed-off-by: Johannes Berg
    Signed-off-by: David S. Miller

    Johannes Berg
     

02 Jul, 2013

7 commits


20 Jun, 2013

2 commits

  • All drivers that select MII also need to select NET_CORE because MII
    depends on it. This is a bit ridiculous because NET_CORE is just a
    menu option that doesn't enable any code by itself.

    There is also no need for it to be a visible option, since its users
    all select it.

    Signed-off-by: Ben Hutchings
    Acked-by: Jeff Kirsher
    Signed-off-by: David S. Miller

    Ben Hutchings
     
  • Conflicts:
    drivers/net/wireless/ath/ath9k/Kconfig
    drivers/net/xen-netback/netback.c
    net/batman-adv/bat_iv_ogm.c
    net/wireless/nl80211.c

    The ath9k Kconfig conflict was a change of a Kconfig option name right
    next to the deletion of another option.

    The xen-netback conflict was overlapping changes involving the
    handling of the notify list in xen_netbk_rx_action().

    Batman conflict resolution provided by Antonio Quartulli, basically
    keep everything in both conflict hunks.

    The nl80211 conflict is a little more involved. In 'net' we added a
    dynamic memory allocation to nl80211_dump_wiphy() to fix a race that
    Linus reported. Meanwhile in 'net-next' the handlers were converted
    to use pre and post doit handlers which use a flag to determine
    whether to hold the RTNL mutex around the operation.

    However, the dump handlers to not use this logic. Instead they have
    to explicitly do the locking. There were apparent bugs in the
    conversion of nl80211_dump_wiphy() in that we were not dropping the
    RTNL mutex in all the return paths, and it seems we very much should
    be doing so. So I fixed that whilst handling the overlapping changes.

    To simplify the initial returns, I take the RTNL mutex after we try
    to allocate 'tb'.

    Signed-off-by: David S. Miller

    David S. Miller
     

18 Jun, 2013

1 commit

  • This is a very simple driver, based on the original vendor
    driver that Qualcomm/Atheros published/submitted previously,
    but reworked to make the code saner. However, it also lost
    a number of features (TSO/GSO, VLAN acceleration and multi-
    queue support) in the process, as well as debugging support
    features I didn't have any use for. The only thing I left
    is checksum offload.

    More features can obviously be added, but this seemed like
    a good start for having a driver in mainline at all.

    Johannes Stezenbach has verified that the driver works on
    AR8161, I have a AR8171 myself. The E2200 device ID I found
    on github in somebody's repository.

    Signed-off-by: Johannes Berg
    Signed-off-by: David S. Miller

    Johannes Berg
     

23 May, 2013

3 commits


02 May, 2013

1 commit

  • Pull networking updates from David Miller:
    "Highlights (1721 non-merge commits, this has to be a record of some
    sort):

    1) Add 'random' mode to team driver, from Jiri Pirko and Eric
    Dumazet.

    2) Make it so that any driver that supports configuration of multiple
    MAC addresses can provide the forwarding database add and del
    calls by providing a default implementation and hooking that up if
    the driver doesn't have an explicit set of handlers. From Vlad
    Yasevich.

    3) Support GSO segmentation over tunnels and other encapsulating
    devices such as VXLAN, from Pravin B Shelar.

    4) Support L2 GRE tunnels in the flow dissector, from Michael Dalton.

    5) Implement Tail Loss Probe (TLP) detection in TCP, from Nandita
    Dukkipati.

    6) In the PHY layer, allow supporting wake-on-lan in situations where
    the PHY registers have to be written for it to be configured.

    Use it to support wake-on-lan in mv643xx_eth.

    From Michael Stapelberg.

    7) Significantly improve firewire IPV6 support, from YOSHIFUJI
    Hideaki.

    8) Allow multiple packets to be sent in a single transmission using
    network coding in batman-adv, from Martin Hundebøll.

    9) Add support for T5 cxgb4 chips, from Santosh Rastapur.

    10) Generalize the VXLAN forwarding tables so that there is more
    flexibility in configurating various aspects of the endpoints.
    From David Stevens.

    11) Support RSS and TSO in hardware over GRE tunnels in bxn2x driver,
    from Dmitry Kravkov.

    12) Zero copy support in nfnelink_queue, from Eric Dumazet and Pablo
    Neira Ayuso.

    13) Start adding networking selftests.

    14) In situations of overload on the same AF_PACKET fanout socket, or
    per-cpu packet receive queue, minimize drop by distributing the
    load to other cpus/fanouts. From Willem de Bruijn and Eric
    Dumazet.

    15) Add support for new payload offset BPF instruction, from Daniel
    Borkmann.

    16) Convert several drivers over to mdoule_platform_driver(), from
    Sachin Kamat.

    17) Provide a minimal BPF JIT image disassembler userspace tool, from
    Daniel Borkmann.

    18) Rewrite F-RTO implementation in TCP to match the final
    specification of it in RFC4138 and RFC5682. From Yuchung Cheng.

    19) Provide netlink socket diag of netlink sockets ("Yo dawg, I hear
    you like netlink, so I implemented netlink dumping of netlink
    sockets.") From Andrey Vagin.

    20) Remove ugly passing of rtnetlink attributes into rtnl_doit
    functions, from Thomas Graf.

    21) Allow userspace to be able to see if a configuration change occurs
    in the middle of an address or device list dump, from Nicolas
    Dichtel.

    22) Support RFC3168 ECN protection for ipv6 fragments, from Hannes
    Frederic Sowa.

    23) Increase accuracy of packet length used by packet scheduler, from
    Jason Wang.

    24) Beginning set of changes to make ipv4/ipv6 fragment handling more
    scalable and less susceptible to overload and locking contention,
    from Jesper Dangaard Brouer.

    25) Get rid of using non-type-safe NLMSG_* macros and use nlmsg_*()
    instead. From Hong Zhiguo.

    26) Optimize route usage in IPVS by avoiding reference counting where
    possible, from Julian Anastasov.

    27) Convert IPVS schedulers to RCU, also from Julian Anastasov.

    28) Support cpu fanouts in xt_NFQUEUE netfilter target, from Holger
    Eitzenberger.

    29) Network namespace support for nf_log, ebt_log, xt_LOG, ipt_ULOG,
    nfnetlink_log, and nfnetlink_queue. From Gao feng.

    30) Implement RFC3168 ECN protection, from Hannes Frederic Sowa.

    31) Support several new r8169 chips, from Hayes Wang.

    32) Support tokenized interface identifiers in ipv6, from Daniel
    Borkmann.

    33) Use usbnet_link_change() helper in USB net driver, from Ming Lei.

    34) Add 802.1ad vlan offload support, from Patrick McHardy.

    35) Support mmap() based netlink communication, also from Patrick
    McHardy.

    36) Support HW timestamping in mlx4 driver, from Amir Vadai.

    37) Rationalize AF_PACKET packet timestamping when transmitting, from
    Willem de Bruijn and Daniel Borkmann.

    38) Bring parity to what's provided by /proc/net/packet socket dumping
    and the info provided by netlink socket dumping of AF_PACKET
    sockets. From Nicolas Dichtel.

    39) Fix peeking beyond zero sized SKBs in AF_UNIX, from Benjamin
    Poirier"

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1722 commits)
    filter: fix va_list build error
    af_unix: fix a fatal race with bit fields
    bnx2x: Prevent memory leak when cnic is absent
    bnx2x: correct reading of speed capabilities
    net: sctp: attribute printl with __printf for gcc fmt checks
    netlink: kconfig: move mmap i/o into netlink kconfig
    netpoll: convert mutex into a semaphore
    netlink: Fix skb ref counting.
    net_sched: act_ipt forward compat with xtables
    mlx4_en: fix a build error on 32bit arches
    Revert "bnx2x: allow nvram test to run when device is down"
    bridge: avoid OOPS if root port not found
    drivers: net: cpsw: fix kernel warn on cpsw irq enable
    sh_eth: use random MAC address if no valid one supplied
    3c509.c: call SET_NETDEV_DEV for all device types (ISA/ISAPnP/EISA)
    tg3: fix to append hardware time stamping flags
    unix/stream: fix peeking with an offset larger than data in queue
    unix/dgram: fix peeking with an offset larger than data in queue
    unix/dgram: peek beyond 0-sized skbs
    openvswitch: Remove unneeded ovs_netdev_get_ifindex()
    ...

    Linus Torvalds
     

01 May, 2013

1 commit

  • Pull trivial tree updates from Jiri Kosina:
    "Usual stuff, mostly comment fixes, typo fixes, printk fixes and small
    code cleanups"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (45 commits)
    mm: Convert print_symbol to %pSR
    gfs2: Convert print_symbol to %pSR
    m32r: Convert print_symbol to %pSR
    iostats.txt: add easy-to-find description for field 6
    x86 cmpxchg.h: fix wrong comment
    treewide: Fix typo in printk and comments
    doc: devicetree: Fix various typos
    docbook: fix 8250 naming in device-drivers
    pata_pdc2027x: Fix compiler warning
    treewide: Fix typo in printks
    mei: Fix comments in drivers/misc/mei
    treewide: Fix typos in kernel messages
    pm44xx: Fix comment for "CONFIG_CPU_IDLE"
    doc: Fix typo "CONFIG_CGROUP_CGROUP_MEMCG_SWAP"
    mmzone: correct "pags" to "pages" in comment.
    kernel-parameters: remove outdated 'noresidual' parameter
    Remove spurious _H suffixes from ifdef comments
    sound: Remove stray pluses from Kconfig file
    radio-shark: Fix printk "CONFIG_LED_CLASS"
    doc: put proper reference to CONFIG_MODULE_SIG_ENFORCE
    ...

    Linus Torvalds
     

20 Apr, 2013

2 commits


17 Apr, 2013

2 commits

  • commit 7b7a2bbb690 (atl1: Remove unneeded PM_OPS definitions) removed the
    definition of atl1_suspend for the !CONFIG_PM_SLEEP case.

    So only call atl1_suspend() when CONFIG_PM_SLEEP is defined and fix the
    following build error from randconfig:

    drivers/net/ethernet/atheros/atlx/atl1.c: In function 'atl1_shutdown':
    drivers/net/ethernet/atheros/atlx/atl1.c:2888:2: error: implicit declaration of function 'atl1_suspend' [-Werror=implicit-function-declaration]

    Reported-by: kbuild test robot
    Signed-off-by: Fabio Estevam
    Signed-off-by: David S. Miller

    Fabio Estevam
     
  • SIMPLE_DEV_PM_OPS macro can handle !CONFIG_PM_SLEEP case nicely, so there is no
    need to define PM_OPS for both CONFIG_PM_SLEEP and !CONFIG_PM_SLEEP cases.

    Remove the unneeded definitions.

    Cc: Jay Cliburn
    Signed-off-by: Fabio Estevam
    Signed-off-by: David S. Miller

    Fabio Estevam
     

08 Apr, 2013

1 commit


05 Apr, 2013

1 commit


02 Apr, 2013

1 commit


31 Mar, 2013

1 commit


30 Mar, 2013

1 commit


27 Mar, 2013

1 commit

  • Add CONFIG_PM_SLEEP to suspend/resume functions to fix the following
    build warning when CONFIG_PM_SLEEP is not selected. This is because
    sleep PM callbacks defined by SIMPLE_DEV_PM_OPS are only used when
    the CONFIG_PM_SLEEP is enabled.

    drivers/net/ethernet/atheros/atlx/atl1.c:2861:12: warning: 'atl1_resume' defined but not used [-Wunused-function]

    Signed-off-by: Jingoo Han
    Signed-off-by: David S. Miller

    Jingoo Han
     

10 Mar, 2013

1 commit

  • Emitting netdev_alloc_skb and netdev_alloc_skb_ip_align OOM
    messages is unnecessary as there is already a dump_stack
    after allocation failures.

    Other trivial changes around these removals:

    Convert a few comparisons of pointer to 0 to !pointer.
    Change flow to remove unnecessary label.
    Remove now unused variable.
    Hoist assignment from if.

    Signed-off-by: Joe Perches
    Signed-off-by: David S. Miller

    Joe Perches
     

22 Feb, 2013

1 commit

  • Pull driver core patches from Greg Kroah-Hartman:
    "Here is the big driver core merge for 3.9-rc1

    There are two major series here, both of which touch lots of drivers
    all over the kernel, and will cause you some merge conflicts:

    - add a new function called devm_ioremap_resource() to properly be
    able to check return values.

    - remove CONFIG_EXPERIMENTAL

    Other than those patches, there's not much here, some minor fixes and
    updates"

    Fix up trivial conflicts

    * tag 'driver-core-3.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (221 commits)
    base: memory: fix soft/hard_offline_page permissions
    drivercore: Fix ordering between deferred_probe and exiting initcalls
    backlight: fix class_find_device() arguments
    TTY: mark tty_get_device call with the proper const values
    driver-core: constify data for class_find_device()
    firmware: Ignore abort check when no user-helper is used
    firmware: Reduce ifdef CONFIG_FW_LOADER_USER_HELPER
    firmware: Make user-mode helper optional
    firmware: Refactoring for splitting user-mode helper code
    Driver core: treat unregistered bus_types as having no devices
    watchdog: Convert to devm_ioremap_resource()
    thermal: Convert to devm_ioremap_resource()
    spi: Convert to devm_ioremap_resource()
    power: Convert to devm_ioremap_resource()
    mtd: Convert to devm_ioremap_resource()
    mmc: Convert to devm_ioremap_resource()
    mfd: Convert to devm_ioremap_resource()
    media: Convert to devm_ioremap_resource()
    iommu: Convert to devm_ioremap_resource()
    drm: Convert to devm_ioremap_resource()
    ...

    Linus Torvalds
     

20 Feb, 2013

1 commit


19 Feb, 2013

1 commit


14 Feb, 2013

1 commit


05 Feb, 2013

1 commit

  • alloc failures already get standardized OOM
    messages and a dump_stack.

    Convert kzalloc's with multiplies to kcalloc.
    Convert kmalloc's with multiplies to kmalloc_array.
    Fix a few whitespace defects.
    Convert a constant 6 to ETH_ALEN.
    Use parentheses around sizeof.
    Convert vmalloc/memset to vzalloc.
    Remove now unused size variables.

    Signed-off-by: Joe Perches
    Signed-off-by: David S. Miller

    Joe Perches
     

12 Jan, 2013

1 commit