08 Apr, 2015

1 commit

  • This adds a new HCI_UART_VND_DETECT flag to allow automatic vendor
    detection. This allows to enable known vendor commands (for example
    for setting the public device address) when using a standard H:4
    UART protocol or when running in virtual machines.

    When this new flag is configured and no vendor specific setup
    routine is provided, then the local version information are read
    and the provided manufacturer information can be evaluated to
    configure extra vendor callbacks.

    Signed-off-by: Marcel Holtmann
    Signed-off-by: Johan Hedberg

    Marcel Holtmann
     

07 Apr, 2015

12 commits

  • …etooth/bluetooth-next

    Johan Hedberg says:

    ====================
    pull request: bluetooth-next 2015-04-04

    Here's what's probably the last bluetooth-next pull request for 4.1:

    - Fixes for LE advertising data & advertising parameters
    - Fix for race condition with HCI_RESET flag
    - New BNEPGETSUPPFEAT ioctl, needed for certification
    - New HCI request callback type to get the resulting skb
    - Cleanups to use BIT() macro wherever possible
    - Consolidate Broadcom device entries in the btusb HCI driver
    - Check for valid flags in CMTP, HIDP & BNEP
    - Disallow local privacy & OOB data combo to prevent a potential race
    - Expose SMP & ECDH selftest results through debugfs
    - Expose current Device ID info through debugfs

    Please let me know if there are any issues pulling. Thanks.
    ====================

    Signed-off-by: David S. Miller <davem@davemloft.net>

    David S. Miller
     
  • Conflicts:
    drivers/net/ethernet/mellanox/mlx4/cmd.c
    net/core/fib_rules.c
    net/ipv4/fib_frontend.c

    The fib_rules.c and fib_frontend.c conflicts were locking adjustments
    in 'net' overlapping addition and removal of code in 'net-next'.

    The mlx4 conflict was a bug fix in 'net' happening in the same
    place a constant was being replaced with a more suitable macro.

    Signed-off-by: David S. Miller

    David S. Miller
     
  • Linus Torvalds
     
  • Pull networking fixes from David Miller:

    1) In TCP, don't register an FRTO for cumulatively ACK'd data that was
    previously SACK'd, from Neal Cardwell.

    2) Need to hold RNL mutex in ipv4 multicast code namespace cleanup,
    from Cong WANG.

    3) Similarly we have to hold RNL mutex for fib_rules_unregister(), also
    from Cong WANG.

    4) Revert and rework netns nsid allocation fix, from Nicolas Dichtel.

    5) When we encapsulate for a tunnel device, skb->sk still points to the
    user socket. So this leads to cases where we retraverse the
    ipv4/ipv6 output path with skb->sk being of some other address
    family (f.e. AF_PACKET). This can cause things to crash since the
    ipv4 output path is dereferencing an AF_PACKET socket as if it were
    an ipv4 one.

    The short term fix for 'net' and -stable is to elide these socket
    checks once we've entered an encapsulation sequence by testing
    xmit_recursion.

    Longer term we have a better solution wherein we pass the tunnel's
    socket down through the output paths, but that is way too invasive
    for 'net' and -stable.

    From Hannes Frederic Sowa.

    6) l2tp_init() failure path forgets to unregister per-net ops, from
    Cong WANG.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
    net/mlx4_core: Fix error message deprecation for ConnectX-2 cards
    net: dsa: fix filling routing table from OF description
    l2tp: unregister l2tp_net_ops on failure path
    mvneta: dont call mvneta_adjust_link() manually
    ipv6: protect skb->sk accesses from recursive dereference inside the stack
    netns: don't allocate an id for dead netns
    Revert "netns: don't clear nsid too early on removal"
    ip6mr: call del_timer_sync() in ip6mr_free_table()
    net: move fib_rules_unregister() under rtnl lock
    ipv4: take rtnl_lock and mark mrt table as freed on namespace cleanup
    tcp: fix FRTO undo on cumulative ACK of SACKed range
    xen-netfront: transmit fully GSO-sized packets

    Linus Torvalds
     
  • Commit 1daa4303b4ca ("net/mlx4_core: Deprecate error message at
    ConnectX-2 cards startup to debug") did the deprecation only for port 1
    of the card. Need to deprecate for port 2 as well.

    Fixes: 1daa4303b4ca ("net/mlx4_core: Deprecate error message at ConnectX-2 cards startup to debug")
    Signed-off-by: Jack Morgenstein
    Signed-off-by: Amir Vadai
    Signed-off-by: David S. Miller

    Jack Morgenstein
     
  • According to description in 'include/net/dsa.h', in cascade switches
    configurations where there are more than one interconnected devices,
    'rtable' array in 'dsa_chip_data' structure is used to indicate which
    port on this switch should be used to send packets to that are destined
    for corresponding switch.

    However, dsa_of_setup_routing_table() fills 'rtable' with port numbers
    of the _target_ switch, but not current one.

    This commit removes redundant devicetree parsing and adds needed port
    number as a function argument. So dsa_of_setup_routing_table() now just
    looks for target switch number by parsing parent of 'link' device node.

    To remove possible misunderstandings with the way of determining target
    switch number, a corresponding comment was added to the source code and
    to the DSA device tree bindings documentation file.

    This was tested on a custom board with two Marvell 88E6095 switches with
    following corresponding routing tables: { -1, 10 } and { 8, -1 }.

    Signed-off-by: Pavel Nakonechny
    Reviewed-by: Andrew Lunn
    Reviewed-by: Florian Fainelli
    Signed-off-by: David S. Miller

    Pavel Nakonechny
     
  • Pull input fixes from Dmitry Torokhov:
    "Updates for the input subsystem - two more tweaks for ALPS driver to
    work out kinks after splitting the touchpad, trackstick, and potential
    external PS/2 mouse into separate input devices.

    Changes to support ALPS SS4 devices (protocol V8) will be coming in
    4.1..."

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
    Input: alps - document stick behavior for protocol V2
    Input: alps - report V2 Dualpoint Stick events via the right evdev node
    Input: alps - report interleaved bare PS/2 packets via dev3

    Linus Torvalds
     
  • Signed-off-by: Cong Wang
    Signed-off-by: David S. Miller

    WANG Cong
     
  • commit d631b94e7a15277858ec5f88d674d93080506999
    virtio: change comment in transmit

    started clarifying the logic behind queue state management,
    but introduced an inaccuracy: TX_BUSY does not cause
    a BUG message.

    Clean this up some more, explaining the tradeoffs in detail.

    Signed-off-by: Michael S. Tsirkin
    Signed-off-by: David S. Miller

    Michael S. Tsirkin
     
  • Commit 608cd71a9c7c ("tc: bpf: generalize pedit action") has added the
    possibility to mangle packet data to BPF programs in the tc pipeline.
    This patch adds two helpers bpf_l3_csum_replace() and bpf_l4_csum_replace()
    for fixing up the protocol checksums after the packet mangling.

    It also adds 'flags' argument to bpf_skb_store_bytes() helper to avoid
    unnecessary checksum recomputations when BPF programs adjusting l3/l4
    checksums and documents all three helpers in uapi header.

    Moreover, a sample program is added to show how BPF programs can make use
    of the mangle and csum helpers.

    Signed-off-by: Alexei Starovoitov
    Acked-by: Daniel Borkmann
    Signed-off-by: David S. Miller

    Alexei Starovoitov
     
  • mvneta_adjust_link() is a callback for of_phy_connect() and should
    not be called directly. The result of calling it directly is as below:

    Signed-off-by: David S. Miller

    Stas Sergeev
     
  • We should not consult skb->sk for output decisions in xmit recursion
    levels > 0 in the stack. Otherwise local socket settings could influence
    the result of e.g. tunnel encapsulation process.

    ipv6 does not conform with this in three places:

    1) ip6_fragment: we do consult ipv6_npinfo for frag_size

    2) sk_mc_loop in ipv6 uses skb->sk and checks if we should
    loop the packet back to the local socket

    3) ip6_skb_dst_mtu could query the settings from the user socket and
    force a wrong MTU

    Furthermore:
    In sk_mc_loop we could potentially land in WARN_ON(1) if we use a
    PF_PACKET socket ontop of an IPv6-backed vxlan device.

    Reuse xmit_recursion as we are currently only interested in protecting
    tunnel devices.

    Cc: Jiri Pirko
    Signed-off-by: Hannes Frederic Sowa
    Signed-off-by: David S. Miller

    hannes@stressinduktion.org
     

06 Apr, 2015

3 commits

  • Document that protocol V2 uses standard (bare) PS/2 mouse packets for the
    DualPoint stick.

    Signed-off-by: Hans de Goede
    Acked-By: Pali Rohár
    Signed-off-by: Dmitry Torokhov

    Hans de Goede
     
  • On V2 devices the DualPoint Stick reports bare packets, these should be
    reported via the "AlpsPS/2 ALPS DualPoint Stick" dev2 evdev node, which also
    has the INPUT_PROP_POINTING_STICK propbit set.

    Note that since there is no way to distinguish these packets from an external
    PS/2 mouse (insofar as these laptops have an external PS/2 port) this means
    that we will be reporting PS/2 mouse events via this evdev node too, as we've
    been doing in kernel 3.19 and older.

    This has been tested on a Dell Latitude D620 and a Dell Latitude E6400,
    which both have a V2 touchpad + a DualPoint Stick which reports bare packets.

    Signed-off-by: Hans de Goede
    Reviewed-by: Pali Rohár
    Signed-off-by: Dmitry Torokhov

    Hans de Goede
     
  • Bare packets should be reported via the same evdev device independent on
    whether they are detected on the beginning of a packet or in the middle
    of a packet.

    This has been tested on a Dell Latitude E6400, where the DualPoint Stick
    reports bare packets, which get reported via dev3 when the touchpad is
    idle, and via dev2 when the touchpad and stick are used simultaneously.

    This commit fixes this inconsistency by always reporting bare packets via
    dev3. Note that since the come from a DualPoint Stick they really should be
    reported via dev2, this gets fixed in a later commit.

    Signed-off-by: Hans de Goede
    Reviewed-by: Pali Rohár
    Signed-off-by: Dmitry Torokhov

    Hans de Goede
     

05 Apr, 2015

13 commits

  • Pull USB fixes from Greg KH:
    "Here are some small USB fixes and new device ids for 4.0-rc6. Nothing
    major, some xhci fixes for reported problems, and some usb-serial
    device ids.

    All have been in linux-next for a while"

    * tag 'usb-4.0-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
    USB: ftdi_sio: Use jtag quirk for SNAP Connect E10
    usb: isp1760: fix spin unlock in the error path of isp1760_udc_start
    usb: xhci: apply XHCI_AVOID_BEI quirk to all Intel xHCI controllers
    usb: xhci: handle Config Error Change (CEC) in xhci driver
    USB: keyspan_pda: add new device id
    USB: ftdi_sio: Added custom PID for Synapse Wireless product

    Linus Torvalds
     
  • netfilter: Compress hook function signatures.

    Currently netfilter hooks have a function signature that is huge and
    has many arguments. This propagates from the hook entry points down
    into the individual hook implementations themselves.

    This means that if, for example, we want to change the type of one of
    these arguments then we have to touch hundreds of locations.

    The main initial motivation behind this is that we'd like to change
    the signature of "okfn" so that a socket pointer can be passed in (and
    reference counted properly) for the sake of using the proper socket
    context in the case of tunnels whilst not releasing the top level user
    socket from skb->sk (and thus releasing it's socket memory quota
    usage) in order to accomodate this.

    This also makes it clear who actually uses 'okfn', nf_queue(). It is
    absolutely critical to make this obvious because any user of 'okfn'
    down in these hook chains have the be strictly audited for
    escapability. Specifically, escapability of references to objects
    outside of the packet processing path. And that's exactly what
    nf_queue() does via it's packet reinjection framework.

    In fact this points out a bug in Jiri's original attempt to push the
    socket pointer down through netfilter's okfn. It didn't grab and drop
    a reference to the socket in net/netfilter/nf_queue.c as needed.

    Furthermore, so many code paths are simplified, and should in fact be
    more efficient because we aren't passing in arguments that often are
    simply not used by the netfilter hook at all.

    Further simplifications are probably possible, but this series takes
    care of the main cases.

    Unfortunately I couldn't convert ebt_do_table() because ebtables is
    complete and utter crap and uses ebt_do_table() outside of the hook
    call chains. But that should not be news to anyone.

    Signed-off-by: David S. Miller
    Acked-by: Pablo Neira Ayuso

    David S. Miller
     
  • Pull staging driver fixes from Greg KH:
    "Here are some staging driver fixes, well, really all just IIO driver
    fixes, for 4.0-rc6. They fix issues that have been reported with
    these drivers.

    All of these patches have been in linux-next for a while"

    * tag 'staging-4.0-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
    iio: imu: Use iio_trigger_get for indio_dev->trig assignment
    iio: adc: vf610: use ADC clock within specification
    iio/adc/cc10001_adc.c: Fix !HAS_IOMEM build
    iio: core: Fix double free.
    iio:inv-mpu6050: Fix inconsistency for the scale channel
    staging: iio: dummy: Fix undefined symbol build error
    iio: inv_mpu6050: Clear timestamps fifo while resetting hardware fifo
    staging: iio: hmc5843: Set iio name property in sysfs
    iio: bmc150: change sampling frequency
    iio: fix drivers that check buffer->scan_mask

    Linus Torvalds
     
  • Pull tty/serial fixes from Greg KH:
    "Here are 3 serial driver fixes for 4.0-rc6. They fix some reported
    issues with the samsung and fsl_lpuart drivers.

    All have been in linux-next for a while"

    * tag 'tty-4.0-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
    tty: serial: fsl_lpuart: clear receive flag on FIFO flush
    tty: serial: fsl_lpuart: specify transmit FIFO size
    serial: samsung: Clear operation mode on UART shutdown

    Linus Torvalds
     
  • Signed-off-by: David S. Miller

    David S. Miller
     
  • Signed-off-by: David S. Miller

    David S. Miller
     
  • Signed-off-by: David S. Miller

    David S. Miller
     
  • Signed-off-by: David S. Miller

    David S. Miller
     
  • Signed-off-by: David S. Miller

    David S. Miller
     
  • Signed-off-by: David S. Miller

    David S. Miller
     
  • Pass the nf_hook_state all the way down into the hook
    functions themselves.

    Signed-off-by: David S. Miller

    David S. Miller
     
  • That way we don't have to reinstantiate another nf_hook_state
    on the stack of the nf_reinject() path.

    Signed-off-by: David S. Miller

    David S. Miller
     
  • Instead of passing a large number of arguments down into the nf_hook()
    entry points, create a structure which carries this state down through
    the hook processing layers.

    This makes is so that if we want to change the types or signatures of
    any of these pieces of state, there are less places that need to be
    changed.

    Signed-off-by: David S. Miller

    David S. Miller
     

