* Re: [PATCH 1/2] netpoll: Remove unused EXPORT_SYMBOLs of netpoll_poll and netpoll_poll_dev
From: Harry Wei @ 2011-07-04 6:53 UTC (permalink / raw)
To: Joe Perches; +Cc: amwang, linux-kernel, davem, netdev
In-Reply-To: <282ce7d68b97c4dbfb759c1c0752e6cbddfeeafc.1309482314.git.joe@perches.com>
On Thu, Jun 30, 2011 at 06:08:57PM -0700, Joe Perches wrote:
> Unused symbols waste space.
>
> Commit 0e34e93177fb
> "(netpoll: add generic support for bridge and bonding devices)"
> added the symbol more than a year ago with the promise of "future use".
>
> Because it is so far unused, remove it for now.
> It can be easily readded if or when it actually needs to be used.
>
> cc: WANG Cong <amwang@redhat.com>
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
> include/linux/netpoll.h | 2 --
> net/core/netpoll.c | 6 ++----
> 2 files changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/include/linux/netpoll.h b/include/linux/netpoll.h
> index 79358bb..5dfa091 100644
> --- a/include/linux/netpoll.h
> +++ b/include/linux/netpoll.h
> @@ -40,8 +40,6 @@ struct netpoll_info {
> struct netpoll *netpoll;
> };
>
> -void netpoll_poll_dev(struct net_device *dev);
> -void netpoll_poll(struct netpoll *np);
> void netpoll_send_udp(struct netpoll *np, const char *msg, int len);
> void netpoll_print_options(struct netpoll *np);
> int netpoll_parse_options(struct netpoll *np, char *opt);
> diff --git a/net/core/netpoll.c b/net/core/netpoll.c
> index 18d9cbd..4ce595e 100644
> --- a/net/core/netpoll.c
> +++ b/net/core/netpoll.c
> @@ -177,7 +177,7 @@ static void service_arp_queue(struct netpoll_info *npi)
> }
> }
>
> -void netpoll_poll_dev(struct net_device *dev)
> +static void netpoll_poll_dev(struct net_device *dev)
Hi Joe,
You have removed the function declaration in include/linux/netpoll.h.
And you changed the function like
static void netpoll_poll_dev(...)
{
...
}
But i don't know its usage.
The 'static' before this function just says the active area of 'netpoll_poll_dev'
is in the file net/core/netpoll.c. What is the purpose? Could you please tell me?
Thanks in advance.
> {
> const struct net_device_ops *ops;
>
> @@ -208,13 +208,11 @@ void netpoll_poll_dev(struct net_device *dev)
>
> zap_completion_queue();
> }
> -EXPORT_SYMBOL(netpoll_poll_dev);
>
> -void netpoll_poll(struct netpoll *np)
> +static void netpoll_poll(struct netpoll *np)
> {
> netpoll_poll_dev(np->dev);
> }
> -EXPORT_SYMBOL(netpoll_poll);
>
> static void refill_skbs(void)
> {
> --
> 1.7.6.rc1
^ permalink raw reply
* Re: possible bridge regression in "bridge: implement [add/del]_slave ops"?
From: Alexander Stein @ 2011-07-04 6:46 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: David S. Miller, bridge, netdev
In-Reply-To: <20110630100819.0e4b536f@nehalam.ftrdhcpuser.net>
On Thursday 30 June 2011 19:08:19 Stephen Hemminger wrote:
> On Thu, 30 Jun 2011 10:33:23 +0200
>
> Alexander Stein <alexander.stein@systec-electronic.com> wrote:
> > * echo $(pgrep rstpd) > /var/run/rstpd.pid
> > * brctl addbr br1
> > * echo 1 > /sys/class/net/br1/bridge/stp_state
>
> This bogus. You are running both kernel and spanning
> tree daemon at the same time!
>
> Doing the echo of 1 to stp_state forces kernel spanning
> tree. You want 2 which is what is supposed to be use for user
> mode spanning tree.
Well, at first sight you're right. But looking at the code at
br_stp_set_enabled() in br_stp_if.c it doesn't matter which value you echo
into stp_state, it just have to be non-zero
The detection of usermode oder kernelmode STP is done using the usermode
helper (see br_stp_start). I tried echoing 1, 2 or even 5 into stp_state, with
a working /sbin/bridge-stp I get 2 from stp_state each time.
Maybe it is valuable to change this odd behavior.
Regards,
Alexander
^ permalink raw reply
* Re: [PATCH] net/fec: add device tree probe support
From: Grant Likely @ 2011-07-04 6:38 UTC (permalink / raw)
To: Shawn Guo
Cc: Shawn Guo, patches, netdev, devicetree-discuss, Jason Liu,
David S. Miller, linux-arm-kernel
In-Reply-To: <20110704062521.GD10245@S2100-06.ap.freescale.net>
On Mon, Jul 04, 2011 at 02:25:22PM +0800, Shawn Guo wrote:
> On Sun, Jul 03, 2011 at 11:59:56PM -0600, Grant Likely wrote:
> > On Mon, Jul 04, 2011 at 01:50:22PM +0800, Shawn Guo wrote:
> > > On Sun, Jul 03, 2011 at 03:23:12PM -0600, Grant Likely wrote:
> > > > On Sun, Jul 03, 2011 at 04:06:41PM +0800, Shawn Guo wrote:
> > > > > It adds device tree probe support for fec driver.
> > > > >
> > > > > Signed-off-by: Jason Liu <jason.hui@linaro.org>
> > > > > Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> > > > > Cc: David S. Miller <davem@davemloft.net>
> > > > > Cc: Grant Likely <grant.likely@secretlab.ca>
> > > >
> > > > Minor comments below. After addressing them you can add my:
> > > >
> > > > Acked-by: Grant Likely <grant.likely@secretlab.ca>
> > > >
> > > > I don't see any reason not to merge this one in v3.1
> > > >
> > > > g.
> > > >
> > > > > ---
> > > > > Documentation/devicetree/bindings/net/fsl-fec.txt | 24 ++++
> > > > > drivers/net/fec.c | 120 ++++++++++++++++++++-
> > > > > 2 files changed, 139 insertions(+), 5 deletions(-)
> > > > > create mode 100644 Documentation/devicetree/bindings/net/fsl-fec.txt
> > > > >
> > > > > diff --git a/Documentation/devicetree/bindings/net/fsl-fec.txt b/Documentation/devicetree/bindings/net/fsl-fec.txt
> > > > > new file mode 100644
> > > > > index 0000000..1dad888
> > > > > --- /dev/null
> > > > > +++ b/Documentation/devicetree/bindings/net/fsl-fec.txt
> > > > > @@ -0,0 +1,24 @@
> > > > > +* Freescale Fast Ethernet Controller (FEC)
> > > > > +
> > > > > +Required properties:
> > > > > +- compatible : Should be "fsl,<soc>-fec"
> > > > > +- reg : Address and length of the register set for the device
> > > > > +- interrupts : Should contain fec interrupt
> > > > > +- phy-mode : String, operation mode of the PHY interface.
> > > > > + Supported values are: "mii", "gmii", "sgmii", "tbi", "rmii",
> > > > > + "rgmii", "rgmii-id", "rgmii-rxid", "rgmii-txid", "rtbi".
> > > >
> > > > We don't have a common binding for this yet. Should be
> > > > "fsl,phy-mode".
> > > >
> > > There is nothing really fsl specific.
> >
> > That's not really the point. It might be that phy-mode as you're
> > defining it here will not be sufficient for other ethernet devices.
>
> I'm not defining the phy mode. Instead, it's just a direct mapping
> of 'enum phy_interface_t' found in include/linux/phy.h, which is
> something common and generic, I think?
>
> > You should avoid creating 'generic' property definitions, unless
> > you're doing the leg work of figuring out which devices would use this
> > property and creating multiple users.
> >
>
> Any net device driver currently referring to 'enum phy_interface_t'
> is going to need this property when migrating to dt, I guess.
>
> > So, you may be right that this isn't fsl specific, but it is still
> > good practise to use that "fsl," prefix.
> >
> >
> > > How does thn following patch
> > > look to you?
> > >
> > > ---8<---------
> > > diff --git a/drivers/of/of_net.c b/drivers/of/of_net.c
> > > index 86f334a..cc117db 100644
> > > --- a/drivers/of/of_net.c
> > > +++ b/drivers/of/of_net.c
> > > @@ -8,6 +8,49 @@
> > > #include <linux/etherdevice.h>
> > > #include <linux/kernel.h>
> > > #include <linux/of_net.h>
> > > +#include <linux/phy.h>
> > > +
> > > +/**
> > > + * It maps 'enum phy_interface_t' found in include/linux/phy.h
> > > + * into the device tree binding of 'phy-mode', so that Ethernet
> > > + * device driver can get phy interface from device tree.
> > > + */
> > > +static const char *phy_modes[] = {
> > > + [PHY_INTERFACE_MODE_MII] = "mii",
> > > + [PHY_INTERFACE_MODE_GMII] = "gmii",
> > > + [PHY_INTERFACE_MODE_SGMII] = "sgmii",
> > > + [PHY_INTERFACE_MODE_TBI] = "tbi",
> > > + [PHY_INTERFACE_MODE_RMII] = "rmii",
> > > + [PHY_INTERFACE_MODE_RGMII] = "rgmii",
> > > + [PHY_INTERFACE_MODE_RGMII_ID] = "rgmii-id",
> > > + [PHY_INTERFACE_MODE_RGMII_RXID] = "rgmii-rxid",
> > > + [PHY_INTERFACE_MODE_RGMII_TXID] = "rgmii-txid",
> > > + [PHY_INTERFACE_MODE_RTBI] = "rtbi",
> > > +};
> > > +
> > > +/**
> > > + * of_get_phy_mode - Get phy mode for given device_node
> > > + * @np: Pointer to the given device_node
> > > + *
> > > + * The function gets phy interface string from property 'phy-mode',
> > > + * and return its index in phy_modes table, or errno in error case.
> > > + */
> > > +const int of_get_phy_mode(struct device_node *np)
> > > +{
> > > + const char *pm;
> > > + int err, i;
> > > +
> > > + err = of_property_read_string(np, "phy-mode", &pm);
> > > + if (err < 0)
> > > + return err;
> > > +
> > > + for (i = 0; i < ARRAY_SIZE(phy_modes); i++)
> > > + if (!strcasecmp(pm, phy_modes[i]))
> > > + return i;
> > > +
> > > + return -ENODEV;
> > > +}
> > > +EXPORT_SYMBOL_GPL(of_get_phy_mode);
> >
> > The code looks fine, but I'm just not keen on this until I see
> > multiple users. What are the other DT-aware network drivers doing
> > right now?
> >
> You can find a bunch of examples using 'phy-mode' in this way with
> the grep below.
>
> $ grep phy-mode arch/powerpc/boot/dts/*
>
> The code I can find is drivers/net/ibm_newemac/core.c, function
> emac_init_config. And I think it should use 'enum phy_interface_t'
> than defining its own PHY_MODE_*.
Fair enough. Go ahead and create the common definition. Can you
craft a patch to convert the ibm_newemac driver to use your common
function too?
g.
^ permalink raw reply
* Re: [PATCH] net/fec: add device tree probe support
From: Shawn Guo @ 2011-07-04 6:25 UTC (permalink / raw)
To: Grant Likely
Cc: patches, netdev, devicetree-discuss, Jason Liu, Shawn Guo,
David S. Miller, linux-arm-kernel
In-Reply-To: <20110704055956.GD15152@ponder.secretlab.ca>
On Sun, Jul 03, 2011 at 11:59:56PM -0600, Grant Likely wrote:
> On Mon, Jul 04, 2011 at 01:50:22PM +0800, Shawn Guo wrote:
> > On Sun, Jul 03, 2011 at 03:23:12PM -0600, Grant Likely wrote:
> > > On Sun, Jul 03, 2011 at 04:06:41PM +0800, Shawn Guo wrote:
> > > > It adds device tree probe support for fec driver.
> > > >
> > > > Signed-off-by: Jason Liu <jason.hui@linaro.org>
> > > > Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> > > > Cc: David S. Miller <davem@davemloft.net>
> > > > Cc: Grant Likely <grant.likely@secretlab.ca>
> > >
> > > Minor comments below. After addressing them you can add my:
> > >
> > > Acked-by: Grant Likely <grant.likely@secretlab.ca>
> > >
> > > I don't see any reason not to merge this one in v3.1
> > >
> > > g.
> > >
> > > > ---
> > > > Documentation/devicetree/bindings/net/fsl-fec.txt | 24 ++++
> > > > drivers/net/fec.c | 120 ++++++++++++++++++++-
> > > > 2 files changed, 139 insertions(+), 5 deletions(-)
> > > > create mode 100644 Documentation/devicetree/bindings/net/fsl-fec.txt
> > > >
> > > > diff --git a/Documentation/devicetree/bindings/net/fsl-fec.txt b/Documentation/devicetree/bindings/net/fsl-fec.txt
> > > > new file mode 100644
> > > > index 0000000..1dad888
> > > > --- /dev/null
> > > > +++ b/Documentation/devicetree/bindings/net/fsl-fec.txt
> > > > @@ -0,0 +1,24 @@
> > > > +* Freescale Fast Ethernet Controller (FEC)
> > > > +
> > > > +Required properties:
> > > > +- compatible : Should be "fsl,<soc>-fec"
> > > > +- reg : Address and length of the register set for the device
> > > > +- interrupts : Should contain fec interrupt
> > > > +- phy-mode : String, operation mode of the PHY interface.
> > > > + Supported values are: "mii", "gmii", "sgmii", "tbi", "rmii",
> > > > + "rgmii", "rgmii-id", "rgmii-rxid", "rgmii-txid", "rtbi".
> > >
> > > We don't have a common binding for this yet. Should be
> > > "fsl,phy-mode".
> > >
> > There is nothing really fsl specific.
>
> That's not really the point. It might be that phy-mode as you're
> defining it here will not be sufficient for other ethernet devices.
I'm not defining the phy mode. Instead, it's just a direct mapping
of 'enum phy_interface_t' found in include/linux/phy.h, which is
something common and generic, I think?
> You should avoid creating 'generic' property definitions, unless
> you're doing the leg work of figuring out which devices would use this
> property and creating multiple users.
>
Any net device driver currently referring to 'enum phy_interface_t'
is going to need this property when migrating to dt, I guess.
> So, you may be right that this isn't fsl specific, but it is still
> good practise to use that "fsl," prefix.
>
>
> > How does thn following patch
> > look to you?
> >
> > ---8<---------
> > diff --git a/drivers/of/of_net.c b/drivers/of/of_net.c
> > index 86f334a..cc117db 100644
> > --- a/drivers/of/of_net.c
> > +++ b/drivers/of/of_net.c
> > @@ -8,6 +8,49 @@
> > #include <linux/etherdevice.h>
> > #include <linux/kernel.h>
> > #include <linux/of_net.h>
> > +#include <linux/phy.h>
> > +
> > +/**
> > + * It maps 'enum phy_interface_t' found in include/linux/phy.h
> > + * into the device tree binding of 'phy-mode', so that Ethernet
> > + * device driver can get phy interface from device tree.
> > + */
> > +static const char *phy_modes[] = {
> > + [PHY_INTERFACE_MODE_MII] = "mii",
> > + [PHY_INTERFACE_MODE_GMII] = "gmii",
> > + [PHY_INTERFACE_MODE_SGMII] = "sgmii",
> > + [PHY_INTERFACE_MODE_TBI] = "tbi",
> > + [PHY_INTERFACE_MODE_RMII] = "rmii",
> > + [PHY_INTERFACE_MODE_RGMII] = "rgmii",
> > + [PHY_INTERFACE_MODE_RGMII_ID] = "rgmii-id",
> > + [PHY_INTERFACE_MODE_RGMII_RXID] = "rgmii-rxid",
> > + [PHY_INTERFACE_MODE_RGMII_TXID] = "rgmii-txid",
> > + [PHY_INTERFACE_MODE_RTBI] = "rtbi",
> > +};
> > +
> > +/**
> > + * of_get_phy_mode - Get phy mode for given device_node
> > + * @np: Pointer to the given device_node
> > + *
> > + * The function gets phy interface string from property 'phy-mode',
> > + * and return its index in phy_modes table, or errno in error case.
> > + */
> > +const int of_get_phy_mode(struct device_node *np)
> > +{
> > + const char *pm;
> > + int err, i;
> > +
> > + err = of_property_read_string(np, "phy-mode", &pm);
> > + if (err < 0)
> > + return err;
> > +
> > + for (i = 0; i < ARRAY_SIZE(phy_modes); i++)
> > + if (!strcasecmp(pm, phy_modes[i]))
> > + return i;
> > +
> > + return -ENODEV;
> > +}
> > +EXPORT_SYMBOL_GPL(of_get_phy_mode);
>
> The code looks fine, but I'm just not keen on this until I see
> multiple users. What are the other DT-aware network drivers doing
> right now?
>
You can find a bunch of examples using 'phy-mode' in this way with
the grep below.
$ grep phy-mode arch/powerpc/boot/dts/*
The code I can find is drivers/net/ibm_newemac/core.c, function
emac_init_config. And I think it should use 'enum phy_interface_t'
than defining its own PHY_MODE_*.
--
Regards,
Shawn
^ permalink raw reply
* Re: [PATCH] net/fec: add device tree probe support
From: Grant Likely @ 2011-07-04 5:59 UTC (permalink / raw)
To: Shawn Guo
Cc: Shawn Guo, patches, netdev, devicetree-discuss, Jason Liu,
David S. Miller, linux-arm-kernel
In-Reply-To: <20110704055021.GC10245@S2100-06.ap.freescale.net>
On Mon, Jul 04, 2011 at 01:50:22PM +0800, Shawn Guo wrote:
> On Sun, Jul 03, 2011 at 03:23:12PM -0600, Grant Likely wrote:
> > On Sun, Jul 03, 2011 at 04:06:41PM +0800, Shawn Guo wrote:
> > > It adds device tree probe support for fec driver.
> > >
> > > Signed-off-by: Jason Liu <jason.hui@linaro.org>
> > > Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> > > Cc: David S. Miller <davem@davemloft.net>
> > > Cc: Grant Likely <grant.likely@secretlab.ca>
> >
> > Minor comments below. After addressing them you can add my:
> >
> > Acked-by: Grant Likely <grant.likely@secretlab.ca>
> >
> > I don't see any reason not to merge this one in v3.1
> >
> > g.
> >
> > > ---
> > > Documentation/devicetree/bindings/net/fsl-fec.txt | 24 ++++
> > > drivers/net/fec.c | 120 ++++++++++++++++++++-
> > > 2 files changed, 139 insertions(+), 5 deletions(-)
> > > create mode 100644 Documentation/devicetree/bindings/net/fsl-fec.txt
> > >
> > > diff --git a/Documentation/devicetree/bindings/net/fsl-fec.txt b/Documentation/devicetree/bindings/net/fsl-fec.txt
> > > new file mode 100644
> > > index 0000000..1dad888
> > > --- /dev/null
> > > +++ b/Documentation/devicetree/bindings/net/fsl-fec.txt
> > > @@ -0,0 +1,24 @@
> > > +* Freescale Fast Ethernet Controller (FEC)
> > > +
> > > +Required properties:
> > > +- compatible : Should be "fsl,<soc>-fec"
> > > +- reg : Address and length of the register set for the device
> > > +- interrupts : Should contain fec interrupt
> > > +- phy-mode : String, operation mode of the PHY interface.
> > > + Supported values are: "mii", "gmii", "sgmii", "tbi", "rmii",
> > > + "rgmii", "rgmii-id", "rgmii-rxid", "rgmii-txid", "rtbi".
> >
> > We don't have a common binding for this yet. Should be
> > "fsl,phy-mode".
> >
> There is nothing really fsl specific.
That's not really the point. It might be that phy-mode as you're
defining it here will not be sufficient for other ethernet devices.
You should avoid creating 'generic' property definitions, unless
you're doing the leg work of figuring out which devices would use this
property and creating multiple users.
So, you may be right that this isn't fsl specific, but it is still
good practise to use that "fsl," prefix.
> How does thn following patch
> look to you?
>
> ---8<---------
> diff --git a/drivers/of/of_net.c b/drivers/of/of_net.c
> index 86f334a..cc117db 100644
> --- a/drivers/of/of_net.c
> +++ b/drivers/of/of_net.c
> @@ -8,6 +8,49 @@
> #include <linux/etherdevice.h>
> #include <linux/kernel.h>
> #include <linux/of_net.h>
> +#include <linux/phy.h>
> +
> +/**
> + * It maps 'enum phy_interface_t' found in include/linux/phy.h
> + * into the device tree binding of 'phy-mode', so that Ethernet
> + * device driver can get phy interface from device tree.
> + */
> +static const char *phy_modes[] = {
> + [PHY_INTERFACE_MODE_MII] = "mii",
> + [PHY_INTERFACE_MODE_GMII] = "gmii",
> + [PHY_INTERFACE_MODE_SGMII] = "sgmii",
> + [PHY_INTERFACE_MODE_TBI] = "tbi",
> + [PHY_INTERFACE_MODE_RMII] = "rmii",
> + [PHY_INTERFACE_MODE_RGMII] = "rgmii",
> + [PHY_INTERFACE_MODE_RGMII_ID] = "rgmii-id",
> + [PHY_INTERFACE_MODE_RGMII_RXID] = "rgmii-rxid",
> + [PHY_INTERFACE_MODE_RGMII_TXID] = "rgmii-txid",
> + [PHY_INTERFACE_MODE_RTBI] = "rtbi",
> +};
> +
> +/**
> + * of_get_phy_mode - Get phy mode for given device_node
> + * @np: Pointer to the given device_node
> + *
> + * The function gets phy interface string from property 'phy-mode',
> + * and return its index in phy_modes table, or errno in error case.
> + */
> +const int of_get_phy_mode(struct device_node *np)
> +{
> + const char *pm;
> + int err, i;
> +
> + err = of_property_read_string(np, "phy-mode", &pm);
> + if (err < 0)
> + return err;
> +
> + for (i = 0; i < ARRAY_SIZE(phy_modes); i++)
> + if (!strcasecmp(pm, phy_modes[i]))
> + return i;
> +
> + return -ENODEV;
> +}
> +EXPORT_SYMBOL_GPL(of_get_phy_mode);
The code looks fine, but I'm just not keen on this until I see
multiple users. What are the other DT-aware network drivers doing
right now?
>
> /**
> * Search the device tree for the best MAC address to use. 'mac-address' is
> ------------
>
> [...]
> > > @@ -734,8 +748,25 @@ static void __inline__ fec_get_mac(struct net_device *ndev)
> > > */
> > > iap = macaddr;
> > >
> > > +#ifdef CONFIG_OF
> > > + /*
> > > + * 2) from device tree data
> > > + */
> > > + if (!is_valid_ether_addr(iap)) {
> > > + struct device_node *np = fep->pdev->dev.of_node;
> > > + if (np) {
> > > + const char *mac;
> > > + int err;
> > > + err = of_property_read_string(np,
> > > + "local-mac-address", &mac);
> > > + if (err)
> > > + iap = (unsigned char *) mac;
> >
> > There is already a function for doing this. of_get_mac_address().
> > And mac address is *not* a string, it is a byte array.
> >
> Yes, I mistakenly converted of_find_property to of_property_read_string.
> Anyway, I'm now using of_get_mac_address as you suggested.
:)
g.
^ permalink raw reply
* Re: [PATCH] net/fec: add device tree probe support
From: Shawn Guo @ 2011-07-04 5:50 UTC (permalink / raw)
To: Grant Likely
Cc: Shawn Guo, patches, netdev, devicetree-discuss, Jason Liu,
David S. Miller, linux-arm-kernel
In-Reply-To: <20110703212312.GD13742@ponder.secretlab.ca>
On Sun, Jul 03, 2011 at 03:23:12PM -0600, Grant Likely wrote:
> On Sun, Jul 03, 2011 at 04:06:41PM +0800, Shawn Guo wrote:
> > It adds device tree probe support for fec driver.
> >
> > Signed-off-by: Jason Liu <jason.hui@linaro.org>
> > Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> > Cc: David S. Miller <davem@davemloft.net>
> > Cc: Grant Likely <grant.likely@secretlab.ca>
>
> Minor comments below. After addressing them you can add my:
>
> Acked-by: Grant Likely <grant.likely@secretlab.ca>
>
> I don't see any reason not to merge this one in v3.1
>
> g.
>
> > ---
> > Documentation/devicetree/bindings/net/fsl-fec.txt | 24 ++++
> > drivers/net/fec.c | 120 ++++++++++++++++++++-
> > 2 files changed, 139 insertions(+), 5 deletions(-)
> > create mode 100644 Documentation/devicetree/bindings/net/fsl-fec.txt
> >
> > diff --git a/Documentation/devicetree/bindings/net/fsl-fec.txt b/Documentation/devicetree/bindings/net/fsl-fec.txt
> > new file mode 100644
> > index 0000000..1dad888
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/net/fsl-fec.txt
> > @@ -0,0 +1,24 @@
> > +* Freescale Fast Ethernet Controller (FEC)
> > +
> > +Required properties:
> > +- compatible : Should be "fsl,<soc>-fec"
> > +- reg : Address and length of the register set for the device
> > +- interrupts : Should contain fec interrupt
> > +- phy-mode : String, operation mode of the PHY interface.
> > + Supported values are: "mii", "gmii", "sgmii", "tbi", "rmii",
> > + "rgmii", "rgmii-id", "rgmii-rxid", "rgmii-txid", "rtbi".
>
> We don't have a common binding for this yet. Should be
> "fsl,phy-mode".
>
There is nothing really fsl specific. How does the following patch
look to you?
---8<---------
diff --git a/drivers/of/of_net.c b/drivers/of/of_net.c
index 86f334a..cc117db 100644
--- a/drivers/of/of_net.c
+++ b/drivers/of/of_net.c
@@ -8,6 +8,49 @@
#include <linux/etherdevice.h>
#include <linux/kernel.h>
#include <linux/of_net.h>
+#include <linux/phy.h>
+
+/**
+ * It maps 'enum phy_interface_t' found in include/linux/phy.h
+ * into the device tree binding of 'phy-mode', so that Ethernet
+ * device driver can get phy interface from device tree.
+ */
+static const char *phy_modes[] = {
+ [PHY_INTERFACE_MODE_MII] = "mii",
+ [PHY_INTERFACE_MODE_GMII] = "gmii",
+ [PHY_INTERFACE_MODE_SGMII] = "sgmii",
+ [PHY_INTERFACE_MODE_TBI] = "tbi",
+ [PHY_INTERFACE_MODE_RMII] = "rmii",
+ [PHY_INTERFACE_MODE_RGMII] = "rgmii",
+ [PHY_INTERFACE_MODE_RGMII_ID] = "rgmii-id",
+ [PHY_INTERFACE_MODE_RGMII_RXID] = "rgmii-rxid",
+ [PHY_INTERFACE_MODE_RGMII_TXID] = "rgmii-txid",
+ [PHY_INTERFACE_MODE_RTBI] = "rtbi",
+};
+
+/**
+ * of_get_phy_mode - Get phy mode for given device_node
+ * @np: Pointer to the given device_node
+ *
+ * The function gets phy interface string from property 'phy-mode',
+ * and return its index in phy_modes table, or errno in error case.
+ */
+const int of_get_phy_mode(struct device_node *np)
+{
+ const char *pm;
+ int err, i;
+
+ err = of_property_read_string(np, "phy-mode", &pm);
+ if (err < 0)
+ return err;
+
+ for (i = 0; i < ARRAY_SIZE(phy_modes); i++)
+ if (!strcasecmp(pm, phy_modes[i]))
+ return i;
+
+ return -ENODEV;
+}
+EXPORT_SYMBOL_GPL(of_get_phy_mode);
/**
* Search the device tree for the best MAC address to use. 'mac-address' is
------------
[...]
> > @@ -734,8 +748,25 @@ static void __inline__ fec_get_mac(struct net_device *ndev)
> > */
> > iap = macaddr;
> >
> > +#ifdef CONFIG_OF
> > + /*
> > + * 2) from device tree data
> > + */
> > + if (!is_valid_ether_addr(iap)) {
> > + struct device_node *np = fep->pdev->dev.of_node;
> > + if (np) {
> > + const char *mac;
> > + int err;
> > + err = of_property_read_string(np,
> > + "local-mac-address", &mac);
> > + if (err)
> > + iap = (unsigned char *) mac;
>
> There is already a function for doing this. of_get_mac_address().
> And mac address is *not* a string, it is a byte array.
>
Yes, I mistakenly converted of_find_property to of_property_read_string.
Anyway, I'm now using of_get_mac_address as you suggested.
--
Regards,
Shawn
^ permalink raw reply related
* Re: [PATCH] natsemi: silence dma-debug warnings
From: David Miller @ 2011-07-04 5:34 UTC (permalink / raw)
To: fujita.tomonori; +Cc: thockin, netdev, jim.cromie
In-Reply-To: <20110704142153O.fujita.tomonori@lab.ntt.co.jp>
From: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Date: Mon, 4 Jul 2011 14:30:19 +0900
> This silences dma-debug warnings:
>
> https://lkml.org/lkml/2011/6/30/341
...
> Reported-by: Jim Cromie <jim.cromie@gmail.com>
> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
> Tested-by: Jim Cromie <jim.cromie@gmail.com>
Applied, thanks!
^ permalink raw reply
* [PATCH] natsemi: silence dma-debug warnings
From: FUJITA Tomonori @ 2011-07-04 5:30 UTC (permalink / raw)
To: thockin; +Cc: netdev, jim.cromie
This silences dma-debug warnings:
https://lkml.org/lkml/2011/6/30/341
------------[ cut here ]------------
WARNING: at /home/jimc/projects/lx/linux-2.6/lib/dma-debug.c:820
check_unmap+0x1fe/0x56a()
natsemi 0000:00:06.0: DMA-API: device driver frees DMA memory with
different size [device address=0x0000000006ef0040] [map size=1538
bytes] [unmap size=1522 bytes]
Modules linked in: pc8736x_gpio pc87360 hwmon_vid scx200_gpio nsc_gpio
scx200_hrt scx200_acb i2c_core arc4 rtl8180 mac80211 eeprom_93cx6
cfg80211 pcspkr rfkill scx200 ide_gd_mod ide_pci_generic ohci_hcd
usbcore sc1200 ide_core
Pid: 870, comm: collector Not tainted 3.0.0-rc5-sk-00080-gca56a95 #1
Call Trace:
[<c011a556>] warn_slowpath_common+0x4a/0x5f
[<c02565cb>] ? check_unmap+0x1fe/0x56a
[<c011a5cf>] warn_slowpath_fmt+0x26/0x2a
[<c02565cb>] check_unmap+0x1fe/0x56a
[<c0256aaa>] debug_dma_unmap_page+0x53/0x5b
[<c029d6cd>] pci_unmap_single+0x4d/0x57
[<c029ea0a>] natsemi_poll+0x343/0x5ca
[<c0116f41>] ? try_to_wake_up+0xea/0xfc
[<c0122416>] ? spin_unlock_irq.clone.28+0x18/0x23
[<c02d4667>] net_rx_action+0x3f/0xe5
[<c011e35e>] __do_softirq+0x5b/0xd1
[<c011e303>] ? local_bh_enable+0xa/0xa
<IRQ> [<c011e54b>] ? irq_exit+0x34/0x75
[<c01034b9>] ? do_IRQ+0x66/0x79
[<c034e869>] ? common_interrupt+0x29/0x30
[<c0115ed0>] ? finish_task_switch.clone.118+0x31/0x72
[<c034cb92>] ? schedule+0x3b2/0x3f1
[<c012f4b0>] ? hrtimer_start_range_ns+0x10/0x12
[<c012f4ce>] ? hrtimer_start_expires+0x1c/0x24
[<c034d5aa>] ? schedule_hrtimeout_range_clock+0x8e/0xb4
[<c012ed27>] ? update_rmtp+0x68/0x68
[<c034d5da>] ? schedule_hrtimeout_range+0xa/0xc
[<c017a913>] ? poll_schedule_timeout+0x27/0x3e
[<c017b051>] ? do_select+0x488/0x4cd
[<c0115ee2>] ? finish_task_switch.clone.118+0x43/0x72
[<c01157ad>] ? need_resched+0x14/0x1e
[<c017a99e>] ? poll_freewait+0x74/0x74
[<c01157ad>] ? need_resched+0x14/0x1e
[<c034cbc1>] ? schedule+0x3e1/0x3f1
[<c011e55e>] ? irq_exit+0x47/0x75
[<c01157ad>] ? need_resched+0x14/0x1e
[<c034cf8a>] ? preempt_schedule_irq+0x44/0x4a
[<c034dd1e>] ? need_resched+0x17/0x19
[<c024bc12>] ? put_dec_full+0x7b/0xaa
[<c0240060>] ? blkdev_ioctl+0x434/0x618
[<c024bc70>] ? put_dec+0x2f/0x6d
[<c024c6a5>] ? number.clone.1+0x10b/0x1d0
[<c034cf8a>] ? preempt_schedule_irq+0x44/0x4a
[<c034dd1e>] ? need_resched+0x17/0x19
[<c024d046>] ? vsnprintf+0x225/0x264
[<c024cea0>] ? vsnprintf+0x7f/0x264
[<c018346f>] ? seq_printf+0x22/0x40
[<c01a2fcc>] ? do_task_stat+0x582/0x5a3
[<c017a913>] ? poll_schedule_timeout+0x27/0x3e
[<c017b1b5>] ? core_sys_select+0x11f/0x1a3
[<c017a913>] ? poll_schedule_timeout+0x27/0x3e
[<c01a34a1>] ? proc_tgid_stat+0xd/0xf
[<c012357c>] ? recalc_sigpending+0x32/0x35
[<c0123b9c>] ? __set_task_blocked+0x64/0x6a
[<c011dfb0>] ? timespec_add_safe+0x24/0x48
[<c0123449>] ? spin_unlock_irq.clone.16+0x18/0x23
[<c017b3a1>] ? sys_pselect6+0xe5/0x13e
[<c034dd65>] ? syscall_call+0x7/0xb
[<c0340000>] ? rpc_clntdir_depopulate+0x26/0x30
---[ end trace 180dcac41a50938b ]---
Reported-by: Jim Cromie <jim.cromie@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Tested-by: Jim Cromie <jim.cromie@gmail.com>
---
drivers/net/natsemi.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/net/natsemi.c b/drivers/net/natsemi.c
index b78be08..8f8b65a 100644
--- a/drivers/net/natsemi.c
+++ b/drivers/net/natsemi.c
@@ -2360,7 +2360,8 @@ static void netdev_rx(struct net_device *dev, int *work_done, int work_to_do)
PCI_DMA_FROMDEVICE);
} else {
pci_unmap_single(np->pci_dev, np->rx_dma[entry],
- buflen, PCI_DMA_FROMDEVICE);
+ buflen + NATSEMI_PADDING,
+ PCI_DMA_FROMDEVICE);
skb_put(skb = np->rx_skbuff[entry], pkt_len);
np->rx_skbuff[entry] = NULL;
}
--
1.7.2.5
^ permalink raw reply related
* Re: [PATCH] net: sh_eth: remove __flush_purge_region
From: David Miller @ 2011-07-04 3:10 UTC (permalink / raw)
To: yoshihiro.shimoda.uh; +Cc: netdev, linux-sh
In-Reply-To: <4E0D8ABD.9030102@renesas.com>
From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Date: Fri, 01 Jul 2011 17:52:13 +0900
> It is a function of SuperH architecture. There is no good to use
> the function on a driver generally. So, the driver uses
> dma_map_single() instead of __flush_purge_region.
>
> Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Applied.
^ permalink raw reply
* Re: [PATCH] af_econet: Use current logging styles and neatening
From: David Miller @ 2011-07-04 3:05 UTC (permalink / raw)
To: joe; +Cc: netdev, linux-kernel, philb
In-Reply-To: <8e47a6e010a39bd35d3544311dd451abda8b7fb3.1309717580.git.joe@perches.com>
From: Joe Perches <joe@perches.com>
Date: Sun, 3 Jul 2011 11:28:33 -0700
> Use pr_fmt() without KBUILD_MODNAME to allow AUN and econet prefixes.
> Convert printks with KERN_DEBUG to pr_debug.
> Hoist assigns from if.
> 80 column wrapping.
> Move open braces to end of line.
>
> Signed-off-by: Joe Perches <joe@perches.com>
Applied, thanks.
^ permalink raw reply
* Re: [PATCH 2/2] netpoll: Remove wrapper function netpoll_poll
From: David Miller @ 2011-07-04 3:02 UTC (permalink / raw)
To: joe; +Cc: linux-kernel, amwang, netdev
In-Reply-To: <6d0de0ce0430d29d1808ecba1ce306ccca52247e.1309482314.git.joe@perches.com>
From: Joe Perches <joe@perches.com>
Date: Thu, 30 Jun 2011 18:08:58 -0700
> Too trivial to live.
>
> cc: WANG Cong <amwang@redhat.com>
> Signed-off-by: Joe Perches <joe@perches.com>
Applied.
^ permalink raw reply
* Re: [PATCH 1/2] netpoll: Remove unused EXPORT_SYMBOLs of netpoll_poll and netpoll_poll_dev
From: David Miller @ 2011-07-04 3:02 UTC (permalink / raw)
To: joe; +Cc: linux-kernel, amwang, netdev
In-Reply-To: <282ce7d68b97c4dbfb759c1c0752e6cbddfeeafc.1309482314.git.joe@perches.com>
From: Joe Perches <joe@perches.com>
Date: Thu, 30 Jun 2011 18:08:57 -0700
> Unused symbols waste space.
>
> Commit 0e34e93177fb
> "(netpoll: add generic support for bridge and bonding devices)"
> added the symbol more than a year ago with the promise of "future use".
>
> Because it is so far unused, remove it for now.
> It can be easily readded if or when it actually needs to be used.
>
> cc: WANG Cong <amwang@redhat.com>
> Signed-off-by: Joe Perches <joe@perches.com>
Applied.
^ permalink raw reply
* Re: [PATCH] net: 8139too: Initial necessary vlan_features to support vlan
From: David Miller @ 2011-07-04 2:54 UTC (permalink / raw)
To: romieu; +Cc: shanwei, netdev, adobriyan, tj
In-Reply-To: <20110702095138.GA4736@electric-eye.fr.zoreil.com>
From: Francois Romieu <romieu@fr.zoreil.com>
Date: Sat, 2 Jul 2011 11:51:38 +0200
> Shan Wei <shanwei@cn.fujitsu.com> :
>> Offload setting of vlan device requires
>> vlan_features to be initialed.
> [...]
>> @@ -993,6 +993,7 @@ static int __devinit rtl8139_init_one (struct pci_dev *pdev,
>> * features
>> */
>> dev->features |= NETIF_F_SG | NETIF_F_HW_CSUM | NETIF_F_HIGHDMA;
>> + dev->vlan_features = dev->features;
>
> /* note: the hardware is not capable of sg/csum/highdma, however
> * through the use of skb_copy_and_csum_dev we enable these
> * features
> */
>
> The commit message is a bit misleading wrt hardware capabilities but the
> patch makes sense.
>
> Acked-by: Francois Romieu <romieu@fr.zoreil.com>
Applied.
^ permalink raw reply
* Re: [rfc] Remove member .name from struct netpoll
From: Cong Wang @ 2011-07-04 2:07 UTC (permalink / raw)
To: Joe Perches; +Cc: netdev, LKML, Matt Mackall
In-Reply-To: <1309540071.7277.63.camel@Joe-Laptop>
于 2011年07月02日 01:07, Joe Perches 写道:
> struct netpoll has member .name
>
> struct netpoll {
> struct net_device *dev;
> char dev_name[IFNAMSIZ];
> const char *name;
> [...]
> };
>
> that is set only by netconsole.c
>
> static struct netconsole_target *alloc_param_target(char *target_config)
> {
> [...]
> nt->np.name = "netconsole";
>
> and used only by net/core/netpoll.c to emit "netconsole: " on
> logging messages.
>
Probably this is due to that in history netdump was another user of it.
>
> Are there out of tree users or plans to use "struct netpoll"
> by other modules?
>
AFAIK, netoops will use it too, see
https://lkml.org/lkml/2010/11/2/299
Cc'ing Matt in case I miss something...
Thanks.
^ permalink raw reply
* Re: [PATCH] net/fec: add device tree probe support
From: Grant Likely @ 2011-07-03 21:23 UTC (permalink / raw)
To: Shawn Guo
Cc: netdev, linux-arm-kernel, devicetree-discuss, patches, Jason Liu,
David S. Miller
In-Reply-To: <1309680401-22904-1-git-send-email-shawn.guo@linaro.org>
On Sun, Jul 03, 2011 at 04:06:41PM +0800, Shawn Guo wrote:
> It adds device tree probe support for fec driver.
>
> Signed-off-by: Jason Liu <jason.hui@linaro.org>
> Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> Cc: David S. Miller <davem@davemloft.net>
> Cc: Grant Likely <grant.likely@secretlab.ca>
Minor comments below. After addressing them you can add my:
Acked-by: Grant Likely <grant.likely@secretlab.ca>
I don't see any reason not to merge this one in v3.1
g.
> ---
> Documentation/devicetree/bindings/net/fsl-fec.txt | 24 ++++
> drivers/net/fec.c | 120 ++++++++++++++++++++-
> 2 files changed, 139 insertions(+), 5 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/net/fsl-fec.txt
>
> diff --git a/Documentation/devicetree/bindings/net/fsl-fec.txt b/Documentation/devicetree/bindings/net/fsl-fec.txt
> new file mode 100644
> index 0000000..1dad888
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/net/fsl-fec.txt
> @@ -0,0 +1,24 @@
> +* Freescale Fast Ethernet Controller (FEC)
> +
> +Required properties:
> +- compatible : Should be "fsl,<soc>-fec"
> +- reg : Address and length of the register set for the device
> +- interrupts : Should contain fec interrupt
> +- phy-mode : String, operation mode of the PHY interface.
> + Supported values are: "mii", "gmii", "sgmii", "tbi", "rmii",
> + "rgmii", "rgmii-id", "rgmii-rxid", "rgmii-txid", "rtbi".
We don't have a common binding for this yet. Should be
"fsl,phy-mode".
> +- gpios : Should specify the gpio for phy reset
> +
> +Optional properties:
> +- local-mac-address : 6 bytes, mac address
> +
> +Example:
> +
> +fec@83fec000 {
> + compatible = "fsl,imx51-fec", "fsl,imx27-fec";
> + reg = <0x83fec000 0x4000>;
> + interrupts = <87>;
> + phy-mode = "mii";
> + gpios = <&gpio1 14 0>; /* phy-reset, GPIO2_14 */
> + local-mac-address = [00 04 9F 01 1B B9];
> +};
> diff --git a/drivers/net/fec.c b/drivers/net/fec.c
> index 7ae3f28..3ee05ff 100644
> --- a/drivers/net/fec.c
> +++ b/drivers/net/fec.c
> @@ -44,6 +44,9 @@
> #include <linux/platform_device.h>
> #include <linux/phy.h>
> #include <linux/fec.h>
> +#include <linux/of.h>
> +#include <linux/of_device.h>
> +#include <linux/of_gpio.h>
>
> #include <asm/cacheflush.h>
>
> @@ -78,6 +81,17 @@ static struct platform_device_id fec_devtype[] = {
> { }
> };
>
> +enum fec_type {
> + IMX27_FEC,
> + IMX28_FEC,
> +};
> +
> +static const struct of_device_id fec_dt_ids[] = {
> + { .compatible = "fsl,imx27-fec", .data = &fec_devtype[IMX27_FEC], },
> + { .compatible = "fsl,imx28-fec", .data = &fec_devtype[IMX28_FEC], },
Personally, I'd drop the fec_devtype array entirely and have discrete
structures for each, but that isn't a big enough objection to withhold
my acked-by.
> + { /* sentinel */ },
Drop the trailing comma.
> +};
> +
> static unsigned char macaddr[ETH_ALEN];
> module_param_array(macaddr, byte, NULL, 0);
> MODULE_PARM_DESC(macaddr, "FEC Ethernet MAC address");
> @@ -734,8 +748,25 @@ static void __inline__ fec_get_mac(struct net_device *ndev)
> */
> iap = macaddr;
>
> +#ifdef CONFIG_OF
> + /*
> + * 2) from device tree data
> + */
> + if (!is_valid_ether_addr(iap)) {
> + struct device_node *np = fep->pdev->dev.of_node;
> + if (np) {
> + const char *mac;
> + int err;
> + err = of_property_read_string(np,
> + "local-mac-address", &mac);
> + if (err)
> + iap = (unsigned char *) mac;
There is already a function for doing this. of_get_mac_address().
And mac address is *not* a string, it is a byte array.
> + }
> + }
> +#endif
> +
> /*
> - * 2) from flash or fuse (via platform data)
> + * 3) from flash or fuse (via platform data)
> */
> if (!is_valid_ether_addr(iap)) {
> #ifdef CONFIG_M5272
> @@ -748,7 +779,7 @@ static void __inline__ fec_get_mac(struct net_device *ndev)
> }
>
> /*
> - * 3) FEC mac registers set by bootloader
> + * 4) FEC mac registers set by bootloader
> */
> if (!is_valid_ether_addr(iap)) {
> *((unsigned long *) &tmpaddr[0]) =
> @@ -1358,6 +1389,72 @@ static int fec_enet_init(struct net_device *ndev)
> return 0;
> }
>
> +#ifdef CONFIG_OF
> +static int __devinit fec_get_phy_mode_dt(struct platform_device *pdev)
> +{
> + struct device_node *np = pdev->dev.of_node;
> + int err, i;
> + const char *pm, *phy_modes[] = {
> + [PHY_INTERFACE_MODE_MII] = "mii",
> + [PHY_INTERFACE_MODE_GMII] = "gmii",
> + [PHY_INTERFACE_MODE_SGMII] = "sgmii",
> + [PHY_INTERFACE_MODE_TBI] = "tbi",
> + [PHY_INTERFACE_MODE_RMII] = "rmii",
> + [PHY_INTERFACE_MODE_RGMII] = "rgmii",
> + [PHY_INTERFACE_MODE_RGMII_ID] = "rgmii-id",
> + [PHY_INTERFACE_MODE_RGMII_RXID] = "rgmii-rxid",
> + [PHY_INTERFACE_MODE_RGMII_TXID] = "rgmii-txid",
> + [PHY_INTERFACE_MODE_RTBI] = "rtbi",
> + };
The phymodes table should be defined outside of the function.
> +
> + if (np) {
> + err = of_property_read_string(np, "phy-mode", &pm);
> + if (err)
> + return err;
> + for (i = 0; i < ARRAY_SIZE(phy_modes); i++)
> + if (!strcasecmp(pm, phy_modes[i]))
> + return i;
> + }
> +
> + return -ENODEV;
> +}
> +
> +static int __devinit fec_reset_phy(struct platform_device *pdev)
> +{
> + int err, phy_reset;
> + struct device_node *np = pdev->dev.of_node;
> +
> + if (!np)
> + return -ENODEV;
> +
> + phy_reset = of_get_gpio(np, 0);
> + err = gpio_request_one(phy_reset, GPIOF_OUT_INIT_LOW, "phy-reset");
> + if (err) {
> + pr_warn("FEC: failed to get gpio phy-reset: %d\n", err);
> + return err;
> + }
> +
> + msleep(1);
> + gpio_set_value(phy_reset, 1);
> +
> + return 0;
> +}
> +#else /* CONFIG_OF */
> +static inline int fec_get_phy_mode_dt(struct platform_device *pdev)
> +{
> + return -ENODEV;
> +}
> +
> +static inline int fec_reset_phy(struct platform_device *pdev)
> +{
> + /*
> + * In case of platform probe, the reset has been done
> + * by machine code.
> + */
> + return 0;
> +}
> +#endif /* CONFIG_OF */
> +
> static int __devinit
> fec_probe(struct platform_device *pdev)
> {
> @@ -1366,6 +1463,11 @@ fec_probe(struct platform_device *pdev)
> struct net_device *ndev;
> int i, irq, ret = 0;
> struct resource *r;
> + const struct of_device_id *of_id;
> +
> + of_id = of_match_device(fec_dt_ids, &pdev->dev);
> + if (of_id)
> + pdev->id_entry = (struct platform_device_id *) of_id->data;
of_id->data is a void*. You don't need the cast.
>
> r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> if (!r)
> @@ -1397,9 +1499,16 @@ fec_probe(struct platform_device *pdev)
>
> platform_set_drvdata(pdev, ndev);
>
> - pdata = pdev->dev.platform_data;
> - if (pdata)
> - fep->phy_interface = pdata->phy;
> + fep->phy_interface = fec_get_phy_mode_dt(pdev);
> + if (fep->phy_interface == -ENODEV) {
> + pdata = pdev->dev.platform_data;
> + if (pdata)
> + fep->phy_interface = pdata->phy;
> + else
> + fep->phy_interface = PHY_INTERFACE_MODE_MII;
> + }
> +
> + fec_reset_phy(pdev);
>
> /* This device has up to three irqs on some platforms */
> for (i = 0; i < 3; i++) {
> @@ -1534,6 +1643,7 @@ static struct platform_driver fec_driver = {
> #ifdef CONFIG_PM
> .pm = &fec_pm_ops,
> #endif
> + .of_match_table = fec_dt_ids,
> },
> .id_table = fec_devtype,
> .probe = fec_probe,
> --
> 1.7.4.1
>
^ permalink raw reply
* Re: [PATCH next] netfilter: nfqueue: batch verdict support
From: Florian Westphal @ 2011-07-03 19:23 UTC (permalink / raw)
To: Eric Dumazet
Cc: Florian Westphal, Patrick McHardy, netfilter-devel,
Pablo Neira Ayuso, netdev, Eric Leblond
In-Reply-To: <1309688655.2523.16.camel@edumazet-laptop>
Eric Dumazet <eric.dumazet@gmail.com> wrote:
> > Introduces a new nfnetlink type that applies a given
> > verdict to all queued packets with an id <= the id in the verdict
> > message.
> >
> > If a mark is provided it is applied to all matched packets.
> >
> > This reduces the number of verdicts that have to be sent.
> > Applications that make use of this feature need to maintain
> > a timeout to send a batchverdict periodically to avoid starvation.
> >
> > Signed-off-by: Florian Westphal <fw@strlen.de>
>
> The real question hidden here is : "Should packet ids be monotonic" in
> current implementation and all future ones ?
>
> Before we accept this patch, we should make sure packets id are
> monotonic, and I am afraid its not the case right now.
You're right, good catch.
I was fooled by atomic_inc being monotonically increasing, but since
packet building is not protected by the queue spin lock
reordering can indeed happen.
> [PATCH] netfilter: nfqueue: assert monotonic packet ids
>
> Packet identifier is currently setup in nfqnl_build_packet_message(),
> using one atomic_inc_return().
>
> Problem is that since several cpus might concurrently call
> nfqnl_enqueue_packet() for the same queue, we can deliver packets to
> consumer in non monotonic way (packet N+1 being delivered after packet
> N)
I would actually consider your patch a bug fix...
Thanks a lot for spending time on this!
^ permalink raw reply
* Re: [PATCH] bridge: mask forwarding of IEEE 802 local multicast groups
From: Nick Carter @ 2011-07-03 18:30 UTC (permalink / raw)
To: David Lamparter
Cc: netdev, Michał Mirosław, Stephen Hemminger, davem
In-Reply-To: <20110701223756.GG2613105@jupiter.n2.diac24.net>
On 1 July 2011 23:37, David Lamparter <equinox@diac24.net> wrote:
> On Fri, Jul 01, 2011 at 10:21:44PM +0100, Nick Carter wrote:
>> Introduce sysfs ../bridge/group_fwd_mask attribute so users can
>> configure which group mac addresses are forwarded.
>>
>> These diffs do not change the default behaviour of bridge.ko. By
>> changing the group_fwd_mask value users can select any combination of
>> the 01-80-C2-00-00-00 - 01-80-C2-00-00-0F addresses to be forwarded.
>>
>> Signed-off-by: Nick Carter <ncarter100@gmail.com>
>
> Hm. Makes it very easy to shoot yourself in the foot, but...
>
>> + br->group_fwd_mask = 0;
>
> ... but the default is safe, so we're following the unix philosophy of
> handing out the gun to shoot yourself :)
>
> Reviewed-by: David Lamparter <equinox@diac24.net>
>
>
> PS:
>> @@ -166,6 +166,9 @@ struct sk_buff *br_handle_frame(struct sk_buff *skb)
>> if (p->br->stp_enabled == BR_NO_STP && dest[5] == 0)
>> goto forward;
>
> Not sure if we still need the STP one when we have the mask, it should
> probably go away for consistency. It would change existing behaviour
> though... either way it can be a separate patch.
Yes I agree. Probably best to wait until the user space tools are
updated to support the new mask, so users can easily configure a
workaround to the change in behaviour. I'm happy to update brctl to
support the mask, I pretty much have the diffs already.
Nick
>
>> + if (p->br->group_fwd_mask & (1 << dest[5]))
>> + goto forward;
>> +
>> if (NF_HOOK(NFPROTO_BRIDGE, NF_BR_LOCAL_IN, skb, skb->dev,
>> NULL, br_handle_local_finish))
>> return NULL; /* frame consumed by filter */
>
^ permalink raw reply
* [PATCH] af_econet: Use current logging styles and neatening
From: Joe Perches @ 2011-07-03 18:28 UTC (permalink / raw)
To: netdev, linux-kernel; +Cc: Phil Blundell, David S. Miller
Use pr_fmt() without KBUILD_MODNAME to allow AUN and econet prefixes.
Convert printks with KERN_DEBUG to pr_debug.
Hoist assigns from if.
80 column wrapping.
Move open braces to end of line.
Signed-off-by: Joe Perches <joe@perches.com>
---
net/econet/af_econet.c | 149 ++++++++++++++++++++++++------------------------
1 files changed, 74 insertions(+), 75 deletions(-)
diff --git a/net/econet/af_econet.c b/net/econet/af_econet.c
index 5afdc8f..1c1f26c 100644
--- a/net/econet/af_econet.c
+++ b/net/econet/af_econet.c
@@ -9,6 +9,8 @@
*
*/
+#define pr_fmt(fmt) fmt
+
#include <linux/module.h>
#include <linux/types.h>
@@ -44,7 +46,7 @@
#include <linux/bitops.h>
#include <linux/mutex.h>
-#include <asm/uaccess.h>
+#include <linux/uaccess.h>
#include <asm/system.h>
static const struct proto_ops econet_ops;
@@ -63,9 +65,7 @@ static DEFINE_SPINLOCK(aun_queue_lock);
static struct socket *udpsock;
#define AUN_PORT 0x8000
-
-struct aunhdr
-{
+struct aunhdr {
unsigned char code; /* AUN magic protocol byte */
unsigned char port;
unsigned char cb;
@@ -82,8 +82,7 @@ static struct timer_list ab_cleanup_timer;
#endif /* CONFIG_ECONET_AUNUDP */
/* Per-packet information */
-struct ec_cb
-{
+struct ec_cb {
struct sockaddr_ec sec;
unsigned long cookie; /* Supplied by user. */
#ifdef CONFIG_ECONET_AUNUDP
@@ -137,7 +136,7 @@ static int econet_recvmsg(struct kiocb *iocb, struct socket *sock,
* but then it will block.
*/
- skb=skb_recv_datagram(sk,flags,flags&MSG_DONTWAIT,&err);
+ skb = skb_recv_datagram(sk, flags, flags & MSG_DONTWAIT, &err);
/*
* An error occurred so return it. Because skb_recv_datagram()
@@ -145,7 +144,7 @@ static int econet_recvmsg(struct kiocb *iocb, struct socket *sock,
* retries.
*/
- if(skb==NULL)
+ if (skb == NULL)
goto out;
/*
@@ -154,10 +153,9 @@ static int econet_recvmsg(struct kiocb *iocb, struct socket *sock,
*/
copied = skb->len;
- if (copied > len)
- {
- copied=len;
- msg->msg_flags|=MSG_TRUNC;
+ if (copied > len) {
+ copied = len;
+ msg->msg_flags |= MSG_TRUNC;
}
/* We can't use skb_copy_datagram here */
@@ -186,7 +184,8 @@ out:
* Bind an Econet socket.
*/
-static int econet_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
+static int econet_bind(struct socket *sock, struct sockaddr *uaddr,
+ int addr_len)
{
struct sockaddr_ec *sec = (struct sockaddr_ec *)uaddr;
struct sock *sk;
@@ -226,9 +225,8 @@ static void tx_result(struct sock *sk, unsigned long cookie, int result)
struct ec_cb *eb;
struct sockaddr_ec *sec;
- if (skb == NULL)
- {
- printk(KERN_DEBUG "ec: memory squeeze, transmit result dropped.\n");
+ if (skb == NULL) {
+ pr_debug("econet: memory squeeze, transmit result dropped\n");
return;
}
@@ -265,7 +263,7 @@ static void ec_tx_done(struct sk_buff *skb, int result)
static int econet_sendmsg(struct kiocb *iocb, struct socket *sock,
struct msghdr *msg, size_t len)
{
- struct sockaddr_ec *saddr=(struct sockaddr_ec *)msg->msg_name;
+ struct sockaddr_ec *saddr = (struct sockaddr_ec *)msg->msg_name;
struct net_device *dev;
struct ec_addr addr;
int err;
@@ -298,14 +296,14 @@ static int econet_sendmsg(struct kiocb *iocb, struct socket *sock,
mutex_lock(&econet_mutex);
- if (saddr == NULL || msg->msg_namelen < sizeof(struct sockaddr_ec)) {
- mutex_unlock(&econet_mutex);
- return -EINVAL;
- }
- addr.station = saddr->addr.station;
- addr.net = saddr->addr.net;
- port = saddr->port;
- cb = saddr->cb;
+ if (saddr == NULL || msg->msg_namelen < sizeof(struct sockaddr_ec)) {
+ mutex_unlock(&econet_mutex);
+ return -EINVAL;
+ }
+ addr.station = saddr->addr.station;
+ addr.net = saddr->addr.net;
+ port = saddr->port;
+ cb = saddr->cb;
/* Look for a device with the right network number. */
dev = net2dev_map[addr.net];
@@ -333,9 +331,9 @@ static int econet_sendmsg(struct kiocb *iocb, struct socket *sock,
dev_hold(dev);
- skb = sock_alloc_send_skb(sk, len+LL_ALLOCATED_SPACE(dev),
+ skb = sock_alloc_send_skb(sk, len + LL_ALLOCATED_SPACE(dev),
msg->msg_flags & MSG_DONTWAIT, &err);
- if (skb==NULL)
+ if (skb == NULL)
goto out_unlock;
skb_reserve(skb, LL_RESERVED_SPACE(dev));
@@ -355,7 +353,7 @@ static int econet_sendmsg(struct kiocb *iocb, struct socket *sock,
struct ec_framehdr *fh;
/* Poke in our control byte and
port number. Hack, hack. */
- fh = (struct ec_framehdr *)(skb->data);
+ fh = (struct ec_framehdr *)skb->data;
fh->cb = cb;
fh->port = port;
if (sock->type != SOCK_DGRAM) {
@@ -365,7 +363,7 @@ static int econet_sendmsg(struct kiocb *iocb, struct socket *sock,
}
/* Copy the data. Returns -EFAULT on error */
- err = memcpy_fromiovec(skb_put(skb,len), msg->msg_iov, len);
+ err = memcpy_fromiovec(skb_put(skb, len), msg->msg_iov, len);
skb->protocol = proto;
skb->dev = dev;
skb->priority = sk->sk_priority;
@@ -385,9 +383,9 @@ static int econet_sendmsg(struct kiocb *iocb, struct socket *sock,
mutex_unlock(&econet_mutex);
return len;
- out_free:
+out_free:
kfree_skb(skb);
- out_unlock:
+out_unlock:
if (dev)
dev_put(dev);
#else
@@ -458,15 +456,14 @@ static int econet_sendmsg(struct kiocb *iocb, struct socket *sock,
goto error_free_buf;
/* Get a skbuff (no data, just holds our cb information) */
- if ((skb = sock_alloc_send_skb(sk, 0,
- msg->msg_flags & MSG_DONTWAIT,
- &err)) == NULL)
+ skb = sock_alloc_send_skb(sk, 0, msg->msg_flags & MSG_DONTWAIT, &err);
+ if (skb == NULL)
goto error_free_buf;
eb = (struct ec_cb *)&skb->cb;
eb->cookie = saddr->cookie;
- eb->timeout = (5*HZ);
+ eb->timeout = 5 * HZ;
eb->start = jiffies;
ah.handle = aun_seq;
eb->seq = (aun_seq++);
@@ -480,9 +477,10 @@ static int econet_sendmsg(struct kiocb *iocb, struct socket *sock,
udpmsg.msg_iovlen = 2;
udpmsg.msg_control = NULL;
udpmsg.msg_controllen = 0;
- udpmsg.msg_flags=0;
+ udpmsg.msg_flags = 0;
- oldfs = get_fs(); set_fs(KERNEL_DS); /* More privs :-) */
+ oldfs = get_fs();
+ set_fs(KERNEL_DS); /* More privs :-) */
err = sock_sendmsg(udpsock, &udpmsg, size);
set_fs(oldfs);
@@ -530,7 +528,7 @@ static int econet_getname(struct socket *sock, struct sockaddr *uaddr,
static void econet_destroy_timer(unsigned long data)
{
- struct sock *sk=(struct sock *)data;
+ struct sock *sk = (struct sock *)data;
if (!sk_has_allocations(sk)) {
sk_free(sk);
@@ -539,7 +537,7 @@ static void econet_destroy_timer(unsigned long data)
sk->sk_timer.expires = jiffies + 10 * HZ;
add_timer(&sk->sk_timer);
- printk(KERN_DEBUG "econet socket destroy delayed\n");
+ pr_debug("econet: socket destroy delayed\n");
}
/*
@@ -651,7 +649,8 @@ static int ec_dev_ioctl(struct socket *sock, unsigned int cmd, void __user *arg)
if (copy_from_user(&ifr, arg, sizeof(struct ifreq)))
return -EFAULT;
- if ((dev = dev_get_by_name(&init_net, ifr.ifr_name)) == NULL)
+ dev = dev_get_by_name(&init_net, ifr.ifr_name);
+ if (dev == NULL)
return -ENODEV;
sec = (struct sockaddr_ec *)&ifr.ifr_addr;
@@ -715,7 +714,8 @@ static int ec_dev_ioctl(struct socket *sock, unsigned int cmd, void __user *arg)
* Handle generic ioctls
*/
-static int econet_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
+static int econet_ioctl(struct socket *sock, unsigned int cmd,
+ unsigned long arg)
{
struct sock *sk = sock->sk;
void __user *argp = (void __user *)arg;
@@ -833,7 +833,7 @@ static void aun_send_response(__u32 addr, unsigned long seq, int code, int cb)
udpmsg.msg_namelen = sizeof(sin);
udpmsg.msg_control = NULL;
udpmsg.msg_controllen = 0;
- udpmsg.msg_flags=0;
+ udpmsg.msg_flags = 0;
kernel_sendmsg(udpsock, &udpmsg, &iov, 1, sizeof(ah));
}
@@ -856,26 +856,25 @@ static void aun_incoming(struct sk_buff *skb, struct aunhdr *ah, size_t len)
if (dst)
edev = dst->dev->ec_ptr;
- if (! edev)
+ if (!edev)
goto bad;
- if ((sk = ec_listening_socket(ah->port, stn, edev->net)) == NULL)
+ sk = ec_listening_socket(ah->port, stn, edev->net);
+ if (sk == NULL)
goto bad; /* Nobody wants it */
newskb = alloc_skb((len - sizeof(struct aunhdr) + 15) & ~15,
GFP_ATOMIC);
- if (newskb == NULL)
- {
- printk(KERN_DEBUG "AUN: memory squeeze, dropping packet.\n");
+ if (newskb == NULL) {
+ pr_debug("AUN: memory squeeze, dropping packet\n");
/* Send nack and hope sender tries again */
goto bad;
}
- memcpy(skb_put(newskb, len - sizeof(struct aunhdr)), (void *)(ah+1),
+ memcpy(skb_put(newskb, len - sizeof(struct aunhdr)), (void *)(ah + 1),
len - sizeof(struct aunhdr));
- if (ec_queue_packet(sk, newskb, stn, edev->net, ah->cb, ah->port))
- {
+ if (ec_queue_packet(sk, newskb, stn, edev->net, ah->cb, ah->port)) {
/* Socket is bankrupt. */
kfree_skb(newskb);
goto bad;
@@ -911,7 +910,7 @@ static void aun_tx_ack(unsigned long seq, int result)
goto foundit;
}
spin_unlock_irqrestore(&aun_queue_lock, flags);
- printk(KERN_DEBUG "AUN: unknown sequence %ld\n", seq);
+ pr_debug("AUN: unknown sequence %ld\n", seq);
return;
foundit:
@@ -936,18 +935,17 @@ static void aun_data_available(struct sock *sk, int slen)
while ((skb = skb_recv_datagram(sk, 0, 1, &err)) == NULL) {
if (err == -EAGAIN) {
- printk(KERN_ERR "AUN: no data available?!");
+ pr_err("AUN: no data available?!\n");
return;
}
- printk(KERN_DEBUG "AUN: recvfrom() error %d\n", -err);
+ pr_debug("AUN: recvfrom() error %d\n", -err);
}
data = skb_transport_header(skb) + sizeof(struct udphdr);
ah = (struct aunhdr *)data;
len = skb->len - sizeof(struct udphdr);
- switch (ah->code)
- {
+ switch (ah->code) {
case 2:
aun_incoming(skb, ah, len);
break;
@@ -958,7 +956,7 @@ static void aun_data_available(struct sock *sk, int slen)
aun_tx_ack(ah->handle, ECTYPE_TRANSMIT_NOT_LISTENING);
break;
default:
- printk(KERN_DEBUG "unknown AUN packet (type %d)\n", data[0]);
+ pr_debug("AUN: unknown packet type: %d\n", data[0]);
}
skb_free_datagram(sk, skb);
@@ -988,7 +986,7 @@ static void ab_cleanup(unsigned long h)
}
spin_unlock_irqrestore(&aun_queue_lock, flags);
- mod_timer(&ab_cleanup_timer, jiffies + (HZ*2));
+ mod_timer(&ab_cleanup_timer, jiffies + (HZ * 2));
}
static int __init aun_udp_initialise(void)
@@ -998,7 +996,7 @@ static int __init aun_udp_initialise(void)
skb_queue_head_init(&aun_queue);
setup_timer(&ab_cleanup_timer, ab_cleanup, 0);
- ab_cleanup_timer.expires = jiffies + (HZ*2);
+ ab_cleanup_timer.expires = jiffies + (HZ * 2);
add_timer(&ab_cleanup_timer);
memset(&sin, 0, sizeof(sin));
@@ -1006,9 +1004,9 @@ static int __init aun_udp_initialise(void)
/* We can count ourselves lucky Acorn machines are too dim to
speak IPv6. :-) */
- if ((error = sock_create_kern(PF_INET, SOCK_DGRAM, 0, &udpsock)) < 0)
- {
- printk("AUN: socket error %d\n", -error);
+ error = sock_create_kern(PF_INET, SOCK_DGRAM, 0, &udpsock);
+ if (error < 0) {
+ pr_err("AUN: socket error %d\n", -error);
return error;
}
@@ -1017,10 +1015,9 @@ static int __init aun_udp_initialise(void)
from interrupts */
error = udpsock->ops->bind(udpsock, (struct sockaddr *)&sin,
- sizeof(sin));
- if (error < 0)
- {
- printk("AUN: bind error %d\n", -error);
+ sizeof(sin));
+ if (error < 0) {
+ pr_err("AUN: bind error %d\n", -error);
goto release;
}
@@ -1041,7 +1038,8 @@ release:
* Receive an Econet frame from a device.
*/
-static int econet_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev)
+static int econet_rcv(struct sk_buff *skb, struct net_device *dev,
+ struct packet_type *pt, struct net_device *orig_dev)
{
struct ec_framehdr *hdr;
struct sock *sk = NULL;
@@ -1056,13 +1054,14 @@ static int econet_rcv(struct sk_buff *skb, struct net_device *dev, struct packet
if (!edev)
goto drop;
- if ((skb = skb_share_check(skb, GFP_ATOMIC)) == NULL)
+ skb = skb_share_check(skb, GFP_ATOMIC);
+ if (skb == NULL)
return NET_RX_DROP;
if (!pskb_may_pull(skb, sizeof(struct ec_framehdr)))
goto drop;
- hdr = (struct ec_framehdr *) skb->data;
+ hdr = (struct ec_framehdr *)skb->data;
/* First check for encapsulated IP */
if (hdr->port == EC_PORT_IP) {
@@ -1090,8 +1089,8 @@ drop:
}
static struct packet_type econet_packet_type __read_mostly = {
- .type = cpu_to_be16(ETH_P_ECONET),
- .func = econet_rcv,
+ .type = cpu_to_be16(ETH_P_ECONET),
+ .func = econet_rcv,
};
static void econet_hw_initialise(void)
@@ -1101,9 +1100,10 @@ static void econet_hw_initialise(void)
#endif
-static int econet_notifier(struct notifier_block *this, unsigned long msg, void *data)
+static int econet_notifier(struct notifier_block *this, unsigned long msg,
+ void *data)
{
- struct net_device *dev = (struct net_device *)data;
+ struct net_device *dev = data;
struct ec_device *edev;
if (!net_eq(dev_net(dev), &init_net))
@@ -1113,8 +1113,7 @@ static int econet_notifier(struct notifier_block *this, unsigned long msg, void
case NETDEV_UNREGISTER:
/* A device has gone down - kill any data we hold for it. */
edev = dev->ec_ptr;
- if (edev)
- {
+ if (edev) {
if (net2dev_map[0] == dev)
net2dev_map[0] = NULL;
net2dev_map[edev->net] = NULL;
@@ -1128,7 +1127,7 @@ static int econet_notifier(struct notifier_block *this, unsigned long msg, void
}
static struct notifier_block econet_netdev_notifier = {
- .notifier_call =econet_notifier,
+ .notifier_call = econet_notifier,
};
static void __exit econet_proto_exit(void)
--
1.7.6.rc1
^ permalink raw reply related
* Re: [net-next PATCH 1/2] dcbnl: Aggregated CEE GET operation
From: John Fastabend @ 2011-07-03 18:09 UTC (permalink / raw)
To: Shmulik Ravid; +Cc: davem@davemloft.net, netdev@vger.kernel.org
In-Reply-To: <1309624423.15528.43.camel@lb-tlvb-shmulik.il.broadcom.com>
On 7/2/2011 9:33 AM, Shmulik Ravid wrote:
> The following couple of patches add dcbnl an unsolicited notification of
> the the DCB configuration for the CEE flavor of the DCBX protocol. This
> is useful when the user-mode DCB client is not responsible for
> conducting and resolving the DCBX negotiation (either because the DCBX
> stack is embedded in the HW or the negotiation is handled by another
> agent in he host), but still needs to get the negotiated parameters.
> This functionality already exists for the IEEE flavor of the DCBX
> protocol and these patches add it to the older CEE flavor.
>
> The first patch extends the CEE attribute GET operation to include not
> only the peer information, but also all the pertinent local
> configuration (negotiated parameters). The second patch adds and export
> a CEE specific notification routine.
>
> Signed-off-by: Shmulik Ravid <shmulikr@broadcom.com>
> ---
> include/linux/dcbnl.h | 20 ++++++-
> net/dcb/dcbnl.c | 156 ++++++++++++++++++++++++++++++++++++++++++++++--
> 2 files changed, 168 insertions(+), 8 deletions(-)
>
> diff --git a/include/linux/dcbnl.h b/include/linux/dcbnl.h
> index 66a6723..c875244 100644
> --- a/include/linux/dcbnl.h
> +++ b/include/linux/dcbnl.h
> @@ -333,15 +333,26 @@ enum ieee_attrs_app {
> #define DCB_ATTR_IEEE_APP_MAX (__DCB_ATTR_IEEE_APP_MAX - 1)
>
> /**
> - * enum cee_attrs - CEE DCBX get attributes
> + * enum cee_attrs - CEE DCBX get attributes. An aggregated collection of the
> + * cee std negotiated parameters
> *
> * @DCB_ATTR_CEE_UNSPEC: unspecified
> + * @DCB_ATTR_CEE_FEAT: DCBX features flags (DCB_CMD_GFEATCFG)
> + * @DCB_ATTR_CEE_RX_PG: RX PG configuration (DCB_CMD_PGRX_GCFG)
> + * @DCB_ATTR_CEE_TX_PG: TX PG configuration (DCB_CMD_PGTX_GCFG)
> + * @DCB_ATTR_CEE_PFC: PFC configuration (DCB_CMD_PFC_GCFG)
> + * @DCB_ATTR_CEE_APP_TABLE: APP configuration (multi DCB_CMD_GAPP)
> * @DCB_ATTR_CEE_PEER_PG: peer PG configuration - get only
> * @DCB_ATTR_CEE_PEER_PFC: peer PFC configuration - get only
> * @DCB_ATTR_CEE_PEER_APP: peer APP tlv - get only
> */
> enum cee_attrs {
> DCB_ATTR_CEE_UNSPEC,
> + DCB_ATTR_CEE_TX_PG,
> + DCB_ATTR_CEE_RX_PG,
> + DCB_ATTR_CEE_PFC,
> + DCB_ATTR_CEE_APP_TABLE,
> + DCB_ATTR_CEE_FEAT,
> DCB_ATTR_CEE_PEER_PG,
> DCB_ATTR_CEE_PEER_PFC,
> DCB_ATTR_CEE_PEER_APP_TABLE,
PEER_PG, PEER_PFC, and PEER_APP_TABLE are already in kernel and user
space. So we shouldn't change their enum'd value. Put the new values
below them.
> @@ -357,6 +368,13 @@ enum peer_app_attr {
> };
> #define DCB_ATTR_CEE_PEER_APP_MAX (__DCB_ATTR_CEE_PEER_APP_MAX - 1)
>
> +enum cee_attrs_app {
> + DCB_ATTR_CEE_APP_UNSPEC,
> + DCB_ATTR_CEE_APP,
> + __DCB_ATTR_CEE_APP_MAX
> +};
> +#define DCB_ATTR_CEE_APP_MAX (__DCB_ATTR_CEE_APP_MAX - 1)
> +
> /**
> * enum dcbnl_pfc_attrs - DCB Priority Flow Control user priority nested attrs
> *
> diff --git a/net/dcb/dcbnl.c b/net/dcb/dcbnl.c
> index fc56e85..5b75ed7 100644
> --- a/net/dcb/dcbnl.c
> +++ b/net/dcb/dcbnl.c
> @@ -1642,6 +1642,58 @@ err:
> return ret;
> }
>
> +static int dcbnl_cee_pg_fill(struct sk_buff *skb, struct net_device *dev,
> + int dir)
Why the 'dir'? Could you just pack both tx and rx together? It looks like all
cases pack TX then pack RX. Did I miss something?
> +{
> + u8 pgid, up_map, prio, tc_pct;
> + const struct dcbnl_rtnl_ops *ops = dev->dcbnl_ops;
> + int i = dir ? DCB_ATTR_CEE_TX_PG : DCB_ATTR_CEE_RX_PG;
> + struct nlattr *pg = nla_nest_start(skb, i);
I believe its preferred to put an empty line here. At least I prefer it.
> + if (!pg)
> + goto nla_put_failure;
> +
> + for (i = DCB_PG_ATTR_TC_0; i <= DCB_PG_ATTR_TC_7; i++) {
> + struct nlattr *tc_nest = nla_nest_start(skb, i);
same here.
> + if (!tc_nest)
> + goto nla_put_failure;
> +
> + pgid = DCB_ATTR_VALUE_UNDEFINED;
> + prio = DCB_ATTR_VALUE_UNDEFINED;
> + tc_pct = DCB_ATTR_VALUE_UNDEFINED;
> + up_map = DCB_ATTR_VALUE_UNDEFINED;
> +
> + if (!dir)
> + ops->getpgtccfgrx(dev, i - DCB_PG_ATTR_TC_0,
> + &prio, &pgid, &tc_pct, &up_map);
> + else
> + ops->getpgtccfgtx(dev, i - DCB_PG_ATTR_TC_0,
> + &prio, &pgid, &tc_pct, &up_map);
> +
Thanks for doing this. We should be able to get firmware CEE DCBX agents
working correctly with this.
//John
^ permalink raw reply
* Re: [Bugme-new] [Bug 38102] New: BUG kmalloc-2048: Poison overwritten
From: Eric Dumazet @ 2011-07-03 15:46 UTC (permalink / raw)
To: Alexey Zaytsev
Cc: Andrew Morton, netdev, Gary Zambrano, bugme-daemon,
David S. Miller, Pekka Pietikainen, Florian Schirmer,
Felix Fietkau, Michael Buesch
In-Reply-To: <CAB9v_DHXB6n07sEY_=HZ8S4zMO01Vs8B78dGyEWrm-hyRP82XA@mail.gmail.com>
Le dimanche 03 juillet 2011 à 01:25 +0400, Alexey Zaytsev a écrit :
> On Fri, Jul 1, 2011 at 10:01, Alexey Zaytsev <alexey.zaytsev@gmail.com> wrote:
> > On Thu, Jun 30, 2011 at 01:51, Andrew Morton <akpm@linux-foundation.org> wrote:
> >>
> >> (switched to email. Please respond via emailed reply-to-all, not via the
> >> bugzilla web interface).
> >>
> >> On Thu, 23 Jun 2011 17:33:54 GMT
> >> bugzilla-daemon@bugzilla.kernel.org wrote:
> >>
> >>> https://bugzilla.kernel.org/show_bug.cgi?id=38102
> >>>
> >>> Summary: BUG kmalloc-2048: Poison overwritten
> >>> Product: Drivers
> >>> Version: 2.5
> >>> Kernel Version: 3.0.0-rc4
> >>
> >> Looks like a 2.6.38->2.6.39 regression, perhaps a memory scribble in b44.
> >
> > Actually, not sure about the version. 39 was the first one I've been
> > using in the scenario. Checking older versions now.
> > And git-log does not show a lot of changes to the b44 driver, so it
> > might be something unrelated.
> >
>
> I've checked back as far as 2.6.27, and the problem is still there.
> I've also looked through the allocation-related code, and it seemed
> sane. I'm not sure I understand the 1GB dma workaround, but this path
> is never hit in my case. So adding the driver authors to CC. This
> could be something different, but I've been unable to reproduce using
> an other machine with an rtl8139 nic.
Hmm, looking at b44 code, I believe there is a race there.
Could you try following patch ?
Thanks
diff --git a/drivers/net/b44.c b/drivers/net/b44.c
index a69331e..80f2fdc 100644
--- a/drivers/net/b44.c
+++ b/drivers/net/b44.c
@@ -689,9 +689,9 @@ static int b44_alloc_rx_skb(struct b44 *bp, int src_idx, u32 dest_idx_unmasked)
ctrl |= DESC_CTRL_EOT;
dp = &bp->rx_ring[dest_idx];
- dp->ctrl = cpu_to_le32(ctrl);
dp->addr = cpu_to_le32((u32) mapping + bp->dma_offset);
-
+ wmb();
+ dp->ctrl = cpu_to_le32(ctrl);
if (bp->flags & B44_FLAG_RX_RING_HACK)
b44_sync_dma_desc_for_device(bp->sdev, bp->rx_ring_dma,
dest_idx * sizeof(*dp),
^ permalink raw reply related
* libpcap and tc filters
From: Adam Katz @ 2011-07-03 12:49 UTC (permalink / raw)
To: netdev
In-Reply-To: <CAA0qwj5Ktxi=v3XDAdTpKS_pWa+HjFL5XcN2qsK5m57JJ5G2Bg@mail.gmail.com>
Hi Everyone!
I'm attempting to use tc to shape traffic sent using libpcap (more
precisely tcpreplay, based on libpcap). I'm doing this for a research
project.
Ii have a prio scheduler with a default band 2:
tc qdisc add dev eth0 root handle 1: prio priomap 2 2 2 2 2 2 2 2 2 2
2 2 2 2 2 2
with two filters attached to it:
tc filter add dev eth0 protocol ip parent 1: prio 1 u32 match ip dport
80 0xffff flowid 1:1
tc filter add dev eth0 protocol ip parent 1: prio 2 u32 match ip dport
443 0xffff flowid 1:2
(disregard the port numbers, they're here just as an example)
When sending actual traffic, the filters work and I see the
appropriate traffic entering the right class. BUT when replaying
captured traffic (with the appropriate port numbers) over eth0 using
tcpreplay, all packets end up in the default band 2 as if the filters
simply refuse to work.
Can anyone suggest a solution?
Thanks!
^ permalink raw reply
* CAN I TRUST YOU?
From: PETER CHOW @ 2011-07-03 11:37 UTC (permalink / raw)
Dear Friend,
I bring you greetings. I am PETER CHOW, I work with BANK OF CHINA, HONG KONG. I have a Business Proposal of $17.3M for you to handle with me from my bank.I need you to assist me in executing this Business Project from Hong Kong to your country.I need to know if you will be able to handle this with me before I explain to you in details. Should you be interested please send me the required information below;
(1). Full Names:
(2). Current Residential Address/Country:
(3). Private Telephone Number:
(4). Age:
I will want you to reach me on my private e-mail : ( chowp91@yahoo.com.hk ).Finally after that I shall provide you with more information.
Regards,
Peter Chow
^ permalink raw reply
* Re: [PATCH next] netfilter: nfqueue: batch verdict support
From: Eric Dumazet @ 2011-07-03 10:24 UTC (permalink / raw)
To: Florian Westphal, Patrick McHardy
Cc: netfilter-devel, Pablo Neira Ayuso, netdev, Eric Leblond
In-Reply-To: <1307657659-30266-1-git-send-email-fw@strlen.de>
Le vendredi 10 juin 2011 à 00:14 +0200, Florian Westphal a écrit :
> Introduces a new nfnetlink type that applies a given
> verdict to all queued packets with an id <= the id in the verdict
> message.
>
> If a mark is provided it is applied to all matched packets.
>
> This reduces the number of verdicts that have to be sent.
> Applications that make use of this feature need to maintain
> a timeout to send a batchverdict periodically to avoid starvation.
>
> Signed-off-by: Florian Westphal <fw@strlen.de>
The real question hidden here is : "Should packet ids be monotonic" in
current implementation and all future ones ?
Before we accept this patch, we should make sure packets id are
monotonic, and I am afraid its not the case right now.
I suggest following patch then.
[PATCH] netfilter: nfqueue: assert monotonic packet ids
Packet identifier is currently setup in nfqnl_build_packet_message(),
using one atomic_inc_return().
Problem is that since several cpus might concurrently call
nfqnl_enqueue_packet() for the same queue, we can deliver packets to
consumer in non monotonic way (packet N+1 being delivered after packet
N)
This patch moves the packet id setup from nfqnl_build_packet_message()
to nfqnl_enqueue_packet() to guarantee correct delivery order.
This also removes one atomic operation.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
CC: Florian Westphal <fw@strlen.de>
CC: Pablo Neira Ayuso <pablo@netfilter.org>
CC: Eric Leblond <eric@regit.org>
---
net/netfilter/nfnetlink_queue.c | 26 +++++++++++++++-----------
1 file changed, 15 insertions(+), 11 deletions(-)
diff --git a/net/netfilter/nfnetlink_queue.c b/net/netfilter/nfnetlink_queue.c
index fdd2faf..bccaf3b 100644
--- a/net/netfilter/nfnetlink_queue.c
+++ b/net/netfilter/nfnetlink_queue.c
@@ -58,7 +58,7 @@ struct nfqnl_instance {
*/
spinlock_t lock;
unsigned int queue_total;
- atomic_t id_sequence; /* 'sequence' of pkt ids */
+ unsigned int id_sequence; /* 'sequence' of pkt ids */
struct list_head queue_list; /* packets in queue */
};
@@ -213,13 +213,15 @@ nfqnl_flush(struct nfqnl_instance *queue, nfqnl_cmpfn cmpfn, unsigned long data)
static struct sk_buff *
nfqnl_build_packet_message(struct nfqnl_instance *queue,
- struct nf_queue_entry *entry)
+ struct nf_queue_entry *entry,
+ __be32 **packet_id_ptr)
{
sk_buff_data_t old_tail;
size_t size;
size_t data_len = 0;
struct sk_buff *skb;
- struct nfqnl_msg_packet_hdr pmsg;
+ struct nlattr *nla;
+ struct nfqnl_msg_packet_hdr *pmsg;
struct nlmsghdr *nlh;
struct nfgenmsg *nfmsg;
struct sk_buff *entskb = entry->skb;
@@ -272,12 +274,11 @@ nfqnl_build_packet_message(struct nfqnl_instance *queue,
nfmsg->version = NFNETLINK_V0;
nfmsg->res_id = htons(queue->queue_num);
- entry->id = atomic_inc_return(&queue->id_sequence);
- pmsg.packet_id = htonl(entry->id);
- pmsg.hw_protocol = entskb->protocol;
- pmsg.hook = entry->hook;
-
- NLA_PUT(skb, NFQA_PACKET_HDR, sizeof(pmsg), &pmsg);
+ nla = __nla_reserve(skb, NFQA_PACKET_HDR, sizeof(*pmsg));
+ pmsg = nla_data(nla);
+ pmsg->hw_protocol = entskb->protocol;
+ pmsg->hook = entry->hook;
+ *packet_id_ptr = &pmsg->packet_id;
indev = entry->indev;
if (indev) {
@@ -389,6 +390,7 @@ nfqnl_enqueue_packet(struct nf_queue_entry *entry, unsigned int queuenum)
struct sk_buff *nskb;
struct nfqnl_instance *queue;
int err = -ENOBUFS;
+ __be32 *packet_id_ptr;
/* rcu_read_lock()ed by nf_hook_slow() */
queue = instance_lookup(queuenum);
@@ -402,7 +404,7 @@ nfqnl_enqueue_packet(struct nf_queue_entry *entry, unsigned int queuenum)
goto err_out;
}
- nskb = nfqnl_build_packet_message(queue, entry);
+ nskb = nfqnl_build_packet_message(queue, entry, &packet_id_ptr);
if (nskb == NULL) {
err = -ENOMEM;
goto err_out;
@@ -421,6 +423,8 @@ nfqnl_enqueue_packet(struct nf_queue_entry *entry, unsigned int queuenum)
queue->queue_total);
goto err_out_free_nskb;
}
+ entry->id = ++queue->id_sequence;
+ *packet_id_ptr = htonl(entry->id);
/* nfnetlink_unicast will either free the nskb or add it to a socket */
err = nfnetlink_unicast(nskb, &init_net, queue->peer_pid, MSG_DONTWAIT);
@@ -870,7 +874,7 @@ static int seq_show(struct seq_file *s, void *v)
inst->peer_pid, inst->queue_total,
inst->copy_mode, inst->copy_range,
inst->queue_dropped, inst->queue_user_dropped,
- atomic_read(&inst->id_sequence), 1);
+ inst->id_sequence, 1);
}
static const struct seq_operations nfqnl_seq_ops = {
^ permalink raw reply related
* [PATCH] net/fec: add device tree probe support
From: Shawn Guo @ 2011-07-03 8:06 UTC (permalink / raw)
To: netdev
Cc: linux-arm-kernel, devicetree-discuss, patches, Shawn Guo,
Jason Liu, David S. Miller, Grant Likely
It adds device tree probe support for fec driver.
Signed-off-by: Jason Liu <jason.hui@linaro.org>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Cc: David S. Miller <davem@davemloft.net>
Cc: Grant Likely <grant.likely@secretlab.ca>
---
Documentation/devicetree/bindings/net/fsl-fec.txt | 24 ++++
drivers/net/fec.c | 120 ++++++++++++++++++++-
2 files changed, 139 insertions(+), 5 deletions(-)
create mode 100644 Documentation/devicetree/bindings/net/fsl-fec.txt
diff --git a/Documentation/devicetree/bindings/net/fsl-fec.txt b/Documentation/devicetree/bindings/net/fsl-fec.txt
new file mode 100644
index 0000000..1dad888
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/fsl-fec.txt
@@ -0,0 +1,24 @@
+* Freescale Fast Ethernet Controller (FEC)
+
+Required properties:
+- compatible : Should be "fsl,<soc>-fec"
+- reg : Address and length of the register set for the device
+- interrupts : Should contain fec interrupt
+- phy-mode : String, operation mode of the PHY interface.
+ Supported values are: "mii", "gmii", "sgmii", "tbi", "rmii",
+ "rgmii", "rgmii-id", "rgmii-rxid", "rgmii-txid", "rtbi".
+- gpios : Should specify the gpio for phy reset
+
+Optional properties:
+- local-mac-address : 6 bytes, mac address
+
+Example:
+
+fec@83fec000 {
+ compatible = "fsl,imx51-fec", "fsl,imx27-fec";
+ reg = <0x83fec000 0x4000>;
+ interrupts = <87>;
+ phy-mode = "mii";
+ gpios = <&gpio1 14 0>; /* phy-reset, GPIO2_14 */
+ local-mac-address = [00 04 9F 01 1B B9];
+};
diff --git a/drivers/net/fec.c b/drivers/net/fec.c
index 7ae3f28..3ee05ff 100644
--- a/drivers/net/fec.c
+++ b/drivers/net/fec.c
@@ -44,6 +44,9 @@
#include <linux/platform_device.h>
#include <linux/phy.h>
#include <linux/fec.h>
+#include <linux/of.h>
+#include <linux/of_device.h>
+#include <linux/of_gpio.h>
#include <asm/cacheflush.h>
@@ -78,6 +81,17 @@ static struct platform_device_id fec_devtype[] = {
{ }
};
+enum fec_type {
+ IMX27_FEC,
+ IMX28_FEC,
+};
+
+static const struct of_device_id fec_dt_ids[] = {
+ { .compatible = "fsl,imx27-fec", .data = &fec_devtype[IMX27_FEC], },
+ { .compatible = "fsl,imx28-fec", .data = &fec_devtype[IMX28_FEC], },
+ { /* sentinel */ },
+};
+
static unsigned char macaddr[ETH_ALEN];
module_param_array(macaddr, byte, NULL, 0);
MODULE_PARM_DESC(macaddr, "FEC Ethernet MAC address");
@@ -734,8 +748,25 @@ static void __inline__ fec_get_mac(struct net_device *ndev)
*/
iap = macaddr;
+#ifdef CONFIG_OF
+ /*
+ * 2) from device tree data
+ */
+ if (!is_valid_ether_addr(iap)) {
+ struct device_node *np = fep->pdev->dev.of_node;
+ if (np) {
+ const char *mac;
+ int err;
+ err = of_property_read_string(np,
+ "local-mac-address", &mac);
+ if (err)
+ iap = (unsigned char *) mac;
+ }
+ }
+#endif
+
/*
- * 2) from flash or fuse (via platform data)
+ * 3) from flash or fuse (via platform data)
*/
if (!is_valid_ether_addr(iap)) {
#ifdef CONFIG_M5272
@@ -748,7 +779,7 @@ static void __inline__ fec_get_mac(struct net_device *ndev)
}
/*
- * 3) FEC mac registers set by bootloader
+ * 4) FEC mac registers set by bootloader
*/
if (!is_valid_ether_addr(iap)) {
*((unsigned long *) &tmpaddr[0]) =
@@ -1358,6 +1389,72 @@ static int fec_enet_init(struct net_device *ndev)
return 0;
}
+#ifdef CONFIG_OF
+static int __devinit fec_get_phy_mode_dt(struct platform_device *pdev)
+{
+ struct device_node *np = pdev->dev.of_node;
+ int err, i;
+ const char *pm, *phy_modes[] = {
+ [PHY_INTERFACE_MODE_MII] = "mii",
+ [PHY_INTERFACE_MODE_GMII] = "gmii",
+ [PHY_INTERFACE_MODE_SGMII] = "sgmii",
+ [PHY_INTERFACE_MODE_TBI] = "tbi",
+ [PHY_INTERFACE_MODE_RMII] = "rmii",
+ [PHY_INTERFACE_MODE_RGMII] = "rgmii",
+ [PHY_INTERFACE_MODE_RGMII_ID] = "rgmii-id",
+ [PHY_INTERFACE_MODE_RGMII_RXID] = "rgmii-rxid",
+ [PHY_INTERFACE_MODE_RGMII_TXID] = "rgmii-txid",
+ [PHY_INTERFACE_MODE_RTBI] = "rtbi",
+ };
+
+ if (np) {
+ err = of_property_read_string(np, "phy-mode", &pm);
+ if (err)
+ return err;
+ for (i = 0; i < ARRAY_SIZE(phy_modes); i++)
+ if (!strcasecmp(pm, phy_modes[i]))
+ return i;
+ }
+
+ return -ENODEV;
+}
+
+static int __devinit fec_reset_phy(struct platform_device *pdev)
+{
+ int err, phy_reset;
+ struct device_node *np = pdev->dev.of_node;
+
+ if (!np)
+ return -ENODEV;
+
+ phy_reset = of_get_gpio(np, 0);
+ err = gpio_request_one(phy_reset, GPIOF_OUT_INIT_LOW, "phy-reset");
+ if (err) {
+ pr_warn("FEC: failed to get gpio phy-reset: %d\n", err);
+ return err;
+ }
+
+ msleep(1);
+ gpio_set_value(phy_reset, 1);
+
+ return 0;
+}
+#else /* CONFIG_OF */
+static inline int fec_get_phy_mode_dt(struct platform_device *pdev)
+{
+ return -ENODEV;
+}
+
+static inline int fec_reset_phy(struct platform_device *pdev)
+{
+ /*
+ * In case of platform probe, the reset has been done
+ * by machine code.
+ */
+ return 0;
+}
+#endif /* CONFIG_OF */
+
static int __devinit
fec_probe(struct platform_device *pdev)
{
@@ -1366,6 +1463,11 @@ fec_probe(struct platform_device *pdev)
struct net_device *ndev;
int i, irq, ret = 0;
struct resource *r;
+ const struct of_device_id *of_id;
+
+ of_id = of_match_device(fec_dt_ids, &pdev->dev);
+ if (of_id)
+ pdev->id_entry = (struct platform_device_id *) of_id->data;
r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!r)
@@ -1397,9 +1499,16 @@ fec_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, ndev);
- pdata = pdev->dev.platform_data;
- if (pdata)
- fep->phy_interface = pdata->phy;
+ fep->phy_interface = fec_get_phy_mode_dt(pdev);
+ if (fep->phy_interface == -ENODEV) {
+ pdata = pdev->dev.platform_data;
+ if (pdata)
+ fep->phy_interface = pdata->phy;
+ else
+ fep->phy_interface = PHY_INTERFACE_MODE_MII;
+ }
+
+ fec_reset_phy(pdev);
/* This device has up to three irqs on some platforms */
for (i = 0; i < 3; i++) {
@@ -1534,6 +1643,7 @@ static struct platform_driver fec_driver = {
#ifdef CONFIG_PM
.pm = &fec_pm_ops,
#endif
+ .of_match_table = fec_dt_ids,
},
.id_table = fec_devtype,
.probe = fec_probe,
--
1.7.4.1
^ permalink raw reply related
* Re: [E1000-devel] [PATCH] e1000: Allow the driver to be used on PA RISC C8000 workstation
From: Grant Grundler @ 2011-07-03 0:33 UTC (permalink / raw)
To: Matt Turner, Jesse Brandeburg, Kirsher, Jeffrey T
Cc: Rolf Eike Beer, Guy Martin, e1000-devel@lists.sourceforge.net,
linux-parisc@vger.kernel.org, mikulas@artax.karlin.mff.cuni.cz,
netdev
In-Reply-To: <BANLkTimbhOpp624KKU0dEE63mkAC1SDMAg@mail.gmail.com>
On Mon, Jun 27, 2011 at 03:33:43PM -0400, Matt Turner wrote:
> On Mon, Jun 27, 2011 at 2:42 PM, Rolf Eike Beer <eike-kernel@sf-tec.de> wrote:
> > Rolf Eike Beer wrote:
> >> Am Freitag, 18. M?rz 2011, 17:39:57 schrieb Rolf Eike Beer:
> >> > Am Mittwoch, 2. M?rz 2011, 21:19:24 schrieb Jesse Brandeburg:
> >> > > On Mon, Feb 28, 2011 at 5:40 AM, Guy Martin <gmsoft@tuxicoman.be> wrote:
> >> > > > Hi Jeff,
> >> > > >
> >> > > > Any luck getting this into mainline ?
> >> > >
> >> > > Hi Guy, sorry for the delay,
> >> > > We haven't been able to get our contacts in HP to give us a decent
> >> > > response so far, we are following up with them to see whats up. ?We
> >> > > have not lost the patch and are still tracking it internally.
> >> > >
> >> > > Give us a couple more weeks if that is okay and we should be able to
> >> > > settle this by then.
> >> >
> >> > I wonder what exactly you are waiting for? This is a sanity check that
> >> > we
> >> > disable, so no working systems could get broken by this. And every
> >> > single
> >> > C8000 seems to be affected by this and is working fine with that patch.
> >> > So maybe people at HP might have a clue _why_ this is screwed, but
> >> > until then I don't see any point in waiting.
> >> >
> >> > So please just add my tested-by and push this upstream soon. Since this
> >> > is basically a hardware quirk I would like to get this into stable also
> >> > so we may run vanilla 2.6.38.1 or something like that on C8000.
> >> >
> >> > Tested-by: Rolf Eike Beer <eike-kernel@sf-tec.de>
> >>
> >> For the netdev folks: it's this patch we are talking about
> >>
> >> http://www.spinics.net/lists/linux-parisc/msg03091.html
> >>
> >> I would love to see that someone finally picks this up and pushes this
> >> upstream, CC stable. This is absolutely annoying as it breaks every time
> >> anyone touches the kernel on one of this machines.
> >>
> >> Jeff, David, James: can you please make a decision of who takes this and
> >> then just do it?
> >
> > Ping?
>
> Ping indeed. Waiting as if HP is going to say "yes, we fucked that up.
> Go ahead with the patch." is silly.
AFAIK, HP hasn't paid anyone to work on parisc-linux in almost 10 years.
Good luck finding someone in HP who knows about C8000, much less it's
NIC firmware.
Jesse or Jeff K. should be able to accept the patch as-is.
I don't see any problem with it.
hth,
grant (ex-HP employee: 1999-2002 parisc-linux and 2002-2006 ia64-linux drivers)
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox