1. 01 Mar, 2023 1 commit
    • Linus Torvalds's avatar
      Merge tag 'docs-6.3-2' of git://git.lwn.net/linux · b1f1382a
      Linus Torvalds authored
      Pull Documentation stragglers from Jonathan Corbet:
       "A handful of documentation patches that were ready before the merge
        window, but which I didn't get merged for the first round:
      
         - A recommendation from Thorsten (also akpm) on use of Link tags to
           point out problem reports
      
         - Some front-page formatting tweaks
      
         - Another Spanish translation
      
         - One typo(ish) fix"
      
      * tag 'docs-6.3-2' of git://git.lwn.net/linux:
        docs: recommend using Link: whenever using Reported-by:
        Documentation: front page: use recommended heading adornments
        docs/sp_SP: Add process programming-language translation
        docs: locking: refer to the actual existing config names
      b1f1382a
  2. 28 Feb, 2023 7 commits
    • Linus Torvalds's avatar
      Merge tag 'pwm/for-6.3-rc1' of... · e492250d
      Linus Torvalds authored
      Merge tag 'pwm/for-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm
      
      Pull pwm updates from Thierry Reding:
       "This rather small set of changes includes some minor fixes and
        improvements.
      
        The AB8500 driver gained support for reading the initial hardware
        state and the Synopsys DesignWare driver received some work to prepare
        for device tree and platform support"
      
      * tag 'pwm/for-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm:
        pwm: dwc: Use devm_pwmchip_add()
        pwm: dwc: Move memory allocation to own function
        pwm: dwc: Change &pci->dev to dev in probe
        dt-bindings: pwm: Document Synopsys DesignWare snps,pwm-dw-apb-timers-pwm2
        pwm: iqs620a: Replace one remaining instance of regmap_update_bits()
        pwm: ab8500: Implement .get_state()
        pwm: ab8500: Fix calculation of duty and period
        pwm: lp3943: Drop unused i2c include
        dt-bindings: pwm: mediatek: Convert pwm-mediatek to DT schema
        pwm: stm32-lp: fix the check on arr and cmp registers update
        pwm: Move pwm_capture() dummy to restore order
        pwm: sifive: Always let the first pwm_apply_state succeed
      e492250d
    • Linus Torvalds's avatar
      Merge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 · b07ce43d
      Linus Torvalds authored
      Pull ext4 updates from Ted Ts'o:
       "Improve performance for ext4 by allowing multiple process to perform
        direct I/O writes to preallocated blocks by using a shared inode lock
        instead of taking an exclusive lock.
      
        In addition, multiple bug fixes and cleanups"
      
      * tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
        ext4: fix incorrect options show of original mount_opt and extend mount_opt2
        ext4: Fix possible corruption when moving a directory
        ext4: init error handle resource before init group descriptors
        ext4: fix task hung in ext4_xattr_delete_inode
        jbd2: fix data missing when reusing bh which is ready to be checkpointed
        ext4: update s_journal_inum if it changes after journal replay
        ext4: fail ext4_iget if special inode unallocated
        ext4: fix function prototype mismatch for ext4_feat_ktype
        ext4: remove unnecessary variable initialization
        ext4: fix inode tree inconsistency caused by ENOMEM
        ext4: refuse to create ea block when umounted
        ext4: optimize ea_inode block expansion
        ext4: remove dead code in updating backup sb
        ext4: dio take shared inode lock when overwriting preallocated blocks
        ext4: don't show commit interval if it is zero
        ext4: use ext4_fc_tl_mem in fast-commit replay path
        ext4: improve xattr consistency checking and error reporting
      b07ce43d
    • Thomas Weißschuh's avatar
      vc_screen: don't clobber return value in vcs_read · ae3419fb
      Thomas Weißschuh authored
      Commit 226fae12 ("vc_screen: move load of struct vc_data pointer in
      vcs_read() to avoid UAF") moved the call to vcs_vc() into the loop.
      
      While doing this it also moved the unconditional assignment of
      
      	ret = -ENXIO;
      
      This unconditional assignment was valid outside the loop but within it
      it clobbers the actual value of ret.
      
      To avoid this only assign "ret = -ENXIO" when actually needed.
      
      [ Also, the 'goto unlock_out" needs to be just a "break", so that it
        does the right thing when it exits on later iterations when partial
        success has happened - Linus ]
      Reported-by: default avatarStorm Dragon <stormdragon2976@gmail.com>
      Link: https://lore.kernel.org/lkml/Y%2FKS6vdql2pIsCiI@hotmail.com/
      Fixes: 226fae12 ("vc_screen: move load of struct vc_data pointer in vcs_read() to avoid UAF")
      Signed-off-by: default avatarThomas Weißschuh <linux@weissschuh.net>
      Link: https://lore.kernel.org/lkml/64981d94-d00c-4b31-9063-43ad0a384bde@t-8ch.de/Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      ae3419fb
    • Mateusz Guzik's avatar
      vfs: avoid duplicating creds in faccessat if possible · 981ee95c
      Mateusz Guzik authored
      access(2) remains commonly used, for example on exec:
      access("/etc/ld.so.preload", R_OK)
      
      or when running gcc: strace -c gcc empty.c
      
        % time     seconds  usecs/call     calls    errors syscall
        ------ ----------- ----------- --------- --------- ----------------
          0.00    0.000000           0        42        26 access
      
      It falls down to do_faccessat without the AT_EACCESS flag, which in turn
      results in allocation of new creds in order to modify fsuid/fsgid and
      caps.  This is a very expensive process single-threaded and most notably
      multi-threaded, with numerous structures getting refed and unrefed on
      imminent new cred destruction.
      
      Turns out for typical consumers the resulting creds would be identical
      and this can be checked upfront, avoiding the hard work.
      
      An access benchmark plugged into will-it-scale running on Cascade Lake
      shows:
      
          test     proc     before       after
          access1     1    1310582     2908735    (+121%) # distinct files
          access1    24    4716491    63822173   (+1353%) # distinct files
          access2    24    2378041     5370335    (+125%) # same file
      
      The above benchmarks are not integrated into will-it-scale, but can be
      found in a pull request:
      
        https://github.com/antonblanchard/will-it-scale/pull/36/filesSigned-off-by: default avatarMateusz Guzik <mjguzik@gmail.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      981ee95c
    • Mateusz Guzik's avatar
      capability: add cap_isidentical · a4eecbae
      Mateusz Guzik authored
      Signed-off-by: default avatarMateusz Guzik <mjguzik@gmail.com>
      Reviewed-by: default avatarSerge Hallyn <serge@hallyn.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      a4eecbae
    • Linus Torvalds's avatar
      Merge tag 'f2fs-for-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs · 10383068
      Linus Torvalds authored
      Pull f2fs updates from Jaegeuk Kim:
       "In this round, we've got a huge number of patches that improve code
        readability along with minor bug fixes, while we've mainly fixed some
        critical issues in recently-added per-block age-based extent_cache,
        atomic write support, and some folio cases.
      
        Enhancements:
      
         - add sysfs nodes to set last_age_weight and manage
           discard_io_aware_gran
      
         - show ipu policy in debugfs
      
         - reduce stack memory cost by using bitfield in struct f2fs_io_info
      
         - introduce trace_f2fs_replace_atomic_write_block
      
         - enhance iostat support and adds flush commands
      
        Bug fixes:
      
         - revert "f2fs: truncate blocks in batch in __complete_revoke_list()"
      
         - fix kernel crash on the atomic write abort flow
      
         - call clear_page_private_reference in .{release,invalid}_folio
      
         - support .migrate_folio for compressed inode
      
         - fix cgroup writeback accounting with fs-layer encryption
      
         - retry to update the inode page given data corruption
      
         - fix kernel crash due to NULL io->bio
      
         - fix some bugs in per-block age-based extent_cache:
             - wrong calculation of block age
             - update age extent in f2fs_do_zero_range()
             - update age extent correctly during truncation"
      
      * tag 'f2fs-for-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs: (81 commits)
        f2fs: drop unnecessary arg for f2fs_ioc_*()
        f2fs: Revert "f2fs: truncate blocks in batch in __complete_revoke_list()"
        f2fs: synchronize atomic write aborts
        f2fs: fix wrong segment count
        f2fs: replace si->sbi w/ sbi in stat_show()
        f2fs: export ipu policy in debugfs
        f2fs: make kobj_type structures constant
        f2fs: fix to do sanity check on extent cache correctly
        f2fs: add missing description for ipu_policy node
        f2fs: fix to set ipu policy
        f2fs: fix typos in comments
        f2fs: fix kernel crash due to null io->bio
        f2fs: use iostat_lat_type directly as a parameter in the iostat_update_and_unbind_ctx()
        f2fs: add sysfs nodes to set last_age_weight
        f2fs: fix f2fs_show_options to show nogc_merge mount option
        f2fs: fix cgroup writeback accounting with fs-layer encryption
        f2fs: fix wrong calculation of block age
        f2fs: fix to update age extent in f2fs_do_zero_range()
        f2fs: fix to update age extent correctly during truncation
        f2fs: fix to avoid potential memory corruption in __update_iostat_latency()
        ...
      10383068
    • George Kennedy's avatar
      vc_screen: modify vcs_size() handling in vcs_read() · 46d733d0
      George Kennedy authored
      Restore the vcs_size() handling in vcs_read() to what
      it had been in previous version.
      
      Fixes: 226fae12 ("vc_screen: move load of struct vc_data pointer in vcs_read() to avoid UAF")
      Suggested-by: default avatarJiri Slaby <jirislaby@kernel.org>
      Signed-off-by: default avatarGeorge Kennedy <george.kennedy@oracle.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      46d733d0
  3. 27 Feb, 2023 20 commits
  4. 26 Feb, 2023 12 commits
    • Linus Torvalds's avatar
      Merge tag 'rproc-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux · f3a2439f
      Linus Torvalds authored
      Pull remoteproc updates from Bjorn Andersson:
      
       - Support for PRU clients to acquire a control reference to the PRU
         instances is introduced, and the PRU now allows specifying
         firmware-name in Devicetree. sysfs is requested to be read-only when
         the remoteproc instance is consumed by another kernel driver
      
       - Support for the C7xv DSP on AM62A SoC is introduced
      
       - The Devicetree binding for the Qualcomm PAS devices are split up in
         multiple files, to better account for the differences in resources
         between them. A number of missing Devicetree bindings are added, and
         the Qualcomm WCNSS binding is converted to YAML
      
       - A few cleanups are introduced for the Mediatek SCP driver. And a
         sanity check of the firmware image is introduced in the Mediatek
         driver
      
       - For Qualcomm SC7280 ADSP support is added, MSM8953 gains ADSP and
         modem support, SM6115 and SM8550 gains ADSP, CDSP and modem support,
         and support for pronto v3 support (used on e.g. MSM8953) is added
      
       - The Qualcomm modem remoteproc driver is modified to use a no-map
         reserved-memory region for it's authentication metadata, in order to
         avoid fatal security violations caused by accesses from Linux during
         the authentication process
      
       - Support for separate loading of a Devicetree blob is added to the PAS
         driver, and support for the PAS driver to carve out DSM memory for
         the modem is added as well
      
       - The Qualcomm ADSP remoteproc driver gains support for mapping memory
         into specific range using the IOMMU. The sysmon driver is
         transitioned to strlcpy()
      
      * tag 'rproc-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux: (69 commits)
        dt-bindings: mailbox: qcom,apcs-kpss-global: drop mbox-names from example
        dt-bindings: remoteproc: qcom,glink-edge: correct label description
        dt-bindings: remoteproc: qcom,glink-rpm-edge: convert to DT schema
        dt-bindings: remoteproc: qcom,sm8550-pas: correct power domains
        remoteproc: qcom_q6v5_pas: enable sm8550 adsp & cdsp autoboot
        dt-bindings: remoteproc: qcom: Add sm6115 pas yaml file
        remoteproc: qcom: pas: Add sm6115 remoteprocs
        remoteproc: qcom: pas: Adjust the phys addr wrt the mem region
        remoteproc: qcom: fix sparse warnings
        remoteproc: qcom: replace kstrdup with kstrndup
        remoteproc: mediatek: Check the SCP image format
        remoteproc: qcom_q6v5_mss: Use a carveout to authenticate modem headers
        Revert "remoteproc: qcom_q6v5_mss: map/unmap metadata region before/after use"
        dt-bindings: remoteproc: qcom,sc7280-mss-pil: Update memory-region
        dt-bindings: remoteproc: qcom,sc7180-mss-pil: Update memory-region
        dt-bindings: remoteproc: qcom,msm8996-mss-pil: Update memory region
        dt-bindings: remoteproc: qcom,q6v5: Move MSM8996 to schema
        remoteproc: qcom_q6v5_pas: add sm8550 adsp, cdsp & mpss compatible & data
        remoteproc: qcom_q6v5_pas: add support for assigning memory to firmware
        remoteproc: qcom_q6v5_pas: add support for dtb co-firmware loading
        ...
      f3a2439f
    • Linus Torvalds's avatar
      Merge tag 'rpmsg-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux · cc38a46d
      Linus Torvalds authored
      Pull rpmsg updates from Bjorn Andersson:
      
       - rpmsg ctrl and char driver locking is ensure ordering in cases where
         the communication link is being torn down in parallel with calls to
         open(2) or poll(2)
      
       - The glink driver is refactored, to move rpm/smem-specifics out of the
         common logic and better suite further improvements, such as
         transports without a mailbox controller. The handling of remoteproc
         shutdown is improved, to fail clients immediately instead of having
         them to wait for timeouts. A driver_override memory leak is corrected
         and a few spelling improvements are introduced
      
       - glink_ssr is transitioned off strlcpy() and "gpr" is added as a valid
         child node of the glink-edge DT binding
      
      * tag 'rpmsg-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux:
        rpmsg: glink: Release driver_override
        rpmsg: glink: Avoid infinite loop on intent for missing channel
        rpmsg: glink: Fix GLINK command prefix
        rpmsg: glink: Fix spelling of peek
        rpmsg: glink: Cancel pending intent requests at removal
        rpmsg: glink: Fail qcom_glink_tx() once remove has been initiated
        rpmsg: glink: Move irq and mbox handling to transports
        rpmsg: glink: rpm: Wrap driver context
        rpmsg: glink: smem: Wrap driver context
        rpmsg: glink: Extract tx kick operation
        rpmsg: glink: Include types in qcom_glink_native.h
        rpmsg: ctrl: Add lock to rpmsg_ctrldev_remove
        rpmsg: char: Add lock to avoid race when rpmsg device is released
        rpmsg: move from strlcpy with unused retval to strscpy
        dt-bindings: remoteproc: qcom,glink-edge: add GPR node
      cc38a46d
    • Linus Torvalds's avatar
      Merge tag 'hwlock-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux · 9b0b0dd8
      Linus Torvalds authored
      Pull hwspinlock updates from Bjorn Andersson:
       "This updates the sun6i DT binding to allow (and require) #hwlock-cells
        and makes use of device_match_of_node() to slight clean up the
        condition in of_hwspin_lock_get_id()"
      
      * tag 'hwlock-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux:
        dt-bindings: hwlock: sun6i: Add #hwlock-cells to example
        dt-bindings: hwlock: sun6i: Add missing #hwlock-cells
        hwspinlock: Use device_match_of_node()
      9b0b0dd8
    • Linus Torvalds's avatar
      Merge tag 'kbuild-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild · 498a1cf9
      Linus Torvalds authored
      Pull Kbuild updates from Masahiro Yamada:
      
       - Change V=1 option to print both short log and full command log
      
       - Allow V=1 and V=2 to be combined as V=12
      
       - Make W=1 detect wrong .gitignore files
      
       - Tree-wide cleanups for unused command line arguments passed to Clang
      
       - Stop using -Qunused-arguments with Clang
      
       - Make scripts/setlocalversion handle only correct release tags instead
         of any arbitrary annotated tag
      
       - Create Debian and RPM source packages without cleaning the source
         tree
      
       - Various cleanups for packaging
      
      * tag 'kbuild-v6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: (74 commits)
        kbuild: rpm-pkg: remove unneeded KERNELRELEASE from modules/headers_install
        docs: kbuild: remove description of KBUILD_LDS_MODULE
        .gitattributes: use 'dts' diff driver for *.dtso files
        kbuild: deb-pkg: improve the usability of source package
        kbuild: deb-pkg: fix binary-arch and clean in debian/rules
        kbuild: tar-pkg: use tar rules in scripts/Makefile.package
        kbuild: make perf-tar*-src-pkg work without relying on git
        kbuild: deb-pkg: switch over to source format 3.0 (quilt)
        kbuild: deb-pkg: make .orig tarball a hard link if possible
        kbuild: deb-pkg: hide KDEB_SOURCENAME from Makefile
        kbuild: srcrpm-pkg: create source package without cleaning
        kbuild: rpm-pkg: build binary packages from source rpm
        kbuild: deb-pkg: create source package without cleaning
        kbuild: add a tool to list files ignored by git
        Documentation/llvm: add Chimera Linux, Google and Meta datacenters
        setlocalversion: use only the correct release tag for git-describe
        setlocalversion: clean up the construction of version output
        .gitignore: ignore *.cover and *.mbx
        kbuild: remove --include-dir MAKEFLAG from top Makefile
        kbuild: fix trivial typo in comment
        ...
      498a1cf9
    • Linus Torvalds's avatar
      Merge tag 'media/v6.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media · 4b8c673b
      Linus Torvalds authored
      Pull media updates from Mauro Carvalho Chehab:
      
       - Removal of several VB1-only deprecated drivers: cpia2, fsl-viu, meye,
         stkwebcam, tm6000, vpfe_capture and zr364xx
      
       - saa7146 recovered from staging/deprecated. We opted to give ti a
         chance, and, instead of deprecating it, the intention is to write
         patches migrating it from VB1 to VB2.
      
       - av7110 returned from staging/deprecated/ to staging/ as we're not
         planning on dropping it any time soon
      
       - media controller API has gained experimental support for G_ROUTING
         and streams API. No drivers use it right now. We're planning to add
         one after -rc1, giving some time to experience the API and eventually
         have changes during the next development cycle
      
       - New sensor drivers: imx296, imx415, ov8858
      
       - Atomisp had lots of changes, specially on its sensor's interface,
         making atomisp sensor drivers closer to normal sensor drivers
      
       - media controller kAPI has gained some helpers to traverse pipelines
      
       - uvcvideo now better support power line control
      
       - lots of bug fixes, cleanups and driver improvements
      
      * tag 'media/v6.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (296 commits)
        media: imx-mipi-csis: Check csis_fmt validity before use
        media: v4l2-subdev.c: clear stream field
        media: v4l2-ctrls-api.c: move ctrl->is_new = 1 to the correct line
        media: Revert "media: saa7146: deprecate hexium_gemini/orion, mxb and ttpci"
        media: Revert "media: av7110: move to staging/media/deprecated/saa7146"
        media: imx-pxp: convert to regmap
        media: imx-pxp: Use non-threaded IRQ
        media: imx-pxp: Introduce pxp_read() and pxp_write() wrappers
        media: imx-pxp: Implement frame size enumeration
        media: imx-pxp: Pass pixel format value to find_format()
        media: imx-pxp: Add media controller support
        media: imx-pxp: Don't set bus_info manually in .querycap()
        media: imx-pxp: Sort headers alphabetically
        media: imx-pxp: add support for i.MX7D
        media: imx-pxp: make data_path_ctrl0 platform dependent
        media: imx-pxp: disable LUT block
        media: imx-pxp: explicitly disable unused blocks
        media: imx-pxp: extract helper function to setup data path
        media: imx-pxp: detect PXP version
        media: dt-bindings: media: fsl-pxp: convert to yaml
        ...
      4b8c673b
    • Linus Torvalds's avatar
      Documentation: simplify and clarify DCO contribution example language · d4563201
      Linus Torvalds authored
      Long long ago, in a more innocent time, Greg wrote the clarification for
      how the DCO should work and that you couldn't make anonymous
      contributions, because the sign-off needed to be something we could
      check back with.
      
      It was 2006, and nobody reacted to the wording, the whole Facebook 'real
      name' controversy was a decade in the future, and nobody even thought
      about it.  And despite the language, we've always accepted nicknames and
      that language was never meant to be any kind of exclusionary wording.
      
      In fact, even when it became a discussion in other adjacent projects,
      apparently nobody even thought to just clarify the language in the
      kernel docs, and instead we had projects like the CNCF that had long
      discussions about it, and wrote their own clarifications [1] of it.
      
      Just simplify the wording to the point where it shouldn't be causing
      unnecessary angst and pain, or scare away people who go by preferred
      naming.
      
      Link: https://github.com/cncf/foundation/blob/659fd32c86dc/dco-guidelines.md [1]
      Fixes: af45f32d ("We can not allow anonymous contributions to the kernel")
      Acked-by: default avatarGreg KH <gregkh@linuxfoundation.org>
      Acked-by: default avatarMichael Dolan <mdolan@linuxfoundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      d4563201
    • Russell King (Oracle)'s avatar
      net: dsa: ocelot_ext: remove unnecessary phylink.h include · 724337be
      Russell King (Oracle) authored
      During review of ocelot_ext, it created a private phylink instance
      that wasn't necessary. This was removed for subsequent postings,
      but the include file seems to have been left behind. Remove it.
      Signed-off-by: default avatarRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
      Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      724337be
    • David S. Miller's avatar
      Merge branch 'net-ocelot-switch-regressions' · 5f79f12c
      David S. Miller authored
      Vladimir Oltean says:
      
      ====================
      Regressions in Ocelot switch drivers
      
      These are 3 patches which resolve a regression in the Seville driver,
      one in the Felix driver and a generic one which affects any kernel
      compiled with 2 Kconfig options enabled. All of them have in common my
      lack of attention during review/testing. The patches touch the DSA, MFD
      and MDIO drivers for Ocelot. I think it would be preferable if all
      patches went through netdev (with Lee's Ack).
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5f79f12c
    • Vladimir Oltean's avatar
      net: mscc: ocelot: fix duplicate driver name error · ef1a99c6
      Vladimir Oltean authored
      When compiling a kernel which has both CONFIG_NET_DSA_MSCC_OCELOT_EXT
      and CONFIG_MSCC_OCELOT_SWITCH enabled, the following error message will
      be printed:
      
      [    5.266588] Error: Driver 'ocelot-switch' is already registered, aborting...
      
      Rename the ocelot_ext.c driver to "ocelot-ext-switch" to avoid the name
      duplication, and update the mfd_cell entry for its resources.
      
      Fixes: 3d7316ac ("net: dsa: ocelot: add external ocelot switch control")
      Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ef1a99c6
    • Vladimir Oltean's avatar
      net: dsa: felix: fix internal MDIO controller resource length · 940af261
      Vladimir Oltean authored
      The blamed commit did not properly convert the resource start/end format
      into the DEFINE_RES_MEM_NAMED() start/length format, resulting in a
      resource for vsc9959_imdio_res which is much longer than expected:
      
      $ cat /proc/iomem
      1f8000000-1f815ffff : pcie@1f0000000
        1f8140000-1f815ffff : 0000:00:00.5
          1f8148030-1f815006f : imdio
      
      vs (correct)
      
      $ cat /proc/iomem
      1f8000000-1f815ffff : pcie@1f0000000
        1f8140000-1f815ffff : 0000:00:00.5
          1f8148030-1f814803f : imdio
      
      Luckily it's not big enough to exceed the size of the parent resource
      (pci_resource_end(pdev, VSC9959_IMDIO_PCI_BAR)), and it doesn't overlap
      with anything else that the Linux driver uses currently, so the larger
      than expected size isn't a practical problem that I can see. Although it
      is clearly wrong in the /proc/iomem output.
      
      Fixes: 044d447a ("net: dsa: felix: use DEFINE_RES_MEM_NAMED for resources")
      Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      940af261
    • Vladimir Oltean's avatar
      net: dsa: seville: ignore mscc-miim read errors from Lynx PCS · 0322ef49
      Vladimir Oltean authored
      During the refactoring in the commit below, vsc9953_mdio_read() was
      replaced with mscc_miim_read(), which has one extra step: it checks for
      the MSCC_MIIM_DATA_ERROR bits before returning the result.
      
      On T1040RDB, there are 8 QSGMII PCSes belonging to the switch, and they
      are organized in 2 groups. First group responds to MDIO addresses 4-7
      because QSGMIIACR1[MDEV_PORT] is 1, and the second group responds to
      MDIO addresses 8-11 because QSGMIIBCR1[MDEV_PORT] is 2. I have double
      checked that these values are correctly set in the SERDES, as well as
      PCCR1[QSGMA_CFG] and PCCR1[QSGMB_CFG] are both 0b01.
      
      mscc_miim_read: phyad 8 reg 0x1 MIIM_DATA 0x2d
      mscc_miim_read: phyad 8 reg 0x5 MIIM_DATA 0x5801
      mscc_miim_read: phyad 8 reg 0x1 MIIM_DATA 0x2d
      mscc_miim_read: phyad 8 reg 0x5 MIIM_DATA 0x5801
      mscc_miim_read: phyad 9 reg 0x1 MIIM_DATA 0x2d
      mscc_miim_read: phyad 9 reg 0x5 MIIM_DATA 0x5801
      mscc_miim_read: phyad 9 reg 0x1 MIIM_DATA 0x2d
      mscc_miim_read: phyad 9 reg 0x5 MIIM_DATA 0x5801
      mscc_miim_read: phyad 10 reg 0x1 MIIM_DATA 0x2d
      mscc_miim_read: phyad 10 reg 0x5 MIIM_DATA 0x5801
      mscc_miim_read: phyad 10 reg 0x1 MIIM_DATA 0x2d
      mscc_miim_read: phyad 10 reg 0x5 MIIM_DATA 0x5801
      mscc_miim_read: phyad 11 reg 0x1 MIIM_DATA 0x2d
      mscc_miim_read: phyad 11 reg 0x5 MIIM_DATA 0x5801
      mscc_miim_read: phyad 11 reg 0x1 MIIM_DATA 0x2d
      mscc_miim_read: phyad 11 reg 0x5 MIIM_DATA 0x5801
      mscc_miim_read: phyad 4 reg 0x1 MIIM_DATA 0x3002d, ERROR
      mscc_miim_read: phyad 4 reg 0x5 MIIM_DATA 0x3da01, ERROR
      mscc_miim_read: phyad 5 reg 0x1 MIIM_DATA 0x3002d, ERROR
      mscc_miim_read: phyad 5 reg 0x5 MIIM_DATA 0x35801, ERROR
      mscc_miim_read: phyad 5 reg 0x1 MIIM_DATA 0x3002d, ERROR
      mscc_miim_read: phyad 5 reg 0x5 MIIM_DATA 0x35801, ERROR
      mscc_miim_read: phyad 6 reg 0x1 MIIM_DATA 0x3002d, ERROR
      mscc_miim_read: phyad 6 reg 0x5 MIIM_DATA 0x35801, ERROR
      mscc_miim_read: phyad 6 reg 0x1 MIIM_DATA 0x3002d, ERROR
      mscc_miim_read: phyad 6 reg 0x5 MIIM_DATA 0x35801, ERROR
      mscc_miim_read: phyad 7 reg 0x1 MIIM_DATA 0x3002d, ERROR
      mscc_miim_read: phyad 7 reg 0x5 MIIM_DATA 0x35801, ERROR
      mscc_miim_read: phyad 7 reg 0x1 MIIM_DATA 0x3002d, ERROR
      mscc_miim_read: phyad 7 reg 0x5 MIIM_DATA 0x35801, ERROR
      
      As can be seen, the data in MIIM_DATA is still valid despite having the
      MSCC_MIIM_DATA_ERROR bits set. The driver as introduced in commit
      84705fc1 ("net: dsa: felix: introduce support for Seville VSC9953
      switch") was ignoring these bits, perhaps deliberately (although
      unbeknownst to me).
      
      This is an old IP and the hardware team cannot seem to be able to help
      me track down a plausible reason for these failures. I'll keep
      investigating, but in the meantime, this is a direct regression which
      must be restored to a working state.
      
      The only thing I can do is keep ignoring the errors as before.
      
      Fixes: b9965845 ("net: dsa: ocelot: felix: utilize shared mscc-miim driver for indirect MDIO access")
      Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0322ef49
    • David S. Miller's avatar
      Merge branch 'net-sched-action-bind' · 3fa10563
      David S. Miller authored
      Pedro Tammela says:
      
      ====================
      net/sched: fix action bind logic
      
      Some actions are not handling the case where an action can be created and bound to a
      filter independently. These actions are checking for parameters only passed
      in the netlink message for create/change/replace, which then errors out
      for valid uses like:
      tc filter ... action pedit index 1
      
      In the iproute2 side, we saw a couple of actions with their parsers
      broken when passing "index 1" as the only action argument, while the kernel
      side accepted it correctly. We fixed those as well.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3fa10563