04 Sep, 2013

1 commit

  • "tty->name" and "name" are a 64 character buffers. My static checker
    complains because we add the "cf" on the front so it look like we are
    copying a 66 character string into a 64 character buffer.

    Also if the name is larger than IFNAMSIZ (16) it triggers a BUG_ON()
    inside the call to alloc_netdev().

    This is all under CAP_SYS_ADMIN so it's not a security fix, it just adds
    a little robustness.

    Signed-off-by: Dan Carpenter
    Signed-off-by: David S. Miller

    Dan Carpenter
     

10 Jul, 2013

1 commit

  • rtnl_is_locked() doesn't check who holds this lock, it just tells that it's
    locked right now. if caif::ldisc_close really can be called under rtrnl_lock
    then it should release net device in other context because there is no way
    to grab rtnl_lock without deadlock.

    This patch adds work which releases these devices. Also this patch fixes calling
    dev_close/unregister_netdevice without rtnl_lock from caif_ser_exit().

    Signed-off-by: Konstantin Khlebnikov
    Cc: Dmitry Tarnyagin
    Signed-off-by: David S. Miller

    Konstantin Khlebnikov
     

12 May, 2013

1 commit

  • If NO_DMA=y:

    drivers/built-in.o: In function `cfv_destroy_genpool':
    drivers/net/caif/caif_virtio.c:364: undefined reference to `dma_free_coherent'
    drivers/built-in.o: In function `cfv_create_genpool':
    drivers/net/caif/caif_virtio.c:397: undefined reference to `dma_alloc_coherent'

    Signed-off-by: Geert Uytterhoeven
    Cc: Dmitry Tarnyagin
    Cc: David S. Miller
    Cc: netdev@vger.kernel.org
    Signed-off-by: David S. Miller

    Geert Uytterhoeven
     

03 May, 2013

1 commit

  • Pull virtio & lguest updates from Rusty Russell:
    "Lots of virtio work which wasn't quite ready for last merge window.

    Plus I dived into lguest again, reworking the pagetable code so we can
    move the switcher page: our fixmaps sometimes take more than 2MB now..."

    Ugh. Annoying conflicts with the tcm_vhost -> vhost_scsi rename.
    Hopefully correctly resolved.

    * tag 'virtio-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux: (57 commits)
    caif_virtio: Remove bouncing email addresses
    lguest: improve code readability in lg_cpu_start.
    virtio-net: fill only rx queues which are being used
    lguest: map Switcher below fixmap.
    lguest: cache last cpu we ran on.
    lguest: map Switcher text whenever we allocate a new pagetable.
    lguest: don't share Switcher PTE pages between guests.
    lguest: expost switcher_pages array (as lg_switcher_pages).
    lguest: extract shadow PTE walking / allocating.
    lguest: make check_gpte et. al return bool.
    lguest: assume Switcher text is a single page.
    lguest: rename switcher_page to switcher_pages.
    lguest: remove RESERVE_MEM constant.
    lguest: check vaddr not pgd for Switcher protection.
    lguest: prepare to make SWITCHER_ADDR a variable.
    virtio: console: replace EMFILE with EBUSY for already-open port
    virtio-scsi: reset virtqueue affinity when doing cpu hotplug
    virtio-scsi: introduce multiqueue support
    virtio-scsi: push vq lock/unlock into virtscsi_vq_done
    virtio-scsi: pass struct virtio_scsi to virtqueue completion function
    ...

    Linus Torvalds
     

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

  • Remove our (soon to be) bouncing email addresses,
    and update Dmitri's address.
    Dmitry will take over as maintainer for CAIF from now on.

    Cc: Vikram Arv
    Cc: Dmitry Tarnyagin
    Cc: Dmitry Tarnyagin
    Signed-off-by: Sjur Brændeland
    Signed-off-by: Rusty Russell
    Acked-by: Dmity Tarnyagin

    Sjur Brændeland
     

30 Apr, 2013

1 commit


25 Apr, 2013

1 commit


24 Apr, 2013

3 commits


02 Apr, 2013

1 commit


26 Mar, 2013

