1. Dec 14, 2018
  2. Dec 13, 2018
  3. Dec 12, 2018
    • Douglas Anderson's avatar
      regulator: core: Clean enabling always-on regulators + their supplies · 05f224ca
      Douglas Anderson authored
      At the end of regulator_resolve_supply() we have historically turned
      on our supply in some cases.  This could be for one of two reasons:
      
      1. If resolving supplies was happening before the call to
         set_machine_constraints() we needed to predict if
         set_machine_constraints() was going to turn the regulator on and we
         needed to preemptively turn the supply on.
      2. Maybe set_machine_constraints() happened before we could resolve
         supplies (because we failed the first time to resolve) and thus we
         might need to propagate an enable that already happened up to our
         supply.
      
      Historically regulator_resolve_supply() used _regulator_is_enabled()
      to decide whether to turn on the supply.
      
      Let's change things a little bit.  Specifically:
      
      1. Let's try to enable the supply and the regulator in the same place,
         both in set_machine_constraints().  This means that we have exactly
         the same logic for enabling the supply and the regulator.
      2. Let's properly set use_count when we enable always-on or boot-on
         regulators even for those that don't have supplies.  The previous
         commit 1fc12b05 ("regulator: core: Avoid propagating to
         supplies when possible") only did this right for regulators with
         supplies.
      3. Let's make it clear that the only time we need to enable the supply
         in regulator_resolve_supply() is if the main regulator is currently
         in use.  By using use_count (like the rest of the code) to decide
         if we're going to enable our supply we keep everything consistent.
      
      Overall the new scheme should be cleaner and easier to reason about.
      In addition to fixing regulator_summary to be more correct (because of
      the more correct use_count), this change also has the effect of no
      longer using _regulator_is_enabled() in this code path.
      _regulator_is_enabled() could return an error code for some regulators
      at bootup (like RPMh) that can't read their initial state.  While one
      can argue that the design of those regulators is sub-optimal, the new
      logic sidesteps this brokenness.  This fix in particular fixes
      observed problems on Qualcomm sdm845 boards which use the
      above-mentioned RPMh regulator.  Those problems were made worse by
      commit 1fc12b05 ("regulator: core: Avoid propagating to supplies
      when possible") because now we'd think at bootup that the SD
      regulators were already enabled and we'd never try them again.
      
      Fixes: 1fc12b05
      
       ("regulator: core: Avoid propagating to supplies when possible")
      Reported-by: default avatarEvan Green <evgreen@chromium.org>
      Signed-off-by: default avatarDouglas Anderson <dianders@chromium.org>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      05f224ca
    • Mark Brown's avatar
      Merge branch 'for-linus' of... · e6202e82
      Mark Brown authored
      Merge branch 'for-linus' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator into regulator-4.21
      e6202e82
  4. Dec 11, 2018
  5. Dec 10, 2018
    • Linus Torvalds's avatar
      Linux 4.20-rc6 · 40e020c1
      Linus Torvalds authored
      40e020c1
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · d48f782e
      Linus Torvalds authored
      Pull networking fixes from David Miller:
       "A decent batch of fixes here. I'd say about half are for problems that
        have existed for a while, and half are for new regressions added in
        the 4.20 merge window.
      
         1) Fix 10G SFP phy module detection in mvpp2, from Baruch Siach.
      
         2) Revert bogus emac driver change, from Benjamin Herrenschmidt.
      
         3) Handle BPF exported data structure with pointers when building
            32-bit userland, from Daniel Borkmann.
      
         4) Memory leak fix in act_police, from Davide Caratti.
      
         5) Check RX checksum offload in RX descriptors properly in aquantia
            driver, from Dmitry Bogdanov.
      
         6) SKB unlink fix in various spots, from Edward Cree.
      
         7) ndo_dflt_fdb_dump() only works with ethernet, enforce this, from
            Eric Dumazet.
      
         8) Fix FID leak in mlxsw driver, from Ido Schimmel.
      
         9) IOTLB locking fix in vhost, from Jean-Philippe Brucker.
      
        10) Fix SKB truesize accounting in ipv4/ipv6/netfilter frag memory
            limits otherwise namespace exit can hang. From Jiri Wiesner.
      
        11) Address block parsing length fixes in x25 from Martin Schiller.
      
        12) IRQ and ring accounting fixes in bnxt_en, from Michael Chan.
      
        13) For tun interfaces, only iface delete works with rtnl ops, enforce
            this by disallowing add. From Nicolas Dichtel.
      
        14) Use after free in liquidio, from Pan Bian.
      
        15) Fix SKB use after passing to netif_receive_skb(), from Prashant
            Bhole.
      
        16) Static key accounting and other fixes in XPS from Sabrina Dubroca.
      
        17) Partially initialized flow key passed to ip6_route_output(), from
            Shmulik Ladkani.
      
        18) Fix RTNL deadlock during reset in ibmvnic driver, from Thomas
            Falcon.
      
        19) Several small TCP fixes (off-by-one on window probe abort, NULL
            deref in tail loss probe, SNMP mis-estimations) from Yuchung
            Cheng"
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (93 commits)
        net/sched: cls_flower: Reject duplicated rules also under skip_sw
        bnxt_en: Fix _bnxt_get_max_rings() for 57500 chips.
        bnxt_en: Fix NQ/CP rings accounting on the new 57500 chips.
        bnxt_en: Keep track of reserved IRQs.
        bnxt_en: Fix CNP CoS queue regression.
        net/mlx4_core: Correctly set PFC param if global pause is turned off.
        Revert "net/ibm/emac: wrong bit is used for STA control"
        neighbour: Avoid writing before skb->head in neigh_hh_output()
        ipv6: Check available headroom in ip6_xmit() even without options
        tcp: lack of available data can also cause TSO defer
        ipv6: sr: properly initialize flowi6 prior passing to ip6_route_output
        mlxsw: spectrum_switchdev: Fix VLAN device deletion via ioctl
        mlxsw: spectrum_router: Relax GRE decap matching check
        mlxsw: spectrum_switchdev: Avoid leaking FID's reference count
        mlxsw: spectrum_nve: Remove easily triggerable warnings
        ipv4: ipv6: netfilter: Adjust the frag mem limit when truesize changes
        sctp: frag_point sanity check
        tcp: fix NULL ref in tail loss probe
        tcp: Do not underestimate rwnd_limited
        net: use skb_list_del_init() to remove from RX sublists
        ...
      d48f782e
    • Linus Torvalds's avatar
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 8586ca8a
      Linus Torvalds authored
      Pull x86 fixes from Ingo Molnar:
       "Three fixes: a boot parameter re-(re-)fix, a retpoline build artifact
        fix and an LLVM workaround"
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/vdso: Drop implicit common-page-size linker flag
        x86/build: Fix compiler support check for CONFIG_RETPOLINE
        x86/boot: Clear RSDP address in boot_params for broken loaders
      8586ca8a