24 Apr, 2015

1 commit

  • Pull second batch of devicetree updates from Rob Herring:
    "As Grant mentioned in the first devicetree pull request, here is the
    2nd batch of DT changes for 4.1. The main remaining item here is the
    endianness bindings and related 8250 driver support.

    - DT endianness specification bindings

    - big-endian 8250 serial support

    - DT overlay unittest updates

    - various DT doc updates

    - compile fixes for OF_IRQ=n"

    * tag 'devicetree-for-4.1' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
    frv: add io{read,write}{16,32}be functions
    mn10300: add io{read,write}{16,32}be functions
    Documentation: DT bindings: add doc for Altera's SoCFPGA platform
    of: base: improve of_get_next_child() kernel-doc
    Doc: dt: arch_timer: discourage clock-frequency use
    of: unittest: overlay: Keep track of created overlays
    of/fdt: fix allocation size for device node path
    serial: of_serial: Support big-endian register accesses
    serial: 8250: Add support for big-endian MMIO accesses
    of: Document {little,big,native}-endian bindings
    of/fdt: Add endianness helper function for early init code
    of: Add helper function to check MMIO register endianness
    of/fdt: Remove "reg" data prints from early_init_dt_scan_memory
    of: add vendor prefix for Artesyn
    of: Add dummy of_irq_to_resource_table() for IRQ_OF=n
    of: OF_IRQ should depend on IRQ_DOMAIN

    Linus Torvalds
     

18 Apr, 2015

1 commit

  • Pull devicetree changes from Grant Likely:
    "Here are the devicetree changes queued up for v4.1. Nothing really
    exciting here. Rob has another few commits for big-endian attached
    UARTs, but those will be sent in a separate merge request since they
    haven't been as thoroughly tested as this batch.

    Here are the highlights:

    - lots of unittest cleanup from Frank Rowand

    - bugfixes and updates to the of_graph code

    - tighten up of_get_mac_address() code

    - documentation updates"

    * tag 'devicetree-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/glikely/linux:
    of/unittest: Fix of_platform_depopulate test case
    of/unittest: early return from test skips tests
    of/unittest: breadcrumbs to reduce pain of future maintainers
    of/unittest: reduce checkpatch noise - line after declarations
    of/unittest: typo in error string
    of/unittest: add const where needed
    of_net: factor out repetitive code from of_get_mac_address()
    drivers/of: Add empty ranges quirk for PA-Semi
    of: Allow selection of OF_DYNAMIC and OF_OVERLAY if OF_UNITTEST
    of: Empty node & property flag accessors when !OF
    of: Explicitly include linux/types.h in of_graph.h
    dt-bindings: brcm: rationalize Broadcom documentation naming
    of/unittest: replace 'selftest' with 'unittest'
    Documentation: rename of_selftest.txt to of_unittest.txt
    Documentation: update the of_selftest.txt
    dt: OF_UNITTEST make dependency broken
    MAINTAINERS: Pantelis Antoniou device tree overlay maintainer
    of: Add of_graph_get_port_by_id function
    of: Add for_each_endpoint_of_node helper macro
    of: Decrement refcount of previous endpoint in of_graph_get_next_endpoint

    Linus Torvalds
     

17 Apr, 2015

1 commit


16 Apr, 2015

1 commit

  • Pull networking updates from David Miller:

    1) Add BQL support to via-rhine, from Tino Reichardt.

    2) Integrate SWITCHDEV layer support into the DSA layer, so DSA drivers
    can support hw switch offloading. From Floria Fainelli.

    3) Allow 'ip address' commands to initiate multicast group join/leave,
    from Madhu Challa.

    4) Many ipv4 FIB lookup optimizations from Alexander Duyck.

    5) Support EBPF in cls_bpf classifier and act_bpf action, from Daniel
    Borkmann.

    6) Remove the ugly compat support in ARP for ugly layers like ax25,
    rose, etc. And use this to clean up the neigh layer, then use it to
    implement MPLS support. All from Eric Biederman.

    7) Support L3 forwarding offloading in switches, from Scott Feldman.

    8) Collapse the LOCAL and MAIN ipv4 FIB tables when possible, to speed
    up route lookups even further. From Alexander Duyck.

    9) Many improvements and bug fixes to the rhashtable implementation,
    from Herbert Xu and Thomas Graf. In particular, in the case where
    an rhashtable user bulk adds a large number of items into an empty
    table, we expand the table much more sanely.

    10) Don't make the tcp_metrics hash table per-namespace, from Eric
    Biederman.

    11) Extend EBPF to access SKB fields, from Alexei Starovoitov.

    12) Split out new connection request sockets so that they can be
    established in the main hash table. Much less false sharing since
    hash lookups go direct to the request sockets instead of having to
    go first to the listener then to the request socks hashed
    underneath. From Eric Dumazet.

    13) Add async I/O support for crytpo AF_ALG sockets, from Tadeusz Struk.

    14) Support stable privacy address generation for RFC7217 in IPV6. From
    Hannes Frederic Sowa.

    15) Hash network namespace into IP frag IDs, also from Hannes Frederic
    Sowa.

    16) Convert PTP get/set methods to use 64-bit time, from Richard
    Cochran.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1816 commits)
    fm10k: Bump driver version to 0.15.2
    fm10k: corrected VF multicast update
    fm10k: mbx_update_max_size does not drop all oversized messages
    fm10k: reset head instead of calling update_max_size
    fm10k: renamed mbx_tx_dropped to mbx_tx_oversized
    fm10k: update xcast mode before synchronizing multicast addresses
    fm10k: start service timer on probe
    fm10k: fix function header comment
    fm10k: comment next_vf_mbx flow
    fm10k: don't handle mailbox events in iov_event path and always process mailbox
    fm10k: use separate workqueue for fm10k driver
    fm10k: Set PF queues to unlimited bandwidth during virtualization
    fm10k: expose tx_timeout_count as an ethtool stat
    fm10k: only increment tx_timeout_count in Tx hang path
    fm10k: remove extraneous "Reset interface" message
    fm10k: separate PF only stats so that VF does not display them
    fm10k: use hw->mac.max_queues for stats
    fm10k: only show actual queues, not the maximum in hardware
    fm10k: allow creation of VLAN on default vid
    fm10k: fix unused warnings
    ...

    Linus Torvalds
     

15 Apr, 2015

