th if
the DMA mask set failed, which is silly. This fixes it to set the
coherent DMA mask only if dma_set_mask() succeeded, and to error out
if either fails.
Signed-off-by: Russell King
---
drivers/net/ethernet/intel/igb/igb_main.c | 18 ++
1 files changed, 6 insertions(+), 12 de
th if
the DMA mask set failed, which is silly. This fixes it to set the
coherent DMA mask only if dma_set_mask() succeeded, and to error out
if either fails.
Signed-off-by: Russell King
---
drivers/net/ethernet/intel/e1000e/netdev.c | 18 ++
1 files changed, 6 insertions(+), 12 de
s it to set the
coherent DMA mask only if dma_set_mask() succeeded, and to error out
if either fails.
Signed-off-by: Russell King
---
drivers/net/ethernet/intel/ixgb/ixgb_main.c | 16 +---
1 files changed, 5 insertions(+), 11 deletions(-)
diff --git a/drivers/net/ethernet/intel/ix
This means we only try and set the coherent DMA mask if we failed to
set a 32-bit DMA mask, and only if both fail do we fail the driver.
Adjust this so that if either setting fails, we fail the driver - and
thereby end up properly setting both the DMA mask and the coherent
DMA mask in the fallbac
allback path if
the DMA mask set failed, which is silly. This fixes it to set the
coherent DMA mask only if dma_set_mask() succeeded, and to error out
if either fails.
Signed-off-by: Russell King
---
drivers/net/ethernet/intel/igbvf/netdev.c | 18 ++
1 files changed, 6 insertions
Provide a helper to set both the DMA and coherent DMA masks to the
same value - this avoids duplicated code in a number of drivers,
sometimes with buggy error handling, and also allows us identify
which drivers do things differently.
Signed-off-by: Russell King
---
Documentation/DMA-API
DMA mask set failed, which is silly. This fixes it to set the
coherent DMA mask only if dma_set_mask() succeeded, and to error out
if either fails.
Signed-off-by: Russell King
---
drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 15 +--
1 files changed, 5 insertions(+), 1
set failed, which is silly. This fixes it to set the
coherent DMA mask only if dma_set_mask() succeeded, and to error out
if either fails.
Signed-off-by: Russell King
---
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 15 +--
1 files changed, 5 insertions(+), 10 deletions(-)
diff
making use of of these variable to calculate the dma bounce limit
using dma_mask.
Now since we have a architecture override possibility for DMAable
maximum pfns, lets make meaning of max*pfns as maximum pnfs on ARM
as well.
Signed-off-by: Santosh Shilimkar
Signed-off-by: Russell King
---
arch
ake use of
dma_max_pfn() which is expected to return the DMAable maximum pfn
value across architectures.
Signed-off-by: Santosh Shilimkar
Signed-off-by: Russell King
---
drivers/mmc/card/queue.c |3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/mmc/card/queue.c b/d
ake use of
dma_max_pfn() which is expected to return the DMAable maximum pfn
value across architectures.
Signed-off-by: Santosh Shilimkar
Signed-off-by: Russell King
---
drivers/scsi/scsi_lib.c |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/scsi/scsi_lib.c b/dr
DMA bitmask of bits to a block PFN number. In all the generic cases,
it is just "dev->dma_mask >> PAGE_SHIFT" and hence default behavior
is maintained as is.
Subsequent patches will make use of the helper. No functional change.
Signed-off-by: Santosh Shilimkar
Signed-o
ions about dma_mask wherever it could
be miss-interpreted.
Signed-off-by: Santosh Shilimkar
Signed-off-by: Russell King
---
block/blk-settings.c |8
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/block/blk-settings.c b/block/blk-settings.c
index c50ecf0..026c151 100644
-
This driver doesn't need to directly access DMA masks if it uses the
platform_device_register_full() API rather than
platform_device_register_simple() - the former function can initialize
the DMA mask appropriately.
Signed-off-by: Russell King
---
drivers/firmware/google/gsmi.c |
and using the platform_device_register_full()
avoids some of this explicit initialization.
Convert the driver to use platform_device_register_full(), and as it
makes use of coherent DMA, also call dma_set_coherent_mask() to ensure
that the architecture gets to check the mask.
Signed-off-by:
vert the DMA mask to a PFN using
the device specific dma_to_pfn() macro. This is the reverse of the
pfn_to_dma() macro which is used to get the DMA address for the device.
This gives us a PFN mask, which we can then check against the PFN
limit of the DMA zone.
Signed-off-by: Russell King
---
register_platform_device_full() can setup the DMA mask provided the
appropriate member is set in struct platform_device_info. So lets
make that be the case. This avoids a direct reference to the DMA
masks by this driver.
Signed-off-by: Russell King
---
drivers/dma/edma.c |6 ++
1
: Russell King
---
drivers/usb/musb/am35x.c| 50 ++
drivers/usb/musb/da8xx.c| 49 ++---
drivers/usb/musb/davinci.c | 48 ++--
drivers/usb/musb/tusb6010.c | 49
Signed-off-by: Russell King
---
drivers/crypto/ixp4xx_crypto.c | 13 -
1 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/drivers/crypto/ixp4xx_crypto.c b/drivers/crypto/ixp4xx_crypto.c
index 8306185..214357e 100644
--- a/drivers/crypto/ixp4xx_crypto.c
+++ b/drivers
: Russell King
---
drivers/ata/pata_ixp4xx_cf.c |5 -
drivers/gpu/drm/exynos/exynos_drm_drv.c |6 +-
drivers/gpu/drm/omapdrm/omap_dmm_tiler.c |5 +++--
3 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/drivers/ata/pata_ixp4xx_cf.c b/drivers/ata
AMBA Primecell devices always treat streaming and coherent DMA exactly
the same, so there's no point in having the masks separated.
Signed-off-by: Russell King
---
drivers/amba/bus.c |6 +-
drivers/of/platform.c|3 ---
include/linux/amba/bus.h |2 --
3 files chang
The DMA API requires drivers to call the appropriate dma_set_mask()
functions before doing any DMA mapping. Add this required call to
the AMBA PL08x driver.
Signed-off-by: Russell King
---
drivers/dma/pl330.c |4
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/drivers
Replace the following sequence:
dma_set_mask(dev, mask);
dma_set_coherent_mask(dev, mask);
with a call to the new helper dma_set_mask_and_coherent().
Signed-off-by: Russell King
---
drivers/net/ethernet/emulex/benet/be_main.c | 12 ++--
1 files changed, 2 insertions
Replace the following sequence:
dma_set_mask(dev, mask);
dma_set_coherent_mask(dev, mask);
with a call to the new helper dma_set_mask_and_coherent().
Signed-off-by: Russell King
---
drivers/net/ethernet/sfc/efx.c | 12 +---
1 files changed, 1 insertions(+), 11
Replace the following sequence:
dma_set_mask(dev, mask);
dma_set_coherent_mask(dev, mask);
with a call to the new helper dma_set_mask_and_coherent().
Signed-off-by: Russell King
---
drivers/staging/et131x/et131x.c | 17 ++---
1 files changed, 2 insertions(+), 15
Replace the following sequence:
dma_set_mask(dev, mask);
dma_set_coherent_mask(dev, mask);
with a call to the new helper dma_set_mask_and_coherent().
Signed-off-by: Russell King
---
drivers/net/ethernet/intel/e1000/e1000_main.c |9 ++---
1 files changed, 2 insertions
Replace the following sequence:
dma_set_mask(dev, mask);
dma_set_coherent_mask(dev, mask);
with a call to the new helper dma_set_mask_and_coherent().
Signed-off-by: Russell King
---
drivers/block/nvme-core.c | 10 --
1 files changed, 4 insertions(+), 6 deletions
Replace the following sequence:
dma_set_mask(dev, mask);
dma_set_coherent_mask(dev, mask);
with a call to the new helper dma_set_mask_and_coherent().
Signed-off-by: Russell King
---
drivers/staging/media/dt3155v4l/dt3155v4l.c |5 +
1 files changed, 1 insertions(+), 4
Replace the following sequence:
dma_set_mask(dev, mask);
dma_set_coherent_mask(dev, mask);
with a call to the new helper dma_set_mask_and_coherent().
Signed-off-by: Russell King
---
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c |8 ++--
1 files changed, 2 insertions
Replace the following sequence:
dma_set_mask(dev, mask);
dma_set_coherent_mask(dev, mask);
with a call to the new helper dma_set_mask_and_coherent().
Signed-off-by: Russell King
---
drivers/net/wireless/b43legacy/dma.c |9 +++--
1 files changed, 3 insertions(+), 6
Replace the following sequence:
dma_set_mask(dev, mask);
dma_set_coherent_mask(dev, mask);
with a call to the new helper dma_set_mask_and_coherent().
Signed-off-by: Russell King
---
drivers/usb/host/bcma-hcd.c |3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff
The DMA API requires drivers to call the appropriate dma_set_mask()
functions before doing any DMA mapping. Add this required call to
the AMBA PL08x driver.
Signed-off-by: Russell King
---
drivers/video/amba-clcd.c |5 +
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a
Replace the following sequence:
dma_set_mask(dev, mask);
dma_set_coherent_mask(dev, mask);
with a call to the new helper dma_set_mask_and_coherent().
Signed-off-by: Russell King
---
drivers/usb/host/ssb-hcd.c |3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff
Add a comment to explain why this driver doesn't call any of the DMA
API dma_set_mask() functions.
Signed-off-by: Russell King
---
drivers/usb/host/ohci-sa.c |6 ++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/drivers/usb/host/ohci-sa.c b/drivers/usb/host
ues to be properly dealt with via dma_set_mask()/
dma_is_supported().
Signed-off-by: Russell King
---
include/linux/dma-mapping.h | 10 ++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h
index ec951f9..27d1421 10
.
Fix these issues by using the new dma_coerce_coherent_and_mask()
function.
Signed-off-by: Russell King
---
sound/arm/pxa2xx-pcm.c |9 +++--
sound/soc/atmel/atmel-pcm.c | 11 ---
sound/soc/blackfin/bf5xx-ac97-pcm.c | 11 ---
sound/soc/blackfin/bf5xx-i2s-pcm.c
Convert this code sequence:
pdev->dev.coherent_dma_mask = DMA_BIT_MASK(64);
pdev->dev.dma_mask = &pdev->dev.coherent_dma_mask;
to use dma_coerce_mask_and_coherent() to avoid bypassing the architecture
check on the DMA mask.
Signed-off-by: Russell King
---
be replaced
with dma_coerce_mask_and_coherent(), avoiding the direct initialization
of this mask.
Signed-off-by: Russell King
---
drivers/dma/dw/platform.c |8 +++-
1 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/dma/dw/platform.c b/drivers/dma/dw/platform.c
index e35d975..453822c 100644
---
), avoiding the direct initialization
of this mask.
Signed-off-by: Russell King
---
drivers/media/platform/omap3isp/isp.c |6 +++---
drivers/media/platform/omap3isp/isp.h |3 ---
2 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/media/platform/omap3isp/isp.c
b/drivers/m
The code sequence:
dev->dma_mask = &dev->coherent_dma_mask;
dev->coherent_dma_mask = dma_mask;
bypasses the architectures check on the DMA mask. It can be replaced
with dma_coerce_mask_and_coherent(), avoiding the direct initialization
of this mask.
Signed-off-by:
initialization
of this mask.
Signed-off-by: Russell King
---
drivers/net/ethernet/nxp/lpc_eth.c |6 --
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/nxp/lpc_eth.c
b/drivers/net/ethernet/nxp/lpc_eth.c
index a061b93..ba3ca18 100644
--- a/drivers/net/
mask.
Signed-off-by: Russell King
---
drivers/net/ethernet/octeon/octeon_mgmt.c |5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/octeon/octeon_mgmt.c
b/drivers/net/ethernet/octeon/octeon_mgmt.c
index 622aa75..2006a07 100644
--- a/drivers/net/et
: Russell King
---
drivers/usb/chipidea/ci_hdrc_imx.c |5 +++--
drivers/usb/dwc3/dwc3-exynos.c |5 +++--
drivers/usb/gadget/lpc32xx_udc.c |4 +++-
drivers/usb/host/ehci-atmel.c |5 +++--
drivers/usb/host/ehci-octeon.c |4 +++-
drivers/usb/host/ehci-omap.c |8
Signed-off-by: Russell King
---
drivers/usb/chipidea/ci_hdrc_imx.c |4 +---
drivers/usb/dwc3/dwc3-exynos.c |4 +---
drivers/usb/host/ehci-atmel.c |4 +---
drivers/usb/host/ehci-omap.c |4 +---
drivers/usb/host/ehci-orion.c |4 +---
drivers/usb/host/ehci
: Russell King
---
drivers/staging/dwc2/platform.c|5 +++--
drivers/staging/imx-drm/imx-drm-core.c |8 ++--
drivers/staging/imx-drm/ipuv3-crtc.c |4 +++-
3 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/dwc2/platform.c b/drivers/staging/dwc2
Replace the following sequence:
dma_set_mask(dev, mask);
dma_set_coherent_mask(dev, mask);
with a call to the new helper dma_set_mask_and_coherent().
Signed-off-by: Russell King
---
drivers/net/ethernet/broadcom/b44.c |3 +--
1 files changed, 1 insertions(+), 2 deletions
m
devices.
Signed-off-by: Russell King
---
drivers/crypto/ixp4xx_crypto.c | 37 +
1 files changed, 17 insertions(+), 20 deletions(-)
diff --git a/drivers/crypto/ixp4xx_crypto.c b/drivers/crypto/ixp4xx_crypto.c
index 21180d6..8306185 100644
--- a/drivers/cry
The DMA API requires drivers to call the appropriate dma_set_mask()
functions before doing any DMA mapping. Add this required call to
the AMBA PL08x driver.
Signed-off-by: Russell King
---
drivers/dma/amba-pl08x.c |5 +
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a
Replace the following sequence:
dma_set_mask(dev, mask);
dma_set_coherent_mask(dev, mask);
with a call to the new helper dma_set_mask_and_coherent().
Signed-off-by: Russell King
---
drivers/net/wireless/b43/dma.c |9 +++--
1 files changed, 3 insertions(+), 6 deletions
Replace the following sequence:
dma_set_mask(dev, mask);
dma_set_coherent_mask(dev, mask);
with a call to the new helper dma_set_mask_and_coherent().
Signed-off-by: Russell King
---
arch/powerpc/kernel/vio.c |3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff
The code sequence:
dev->coherent_dma_mask = DMA_BIT_MASK(24);
dev->dma_mask = &dev->coherent_dma_mask;
bypasses the architectures check on the DMA mask. It can be replaced
with dma_coerce_mask_and_coherent(), avoiding the direct initialization
of this mask.
Signed-of
Add sdhci_set_uhs_signaling() and always call the set_uhs_signaling
method. This avoids quirks being added into sdhci_set_uhs_signaling().
Signed-off-by: Russell King
---
drivers/mmc/host/sdhci-acpi.c | 2 ++
drivers/mmc/host/sdhci-bcm-kona.c | 1 +
drivers/mmc/host/sdhci-bcm2835.c
Rather than having platform_reset_enter/platform_reset_exit methods,
turn the core of the reset handling into a library function which
platforms can call at the appropriate moment in their (new) reset
method.
Signed-off-by: Russell King
---
drivers/mmc/host/sdhci-acpi.c | 2 ++
drivers
Signed-off-by: Russell King
---
drivers/mmc/host/sdhci-acpi.c | 2 ++
drivers/mmc/host/sdhci-bcm-kona.c | 1 +
drivers/mmc/host/sdhci-bcm2835.c | 1 +
drivers/mmc/host/sdhci-cns3xxx.c | 1 +
drivers/mmc/host/sdhci-dove.c | 1 +
drivers/mmc/host/sdhci-esdhc-imx.c | 6
Signed-off-by: Russell King
---
drivers/mmc/host/sdhci-acpi.c | 2 ++
drivers/mmc/host/sdhci-bcm-kona.c | 1 +
drivers/mmc/host/sdhci-bcm2835.c | 1 +
drivers/mmc/host/sdhci-cns3xxx.c | 3 +--
drivers/mmc/host/sdhci-dove.c | 1 +
drivers/mmc/host/sdhci-esdhc.h | 1
Add sdhci_set_uhs_signaling() and always call the set_uhs_signaling
method. This avoids quirks being added into sdhci_set_uhs_signaling().
Signed-off-by: Russell King
---
drivers/mmc/host/sdhci-acpi.c | 2 ++
drivers/mmc/host/sdhci-bcm-kona.c | 1 +
drivers/mmc/host/sdhci-bcm2835.c
Signed-off-by: Russell King
=-DO NOT APPLY-=
drivers/mmc/host/sdhci-acpi.c | 2 ++
drivers/mmc/host/sdhci-bcm-kona.c | 1 +
drivers/mmc/host/sdhci-bcm2835.c | 1 +
drivers/mmc/host/sdhci-cns3xxx.c | 1 +
drivers/mmc/host/sdhci-dove.c | 1 +
drivers/mmc/host/sdhci-esdhc-imx.c
Rather than having platform_reset_enter/platform_reset_exit methods,
turn the core of the reset handling into a library function which
platforms can call at the appropriate moment in their (new) reset
method.
Signed-off-by: Russell King
=-DO NOT APPLY-=
drivers/mmc/host/sdhci-acpi.c | 2
Signed-off-by: Russell King
=-DO NOT APPLY-=
drivers/mmc/host/sdhci-acpi.c | 2 ++
drivers/mmc/host/sdhci-bcm-kona.c | 1 +
drivers/mmc/host/sdhci-bcm2835.c | 1 +
drivers/mmc/host/sdhci-cns3xxx.c | 3 +--
drivers/mmc/host/sdhci-dove.c | 1 +
drivers/mmc/host/sdhci-esdhc.h
Add sdhci_set_uhs_signaling() and always call the set_uhs_signaling
method. This avoids quirks being added into sdhci_set_uhs_signaling().
Signed-off-by: Russell King
=-DO NOT APPLY-=
drivers/mmc/host/sdhci-acpi.c | 2 ++
drivers/mmc/host/sdhci-bcm-kona.c | 1 +
drivers/mmc/host/sdhci
iter))) {
if (match(dev, data)) {
get_device(dev);
break;
}
Update the comment, and arrange for the only user of this function
to drop this refcount when disposing of a reference to it.
Signed-off-by: Russell King
---
drivers
stored pointer. When the phy is deteched, drop the module
refcount, remembering that the phy device might go away at that point.
This doesn't stop the mii_bus going away while there are in-use phys -
it merely stops the underlying code vanishing.
Signed-off-by: Russell King
---
driv
kfree()'d by phy_device_release().
Signed-off-by: Russell King
---
drivers/net/phy/phy_device.c | 12
1 file changed, 12 insertions(+)
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
index 03adf328f49b..97a4f52addac 100644
--- a/drivers/net/phy/phy_devi
cal reference immediatley after these functions, whether or not
they succeeded.
Signed-off-by: Russell King
---
drivers/of/of_mdio.c | 27 +++
1 file changed, 23 insertions(+), 4 deletions(-)
diff --git a/drivers/of/of_mdio.c b/drivers/of/of_mdio.c
index 1350fa25cdb0..a8
of_phy_find_device() increments the phy struct device refcount,
which we need to properly balance. Add code to network drivers
using this function to ensure that the struct device refcount is
correctly balanced.
Signed-off-by: Russell King
---
drivers/net/ethernet/apm/xgene/xgene_enet_hw.c
Validate that the phy_device passed into fixed_phy_update_state() is a
fixed-phy device before walking the list of phys for a fixed phy at the
same address.
Signed-off-by: Russell King
---
drivers/net/phy/fixed_phy.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers
.
Signed-off-by: Russell King
---
drivers/net/ethernet/freescale/gianfar.c | 5 +++--
drivers/net/phy/mdio_bus.c | 15 ++-
drivers/net/phy/phy_device.c | 18 ++
include/linux/phy.h | 1 +
4 files changed, 32 insertions(+), 7
iter))) {
if (match(dev, data)) {
get_device(dev);
break;
}
Update the comment, and arrange for the only user of this function
to drop this refcount when disposing of a reference to it.
Signed-off-by: Russell King
---
drivers
stored pointer. When the phy is deteched, drop the module
refcount, remembering that the phy device might go away at that point.
This doesn't stop the mii_bus going away while there are in-use phys -
it merely stops the underlying code vanishing.
Signed-off-by: Russell King
---
driv
kfree()'d by phy_device_release().
Signed-off-by: Russell King
---
drivers/net/phy/phy_device.c | 12
1 file changed, 12 insertions(+)
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
index 03adf328f49b..97a4f52addac 100644
--- a/drivers/net/phy/phy_devi
cal reference immediatley after these functions, whether or not
they succeeded.
Signed-off-by: Russell King
---
drivers/of/of_mdio.c | 27 +++
1 file changed, 23 insertions(+), 4 deletions(-)
diff --git a/drivers/of/of_mdio.c b/drivers/of/of_mdio.c
index 1350fa25cdb0..a8
of_phy_find_device() increments the phy struct device refcount,
which we need to properly balance. Add code to network drivers
using this function to ensure that the struct device refcount is
correctly balanced.
Signed-off-by: Russell King
---
drivers/net/ethernet/apm/xgene/xgene_enet_hw.c
Validate that the phy_device passed into fixed_phy_update_state() is a
fixed-phy device before walking the list of phys for a fixed phy at the
same address.
Signed-off-by: Russell King
---
drivers/net/phy/fixed_phy.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers
.
Signed-off-by: Russell King
---
drivers/net/ethernet/freescale/gianfar.c | 5 +++--
drivers/net/phy/mdio_bus.c | 15 ++-
drivers/net/phy/phy_device.c | 18 ++
include/linux/phy.h | 1 +
4 files changed, 32 insertions(+), 7
mdio_bus_switch->dev); /* drop of_mdio_find_bus ref */
Signed-off-by: Russell King
---
net/dsa/dsa.c | 38 +++---
1 file changed, 31 insertions(+), 7 deletions(-)
diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c
index 76e3800765f8..bf4ba15fb780 100644
--- a/net/dsa/ds
kfree()'d by phy_device_release().
Signed-off-by: Russell King
---
drivers/net/phy/phy_device.c | 12
1 file changed, 12 insertions(+)
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
index 03adf328f49b..97a4f52addac 100644
--- a/drivers/net/phy/phy_devi
cal reference immediatley after these functions, whether or not
they succeeded.
Signed-off-by: Russell King
---
drivers/of/of_mdio.c | 27 +++
1 file changed, 23 insertions(+), 4 deletions(-)
diff --git a/drivers/of/of_mdio.c b/drivers/of/of_mdio.c
index 1350fa25cdb0..a8
Validate that the phy_device passed into fixed_phy_update_state() is a
fixed-phy device before walking the list of phys for a fixed phy at the
same address.
Signed-off-by: Russell King
---
drivers/net/phy/fixed_phy.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers
.
Signed-off-by: Russell King
---
drivers/net/ethernet/freescale/gianfar.c | 5 +++--
drivers/net/phy/mdio_bus.c | 15 ++-
drivers/net/phy/phy_device.c | 18 ++
include/linux/phy.h | 1 +
4 files changed, 32 insertions(+), 7
iter))) {
if (match(dev, data)) {
get_device(dev);
break;
}
Update the comment, and arrange for the phy code to drop this refcount
when disposing of a reference to it.
Signed-off-by: Russell King
---
drivers/net/phy/mdio-mux.c
stored pointer. When the phy is deteched, drop the module
refcount, remembering that the phy device might go away at that point.
This doesn't stop the mii_bus going away while there are in-use phys -
it merely stops the underlying code vanishing.
Signed-off-by: Russell King
---
driv
of_phy_find_device() increments the phy struct device refcount,
which we need to properly balance. Add code to network drivers
using this function to ensure that the struct device refcount is
correctly balanced.
Signed-off-by: Russell King
---
drivers/net/ethernet/apm/xgene/xgene_enet_hw.c
this refcount, and fix the DSA code to drop this refcount
when the OF-generated platform data is cleaned up and freed. Also
arrange for the ref to be dropped when handling errors.
Signed-off-by: Russell King
---
net/core/net-sysfs.c | 9 +
net/dsa/dsa.c| 5 -
2 files changed
iners need to be involved with.
Signed-off-by: Russell King
---
drivers/net/ethernet/apm/xgene/xgene_enet_hw.c | 24
drivers/net/ethernet/freescale/gianfar.c | 3 +++
drivers/net/ethernet/freescale/ucc_geth.c | 8 +++-
drivers/net/ethernet/marvel
iter))) {
if (match(dev, data)) {
get_device(dev);
break;
}
Update the comment, and arrange for the phy code to drop this refcount
when disposing of a reference to it.
Signed-off-by: Russell King
---
drivers/net/phy/mdio-mux.c
mdio_bus_switch->dev); /* drop of_mdio_find_bus ref */
Signed-off-by: Russell King
---
net/dsa/dsa.c | 38 +++---
1 file changed, 31 insertions(+), 7 deletions(-)
diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c
index 76e3800765f8..bf4ba15fb780 100644
--- a/net/dsa/ds
stored pointer. When the phy is deteched, drop the module
refcount, remembering that the phy device might go away at that point.
This doesn't stop the mii_bus going away while there are in-use phys -
it merely stops the underlying code vanishing.
Signed-off-by: Russell King
---
driv
kfree()'d by phy_device_release().
Signed-off-by: Russell King
---
drivers/net/phy/phy_device.c | 12
1 file changed, 12 insertions(+)
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
index 03adf328f49b..97a4f52addac 100644
--- a/drivers/net/phy/phy_devi
cal reference immediatley after these functions, whether or not
they succeeded.
Signed-off-by: Russell King
---
drivers/of/of_mdio.c | 27 +++
1 file changed, 23 insertions(+), 4 deletions(-)
diff --git a/drivers/of/of_mdio.c b/drivers/of/of_mdio.c
index 1350fa25cdb0..a8
iners need to be involved with.
Signed-off-by: Russell King
---
drivers/net/ethernet/apm/xgene/xgene_enet_hw.c | 24
drivers/net/ethernet/freescale/gianfar.c | 3 +++
drivers/net/ethernet/freescale/ucc_geth.c | 8 +++-
drivers/net/ethernet/marvel
Validate that the phy_device passed into fixed_phy_update_state() is a
fixed-phy device before walking the list of phys for a fixed phy at the
same address.
Signed-off-by: Russell King
---
drivers/net/phy/fixed_phy.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers
.
Signed-off-by: Russell King
---
drivers/net/ethernet/freescale/gianfar.c | 5 +++--
drivers/net/phy/mdio_bus.c | 15 ++-
drivers/net/phy/phy_device.c | 18 ++
include/linux/phy.h | 1 +
4 files changed, 32 insertions(+), 7
this refcount, and fix the DSA code to drop this refcount
when the OF-generated platform data is cleaned up and freed. Also
arrange for the ref to be dropped when handling errors.
Signed-off-by: Russell King
---
net/core/net-sysfs.c | 9 +
net/dsa/dsa.c| 5 -
2 files changed
AVE_GENERIC_HARDIRQS && HAVE_SPARSE_IRQ)
Do you have commit 2ed86b16eabe4efbf80cc725a8cbb5310746a2fc ?
--
Russell King
Linux kernel2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of:
___
Linuxppc-dev mailing list
Linuxpp
of names has been well
proven to lead people down the wrong path of matching only by names
and then running into problems later. We need drivers passing a NULL
name to ensure that people get the right idea. Comments in code/headers
don't seem to work. ;(
--
Russell King
___
On Thu, Aug 13, 2009 at 08:52:49AM +1000, Benjamin Herrenschmidt wrote:
> On Wed, 2009-08-12 at 23:28 +0100, Russell King wrote:
>
> > On Thu, Aug 13, 2009 at 07:56:32AM +1000, Benjamin Herrenschmidt wrote:
> > > Maybe we can make clock-names non-optional though in the DT
methods are
per-clk. This balance seems to work well for OMAP.)
FYI, there are 140 struct clk definitions for OMAP24xx, and 215 for
OMAP34xx, all statically initialized. See arch/arm/mach-omap2/clock?4xx.h
--
Russell King
___
Linuxppc-dev mailing l
. See
ARMs pcibios_fixup_bus().
> Should other arches do the same thing, or are these somehow related to
> ARM and PA-RISC architecture?
I suspect they're architecture specific; I wouldn't like to do either
on x86, but they're either required or preferred on ARM.
--
Russel
>
> Cc: Ralf Baechle <[EMAIL PROTECTED]>
> Cc: [EMAIL PROTECTED]
> Cc: Paul Mundt <[EMAIL PROTECTED]>
> Cc: Bryan Wu <[EMAIL PROTECTED]>
Acked-by: Russell King <[EMAIL PROTECTED]>
> ---
> Architecture maintainers should evaluate whether their
d somewhere. Please? Before this thread gets
lost in the depths of time?
--
Russell King
Linux kernel2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of:
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev
1 - 100 of 408 matches
Mail list logo