1. 09 9月, 2020 6 次提交
  2. 08 9月, 2020 12 次提交
  3. 07 9月, 2020 3 次提交
    • C
      enic: switch from 'pci_' to 'dma_' API · 02a20d4f
      Christophe JAILLET 提交于
      The wrappers in include/linux/pci-dma-compat.h should go away.
      
      The patch has been generated with the coccinelle script below and has been
      hand modified to replace GFP_ with a correct flag.
      It has been compile tested.
      
      When memory is allocated in 'vnic_dev_classifier()', 'vnic_dev_fw_info()',
      'vnic_dev_notify_set()' and 'vnic_dev_stats_dump()' (vnic_dev.c) GFP_ATOMIC
      must be used because its callers take a spinlock before calling these
      functions.
      
      When memory is allocated in '__enic_set_rsskey()' and 'enic_set_rsscpu()'
      GFP_ATOMIC must be used because they can be called with a spinlock.
      The call chain is:
        enic_reset                         <-- takes 'enic->enic_api_lock'
          --> enic_set_rss_nic_cfg
            --> enic_set_rsskey
              --> __enic_set_rsskey        <-- uses dma_alloc_coherent
            --> enic_set_rsscpu            <-- uses dma_alloc_coherent
      
      When memory is allocated in 'vnic_dev_init_prov2()' GFP_ATOMIC must be used
      because a spinlock is hidden in the ENIC_DEVCMD_PROXY_BY_INDEX macro, when
      this function is called in 'enic_set_port_profile()'.
      
      When memory is allocated in 'vnic_dev_alloc_desc_ring()' GFP_KERNEL can be
      used because it is only called from 5 functions ('vnic_dev_init_devcmd2()',
      'vnic_cq_alloc()', 'vnic_rq_alloc()', 'vnic_wq_alloc()' and
      'enic_wq_devcmd2_alloc()'.
      
        'vnic_dev_init_devcmd2()': already uses GFP_KERNEL and no lock is taken
           in the between.
        'enic_wq_devcmd2_alloc()': is called from ' vnic_dev_init_devcmd2()'
           which already uses GFP_KERNEL and no lock is taken in the between.
        'vnic_cq_alloc()', 'vnic_rq_alloc()', 'vnic_wq_alloc()': are called
           from 'enic_alloc_vnic_resources()'
      'enic_alloc_vnic_resources()' has only 2 call chains:
      
        1) enic_probe
            --> enic_dev_init
              --> enic_alloc_vnic_resources
      'enic_probe()' is a probe function and no lock is taken in the between
      
        2) enic_set_ringparam
            --> enic_alloc_vnic_resources
      'enic_set_ringparam()' is a .set_ringparam function (see struct
      ethtool_ops). It seems to only take a mutex and no spinlock.
      
      So all paths are safe to use GFP_KERNEL.
      
      @@
      @@
      -    PCI_DMA_BIDIRECTIONAL
      +    DMA_BIDIRECTIONAL
      
      @@
      @@
      -    PCI_DMA_TODEVICE
      +    DMA_TO_DEVICE
      
      @@
      @@
      -    PCI_DMA_FROMDEVICE
      +    DMA_FROM_DEVICE
      
      @@
      @@
      -    PCI_DMA_NONE
      +    DMA_NONE
      
      @@
      expression e1, e2, e3;
      @@
      -    pci_alloc_consistent(e1, e2, e3)
      +    dma_alloc_coherent(&e1->dev, e2, e3, GFP_)
      
      @@
      expression e1, e2, e3;
      @@
      -    pci_zalloc_consistent(e1, e2, e3)
      +    dma_alloc_coherent(&e1->dev, e2, e3, GFP_)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_free_consistent(e1, e2, e3, e4)
      +    dma_free_coherent(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_map_single(e1, e2, e3, e4)
      +    dma_map_single(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_unmap_single(e1, e2, e3, e4)
      +    dma_unmap_single(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4, e5;
      @@
      -    pci_map_page(e1, e2, e3, e4, e5)
      +    dma_map_page(&e1->dev, e2, e3, e4, e5)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_unmap_page(e1, e2, e3, e4)
      +    dma_unmap_page(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_map_sg(e1, e2, e3, e4)
      +    dma_map_sg(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_unmap_sg(e1, e2, e3, e4)
      +    dma_unmap_sg(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_dma_sync_single_for_cpu(e1, e2, e3, e4)
      +    dma_sync_single_for_cpu(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_dma_sync_single_for_device(e1, e2, e3, e4)
      +    dma_sync_single_for_device(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_dma_sync_sg_for_cpu(e1, e2, e3, e4)
      +    dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_dma_sync_sg_for_device(e1, e2, e3, e4)
      +    dma_sync_sg_for_device(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2;
      @@
      -    pci_dma_mapping_error(e1, e2)
      +    dma_mapping_error(&e1->dev, e2)
      
      @@
      expression e1, e2;
      @@
      -    pci_set_dma_mask(e1, e2)
      +    dma_set_mask(&e1->dev, e2)
      
      @@
      expression e1, e2;
      @@
      -    pci_set_consistent_dma_mask(e1, e2)
      +    dma_set_coherent_mask(&e1->dev, e2)
      Signed-off-by: NChristophe JAILLET <christophe.jaillet@wanadoo.fr>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      02a20d4f
    • L
      net: gemini: Clean up phy registration · 3e813d61
      Linus Walleij 提交于
      It's nice if the phy is online before we register the netdev
      so try to do that first.
      
      Stop trying to do "second tried" to register the phy, it
      works perfectly fine the first time.
      
      Stop remvoving the phy in uninit. Remove it when the
      driver is remove():d, symmetric to where it is added, in
      probe().
      Suggested-by: NAndrew Lunn <andrew@lunn.ch>
      Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
      Reported-by: NDavid Miller <davem@davemloft.net>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      3e813d61
    • L
      net: dsa: rtl8366rb: Support setting MTU · 5f4a8ef3
      Linus Walleij 提交于
      This implements the missing MTU setting for the RTL8366RB
      switch.
      
      Apart from supporting jumboframes, this rids us of annoying
      boot messages like this:
      realtek-smi switch: nonfatal error -95 setting MTU on port 0
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      5f4a8ef3
  4. 06 9月, 2020 8 次提交
    • F
      net: dsa: bcm_sf2: Ensure that MDIO diversion is used · 771089c2
      Florian Fainelli 提交于
      Registering our slave MDIO bus outside of the OF infrastructure is
      necessary in order to avoid creating double references of the same
      Device Tree nodes, however it is not sufficient to guarantee that the
      MDIO bus diversion is used because of_phy_connect() will still resolve
      to a valid PHY phandle and it will connect to the PHY using its parent
      MDIO bus which is still the SF2 master MDIO bus. The reason for that is
      because BCM7445 systems were already shipped with a Device Tree blob
      looking like this (irrelevant parts omitted for simplicity):
      
      	ports {
      		#address-cells = <1>;
      		#size-cells = <0>;
      
      		port@1 {
      			phy-mode = "rgmii-txid";
      			phy-handle = <&phy0>;
                              reg = <1>;
      			label = "rgmii_1";
      		};
      	...
      
      	mdio@403c0 {
      		...
      
      		phy0: ethernet-phy@0 {
      			broken-turn-around;
      			device_type = "ethernet-phy";
      			max-speed = <0x3e8>;
      			reg = <0>;
      			compatible = "brcm,bcm53125", "ethernet-phy-ieee802.3-c22";
      		};
      	};
      
      There is a hardware issue with chip revisions (Dx) that lead to the
      development of the following commits:
      
      461cd1b0 ("net: dsa: bcm_sf2: Register our slave MDIO bus")
      536fab5b ("net: dsa: bcm_sf2: Do not register slave MDIO bus with OF")
      b8c6cd1d ("net: dsa: bcm_sf2: do not use indirect reads and writes for 7445E0")
      
      There should have been an internal MDIO bus node created for the chip
      revision (Dx) that suffers from this problem, but it did not happen back
      then.
      
      Had that happen, that we should have correctly parented phy@0 (bcm53125
      below) as child node of the internal MDIO bus, but the production Device
      Tree blob that was shipped with the firmware targeted the fixed version
      of the chip, despite both the affected and corrected chips being shipped
      into production.
      
      The problem is that of_phy_connect() for port@1 will happily resolve the
      'phy-handle' from the mdio@403c0 node, which bypasses the diversion
      completely. This results in this double programming that the diversion
      refers to and aims to avoid. In order to force of_phy_connect() to fail,
      and have DSA call to dsa_slave_phy_connect(), we must deactivate
      ethernet-phy@0 from mdio@403c0, and the best way to do that is by
      removing the phandle property completely.
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      771089c2
    • F
      of: Export of_remove_property() to modules · 0f7c5317
      Florian Fainelli 提交于
      We will need to remove some OF properties in drivers/net/dsa/bcm_sf2.c
      with a subsequent commit. Export of_remove_property() to modules so we
      can keep bcm_sf2 modular and provide an empty stub for when CONFIG_OF is
      disabled to maintain the ability to compile test.
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Acked-by: NRob Herring <robh@kernel.org>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      0f7c5317
    • E
      sfc: remove efx_tx_queue_partner · 337792a2
      Edward Cree 提交于
      All users of this function are now gone.
      Signed-off-by: NEdward Cree <ecree@solarflare.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      337792a2
    • E
      sfc: rewrite efx_tx_may_pio · 8be41842
      Edward Cree 提交于
      Use efx_for_each_channel_tx_queue() rather than efx_tx_queue_partner().
      Make some related simplifications of efx_nic_tx_is_empty() to remove
       entry points that aren't used.
      Signed-off-by: NEdward Cree <ecree@solarflare.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      8be41842
    • E
      sfc: use efx_channel_tx_[old_]fill_level() in Siena/EF10 TX datapath · 0d8c1229
      Edward Cree 提交于
      Instead of open-coding the calculation with efx_tx_queue_partner(), use
       the functions that iterate over numbers of queues other than 2 with
       efx_for_each_channel_tx_queue().
      Signed-off-by: NEdward Cree <ecree@solarflare.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      0d8c1229
    • E
      sfc: use tx_queue->old_read_count in EF100 TX path · 5374d602
      Edward Cree 提交于
      As in the Siena/EF10 case, it minimises cacheline ping-pong between
       the TX and completion paths.
      Signed-off-by: NEdward Cree <ecree@solarflare.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      5374d602
    • E
      sfc: make ef100 xmit_more handling look more like ef10's · 8cb26756
      Edward Cree 提交于
      This should cause no functional change; merely make there only be one
       design of xmit_more handling to understand.  As with the EF10/Siena
       version, we set tx_queue->xmit_pending when we queue up a TX, and
       clear it when we ring the doorbell (in ef100_notify_tx_desc).
      While we're at it, make ef100_notify_tx_desc static since nothing
       outside of ef100_tx.c uses it.
      Signed-off-by: NEdward Cree <ecree@solarflare.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      8cb26756
    • E
      sfc: add and use efx_tx_send_pending in tx.c · 1c0544d2
      Edward Cree 提交于
      Instead of using efx_tx_queue_partner(), which relies on the assumption
       that tx_queues_per_channel is 2, efx_tx_send_pending() iterates over
       txqs with efx_for_each_channel_tx_queue().
      We unconditionally set tx_queue->xmit_pending (renamed from
       xmit_more_available), then condition on xmit_more for the call to
       efx_tx_send_pending(), which will clear xmit_pending.  Thus, after an
       xmit_more TX, the doorbell is un-rung and xmit_pending is true.
      Signed-off-by: NEdward Cree <ecree@solarflare.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      1c0544d2
  5. 05 9月, 2020 1 次提交
  6. 04 9月, 2020 10 次提交
    • D
      thermal: core: Fix use-after-free in thermal_zone_device_unregister() · a5f785ce
      Dmitry Osipenko 提交于
      The user-after-free bug in thermal_zone_device_unregister() is reported by
      KASAN. It happens because struct thermal_zone_device is released during of
      device_unregister() invocation, and hence the "tz" variable shouldn't be
      touched by thermal_notify_tz_delete(tz->id).
      
      Fixes: 55cdf0a2 ("thermal: core: Add notifications call in the framework")
      Signed-off-by: NDmitry Osipenko <digetx@gmail.com>
      Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
      Link: https://lore.kernel.org/r/20200817235854.26816-1-digetx@gmail.com
      a5f785ce
    • V
      thermal: qcom-spmi-temp-alarm: Don't suppress negative temp · 0ffdab6f
      Veera Vegivada 提交于
      Currently driver is suppressing the negative temperature
      readings from the vadc. Consumers of the thermal zones need
      to read the negative temperature too. Don't suppress the
      readings.
      
      Fixes: c610afaa ("thermal: Add QPNP PMIC temperature alarm driver")
      Signed-off-by: NVeera Vegivada <vvegivad@codeaurora.org>
      Signed-off-by: NGuru Das Srinagesh <gurus@codeaurora.org>
      Reviewed-by: NStephen Boyd <sboyd@kernel.org>
      Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
      Link: https://lore.kernel.org/r/944856eb819081268fab783236a916257de120e4.1596040416.git.gurus@codeaurora.org
      0ffdab6f
    • T
      thermal: ti-soc-thermal: Fix bogus thermal shutdowns for omap4430 · 30d24fab
      Tony Lindgren 提交于
      We can sometimes get bogus thermal shutdowns on omap4430 at least with
      droid4 running idle with a battery charger connected:
      
      thermal thermal_zone0: critical temperature reached (143 C), shutting down
      
      Dumping out the register values shows we can occasionally get a 0x7f value
      that is outside the TRM listed values in the ADC conversion table. And then
      we get a normal value when reading again after that. Reading the register
      multiple times does not seem help avoiding the bogus values as they stay
      until the next sample is ready.
      
      Looking at the TRM chapter "18.4.10.2.3 ADC Codes Versus Temperature", we
      should have values from 13 to 107 listed with a total of 95 values. But
      looking at the omap4430_adc_to_temp array, the values are off, and the
      end values are missing. And it seems that the 4430 ADC table is similar
      to omap3630 rather than omap4460.
      
      Let's fix the issue by using values based on the omap3630 table and just
      ignoring invalid values. Compared to the 4430 TRM, the omap3630 table has
      the missing values added while the TRM table only shows every second
      value.
      
      Note that sometimes the ADC register values within the valid table can
      also be way off for about 1 out of 10 values. But it seems that those
      just show about 25 C too low values rather than too high values. So those
      do not cause a bogus thermal shutdown.
      
      Fixes: 1a31270e ("staging: omap-thermal: add OMAP4 data structures")
      Cc: Merlijn Wajer <merlijn@wizzup.org>
      Cc: Pavel Machek <pavel@ucw.cz>
      Cc: Sebastian Reichel <sebastian.reichel@collabora.com>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      Signed-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
      Link: https://lore.kernel.org/r/20200706183338.25622-1-tony@atomide.com
      30d24fab
    • C
      smsc9420: switch from 'pci_' to 'dma_' API · 3ab1270b
      Christophe JAILLET 提交于
      The wrappers in include/linux/pci-dma-compat.h should go away.
      
      The patch has been generated with the coccinelle script below and has been
      hand modified to replace GFP_ with a correct flag.
      It has been compile tested.
      
      When memory is allocated in 'smsc9420_probe()', GFP_KERNEL can be used
      because it is a probe function and no lock is acquired.
      
      While at it, rewrite the size passed to 'dma_alloc_coherent()' the same way
      as the one passed to 'dma_free_coherent()'. This form is less verbose:
         sizeof(struct smsc9420_dma_desc) * RX_RING_SIZE +
         sizeof(struct smsc9420_dma_desc) * TX_RING_SIZE,
      vs
         sizeof(struct smsc9420_dma_desc) * (RX_RING_SIZE + TX_RING_SIZE)
      
      @@
      @@
      -    PCI_DMA_BIDIRECTIONAL
      +    DMA_BIDIRECTIONAL
      
      @@
      @@
      -    PCI_DMA_TODEVICE
      +    DMA_TO_DEVICE
      
      @@
      @@
      -    PCI_DMA_FROMDEVICE
      +    DMA_FROM_DEVICE
      
      @@
      @@
      -    PCI_DMA_NONE
      +    DMA_NONE
      
      @@
      expression e1, e2, e3;
      @@
      -    pci_alloc_consistent(e1, e2, e3)
      +    dma_alloc_coherent(&e1->dev, e2, e3, GFP_)
      
      @@
      expression e1, e2, e3;
      @@
      -    pci_zalloc_consistent(e1, e2, e3)
      +    dma_alloc_coherent(&e1->dev, e2, e3, GFP_)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_free_consistent(e1, e2, e3, e4)
      +    dma_free_coherent(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_map_single(e1, e2, e3, e4)
      +    dma_map_single(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_unmap_single(e1, e2, e3, e4)
      +    dma_unmap_single(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4, e5;
      @@
      -    pci_map_page(e1, e2, e3, e4, e5)
      +    dma_map_page(&e1->dev, e2, e3, e4, e5)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_unmap_page(e1, e2, e3, e4)
      +    dma_unmap_page(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_map_sg(e1, e2, e3, e4)
      +    dma_map_sg(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_unmap_sg(e1, e2, e3, e4)
      +    dma_unmap_sg(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_dma_sync_single_for_cpu(e1, e2, e3, e4)
      +    dma_sync_single_for_cpu(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_dma_sync_single_for_device(e1, e2, e3, e4)
      +    dma_sync_single_for_device(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_dma_sync_sg_for_cpu(e1, e2, e3, e4)
      +    dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_dma_sync_sg_for_device(e1, e2, e3, e4)
      +    dma_sync_sg_for_device(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2;
      @@
      -    pci_dma_mapping_error(e1, e2)
      +    dma_mapping_error(&e1->dev, e2)
      
      @@
      expression e1, e2;
      @@
      -    pci_set_dma_mask(e1, e2)
      +    dma_set_mask(&e1->dev, e2)
      
      @@
      expression e1, e2;
      @@
      -    pci_set_consistent_dma_mask(e1, e2)
      +    dma_set_coherent_mask(&e1->dev, e2)
      Signed-off-by: NChristophe JAILLET <christophe.jaillet@wanadoo.fr>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      3ab1270b
    • C
      epic100: switch from 'pci_' to 'dma_' API · 63692803
      Christophe JAILLET 提交于
      The wrappers in include/linux/pci-dma-compat.h should go away.
      
      The patch has been generated with the coccinelle script below and has been
      hand modified to replace GFP_ with a correct flag.
      It has been compile tested.
      
      When memory is allocated in 'epic_init_one()', GFP_KERNEL can be used
      because it is a probe function and no lock is acquired.
      
      @@
      @@
      -    PCI_DMA_BIDIRECTIONAL
      +    DMA_BIDIRECTIONAL
      
      @@
      @@
      -    PCI_DMA_TODEVICE
      +    DMA_TO_DEVICE
      
      @@
      @@
      -    PCI_DMA_FROMDEVICE
      +    DMA_FROM_DEVICE
      
      @@
      @@
      -    PCI_DMA_NONE
      +    DMA_NONE
      
      @@
      expression e1, e2, e3;
      @@
      -    pci_alloc_consistent(e1, e2, e3)
      +    dma_alloc_coherent(&e1->dev, e2, e3, GFP_)
      
      @@
      expression e1, e2, e3;
      @@
      -    pci_zalloc_consistent(e1, e2, e3)
      +    dma_alloc_coherent(&e1->dev, e2, e3, GFP_)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_free_consistent(e1, e2, e3, e4)
      +    dma_free_coherent(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_map_single(e1, e2, e3, e4)
      +    dma_map_single(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_unmap_single(e1, e2, e3, e4)
      +    dma_unmap_single(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4, e5;
      @@
      -    pci_map_page(e1, e2, e3, e4, e5)
      +    dma_map_page(&e1->dev, e2, e3, e4, e5)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_unmap_page(e1, e2, e3, e4)
      +    dma_unmap_page(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_map_sg(e1, e2, e3, e4)
      +    dma_map_sg(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_unmap_sg(e1, e2, e3, e4)
      +    dma_unmap_sg(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_dma_sync_single_for_cpu(e1, e2, e3, e4)
      +    dma_sync_single_for_cpu(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_dma_sync_single_for_device(e1, e2, e3, e4)
      +    dma_sync_single_for_device(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_dma_sync_sg_for_cpu(e1, e2, e3, e4)
      +    dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2, e3, e4;
      @@
      -    pci_dma_sync_sg_for_device(e1, e2, e3, e4)
      +    dma_sync_sg_for_device(&e1->dev, e2, e3, e4)
      
      @@
      expression e1, e2;
      @@
      -    pci_dma_mapping_error(e1, e2)
      +    dma_mapping_error(&e1->dev, e2)
      
      @@
      expression e1, e2;
      @@
      -    pci_set_dma_mask(e1, e2)
      +    dma_set_mask(&e1->dev, e2)
      
      @@
      expression e1, e2;
      @@
      -    pci_set_consistent_dma_mask(e1, e2)
      +    dma_set_coherent_mask(&e1->dev, e2)
      Signed-off-by: NChristophe JAILLET <christophe.jaillet@wanadoo.fr>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      63692803
    • D
      net: phy: dp83867: Fix various styling and space issues · 753c66ef
      Dan Murphy 提交于
      Fix spacing issues reported for misaligned switch..case and extra new
      lines.
      
      Also updated the file header to comply with networking commet style.
      Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDan Murphy <dmurphy@ti.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      753c66ef
    • F
      net: dsa: bcm_sf2: recalculate switch clock rate based on ports · 2ee3adc4
      Florian Fainelli 提交于
      Whenever a port gets enabled/disabled, recalcultate the required switch
      clock rate to make sure it always gets set to the expected rate
      targeting our switch use case. This is only done for the BCM7445 switch
      as there is no clocking profile available for BCM7278.
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2ee3adc4
    • F
      net: dsa: bcm_sf2: request and handle clocks · e9ec5c3b
      Florian Fainelli 提交于
      Fetch the corresponding clock resource and enable/disable it during
      suspend/resume if and only if we have no ports defined for Wake-on-LAN.
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Reviewed-by: NAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e9ec5c3b
    • F
      net: systemport: Manage Wake-on-LAN clock · 6328a126
      Florian Fainelli 提交于
      It is necessary to manage the Wake-on-LAN clock to turn on the
      appropriate blocks for MPD or CFP-based packet matching to work
      otherwise we will not be able to reliably match packets during suspend.
      Reported-by: NBlair Prescott <blair.prescott@broadcom.com>
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6328a126
    • F
      net: systemport: fetch and use clock resources · 31bc72d9
      Florian Fainelli 提交于
      We disable clocks shortly after probing the device to save as much power as
      possible in case the interface is never used. When bcm_sysport_open() is
      invoked, clocks are enabled, and disabled in bcm_sysport_stop().
      
      A similar scheme is applied to the suspend/resume functions.
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      31bc72d9