t; push_new_skb:
> desc_data.len = skb_tailroom(new_skb);
> desc_data.skb = new_skb;
> --
> 2.18.0
>
Thanks for spotting that. Maybe also update the commit so that it
says: "it's safe to unmap the old skb"? Would make the thing clearer
IMO.
In any case:
Acked-by: Bartosz Golaszewski
Bartosz
On Mon, Jan 11, 2021 at 2:43 PM Vladimir Oltean wrote:
>
> On Mon, Jan 11, 2021 at 01:44:26PM +0800, DENG Qingfang wrote:
> > MT7530's LED controller can be used as GPIO controller. Add support for
> > it.
> >
> > DENG Qingfang (2):
> > dt-bindings: net: dsa: add MT7530 GPIO controller binding
>
+++ b/Documentation/devicetree/bindings/gpio/gpio-pca95xx.yaml
> @@ -81,6 +81,7 @@ properties:
> const: 2
>
>reset-gpios:
> +maxItems: 1
> description:
>GPIO specification for the RESET input. This is an active low signal to
> the PCA953x. Not valid for Maxim MAX732x devices.
Acked-by: Bartosz Golaszewski
if (!priv->phydev) {
> netdev_err(ndev, "failed to connect to PHY\n");
> + ret = -ENODEV;
> goto err_free_irq;
> }
>
> --
> 2.9.5
>
Acked-by: Bartosz Golaszewski
net: mtk-star-emac: new driver")
> Signed-off-by: Vincent Stehlé
> Cc: David S. Miller
> Cc: Bartosz Golaszewski
> ---
> drivers/net/ethernet/mediatek/mtk_star_emac.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/mediate
From: Bartosz Golaszewski
Use the helper that checks for overflows internally instead of manually
calculating the size of the new array.
Signed-off-by: Bartosz Golaszewski
Reviewed-by: Takashi Iwai
---
sound/core/pcm_lib.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
From: Bartosz Golaszewski
Use the helper that checks for overflows internally instead of manually
calculating the size of the new array.
Signed-off-by: Bartosz Golaszewski
Acked-by: Borislav Petkov
---
drivers/edac/ghes_edac.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff
From: Bartosz Golaszewski
Use the helper that checks for overflows internally instead of manually
calculating the size of the new array.
Signed-off-by: Bartosz Golaszewski
Acked-by: Daniel Vetter
---
drivers/gpu/drm/drm_atomic.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff
From: Bartosz Golaszewski
Use the helper that checks for overflows internally instead of manually
calculating the size of the new array.
Signed-off-by: Bartosz Golaszewski
Acked-by: Michael S. Tsirkin
---
drivers/vhost/vringh.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff
From: Bartosz Golaszewski
Use the helper that checks for overflows internally instead of manually
calculating the size of the new array.
Signed-off-by: Bartosz Golaszewski
Acked-by: Christian König
---
drivers/dma-buf/sync_file.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff
From: Bartosz Golaszewski
Use the helper that checks for overflows internally instead of manually
calculating the size of the new array.
Signed-off-by: Bartosz Golaszewski
Reviewed-by: Andy Shevchenko
---
drivers/pinctrl/pinctrl-utils.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion
From: Bartosz Golaszewski
Use the helper that checks for overflows internally instead of manually
calculating the size of the new array.
Signed-off-by: Bartosz Golaszewski
---
drivers/hwtracing/intel_th/msu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers
From: Bartosz Golaszewski
When allocating an array of elements, users should check for
multiplication overflow or preferably use one of the provided helpers
like: kmalloc_array().
There's no krealloc_array() counterpart but there are many users who use
regular krealloc() to reallocate a
From: Bartosz Golaszewski
Andy brought to my attention the fact that users allocating an array of
equally sized elements should check if the size multiplication doesn't
overflow. This is why we have helpers like kmalloc_array().
However we don't have krealloc_array() equivalent and
From: Bartosz Golaszewski
__GFP_ZERO is ignored by krealloc() (unless we fall-back to kmalloc()
path, in which case it's honored). Point that out in the kerneldoc.
Signed-off-by: Bartosz Golaszewski
---
mm/slab_common.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --
On Tue, Nov 3, 2020 at 5:14 AM Joe Perches wrote:
>
> On Mon, 2020-11-02 at 16:20 +0100, Bartosz Golaszewski wrote:
> > From: Bartosz Golaszewski
> >
> > Andy brought to my attention the fact that users allocating an array of
> > equally sized elements should ch
On Mon, Nov 2, 2020 at 4:41 PM Matthew Wilcox wrote:
>
> On Mon, Nov 02, 2020 at 04:20:30PM +0100, Bartosz Golaszewski wrote:
> > +Chunks allocated with `kmalloc` can be resized with `krealloc`. Similarly
> > +to `kmalloc_array`: a helper for resising arrays is provi
From: Bartosz Golaszewski
Use the helper that checks for overflows internally instead of manually
calculating the size of the new array.
Signed-off-by: Bartosz Golaszewski
Acked-by: Michael S. Tsirkin
---
drivers/vhost/vringh.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff
From: Bartosz Golaszewski
Use the helper that checks for overflows internally instead of manually
calculating the size of the new array.
Signed-off-by: Bartosz Golaszewski
Reviewed-by: Takashi Iwai
---
sound/core/pcm_lib.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
From: Bartosz Golaszewski
Use the helper that checks for overflows internally instead of manually
calculating the size of the new array.
Signed-off-by: Bartosz Golaszewski
Reviewed-by: Andy Shevchenko
---
drivers/pinctrl/pinctrl-utils.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion
From: Bartosz Golaszewski
Use the helper that checks for overflows internally instead of manually
calculating the size of the new array.
Signed-off-by: Bartosz Golaszewski
Acked-by: Christian König
---
drivers/dma-buf/sync_file.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions
From: Bartosz Golaszewski
When allocating an array of elements, users should check for
multiplication overflow or preferably use one of the provided helpers
like: kmalloc_array().
There's no krealloc_array() counterpart but there are many users who use
regular krealloc() to reallocate a
From: Bartosz Golaszewski
Use the helper that checks for overflows internally instead of manually
calculating the size of the new array.
Signed-off-by: Bartosz Golaszewski
Acked-by: Borislav Petkov
---
drivers/edac/ghes_edac.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff
From: Bartosz Golaszewski
Use the helper that checks for overflows internally instead of manually
calculating the size of the new array.
Signed-off-by: Bartosz Golaszewski
Acked-by: Daniel Vetter
---
drivers/gpu/drm/drm_atomic.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff
From: Bartosz Golaszewski
Use the helper that checks for overflows internally instead of manually
calculating the size of the new array.
Signed-off-by: Bartosz Golaszewski
---
drivers/hwtracing/intel_th/msu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers
From: Bartosz Golaszewski
Andy brought to my attention the fact that users allocating an array of
equally sized elements should check if the size multiplication doesn't
overflow. This is why we have helpers like kmalloc_array().
However we don't have krealloc_array() equivalent and
On Tue, Oct 27, 2020 at 6:08 PM Joe Perches wrote:
>
> On Tue, 2020-10-27 at 17:58 +0100, Bartosz Golaszewski wrote:
> > On Tue, Oct 27, 2020 at 5:50 PM Joe Perches wrote:
> > >
> > > On Tue, 2020-10-27 at 11:28 -0400, Michael S. Tsirkin wrote:
> > > >
On Tue, Oct 27, 2020 at 5:50 PM Joe Perches wrote:
>
> On Tue, 2020-10-27 at 11:28 -0400, Michael S. Tsirkin wrote:
> > On Tue, Oct 27, 2020 at 01:17:20PM +0100, Bartosz Golaszewski wrote:
> > > From: Bartosz Golaszewski
> > >
> > > Use the helper that che
From: Bartosz Golaszewski
Use the helper that checks for overflows internally instead of manually
calculating the size of the new array.
Signed-off-by: Bartosz Golaszewski
---
drivers/edac/ghes_edac.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/edac
From: Bartosz Golaszewski
When allocating an array of elements, users should check for
multiplication overflow or preferably use one of the provided helpers
like: kmalloc_array().
There's no krealloc_array() counterpart but there are many users who use
regular krealloc() to reallocate a
From: Bartosz Golaszewski
Use the helper that checks for overflows internally instead of manually
calculating the size of the new array.
Signed-off-by: Bartosz Golaszewski
---
drivers/gpu/drm/drm_atomic.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm
From: Bartosz Golaszewski
Use the helper that checks for overflows internally instead of manually
calculating the size of the new array.
Signed-off-by: Bartosz Golaszewski
---
drivers/dma-buf/sync_file.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/dma-buf
From: Bartosz Golaszewski
Use the helper that checks for overflows internally instead of manually
calculating the size of the new array.
Signed-off-by: Bartosz Golaszewski
---
drivers/hwtracing/intel_th/msu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers
From: Bartosz Golaszewski
Use the helper that checks for overflows internally instead of manually
calculating the size of the new array.
Signed-off-by: Bartosz Golaszewski
---
drivers/pinctrl/pinctrl-utils.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pinctrl
From: Bartosz Golaszewski
Use the helper that checks for overflows internally instead of manually
calculating the size of the new array.
Signed-off-by: Bartosz Golaszewski
---
sound/core/pcm_lib.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/core/pcm_lib.c b
From: Bartosz Golaszewski
Andy brought to my attention the fact that users allocating an array of
equally sized elements should check if the size multiplication doesn't
overflow. This is why we have helpers like kmalloc_array().
However we don't have krealloc_array() equivalent and
From: Bartosz Golaszewski
Use the helper that checks for overflows internally instead of manually
calculating the size of the new array.
Signed-off-by: Bartosz Golaszewski
---
drivers/vhost/vringh.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/vhost/vringh.c b
From: Bartosz Golaszewski
The only action currently performed in pmbus_do_remove() is removing the
debugfs hierarchy. We can schedule a devm action at probe time and remove
pmbus_do_remove() entirely from all pmbus drivers.
Signed-off-by: Bartosz Golaszewski
---
drivers/hwmon/pmbus/adm1266.c
From: Bartosz Golaszewski
The driver depends on mmio regmap API but doesn't select the appropriate
Kconfig option. This fixes it.
Fixes: 8c7bd5a454ff ("net: ethernet: mtk-star-emac: new driver")
Cc:
Signed-off-by: Bartosz Golaszewski
---
drivers/net/ethernet/mediatek/Kconfi
On Mon, Sep 28, 2020 at 9:17 AM Bartosz Golaszewski wrote:
>
> From: Bartosz Golaszewski
>
> It's a valid use-case for ixgbe_mii_bus_init() to return -ENODEV - we
> still want to finalize the registration of the ixgbe device. Check the
> error code and don't bail out
From: Bartosz Golaszewski
It's a valid use-case for ixgbe_mii_bus_init() to return -ENODEV - we
still want to finalize the registration of the ixgbe device. Check the
error code and don't bail out if err == -ENODEV.
This fixes an issue on C3000 family of SoCs where four ixgbe devic
On Fri, Sep 25, 2020 at 10:51 AM Liu, Yongxin wrote:
>
[snip]
> > > true);
> > >
> > > - err = ixgbe_mii_bus_init(hw);
> > > - if (err)
> > > - goto err_netdev;
> > > + ixgbe_mii_bus_init(hw);
> > >
> > > return 0;
> > >
> > > -err_
On Fri, Sep 25, 2020 at 4:45 AM Yongxin Liu wrote:
>
> This reverts commit 09ef193fef7efb0175a04634853862d717adbb95.
>
> For C3000 family of SoCs, they have four ixgbe devices sharing a single MDIO
> bus.
> ixgbe_mii_bus_init() returns -ENODEV for other three devices. The propagation
> of the err
On Thu, Aug 27, 2020 at 6:40 PM Lad, Prabhakar
wrote:
>
> Hi Linus and Bartosz,
>
> On Mon, Jul 13, 2020 at 10:35 PM Lad Prabhakar
> wrote:
> >
> > Document Renesas RZ/G2H (R8A774E1) GPIO blocks compatibility within the
> > relevant dt-bindings.
> >
> > Signed-off-by: Lad Prabhakar
> > ---
> >
From: Bartosz Golaszewski
PHYLIB is not selected by the mvusb driver but it uses mdio devres
helpers. Explicitly select MDIO_DEVRES in this driver's Kconfig entry.
Reported-by: kernel test robot
Fixes: 1814cff26739 ("net: phy: add a Kconfig option for mdio_devres")
Signed-
From: Bartosz Golaszewski
PHYLIB is not selected by mdio-mscc-miim but it uses mdio devres helpers.
Explicitly select MDIO_DEVRES in this driver's Kconfig entry.
Reported-by: kernel test robot
Fixes: 1814cff26739 ("net: phy: add a Kconfig option for mdio_devres")
Signed-
From: Bartosz Golaszewski
If phylib is built as a module and CONFIG_MDIO_DEVICE is 'y', the
mdio_device and mdio_bus code will be in the phylib module, not in the
kernel image. Meanwhile we build mdio_devres depending on the
CONFIG_MDIO_DEVICE symbol, so if it's 'y', i
From: Bartosz Golaszewski
This function may fail. Check its return value and propagate the error
code.
Signed-off-by: Bartosz Golaszewski
---
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/ixgbe
From: Bartosz Golaszewski
Shrink the code by using the managed variant of of_mdiobus_register().
Signed-off-by: Bartosz Golaszewski
---
drivers/net/ethernet/mediatek/mtk_star_emac.c | 13 +
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/drivers/net/ethernet/mediatek
From: Bartosz Golaszewski
Implement a managed variant of of_mdiobus_register(). We need to make
mdio_devres into its own module because otherwise we'd hit circular
sumbol dependencies between phylib and of_mdio.
Signed-off-by: Bartosz Golaszewski
---
.../driver-api/driver-model/devre
From: Bartosz Golaszewski
The 'extern' keyword in headers doesn't have any benefit. Remove them
all from the of_mdio.h header.
Signed-off-by: Bartosz Golaszewski
---
include/linux/of_mdio.h | 37 ++---
1 file changed, 18 insertions(+), 19 del
From: Bartosz Golaszewski
We currently have two managed helpers for mdiobus - devm_mdiobus_alloc()
and devm_mdiobus_register(). The idea behind devres is that the release
callback releases whatever resource the devm function allocates. In the
mdiobus case however there's no devres assoc
From: Bartosz Golaszewski
So it seems like there's no support for relaxing certain networking devres
helpers to not require previously allocated structures to also be managed.
However the way mdio devres variants are implemented is still wrong and I
modified my series to address it while ke
From: Bartosz Golaszewski
Functions should only be static inline if they're very short. This
devres helper is already over 10 lines and it will grow soon as we'll
be improving upon its approach. Pull it into mdio_devres.c.
Signed-off-by: Bartosz Golaszewski
---
drivers/net/ph
From: Bartosz Golaszewski
This function is not documented. Add a short kerneldoc description.
Signed-off-by: Bartosz Golaszewski
---
drivers/net/phy/mdio_devres.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/drivers/net/phy/mdio_devres.c b/drivers/net/phy/mdio_devres.c
index
From: Bartosz Golaszewski
We have a devres variant of mdiobus_register() but it's not listed in
devres.rst. Add it under other mdio devm functions.
Signed-off-by: Bartosz Golaszewski
---
Documentation/driver-api/driver-model/devres.rst | 1 +
1 file changed, 1 insertion(+)
diff --
From: Bartosz Golaszewski
The idea behind devres is that the release callbacks are called if
probe fails. As we now check the return value of ixgbe_mii_bus_init(),
we can drop the call devm_mdiobus_free() in error path as the release
callback will be called automatically.
Signed-off-by: Bartosz
From: Bartosz Golaszewski
Make it an explicit counterpart to devm_register_netdev() just like we
do with devm_free_netdev() for better clarity.
Signed-off-by: Bartosz Golaszewski
---
net/devres.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/devres.c b/net
From: Bartosz Golaszewski
Keeping the headers in alphabetical order is better for readability and
allows to easily see if given header is already included.
Signed-off-by: Bartosz Golaszewski
Reviewed-by: Andrew Lunn
Reviewed-by: Florian Fainelli
---
drivers/net/phy/mdio_bus.c | 32
From: Bartosz Golaszewski
This header refers to struct reset_control but doesn't include any reset
header. The structure definition is probably somehow indirectly pulled in
since no warnings are reported but for the sake of correctness add the
forward declaration for struct reset_co
From: Bartosz Golaszewski
Previously these patches were submitted as part of a larger series[1]
but since the approach in it will have to be reworked I'm resending
the ones that were non-controversial and have been reviewed for upstream.
Florian suggested a better solution for managing mul
From: Bartosz Golaszewski
Similarily to PHY drivers - there's no reason to require probe() to be
implemented in order to call mdio_device_reset(). MDIO devices can have
resets defined without needing to do anything in probe().
Signed-off-by: Bartosz Golaszewski
Reviewed-by: Andrew
From: Bartosz Golaszewski
Currently we only call phy_device_reset() if the PHY driver implements
the probe() callback. This is not mandatory and many drivers (e.g.
realtek) don't need probe() for most devices but still can have reset
GPIOs defined. There's no reason to depend on the p
From: Bartosz Golaszewski
Keeping the headers in alphabetical order is better for readability and
allows to easily see if given header is already included.
Signed-off-by: Bartosz Golaszewski
Reviewed-by: Andrew Lunn
Reviewed-by: Florian Fainelli
---
drivers/net/phy/mdio_device.c | 2 +-
1
From: Bartosz Golaszewski
Keeping the headers in alphabetical order is better for readability and
allows to easily see if given header is already included.
Signed-off-by: Bartosz Golaszewski
Reviewed-by: Andrew Lunn
Reviewed-by: Florian Fainelli
---
drivers/net/phy/phy_device.c | 28
On Tue, Jun 23, 2020 at 1:55 AM Florian Fainelli wrote:
>
> On 6/22/20 3:00 AM, Bartosz Golaszewski wrote:
> > From: Bartosz Golaszewski
> >
> > Functions should only be static inline if they're very short. This
> > devres helper is already over 10 lines an
On Wed, Jun 24, 2020 at 6:06 PM Florian Fainelli wrote:
>
[snip!]
> >
> > This has evolved into several new concepts being proposed vs my
> > use-case which is relatively simple. The former will probably take
> > several months of development, reviews and discussions and it will
> > block suppor
wt., 23 cze 2020 o 21:14 Florian Fainelli napisał(a):
>
> On 6/22/20 2:37 AM, Bartosz Golaszewski wrote:
> > From: Bartosz Golaszewski
> >
> > Currently we only call phy_device_reset() if the PHY driver implements
> > the probe() callback. This is not mandatory and
śr., 24 cze 2020 o 11:43 Mark Brown napisał(a):
>
> On Tue, Jun 23, 2020 at 12:49:15PM -0700, Florian Fainelli wrote:
> > On 6/22/20 6:51 AM, Mark Brown wrote:
>
> > > If the bus includes power management for the devices on the bus the
> > > controller is generally responsible for that rather than
wt., 23 cze 2020 o 11:56 Russell King - ARM Linux admin
napisał(a):
>
> On Tue, Jun 23, 2020 at 11:46:15AM +0200, Bartosz Golaszewski wrote:
> > wt., 23 cze 2020 o 11:43 Russell King - ARM Linux admin
> > napisał(a):
> > >
> > > On Tue, Jun 23, 2020 at 11:41:1
wt., 23 cze 2020 o 11:43 Russell King - ARM Linux admin
napisał(a):
>
> On Tue, Jun 23, 2020 at 11:41:11AM +0200, Bartosz Golaszewski wrote:
> > pon., 22 cze 2020 o 15:29 Russell King - ARM Linux admin
> > napisał(a):
> > >
> >
> > [snip!]
> >
> &
pon., 22 cze 2020 o 15:29 Russell King - ARM Linux admin
napisał(a):
>
[snip!]
>
> This is likely to cause issues for some PHY drivers. Note that we have
> some PHY drivers which register a temperature sensor in the probe
> function, which means they can be accessed independently of the lifetim
pon., 22 cze 2020 o 15:25 Russell King - ARM Linux admin
napisał(a):
>
> On Mon, Jun 22, 2020 at 11:37:42AM +0200, Bartosz Golaszewski wrote:
> > From: Bartosz Golaszewski
> >
> > Currently many MAC drivers control the regulator supplying the PHY but
> > this is con
wt., 23 cze 2020 o 00:49 Jakub Kicinski napisał(a):
>
> On Mon, 22 Jun 2020 12:00:48 +0200 Bartosz Golaszewski wrote:
> > From: Bartosz Golaszewski
> >
> > This devres helper registers a release callback that only unregisters
> > the net_device. It works perfectly
From: Bartosz Golaszewski
This devres helper registers a release callback that only unregisters
the net_device. It works perfectly fine with netdev structs that are
not managed on their own. There's no reason to check this - drop the
warning.
Signed-off-by: Bartosz Golaszewski
---
From: Bartosz Golaszewski
This function may fail. Check its return value and propagate the error
code.
Signed-off-by: Bartosz Golaszewski
---
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/ixgbe
From: Bartosz Golaszewski
The idea behind devres is that the release callbacks are called if
probe fails. As we now check the return value of ixgbe_mii_bus_init(),
we can drop the call devm_mdiobus_free() in error path as the release
callback will be called automatically.
Signed-off-by: Bartosz
From: Bartosz Golaszewski
Functions should only be static inline if they're very short. This
devres helper is already over 10 lines and it will grow soon as we'll
be improving upon its approach. Pull it into mdio_devres.c.
Signed-off-by: Bartosz Golaszewski
---
drivers/net/ph
From: Bartosz Golaszewski
Make it an explicit counterpart to devm_register_netdev() just like we
do with devm_free_netdev() for better clarity.
Signed-off-by: Bartosz Golaszewski
---
net/devres.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/devres.c b/net
From: Bartosz Golaszewski
We have a devres variant of mdiobus_register() but it's not listed in
devres.rst. Add it under other mdio devm functions.
Signed-off-by: Bartosz Golaszewski
---
Documentation/driver-api/driver-model/devres.rst | 1 +
1 file changed, 1 insertion(+)
diff --
From: Bartosz Golaszewski
This function is not documented. Add a short kerneldoc description.
Signed-off-by: Bartosz Golaszewski
---
drivers/net/phy/mdio_devres.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/drivers/net/phy/mdio_devres.c b/drivers/net/phy/mdio_devres.c
index
From: Bartosz Golaszewski
We currently have two managed helpers for mdiobus - devm_mdiobus_alloc()
and devm_mdiobus_register(). The idea behind devres is that the release
callback releases whatever resource the devm function allocates. In the
mdiobus case however there's no devres assoc
From: Bartosz Golaszewski
Shrink the code by using the managed variant of of_mdiobus_register().
Signed-off-by: Bartosz Golaszewski
---
drivers/net/ethernet/mediatek/mtk_star_emac.c | 13 +
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/drivers/net/ethernet/mediatek
From: Bartosz Golaszewski
Implement a managed variant of of_mdiobus_register(). We need to
reimplement the devres structure and the release callback because we
can't put this function in drivers/net/phy/mdio_devres.c or we'd hit
circular dependencies between module symbols. We also don
From: Bartosz Golaszewski
The 'extern' keyword in headers doesn't have any benefit. Remove them
all from the of_mdio.h header.
Signed-off-by: Bartosz Golaszewski
---
include/linux/of_mdio.h | 37 ++---
1 file changed, 18 insertions(+), 19 del
From: Bartosz Golaszewski
When I first submitted the series adding devm_register_netdev() I was
told during review that it should check if the underlying struct net_device
is managed too before proceeding. I initially accepted this as the right
approach but in the back of my head something
From: Bartosz Golaszewski
Similarily to PHY drivers - there's no reason to require probe() to be
implemented in order to call mdio_device_reset(). MDIO devices can have
resets defined without needing to do anything in probe().
Signed-off-by: Bartosz Golaszewski
---
drivers/ne
From: Bartosz Golaszewski
Keeping the headers in alphabetical order is better for readability and
allows to easily see if given header is already included.
Signed-off-by: Bartosz Golaszewski
---
drivers/net/phy/mdio_device.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a
From: Bartosz Golaszewski
Keeping the headers in alphabetical order is better for readability and
allows to easily see if given header is already included.
Signed-off-by: Bartosz Golaszewski
---
drivers/net/phy/phy_device.c | 28 ++--
1 file changed, 14 insertions
From: Bartosz Golaszewski
The last argument passed to phy_device_create() (c45_ids) is never used
in current mainline outside of the core PHY code - it can only be
configured when reading the PHY ID from phy_device_read_id().
Let's drop this argument treewide.
Signed-off-by: Ba
From: Bartosz Golaszewski
Currently we only call phy_device_reset() if the PHY driver implements
the probe() callback. This is not mandatory and many drivers (e.g.
realtek) don't need probe() for most devices but still can have reset
GPIOs defined. There's no reason to depend on the p
From: Bartosz Golaszewski
Keeping the headers in alphabetical order is better for readability and
allows to easily see if given header is already included.
Signed-off-by: Bartosz Golaszewski
---
drivers/net/phy/mdio_bus.c | 32
1 file changed, 16 insertions
From: Bartosz Golaszewski
get_phy_id() is only called from get_phy_device() so the check for the
0x1fff value can be pulled into the former. This way it'll be easier
to remove get_phy_device() later on.
Signed-off-by: Bartosz Golaszewski
---
drivers/net/phy/phy_device.c | 8 --
From: Bartosz Golaszewski
Move the code requesting the PHY driver module out of phy_device_create()
into a separate helper. This will be later reused when we delay the
module loading.
Signed-off-by: Bartosz Golaszewski
---
drivers/net/phy/phy_device.c | 71
From: Bartosz Golaszewski
Currently the PHY ID is read without taking the PHY out of reset. This
can only work if no resets are defined. This change delays the ID read
until we're actually registering the PHY device - this is needed because
earlier (when creating the device) we don
From: Bartosz Golaszewski
Currently many MAC drivers control the regulator supplying the PHY but
this is conceptually wrong. The regulator should be defined as a property
of the PHY node on the MDIO bus and controlled by the MDIO sub-system.
Add support for an optional PHY regulator which will
From: Bartosz Golaszewski
The MDIO sub-system now supports PHY regulators. Let's reuse the code
to extend this support over to the PHY device.
Signed-off-by: Bartosz Golaszewski
---
drivers/net/phy/phy_device.c | 49
include/linux/phy.h
From: Bartosz Golaszewski
This header refers to struct reset_control but doesn't include any reset
header. The structure definition is probably somehow indirectly pulled in
since no warnings are reported but for the sake of correctness add the
forward declaration for struct reset_co
From: Bartosz Golaszewski
The phy-supply property is often added to MAC nodes but this is wrong
conceptually. These supplies should be part of the PHY node on the
MDIO bus. Add phy-supply property at PHY level to mdio.yaml.
Signed-off-by: Bartosz Golaszewski
---
Documentation/devicetree
From: Bartosz Golaszewski
get_phy_device() has now become just a wrapper for phy_device_create()
with the phy_id argument set to PHY_ID_NONE. Let's remove this function
treewide and replace it with opencoded phy_device_create(). This has the
advantage of being more explicit about the PH
1 - 100 of 235 matches
Mail list logo