7 commits

  • Pull i2c updates from Wolfram Sang:
    "Most notable:

    - introducing the i2c_quirk infrastructure. Now, flaws of I2C
    controllers can be described and the core will check if the flaws
    collide with the messages to be sent

    - wait_for_completion return type cleanup series

    - new drivers for Digicolor, Netlogic XLP, Ingenic JZ4780

    - updates to the I2C slave framework which include API changes. Its
    only user was updated, too. Documentation was finally added

    - changed dynamic bus numbering for the DT case. This could change
    bus numbers for users. However, it fixes a collision where dynamic
    and static busses request the same id.

    - driver bugfixes, cleanups"

    * 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (52 commits)
    i2c: xlp9xx: Driver for Netlogic XLP9XX/5XX I2C controller
    of: Add vendor prefix 'netlogic'
    i2c: davinci: use ICPFUNC to toggle I2C as gpio for bus recovery
    i2c: davinci: use bus recovery infrastructure
    i2c: change input parameter to i2c_adapter for prepare/unprepare_recovery
    i2c: i2c-mux-gpio: remove error messages for probe deferrals
    i2c: jz4780: Add i2c bus controller driver for Ingenic JZ4780
    i2c: dln2: set the device tree node of the adapter
    i2c: davinci: fixup wait_for_completion_timeout handling
    i2c: mpc: Fix ISR return value
    i2c: slave-eeprom: add more info when to increase the pointer
    i2c: slave: add documentation for i2c-slave-eeprom
    Documentation: i2c: describe the new slave mode
    i2c: slave: rework the slave API
    i2c: add support for the Digicolor I2C controller
    i2c: busses with dynamic ids should start after fixed ids for DT
    of: base: add function to get highest id of an alias stem
    i2c: designware: Suppress error message if platform_get_irq() < 0
    i2c: mpc: assign the correct prescaler from SVR
    i2c: img-scb: fixup of wait_for_completion_timeout return handling
    ...

    Linus Torvalds
     
  • During the course of the overlay selftests some of them remain
    applied. While this does not pose a real problem, make sure you track
    them and destroy them at the end of the test.

    Signed-off-by: Pantelis Antoniou
    Signed-off-by: Rob Herring

    Pantelis Antoniou
     
  • The allocation size of device node path is off by one which drops the
    '\0' terminator.

    Signed-off-by: Ricky Liang
    Signed-off-by: Rob Herring

    Ricky Liang
     
  • Provide a libfdt-based equivalent for of_device_is_big_endian(), suitable
    for use in the early_init_* functions.

    Signed-off-by: Kevin Cernekee
    Reviewed-by: Peter Hurley
    Acked-by: Greg Kroah-Hartman
    Signed-off-by: Rob Herring

    Kevin Cernekee
     
  • SoC peripherals can come in several different flavors:

    - little-endian: registers always need to be accessed in LE mode (so the
    kernel should perform a swap if the CPU is running BE)

    - big-endian: registers always need to be accessed in BE mode (so the
    kernel should perform a swap if the CPU is running LE)

    - native-endian: the bus will automatically swap accesses, so the kernel
    should never swap

    Introduce a function that checks an OF device node to see whether it
    contains a "big-endian" or "native-endian" property. For the former case,
    always return true. For the latter case, return true iff the kernel was
    built for BE (implying that the BE MMIO accessors do not perform a swap).
    Otherwise return false, assuming LE registers.

    LE registers are assumed by default because most existing drivers (libahci,
    serial8250, usb) always use readl/writel in the absence of instructions
    to the contrary, so that will be our fallback.

    Signed-off-by: Kevin Cernekee
    Reviewed-by: Peter Hurley
    Acked-by: Greg Kroah-Hartman
    Signed-off-by: Rob Herring

    Kevin Cernekee
     
  • Commit 51975db0b7333 ("of/flattree: merge early_init_dt_scan_memory()
    common code") consolidated some code from PowerPC (typically
    big-endian), and ended-up adding a pr_debug() printing reg properties in
    big-endian (DT native) format, not CPU endian.

    This debug print suffers from two problems:
    - we only print 4 "reg" values, while there could be more on typical
    systems having multiple memory ranges
    - we print these 4 "reg" values in FDT endianess, that is big-endian,
    and these values could be confusing for little-endian configurations

    Since we are already printing the base address and size of the memory
    regions parsed by early_init_dt_scan_memory() later in a way that is
    both endian correct, and takes into account arbitrary number of memory
    banks, just remove that part of the debug print.

    Suggested-by: Frank Rowand
    Signed-off-by: Florian Fainelli
    Signed-off-by: Rob Herring

    Florian Fainelli
     
  • If CONFIG_IRQ_DOMAIN=n:

    drivers/of/irq.c: In function ‘of_irq_get’:
    drivers/of/irq.c:406: error: implicit declaration of function ‘irq_find_host’
    drivers/of/irq.c:406: warning: assignment makes pointer from integer without a cast
    make[2]: *** [drivers/of/irq.o] Error 1

    Signed-off-by: Geert Uytterhoeven
    Signed-off-by: Rob Herring

    Geert Uytterhoeven
     

14 Apr, 2015

