02 Nov, 2017

1 commit

  • Many source files in the tree are missing licensing information, which
    makes it harder for compliance tools to determine the correct license.

    By default all files without license information are under the default
    license of the kernel, which is GPL version 2.

    Update the files which contain no license information with the 'GPL-2.0'
    SPDX license identifier. The SPDX identifier is a legally binding
    shorthand, which can be used instead of the full boiler plate text.

    This patch is based on work done by Thomas Gleixner and Kate Stewart and
    Philippe Ombredanne.

    How this work was done:

    Patches were generated and checked against linux-4.14-rc6 for a subset of
    the use cases:
    - file had no licensing information it it.
    - file was a */uapi/* one with no licensing information in it,
    - file was a */uapi/* one with existing licensing information,

    Further patches will be generated in subsequent months to fix up cases
    where non-standard license headers were used, and references to license
    had to be inferred by heuristics based on keywords.

    The analysis to determine which SPDX License Identifier to be applied to
    a file was done in a spreadsheet of side by side results from of the
    output of two independent scanners (ScanCode & Windriver) producing SPDX
    tag:value files created by Philippe Ombredanne. Philippe prepared the
    base worksheet, and did an initial spot review of a few 1000 files.

    The 4.13 kernel was the starting point of the analysis with 60,537 files
    assessed. Kate Stewart did a file by file comparison of the scanner
    results in the spreadsheet to determine which SPDX license identifier(s)
    to be applied to the file. She confirmed any determination that was not
    immediately clear with lawyers working with the Linux Foundation.

    Criteria used to select files for SPDX license identifier tagging was:
    - Files considered eligible had to be source code files.
    - Make and config files were included as candidates if they contained >5
    lines of source
    - File already had some variant of a license header in it (even if
    Reviewed-by: Philippe Ombredanne
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

19 Oct, 2016

1 commit

  • Instead of having the smc91x driver relying on machine_is_*() calls,
    provide this data through platform data, ie. idp, mainstone and
    stargate.

    This way, the driver doesn't need anymore machine_is_*() calls, which
    wouldn't work anymore with a device-tree build.

    Signed-off-by: Robert Jarzmik
    Signed-off-by: David S. Miller

    Robert Jarzmik
     

29 Aug, 2016

1 commit

  • Commit b70661c70830 ("net: smc91x: use run-time configuration on all ARM
    machines") broke some ARM platforms through several mistakes. Firstly,
    the access size must correspond to the following rule:

    (a) at least one of 16-bit or 8-bit access size must be supported
    (b) 32-bit accesses are optional, and may be enabled in addition to
    the above.

    Secondly, it provides no emulation of 16-bit accesses, instead blindly
    making 16-bit accesses even when the platform specifies that only 8-bit
    is supported.

    Reorganise smc91x.h so we can make use of the existing 16-bit access
    emulation already provided - if 16-bit accesses are supported, use
    16-bit accesses directly, otherwise if 8-bit accesses are supported,
    use the provided 16-bit access emulation. If neither, BUG(). This
    exactly reflects the driver behaviour prior to the commit being fixed.

    Since the conversion incorrectly cut down the available access sizes on
    several platforms, we also need to go through every platform and fix up
    the overly-restrictive access size: Arnd assumed that if a platform can
    perform 32-bit, 16-bit and 8-bit accesses, then only a 32-bit access
    size needed to be specified - not so, all available access sizes must
    be specified.

    This likely fixes some performance regressions in doing this: if a
    platform does not support 8-bit accesses, 8-bit accesses have been
    emulated by performing a 16-bit read-modify-write access.

    Tested on the Intel Assabet/Neponset platform, which supports only 8-bit
    accesses, which was broken by the original commit.

    Fixes: b70661c70830 ("net: smc91x: use run-time configuration on all ARM machines")
    Signed-off-by: Russell King
    Tested-by: Robert Jarzmik
    Signed-off-by: David S. Miller

    Russell King
     

31 Mar, 2011

1 commit


09 Sep, 2008

1 commit


08 Sep, 2008

1 commit

  • This patch provides a mechanism for platforms to be able to supply the
    LED configuration via platform data, rather than having to hard code
    it in smc91x.h.

    Acked-by: Eric Miao
    Acked-by: Nicolas Pitre
    Acked-by: Jeff Garzik
    Signed-off-by: Russell King

    Russell King
     

13 Jul, 2008

4 commits

  • Now that the original SMC_USE_PXA_DMA specific code will always being
    built if CONFIG_ARCH_PXA is defined, so to make this part of the code
    to be PXA public, and still prevent it from being built if support of
    PXA is not selected.

    A SMC91X_USE_DMA flag is added to the platform data to allow platform
    to choose its usage of DMA. Note this flag itself is so named to be
    generic enough (assuming other platforms can also use DMA).

    It keeps backward compatibility to set the SMC91X_USE_DMA flag if
    SMC_USE_PXA_DMA is still defined.

    Signed-off-by: Eric Miao
    Acked-by: Nicolas Pitre
    Acked-by: Jeff Garzik
    Signed-off-by: Russell King

    Eric Miao
     
  • Now one can use the following code

    #define SMC_IO_SHIFT lp->io_shift

    to make SMC_IO_SHIFT a variable. This, however, will slightly increase
    the CPU overhead and have negative impact on the network performance.
    The tradeoff is, this can be specified in the smc91x platform data so
    that multiple boards support can be built in a single zImage.

    Signed-off-by: Eric Miao
    Acked-by: Nicolas Pitre
    Acked-by: Jeff Garzik
    Signed-off-by: Russell King

    Eric Miao
     
  • And also favors the usage of SMC91X_NOWAIT over the hardcoded SMC_NOWAIT
    by converting "nowait" (module parameter overridable) to platform flag.

    There are several possibilities:

    1. platform data present - preferred and use as is
    2. platform data absent - use "nowait", it can be:
    a. SMC_NOWAIT if defined
    b. default to 0 if SMC_NOWAIT isn't defined
    c. overriden by module parameter

    Signed-off-by: Eric Miao
    Acked-by: Nicolas Pitre
    Acked-by: Jeff Garzik
    Signed-off-by: Russell King

    Eric Miao
     
  • IRQ trigger type can be specified in the IRQ resource definition by
    IORESOURCE_IRQ_*, we need only one way to specify this.

    This also fixes the following small issue:

    To allow dynamic support for multiple platforms, when those relevant
    macros are not defined for one specific platform, the default case
    will be:

    - SMC_DYNAMIC_BUS_CONFIG defined
    - and SMC_IRQ_FLAGS = IRQF_TRIGGER_RISING

    While if "irq_flags" is missing when defining the smc91x_platdata,
    usually as follows:

    static struct smc91x_platdata xxxx_smc91x_data = {
    .flags = SMC91X_USE_XXBIT,
    };

    The lp->cfg.irq_flags will always be overriden by the above structure
    (due to a memcpy), thus rendering lp->cfg.irq_flags to be "0" always.
    (regardless of the default SMC_IRQ_FLAGS or IORESOURCE_IRQ_* flags)

    Fixes this by forcing to use IORESOURCE_IRQ_* flags if present, and
    make the only user of smc91x_platdata.irq_flags (renesas/migor) to
    use IORESOURCE_IRQ_*.

    Signed-off-by: Eric Miao
    Acked-by: Nicolas Pitre
    Acked-by: Jeff Garzik
    Signed-off-by: Russell King

    Eric Miao
     

17 Mar, 2008

1 commit

  • This patch introduces struct smc91x_platdata and modifies the driver so
    bus width is checked during run time using SMC_nBIT() instead of
    SMC_CAN_USE_nBIT.

    V2 keeps static configuration lean using SMC_DYNAMIC_BUS_CONFIG.

    Signed-off-by: Magnus Damm
    Acked-by: Nicolas Pitre
    Signed-off-by: Jeff Garzik

    Magnus Damm