* Re: [PATCH] e1000: power off PHY after reset when interface is down
From: Prasanna Panchamukhi @ 2011-03-04 18:03 UTC (permalink / raw)
To: Jeff Kirsher
Cc: Allan, Bruce W, Pieper, Jeffrey E,
e1000-devel@lists.sourceforge.net, netdev@vger.kernel.org
In-Reply-To: <AANLkTim-T99r+npYWCLH8ry+hbtCNBOM4WUev8soaoM6@mail.gmail.com>
On 03/04/2011 12:19 AM, Jeff Kirsher wrote:
> On Wed, Feb 23, 2011 at 16:02, Jeff Kirsher<jeffrey.t.kirsher@intel.com> wrote:
>> On Tue, 2011-02-22 at 17:25 -0800, prasanna.panchamukhi@riverbed.com
>> wrote:
>>> From: Prasanna S. Panchamukhi<prasanna.panchamukhi@riverbed.com>
>>>
>>> Some Phys supported by the e1000 driver do not remain powered off
>>> across
>>> a reset of the device when the interface is down, e.g. on 82546.
>>> This patch powers down (only when WoL is disabled) the PHY after reset
>>> if
>>> the interface is down and ethtool diagnostics are not currently
>>> running.
>>>
>>> Similar problem was see on 82571 controller and was fixed in e1000e
>>> driver
>>> by Bruce Allan.
>>> Please refer commit 31dbe5b4ac6fca72dec946e4d0fa7f0913f1d9b1 for
>>> details.
>>>
>>> Signed-off-by: Prasanna S. Panchamukhi
>>> <prasanna.panchamukhi@riverbed.com>
>>> ---
>>> drivers/net/e1000/e1000_ethtool.c | 27 +++++++++++++++++++--------
>>> drivers/net/e1000/e1000_main.c | 7 +++++++
>>> 2 files changed, 26 insertions(+), 8 deletions(-)
>> Thanks Prasanna! I have added the patch to my queue of e1000 patches.
>>
> Prasanna-
> Here is what we found during validating your patch:
>
> The behavior of 82546 device(s) seems to be identical with/without this patch
> applied. 82546GB (LOM), dev_id 1079 powers down (with wol disabled) after
> ifdown, but powers back up after approx. 10 seconds. 82546EB (NIC), dev_id
> 1010 powers down (with wol disabled) after ifdown. Both of the above
> behaviors are the same with and without the patch applied. Also, if this patch
> DID work as expected, it should print a message after a reset, such as "Cannot
> restart autonegotiation: Resource temporarily unavailable", which would mirror
> the behavior of e1000e.
>
Hi Jeff,
Below is the test case we run verify this fix:
$ ethtool -s eth0 wol d
$ ifconfig eth0 up
$ mii-tool eth0
eth0: negotiated 100baseTx-FD, link ok
$ ifconfig eth0 down
$ mii-tool eth0
eth0: no link
$ ethtool -s eth0 autoneg on (doesn't really matter what we do here)
$ mii-tool eth0
eth0: negotiated 100baseTx-FD, link ok (this should be: eth0: no link)
I will re-run the test& check if does not fix this.
Thanks
Prasanna
^ permalink raw reply
* Re: mii_bus->read return checking in phy_device.c
From: Fleming Andy-AFLEMING @ 2011-03-04 18:06 UTC (permalink / raw)
To: Florian Fainelli; +Cc: netdev@vger.kernel.org, David Miller
In-Reply-To: <201103041825.48765.florian@openwrt.org>
On Mar 4, 2011, at 11:24, "Florian Fainelli" <florian@openwrt.org> wrote:
> Hello Andy,
>
> While debugging a PHY probing issue with the au1000_eth, I stumbled upon this
> in drivers/net/phy/phy_device.c:
>
> phy_reg = bus->read(bus, addr, MII_PHYSID1);
>
> if (phy_reg < 0)
> return -EIO;
>
> most drivers implement phylib's mdio_read callback by simply returning the
> contents of their MDIO register after a readl, ioread ... which is unsigned.
> Would not it rather make sense to check for phy_reg <= 0 instead?
That isn't a check for a non-existent PHY. PHY registers are unsigned 16-bit quantities. The negative 32-bit return value would be the result of something going wrong in the bus transaction.
Notice that later the code actually checks to see if the read value was mostly 1s...
>
> This can lead for instance to believing that a PHY is present at a wrong
> address because the MDIO read function returns 0 for that particular register,
> which is logical because no PHY is present at that address.
>
> I am asking in case I just miss something.
>
> Thank you.
> --
> Florian
>
^ permalink raw reply
* Re: mii_bus->read return checking in phy_device.c
From: Florian Fainelli @ 2011-03-04 18:12 UTC (permalink / raw)
To: Fleming Andy-AFLEMING; +Cc: netdev@vger.kernel.org, David Miller
In-Reply-To: <1FBC63C1-A8CE-4EFA-8864-62E12C0CFCB3@freescale.com>
On Friday 04 March 2011 19:06:20 Fleming Andy-AFLEMING wrote:
> On Mar 4, 2011, at 11:24, "Florian Fainelli" <florian@openwrt.org> wrote:
> > Hello Andy,
> >
> > While debugging a PHY probing issue with the au1000_eth, I stumbled upon
> > this
> >
> > in drivers/net/phy/phy_device.c:
> > phy_reg = bus->read(bus, addr, MII_PHYSID1);
> >
> > if (phy_reg < 0)
> >
> > return -EIO;
> >
> > most drivers implement phylib's mdio_read callback by simply returning
> > the contents of their MDIO register after a readl, ioread ... which is
> > unsigned. Would not it rather make sense to check for phy_reg <= 0
> > instead?
>
> That isn't a check for a non-existent PHY. PHY registers are unsigned
> 16-bit quantities. The negative 32-bit return value would be the result
> of something going wrong in the bus transaction.
Ok, but 0 is not an acceptable value either for both ID1 and ID2.
>
> Notice that later the code actually checks to see if the read value was
> mostly 1s...
What if the MDIO bus returns 0 instead of 1? Should that be fixed to return
0xffff instead in the driver?
>
> > This can lead for instance to believing that a PHY is present at a wrong
> > address because the MDIO read function returns 0 for that particular
> > register, which is logical because no PHY is present at that address.
> >
> > I am asking in case I just miss something.
> >
> > Thank you.
> > --
> > Florian
>
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [Bugme-new] [Bug 29712] New: Bonding Driver(version : 3.5.0) - Problem with ARP monitoring in active backup mode
From: Jay Vosburgh @ 2011-03-04 18:18 UTC (permalink / raw)
To: Harsha R02
Cc: Brian Haley, Andrew Morton, bugzilla-daemon, bugme-daemon, netdev
In-Reply-To: <E351E450E8B9F54684A699D42DC5ADF2103267E5@MPBAGVEX02.corp.mphasis.com>
Harsha R02 <Harsha.R02@mphasis.com> wrote:
>We found that the patch that is presented here has some issues and we
>cannot go with this solution.
>
>In function "bond_ab_arp_probe" in addition to sending arp probes for
>the currently active slave we should also
>be sending arp probes for the primary_slave if the link status of the
>primary slave is up correct ?
>
>I have made changes as below :
>
>static void bond_ab_arp_probe(struct bonding *bond)
>{
> struct slave *slave;
> int i;
>
> read_lock(&bond->curr_slave_lock);
>
> if (bond->current_arp_slave && bond->curr_active_slave)
> pr_info(DRV_NAME "PROBE: c_arp %s && cas %s BAD\n",
> bond->current_arp_slave->dev->name,
> bond->curr_active_slave->dev->name);
>
> if (bond->curr_active_slave) {
>+ if((bond->curr_active_slave != bond->primary_slave) &&
>+ (IS_UP(bond->primary_slave->dev))) {
>+ bond_arp_send_all(bond, bond->primary_slave);
>+ }
> bond_arp_send_all(bond, bond->curr_active_slave);
> read_unlock(&bond->curr_slave_lock);
No, we can't do this; if we send ARP probes out from an inactive
slave (which the primary would be at this point) it will confuse
switches that snoop traffic to determine the switch port's MAC addresses
(the switches will believe that the "primary" slave is the port to use
to reach the bond's MAC address).
I think your problem is that your configuration (two systems,
back to back, no switch) is not a configuration the ARP monitor is
designed to work with.
The ARP monitor determines the availability of backup slaves
based on traffic received by the backup slaves. The usual source of
this traffic is the ARP broadcast requests being sent out the active
slave and then forwarded by the switch to all switch ports, including
the backup slave's port. I'm guessing that your system isn't forwarding
these packets like a switch would, and so the primary slave isn't seeing
any incoming packets at all.
If your primary slave (which is an inactive slave at the moment)
is not receiving traffic, bonding will never believe it is available.
I've never experimented with using the ARP monitor in a
back-to-back confguration; I'm thinking through how the ARP monitor
functions, and I'm not sure it can be reliable when set up like this.
-J
---
-Jay Vosburgh, IBM Linux Technology Center, fubar@us.ibm.com
^ permalink raw reply
* Re: mii_bus->read return checking in phy_device.c
From: Fleming Andy-AFLEMING @ 2011-03-04 18:19 UTC (permalink / raw)
To: Florian Fainelli; +Cc: netdev@vger.kernel.org, David Miller
In-Reply-To: <201103041912.10252.florian@openwrt.org>
On Mar 4, 2011, at 12:10, "Florian Fainelli" <florian@openwrt.org> wrote:
> On Friday 04 March 2011 19:06:20 Fleming Andy-AFLEMING wrote:
>> On Mar 4, 2011, at 11:24, "Florian Fainelli" <florian@openwrt.org> wrote:
>>> Hello Andy,
>>>
>>> While debugging a PHY probing issue with the au1000_eth, I stumbled upon
>>> this
>>>
>>> in drivers/net/phy/phy_device.c:
>>> phy_reg = bus->read(bus, addr, MII_PHYSID1);
>>>
>>> if (phy_reg < 0)
>>>
>>> return -EIO;
>>>
>>> most drivers implement phylib's mdio_read callback by simply returning
>>> the contents of their MDIO register after a readl, ioread ... which is
>>> unsigned. Would not it rather make sense to check for phy_reg <= 0
>>> instead?
>>
>> That isn't a check for a non-existent PHY. PHY registers are unsigned
>> 16-bit quantities. The negative 32-bit return value would be the result
>> of something going wrong in the bus transaction.
>
> Ok, but 0 is not an acceptable value either for both ID1 and ID2.
I don't remember the exact details, but i recall we had a discussion about this several years ago, and decided that 0 should not be interpreted as a non-existent PHY. I know I have a part that has an internal PHY which doesnt have anything in the ID registers. If your driver is aware that it did not get a response from the PHY, it should return 0xffff. Otherwise, you can return 0, and just be aware that the PHY subsystem will believe there's a PHY there.
>
>>
>> Notice that later the code actually checks to see if the read value was
>> mostly 1s...
>
> What if the MDIO bus returns 0 instead of 1? Should that be fixed to return
> 0xffff instead in the driver?
>
>>
>>> This can lead for instance to believing that a PHY is present at a wrong
>>> address because the MDIO read function returns 0 for that particular
>>> register, which is logical because no PHY is present at that address.
>>>
>>> I am asking in case I just miss something.
>>>
>>> Thank you.
>>> --
>>> Florian
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe netdev" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply
* Re: [Patch] ariadne: fix possible null dereference
From: Randy Dunlap @ 2011-03-04 18:31 UTC (permalink / raw)
To: j223yang; +Cc: davem, netdev, linux-kernel
In-Reply-To: <20110304174625.GA31042@asset.uwaterloo.ca>
On Fri, 4 Mar 2011 12:46:26 -0500 j223yang@asset.uwaterloo.ca wrote:
> This patch fixes bugzilla #13853:
> https://bugzilla.kernel.org/show_bug.cgi?id=13853
>
> The patch removes dereference of 'dev' after testing for NULL.
> The source code ariadne.c uses spaces instead of tabs, so the patch
> uses spaces too.
Sorry for the confusion here, but (while I agree with the fix in this
patch), this patch still does not apply cleanly.
If a line in the source code file uses spaces, then use spaces.
If a line in the source code file uses tabs, then use tabs.
You cannot exchange one for the other in your generated patch.
Using 'diff' creates the patch correctly, so I guess that your patch
generation tool still needs some work.
Please take your patch and test applying it:
> cd linux-2.6.38-rc7
> patch -p1 --dry-run < ~/tmp/ariadne.patch
patching file drivers/net/ariadne.c
Hunk #2 FAILED at 430.
1 out of 2 hunks FAILED -- saving rejects to file drivers/net/ariadne.c.rej
> Signed-off-by: Jinqiu Yang<crindy646@gmail.com>
> ---
> drivers/net/ariadne.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/ariadne.c b/drivers/net/ariadne.c
> --- a/drivers/net/ariadne.c
> +++ b/drivers/net/ariadne.c
> @@ -420,7 +420,7 @@ static inline void ariadne_reset(struct
> static irqreturn_t ariadne_interrupt(int irq, void *data)
> {
> struct net_device *dev = (struct net_device *)data;
> - volatile struct Am79C960 *lance = (struct Am79C960*)dev->base_addr;
> + volatile struct Am79C960 *lance;
> struct ariadne_private *priv;
> int csr0, boguscnt;
> int handled = 0;
> @@ -430,6 +430,7 @@ static irqreturn_t ariadne_interrupt(int
> return IRQ_NONE;
> }
>
> + lance = (struct Am79C960 *)dev->base_addr;
> lance->RAP = CSR0; /* PCnet-ISA Controller Status */
>
> if (!(lance->RDP & INTR)) /* Check if any interrupt has been */
>
> --
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
^ permalink raw reply
* Re: [PATCH V4] Export ACPI _DSM provided firmware instance number and string name to sysfs
From: Jesse Barnes @ 2011-03-04 18:38 UTC (permalink / raw)
To: Narendra_K
Cc: linux-pci, linux-hotplug, netdev, mjg, Matt_Domsch, Charles_Rose,
Jordan_Hargrave, Shyam_Iyer, sfr
In-Reply-To: <20110304164957.GA2913@fedora14-r610.oslab.blr.amer.dell.com>
On Fri, 4 Mar 2011 08:28:59 -0800
<Narendra_K@Dell.com> wrote:
> On Wed, Mar 02, 2011 at 10:34:17PM +0530, K, Narendra wrote:
> > On Wed, Feb 23, 2011 at 06:06:42PM +0530, K, Narendra wrote:
> > > Hello,
> > >
> > > This patch exports ACPI _DSM provided firmware instance number and
> > > string name to sysfs.
> > >
> > > V1 -> V2:
> > > The attribute 'index' is changed to 'acpi_index' as the semantics of
> > > SMBIOS provided device type instance and ACPI _DSM provided firmware
> > > instance number are different.
> > >
> > > V2 -> V3:
> > > Matthew Garrett pointed out that 'sysfs_create_groups' does return an
> > > error when there are no ACPI _DSM attributes available and because of
> > > that the fallback to SMBIOS will not happen. As a result SMBIOS provided
> > > attributes are not created. This version of the patch addresses the issue.
> > >
> >
> > V3 -> V4:
> > Select NLS if (DMI || ACPI) in drivers/pci/Kconfig to prevent build
> > breakage from an 'allmodconfig'
> >
> > Matthew,
> > Thanks for the suggestion.
> >
> > From: Narendra K <narendra_k@dell.com>
> > Subject: [PATCH] Export ACPI _DSM provided firmware instance number and string to sysfs
> >
>
> Hi Jesse,
>
> Does Version 4 of the patch look good for inclusion ? Please let us know
> if there are any concerns.
Oh sorry, I was looking in the wrong mailbox, I'll pull this one in now.
--
Jesse Barnes, Intel Open Source Technology Center
^ permalink raw reply
* Re: pull request: wireless-next-2.6 2011-02-22
From: John W. Linville @ 2011-03-04 18:40 UTC (permalink / raw)
To: Shan Wei
Cc: Larry.Finger-tQ5ms3gMjBLk1uMJSBkQmQ, davem-fT/PcQaiUtIeIZ0/mPfg9Q,
linux-wireless-u79uwXL29TY76Z2rM5mHXA,
netdev-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <4D706C2E.40307-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
On Fri, Mar 04, 2011 at 12:35:58PM +0800, Shan Wei wrote:
> John W. Linville wrote, at 02/23/2011 05:52 AM:
> > Please let me know if there are problems!
>
> Fail to compile with attached config under net-next tree.
>
> ======Error Begin================================================================
> drivers/net/wireless/rtlwifi/rtl8192cu/built-in.o: In function `rtl92c_phy_sw_chnl':
> /data2/net-next-2.6/drivers/net/wireless/rtlwifi/rtl8192cu/../rtl8192c/phy_common.c:803: multiple definition of `rtl92c_phy_sw_chnl'
> drivers/net/wireless/rtlwifi/rtl8192ce/built-in.o:/data2/net-next-2.6/drivers/net/wireless/rtlwifi/rtl8192ce/../rtl8192c/phy_common.c:803: first defined here
> drivers/net/wireless/rtlwifi/rtl8192cu/built-in.o: In function `rtl92c_fill_h2c_cmd':
This is already fixed in wireless-next-2.6:
commit 1472d3a87586eb7529d1d85f7c888055650b7208
Author: Larry Finger <Larry.Finger-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org>
Date: Wed Feb 23 10:24:58 2011 -0600
rtlwifi: rtl8192ce: rtl8192cu: Fix multiple def errors for allyesconfig buil
As noted by Stephan Rothwell, an allyesconfig build fails since rtl8192cu
was merged with failures such as:
drivers/net/wireless/rtlwifi/rtl8192cu/built-in.o: In function `rtl92c_phy_s
(.opd+0xf30): multiple definition of `rtl92c_phy_sw_chnl'
drivers/net/wireless/rtlwifi/rtl8192ce/built-in.o:(.opd+0xb70): first define
drivers/net/wireless/rtlwifi/rtl8192cu/built-in.o: In function `rtl92c_fill_
(.opd+0x288): multiple definition of `rtl92c_fill_h2c_cmd'
drivers/net/wireless/rtlwifi/rtl8192ce/built-in.o:(.opd+0x288): first define
These are caused because the code shared between rtl8192ce and rtl8192cu
is included in both drivers. This has been fixed by creating a new modue tha
contains the shared code.
Signed-off-by: Larry Finger <Larry.Finger-tQ5ms3gMjBLk1uMJSBkQmQ@public.gmane.org>
Signed-off-by: John W. Linville <linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org>
It will be in my next pull request to Dave.
John
--
John W. Linville Someday the world will need a hero, and you
linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org might be all we have. Be ready.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [PATCH V4] Export ACPI _DSM provided firmware instance number and string name to sysfs
From: Jesse Barnes @ 2011-03-04 18:43 UTC (permalink / raw)
To: Narendra_K
Cc: linux-pci, linux-hotplug, netdev, mjg, Matt_Domsch, Charles_Rose,
Jordan_Hargrave, Shyam_Iyer, sfr
In-Reply-To: <20110302172508.GA2794@fedora14-r610.oslab.blr.amer.dell.com>
On Wed, 2 Mar 2011 22:34:17 +0530
<Narendra_K@Dell.com> wrote:
> On Wed, Feb 23, 2011 at 06:06:42PM +0530, K, Narendra wrote:
> > Hello,
> >
> > This patch exports ACPI _DSM provided firmware instance number and
> > string name to sysfs.
> >
> > V1 -> V2:
> > The attribute 'index' is changed to 'acpi_index' as the semantics of
> > SMBIOS provided device type instance and ACPI _DSM provided firmware
> > instance number are different.
> >
> > V2 -> V3:
> > Matthew Garrett pointed out that 'sysfs_create_groups' does return an
> > error when there are no ACPI _DSM attributes available and because of
> > that the fallback to SMBIOS will not happen. As a result SMBIOS provided
> > attributes are not created. This version of the patch addresses the issue.
> >
>
> V3 -> V4:
> Select NLS if (DMI || ACPI) in drivers/pci/Kconfig to prevent build
> breakage from an 'allmodconfig'
Applied, fingers crossed this time. :)
--
Jesse Barnes, Intel Open Source Technology Center
^ permalink raw reply
* Re: [ethtool PATCH 2/2] Add RX packet classification interface
From: Alexander Duyck @ 2011-03-04 19:09 UTC (permalink / raw)
To: Ben Hutchings; +Cc: Santwona Behera, netdev@vger.kernel.org
In-Reply-To: <1298939712.2569.43.camel@bwh-desktop>
On 2/28/2011 4:35 PM, Ben Hutchings wrote:
> On Tue, 2011-02-22 at 12:52 -0800, Alexander Duyck wrote:
[...]
>>>> } else
>>>> show_usage(1);
>>>> break;
>>>
>>> I don't think the same options (-n, -N) should be used both for flow
>>> hashing and n-tuple flow steering/filtering. This command-line
>>> interface and the structure used in the ethtool API just seem to reflect
>>> the implementation in the niu driver.
>>>
>>> (In fact I would much prefer it if the -u and -U options could be used
>>> for both the rxnfc and rxntuple interfaces. But I haven't thought about
>>> how the differences in functionality would be exposed to or hidden from
>>> the user.)
>>
>> I was kind of thinking about merging the two interfaces too, but I was
>> looking at it more from the perspective of moving away from ntuple more
>> towards this newer interface. My main motivation being that the filter
>> display option is so badly broken for ntuple that it would be easier to
>> make ntuple a subset of the flow classifier instead of the other way around.
>>
>> What would you think of using the "flow-type" keyword to indicate legacy
>> ntuple support, and then adding something like "class-rule-add", and
>> "class-rule-del" to add support for the network flow classifier calls?
>
> I really don't want to introduce different syntax for functionality that
> is common between the two command sets. The user should not have to
> know that driver A implements interface I and driver B implements
> interface J, except that since version 2.6.y driver A implements
> interface J too.
>
> Surely it is possible to try one interface, then the other, when the
> requested filter can be implemented either way?
The problem is that the interfaces are different in the way they
implement their masks. N-tuple defines the mask as 0s mean inclusion,
1s, mean exclusion. The network flow classifier filters are the exact
opposite. As such we really need to know which type of filter we are
dealing with before we start setting up values. In addition there are
options such as location which exist in network flow classifier rules,
but not in ntuple rules.
Thanks,
Alex
^ permalink raw reply
* Re: [PATCH net-next-2.6] inetpeer: seqlock optimization
From: David Miller @ 2011-03-04 19:17 UTC (permalink / raw)
To: eric.dumazet; +Cc: xiaosuo, netdev
In-Reply-To: <1299251348.2676.16.camel@edumazet-laptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Fri, 04 Mar 2011 16:09:08 +0100
> Here is a patch to implement this idea.
Applied, thanks Eric!
^ permalink raw reply
* Re: [net-next-2.6 PATCH 02/10] ethtool: add ntuple flow specifier to network flow classifier
From: Alexander Duyck @ 2011-03-04 19:30 UTC (permalink / raw)
To: Dimitrios Michailidis
Cc: Ben Hutchings, Alexander Duyck, davem@davemloft.net,
Kirsher, Jeffrey T, netdev@vger.kernel.org
In-Reply-To: <8A71B368A89016469F72CD08050AD334091C1FCF@maui.asicdesigners.com>
On 3/2/2011 12:03 PM, Dimitrios Michailidis wrote:
> Ben Hutchings wrote:
>> On Wed, 2011-03-02 at 11:11 -0800, Dimitrios Michailidis wrote:
>>> Ben Hutchings wrote:
>>>> /**
>>>> * struct ethtool_flow_ext - flow spec common extension fields
>>>> * @vlan_etype: EtherType for vlan tagged packet to match
>>>> * @vlan_tci: VLAN tag to match
>>>> * @data: Driver-dependent data to match
>>>> *
>>>> * Note: Additional fields may be inserted before @vlan_etype in future,
>>>> * but the offset of the existing fields within the containing structure
>>>> * (&struct ethtool_rx_flow_spec) will be stable.
>>>> */
>>>> struct ethtool_flow_ext {
>>>> __be16 vlan_etype;
>>>> __be16 vlan_tci;
>>>> __be32 data[2];
>>>> };
>>>
>>> I am wondering about the semantics of these vlan_* fields. Is vlan_etype the
>>> Ethertype in the VLAN header or the type after it?
>>
>> It would be the the type in the VLAN tag. The nested ethertype is
>> normally implied by flow_type to be ETH_P_IP.
>>
>> This does leave the question of what this would mean:
>>
>> struct ethtool_rx_flow_spec fs = {
>> .flow_type = ... | FLOW_EXT,
>> ...
>> .h_ext.vlan_tci = htons(0x1234),
>> .m_ext.vlan_etype = 0xffff,
>> };
>>
>> This says the TCI must be == 0x1234 but the type can be anything. But
>> the type surely has to be be one assigned for use in VLAN tags. Should
>> we leave it to the driver/hardware to determine what those valid types
>> are, or should we reject this as valid?
>
> Right. Devices have some internal rules for what qualifies as a VLAN frame.
> If users are given the option to specify vlan_etype what do they get?
> At least we need to specify what is expected so drivers can decide if they can support it.
The basic idea I had is similar to what Ben described. Basically the
vlan_etype can be used to determine the Ethertype for the VLAN to be
compared. The reason for this is specifically the VLAN 0 case since
without the VLAN Ethertype check VLAN 0 on ixgbe hardware will match an
untagged frame and that may not be a desired result. As such we can
specify the VLAN Ethertype and then we will only match VLAN tagged
frames without any false hits.
Thanks,
Alex
^ permalink raw reply
* Re: 2.6.37 regression: adding main interface to a bridge breaks vlan interface RX
From: chriss @ 2011-03-04 19:32 UTC (permalink / raw)
To: netdev
In-Reply-To: <20110301215252.GA13336@electric-eye.fr.zoreil.com>
Francois Romieu <romieu <at> fr.zoreil.com> writes:
>
> Chriss, can you give it a try against current -rc / -git and see if it makes
> a difference ?
>
I hope i'm doing it right. i checked out the
'git://git.kernel.org/pub/scm/linux/kernel/git/sfr/linux-next.git'
and will try to apply the patch you provided. please correct me if i'm wrong.
I will report back.
regards//chriss
^ permalink raw reply
* pull request: wireless-next-2.6 2011-03-04
From: John W. Linville @ 2011-03-04 19:40 UTC (permalink / raw)
To: davem-fT/PcQaiUtIeIZ0/mPfg9Q
Cc: linux-wireless-u79uwXL29TY76Z2rM5mHXA,
netdev-u79uwXL29TY76Z2rM5mHXA
Dave,
Yet another batch of new wireless bits intended for 2.6.39... :-)
Highlights in this round include AP-mode support for wl12xx, some
rtlwifi fixes (many build-related), some more b43 N-phy support
advancement, a big batch of ath9k_htc updates, and the refactoring of
iwlwifi to separate iwl3945 and iwl4965 support out into a new iwlegacy
driver. Mixed-in, of course, is the usual batch of various driver and
mac80211 updates and fixes.
Please let me know if there are problems!
John
---
The following changes since commit 29546a6404e3a4b5d13f0a9586eb5cf1c3b25167:
ipv6: Use ERR_CAST in addrconf_dst_alloc. (2011-03-03 12:10:37 -0800)
are available in the git repository at:
ssh://master.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6.git for-davem
Alessio Igor Bogani (2):
rtlwifi: Add the missing rcu_read_lock/unlock
rtlwifi: fix places where uninitialized data is used
Arik Nemtsov (9):
wl12xx: avoid blocking while holding rcu lock on bss info change
wl12xx: fix potential race condition with TX queue watermark
wl12xx: AP-mode - fix race condition on sta connection
wl12xx: AP-mode - TX queue per link in AC
wl12xx: report invalid TX rate when returning non-TX-ed skbs
wl12xx: AP-mode - support HW based link PS monitoring
wl12xx: AP mode - fix bug in cleanup of wl1271_op_sta_add()
wl12xx: AP-mode - count free FW TX blocks per link
wl12xx: AP-mode - management of links in PS-mode
Chaoming Li (1):
rtlwifi: Fix error registering rate-control
Christian Lamparter (1):
p54: implement set_coverage_class
Dan Carpenter (2):
wl12xx: change type from u8 to int
iwlwifi: remove duplicate initialization
Eliad Peller (4):
wl12xx: fix identification of beacon packets (debug)
wl12xx: declare support for IEEE80211_HW_REPORTS_TX_ACK_STATUS
wl12xx: use standard ALIGN() macro
wl12xx: always set mac_address when configuring ht caps
Felix Fietkau (4):
p54: fix a NULL pointer dereference bug
ath9k: use generic mac80211 LED blinking code
cfg80211: add a field for the bitrate of the last rx data packet from a station
mac80211: add support for showing the last rx bitrate
Gery Kahn (1):
wl12xx: update PLT initialization for new firmware
Gustavo F. Padovan (1):
Bluetooth: Fix BT_L2CAP and BT_SCO in Kconfig
Joe Gunn (1):
orinoco: Drop scan results with unknown channels
Johannes Berg (8):
mac80211: rename RX_FLAG_TSFT
rtl8192c: fix compilation errors
mac80211: make tx() operation return void
mac80211: remove IBSS merge delay
mac80211: copy peer MCS TX parameters
iwlagn: fix iwlagn_check_needed_chains
mac80211: support direct offchannel TX offload
mac80211: make rate control Kconfig warning depend on mac80211
John W. Linville (6):
Merge branch 'wireless-next-2.6' of git://git.kernel.org/.../iwlwifi/iwlwifi-2.6
Merge branch 'for-linville' of git://git.kernel.org/.../luca/wl12xx
iwlegacy: change some symbols duplicated from iwlwifi directory
at76c50x-usb: fix warning caused by at76_mac80211_tx now returning void
Merge branch 'wireless-next-2.6' of git://git.kernel.org/.../iwlwifi/iwlwifi-2.6
Merge branch 'master' of git://git.kernel.org/.../linville/wireless-next-2.6 into for-davem
Larry Finger (1):
rtlwifi: rtl8192ce: rtl8192cu: Fix multiple def errors for allyesconfig build
Luciano Coelho (1):
wl12xx: fix MODULE_AUTHOR email address
Nishant Sarmukadam (3):
mwl8k: fix rf_antenna rx argument for AP
mwl8k: Tell mac80211 we have rate adaptation in FW
mwl8k: Invert tx queues for set_hw_spec and set_edca_params
Rafał Miłecki (5):
b43: N-PHY: fix 0x2055 radio workaround condition
b43: N-PHY: rev1: enable some gain ctl workarounds
b43: N-PHY: rev1: restore PHY state after RSSI operations
b43: fill PHY ctl word1 in TX header for N-PHY
b43: N-PHY: rev3+: add static tables
Senthil Balasubramanian (1):
ath9k: Fix incorrect GPIO LED pin for AR9485
Stanislaw Gruszka (7):
iwlegacy: do not set tx power when channel is changing
mac80211: better fix for conn_mon_timer running after disassociate
iwlwifi: fix dma mappings and skbs leak
iwlegacy: fix dma mappings and skbs leak
iwlwifi: add {ack,plpc}_check module parameters
iwlwifi: move check health code into iwl-rx.c
iwlwifi: move remaining iwl-agn-rx.c code into iwl-rx.c
Sujith Manoharan (22):
ath9k_htc: Handle storage devices
ath9k_htc: Allow upto two simultaneous interfaces
ath9k_htc: Unify target capability updating
ath9k_htc: Fix error handling in add_interface
ath9k_htc: Remove OP_PREAMBLE_SHORT
ath9k_htc: Remove OP_PROTECT_ENABLE
ath9k_htc: Remove OP_ASSOCIATED variable
ath9k_htc: Set the BSSID mask for multiple interfaces
ath9k_htc: Make sequence number calculation per-VIF
ath9k_htc: Use VIF from the packet's control data
ath9k_htc: Protect ampdu_action with a mutex
ath9k_htc: Maintain individual counters for interfaces
ath9k_htc: Allow AP interface to be created
ath9k_htc: Calculate and set the HW opmode
ath9k_htc: Add ANI for AP mode
ath9k_htc: Configure beacon timers in AP mode
ath9k_htc: Fix TBTT calculation for IBSS mode
ath9k_htc: Fix host RX initialization
ath9k_htc: Fix RX filters
ath9k_htc: Add debug code to print endpoint mapping
ath9k_htc: Fix error path in URB allocation
ath9k_htc: Handle BSSID/AID for multiple interfaces
Vivek Natarajan (4):
mac80211: Fix a race on enabling power save.
ath9k_hw: Fix pcie_serdes setting for AR9485 1.1 version.
ath9k: Cancel pll_work while disabling radio.
ath9k: Fix compilation warning.
Wey-Yi Guy (11):
iwlwifi: Limit number of firmware reload
iwlwifi: Loading correct uCode again when fail to load
iwlwifi: enable 2-wire bt coex support for non-combo device
iwlwifi: split the drivers for agn and legacy devices 3945/4965
Revert "iwlwifi: split the drivers for agn and legacy devices 3945/4965"
iwlwifi: split the drivers for agn and legacy devices 3945/4965
iwlagn: name change for BT config command
iwlagn: add bt config structure support for 2000 series
iwlagn: add BT Session Activity 2 UART message (BT -> WiFi)
iwlagn: split BT page and inquiry UART msg
iwlagn: enable BT session 2 type UART for 2000 series
Willy Tarreau (4):
rtlwifi: Fix build when RTL8192CU is selected, but RTL8192CE is not
rtl8192cu: fix build error (vmalloc/vfree undefined)
rtlwifi: Let rtlwifi build when PCI is not enabled
rtlwifi: Eliminate udelay calls with too large values
drivers/net/wireless/Kconfig | 1 +
drivers/net/wireless/Makefile | 5 +-
drivers/net/wireless/adm8211.c | 4 +-
drivers/net/wireless/at76c50x-usb.c | 10 +-
drivers/net/wireless/ath/ar9170/ar9170.h | 2 +-
drivers/net/wireless/ath/ar9170/main.c | 5 +-
drivers/net/wireless/ath/ath5k/ath5k.h | 4 +-
drivers/net/wireless/ath/ath5k/base.c | 7 +-
drivers/net/wireless/ath/ath5k/mac80211-ops.c | 6 +-
drivers/net/wireless/ath/ath9k/ar9003_hw.c | 8 +-
drivers/net/wireless/ath/ath9k/ath9k.h | 43 +-
drivers/net/wireless/ath/ath9k/gpio.c | 166 +-
drivers/net/wireless/ath/ath9k/hif_usb.c | 78 +-
drivers/net/wireless/ath/ath9k/htc.h | 77 +-
drivers/net/wireless/ath/ath9k/htc_drv_beacon.c | 170 +-
drivers/net/wireless/ath/ath9k/htc_drv_init.c | 19 +-
drivers/net/wireless/ath/ath9k/htc_drv_main.c | 452 ++-
drivers/net/wireless/ath/ath9k/htc_drv_txrx.c | 84 +-
drivers/net/wireless/ath/ath9k/init.c | 22 +
drivers/net/wireless/ath/ath9k/main.c | 15 +-
drivers/net/wireless/ath/ath9k/recv.c | 2 +-
drivers/net/wireless/ath/ath9k/reg.h | 1 +
drivers/net/wireless/ath/ath9k/wmi.c | 4 -
drivers/net/wireless/ath/carl9170/carl9170.h | 2 +-
drivers/net/wireless/ath/carl9170/tx.c | 5 +-
drivers/net/wireless/b43/main.c | 6 +-
drivers/net/wireless/b43/phy_n.c | 28 +-
drivers/net/wireless/b43/tables_nphy.c | 1106 ++++++-
drivers/net/wireless/b43/tables_nphy.h | 27 +
drivers/net/wireless/b43/xmit.c | 75 +-
drivers/net/wireless/b43/xmit.h | 6 +
drivers/net/wireless/b43legacy/main.c | 5 +-
drivers/net/wireless/b43legacy/xmit.c | 2 +-
drivers/net/wireless/iwlegacy/Kconfig | 116 +
drivers/net/wireless/iwlegacy/Makefile | 25 +
.../{iwlwifi => iwlegacy}/iwl-3945-debugfs.c | 11 +-
.../{iwlwifi => iwlegacy}/iwl-3945-debugfs.h | 4 +-
.../wireless/{iwlwifi => iwlegacy}/iwl-3945-fh.h | 5 +-
.../wireless/{iwlwifi => iwlegacy}/iwl-3945-hw.h | 9 +-
.../wireless/{iwlwifi => iwlegacy}/iwl-3945-led.c | 4 +-
.../wireless/{iwlwifi => iwlegacy}/iwl-3945-led.h | 2 +-
.../wireless/{iwlwifi => iwlegacy}/iwl-3945-rs.c | 41 +-
.../net/wireless/{iwlwifi => iwlegacy}/iwl-3945.c | 253 +-
.../net/wireless/{iwlwifi => iwlegacy}/iwl-3945.h | 12 +-
drivers/net/wireless/iwlegacy/iwl-4965-calib.c | 967 ++++++
.../iwl-legacy.h => iwlegacy/iwl-4965-calib.h} | 30 +-
drivers/net/wireless/iwlegacy/iwl-4965-debugfs.c | 774 +++++
.../iwl-4965-debugfs.h} | 35 +-
.../iwl-legacy.h => iwlegacy/iwl-4965-eeprom.c} | 107 +-
.../wireless/{iwlwifi => iwlegacy}/iwl-4965-hw.h | 26 +-
.../iwl-3945-led.c => iwlegacy/iwl-4965-led.c} | 30 +-
.../rtl8192cu/fw.c => iwlegacy/iwl-4965-led.h} | 17 +-
drivers/net/wireless/iwlegacy/iwl-4965-lib.c | 1260 +++++++
drivers/net/wireless/iwlegacy/iwl-4965-rs.c | 2870 ++++++++++++++++
.../iwl-agn-rx.c => iwlegacy/iwl-4965-rx.c} | 172 +-
drivers/net/wireless/iwlegacy/iwl-4965-sta.c | 721 ++++
drivers/net/wireless/iwlegacy/iwl-4965-tx.c | 1369 ++++++++
drivers/net/wireless/iwlegacy/iwl-4965-ucode.c | 166 +
.../net/wireless/{iwlwifi => iwlegacy}/iwl-4965.c | 806 +----
drivers/net/wireless/iwlegacy/iwl-4965.h | 282 ++
drivers/net/wireless/iwlegacy/iwl-commands.h | 3405 ++++++++++++++++++
drivers/net/wireless/iwlegacy/iwl-core.c | 2674 ++++++++++++++
drivers/net/wireless/iwlegacy/iwl-core.h | 646 ++++
drivers/net/wireless/iwlegacy/iwl-csr.h | 422 +++
drivers/net/wireless/iwlegacy/iwl-debug.h | 198 ++
drivers/net/wireless/iwlegacy/iwl-debugfs.c | 1467 ++++++++
drivers/net/wireless/iwlegacy/iwl-dev.h | 1426 ++++++++
.../iwl-3945-led.h => iwlegacy/iwl-devtrace.c} | 23 +-
drivers/net/wireless/iwlegacy/iwl-devtrace.h | 270 ++
drivers/net/wireless/iwlegacy/iwl-eeprom.c | 561 +++
drivers/net/wireless/iwlegacy/iwl-eeprom.h | 344 ++
drivers/net/wireless/iwlegacy/iwl-fh.h | 513 +++
drivers/net/wireless/iwlegacy/iwl-hcmd.c | 271 ++
drivers/net/wireless/iwlegacy/iwl-helpers.h | 181 +
drivers/net/wireless/iwlegacy/iwl-io.h | 545 +++
drivers/net/wireless/iwlegacy/iwl-led.c | 188 +
.../{iwlwifi/iwl-3945-led.h => iwlegacy/iwl-led.h} | 34 +-
drivers/net/wireless/iwlegacy/iwl-legacy-rs.h | 456 +++
drivers/net/wireless/iwlegacy/iwl-power.c | 165 +
.../iwl-3945-led.c => iwlegacy/iwl-power.h} | 61 +-
drivers/net/wireless/iwlegacy/iwl-prph.h | 523 +++
drivers/net/wireless/iwlegacy/iwl-rx.c | 302 ++
drivers/net/wireless/iwlegacy/iwl-scan.c | 625 ++++
drivers/net/wireless/iwlegacy/iwl-spectrum.h | 92 +
drivers/net/wireless/iwlegacy/iwl-sta.c | 816 +++++
drivers/net/wireless/iwlegacy/iwl-sta.h | 148 +
drivers/net/wireless/iwlegacy/iwl-tx.c | 660 ++++
.../wireless/{iwlwifi => iwlegacy}/iwl3945-base.c | 543 ++--
drivers/net/wireless/iwlegacy/iwl4965-base.c | 3632 ++++++++++++++++++++
drivers/net/wireless/iwlwifi/Kconfig | 124 +-
drivers/net/wireless/iwlwifi/Makefile | 41 +-
drivers/net/wireless/iwlwifi/iwl-1000.c | 2 -
drivers/net/wireless/iwlwifi/iwl-2000.c | 3 +-
drivers/net/wireless/iwlwifi/iwl-5000.c | 4 -
drivers/net/wireless/iwlwifi/iwl-6000.c | 4 -
drivers/net/wireless/iwlwifi/iwl-agn-lib.c | 81 +-
drivers/net/wireless/iwlwifi/iwl-agn-rxon.c | 58 +-
drivers/net/wireless/iwlwifi/iwl-agn-tx.c | 12 +-
drivers/net/wireless/iwlwifi/iwl-agn.c | 110 +-
drivers/net/wireless/iwlwifi/iwl-agn.h | 6 +-
drivers/net/wireless/iwlwifi/iwl-commands.h | 108 +-
drivers/net/wireless/iwlwifi/iwl-core.c | 76 +-
drivers/net/wireless/iwlwifi/iwl-core.h | 14 +-
drivers/net/wireless/iwlwifi/iwl-debugfs.c | 2 -
drivers/net/wireless/iwlwifi/iwl-dev.h | 13 +-
drivers/net/wireless/iwlwifi/iwl-eeprom.c | 8 -
drivers/net/wireless/iwlwifi/iwl-hcmd.c | 5 -
drivers/net/wireless/iwlwifi/iwl-led.c | 2 -
drivers/net/wireless/iwlwifi/iwl-legacy.c | 657 ----
drivers/net/wireless/iwlwifi/iwl-power.c | 3 -
drivers/net/wireless/iwlwifi/iwl-rx.c | 392 ++-
drivers/net/wireless/iwlwifi/iwl-scan.c | 10 -
drivers/net/wireless/iwlwifi/iwl-sta.c | 11 -
drivers/net/wireless/iwlwifi/iwl-tx.c | 78 +-
drivers/net/wireless/libertas_tf/main.c | 3 +-
drivers/net/wireless/mac80211_hwsim.c | 5 +-
drivers/net/wireless/mwl8k.c | 54 +-
drivers/net/wireless/orinoco/scan.c | 5 +
drivers/net/wireless/p54/eeprom.c | 7 +-
drivers/net/wireless/p54/fwio.c | 9 +-
drivers/net/wireless/p54/lmac.h | 2 +-
drivers/net/wireless/p54/main.c | 14 +-
drivers/net/wireless/p54/p54.h | 1 +
drivers/net/wireless/p54/txrx.c | 13 +-
drivers/net/wireless/rt2x00/rt2x00.h | 2 +-
drivers/net/wireless/rt2x00/rt2x00mac.c | 5 +-
drivers/net/wireless/rtl818x/rtl8180/dev.c | 10 +-
drivers/net/wireless/rtl818x/rtl8187/dev.c | 8 +-
drivers/net/wireless/rtlwifi/Kconfig | 7 +
drivers/net/wireless/rtlwifi/Makefile | 8 +-
drivers/net/wireless/rtlwifi/base.c | 15 +-
drivers/net/wireless/rtlwifi/core.c | 9 +-
drivers/net/wireless/rtlwifi/efuse.c | 18 -
drivers/net/wireless/rtlwifi/efuse.h | 3 -
drivers/net/wireless/rtlwifi/rtl8192c/Makefile | 9 +
drivers/net/wireless/rtlwifi/rtl8192c/dm_common.c | 12 +-
drivers/net/wireless/rtlwifi/rtl8192c/dm_common.h | 204 ++
.../{rtl8192ce/fw.c => rtl8192c/fw_common.c} | 13 +-
.../{rtl8192ce/fw.h => rtl8192c/fw_common.h} | 0
.../rtlwifi/{rtl8192cu/fw.h => rtl8192c/main.c} | 11 +-
drivers/net/wireless/rtlwifi/rtl8192c/phy_common.c | 137 +-
drivers/net/wireless/rtlwifi/rtl8192c/phy_common.h | 246 ++
drivers/net/wireless/rtlwifi/rtl8192ce/Makefile | 1 -
drivers/net/wireless/rtlwifi/rtl8192ce/dm.c | 7 +-
drivers/net/wireless/rtlwifi/rtl8192ce/dm.h | 2 +-
drivers/net/wireless/rtlwifi/rtl8192ce/hw.c | 5 +-
drivers/net/wireless/rtlwifi/rtl8192ce/hw.h | 11 +
drivers/net/wireless/rtlwifi/rtl8192ce/phy.c | 31 +-
drivers/net/wireless/rtlwifi/rtl8192ce/phy.h | 28 +-
drivers/net/wireless/rtlwifi/rtl8192ce/rf.c | 10 +-
drivers/net/wireless/rtlwifi/rtl8192ce/rf.h | 5 +-
drivers/net/wireless/rtlwifi/rtl8192ce/sw.c | 15 +-
drivers/net/wireless/rtlwifi/rtl8192ce/sw.h | 12 +
drivers/net/wireless/rtlwifi/rtl8192ce/trx.c | 13 +-
drivers/net/wireless/rtlwifi/rtl8192cu/Makefile | 1 -
drivers/net/wireless/rtlwifi/rtl8192cu/dm.c | 5 +-
drivers/net/wireless/rtlwifi/rtl8192cu/dm.h | 2 +-
drivers/net/wireless/rtlwifi/rtl8192cu/hw.c | 7 +-
drivers/net/wireless/rtlwifi/rtl8192cu/hw.h | 9 +
drivers/net/wireless/rtlwifi/rtl8192cu/phy.c | 38 +-
drivers/net/wireless/rtlwifi/rtl8192cu/phy.h | 4 +-
drivers/net/wireless/rtlwifi/rtl8192cu/rf.c | 12 +-
drivers/net/wireless/rtlwifi/rtl8192cu/rf.h | 19 +-
drivers/net/wireless/rtlwifi/rtl8192cu/sw.c | 17 +-
drivers/net/wireless/rtlwifi/rtl8192cu/sw.h | 18 +
drivers/net/wireless/rtlwifi/rtl8192cu/trx.c | 7 +-
drivers/net/wireless/rtlwifi/wifi.h | 12 +
drivers/net/wireless/wl1251/main.c | 4 +-
drivers/net/wireless/wl1251/rx.c | 2 +-
drivers/net/wireless/wl12xx/acx.c | 28 +-
drivers/net/wireless/wl12xx/acx.h | 9 +
drivers/net/wireless/wl12xx/init.c | 2 +-
drivers/net/wireless/wl12xx/main.c | 151 +-
drivers/net/wireless/wl12xx/ps.c | 78 +
drivers/net/wireless/wl12xx/ps.h | 2 +
drivers/net/wireless/wl12xx/rx.c | 6 +-
drivers/net/wireless/wl12xx/rx.h | 4 -
drivers/net/wireless/wl12xx/tx.c | 237 ++-
drivers/net/wireless/wl12xx/tx.h | 5 +-
drivers/net/wireless/wl12xx/wl12xx.h | 37 +
drivers/net/wireless/zd1211rw/zd_mac.c | 5 +-
drivers/staging/brcm80211/sys/wl_mac80211.c | 28 +-
drivers/staging/brcm80211/sys/wlc_mac80211.c | 5 +-
drivers/staging/winbond/wbusb.c | 7 +-
include/linux/nl80211.h | 3 +
include/net/cfg80211.h | 5 +-
include/net/mac80211.h | 21 +-
net/bluetooth/Kconfig | 6 +-
net/mac80211/Kconfig | 2 +-
net/mac80211/cfg.c | 68 +-
net/mac80211/driver-ops.h | 35 +-
net/mac80211/driver-trace.h | 33 +
net/mac80211/ht.c | 5 +-
net/mac80211/ibss.c | 7 +-
net/mac80211/ieee80211_i.h | 1 +
net/mac80211/mlme.c | 23 +-
net/mac80211/rx.c | 15 +-
net/mac80211/sta_info.h | 4 +
net/mac80211/status.c | 6 +-
net/mac80211/tx.c | 164 +-
net/wireless/nl80211.c | 56 +-
201 files changed, 34374 insertions(+), 3387 deletions(-)
create mode 100644 drivers/net/wireless/iwlegacy/Kconfig
create mode 100644 drivers/net/wireless/iwlegacy/Makefile
rename drivers/net/wireless/{iwlwifi => iwlegacy}/iwl-3945-debugfs.c (99%)
copy drivers/net/wireless/{iwlwifi => iwlegacy}/iwl-3945-debugfs.h (95%)
rename drivers/net/wireless/{iwlwifi => iwlegacy}/iwl-3945-fh.h (98%)
rename drivers/net/wireless/{iwlwifi => iwlegacy}/iwl-3945-hw.h (96%)
copy drivers/net/wireless/{iwlwifi => iwlegacy}/iwl-3945-led.c (94%)
copy drivers/net/wireless/{iwlwifi => iwlegacy}/iwl-3945-led.h (95%)
rename drivers/net/wireless/{iwlwifi => iwlegacy}/iwl-3945-rs.c (96%)
rename drivers/net/wireless/{iwlwifi => iwlegacy}/iwl-3945.c (92%)
rename drivers/net/wireless/{iwlwifi => iwlegacy}/iwl-3945.h (97%)
create mode 100644 drivers/net/wireless/iwlegacy/iwl-4965-calib.c
copy drivers/net/wireless/{iwlwifi/iwl-legacy.h => iwlegacy/iwl-4965-calib.h} (80%)
create mode 100644 drivers/net/wireless/iwlegacy/iwl-4965-debugfs.c
rename drivers/net/wireless/{iwlwifi/iwl-3945-debugfs.h => iwlegacy/iwl-4965-debugfs.h} (61%)
rename drivers/net/wireless/{iwlwifi/iwl-legacy.h => iwlegacy/iwl-4965-eeprom.c} (53%)
rename drivers/net/wireless/{iwlwifi => iwlegacy}/iwl-4965-hw.h (97%)
copy drivers/net/wireless/{iwlwifi/iwl-3945-led.c => iwlegacy/iwl-4965-led.c} (73%)
rename drivers/net/wireless/{rtlwifi/rtl8192cu/fw.c => iwlegacy/iwl-4965-led.h} (71%)
create mode 100644 drivers/net/wireless/iwlegacy/iwl-4965-lib.c
create mode 100644 drivers/net/wireless/iwlegacy/iwl-4965-rs.c
rename drivers/net/wireless/{iwlwifi/iwl-agn-rx.c => iwlegacy/iwl-4965-rx.c} (60%)
create mode 100644 drivers/net/wireless/iwlegacy/iwl-4965-sta.c
create mode 100644 drivers/net/wireless/iwlegacy/iwl-4965-tx.c
create mode 100644 drivers/net/wireless/iwlegacy/iwl-4965-ucode.c
rename drivers/net/wireless/{iwlwifi => iwlegacy}/iwl-4965.c (71%)
create mode 100644 drivers/net/wireless/iwlegacy/iwl-4965.h
create mode 100644 drivers/net/wireless/iwlegacy/iwl-commands.h
create mode 100644 drivers/net/wireless/iwlegacy/iwl-core.c
create mode 100644 drivers/net/wireless/iwlegacy/iwl-core.h
create mode 100644 drivers/net/wireless/iwlegacy/iwl-csr.h
create mode 100644 drivers/net/wireless/iwlegacy/iwl-debug.h
create mode 100644 drivers/net/wireless/iwlegacy/iwl-debugfs.c
create mode 100644 drivers/net/wireless/iwlegacy/iwl-dev.h
copy drivers/net/wireless/{iwlwifi/iwl-3945-led.h => iwlegacy/iwl-devtrace.c} (59%)
create mode 100644 drivers/net/wireless/iwlegacy/iwl-devtrace.h
create mode 100644 drivers/net/wireless/iwlegacy/iwl-eeprom.c
create mode 100644 drivers/net/wireless/iwlegacy/iwl-eeprom.h
create mode 100644 drivers/net/wireless/iwlegacy/iwl-fh.h
create mode 100644 drivers/net/wireless/iwlegacy/iwl-hcmd.c
create mode 100644 drivers/net/wireless/iwlegacy/iwl-helpers.h
create mode 100644 drivers/net/wireless/iwlegacy/iwl-io.h
create mode 100644 drivers/net/wireless/iwlegacy/iwl-led.c
rename drivers/net/wireless/{iwlwifi/iwl-3945-led.h => iwlegacy/iwl-led.h} (59%)
create mode 100644 drivers/net/wireless/iwlegacy/iwl-legacy-rs.h
create mode 100644 drivers/net/wireless/iwlegacy/iwl-power.c
rename drivers/net/wireless/{iwlwifi/iwl-3945-led.c => iwlegacy/iwl-power.h} (56%)
create mode 100644 drivers/net/wireless/iwlegacy/iwl-prph.h
create mode 100644 drivers/net/wireless/iwlegacy/iwl-rx.c
create mode 100644 drivers/net/wireless/iwlegacy/iwl-scan.c
create mode 100644 drivers/net/wireless/iwlegacy/iwl-spectrum.h
create mode 100644 drivers/net/wireless/iwlegacy/iwl-sta.c
create mode 100644 drivers/net/wireless/iwlegacy/iwl-sta.h
create mode 100644 drivers/net/wireless/iwlegacy/iwl-tx.c
rename drivers/net/wireless/{iwlwifi => iwlegacy}/iwl3945-base.c (90%)
create mode 100644 drivers/net/wireless/iwlegacy/iwl4965-base.c
delete mode 100644 drivers/net/wireless/iwlwifi/iwl-legacy.c
create mode 100644 drivers/net/wireless/rtlwifi/rtl8192c/Makefile
create mode 100644 drivers/net/wireless/rtlwifi/rtl8192c/dm_common.h
rename drivers/net/wireless/rtlwifi/{rtl8192ce/fw.c => rtl8192c/fw_common.c} (98%)
rename drivers/net/wireless/rtlwifi/{rtl8192ce/fw.h => rtl8192c/fw_common.h} (100%)
rename drivers/net/wireless/rtlwifi/{rtl8192cu/fw.h => rtl8192c/main.c} (75%)
create mode 100644 drivers/net/wireless/rtlwifi/rtl8192c/phy_common.h
Omnibus patch available here:
http://www.kernel.org/pub/linux/kernel/people/linville/wireless-next-2.6-2011-03-04.patch.bz2
--
John W. Linville Someday the world will need a hero, and you
linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org might be all we have. Be ready.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* [RFC PATCH v2 10/12] netdev: mdio-octeon.c: Convert to use device tree.
From: David Daney @ 2011-03-04 19:42 UTC (permalink / raw)
To: linux-mips-6z/3iImG2C8G8FEW9MqTrA, ralf-6z/3iImG2C8G8FEW9MqTrA,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
grant.likely-s3s/WqlpOiPyB63q8FvJNQ,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
Cc: netdev-u79uwXL29TY76Z2rM5mHXA, David Daney, David S. Miller
In-Reply-To: <1299267744-17278-1-git-send-email-ddaney-M3mlKVOIwJVv6pq1l3V1OdBPR1lH4CV8@public.gmane.org>
Get the MDIO bus controller addresses from the device tree.
Signed-off-by: David Daney <ddaney-M3mlKVOIwJVv6pq1l3V1OdBPR1lH4CV8@public.gmane.org>
Cc: "David S. Miller" <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
Cc: netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
---
arch/mips/cavium-octeon/octeon-platform.c | 30 ---------
drivers/net/phy/mdio-octeon.c | 92 +++++++++++++++++++---------
2 files changed, 62 insertions(+), 60 deletions(-)
diff --git a/arch/mips/cavium-octeon/octeon-platform.c b/arch/mips/cavium-octeon/octeon-platform.c
index 0533351..ce471bd 100644
--- a/arch/mips/cavium-octeon/octeon-platform.c
+++ b/arch/mips/cavium-octeon/octeon-platform.c
@@ -168,36 +168,6 @@ out:
}
device_initcall(octeon_rng_device_init);
-/* Octeon SMI/MDIO interface. */
-static int __init octeon_mdiobus_device_init(void)
-{
- struct platform_device *pd;
- int ret = 0;
-
- if (octeon_is_simulation())
- return 0; /* No mdio in the simulator. */
-
- /* The bus number is the platform_device id. */
- pd = platform_device_alloc("mdio-octeon", 0);
- if (!pd) {
- ret = -ENOMEM;
- goto out;
- }
-
- ret = platform_device_add(pd);
- if (ret)
- goto fail;
-
- return ret;
-fail:
- platform_device_put(pd);
-
-out:
- return ret;
-
-}
-device_initcall(octeon_mdiobus_device_init);
-
/* Octeon mgmt port Ethernet interface. */
static int __init octeon_mgmt_device_init(void)
{
diff --git a/drivers/net/phy/mdio-octeon.c b/drivers/net/phy/mdio-octeon.c
index bd12ba9..dd33023 100644
--- a/drivers/net/phy/mdio-octeon.c
+++ b/drivers/net/phy/mdio-octeon.c
@@ -3,13 +3,15 @@
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*
- * Copyright (C) 2009 Cavium Networks
+ * Copyright (C) 2009, 2010, 2011 Cavium Networks
*/
-#include <linux/gfp.h>
-#include <linux/init.h>
-#include <linux/module.h>
#include <linux/platform_device.h>
+#include <linux/of_mdio.h>
+#include <linux/delay.h>
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/gfp.h>
#include <linux/phy.h>
#include <asm/octeon/octeon.h>
@@ -18,9 +20,17 @@
#define DRV_VERSION "1.0"
#define DRV_DESCRIPTION "Cavium Networks Octeon SMI/MDIO driver"
+#define SMI_CMD 0x0
+#define SMI_WR_DAT 0x8
+#define SMI_RD_DAT 0x10
+#define SMI_CLK 0x18
+#define SMI_EN 0x20
+
struct octeon_mdiobus {
struct mii_bus *mii_bus;
- int unit;
+ u64 register_base;
+ resource_size_t mdio_phys;
+ resource_size_t regsize;
int phy_irq[PHY_MAX_ADDR];
};
@@ -35,15 +45,15 @@ static int octeon_mdiobus_read(struct mii_bus *bus, int phy_id, int regnum)
smi_cmd.s.phy_op = 1; /* MDIO_CLAUSE_22_READ */
smi_cmd.s.phy_adr = phy_id;
smi_cmd.s.reg_adr = regnum;
- cvmx_write_csr(CVMX_SMIX_CMD(p->unit), smi_cmd.u64);
+ cvmx_write_csr(p->register_base + SMI_CMD, smi_cmd.u64);
do {
/*
* Wait 1000 clocks so we don't saturate the RSL bus
* doing reads.
*/
- cvmx_wait(1000);
- smi_rd.u64 = cvmx_read_csr(CVMX_SMIX_RD_DAT(p->unit));
+ __delay(1000);
+ smi_rd.u64 = cvmx_read_csr(p->register_base + SMI_RD_DAT);
} while (smi_rd.s.pending && --timeout);
if (smi_rd.s.val)
@@ -62,21 +72,21 @@ static int octeon_mdiobus_write(struct mii_bus *bus, int phy_id,
smi_wr.u64 = 0;
smi_wr.s.dat = val;
- cvmx_write_csr(CVMX_SMIX_WR_DAT(p->unit), smi_wr.u64);
+ cvmx_write_csr(p->register_base + SMI_WR_DAT, smi_wr.u64);
smi_cmd.u64 = 0;
smi_cmd.s.phy_op = 0; /* MDIO_CLAUSE_22_WRITE */
smi_cmd.s.phy_adr = phy_id;
smi_cmd.s.reg_adr = regnum;
- cvmx_write_csr(CVMX_SMIX_CMD(p->unit), smi_cmd.u64);
+ cvmx_write_csr(p->register_base + SMI_CMD, smi_cmd.u64);
do {
/*
* Wait 1000 clocks so we don't saturate the RSL bus
* doing reads.
*/
- cvmx_wait(1000);
- smi_wr.u64 = cvmx_read_csr(CVMX_SMIX_WR_DAT(p->unit));
+ __delay(1000);
+ smi_wr.u64 = cvmx_read_csr(p->register_base + SMI_WR_DAT);
} while (smi_wr.s.pending && --timeout);
if (timeout <= 0)
@@ -88,8 +98,8 @@ static int octeon_mdiobus_write(struct mii_bus *bus, int phy_id,
static int __devinit octeon_mdiobus_probe(struct platform_device *pdev)
{
struct octeon_mdiobus *bus;
+ struct resource *res_mem;
union cvmx_smix_en smi_en;
- int i;
int err = -ENOENT;
bus = devm_kzalloc(&pdev->dev, sizeof(*bus), GFP_KERNEL);
@@ -97,28 +107,36 @@ static int __devinit octeon_mdiobus_probe(struct platform_device *pdev)
return -ENOMEM;
/* The platform_device id is our unit number. */
- bus->unit = pdev->id;
+ res_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+
+ if (res_mem == NULL) {
+ dev_err(&pdev->dev, "found no memory resource\n");
+ err = -ENXIO;
+ goto fail_region;
+ }
+ bus->mdio_phys = res_mem->start;
+ bus->regsize = resource_size(res_mem);
+ if (!devm_request_mem_region(&pdev->dev, bus->mdio_phys, bus->regsize,
+ res_mem->name)) {
+ dev_err(&pdev->dev, "request_mem_region failed\n");
+ goto fail_region;
+ }
+ bus->register_base = (u64)ioremap(bus->mdio_phys, bus->regsize);
bus->mii_bus = mdiobus_alloc();
if (!bus->mii_bus)
- goto err;
+ goto fail_mdio_alloc;
smi_en.u64 = 0;
smi_en.s.en = 1;
- cvmx_write_csr(CVMX_SMIX_EN(bus->unit), smi_en.u64);
+ cvmx_write_csr(bus->register_base + SMI_EN, smi_en.u64);
- /*
- * Standard Octeon evaluation boards don't support phy
- * interrupts, we need to poll.
- */
- for (i = 0; i < PHY_MAX_ADDR; i++)
- bus->phy_irq[i] = PHY_POLL;
bus->mii_bus->priv = bus;
bus->mii_bus->irq = bus->phy_irq;
bus->mii_bus->name = "mdio-octeon";
- snprintf(bus->mii_bus->id, MII_BUS_ID_SIZE, "%x", bus->unit);
+ snprintf(bus->mii_bus->id, MII_BUS_ID_SIZE, "%llx", bus->register_base);
bus->mii_bus->parent = &pdev->dev;
bus->mii_bus->read = octeon_mdiobus_read;
@@ -126,20 +144,23 @@ static int __devinit octeon_mdiobus_probe(struct platform_device *pdev)
dev_set_drvdata(&pdev->dev, bus);
- err = mdiobus_register(bus->mii_bus);
+ err = of_mdiobus_register(bus->mii_bus, pdev->dev.of_node);
if (err)
- goto err_register;
+ goto fail_register;
dev_info(&pdev->dev, "Version " DRV_VERSION "\n");
return 0;
-err_register:
+fail_register:
mdiobus_free(bus->mii_bus);
-err:
- devm_kfree(&pdev->dev, bus);
+fail_mdio_alloc:
+ devm_release_mem_region(&pdev->dev, bus->mdio_phys, bus->regsize);
+
+fail_region:
smi_en.u64 = 0;
- cvmx_write_csr(CVMX_SMIX_EN(bus->unit), smi_en.u64);
+ cvmx_write_csr(bus->register_base + SMI_EN, smi_en.u64);
+ devm_kfree(&pdev->dev, bus);
return err;
}
@@ -152,15 +173,26 @@ static int __devexit octeon_mdiobus_remove(struct platform_device *pdev)
mdiobus_unregister(bus->mii_bus);
mdiobus_free(bus->mii_bus);
+ devm_release_mem_region(&pdev->dev, bus->mdio_phys, bus->regsize);
smi_en.u64 = 0;
- cvmx_write_csr(CVMX_SMIX_EN(bus->unit), smi_en.u64);
+ cvmx_write_csr(bus->register_base + SMI_EN, smi_en.u64);
+ devm_kfree(&pdev->dev, bus);
return 0;
}
+static struct of_device_id octeon_mdiobus_match[] = {
+ {
+ .compatible = "cavium,octeon-3860-mdio",
+ },
+ {},
+};
+MODULE_DEVICE_TABLE(of, octeon_mdiobus_match);
+
static struct platform_driver octeon_mdiobus_driver = {
.driver = {
.name = "mdio-octeon",
.owner = THIS_MODULE,
+ .of_match_table = octeon_mdiobus_match,
},
.probe = octeon_mdiobus_probe,
.remove = __devexit_p(octeon_mdiobus_remove),
--
1.7.2.3
^ permalink raw reply related
* [RFC PATCH v2 11/12] netdev: octeon_mgmt: Convert to use device tree.
From: David Daney @ 2011-03-04 19:42 UTC (permalink / raw)
To: linux-mips-6z/3iImG2C8G8FEW9MqTrA, ralf-6z/3iImG2C8G8FEW9MqTrA,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
grant.likely-s3s/WqlpOiPyB63q8FvJNQ,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
Cc: netdev-u79uwXL29TY76Z2rM5mHXA, David Daney, David S. Miller
In-Reply-To: <1299267744-17278-1-git-send-email-ddaney-M3mlKVOIwJVv6pq1l3V1OdBPR1lH4CV8@public.gmane.org>
The device tree will supply the register bank base addresses, make
register addressing relative to those. PHY connection is now
described by the device tree.
Signed-off-by: David Daney <ddaney-M3mlKVOIwJVv6pq1l3V1OdBPR1lH4CV8@public.gmane.org>
Cc: "David S. Miller" <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
Cc: netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
---
arch/mips/cavium-octeon/octeon-platform.c | 62 ------
drivers/net/octeon/octeon_mgmt.c | 321 +++++++++++++++++++----------
2 files changed, 217 insertions(+), 166 deletions(-)
diff --git a/arch/mips/cavium-octeon/octeon-platform.c b/arch/mips/cavium-octeon/octeon-platform.c
index ce471bd..104713c 100644
--- a/arch/mips/cavium-octeon/octeon-platform.c
+++ b/arch/mips/cavium-octeon/octeon-platform.c
@@ -168,68 +168,6 @@ out:
}
device_initcall(octeon_rng_device_init);
-/* Octeon mgmt port Ethernet interface. */
-static int __init octeon_mgmt_device_init(void)
-{
- struct platform_device *pd;
- int ret = 0;
- int port, num_ports;
-
- struct resource mgmt_port_resource = {
- .flags = IORESOURCE_IRQ,
- .start = -1,
- .end = -1
- };
-
- if (!OCTEON_IS_MODEL(OCTEON_CN56XX) && !OCTEON_IS_MODEL(OCTEON_CN52XX))
- return 0;
-
- if (OCTEON_IS_MODEL(OCTEON_CN56XX))
- num_ports = 1;
- else
- num_ports = 2;
-
- for (port = 0; port < num_ports; port++) {
- pd = platform_device_alloc("octeon_mgmt", port);
- if (!pd) {
- ret = -ENOMEM;
- goto out;
- }
- /* No DMA restrictions */
- pd->dev.coherent_dma_mask = DMA_BIT_MASK(64);
- pd->dev.dma_mask = &pd->dev.coherent_dma_mask;
-
- switch (port) {
- case 0:
- mgmt_port_resource.start = OCTEON_IRQ_MII0;
- break;
- case 1:
- mgmt_port_resource.start = OCTEON_IRQ_MII1;
- break;
- default:
- BUG();
- }
- mgmt_port_resource.end = mgmt_port_resource.start;
-
- ret = platform_device_add_resources(pd, &mgmt_port_resource, 1);
-
- if (ret)
- goto fail;
-
- ret = platform_device_add(pd);
- if (ret)
- goto fail;
- }
- return ret;
-fail:
- platform_device_put(pd);
-
-out:
- return ret;
-
-}
-device_initcall(octeon_mgmt_device_init);
-
#ifdef CONFIG_USB
static int __init octeon_ehci_device_init(void)
diff --git a/drivers/net/octeon/octeon_mgmt.c b/drivers/net/octeon/octeon_mgmt.c
index b264f0f..17be326 100644
--- a/drivers/net/octeon/octeon_mgmt.c
+++ b/drivers/net/octeon/octeon_mgmt.c
@@ -6,16 +6,18 @@
* Copyright (C) 2009 Cavium Networks
*/
-#include <linux/capability.h>
-#include <linux/dma-mapping.h>
-#include <linux/init.h>
#include <linux/platform_device.h>
-#include <linux/netdevice.h>
+#include <linux/dma-mapping.h>
#include <linux/etherdevice.h>
+#include <linux/capability.h>
+#include <linux/netdevice.h>
+#include <linux/spinlock.h>
#include <linux/if_vlan.h>
+#include <linux/of_mdio.h>
+#include <linux/of_net.h>
+#include <linux/init.h>
#include <linux/slab.h>
#include <linux/phy.h>
-#include <linux/spinlock.h>
#include <asm/octeon/octeon.h>
#include <asm/octeon/cvmx-mixx-defs.h>
@@ -55,8 +57,56 @@ union mgmt_port_ring_entry {
} s;
};
+#define MIX_ORING1 0x0
+#define MIX_ORING2 0x8
+#define MIX_IRING1 0x10
+#define MIX_IRING2 0x18
+#define MIX_CTL 0x20
+#define MIX_IRHWM 0x28
+#define MIX_IRCNT 0x30
+#define MIX_ORHWM 0x38
+#define MIX_ORCNT 0x40
+#define MIX_ISR 0x48
+#define MIX_INTENA 0x50
+#define MIX_REMCNT 0x58
+#define MIX_BIST 0x78
+
+#define AGL_GMX_PRT_CFG 0x10
+#define AGL_GMX_RX_FRM_CTL 0x18
+#define AGL_GMX_RX_FRM_MAX 0x30
+#define AGL_GMX_RX_JABBER 0x38
+#define AGL_GMX_RX_STATS_CTL 0x50
+
+#define AGL_GMX_RX_STATS_PKTS_DRP 0xb0
+#define AGL_GMX_RX_STATS_OCTS_DRP 0xb8
+#define AGL_GMX_RX_STATS_PKTS_BAD 0xc0
+
+#define AGL_GMX_RX_ADR_CTL 0x100
+#define AGL_GMX_RX_ADR_CAM_EN 0x108
+#define AGL_GMX_RX_ADR_CAM0 0x180
+#define AGL_GMX_RX_ADR_CAM1 0x188
+#define AGL_GMX_RX_ADR_CAM2 0x190
+#define AGL_GMX_RX_ADR_CAM3 0x198
+#define AGL_GMX_RX_ADR_CAM4 0x1a0
+#define AGL_GMX_RX_ADR_CAM5 0x1a8
+
+#define AGL_GMX_TX_STATS_CTL 0x268
+#define AGL_GMX_TX_CTL 0x270
+#define AGL_GMX_TX_STAT0 0x280
+#define AGL_GMX_TX_STAT1 0x288
+#define AGL_GMX_TX_STAT2 0x290
+#define AGL_GMX_TX_STAT3 0x298
+#define AGL_GMX_TX_STAT4 0x2a0
+#define AGL_GMX_TX_STAT5 0x2a8
+#define AGL_GMX_TX_STAT6 0x2b0
+#define AGL_GMX_TX_STAT7 0x2b8
+#define AGL_GMX_TX_STAT8 0x2c0
+#define AGL_GMX_TX_STAT9 0x2c8
+
struct octeon_mgmt {
struct net_device *netdev;
+ u64 mix;
+ u64 agl;
int port;
int irq;
u64 *tx_ring;
@@ -82,31 +132,34 @@ struct octeon_mgmt {
struct napi_struct napi;
struct tasklet_struct tx_clean_tasklet;
struct phy_device *phydev;
+ struct device_node *phy_np;
+ resource_size_t mix_phys;
+ resource_size_t mix_size;
+ resource_size_t agl_phys;
+ resource_size_t agl_size;
};
static void octeon_mgmt_set_rx_irq(struct octeon_mgmt *p, int enable)
{
- int port = p->port;
union cvmx_mixx_intena mix_intena;
unsigned long flags;
spin_lock_irqsave(&p->lock, flags);
- mix_intena.u64 = cvmx_read_csr(CVMX_MIXX_INTENA(port));
+ mix_intena.u64 = cvmx_read_csr(p->mix + MIX_INTENA);
mix_intena.s.ithena = enable ? 1 : 0;
- cvmx_write_csr(CVMX_MIXX_INTENA(port), mix_intena.u64);
+ cvmx_write_csr(p->mix + MIX_INTENA, mix_intena.u64);
spin_unlock_irqrestore(&p->lock, flags);
}
static void octeon_mgmt_set_tx_irq(struct octeon_mgmt *p, int enable)
{
- int port = p->port;
union cvmx_mixx_intena mix_intena;
unsigned long flags;
spin_lock_irqsave(&p->lock, flags);
- mix_intena.u64 = cvmx_read_csr(CVMX_MIXX_INTENA(port));
+ mix_intena.u64 = cvmx_read_csr(p->mix + MIX_INTENA);
mix_intena.s.othena = enable ? 1 : 0;
- cvmx_write_csr(CVMX_MIXX_INTENA(port), mix_intena.u64);
+ cvmx_write_csr(p->mix + MIX_INTENA, mix_intena.u64);
spin_unlock_irqrestore(&p->lock, flags);
}
@@ -143,7 +196,6 @@ static unsigned int ring_size_to_bytes(unsigned int ring_size)
static void octeon_mgmt_rx_fill_ring(struct net_device *netdev)
{
struct octeon_mgmt *p = netdev_priv(netdev);
- int port = p->port;
while (p->rx_current_fill < ring_max_fill(OCTEON_MGMT_RX_RING_SIZE)) {
unsigned int size;
@@ -174,24 +226,23 @@ static void octeon_mgmt_rx_fill_ring(struct net_device *netdev)
(p->rx_next_fill + 1) % OCTEON_MGMT_RX_RING_SIZE;
p->rx_current_fill++;
/* Ring the bell. */
- cvmx_write_csr(CVMX_MIXX_IRING2(port), 1);
+ cvmx_write_csr(p->mix + MIX_IRING2, 1);
}
}
static void octeon_mgmt_clean_tx_buffers(struct octeon_mgmt *p)
{
- int port = p->port;
union cvmx_mixx_orcnt mix_orcnt;
union mgmt_port_ring_entry re;
struct sk_buff *skb;
int cleaned = 0;
unsigned long flags;
- mix_orcnt.u64 = cvmx_read_csr(CVMX_MIXX_ORCNT(port));
+ mix_orcnt.u64 = cvmx_read_csr(p->mix + MIX_ORCNT);
while (mix_orcnt.s.orcnt) {
spin_lock_irqsave(&p->tx_list.lock, flags);
- mix_orcnt.u64 = cvmx_read_csr(CVMX_MIXX_ORCNT(port));
+ mix_orcnt.u64 = cvmx_read_csr(p->mix + MIX_ORCNT);
if (mix_orcnt.s.orcnt == 0) {
spin_unlock_irqrestore(&p->tx_list.lock, flags);
@@ -211,7 +262,7 @@ static void octeon_mgmt_clean_tx_buffers(struct octeon_mgmt *p)
mix_orcnt.s.orcnt = 1;
/* Acknowledge to hardware that we have the buffer. */
- cvmx_write_csr(CVMX_MIXX_ORCNT(port), mix_orcnt.u64);
+ cvmx_write_csr(p->mix + MIX_ORCNT, mix_orcnt.u64);
p->tx_current_fill--;
spin_unlock_irqrestore(&p->tx_list.lock, flags);
@@ -221,7 +272,7 @@ static void octeon_mgmt_clean_tx_buffers(struct octeon_mgmt *p)
dev_kfree_skb_any(skb);
cleaned++;
- mix_orcnt.u64 = cvmx_read_csr(CVMX_MIXX_ORCNT(port));
+ mix_orcnt.u64 = cvmx_read_csr(p->mix + MIX_ORCNT);
}
if (cleaned && netif_queue_stopped(p->netdev))
@@ -238,13 +289,12 @@ static void octeon_mgmt_clean_tx_tasklet(unsigned long arg)
static void octeon_mgmt_update_rx_stats(struct net_device *netdev)
{
struct octeon_mgmt *p = netdev_priv(netdev);
- int port = p->port;
unsigned long flags;
u64 drop, bad;
/* These reads also clear the count registers. */
- drop = cvmx_read_csr(CVMX_AGL_GMX_RXX_STATS_PKTS_DRP(port));
- bad = cvmx_read_csr(CVMX_AGL_GMX_RXX_STATS_PKTS_BAD(port));
+ drop = cvmx_read_csr(p->agl + AGL_GMX_RX_STATS_PKTS_DRP);
+ bad = cvmx_read_csr(p->agl + AGL_GMX_RX_STATS_PKTS_BAD);
if (drop || bad) {
/* Do an atomic update. */
@@ -258,15 +308,14 @@ static void octeon_mgmt_update_rx_stats(struct net_device *netdev)
static void octeon_mgmt_update_tx_stats(struct net_device *netdev)
{
struct octeon_mgmt *p = netdev_priv(netdev);
- int port = p->port;
unsigned long flags;
union cvmx_agl_gmx_txx_stat0 s0;
union cvmx_agl_gmx_txx_stat1 s1;
/* These reads also clear the count registers. */
- s0.u64 = cvmx_read_csr(CVMX_AGL_GMX_TXX_STAT0(port));
- s1.u64 = cvmx_read_csr(CVMX_AGL_GMX_TXX_STAT1(port));
+ s0.u64 = cvmx_read_csr(p->agl + AGL_GMX_TX_STAT0);
+ s1.u64 = cvmx_read_csr(p->agl + AGL_GMX_TX_STAT1);
if (s0.s.xsdef || s0.s.xscol || s1.s.scol || s1.s.mcol) {
/* Do an atomic update. */
@@ -305,7 +354,6 @@ static u64 octeon_mgmt_dequeue_rx_buffer(struct octeon_mgmt *p,
static int octeon_mgmt_receive_one(struct octeon_mgmt *p)
{
- int port = p->port;
struct net_device *netdev = p->netdev;
union cvmx_mixx_ircnt mix_ircnt;
union mgmt_port_ring_entry re;
@@ -378,18 +426,17 @@ done:
/* Tell the hardware we processed a packet. */
mix_ircnt.u64 = 0;
mix_ircnt.s.ircnt = 1;
- cvmx_write_csr(CVMX_MIXX_IRCNT(port), mix_ircnt.u64);
+ cvmx_write_csr(p->mix + MIX_IRCNT, mix_ircnt.u64);
return rc;
}
static int octeon_mgmt_receive_packets(struct octeon_mgmt *p, int budget)
{
- int port = p->port;
unsigned int work_done = 0;
union cvmx_mixx_ircnt mix_ircnt;
int rc;
- mix_ircnt.u64 = cvmx_read_csr(CVMX_MIXX_IRCNT(port));
+ mix_ircnt.u64 = cvmx_read_csr(p->mix + MIX_IRCNT);
while (work_done < budget && mix_ircnt.s.ircnt) {
rc = octeon_mgmt_receive_one(p);
@@ -397,7 +444,7 @@ static int octeon_mgmt_receive_packets(struct octeon_mgmt *p, int budget)
work_done++;
/* Check for more packets. */
- mix_ircnt.u64 = cvmx_read_csr(CVMX_MIXX_IRCNT(port));
+ mix_ircnt.u64 = cvmx_read_csr(p->mix + MIX_IRCNT);
}
octeon_mgmt_rx_fill_ring(p->netdev);
@@ -431,16 +478,16 @@ static void octeon_mgmt_reset_hw(struct octeon_mgmt *p)
union cvmx_agl_gmx_bist agl_gmx_bist;
mix_ctl.u64 = 0;
- cvmx_write_csr(CVMX_MIXX_CTL(p->port), mix_ctl.u64);
+ cvmx_write_csr(p->mix + MIX_CTL, mix_ctl.u64);
do {
- mix_ctl.u64 = cvmx_read_csr(CVMX_MIXX_CTL(p->port));
+ mix_ctl.u64 = cvmx_read_csr(p->mix + MIX_CTL);
} while (mix_ctl.s.busy);
mix_ctl.s.reset = 1;
- cvmx_write_csr(CVMX_MIXX_CTL(p->port), mix_ctl.u64);
- cvmx_read_csr(CVMX_MIXX_CTL(p->port));
+ cvmx_write_csr(p->mix + MIX_CTL, mix_ctl.u64);
+ cvmx_read_csr(p->mix + MIX_CTL);
cvmx_wait(64);
- mix_bist.u64 = cvmx_read_csr(CVMX_MIXX_BIST(p->port));
+ mix_bist.u64 = cvmx_read_csr(p->mix + MIX_BIST);
if (mix_bist.u64)
dev_warn(p->dev, "MIX failed BIST (0x%016llx)\n",
(unsigned long long)mix_bist.u64);
@@ -471,7 +518,6 @@ static void octeon_mgmt_cam_state_add(struct octeon_mgmt_cam_state *cs,
static void octeon_mgmt_set_rx_filtering(struct net_device *netdev)
{
struct octeon_mgmt *p = netdev_priv(netdev);
- int port = p->port;
union cvmx_agl_gmx_rxx_adr_ctl adr_ctl;
union cvmx_agl_gmx_prtx_cfg agl_gmx_prtx;
unsigned long flags;
@@ -517,29 +563,29 @@ static void octeon_mgmt_set_rx_filtering(struct net_device *netdev)
spin_lock_irqsave(&p->lock, flags);
/* Disable packet I/O. */
- agl_gmx_prtx.u64 = cvmx_read_csr(CVMX_AGL_GMX_PRTX_CFG(port));
+ agl_gmx_prtx.u64 = cvmx_read_csr(p->agl + AGL_GMX_PRT_CFG);
prev_packet_enable = agl_gmx_prtx.s.en;
agl_gmx_prtx.s.en = 0;
- cvmx_write_csr(CVMX_AGL_GMX_PRTX_CFG(port), agl_gmx_prtx.u64);
+ cvmx_write_csr(p->agl + AGL_GMX_PRT_CFG, agl_gmx_prtx.u64);
adr_ctl.u64 = 0;
adr_ctl.s.cam_mode = cam_mode;
adr_ctl.s.mcst = multicast_mode;
adr_ctl.s.bcst = 1; /* Allow broadcast */
- cvmx_write_csr(CVMX_AGL_GMX_RXX_ADR_CTL(port), adr_ctl.u64);
+ cvmx_write_csr(p->agl + AGL_GMX_RX_ADR_CTL, adr_ctl.u64);
- cvmx_write_csr(CVMX_AGL_GMX_RXX_ADR_CAM0(port), cam_state.cam[0]);
- cvmx_write_csr(CVMX_AGL_GMX_RXX_ADR_CAM1(port), cam_state.cam[1]);
- cvmx_write_csr(CVMX_AGL_GMX_RXX_ADR_CAM2(port), cam_state.cam[2]);
- cvmx_write_csr(CVMX_AGL_GMX_RXX_ADR_CAM3(port), cam_state.cam[3]);
- cvmx_write_csr(CVMX_AGL_GMX_RXX_ADR_CAM4(port), cam_state.cam[4]);
- cvmx_write_csr(CVMX_AGL_GMX_RXX_ADR_CAM5(port), cam_state.cam[5]);
- cvmx_write_csr(CVMX_AGL_GMX_RXX_ADR_CAM_EN(port), cam_state.cam_mask);
+ cvmx_write_csr(p->agl + AGL_GMX_RX_ADR_CAM0, cam_state.cam[0]);
+ cvmx_write_csr(p->agl + AGL_GMX_RX_ADR_CAM1, cam_state.cam[1]);
+ cvmx_write_csr(p->agl + AGL_GMX_RX_ADR_CAM2, cam_state.cam[2]);
+ cvmx_write_csr(p->agl + AGL_GMX_RX_ADR_CAM3, cam_state.cam[3]);
+ cvmx_write_csr(p->agl + AGL_GMX_RX_ADR_CAM4, cam_state.cam[4]);
+ cvmx_write_csr(p->agl + AGL_GMX_RX_ADR_CAM5, cam_state.cam[5]);
+ cvmx_write_csr(p->agl + AGL_GMX_RX_ADR_CAM_EN, cam_state.cam_mask);
/* Restore packet I/O. */
agl_gmx_prtx.s.en = prev_packet_enable;
- cvmx_write_csr(CVMX_AGL_GMX_PRTX_CFG(port), agl_gmx_prtx.u64);
+ cvmx_write_csr(p->agl + AGL_GMX_PRT_CFG, agl_gmx_prtx.u64);
spin_unlock_irqrestore(&p->lock, flags);
}
@@ -561,7 +607,6 @@ static int octeon_mgmt_set_mac_address(struct net_device *netdev, void *addr)
static int octeon_mgmt_change_mtu(struct net_device *netdev, int new_mtu)
{
struct octeon_mgmt *p = netdev_priv(netdev);
- int port = p->port;
int size_without_fcs = new_mtu + OCTEON_MGMT_RX_HEADROOM;
/*
@@ -577,8 +622,8 @@ static int octeon_mgmt_change_mtu(struct net_device *netdev, int new_mtu)
netdev->mtu = new_mtu;
- cvmx_write_csr(CVMX_AGL_GMX_RXX_FRM_MAX(port), size_without_fcs);
- cvmx_write_csr(CVMX_AGL_GMX_RXX_JABBER(port),
+ cvmx_write_csr(p->agl + AGL_GMX_RX_FRM_MAX, size_without_fcs);
+ cvmx_write_csr(p->agl + AGL_GMX_RX_JABBER,
(size_without_fcs + 7) & 0xfff8);
return 0;
@@ -588,14 +633,13 @@ static irqreturn_t octeon_mgmt_interrupt(int cpl, void *dev_id)
{
struct net_device *netdev = dev_id;
struct octeon_mgmt *p = netdev_priv(netdev);
- int port = p->port;
union cvmx_mixx_isr mixx_isr;
- mixx_isr.u64 = cvmx_read_csr(CVMX_MIXX_ISR(port));
+ mixx_isr.u64 = cvmx_read_csr(p->mix + MIX_ISR);
/* Clear any pending interrupts */
- cvmx_write_csr(CVMX_MIXX_ISR(port), mixx_isr.u64);
- cvmx_read_csr(CVMX_MIXX_ISR(port));
+ cvmx_write_csr(p->mix + MIX_ISR, mixx_isr.u64);
+ cvmx_read_csr(p->mix + MIX_ISR);
if (mixx_isr.s.irthresh) {
octeon_mgmt_disable_rx_irq(p);
@@ -626,7 +670,6 @@ static int octeon_mgmt_ioctl(struct net_device *netdev,
static void octeon_mgmt_adjust_link(struct net_device *netdev)
{
struct octeon_mgmt *p = netdev_priv(netdev);
- int port = p->port;
union cvmx_agl_gmx_prtx_cfg prtx_cfg;
unsigned long flags;
int link_changed = 0;
@@ -637,11 +680,9 @@ static void octeon_mgmt_adjust_link(struct net_device *netdev)
link_changed = 1;
if (p->last_duplex != p->phydev->duplex) {
p->last_duplex = p->phydev->duplex;
- prtx_cfg.u64 =
- cvmx_read_csr(CVMX_AGL_GMX_PRTX_CFG(port));
+ prtx_cfg.u64 = cvmx_read_csr(p->agl + AGL_GMX_PRT_CFG);
prtx_cfg.s.duplex = p->phydev->duplex;
- cvmx_write_csr(CVMX_AGL_GMX_PRTX_CFG(port),
- prtx_cfg.u64);
+ cvmx_write_csr(p->agl + AGL_GMX_PRT_CFG, prtx_cfg.u64);
}
} else {
if (p->last_link)
@@ -667,18 +708,16 @@ static void octeon_mgmt_adjust_link(struct net_device *netdev)
static int octeon_mgmt_init_phy(struct net_device *netdev)
{
struct octeon_mgmt *p = netdev_priv(netdev);
- char phy_id[20];
- if (octeon_is_simulation()) {
+ if (octeon_is_simulation() || p->phy_np == NULL) {
/* No PHYs in the simulator. */
netif_carrier_on(netdev);
return 0;
}
- snprintf(phy_id, sizeof(phy_id), PHY_ID_FMT, "0", p->port);
-
- p->phydev = phy_connect(netdev, phy_id, octeon_mgmt_adjust_link, 0,
- PHY_INTERFACE_MODE_MII);
+ p->phydev = of_phy_connect(netdev, p->phy_np,
+ octeon_mgmt_adjust_link, 0,
+ PHY_INTERFACE_MODE_MII);
if (IS_ERR(p->phydev)) {
p->phydev = NULL;
@@ -734,14 +773,14 @@ static int octeon_mgmt_open(struct net_device *netdev)
octeon_mgmt_reset_hw(p);
- mix_ctl.u64 = cvmx_read_csr(CVMX_MIXX_CTL(port));
+ mix_ctl.u64 = cvmx_read_csr(p->mix + MIX_CTL);
/* Bring it out of reset if needed. */
if (mix_ctl.s.reset) {
mix_ctl.s.reset = 0;
- cvmx_write_csr(CVMX_MIXX_CTL(port), mix_ctl.u64);
+ cvmx_write_csr(p->mix + MIX_CTL, mix_ctl.u64);
do {
- mix_ctl.u64 = cvmx_read_csr(CVMX_MIXX_CTL(port));
+ mix_ctl.u64 = cvmx_read_csr(p->mix + MIX_CTL);
} while (mix_ctl.s.reset);
}
@@ -752,17 +791,17 @@ static int octeon_mgmt_open(struct net_device *netdev)
oring1.u64 = 0;
oring1.s.obase = p->tx_ring_handle >> 3;
oring1.s.osize = OCTEON_MGMT_TX_RING_SIZE;
- cvmx_write_csr(CVMX_MIXX_ORING1(port), oring1.u64);
+ cvmx_write_csr(p->mix + MIX_ORING1, oring1.u64);
iring1.u64 = 0;
iring1.s.ibase = p->rx_ring_handle >> 3;
iring1.s.isize = OCTEON_MGMT_RX_RING_SIZE;
- cvmx_write_csr(CVMX_MIXX_IRING1(port), iring1.u64);
+ cvmx_write_csr(p->mix + MIX_IRING1, iring1.u64);
/* Disable packet I/O. */
- prtx_cfg.u64 = cvmx_read_csr(CVMX_AGL_GMX_PRTX_CFG(port));
+ prtx_cfg.u64 = cvmx_read_csr(p->agl + AGL_GMX_PRT_CFG);
prtx_cfg.s.en = 0;
- cvmx_write_csr(CVMX_AGL_GMX_PRTX_CFG(port), prtx_cfg.u64);
+ cvmx_write_csr(p->agl + AGL_GMX_PRT_CFG, prtx_cfg.u64);
memcpy(sa.sa_data, netdev->dev_addr, ETH_ALEN);
octeon_mgmt_set_mac_address(netdev, &sa);
@@ -779,7 +818,7 @@ static int octeon_mgmt_open(struct net_device *netdev)
mix_ctl.s.nbtarb = 0; /* Arbitration mode */
/* MII CB-request FIFO programmable high watermark */
mix_ctl.s.mrq_hwm = 1;
- cvmx_write_csr(CVMX_MIXX_CTL(port), mix_ctl.u64);
+ cvmx_write_csr(p->mix + MIX_CTL, mix_ctl.u64);
if (OCTEON_IS_MODEL(OCTEON_CN56XX_PASS1_X)
|| OCTEON_IS_MODEL(OCTEON_CN52XX_PASS1_X)) {
@@ -806,16 +845,16 @@ static int octeon_mgmt_open(struct net_device *netdev)
/* Clear statistics. */
/* Clear on read. */
- cvmx_write_csr(CVMX_AGL_GMX_RXX_STATS_CTL(port), 1);
- cvmx_write_csr(CVMX_AGL_GMX_RXX_STATS_PKTS_DRP(port), 0);
- cvmx_write_csr(CVMX_AGL_GMX_RXX_STATS_PKTS_BAD(port), 0);
+ cvmx_write_csr(p->agl + AGL_GMX_RX_STATS_CTL, 1);
+ cvmx_write_csr(p->agl + AGL_GMX_RX_STATS_PKTS_DRP, 0);
+ cvmx_write_csr(p->agl + AGL_GMX_RX_STATS_PKTS_BAD, 0);
- cvmx_write_csr(CVMX_AGL_GMX_TXX_STATS_CTL(port), 1);
- cvmx_write_csr(CVMX_AGL_GMX_TXX_STAT0(port), 0);
- cvmx_write_csr(CVMX_AGL_GMX_TXX_STAT1(port), 0);
+ cvmx_write_csr(p->agl + AGL_GMX_TX_STATS_CTL, 1);
+ cvmx_write_csr(p->agl + AGL_GMX_TX_STAT0, 0);
+ cvmx_write_csr(p->agl + AGL_GMX_TX_STAT1, 0);
/* Clear any pending interrupts */
- cvmx_write_csr(CVMX_MIXX_ISR(port), cvmx_read_csr(CVMX_MIXX_ISR(port)));
+ cvmx_write_csr(p->mix + MIX_ISR, cvmx_read_csr(p->mix + MIX_ISR));
if (request_irq(p->irq, octeon_mgmt_interrupt, 0, netdev->name,
netdev)) {
@@ -826,18 +865,18 @@ static int octeon_mgmt_open(struct net_device *netdev)
/* Interrupt every single RX packet */
mix_irhwm.u64 = 0;
mix_irhwm.s.irhwm = 0;
- cvmx_write_csr(CVMX_MIXX_IRHWM(port), mix_irhwm.u64);
+ cvmx_write_csr(p->mix + MIX_IRHWM, mix_irhwm.u64);
/* Interrupt when we have 1 or more packets to clean. */
mix_orhwm.u64 = 0;
mix_orhwm.s.orhwm = 1;
- cvmx_write_csr(CVMX_MIXX_ORHWM(port), mix_orhwm.u64);
+ cvmx_write_csr(p->mix + MIX_ORHWM, mix_orhwm.u64);
/* Enable receive and transmit interrupts */
mix_intena.u64 = 0;
mix_intena.s.ithena = 1;
mix_intena.s.othena = 1;
- cvmx_write_csr(CVMX_MIXX_INTENA(port), mix_intena.u64);
+ cvmx_write_csr(p->mix + MIX_INTENA, mix_intena.u64);
/* Enable packet I/O. */
@@ -868,7 +907,7 @@ static int octeon_mgmt_open(struct net_device *netdev)
* frame. GMX checks that the PREAMBLE is sent correctly.
*/
rxx_frm_ctl.s.pre_chk = 1;
- cvmx_write_csr(CVMX_AGL_GMX_RXX_FRM_CTL(port), rxx_frm_ctl.u64);
+ cvmx_write_csr(p->agl + AGL_GMX_RX_FRM_CTL, rxx_frm_ctl.u64);
/* Enable the AGL block */
agl_gmx_inf_mode.u64 = 0;
@@ -876,13 +915,13 @@ static int octeon_mgmt_open(struct net_device *netdev)
cvmx_write_csr(CVMX_AGL_GMX_INF_MODE, agl_gmx_inf_mode.u64);
/* Configure the port duplex and enables */
- prtx_cfg.u64 = cvmx_read_csr(CVMX_AGL_GMX_PRTX_CFG(port));
+ prtx_cfg.u64 = cvmx_read_csr(p->agl + AGL_GMX_PRT_CFG);
prtx_cfg.s.tx_en = 1;
prtx_cfg.s.rx_en = 1;
prtx_cfg.s.en = 1;
p->last_duplex = 1;
prtx_cfg.s.duplex = p->last_duplex;
- cvmx_write_csr(CVMX_AGL_GMX_PRTX_CFG(port), prtx_cfg.u64);
+ cvmx_write_csr(p->agl + AGL_GMX_PRT_CFG, prtx_cfg.u64);
p->last_link = 0;
netif_carrier_off(netdev);
@@ -946,7 +985,6 @@ static int octeon_mgmt_stop(struct net_device *netdev)
static int octeon_mgmt_xmit(struct sk_buff *skb, struct net_device *netdev)
{
struct octeon_mgmt *p = netdev_priv(netdev);
- int port = p->port;
union mgmt_port_ring_entry re;
unsigned long flags;
int rv = NETDEV_TX_BUSY;
@@ -990,7 +1028,7 @@ static int octeon_mgmt_xmit(struct sk_buff *skb, struct net_device *netdev)
netdev->stats.tx_bytes += skb->len;
/* Ring the bell. */
- cvmx_write_csr(CVMX_MIXX_ORING2(port), 1);
+ cvmx_write_csr(p->mix + MIX_ORING2, 1);
rv = NETDEV_TX_OK;
out:
@@ -1069,10 +1107,14 @@ static const struct net_device_ops octeon_mgmt_ops = {
static int __devinit octeon_mgmt_probe(struct platform_device *pdev)
{
- struct resource *res_irq;
struct net_device *netdev;
struct octeon_mgmt *p;
- int i;
+ const __be32 *data;
+ const u8 *mac;
+ struct resource *res_mix;
+ struct resource *res_agl;
+ int len;
+ int result;
netdev = alloc_etherdev(sizeof(struct octeon_mgmt));
if (netdev == NULL)
@@ -1086,14 +1128,63 @@ static int __devinit octeon_mgmt_probe(struct platform_device *pdev)
p->netdev = netdev;
p->dev = &pdev->dev;
- p->port = pdev->id;
+ data = of_get_property(pdev->dev.of_node, "cell-index", &len);
+ if (data && len == sizeof(*data)) {
+ p->port = be32_to_cpup(data);
+ } else {
+ dev_err(&pdev->dev, "no 'cell-index' property\n");
+ result = -ENXIO;
+ goto err;
+ }
+
snprintf(netdev->name, IFNAMSIZ, "mgmt%d", p->port);
- res_irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
- if (!res_irq)
+ result = platform_get_irq(pdev, 0);
+ if (result < 0)
+ goto err;
+
+ p->irq = result;
+
+ res_mix = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ if (res_mix == NULL) {
+ dev_err(&pdev->dev, "no 'reg' resource\n");
+ result = -ENXIO;
+ goto err;
+ }
+
+ res_agl = platform_get_resource(pdev, IORESOURCE_MEM, 1);
+ if (res_agl == NULL) {
+ dev_err(&pdev->dev, "no 'reg' resource\n");
+ result = -ENXIO;
goto err;
+ }
+
+ p->mix_phys = res_mix->start;
+ p->mix_size = resource_size(res_mix);
+ p->agl_phys = res_agl->start;
+ p->agl_size = resource_size(res_agl);
+
+
+ if (!devm_request_mem_region(&pdev->dev, p->mix_phys, p->mix_size,
+ res_mix->name)) {
+ dev_err(&pdev->dev, "request_mem_region (%s) failed\n",
+ res_mix->name);
+ result = -ENXIO;
+ goto err;
+ }
+
+ if (!devm_request_mem_region(&pdev->dev, p->agl_phys, p->agl_size,
+ res_agl->name)) {
+ result = -ENXIO;
+ dev_err(&pdev->dev, "request_mem_region (%s) failed\n",
+ res_agl->name);
+ goto fail_region1;
+ }
+
+
+ p->mix = (u64)ioremap(p->mix_phys, p->mix_size);
+ p->agl = (u64)ioremap(p->agl_phys, p->agl_size);
- p->irq = res_irq->start;
spin_lock_init(&p->lock);
skb_queue_head_init(&p->tx_list);
@@ -1104,39 +1195,61 @@ static int __devinit octeon_mgmt_probe(struct platform_device *pdev)
netdev->netdev_ops = &octeon_mgmt_ops;
netdev->ethtool_ops = &octeon_mgmt_ethtool_ops;
- /* The mgmt ports get the first N MACs. */
- for (i = 0; i < 6; i++)
- netdev->dev_addr[i] = octeon_bootinfo->mac_addr_base[i];
- netdev->dev_addr[5] += p->port;
+ mac = of_get_mac_address(pdev->dev.of_node);
- if (p->port >= octeon_bootinfo->mac_addr_count)
- dev_err(&pdev->dev,
- "Error %s: Using MAC outside of the assigned range: %pM\n",
- netdev->name, netdev->dev_addr);
+ if (mac)
+ memcpy(netdev->dev_addr, mac, 6);
- if (register_netdev(netdev))
- goto err;
+ p->phy_np = of_parse_phandle(pdev->dev.of_node, "phy-handle", 0);
+
+ pdev->dev.coherent_dma_mask = DMA_BIT_MASK(64);
+ pdev->dev.dma_mask = &pdev->dev.coherent_dma_mask;
+
+ result = register_netdev(netdev);
+ if (result)
+ goto fail_region2;
dev_info(&pdev->dev, "Version " DRV_VERSION "\n");
return 0;
+
+fail_region2:
+ iounmap((void *)p->agl);
+ iounmap((void *)p->mix);
+ devm_release_mem_region(&pdev->dev, p->agl_phys, p->agl_size);
+fail_region1:
+ devm_release_mem_region(&pdev->dev, p->mix_phys, p->mix_size);
err:
free_netdev(netdev);
- return -ENOENT;
+ return result;
}
static int __devexit octeon_mgmt_remove(struct platform_device *pdev)
{
struct net_device *netdev = dev_get_drvdata(&pdev->dev);
+ struct octeon_mgmt *p = netdev_priv(netdev);
unregister_netdev(netdev);
+ iounmap((void *)p->agl);
+ iounmap((void *)p->mix);
+ devm_release_mem_region(&pdev->dev, p->agl_phys, p->agl_size);
+ devm_release_mem_region(&pdev->dev, p->mix_phys, p->mix_size);
free_netdev(netdev);
return 0;
}
+static struct of_device_id octeon_mgmt_match[] = {
+ {
+ .compatible = "cavium,octeon-5750-mix",
+ },
+ {},
+};
+MODULE_DEVICE_TABLE(of, octeon_mgmt_match);
+
static struct platform_driver octeon_mgmt_driver = {
.driver = {
.name = "octeon_mgmt",
.owner = THIS_MODULE,
+ .of_match_table = octeon_mgmt_match,
},
.probe = octeon_mgmt_probe,
.remove = __devexit_p(octeon_mgmt_remove),
--
1.7.2.3
^ permalink raw reply related
* [RFC PATCH v2 12/12] staging: octeon_ethernet: Convert to use device tree.
From: David Daney @ 2011-03-04 19:42 UTC (permalink / raw)
To: linux-mips-6z/3iImG2C8G8FEW9MqTrA, ralf-6z/3iImG2C8G8FEW9MqTrA,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
grant.likely-s3s/WqlpOiPyB63q8FvJNQ,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
Cc: netdev-u79uwXL29TY76Z2rM5mHXA, David Daney, David S. Miller
In-Reply-To: <1299267744-17278-1-git-send-email-ddaney-M3mlKVOIwJVv6pq1l3V1OdBPR1lH4CV8@public.gmane.org>
Get MAC address and PHY connection from the device tree.
Signed-off-by: David Daney <ddaney-M3mlKVOIwJVv6pq1l3V1OdBPR1lH4CV8@public.gmane.org>
Cc: "David S. Miller" <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
Cc: netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
---
drivers/staging/octeon/ethernet-mdio.c | 27 +++++----
drivers/staging/octeon/ethernet.c | 88 +++++++++++++++++-------------
drivers/staging/octeon/octeon-ethernet.h | 3 +
3 files changed, 69 insertions(+), 49 deletions(-)
diff --git a/drivers/staging/octeon/ethernet-mdio.c b/drivers/staging/octeon/ethernet-mdio.c
index 0e5dab7..38a0153 100644
--- a/drivers/staging/octeon/ethernet-mdio.c
+++ b/drivers/staging/octeon/ethernet-mdio.c
@@ -27,6 +27,7 @@
#include <linux/kernel.h>
#include <linux/ethtool.h>
#include <linux/phy.h>
+#include <linux/of_mdio.h>
#include <net/dst.h>
@@ -162,22 +163,24 @@ static void cvm_oct_adjust_link(struct net_device *dev)
int cvm_oct_phy_setup_device(struct net_device *dev)
{
struct octeon_ethernet *priv = netdev_priv(dev);
+ struct device_node *phy_node;
- int phy_addr = cvmx_helper_board_get_mii_address(priv->port);
- if (phy_addr != -1) {
- char phy_id[20];
+ if (!priv->of_node)
+ return 0;
- snprintf(phy_id, sizeof(phy_id), PHY_ID_FMT, "0", phy_addr);
+ phy_node = of_parse_phandle(priv->of_node, "phy-handle", 0);
+ if (!phy_node)
+ return 0;
- priv->phydev = phy_connect(dev, phy_id, cvm_oct_adjust_link, 0,
- PHY_INTERFACE_MODE_GMII);
+ priv->phydev = of_phy_connect(dev, phy_node, cvm_oct_adjust_link, 0,
+ PHY_INTERFACE_MODE_GMII);
- if (IS_ERR(priv->phydev)) {
- priv->phydev = NULL;
- return -1;
- }
- priv->last_link = 0;
- phy_start_aneg(priv->phydev);
+ if (IS_ERR(priv->phydev)) {
+ priv->phydev = NULL;
+ return -1;
}
+ priv->last_link = 0;
+ phy_start_aneg(priv->phydev);
+
return 0;
}
diff --git a/drivers/staging/octeon/ethernet.c b/drivers/staging/octeon/ethernet.c
index 042adf7..16c93e4 100644
--- a/drivers/staging/octeon/ethernet.c
+++ b/drivers/staging/octeon/ethernet.c
@@ -31,6 +31,7 @@
#include <linux/etherdevice.h>
#include <linux/phy.h>
#include <linux/slab.h>
+#include <linux/of_net.h>
#include <net/dst.h>
@@ -112,15 +113,6 @@ int rx_napi_weight = 32;
module_param(rx_napi_weight, int, 0444);
MODULE_PARM_DESC(rx_napi_weight, "The NAPI WEIGHT parameter.");
-/*
- * The offset from mac_addr_base that should be used for the next port
- * that is configured. By convention, if any mgmt ports exist on the
- * chip, they get the first mac addresses, The ports controlled by
- * this driver are numbered sequencially following any mgmt addresses
- * that may exist.
- */
-static unsigned int cvm_oct_mac_addr_offset;
-
/**
* cvm_oct_poll_queue - Workqueue for polling operations.
*/
@@ -447,26 +439,13 @@ static int cvm_oct_common_set_mac_address(struct net_device *dev, void *addr)
int cvm_oct_common_init(struct net_device *dev)
{
struct octeon_ethernet *priv = netdev_priv(dev);
- struct sockaddr sa;
- u64 mac = ((u64)(octeon_bootinfo->mac_addr_base[0] & 0xff) << 40) |
- ((u64)(octeon_bootinfo->mac_addr_base[1] & 0xff) << 32) |
- ((u64)(octeon_bootinfo->mac_addr_base[2] & 0xff) << 24) |
- ((u64)(octeon_bootinfo->mac_addr_base[3] & 0xff) << 16) |
- ((u64)(octeon_bootinfo->mac_addr_base[4] & 0xff) << 8) |
- (u64)(octeon_bootinfo->mac_addr_base[5] & 0xff);
-
- mac += cvm_oct_mac_addr_offset;
- sa.sa_data[0] = (mac >> 40) & 0xff;
- sa.sa_data[1] = (mac >> 32) & 0xff;
- sa.sa_data[2] = (mac >> 24) & 0xff;
- sa.sa_data[3] = (mac >> 16) & 0xff;
- sa.sa_data[4] = (mac >> 8) & 0xff;
- sa.sa_data[5] = mac & 0xff;
-
- if (cvm_oct_mac_addr_offset >= octeon_bootinfo->mac_addr_count)
- printk(KERN_DEBUG "%s: Using MAC outside of the assigned range:"
- " %pM\n", dev->name, sa.sa_data);
- cvm_oct_mac_addr_offset++;
+ struct sockaddr sa = {0};
+
+ if (priv->of_node) {
+ const u8 *mac = of_get_mac_address(priv->of_node);
+ if (mac)
+ memcpy(sa.sa_data, mac, 6);
+ }
/*
* Force the interface to use the POW send if always_use_pow
@@ -594,22 +573,55 @@ static const struct net_device_ops cvm_oct_pow_netdev_ops = {
extern void octeon_mdiobus_force_mod_depencency(void);
+static struct device_node * __init cvm_oct_of_get_child(const struct device_node *parent,
+ int reg_val)
+{
+ struct device_node *node = NULL;
+ int size;
+ const __be32 *addr;
+
+ for (;;) {
+ node = of_get_next_child(parent, node);
+ if (!node)
+ break;
+ addr = of_get_property(node, "reg", &size);
+ if (addr && (be32_to_cpu(*addr) == reg_val))
+ break;
+ }
+ return node;
+}
+
+static struct device_node * __init cvm_oct_node_for_port(struct device_node *pip,
+ int interface, int port)
+{
+ struct device_node *ni, *np;
+
+ ni = cvm_oct_of_get_child(pip, interface);
+ if (!ni)
+ return NULL;
+
+ np = cvm_oct_of_get_child(ni, port);
+ of_node_put(ni);
+
+ return np;
+}
+
static int __init cvm_oct_init_module(void)
{
int num_interfaces;
int interface;
int fau = FAU_NUM_PACKET_BUFFERS_TO_FREE;
int qos;
+ struct device_node *pip;
octeon_mdiobus_force_mod_depencency();
pr_notice("cavium-ethernet %s\n", OCTEON_ETHERNET_VERSION);
- if (OCTEON_IS_MODEL(OCTEON_CN52XX))
- cvm_oct_mac_addr_offset = 2; /* First two are the mgmt ports. */
- else if (OCTEON_IS_MODEL(OCTEON_CN56XX))
- cvm_oct_mac_addr_offset = 1; /* First one is the mgmt port. */
- else
- cvm_oct_mac_addr_offset = 0;
+ pip = of_find_node_by_path("pip");
+ if (!pip) {
+ pr_err("Error: No 'pip' in /aliases\n");
+ return -EINVAL;
+ }
cvm_oct_poll_queue = create_singlethread_workqueue("octeon-ethernet");
if (cvm_oct_poll_queue == NULL) {
@@ -688,10 +700,11 @@ static int __init cvm_oct_init_module(void)
cvmx_helper_interface_get_mode(interface);
int num_ports = cvmx_helper_ports_on_interface(interface);
int port;
+ int port_index;
- for (port = cvmx_helper_get_ipd_port(interface, 0);
+ for (port_index = 0, port = cvmx_helper_get_ipd_port(interface, 0);
port < cvmx_helper_get_ipd_port(interface, num_ports);
- port++) {
+ port_index++, port++) {
struct octeon_ethernet *priv;
struct net_device *dev =
alloc_etherdev(sizeof(struct octeon_ethernet));
@@ -702,6 +715,7 @@ static int __init cvm_oct_init_module(void)
/* Initialize the device private structure. */
priv = netdev_priv(dev);
+ priv->of_node = cvm_oct_node_for_port(pip, interface, port_index);
INIT_DELAYED_WORK(&priv->port_periodic_work,
cvm_oct_periodic_worker);
diff --git a/drivers/staging/octeon/octeon-ethernet.h b/drivers/staging/octeon/octeon-ethernet.h
index d581925..9360e22 100644
--- a/drivers/staging/octeon/octeon-ethernet.h
+++ b/drivers/staging/octeon/octeon-ethernet.h
@@ -31,6 +31,8 @@
#ifndef OCTEON_ETHERNET_H
#define OCTEON_ETHERNET_H
+#include <linux/of.h>
+
/**
* This is the definition of the Ethernet driver's private
* driver state stored in netdev_priv(dev).
@@ -59,6 +61,7 @@ struct octeon_ethernet {
void (*poll) (struct net_device *dev);
struct delayed_work port_periodic_work;
struct work_struct port_work; /* may be unused. */
+ struct device_node *of_node;
};
int cvm_oct_free_work(void *work_queue_entry);
--
1.7.2.3
^ permalink raw reply related
* Re: pull request: wireless-next-2.6 2011-03-04
From: David Miller @ 2011-03-04 20:25 UTC (permalink / raw)
To: linville; +Cc: linux-wireless, netdev
In-Reply-To: <20110304194018.GD9866@tuxdriver.com>
From: "John W. Linville" <linville@tuxdriver.com>
Date: Fri, 4 Mar 2011 14:40:18 -0500
> Yet another batch of new wireless bits intended for 2.6.39... :-)
>
> Highlights in this round include AP-mode support for wl12xx, some
> rtlwifi fixes (many build-related), some more b43 N-phy support
> advancement, a big batch of ath9k_htc updates, and the refactoring of
> iwlwifi to separate iwl3945 and iwl4965 support out into a new iwlegacy
> driver. Mixed-in, of course, is the usual batch of various driver and
> mac80211 updates and fixes.
>
> Please let me know if there are problems!
Pulled, thanks John.
^ permalink raw reply
* Re: [PATCH net-next-2.6] inetpeer: seqlock optimization
From: David Miller @ 2011-03-04 20:45 UTC (permalink / raw)
To: eric.dumazet; +Cc: xiaosuo, netdev
In-Reply-To: <20110304.111705.193726268.davem@davemloft.net>
From: David Miller <davem@davemloft.net>
Date: Fri, 04 Mar 2011 11:17:05 -0800 (PST)
> From: Eric Dumazet <eric.dumazet@gmail.com>
> Date: Fri, 04 Mar 2011 16:09:08 +0100
>
>> Here is a patch to implement this idea.
>
> Applied, thanks Eric!
Unfortunately, I have to revert, the lockdep annotations needs to
be updated:
net/ipv4/inetpeer.c: In function ‘peer_avl_rebalance’:
net/ipv4/inetpeer.c:274:10: error: ‘seqlock_t’ has no member named ‘dep_map’
net/ipv4/inetpeer.c:276:7: error: ‘seqlock_t’ has no member named ‘dep_map’
net/ipv4/inetpeer.c:278:7: error: ‘seqlock_t’ has no member named ‘dep_map’
net/ipv4/inetpeer.c:285:9: error: ‘seqlock_t’ has no member named ‘dep_map’
net/ipv4/inetpeer.c:287:9: error: ‘seqlock_t’ has no member named ‘dep_map’
net/ipv4/inetpeer.c:299:11: error: ‘seqlock_t’ has no member named ‘dep_map’
net/ipv4/inetpeer.c:301:11: error: ‘seqlock_t’ has no member named ‘dep_map’
net/ipv4/inetpeer.c:317:9: error: ‘seqlock_t’ has no member named ‘dep_map’
net/ipv4/inetpeer.c:319:9: error: ‘seqlock_t’ has no member named ‘dep_map’
net/ipv4/inetpeer.c:331:11: error: ‘seqlock_t’ has no member named ‘dep_map’
net/ipv4/inetpeer.c:333:11: error: ‘seqlock_t’ has no member named ‘dep_map’
net/ipv4/inetpeer.c: In function ‘unlink_from_pool’:
net/ipv4/inetpeer.c:385:7: error: ‘seqlock_t’ has no member named ‘dep_map’
net/ipv4/inetpeer.c:385:7: error: ‘seqlock_t’ has no member named ‘dep_map’
net/ipv4/inetpeer.c:394:8: error: ‘seqlock_t’ has no member named ‘dep_map’
net/ipv4/inetpeer.c:394:8: error: ‘seqlock_t’ has no member named ‘dep_map’
net/ipv4/inetpeer.c:395:4: error: ‘seqlock_t’ has no member named ‘dep_map’
net/ipv4/inetpeer.c: In function ‘inet_getpeer’:
net/ipv4/inetpeer.c:508:6: error: ‘seqlock_t’ has no member named ‘dep_map’
net/ipv4/inetpeer.c:508:6: error: ‘seqlock_t’ has no member named ‘dep_map’
^ permalink raw reply
* Re: [net-next-2.6 PATCH 02/10] ethtool: add ntuple flow specifier to network flow classifier
From: Alexander Duyck @ 2011-03-04 21:00 UTC (permalink / raw)
To: Ben Hutchings
Cc: Alexander Duyck, davem@davemloft.net, Kirsher, Jeffrey T,
netdev@vger.kernel.org
In-Reply-To: <1299091805.2664.16.camel@bwh-desktop>
On 3/2/2011 10:50 AM, Ben Hutchings wrote:
> On Fri, 2011-02-25 at 21:30 -0800, Alexander Duyck wrote:
>> On Fri, Feb 25, 2011 at 5:00 PM, Ben Hutchings
>> <bhutchings@solarflare.com> wrote:
>>> On Fri, 2011-02-25 at 15:32 -0800, Alexander Duyck wrote:
> [...]
>>>> diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h
>>>> index aac3e2e..3d1f8e0 100644
>>>> --- a/include/linux/ethtool.h
>>>> +++ b/include/linux/ethtool.h
>>>> @@ -378,10 +378,25 @@ struct ethtool_usrip4_spec {
>>>> };
>>>>
>>>> /**
>>>> + * struct ethtool_ntuple_spec_ext - flow spec extension for ntuple in nfc
>>>> + * @unused: space unused by extension
>>>> + * @vlan_etype: EtherType for vlan tagged packet to match
>>>> + * @vlan_tci: VLAN tag to match
>>>> + * @data: Driver-dependent data to match
>>>> + */
>>>> +struct ethtool_ntuple_spec_ext {
>>>> + __be32 unused[15];
>>>> + __be16 vlan_etype;
>>>> + __be16 vlan_tci;
>>>> + __be32 data[2];
>>>> +};
>>> [...]
>>>
>>> This is a really nasty way to reclaim space in the union.
>>>
>>> Let's name the union, shrink it and insert the extra fields that way:
>>>
>>> --- a/include/linux/ethtool.h
>>> +++ b/include/linux/ethtool.h
>>> @@ -377,27 +377,43 @@ struct ethtool_usrip4_spec {
>>> __u8 proto;
>>> };
>>>
>>> +union ethtool_flow_union {
>>> + struct ethtool_tcpip4_spec tcp_ip4_spec;
>>> + struct ethtool_tcpip4_spec udp_ip4_spec;
>>> + struct ethtool_tcpip4_spec sctp_ip4_spec;
>>> + struct ethtool_ah_espip4_spec ah_ip4_spec;
>>> + struct ethtool_ah_espip4_spec esp_ip4_spec;
>>> + struct ethtool_usrip4_spec usr_ip4_spec;
>>> + struct ethhdr ether_spec;
>>> + __u8 hdata[52];
>>> +};
>>> +
>>> +struct ethtool_flow_ext {
>>> + __be16 vlan_etype;
>>> + __be16 vlan_tci;
>>> + __be32 data[2];
>>> + __u32 reserved[2];
>>> +};
>>> +
>>
>> Any chance of getting the reserved fields moved to the top of the
>> structure? My only concern is that we might end up with a flow spec
>> larger than 52 bytes at some point and moving the reserved fields to
>> the front might give us a little more wiggle room future
>> compatibility.
> [...]
>
> OK, so how about this:
>
> /**
> * union ethtool_flow_union - flow spec type-specific fields
> * @tcp_ip4_spec: TCP/IPv4 fields to match
> * @udp_ip4_spec: UDP/IPv4 fields to match
> * @sctp_ip4_spec: SCTP/IPv4 fields to match
> * @ah_ip4_spec: AH/IPv4 fields to match
> * @esp_ip4_spec: ESP/IPv4 fields to match
> * @usr_ip4_spec: User-defined IPv4 fields to match
> * @ether_spec: Ethernet fields to match
> *
> * Note: The size of this union may shrink in future to allow for
> * expansion in&struct ethtool_flow_ext.
> */
> union ethtool_flow_union {
> struct ethtool_tcpip4_spec tcp_ip4_spec;
> struct ethtool_tcpip4_spec udp_ip4_spec;
> struct ethtool_tcpip4_spec sctp_ip4_spec;
> struct ethtool_ah_espip4_spec ah_ip4_spec;
> struct ethtool_ah_espip4_spec esp_ip4_spec;
> struct ethtool_usrip4_spec usr_ip4_spec;
> struct ethhdr ether_spec;
> __u8 hdata[60];
> };
>
> /**
> * struct ethtool_flow_ext - flow spec common extension fields
> * @vlan_etype: EtherType for vlan tagged packet to match
> * @vlan_tci: VLAN tag to match
> * @data: Driver-dependent data to match
> *
> * Note: Additional fields may be inserted before @vlan_etype in future,
> * but the offset of the existing fields within the containing structure
> * (&struct ethtool_rx_flow_spec) will be stable.
> */
> struct ethtool_flow_ext {
> __be16 vlan_etype;
> __be16 vlan_tci;
> __be32 data[2];
> };
>
> Please can you check that these definitions won't affect the size of
> struct ethtool_rx_flow_spec on i386 or x86-64?
>
> Ben.
>
I'll try to look into it next week since I am just getting caught up
from being out on vacation.
As I recall when I had made my original changes they didn't have an
effect on the size so this should be fine since all of the fields have a
maximum alignment of 32 bits.
Thanks,
Alex
^ permalink raw reply
* Re: [RFC PATCH v2 10/12] netdev: mdio-octeon.c: Convert to use device tree.
From: David Miller @ 2011-03-04 21:10 UTC (permalink / raw)
To: ddaney
Cc: linux-mips, ralf, devicetree-discuss, grant.likely, linux-kernel,
netdev
In-Reply-To: <1299267744-17278-11-git-send-email-ddaney@caviumnetworks.com>
From: David Daney <ddaney@caviumnetworks.com>
Date: Fri, 4 Mar 2011 11:42:22 -0800
> Get the MDIO bus controller addresses from the device tree.
>
> Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Acked-by: David S. Miller <davem@davemloft.net>
^ permalink raw reply
* Re: [RFC PATCH v2 11/12] netdev: octeon_mgmt: Convert to use device tree.
From: David Miller @ 2011-03-04 21:10 UTC (permalink / raw)
To: ddaney
Cc: linux-mips, ralf, devicetree-discuss, grant.likely, linux-kernel,
netdev
In-Reply-To: <1299267744-17278-12-git-send-email-ddaney@caviumnetworks.com>
From: David Daney <ddaney@caviumnetworks.com>
Date: Fri, 4 Mar 2011 11:42:23 -0800
> The device tree will supply the register bank base addresses, make
> register addressing relative to those. PHY connection is now
> described by the device tree.
>
> Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Acked-by: David S. Miller <davem@davemloft.net>
^ permalink raw reply
* Re: [RFC PATCH v2 12/12] staging: octeon_ethernet: Convert to use device tree.
From: David Miller @ 2011-03-04 21:10 UTC (permalink / raw)
To: ddaney
Cc: linux-mips, ralf, devicetree-discuss, grant.likely, linux-kernel,
netdev
In-Reply-To: <1299267744-17278-13-git-send-email-ddaney@caviumnetworks.com>
From: David Daney <ddaney@caviumnetworks.com>
Date: Fri, 4 Mar 2011 11:42:24 -0800
> Get MAC address and PHY connection from the device tree.
>
> Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Acked-by: David S. Miller <davem@davemloft.net>
^ permalink raw reply
* E-mail
From: Esther Leonia Marvis @ 2011-03-04 21:28 UTC (permalink / raw)
To: info
I was told by Mrs Helen Cole to send this mail to you as at last two (2) Months
ago, regarding you to contact her Lawyer.
Below are the details she gave me for you to contact her,
lawyer.
Name - Barrister Morgan Owen.
Email - barrmorgan6@myway.com
Please don't be angry for my late mail to you.
Thank you.
Esther Leonia Marvis.
^ permalink raw reply
* [PATCH 1/4] mcast: net_device dev not used
From: Hagen Paul Pfeifer @ 2011-03-04 21:45 UTC (permalink / raw)
To: netdev; +Cc: Hagen Paul Pfeifer
ip6_mc_source(), ip6_mc_msfilter() as well as ip6_mc_msfget() declare
and assign dev but do not use the variable afterwards.
Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>
---
net/ipv6/mcast.c | 6 ------
1 files changed, 0 insertions(+), 6 deletions(-)
diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c
index 7b27d08..f2c9b69 100644
--- a/net/ipv6/mcast.c
+++ b/net/ipv6/mcast.c
@@ -319,7 +319,6 @@ int ip6_mc_source(int add, int omode, struct sock *sk,
{
struct in6_addr *source, *group;
struct ipv6_mc_socklist *pmc;
- struct net_device *dev;
struct inet6_dev *idev;
struct ipv6_pinfo *inet6 = inet6_sk(sk);
struct ip6_sf_socklist *psl;
@@ -341,7 +340,6 @@ int ip6_mc_source(int add, int omode, struct sock *sk,
rcu_read_unlock();
return -ENODEV;
}
- dev = idev->dev;
err = -EADDRNOTAVAIL;
@@ -455,7 +453,6 @@ int ip6_mc_msfilter(struct sock *sk, struct group_filter *gsf)
{
struct in6_addr *group;
struct ipv6_mc_socklist *pmc;
- struct net_device *dev;
struct inet6_dev *idev;
struct ipv6_pinfo *inet6 = inet6_sk(sk);
struct ip6_sf_socklist *newpsl, *psl;
@@ -478,7 +475,6 @@ int ip6_mc_msfilter(struct sock *sk, struct group_filter *gsf)
rcu_read_unlock();
return -ENODEV;
}
- dev = idev->dev;
err = 0;
@@ -549,7 +545,6 @@ int ip6_mc_msfget(struct sock *sk, struct group_filter *gsf,
struct in6_addr *group;
struct ipv6_mc_socklist *pmc;
struct inet6_dev *idev;
- struct net_device *dev;
struct ipv6_pinfo *inet6 = inet6_sk(sk);
struct ip6_sf_socklist *psl;
struct net *net = sock_net(sk);
@@ -566,7 +561,6 @@ int ip6_mc_msfget(struct sock *sk, struct group_filter *gsf,
rcu_read_unlock();
return -ENODEV;
}
- dev = idev->dev;
err = -EADDRNOTAVAIL;
/*
--
1.7.4.1.57.g0466.dirty
^ permalink raw reply related
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