1 commit

  • Pull PCI changes from Bjorn Helgaas:
    "Enumeration
    - Read capability list as dwords, not bytes (Sean O. Stalley)

    Resource management
    - Don't check for PNP overlaps with unassigned PCI BARs (Bjorn Helgaas)
    - Mark invalid BARs as unassigned (Bjorn Helgaas)
    - Show driver, BAR#, and resource on pci_ioremap_bar() failure (Bjorn Helgaas)
    - Fail pci_ioremap_bar() on unassigned resources (Bjorn Helgaas)
    - Assign resources before drivers claim devices (Yijing Wang)
    - Claim bus resources before pci_bus_add_devices() (Yijing Wang)

    Power management
    - Optimize device state transition delays (Aaron Lu)
    - Don't clear ASPM bits when the FADT declares it's unsupported (Matthew Garrett)

    Virtualization
    - Add ACS quirks for Intel 1G NICs (Alex Williamson)

    IOMMU
    - Add ptr to OF node arg to of_iommu_configure() (Murali Karicheri)
    - Move of_dma_configure() to device.c to help re-use (Murali Karicheri)
    - Fix size when dma-range is not used (Murali Karicheri)
    - Add helper functions pci_get[put]_host_bridge_device() (Murali Karicheri)
    - Add of_pci_dma_configure() to update DMA configuration (Murali Karicheri)
    - Update DMA configuration from DT (Murali Karicheri)
    - dma-mapping: limit IOMMU mapping size (Murali Karicheri)
    - Calculate device DMA masks based on DT dma-range size (Murali Karicheri)

    ARM Versatile host bridge driver
    - Check for devm_ioremap_resource() failures (Jisheng Zhang)

    Broadcom iProc host bridge driver
    - Add Broadcom iProc PCIe driver (Ray Jui)

    Marvell MVEBU host bridge driver
    - Add suspend/resume support (Thomas Petazzoni)

    Renesas R-Car host bridge driver
    - Fix position of MSI enable bit (Nobuhiro Iwamatsu)
    - Write zeroes to reserved PCIEPARL bits (Nobuhiro Iwamatsu)
    - Change PCIEPARL and PCIEPARH to PCIEPALR and PCIEPAUR (Nobuhiro Iwamatsu)
    - Verify that mem_res is 64K-aligned (Nobuhiro Iwamatsu)

    Samsung Exynos host bridge driver
    - Fix INTx enablement statement termination error (Jaehoon Chung)

    Miscellaneous
    - Make a shareable UUID for PCI firmware ACPI _DSM (Aaron Lu)
    - Clarify policy for vendor IDs in pci.txt (Michael S. Tsirkin)"

    * tag 'pci-v4.1-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (36 commits)
    PCI: Read capability list as dwords, not bytes
    PCI: layerscape: Simplify platform_get_resource_byname() failure checking
    PCI: keystone: Don't dereference possible NULL pointer
    PCI: versatile: Check for devm_ioremap_resource() failures
    PCI: Don't clear ASPM bits when the FADT declares it's unsupported
    PCI: Clarify policy for vendor IDs in pci.txt
    PCI/ACPI: Optimize device state transition delays
    PCI: Export pci_find_host_bridge() for use inside PCI core
    PCI: Make a shareable UUID for PCI firmware ACPI _DSM
    PCI: Fix typo in Thunderbolt kernel message
    PCI: exynos: Fix INTx enablement statement termination error
    PCI: iproc: Add Broadcom iProc PCIe support
    PCI: iproc: Add DT docs for Broadcom iProc PCIe driver
    PCI: Export symbols required for loadable host driver modules
    PCI: Add ACS quirks for Intel 1G NICs
    PCI: mvebu: Add suspend/resume support
    PCI: Cleanup control flow
    sparc/PCI: Claim bus resources before pci_bus_add_devices()
    PCI: Assign resources before drivers claim devices (pci_scan_root_bus())
    PCI: Fail pci_ioremap_bar() on unassigned resources
    ...

    Linus Torvalds
     

07 Apr, 2015

1 commit

  • 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
     

29 Mar, 2015

8 commits

  • Conflicts:
    drivers/of/unittest.c

    Grant Likely
     
  • The previous commit, "of/unittest: early return from test skips tests"
    exposed broken tests for the of_platform_unpopulate() function. The
    problem was the populate and depopulate calls were not symmetrical like
    they were intended to be, and unpopulate depends on the parent device to
    have it's of_node pointer pointing to the parent device node. Fix these
    bugs so that the test case works correctly.

    In the process, the test_bus used as a container for the test devices
    has been changed from a statically allocated struct device (which is
    bad) to a properly allocated device with a .release() method (which is
    good). This stops the test code from being a bad example of abusing the
    device model.

    Signed-off-by: Grant Likely
    Cc: Frank Rowand
    Cc: Pantelis Antoniou
    Cc: Pawel Moll

    Grant Likely
     
  • Fix bugs pointed out by checkpatch: Mis-coding of two if statements
    caused early return from function.

    Number of tests completed increased from 102 to 107.
    Number of tests failed increased from 0 to 2.

    Signed-off-by: Frank Rowand
    Signed-off-by: Grant Likely

    Frank Rowand
     
  • Fix warnings pointed out by checkpatch.

    Checkpatch warns: externs should be avoided in .c files

    Reducing pain for future maintainers - adding a comment so that anyone trying
    to find where the extern data is created will be able to find it.
    (grep will not find that location)

    Signed-off-by: Frank Rowand
    Signed-off-by: Grant Likely

    Frank Rowand
     
  • Fix warnings pointed out by checkpatch.

    No bug fixes, but reduce the number of checkpatch warnings so that future
    problems will stand out better.

    Signed-off-by: Frank Rowand
    Signed-off-by: Grant Likely

    Frank Rowand
     
  • Fix bug pointed out by checkpatch.

    Splitting string incorrectly removed a space between two words.

    Signed-off-by: Frank Rowand
    Signed-off-by: Grant Likely

    Frank Rowand
     
  • Fix warnings pointed out by checkpatch.

    No bugs fixed, but the test code should be a good example of how to use
    the devicetree API.

    Signed-off-by: Frank Rowand
    Signed-off-by: Grant Likely

    Frank Rowand
     
  • of_get_mac_address() basically does the same thing thrice, every time with a
    different property name, so it makes sense to factor out the repetitive code
    into separate function. While at it, we can start using ETH_ALEN instead of the
    bare number and drop unnecessary parens around the property length check.

    The resulting ARM object file is 100 bytes less in size than before the patch.

    Signed-off-by: Sergei Shtylyov
    Acked-by: David S. Miller
    Acked-by: Florian Fainelli
    Signed-off-by: Grant Likely

    Sergei Shtylyov
     

28 Mar, 2015

3 commits


25 Mar, 2015

3 commits

  • This patch just replace the string 'selftest' with 'unittest'
    in OF unittest and data and binding file.

    I have tested it successfully on ARM.

    Signed-off-by: Wang Long
    Signed-off-by: Rob Herring

    Wang Long
     
  • If CONFIG_OF_UNITTEST=y then a kernel image make will always cause .version to
    be incremented, even if there are not source changes. This is caused by
    a lack of dependency tracking and checking for
    drivers/of/unittest-data/testcases.dtb.o.

    Signed-off-by: Frank Rowand
    Signed-off-by: Rob Herring

    Frank Rowand
     
  • Pull of-graph helpers from Philipp Zabel:
    of: Add of-graph helpers to loop over endpoints and find ports by id

    This series converts of_graph_get_next_endpoint to decrement the refcount of
    the passed prev parameter. This allows to add a for_each_endpoint_of_node
    helper macro to loop over all endpoints in a device tree node.
    The of_graph_get_port_by_id function is added to retrieve a port by its known
    port id (contained in the reg property) from the device tree.

    Rob Herring
     

24 Mar, 2015

1 commit


21 Mar, 2015

1 commit

  • Conflicts:
    drivers/net/ethernet/emulex/benet/be_main.c
    net/core/sysctl_net_core.c
    net/ipv4/inet_diag.c

    The be_main.c conflict resolution was really tricky. The conflict
    hunks generated by GIT were very unhelpful, to say the least. It
    split functions in half and moved them around, when the real actual
    conflict only existed solely inside of one function, that being
    be_map_pci_bars().

    So instead, to resolve this, I checked out be_main.c from the top
    of net-next, then I applied the be_main.c changes from 'net' since
    the last time I merged. And this worked beautifully.

    The inet_diag.c and sysctl_net_core.c conflicts were simple
    overlapping changes, and were easily to resolve.

    Signed-off-by: David S. Miller

    David S. Miller
     

19 Mar, 2015