04 Apr, 2015

11 commits

  • The TX power field in the LE advertising data should be placed last
    since it needs to be possible to enable kernel controlled TX power,
    but still allow for userspace provided flags field.

    Signed-off-by: Marcel Holtmann
    Signed-off-by: Johan Hedberg

    Marcel Holtmann
     
  • Signed-off-by: Marcel Holtmann
    Signed-off-by: Johan Hedberg

    Marcel Holtmann
     
  • Signed-off-by: Marcel Holtmann
    Signed-off-by: Johan Hedberg

    Marcel Holtmann
     
  • Pull input subsystem fixes from Dmitry Torokhov:
    "A fix for ALPS driver for issue introduced in the latest update and a
    tweak for yet another Lenovo box in Synaptics.

    There will be more ALPS tweaks coming.."

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
    Input: define INPUT_PROP_ACCELEROMETER behavior
    Input: synaptics - fix min-max quirk value for E440
    Input: synaptics - add quirk for Thinkpad E440
    Input: ALPS - fix max coordinates for v5 and v7 protocols
    Input: add MT_TOOL_PALM

    Linus Torvalds
     
  • Pull block layer fix from Jens Axboe:
    "Just one patch in this pull request, fixing a regression caused by a
    'mathematically correct' change to lcm()"

    * 'for-linus' of git://git.kernel.dk/linux-block:
    block: fix blk_stack_limits() regression due to lcm() change

    Linus Torvalds
     
  • With this patch kernel will be able to handle setup request. This is
    needed if we would like to handle control mesages with extension
    headers. User space will be only resposible for reading setup data and
    checking if scenario is conformance to specification (dst and src device
    bnep role). In case of new user space, setup data must be leaved(peek
    msg) on queue. New bnep session will be responsible for handling this
    data.

    Signed-off-by: Grzegorz Kolodziejczyk
    Signed-off-by: Marcel Holtmann

    Grzegorz Kolodziejczyk
     
  • Handling extended headers of control frames is required BNEP
    functionality. This patch refractor bnep rx frame handling function.
    Extended header for control frames shouldn't be omitted as it was
    previously done. Every control frame should be checked if it contains
    extended header and then every extension should be parsed separately.

    Signed-off-by: Grzegorz Kolodziejczyk
    Signed-off-by: Marcel Holtmann

    Grzegorz Kolodziejczyk
     
  • This is needed if user space wants to know supported bnep features
    by kernel, e.g. if kernel supports sending response to bnep setup
    control message. By now there is no possibility to know supported
    features by kernel in case of bnep. Ioctls allows only to add connection,
    delete connection, get connection list, get connection info. Adding
    connection if it's possible (establishing network device connection) is
    equivalent to starting bnep session. Bnep session handles data queue of
    transmit, receive messages over bnep channel. It means that if we add
    connection the received/transmitted data will be parsed immediately. In
    case of get bnep features we want to know before session start, if we
    should leave setup data on socket queue and let kernel to handle with it,
    or in case of no setup handling support, if we should pull this message
    and handle setup response within user space.

    Signed-off-by: Grzegorz Kolodziejczyk
    Signed-off-by: Marcel Holtmann

    Grzegorz Kolodziejczyk
     
  • Now that resizing is completely automatic, we need to remove
    the max_size setting or the test will fail.

    Reported-by: Fengguang Wu
    Signed-off-by: Herbert Xu
    Acked-by: Thomas Graf
    Signed-off-by: David S. Miller

    Herbert Xu
     
  • Stas Sergeev says:

    ====================
    mvneta: SGMII-based in-band link state signaling

    Currently the fixed-link DT binding is pre-configured and
    cannot be changed in run-time. This means the cable unplug
    events are not being detected, and the link parameters can't
    be negotiated.

    The following patches are needed when mvneta is used
    in fixed-link mode (without MDIO).
    They add an API to fixed_phy that allows to update
    status, and use that API in the mvneta driver when parsing
    the SGMII in-band status.

    There is also another implementation that doesn't add any API
    and does everything in mvneta driver locally:
    https://lkml.org/lkml/2015/3/31/327
    I'll let people decide which approach is better.
    No strong opinion on my side.
    ====================

    Signed-off-by: Stas Sergeev
    Signed-off-by: David S. Miller

    David S. Miller
     
  • When MDIO bus is unavailable (common setup for SGMII), the in-band
    signaling must be used to correctly track link state.
    This patch enables the in-band status delivery for link state changes, namely:
    - link up/down
    - link speed
    - duplex full/half
    fixed_phy_update_state() is used to update phy status.

    CC: Thomas Petazzoni
    CC: Florian Fainelli
    CC: netdev@vger.kernel.org
    CC: linux-kernel@vger.kernel.org

    Signed-off-by: Stas Sergeev
    Signed-off-by: David S. Miller

    Stas Sergeev