1 commit

  • After commit 6865ff222cca ("TTY: do not warn about setting
    speed via SPD_*"), we are seeing a build error when DEBUG_FS is
    enabled:
    drivers/net/caif/caif_serial.c: In function 'update_tty_status':
    drivers/net/caif/caif_serial.c:94:11: error: 'struct tty_struct' has no member named 'warned'

    Fix the error by removing the reference to the variable as it was
    not set in the last decade (as documented in the changelog of the
    commit above).

    Signed-off-by: Jiri Slaby
    Reported-by: Stephen Rothwell
    Cc: Sjur Braendeland
    Cc: netdev@vger.kernel.org
    Signed-off-by: Greg Kroah-Hartman

    Jiri Slaby
     

24 Mar, 2013

2 commits


20 Mar, 2013

2 commits

  • We never add buffers with input and output parts, so use the new accessors.

    Cc: Sjur Brendeland
    Signed-off-by: Rusty Russell

    Rusty Russell
     
  • Add the CAIF Virtio shared memory driver for talking
    to a modem.

    This CAIF Link layer communicates to the modem over
    shared memory. It is implemented as a virtio_driver.
    The underlying virtio device is managed by the remoteproc
    framework. The Virtio queue is used for transmitting data
    to the modem, and the new vringh is used for receiving data.

    Genalloc is used for managing the shared memory used for TX
    data. The default dma-alloc-coherent allocator can only
    allocate whole pages, and this wastes too much shared memory.

    Flow control is implemented by stopping the TX-queues if the
    virtio queues go full or we run out of memory. Queued are
    reopened when queues are below the watermark.

    NAPI is used in RX path, and a dedicated tasklet is used
    for releasing TX buffers.

    Signed-off-by: Erwan Yvin
    Acked-by: David S. Miller
    Signed-off-by: Rusty Russell (minor fixes)

    Erwan Yvin
     

19 Mar, 2013

1 commit

  • tty->hw_stopped is set only by drivers to remember HW state. If it is
    never set to 1 in a particular driver, there is no need to check it in
    the driver at all. Remove such checks.

    Signed-off-by: Jiri Slaby
    Signed-off-by: Greg Kroah-Hartman

    Jiri Slaby
     

18 Mar, 2013

1 commit

  • caif_shm is an old implementation
    caif_shm will be replaced by caif_virtio

    [ As explained by Linus Walleij: "U5500 used this, but was cancelled
    and the silicon did not reach anyone outside ST-Ericsson. Then for
    the next platforms, we have gone for the leaner & cleaner approach
    of using virtio, rpmesg and rproc." ]

    Signed-off-by: Erwan Yvin
    Acked-by: Linus Walleij
    Acked-by: Sjur Brendeland
    Signed-off-by: David S. Miller

    Erwan Yvin
     

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 tty/serial patches from Greg Kroah-Hartman:
    "Here's the big tty/serial driver patches for 3.9-rc1.

    More tty port rework and fixes from Jiri here, as well as lots of
    individual serial driver updates and fixes.

    All of these have been in the linux-next tree for a while."

    * tag 'tty-3.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (140 commits)
    tty: mxser: improve error handling in mxser_probe() and mxser_module_init()
    serial: imx: fix uninitialized variable warning
    serial: tegra: assume CONFIG_OF
    TTY: do not update atime/mtime on read/write
    lguest: select CONFIG_TTY to build properly.
    ARM defconfigs: add missing inclusions of linux/platform_device.h
    fb/exynos: include platform_device.h
    ARM: sa1100/assabet: include platform_device.h directly
    serial: imx: Fix recursive locking bug
    pps: Fix build breakage from decoupling pps from tty
    tty: Remove ancient hardpps()
    pps: Additional cleanups in uart_handle_dcd_change
    pps: Move timestamp read into PPS code proper
    pps: Don't crash the machine when exiting will do
    pps: Fix a use-after free bug when unregistering a source.
    pps: Use pps_lookup_dev to reduce ldisc coupling
    pps: Add pps_lookup_dev() function
    tty: serial: uartlite: Support uartlite on big and little endian systems
    tty: serial: uartlite: Fix sparse and checkpatch warnings
    serial/arc-uart: Miscll DT related updates (Grant's review comments)
    ...

    Fix up trivial conflicts, mostly just due to the TTY config option
    clashing with the EXPERIMENTAL removal.

    Linus Torvalds
     

05 Feb, 2013

1 commit


19 Jan, 2013

1 commit

  • The option allows you to remove TTY and compile without errors. This
    saves space on systems that won't support TTY interfaces anyway.
    bloat-o-meter output is below.

    The bulk of this patch consists of Kconfig changes adding "depends on
    TTY" to various serial devices and similar drivers that require the TTY
    layer. Ideally, these dependencies would occur on a common intermediate
    symbol such as SERIO, but most drivers "select SERIO" rather than
    "depends on SERIO", and "select" does not respect dependencies.

    bloat-o-meter output comparing our previous minimal to new minimal by
    removing TTY. The list is filtered to not show removed entries with awk
    '$3 != "-"' as the list was very long.

    add/remove: 0/226 grow/shrink: 2/14 up/down: 6/-35356 (-35350)
    function old new delta
    chr_dev_init 166 170 +4
    allow_signal 80 82 +2
    static.__warned 143 142 -1
    disallow_signal 63 62 -1
    __set_special_pids 95 94 -1
    unregister_console 126 121 -5
    start_kernel 546 541 -5
    register_console 593 588 -5
    copy_from_user 45 40 -5
    sys_setsid 128 120 -8
    sys_vhangup 32 19 -13
    do_exit 1543 1526 -17
    bitmap_zero 60 40 -20
    arch_local_irq_save 137 117 -20
    release_task 674 652 -22
    static.spin_unlock_irqrestore 308 260 -48

    Signed-off-by: Joe Millenbach
    Reviewed-by: Jamey Sharp
    Reviewed-by: Josh Triplett
    Signed-off-by: Greg Kroah-Hartman

    Joe Millenbach
     

16 Jan, 2013

1 commit

  • One point is to have less places where we actually need tty pointer.
    The other is that low_latency is bound to buffer processing and
    buffers are now in tty_port. So it makes sense to move low_latency to
    tty_port too.

    Signed-off-by: Jiri Slaby
    Signed-off-by: Greg Kroah-Hartman

    Jiri Slaby
     

25 Jul, 2012

1 commit


29 Jun, 2012

2 commits

  • Fix the failing merge in net-next by reverting the last
    net-next merge for caif_hsi.c and then merge in the commit:
    "caif-hsi: Bugfix - Piggyback'ed embedded CAIF frame lost"
    from the net repository.

    The commit:"caif-hsi: Add missing return in error path" from
    net repository was dropped, as it changed code previously removed in the
    net-next repository.

    Signed-off-by: Sjur Brændeland
    Signed-off-by: David S. Miller

    Sjur Brændeland
     
  • Conflicts:
    drivers/net/caif/caif_hsi.c
    drivers/net/usb/qmi_wwan.c

    The qmi_wwan merge was trivial.

    The caif_hsi.c, on the other hand, was not. It's a conflict between
    1c385f1fdf6f9c66d982802cd74349c040980b50 ("caif-hsi: Replace platform
    device with ops structure.") in the net-next tree and commit
    39abbaef19cd0a30be93794aa4773c779c3eb1f3 ("caif-hsi: Postpone init of
    HIS until open()") in the net tree.

    I did my best with that one and will ask Sjur to check it out.

    Signed-off-by: David S. Miller

    David S. Miller
     

26 Jun, 2012

9 commits


22 Apr, 2012

1 commit

  • The caif_shmcore requires io.h in order to use ioremap, so include that
    explicitly to compile in all configurations.

    Also add a note about the use of ioremap(), which is not a proper way
    to map a DMA buffer into kernel space. It's not completely clear what
    the intention is for using ioremap, but it is clear that the result
    of ioremap must not simply be accessed using kernel pointers but
    should use readl/writel or memcopy_{to,from}io. Assigning the result
    of ioremap to a regular pointer that can also be set to something
    else is not ok.

    Signed-off-by: Arnd Bergmann
    Signed-off-by: Mathieu Poirier
    Signed-off-by: David S. Miller

    Arnd Bergmann
     

13 Apr, 2012

3 commits