5 commits

  • * pci/iommu:
    of: Calculate device DMA masks based on DT dma-range size
    arm: dma-mapping: limit IOMMU mapping size
    PCI: Update DMA configuration from DT
    of/pci: Add of_pci_dma_configure() to update DMA configuration
    PCI: Add helper functions pci_get[put]_host_bridge_device()
    of: Fix size when dma-range is not used
    of: Move of_dma_configure() to device.c to help re-use
    of: iommu: Add ptr to OF node arg to of_iommu_configure()

    * pci/resource:
    PCI: Fail pci_ioremap_bar() on unassigned resources
    PCI: Show driver, BAR#, and resource on pci_ioremap_bar() failure
    PCI: Mark invalid BARs as unassigned
    PNP: Don't check for overlaps with unassigned PCI BARs

    Bjorn Helgaas
     
  • This reverts commit 2fa645cb2703d9b3786d850db815414dfeefa51d.

    The assumption that at least 1 preferred console will be registered
    when the stdout-path property is set is invalid, which can result
    in _no_ consoles.

    Signed-off-by: Peter Hurley
    Signed-off-by: Rob Herring

    Peter Hurley
     
  • Commit 106937e8ccdc ("of: fix handling of '/' in options for
    of_find_node_by_path()") caused a regression in OF handling of
    stdout-path. While it fixes some cases which have '/' after the ':', it
    breaks cases where there is more than one '/' *before* the ':'.

    For example, it breaks this boot string

    stdout-path = "/rdb/serial@f040ab00:115200";

    So rather than doing sequentialized checks (first for '/', then for ':';
    or vice versa), to get the correct behavior we need to check for the
    first occurrence of either one of them.

    It so happens that the handy strcspn() helper can do just that.

    Fixes: 106937e8ccdc ("of: fix handling of '/' in options for of_find_node_by_path()")
    Signed-off-by: Brian Norris
    Cc: stable@vger.kernel.org # 3.19
    Acked-by: Leif Lindholm
    Signed-off-by: Rob Herring

    Brian Norris
     
  • There were regressions seen with commit 106937e8ccdc ("of: fix handling
    of '/' in options for of_find_node_by_path()"), where we couldn't handle
    extra '/' before the ':'. Let's test for this now.

    Confirmed that this test fails without the previous patch and passes
    when patched. All other tests pass.

    Signed-off-by: Brian Norris
    Acked-by: Leif Lindholm
    Signed-off-by: Rob Herring

    Brian Norris
     
  • The error code paths that require cleanup use a goto to jump to the
    cleanup code and return an error code. However, the error code variable
    res, which is initialized to -EINVAL when declared, is then overwritten
    with the return value of of_parse_phandle_with_args(), and reused as the
    return code from of_irq_parse_one(). This leads to an undetermined error
    being returned instead of the expected -EINVAL value. Fix it.

    Signed-off-by: Laurent Pinchart
    Cc: stable@vger.kernel.org # 3.13+
    Signed-off-by: Rob Herring

    Laurent Pinchart
     

18 Mar, 2015

1 commit

  • I2C supports adding adapters using either a dynamic or fixed id. The
    latter is provided by aliases in the DT case. To prevent id collisions
    of those two types, install this function which gives us the highest
    fixed id, so we can then let the dynamically created ones come after
    this highest number.

    Signed-off-by: Wolfram Sang
    Acked-by: Rob Herring
    Signed-off-by: Wolfram Sang

    Wolfram Sang
     

13 Mar, 2015

1 commit

  • Calculate the dma_mask and coherent_dma_mask based on the dma-range values
    set in DT for the device.

    Limit the mask to lower of the default mask and mask calculated.

    Signed-off-by: Murali Karicheri
    Signed-off-by: Bjorn Helgaas
    Reviewed-by: Catalin Marinas
    CC: Joerg Roedel
    CC: Grant Likely
    CC: Rob Herring
    CC: Will Deacon
    CC: Russell King
    CC: Arnd Bergmann
    CC: Suravee Suthikulpanit

    Murali Karicheri
     

12 Mar, 2015

1 commit

  • Export of_mdio_parse_addr() which allows parsing a given Ethernet PHY
    node MDIO address, verify it is within the allowed range, and return
    its value. This is going to be useful for the DSA code which needs to
    deal with multiple layers of MDIO buses.

    Signed-off-by: Florian Fainelli
    Acked-by: Rob Herring
    Signed-off-by: David S. Miller

    Florian Fainelli
     

10 Mar, 2015

3 commits