* Re: linux-next: build failure after merge of the final tree (net-next tree related)
From: David Miller @ 2012-09-20 22:53 UTC (permalink / raw)
To: benh
Cc: sfr, paulus, linuxppc-dev, mika.westerberg, netdev, linux-next,
linux-kernel
In-Reply-To: <1348179764.1132.35.camel@pasglop>
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: Fri, 21 Sep 2012 08:22:44 +1000
> Hrm, that's ancient gunk, I'll have to dig. We potentially can support
> ISA devices DMA'ing from an ISA bridge... but via the iommu, which means
> isa_virt_to_bus is a non-starter.
>
> But then, do we really care ? IE. Is there single device that actually
> requires ISA_DMA_API and that is expected to work on any currently
> supported powerpc hw ? :-)
>
> We don't even support PReP anymore, so that leaves us with what ?
ISA_DMA_API implies a fixed window of addresses which are <= 32-bits
on the bus, which is a hardware requirement of these devices.
isa_virt_to_bus() goes to that physical address, and the expection is
that you use GFP_DMA and thus the physical addresses fit inside of
an unsigned int.
isa_virt_to_bus() basically amounts to a virt-->phys plus a cast.
> Anybody has an objection to turning ISA_DMA_API off ?
Then you can remove all of the DMA api stuff in powerpc's asm/dma.h
but some of it looks like it might be in use.
^ permalink raw reply
* СПЕШНО СЪОБЩЕНИЕ!
From: Webmaster Ndihme Desk @ 2012-09-20 23:05 UTC (permalink / raw)
--
Уважаеми потребителю Webmail
Вашата пощенска кутия е превишил ограничението на употребата на
квотата, което е определено от вашия мениджър, както и достъп до
вашата пощенска кутия чрез нашата поща портал ще бъде недостъпна за
някой по време на този период на поддържане.
Вие не ще бъде в състояние да създаде нова електронна поща, за да
изпращат или получават отново, докато не валидира пощенската си кутия.
За повторно валидира пощенската си кутия, можете да кликнете
http://www.pinoybroker.com/4buyers/forms/form1.html
благодаря
Системния администратор.
Copyright © 2012 # WEBMASTER ADMIN • Всички права запазени •
^ permalink raw reply
* [PATCH net-next] net1080: Neaten netdev_dbg use
From: Joe Perches @ 2012-09-21 0:10 UTC (permalink / raw)
To: David Miller; +Cc: gregkh, netdev, linux-usb, linux-kernel
In-Reply-To: <20120920.175335.1128494030737237412.davem@davemloft.net>
Remove unnecessary temporary variable and #ifdef DEBUG block.
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/net/usb/net1080.c | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/net/usb/net1080.c b/drivers/net/usb/net1080.c
index 29e06e1..c062a3e 100644
--- a/drivers/net/usb/net1080.c
+++ b/drivers/net/usb/net1080.c
@@ -417,12 +417,9 @@ static int net1080_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
u16 hdr_len, packet_len;
if (!(skb->len & 0x01)) {
-#ifdef DEBUG
- struct net_device *net = dev->net;
netdev_dbg(dev->net, "rx framesize %d range %d..%d mtu %d\n",
- skb->len, net->hard_header_len, dev->hard_mtu,
- net->mtu);
-#endif
+ skb->len, dev->net->hard_header_len, dev->hard_mtu,
+ dev->net->mtu);
dev->net->stats.rx_frame_errors++;
nc_ensure_sync(dev);
return 0;
^ permalink raw reply related
* Re: Oops with latest (netfilter) nf-next tree, when unloading iptable_nat
From: Pablo Neira Ayuso @ 2012-09-21 1:00 UTC (permalink / raw)
To: Patrick McHardy
Cc: Jesper Dangaard Brouer, Florian Westphal, netfilter-devel, netdev,
yongjun_wei
In-Reply-To: <Pine.GSO.4.63.1209201859140.14078@stinky-local.trash.net>
On Thu, Sep 20, 2012 at 07:06:52PM +0200, Patrick McHardy wrote:
> On Thu, 20 Sep 2012, Patrick McHardy wrote:
>
> >>>diff --git a/net/netfilter/nf_conntrack_core.c
> >>>b/net/netfilter/nf_conntrack_core.c
> >>>index dcb2791..0f241be 100644
> >>>--- a/net/netfilter/nf_conntrack_core.c
> >>>+++ b/net/netfilter/nf_conntrack_core.c
> >>>@@ -1224,6 +1224,8 @@ get_next_corpse(struct net *net, int
> >>>(*iter)(struct nf_conn *i, void *data),
> >>> spin_lock_bh(&nf_conntrack_lock);
> >>> for (; *bucket < net->ct.htable_size; (*bucket)++) {
> >>> hlist_nulls_for_each_entry(h, n, &net->ct.hash[*bucket],
> >>>hnnode) {
> >>>+ if (NF_CT_DIRECTION(h) != IP_CT_DIR_ORIGINAL)
> >>>+ continue;
> >>
> >>I think this will make the deletion of entries via `conntrack -F'
> >>slowier as we'll have to iterate over more entries (we won't delete
> >>entries for the reply tuple).
> >
> >Slightly maybe, but I doubt it makes much of a difference.
> >
> >>I think I prefer Florian's patch, it's fairly small and it does not
> >>change the current nf_ct_iterate behaviour or adding some
> >>nf_nat_iterate cleanup.
> >
> >I don't think I've received it. Could you forward it to me please?
>
> Florian forwarded the patch to me. While it fixes the problem, it
> is a workaround and it certainly is inelegant to do the
> list_del_rcu_init() and memset up to *four* times for a single conntrack.
>
> The correct thing IMO is to invoke the callbacks exactly once per
> conntrack, either through my nf_ct_iterate_cleanup() change or through
> a new iteration function for callers that don't kill conntracks. As
> soon as we start generating events for NAT section cleanup this will be
> needed in any case.
>
> Unless I'm missing something, conntrack flushing is also a really
> rare operation anyways and for large tables where this might make a
> small difference will take a quite large time anyway.
Makes sense. And we can revisit this to improve it later.
I'll take this patch. I'll send a batch with updates for the nf-nat
thin asap.
Thanks a lot Patrick.
^ permalink raw reply
* linux-next: manual merge of the net-next tree with the net tree
From: Stephen Rothwell @ 2012-09-21 1:30 UTC (permalink / raw)
To: David Miller, netdev; +Cc: linux-next, linux-kernel, "Bjørn Mork"
[-- Attachment #1: Type: text/plain, Size: 2042 bytes --]
Hi all,
Today's linux-next merge of the net-next tree got a conflict in drivers/net/usb/qmi_wwan.c between commit 9db273f45686 ("net: qmi_wwan: adding Huawei E367, ZTE MF683 and Pantech P4200") from the net tree and commit bd877e489126 ("net: qmi_wwan: use a single bind function for all device types") from the net-next tree.
I fixed it up (see below) and can carry the fix as necessary (no action
is required).
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
diff --cc drivers/net/usb/qmi_wwan.c
index 3543c9e,e7b53f0..0000000
--- a/drivers/net/usb/qmi_wwan.c
+++ b/drivers/net/usb/qmi_wwan.c
@@@ -366,21 -353,17 +353,21 @@@ static const struct usb_device_id produ
},
/* 2. Combined interface devices matching on class+protocol */
+ { /* Huawei E367 and possibly others in "Windows mode" */
+ USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, USB_CLASS_VENDOR_SPEC, 1, 7),
+ .driver_info = (unsigned long)&qmi_wwan_info,
+ },
{ /* Huawei E392, E398 and possibly others in "Windows mode" */
USB_VENDOR_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, USB_CLASS_VENDOR_SPEC, 1, 17),
- .driver_info = (unsigned long)&qmi_wwan_shared,
+ .driver_info = (unsigned long)&qmi_wwan_info,
},
- { /* Pantech UML290 */
- USB_DEVICE_AND_INTERFACE_INFO(0x106c, 0x3718, USB_CLASS_VENDOR_SPEC, 0xf0, 0xff),
+ { /* Pantech UML290, P4200 and more */
+ USB_VENDOR_AND_INTERFACE_INFO(0x106c, USB_CLASS_VENDOR_SPEC, 0xf0, 0xff),
- .driver_info = (unsigned long)&qmi_wwan_shared,
+ .driver_info = (unsigned long)&qmi_wwan_info,
},
{ /* Pantech UML290 - newer firmware */
- USB_DEVICE_AND_INTERFACE_INFO(0x106c, 0x3718, USB_CLASS_VENDOR_SPEC, 0xf1, 0xff),
+ USB_VENDOR_AND_INTERFACE_INFO(0x106c, USB_CLASS_VENDOR_SPEC, 0xf1, 0xff),
- .driver_info = (unsigned long)&qmi_wwan_shared,
+ .driver_info = (unsigned long)&qmi_wwan_info,
},
/* 3. Combined interface devices matching on interface number */
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* Re: linux-next: build failure after merge of the final tree (net-next tree related)
From: Stephen Rothwell @ 2012-09-21 1:37 UTC (permalink / raw)
To: David Miller, netdev; +Cc: linux-next, linux-kernel, Mika Westerberg
In-Reply-To: <20120920173622.2aa7209cd241a3945f4384d4@canb.auug.org.au>
[-- Attachment #1: Type: text/plain, Size: 1814 bytes --]
Hi Dave,
On Thu, 20 Sep 2012 17:36:22 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> After merging the final tree, today's linux-next build (powerpc
> allyesconfig) failed like this:
>
> drivers/net/ethernet/i825xx/znet.c: In function 'hardware_init':
> drivers/net/ethernet/i825xx/znet.c:868:2: error: implicit declaration of function 'isa_virt_to_bus' [-Werror=implicit-function-declaration]
>
> Caused by commit 1d3ff76759b7 ("i825xx: znet: fix compiler warnings when
> building a 64-bit kernel"). Is there some Kconfig dependency missing (CONFIG_ISA)?
>
> I have reverted that commit for today.
Today, I have added the following merge fix patch instead of reverting the
above (just until PowerPC can be fixed one way or the other). I don't
know if you want to put this into the net-next tree, but it may be a
reasonable temporary measure.
From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Fri, 21 Sep 2012 11:32:09 +1000
Subject: [PATCH] i825xx: znet: temporarily disable on PPC
due to build problems
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
drivers/net/ethernet/i825xx/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/i825xx/Kconfig b/drivers/net/ethernet/i825xx/Kconfig
index fed5080..9fce38b 100644
--- a/drivers/net/ethernet/i825xx/Kconfig
+++ b/drivers/net/ethernet/i825xx/Kconfig
@@ -151,6 +151,7 @@ config SUN3_82586
config ZNET
tristate "Zenith Z-Note support (EXPERIMENTAL)"
depends on EXPERIMENTAL && ISA_DMA_API
+ depends on !PPC
---help---
The Zenith Z-Note notebook computer has a built-in network
(Ethernet) card, and this is the Linux driver for it. Note that the
--
1.7.10.280.gaa39
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply related
* Re: [RFC PATCH 0/3] usbnet: support runtime PM triggered by link change
From: Ming Lei @ 2012-09-21 1:44 UTC (permalink / raw)
To: David Miller; +Cc: oliver, bjorn, gregkh, finik, rjw, stern, netdev, linux-usb
In-Reply-To: <20120920.171610.1120043891672310370.davem@davemloft.net>
On Fri, Sep 21, 2012 at 5:16 AM, David Miller <davem@davemloft.net> wrote:
> From: Oliver Neukum <oliver@neukum.org>
> Date: Thu, 20 Sep 2012 23:04:38 +0200
>
>> On Thursday 20 September 2012 17:02:27 David Miller wrote:
>>>
>>> There seems to be some discussion about the legitimacy of doing things
>>> this way, and in any event the patches were an RFC.
>>>
>>> Please resubmit as a non-RFC once all the issues have been worked
>>> out, if appropriate.
>>
>> Just to make this clear, I'd like to state that the discussion involved
>> only the third, last patch in the series. The first two are fine and make
>> sense by themselves.
>
> I want changes in those, see my replies.
No problem, I will send out -v2 of the first two patches later.
thanks,
--
Ming Lei
^ permalink raw reply
* Re: [PATCH net-next] net1080: Neaten netdev_dbg use
From: David Miller @ 2012-09-21 2:06 UTC (permalink / raw)
To: joe-6d6DIl74uiNBDgjK7y7TUQ
Cc: gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r,
netdev-u79uwXL29TY76Z2rM5mHXA, linux-usb-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1348186223.2134.1.camel@joe2Laptop>
From: Joe Perches <joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
Date: Thu, 20 Sep 2012 17:10:23 -0700
> Remove unnecessary temporary variable and #ifdef DEBUG block.
>
> Signed-off-by: Joe Perches <joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
Applied, thanks Joe.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" 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] at91ether: return PTR_ERR if call to clk_get fails
From: David Miller @ 2012-09-21 2:22 UTC (permalink / raw)
To: nicolas.ferre; +Cc: devendra.aaru, netdev, linux-arm-kernel
In-Reply-To: <505AC8D6.5080404@atmel.com>
From: Nicolas Ferre <nicolas.ferre@atmel.com>
Date: Thu, 20 Sep 2012 09:42:14 +0200
> On 09/20/2012 09:04 AM, Devendra Naga :
>> we are currently returning ENODEV, as the clk_get may give a exact
>> error code in its returned pointer, assign it to the ret by using the
>> PTR_ERR function, so that the subsequent goto label will jump to the
>> error path and clean the driver and return the error correctly.
>>
>> Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
>
> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Applied, thanks.
^ permalink raw reply
* Re: [PATCH 0/2] do not disable sg when packet requires no checksum
From: David Miller @ 2012-09-21 2:32 UTC (permalink / raw)
To: ecashin; +Cc: akpm, bhutchings, jesse, netdev, linux-kernel
In-Reply-To: <cover.1348105262.git.ecashin@coraid.com>
From: Ed Cashin <ecashin@coraid.com>
Date: Wed, 19 Sep 2012 18:46:07 -0700
> This two-part patchset replaces an earlier net-only patch that
> added an explicit check for the AoE protocol to harmonize_features
> in net/core/dev.c.
>
> Following the suggestions of Ben Hutchings, this patchset makes
> the decision in the network layer protocol agnostic instead of
> using ETH_P_AOE as a special case. It relies on fresh skbs being
> CHECKSUM_NONE but makes that explicit with an assertion.
>
> Ed L. Cashin (2):
> aoe: assert AoE packets marked as requiring no checksum
> net: do not disable sg for packets requiring no checksum
Applied and queued up for -stable, thanks Ed.
^ permalink raw reply
* Re: [net-next 0/4 v2][pull request] Intel Wired LAN Driver Updates
From: David Miller @ 2012-09-21 2:39 UTC (permalink / raw)
To: jeffrey.t.kirsher; +Cc: netdev, gospo, sassmann
In-Reply-To: <1348135637-17857-1-git-send-email-jeffrey.t.kirsher@intel.com>
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Thu, 20 Sep 2012 03:07:13 -0700
> This series contains updates to igb and ixgbevf.
>
> v2: updated patch description in 04 patch (ixgbevf: scheduling while
> atomic in reset hw path)
>
> The following are changes since commit aee77e4accbeb2c86b1d294cd84fec4a12dde3bd:
> r8169: use unlimited DMA burst for TX
> and are available in the git repository at:
> git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next master
Pulled, thanks Jeff.
^ permalink raw reply
* [PATCH 1/3] phy/micrel: Implement support for KSZ8021
From: Marek Vasut @ 2012-09-21 2:46 UTC (permalink / raw)
To: netdev
Cc: Marek Vasut, David J. Choi, David S. Miller, Nobuhiro Iwamatsu,
Fabio Estevam, Shawn Guo
The KSZ8021 PHY was previously caught by KS8051, which is not correct.
This PHY needs additional setup if it is strapped for address 0. In such
case an reserved bit must be written in the 0x16, "Operation Mode Strap
Override" register. According to the KS8051 datasheet, that bit means
"PHY Address 0 in non-broadcast" and it indeed behaves as such on KSZ8021.
The issue where the ethernet controller (Freescale FEC) did not communicate
with network is fixed by writing this bit as 1.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: David J. Choi <david.choi@micrel.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Shawn Guo <shawn.guo@linaro.org>
---
drivers/net/phy/micrel.c | 26 ++++++++++++++++++++++++++
include/linux/micrel_phy.h | 1 +
2 files changed, 27 insertions(+)
diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
index cf287e0..200fbc8 100644
--- a/drivers/net/phy/micrel.c
+++ b/drivers/net/phy/micrel.c
@@ -21,6 +21,12 @@
#include <linux/phy.h>
#include <linux/micrel_phy.h>
+/* Operation Mode Strap Override */
+#define MII_KSZPHY_OMSO 0x16
+#define KSZPHY_OMSO_B_CAST_OFF (1 << 9)
+#define KSZPHY_OMSO_RMII_OVERRIDE (1 << 1)
+#define KSZPHY_OMSO_MII_OVERRIDE (1 << 0)
+
/* general Interrupt control/status reg in vendor specific block. */
#define MII_KSZPHY_INTCS 0x1B
#define KSZPHY_INTCS_JABBER (1 << 15)
@@ -101,6 +107,13 @@ static int kszphy_config_init(struct phy_device *phydev)
return 0;
}
+static int ksz8021_config_init(struct phy_device *phydev)
+{
+ phy_write(phydev, MII_KSZPHY_OMSO,
+ KSZPHY_OMSO_B_CAST_OFF | KSZPHY_OMSO_RMII_OVERRIDE);
+ return 0;
+}
+
static int ks8051_config_init(struct phy_device *phydev)
{
int regval;
@@ -128,6 +141,19 @@ static struct phy_driver ksphy_driver[] = {
.config_intr = ks8737_config_intr,
.driver = { .owner = THIS_MODULE,},
}, {
+ .phy_id = PHY_ID_KSZ8021,
+ .phy_id_mask = 0x00ffffff,
+ .name = "Micrel KSZ8021",
+ .features = (PHY_BASIC_FEATURES | SUPPORTED_Pause
+ | SUPPORTED_Asym_Pause),
+ .flags = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT,
+ .config_init = ksz8021_config_init,
+ .config_aneg = genphy_config_aneg,
+ .read_status = genphy_read_status,
+ .ack_interrupt = kszphy_ack_interrupt,
+ .config_intr = kszphy_config_intr,
+ .driver = { .owner = THIS_MODULE,},
+}, {
.phy_id = PHY_ID_KS8041,
.phy_id_mask = 0x00fffff0,
.name = "Micrel KS8041",
diff --git a/include/linux/micrel_phy.h b/include/linux/micrel_phy.h
index 61f0905..be7f366 100644
--- a/include/linux/micrel_phy.h
+++ b/include/linux/micrel_phy.h
@@ -5,6 +5,7 @@
#define PHY_ID_KSZ9021 0x00221610
#define PHY_ID_KS8737 0x00221720
+#define PHY_ID_KSZ8021 0x00221555
#define PHY_ID_KS8041 0x00221510
#define PHY_ID_KS8051 0x00221550
/* both for ks8001 Rev. A/B, and for ks8721 Rev 3. */
--
1.7.10.4
^ permalink raw reply related
* [PATCH 2/3] phy/micrel: Rename KS80xx to KSZ80xx
From: Marek Vasut @ 2012-09-21 2:46 UTC (permalink / raw)
To: netdev
Cc: Marek Vasut, David J. Choi, David S. Miller, Nobuhiro Iwamatsu,
Linux ARM kernel, Fabio Estevam, Shawn Guo
In-Reply-To: <1348195598-29947-1-git-send-email-marex@denx.de>
There is no such part as KS8001, KS8041 or KS8051. There are only
KSZ8001, KSZ8041 and KSZ8051. Rename these parts as such to match
the Micrel naming.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: David J. Choi <david.choi@micrel.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Cc: Linux ARM kernel <linux-arm-kernel@lists.infradead.org>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Shawn Guo <shawn.guo@linaro.org>
---
arch/arm/mach-mxs/mach-mxs.c | 2 +-
drivers/net/phy/micrel.c | 18 +++++++++---------
include/linux/micrel_phy.h | 6 +++---
3 files changed, 13 insertions(+), 13 deletions(-)
NOTE: This affect one board in Linux ARM, but the change is
very minor it should not cause merge conflict, so if
this could go through net, that would be for the best.
diff --git a/arch/arm/mach-mxs/mach-mxs.c b/arch/arm/mach-mxs/mach-mxs.c
index 3f29a52..fc9c8d5 100644
--- a/arch/arm/mach-mxs/mach-mxs.c
+++ b/arch/arm/mach-mxs/mach-mxs.c
@@ -295,7 +295,7 @@ static void __init apx4devkit_init(void)
enable_clk_enet_out();
if (IS_BUILTIN(CONFIG_PHYLIB))
- phy_register_fixup_for_uid(PHY_ID_KS8051, MICREL_PHY_ID_MASK,
+ phy_register_fixup_for_uid(PHY_ID_KSZ8051, MICREL_PHY_ID_MASK,
apx4devkit_phy_fixup);
mxsfb_pdata.mode_list = apx4devkit_video_modes;
diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
index 200fbc8..f9c9146 100644
--- a/drivers/net/phy/micrel.c
+++ b/drivers/net/phy/micrel.c
@@ -154,9 +154,9 @@ static struct phy_driver ksphy_driver[] = {
.config_intr = kszphy_config_intr,
.driver = { .owner = THIS_MODULE,},
}, {
- .phy_id = PHY_ID_KS8041,
+ .phy_id = PHY_ID_KSZ8041,
.phy_id_mask = 0x00fffff0,
- .name = "Micrel KS8041",
+ .name = "Micrel KSZ8041",
.features = (PHY_BASIC_FEATURES | SUPPORTED_Pause
| SUPPORTED_Asym_Pause),
.flags = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT,
@@ -167,9 +167,9 @@ static struct phy_driver ksphy_driver[] = {
.config_intr = kszphy_config_intr,
.driver = { .owner = THIS_MODULE,},
}, {
- .phy_id = PHY_ID_KS8051,
+ .phy_id = PHY_ID_KSZ8051,
.phy_id_mask = 0x00fffff0,
- .name = "Micrel KS8051",
+ .name = "Micrel KSZ8051",
.features = (PHY_BASIC_FEATURES | SUPPORTED_Pause
| SUPPORTED_Asym_Pause),
.flags = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT,
@@ -180,8 +180,8 @@ static struct phy_driver ksphy_driver[] = {
.config_intr = kszphy_config_intr,
.driver = { .owner = THIS_MODULE,},
}, {
- .phy_id = PHY_ID_KS8001,
- .name = "Micrel KS8001 or KS8721",
+ .phy_id = PHY_ID_KSZ8001,
+ .name = "Micrel KSZ8001 or KS8721",
.phy_id_mask = 0x00ffffff,
.features = (PHY_BASIC_FEATURES | SUPPORTED_Pause),
.flags = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT,
@@ -227,10 +227,10 @@ MODULE_LICENSE("GPL");
static struct mdio_device_id __maybe_unused micrel_tbl[] = {
{ PHY_ID_KSZ9021, 0x000ffffe },
- { PHY_ID_KS8001, 0x00ffffff },
+ { PHY_ID_KSZ8001, 0x00ffffff },
{ PHY_ID_KS8737, 0x00fffff0 },
- { PHY_ID_KS8041, 0x00fffff0 },
- { PHY_ID_KS8051, 0x00fffff0 },
+ { PHY_ID_KSZ8041, 0x00fffff0 },
+ { PHY_ID_KSZ8051, 0x00fffff0 },
{ }
};
diff --git a/include/linux/micrel_phy.h b/include/linux/micrel_phy.h
index be7f366..d02355d 100644
--- a/include/linux/micrel_phy.h
+++ b/include/linux/micrel_phy.h
@@ -6,10 +6,10 @@
#define PHY_ID_KSZ9021 0x00221610
#define PHY_ID_KS8737 0x00221720
#define PHY_ID_KSZ8021 0x00221555
-#define PHY_ID_KS8041 0x00221510
-#define PHY_ID_KS8051 0x00221550
+#define PHY_ID_KSZ8041 0x00221510
+#define PHY_ID_KSZ8051 0x00221550
/* both for ks8001 Rev. A/B, and for ks8721 Rev 3. */
-#define PHY_ID_KS8001 0x0022161A
+#define PHY_ID_KSZ8001 0x0022161A
/* struct phy_device dev_flags definitions */
#define MICREL_PHY_50MHZ_CLK 0x00000001
--
1.7.10.4
^ permalink raw reply related
* [PATCH 3/3] phy/micrel: Add missing header to micrel_phy.h
From: Marek Vasut @ 2012-09-21 2:46 UTC (permalink / raw)
To: netdev
Cc: Marek Vasut, David J. Choi, David S. Miller, Nobuhiro Iwamatsu,
Fabio Estevam, Shawn Guo
In-Reply-To: <1348195598-29947-1-git-send-email-marex@denx.de>
The license header was missing in micrel_phy.h . This patch adds
one.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: David J. Choi <david.choi@micrel.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Shawn Guo <shawn.guo@linaro.org>
---
include/linux/micrel_phy.h | 12 ++++++++++++
1 file changed, 12 insertions(+)
NOTE: I'd like to have ACK on this from the original author of
the file, as this now says it's GPL2+.
diff --git a/include/linux/micrel_phy.h b/include/linux/micrel_phy.h
index d02355d..de20120 100644
--- a/include/linux/micrel_phy.h
+++ b/include/linux/micrel_phy.h
@@ -1,3 +1,15 @@
+/*
+ * include/linux/micrel_phy.h
+ *
+ * Micrel PHY IDs
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ */
+
#ifndef _MICREL_PHY_H
#define _MICREL_PHY_H
--
1.7.10.4
^ permalink raw reply related
* [PATCH 2/3 V2] phy/micrel: Rename KS80xx to KSZ80xx
From: Marek Vasut @ 2012-09-21 2:52 UTC (permalink / raw)
To: netdev
Cc: Marek Vasut, David J. Choi, David S. Miller, Nobuhiro Iwamatsu,
Linux ARM kernel, Fabio Estevam, Shawn Guo
In-Reply-To: <1348195976-31703-1-git-send-email-marex@denx.de>
There is no such part as KS8001, KS8041 or KS8051. There are only
KSZ8001, KSZ8041 and KSZ8051. Rename these parts as such to match
the Micrel naming.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: David J. Choi <david.choi@micrel.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Cc: Linux ARM kernel <linux-arm-kernel@lists.infradead.org>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Shawn Guo <shawn.guo@linaro.org>
---
arch/arm/mach-mxs/mach-mxs.c | 2 +-
drivers/net/phy/micrel.c | 18 +++++++++---------
include/linux/micrel_phy.h | 6 +++---
3 files changed, 13 insertions(+), 13 deletions(-)
V2: Rebase this on adjusted 1/3 patch
NOTE: This affect one board in Linux ARM, but the change is
very minor it should not cause merge conflict, so if
this could go through net, that would be for the best.
diff --git a/arch/arm/mach-mxs/mach-mxs.c b/arch/arm/mach-mxs/mach-mxs.c
index 3f29a52..fc9c8d5 100644
--- a/arch/arm/mach-mxs/mach-mxs.c
+++ b/arch/arm/mach-mxs/mach-mxs.c
@@ -295,7 +295,7 @@ static void __init apx4devkit_init(void)
enable_clk_enet_out();
if (IS_BUILTIN(CONFIG_PHYLIB))
- phy_register_fixup_for_uid(PHY_ID_KS8051, MICREL_PHY_ID_MASK,
+ phy_register_fixup_for_uid(PHY_ID_KSZ8051, MICREL_PHY_ID_MASK,
apx4devkit_phy_fixup);
mxsfb_pdata.mode_list = apx4devkit_video_modes;
diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
index b5723b9..ee3147d 100644
--- a/drivers/net/phy/micrel.c
+++ b/drivers/net/phy/micrel.c
@@ -154,9 +154,9 @@ static struct phy_driver ksphy_driver[] = {
.config_intr = kszphy_config_intr,
.driver = { .owner = THIS_MODULE,},
}, {
- .phy_id = PHY_ID_KS8041,
+ .phy_id = PHY_ID_KSZ8041,
.phy_id_mask = 0x00fffff0,
- .name = "Micrel KS8041",
+ .name = "Micrel KSZ8041",
.features = (PHY_BASIC_FEATURES | SUPPORTED_Pause
| SUPPORTED_Asym_Pause),
.flags = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT,
@@ -167,9 +167,9 @@ static struct phy_driver ksphy_driver[] = {
.config_intr = kszphy_config_intr,
.driver = { .owner = THIS_MODULE,},
}, {
- .phy_id = PHY_ID_KS8051,
+ .phy_id = PHY_ID_KSZ8051,
.phy_id_mask = 0x00fffff0,
- .name = "Micrel KS8051",
+ .name = "Micrel KSZ8051",
.features = (PHY_BASIC_FEATURES | SUPPORTED_Pause
| SUPPORTED_Asym_Pause),
.flags = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT,
@@ -180,8 +180,8 @@ static struct phy_driver ksphy_driver[] = {
.config_intr = kszphy_config_intr,
.driver = { .owner = THIS_MODULE,},
}, {
- .phy_id = PHY_ID_KS8001,
- .name = "Micrel KS8001 or KS8721",
+ .phy_id = PHY_ID_KSZ8001,
+ .name = "Micrel KSZ8001 or KS8721",
.phy_id_mask = 0x00ffffff,
.features = (PHY_BASIC_FEATURES | SUPPORTED_Pause),
.flags = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT,
@@ -227,11 +227,11 @@ MODULE_LICENSE("GPL");
static struct mdio_device_id __maybe_unused micrel_tbl[] = {
{ PHY_ID_KSZ9021, 0x000ffffe },
- { PHY_ID_KS8001, 0x00ffffff },
+ { PHY_ID_KSZ8001, 0x00ffffff },
{ PHY_ID_KS8737, 0x00fffff0 },
{ PHY_ID_KSZ8021, 0x00ffffff },
- { PHY_ID_KS8041, 0x00fffff0 },
- { PHY_ID_KS8051, 0x00fffff0 },
+ { PHY_ID_KSZ8041, 0x00fffff0 },
+ { PHY_ID_KSZ8051, 0x00fffff0 },
{ }
};
diff --git a/include/linux/micrel_phy.h b/include/linux/micrel_phy.h
index be7f366..d02355d 100644
--- a/include/linux/micrel_phy.h
+++ b/include/linux/micrel_phy.h
@@ -6,10 +6,10 @@
#define PHY_ID_KSZ9021 0x00221610
#define PHY_ID_KS8737 0x00221720
#define PHY_ID_KSZ8021 0x00221555
-#define PHY_ID_KS8041 0x00221510
-#define PHY_ID_KS8051 0x00221550
+#define PHY_ID_KSZ8041 0x00221510
+#define PHY_ID_KSZ8051 0x00221550
/* both for ks8001 Rev. A/B, and for ks8721 Rev 3. */
-#define PHY_ID_KS8001 0x0022161A
+#define PHY_ID_KSZ8001 0x0022161A
/* struct phy_device dev_flags definitions */
#define MICREL_PHY_50MHZ_CLK 0x00000001
--
1.7.10.4
^ permalink raw reply related
* [PATCH 1/3 V2] phy/micrel: Implement support for KSZ8021
From: Marek Vasut @ 2012-09-21 2:52 UTC (permalink / raw)
To: netdev
Cc: Marek Vasut, David J. Choi, David S. Miller, Nobuhiro Iwamatsu,
Fabio Estevam, Shawn Guo
The KSZ8021 PHY was previously caught by KS8051, which is not correct.
This PHY needs additional setup if it is strapped for address 0. In such
case an reserved bit must be written in the 0x16, "Operation Mode Strap
Override" register. According to the KS8051 datasheet, that bit means
"PHY Address 0 in non-broadcast" and it indeed behaves as such on KSZ8021.
The issue where the ethernet controller (Freescale FEC) did not communicate
with network is fixed by writing this bit as 1.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: David J. Choi <david.choi@micrel.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Shawn Guo <shawn.guo@linaro.org>
---
drivers/net/phy/micrel.c | 27 +++++++++++++++++++++++++++
include/linux/micrel_phy.h | 1 +
2 files changed, 28 insertions(+)
V2: Also add entry into micrel_tbl
diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
index cf287e0..b5723b9 100644
--- a/drivers/net/phy/micrel.c
+++ b/drivers/net/phy/micrel.c
@@ -21,6 +21,12 @@
#include <linux/phy.h>
#include <linux/micrel_phy.h>
+/* Operation Mode Strap Override */
+#define MII_KSZPHY_OMSO 0x16
+#define KSZPHY_OMSO_B_CAST_OFF (1 << 9)
+#define KSZPHY_OMSO_RMII_OVERRIDE (1 << 1)
+#define KSZPHY_OMSO_MII_OVERRIDE (1 << 0)
+
/* general Interrupt control/status reg in vendor specific block. */
#define MII_KSZPHY_INTCS 0x1B
#define KSZPHY_INTCS_JABBER (1 << 15)
@@ -101,6 +107,13 @@ static int kszphy_config_init(struct phy_device *phydev)
return 0;
}
+static int ksz8021_config_init(struct phy_device *phydev)
+{
+ phy_write(phydev, MII_KSZPHY_OMSO,
+ KSZPHY_OMSO_B_CAST_OFF | KSZPHY_OMSO_RMII_OVERRIDE);
+ return 0;
+}
+
static int ks8051_config_init(struct phy_device *phydev)
{
int regval;
@@ -128,6 +141,19 @@ static struct phy_driver ksphy_driver[] = {
.config_intr = ks8737_config_intr,
.driver = { .owner = THIS_MODULE,},
}, {
+ .phy_id = PHY_ID_KSZ8021,
+ .phy_id_mask = 0x00ffffff,
+ .name = "Micrel KSZ8021",
+ .features = (PHY_BASIC_FEATURES | SUPPORTED_Pause
+ | SUPPORTED_Asym_Pause),
+ .flags = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT,
+ .config_init = ksz8021_config_init,
+ .config_aneg = genphy_config_aneg,
+ .read_status = genphy_read_status,
+ .ack_interrupt = kszphy_ack_interrupt,
+ .config_intr = kszphy_config_intr,
+ .driver = { .owner = THIS_MODULE,},
+}, {
.phy_id = PHY_ID_KS8041,
.phy_id_mask = 0x00fffff0,
.name = "Micrel KS8041",
@@ -203,6 +229,7 @@ static struct mdio_device_id __maybe_unused micrel_tbl[] = {
{ PHY_ID_KSZ9021, 0x000ffffe },
{ PHY_ID_KS8001, 0x00ffffff },
{ PHY_ID_KS8737, 0x00fffff0 },
+ { PHY_ID_KSZ8021, 0x00ffffff },
{ PHY_ID_KS8041, 0x00fffff0 },
{ PHY_ID_KS8051, 0x00fffff0 },
{ }
diff --git a/include/linux/micrel_phy.h b/include/linux/micrel_phy.h
index 61f0905..be7f366 100644
--- a/include/linux/micrel_phy.h
+++ b/include/linux/micrel_phy.h
@@ -5,6 +5,7 @@
#define PHY_ID_KSZ9021 0x00221610
#define PHY_ID_KS8737 0x00221720
+#define PHY_ID_KSZ8021 0x00221555
#define PHY_ID_KS8041 0x00221510
#define PHY_ID_KS8051 0x00221550
/* both for ks8001 Rev. A/B, and for ks8721 Rev 3. */
--
1.7.10.4
^ permalink raw reply related
* [PATCH 3/3 RESEND] phy/micrel: Add missing header to micrel_phy.h
From: Marek Vasut @ 2012-09-21 2:52 UTC (permalink / raw)
To: netdev
Cc: Marek Vasut, David J. Choi, David S. Miller, Nobuhiro Iwamatsu,
Fabio Estevam, Shawn Guo
In-Reply-To: <1348195976-31703-1-git-send-email-marex@denx.de>
The license header was missing in micrel_phy.h . This patch adds
one.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: David J. Choi <david.choi@micrel.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Shawn Guo <shawn.guo@linaro.org>
---
include/linux/micrel_phy.h | 12 ++++++++++++
1 file changed, 12 insertions(+)
NOTE: I'd like to have ACK on this from the original author of
the file, as this now says it's GPL2+.
diff --git a/include/linux/micrel_phy.h b/include/linux/micrel_phy.h
index d02355d..de20120 100644
--- a/include/linux/micrel_phy.h
+++ b/include/linux/micrel_phy.h
@@ -1,3 +1,15 @@
+/*
+ * include/linux/micrel_phy.h
+ *
+ * Micrel PHY IDs
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ */
+
#ifndef _MICREL_PHY_H
#define _MICREL_PHY_H
--
1.7.10.4
^ permalink raw reply related
* [PATCH] ipv6: fix return value check in fib6_add()
From: Wei Yongjun @ 2012-09-21 4:29 UTC (permalink / raw)
To: davem, kuznet, jmorris, yoshfuji, kaber; +Cc: yongjun_wei, netdev
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
In case of error, the function fib6_add_1() returns ERR_PTR()
or NULL pointer. The ERR_PTR() case check is missing in fib6_add().
dpatch engine is used to generated this patch.
(https://github.com/weiyj/dpatch)
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
net/ipv6/ip6_fib.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c
index 13690d6..286acfc 100644
--- a/net/ipv6/ip6_fib.c
+++ b/net/ipv6/ip6_fib.c
@@ -819,6 +819,10 @@ int fib6_add(struct fib6_node *root, struct rt6_info *rt, struct nl_info *info)
offsetof(struct rt6_info, rt6i_src),
allow_create, replace_required);
+ if (IS_ERR(sn)) {
+ err = PTR_ERR(sn);
+ sn = NULL;
+ }
if (!sn) {
/* If it is failed, discard just allocated
root, and then (in st_failure) stale node
^ permalink raw reply related
* [PATCH 0/1] for 3.6 - fix gianfar build failure
From: Richard Cochran @ 2012-09-21 5:11 UTC (permalink / raw)
To: netdev; +Cc: David Miller
The gianfar ethtool time stamping change doesn't even build. This
should really get fixed for 3.6 if at all possible.
Thanks,
Richard
Richard Cochran (1):
gianfar: fix phc index build failure
drivers/net/ethernet/freescale/gianfar_ethtool.c | 1 +
drivers/net/ethernet/freescale/gianfar_ptp.c | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
--
1.7.2.5
^ permalink raw reply
* [PATCH 1/1] gianfar: fix phc index build failure
From: Richard Cochran @ 2012-09-21 5:11 UTC (permalink / raw)
To: netdev; +Cc: David Miller, stable
In-Reply-To: <cover.1348203988.git.richardcochran@gmail.com>
This patch fixes a build failure introduced in commit 66636287. Not only
was a global variable inconsistently named, but also it was not exported
as it should have been.
This fix is also needed in stable version 3.5.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Cc: <stable@vger.kernel.org>
---
drivers/net/ethernet/freescale/gianfar_ethtool.c | 1 +
drivers/net/ethernet/freescale/gianfar_ptp.c | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/freescale/gianfar_ethtool.c b/drivers/net/ethernet/freescale/gianfar_ethtool.c
index 8971921..ab6762c 100644
--- a/drivers/net/ethernet/freescale/gianfar_ethtool.c
+++ b/drivers/net/ethernet/freescale/gianfar_ethtool.c
@@ -1773,6 +1773,7 @@ static int gfar_get_nfc(struct net_device *dev, struct ethtool_rxnfc *cmd,
}
int gfar_phc_index = -1;
+EXPORT_SYMBOL(gfar_phc_index);
static int gfar_get_ts_info(struct net_device *dev,
struct ethtool_ts_info *info)
diff --git a/drivers/net/ethernet/freescale/gianfar_ptp.c b/drivers/net/ethernet/freescale/gianfar_ptp.c
index c08e5d4..0daa66b 100644
--- a/drivers/net/ethernet/freescale/gianfar_ptp.c
+++ b/drivers/net/ethernet/freescale/gianfar_ptp.c
@@ -515,7 +515,7 @@ static int gianfar_ptp_probe(struct platform_device *dev)
err = PTR_ERR(etsects->clock);
goto no_clock;
}
- gfar_phc_clock = ptp_clock_index(etsects->clock);
+ gfar_phc_index = ptp_clock_index(etsects->clock);
dev_set_drvdata(&dev->dev, etsects);
@@ -539,7 +539,7 @@ static int gianfar_ptp_remove(struct platform_device *dev)
gfar_write(&etsects->regs->tmr_temask, 0);
gfar_write(&etsects->regs->tmr_ctrl, 0);
- gfar_phc_clock = -1;
+ gfar_phc_index = -1;
ptp_clock_unregister(etsects->clock);
iounmap(etsects->regs);
release_resource(etsects->rsrc);
--
1.7.2.5
^ permalink raw reply related
* Re: [PATCH 0/6] xfrm_user info leaks
From: Mathias Krause @ 2012-09-21 5:37 UTC (permalink / raw)
To: David Miller; +Cc: steffen.klassert, netdev, linux-kernel
In-Reply-To: <20120920.180949.2287169159603922703.davem@davemloft.net>
On Fri, Sep 21, 2012 at 12:09 AM, David Miller <davem@davemloft.net> wrote:
> From: Mathias Krause <minipli@googlemail.com>
> Date: Wed, 19 Sep 2012 23:33:37 +0200
>
>> the following series fixes various info leaks in the xfrm netlink
>> interface. As always, a test case can be supplied on request.
>>
>> Patches 1 to 5 are probably material for stable, too. Patch 6 is just a
>> minor optimization I stumbled across while auditing the code.
>>
>> Please apply!
>
> All applied, and I made sure to use v3 of patch #5 (which you marked
> as 5/7 instead of 5/6 :-)
Sorry for the confusion. Looks like I've to learn a few more git
tricks, so this won't happen again ;)
> Also, these have been queued up for -stable as well.
Thanks!
^ permalink raw reply
* Re: New commands to configure IOV features
From: Yinghai Lu @ 2012-09-21 5:50 UTC (permalink / raw)
To: Rose, Gregory V
Cc: Ben Hutchings, Bjorn Helgaas, Yuval Mintz, davem@davemloft.net,
netdev@vger.kernel.org, Ariel Elior, Eilon Greenstein, linux-pci
In-Reply-To: <C5551D9AAB213A418B7FD5E4A6F30A07152FA5F6@ORSMSX106.amr.corp.intel.com>
[-- Attachment #1: Type: text/plain, Size: 486 bytes --]
On Thu, Sep 20, 2012 at 8:39 AM, Rose, Gregory V
<gregory.v.rose@intel.com> wrote:
>> -----Original Message-----
>> From: Ben Hutchings [mailto:bhutchings@solarflare.com]
>> >
>> > could just stop the device and add it back again?
>>
>> This is highly disruptive and I think it would be totally unacceptable for
>> at least networking devices.
>
> Agreed.
>
> We need the driver callback.
ok, something like attached patches?
ixgbe change need more cleanup from ixgbe guys.
-Yinghai
[-- Attachment #2: pci_dev_type.patch --]
[-- Type: application/octet-stream, Size: 2044 bytes --]
Subject: [PATCH] PCI: Add pci_dev_type
later use it for visiable attribute control.
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
---
drivers/pci/pci-sysfs.c | 24 ++++++++++++++++++++++++
drivers/pci/pci.h | 1 +
drivers/pci/probe.c | 1 +
3 files changed, 26 insertions(+)
Index: linux-2.6/drivers/pci/pci-sysfs.c
===================================================================
--- linux-2.6.orig/drivers/pci/pci-sysfs.c
+++ linux-2.6/drivers/pci/pci-sysfs.c
@@ -1412,3 +1412,27 @@ static int __init pci_sysfs_init(void)
}
late_initcall(pci_sysfs_init);
+
+static struct attribute *pci_dev_dev_attrs[] = {
+ NULL,
+};
+
+static umode_t pci_dev_attrs_are_visible(struct kobject *kobj,
+ struct attribute *a, int n)
+{
+ return a->mode;
+}
+
+static struct attribute_group pci_dev_attr_group = {
+ .attrs = pci_dev_dev_attrs,
+ .is_visible = pci_dev_attrs_are_visible,
+};
+
+static const struct attribute_group *pci_dev_attr_groups[] = {
+ &pci_dev_attr_group,
+ NULL,
+};
+
+struct device_type pci_dev_type = {
+ .groups = pci_dev_attr_groups,
+};
Index: linux-2.6/drivers/pci/pci.h
===================================================================
--- linux-2.6.orig/drivers/pci/pci.h
+++ linux-2.6/drivers/pci/pci.h
@@ -158,6 +158,7 @@ static inline int pci_no_d1d2(struct pci
}
extern struct device_attribute pci_dev_attrs[];
extern struct device_attribute pcibus_dev_attrs[];
+extern struct device_type pci_dev_type;
#ifdef CONFIG_HOTPLUG
extern struct bus_attribute pci_bus_attrs[];
#else
Index: linux-2.6/drivers/pci/probe.c
===================================================================
--- linux-2.6.orig/drivers/pci/probe.c
+++ linux-2.6/drivers/pci/probe.c
@@ -1277,6 +1277,7 @@ int pci_setup_device(struct pci_dev *dev
dev->sysdata = dev->bus->sysdata;
dev->dev.parent = dev->bus->bridge;
dev->dev.bus = &pci_bus_type;
+ dev->dev.type = &pci_dev_type;
dev->hdr_type = hdr_type & 0x7f;
dev->multifunction = !!(hdr_type & 0x80);
dev->error_state = pci_channel_io_normal;
[-- Attachment #3: pci_010_pci_dev_boot_vga_x.patch --]
[-- Type: application/octet-stream, Size: 1868 bytes --]
Subject: [PATCH 10/10] PCI, sys: Use is_visable() with boot_vga attribute for pci_dev
That could let pci_create_sysfs_dev_files more simple.
also fix possible fix memleak during removing path.
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
---
drivers/pci/pci-sysfs.c | 21 ++++++++++-----------
1 file changed, 10 insertions(+), 11 deletions(-)
Index: linux-2.6/drivers/pci/pci-sysfs.c
===================================================================
--- linux-2.6.orig/drivers/pci/pci-sysfs.c
+++ linux-2.6/drivers/pci/pci-sysfs.c
@@ -1304,29 +1304,20 @@ int __must_check pci_create_sysfs_dev_fi
pdev->rom_attr = attr;
}
- if ((pdev->class >> 8) == PCI_CLASS_DISPLAY_VGA) {
- retval = device_create_file(&pdev->dev, &vga_attr);
- if (retval)
- goto err_rom_file;
- }
-
/* add platform-specific attributes */
retval = pcibios_add_platform_entries(pdev);
if (retval)
- goto err_vga_file;
+ goto err_rom_file;
/* add sysfs entries for various capabilities */
retval = pci_create_capabilities_sysfs(pdev);
if (retval)
- goto err_vga_file;
+ goto err_rom_file;
pci_create_firmware_label_files(pdev);
return 0;
-err_vga_file:
- if ((pdev->class >> 8) == PCI_CLASS_DISPLAY_VGA)
- device_remove_file(&pdev->dev, &vga_attr);
err_rom_file:
if (rom_size) {
sysfs_remove_bin_file(&pdev->dev.kobj, pdev->rom_attr);
@@ -1414,12 +1405,20 @@ static int __init pci_sysfs_init(void)
late_initcall(pci_sysfs_init);
static struct attribute *pci_dev_dev_attrs[] = {
+ &vga_attr.attr,
NULL,
};
static umode_t pci_dev_attrs_are_visible(struct kobject *kobj,
struct attribute *a, int n)
{
+ struct device *dev = container_of(kobj, struct device, kobj);
+ struct pci_dev *pdev = to_pci_dev(dev);
+
+ if (a == &vga_attr.attr)
+ if ((pdev->class >> 8) != PCI_CLASS_DISPLAY_VGA)
+ return 0;
+
return a->mode;
}
[-- Attachment #4: pci_drv_set_max_vfs.patch --]
[-- Type: application/octet-stream, Size: 830 bytes --]
---
include/linux/pci.h | 1 +
1 file changed, 1 insertion(+)
Index: linux-2.6/include/linux/pci.h
===================================================================
--- linux-2.6.orig/include/linux/pci.h
+++ linux-2.6/include/linux/pci.h
@@ -663,6 +663,7 @@ struct pci_driver {
const struct pci_device_id *id_table; /* must be non-NULL for probe to be called */
int (*probe) (struct pci_dev *dev, const struct pci_device_id *id); /* New device inserted */
void (*remove) (struct pci_dev *dev); /* Device removed (NULL if not a hot-plug capable driver) */
+ void (*set_max_vfs) (struct pci_dev *dev); /* enable sriov */
int (*suspend) (struct pci_dev *dev, pm_message_t state); /* Device suspended */
int (*suspend_late) (struct pci_dev *dev, pm_message_t state);
int (*resume_early) (struct pci_dev *dev);
[-- Attachment #5: sriov_xxx.patch --]
[-- Type: application/octet-stream, Size: 2657 bytes --]
Subject: [PATCH] PCI: Add max_vfs in sysfs per pci device where supports
driver later need to check dev->max_vfs in /sys
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
---
drivers/pci/pci-sysfs.c | 53 ++++++++++++++++++++++++++++++++++++++++++++++++
include/linux/pci.h | 1
2 files changed, 54 insertions(+)
Index: linux-2.6/drivers/pci/pci-sysfs.c
===================================================================
--- linux-2.6.orig/drivers/pci/pci-sysfs.c
+++ linux-2.6/drivers/pci/pci-sysfs.c
@@ -459,6 +459,54 @@ boot_vga_show(struct device *dev, struct
}
struct device_attribute vga_attr = __ATTR_RO(boot_vga);
+static ssize_t
+max_vfs_show(struct device *dev, struct device_attribute *attr, char *buf)
+{
+ struct pci_dev *pdev = to_pci_dev(dev);
+
+ return sprintf(buf, "%u\n", pdev->max_vfs);
+}
+
+static void max_vfs_callback(struct device *dev)
+{
+ struct pci_dev *pdev = to_pci_dev(dev);
+
+ mutex_lock(&pci_remove_rescan_mutex);
+ if (pdev->is_added && dev->driver){
+ struct pci_driver *pdrv;
+
+ pdrv = to_pci_driver(dev->driver);
+ if (pdrv->set_max_vfs)
+ pdrv->set_max_vfs(pdev);
+
+ }
+ mutex_unlock(&pci_remove_rescan_mutex);
+}
+static ssize_t
+max_vfs_store(struct device *dev, struct device_attribute *attr,
+ const char *buf, size_t count)
+{
+ unsigned long val;
+ struct pci_dev *pdev = to_pci_dev(dev);
+
+ if (strict_strtoul(buf, 0, &val) < 0)
+ return -EINVAL;
+
+ pdev->max_vfs = val;
+
+ if (pdev->is_added) {
+ int err;
+ err = device_schedule_callback(dev, max_vfs_callback);
+
+ if (err)
+ return err;
+ }
+
+ return count;
+}
+struct device_attribute max_vfs_attr =
+ __ATTR(max_vfs, 0644, max_vfs_show, max_vfs_store);
+
static void
pci_config_pm_runtime_get(struct pci_dev *pdev)
{
@@ -1406,6 +1454,7 @@ late_initcall(pci_sysfs_init);
static struct attribute *pci_dev_dev_attrs[] = {
&vga_attr.attr,
+ &max_vfs_attr.attr,
NULL,
};
@@ -1419,6 +1468,10 @@ static umode_t pci_dev_attrs_are_visible
if ((pdev->class >> 8) != PCI_CLASS_DISPLAY_VGA)
return 0;
+ if (a == &max_vfs_attr.attr)
+ if (!pdev->is_physfn)
+ return 0;
+
return a->mode;
}
Index: linux-2.6/include/linux/pci.h
===================================================================
--- linux-2.6.orig/include/linux/pci.h
+++ linux-2.6/include/linux/pci.h
@@ -359,6 +359,7 @@ struct pci_dev {
unsigned int broken_intx_masking:1;
unsigned int io_window_1k:1; /* Intel P2P bridge 1K I/O windows */
pci_dev_flags_t dev_flags;
+ unsigned int max_vfs;
atomic_t enable_cnt; /* pci_enable_device has been called */
u32 saved_config_space[16]; /* config space saved at suspend time */
[-- Attachment #6: ixgbe_max_vfs.patch --]
[-- Type: application/octet-stream, Size: 3087 bytes --]
---
drivers/net/ethernet/intel/ixgbe/ixgbe.h | 2 +
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 43 ++++++++++++++++++++------
2 files changed, 36 insertions(+), 9 deletions(-)
Index: linux-2.6/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
===================================================================
--- linux-2.6.orig/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ linux-2.6/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -129,13 +129,6 @@ static struct notifier_block dca_notifie
};
#endif
-#ifdef CONFIG_PCI_IOV
-static unsigned int max_vfs;
-module_param(max_vfs, uint, 0);
-MODULE_PARM_DESC(max_vfs,
- "Maximum number of virtual functions to allocate per physical function - default is zero and maximum value is 63");
-#endif /* CONFIG_PCI_IOV */
-
static unsigned int allow_unsupported_sfp;
module_param(allow_unsupported_sfp, uint, 0);
MODULE_PARM_DESC(allow_unsupported_sfp,
@@ -4528,7 +4521,7 @@ static int __devinit ixgbe_sw_init(struc
#ifdef CONFIG_PCI_IOV
/* assign number of SR-IOV VFs */
if (hw->mac.type != ixgbe_mac_82598EB)
- adapter->num_vfs = (max_vfs > 63) ? 0 : max_vfs;
+ adapter->num_vfs = (pdev->max_vfs > 63) ? 0 : pdev->max_vfs;
#endif
/* enable itr by default in dynamic mode */
@@ -7249,8 +7242,9 @@ static int __devinit ixgbe_probe(struct
#ifdef CONFIG_PCI_IOV
ixgbe_enable_sriov(adapter, ii);
-
#endif
+ adapter->ixgbe_info = ii;
+
netdev->features = NETIF_F_SG |
NETIF_F_IP_CSUM |
NETIF_F_IPV6_CSUM |
@@ -7720,11 +7714,42 @@ static const struct pci_error_handlers i
.resume = ixgbe_io_resume,
};
+static void ixgbe_set_max_vfs(struct pci_dev *pdev)
+{
+#ifdef CONFIG_PCI_IOV
+ struct ixgbe_adapter *adapter = pci_get_drvdata(pdev);
+ struct net_device *netdev = adapter->netdev;
+ struct ixgbe_hw *hw = &adapter->hw;
+ int num_vfs = 0;
+
+ /* assign number of SR-IOV VFs */
+ if (hw->mac.type != ixgbe_mac_82598EB)
+ num_vfs = (pdev->max_vfs > 63) ? 0 : pdev->max_vfs;
+
+ /* no change */
+ if (adapter->num_vfs == num_vfs)
+ return;
+
+ if (!num_vfs) {
+ /* disable sriov */
+ ixgbe_disable_sriov(adapter);
+ adapter->num_vfs = 0;
+ } else if (!adapter->num_vfs && num_vfs) {
+ /* enable sriov */
+ adapter->num_vfs = num_vfs;
+ ixgbe_enable_sriov(adapter, adapter->ixgbe_info);
+ } else {
+ /* increase or decrease */
+ }
+#endif
+}
+
static struct pci_driver ixgbe_driver = {
.name = ixgbe_driver_name,
.id_table = ixgbe_pci_tbl,
.probe = ixgbe_probe,
.remove = __devexit_p(ixgbe_remove),
+ .set_max_vfs = ixgbe_set_max_vfs,
#ifdef CONFIG_PM
.suspend = ixgbe_suspend,
.resume = ixgbe_resume,
Index: linux-2.6/drivers/net/ethernet/intel/ixgbe/ixgbe.h
===================================================================
--- linux-2.6.orig/drivers/net/ethernet/intel/ixgbe/ixgbe.h
+++ linux-2.6/drivers/net/ethernet/intel/ixgbe/ixgbe.h
@@ -571,6 +571,8 @@ struct ixgbe_adapter {
u32 interrupt_event;
u32 led_reg;
+ struct ixgbe_info *ixgbe_info;
+
#ifdef CONFIG_IXGBE_PTP
struct ptp_clock *ptp_clock;
struct ptp_clock_info ptp_caps;
^ permalink raw reply
* Re: bnx2x: link detected up at startup even when it should be down
From: Jean-Michel Hautbois @ 2012-09-21 6:03 UTC (permalink / raw)
To: Dmitry Kravkov
Cc: netdev, Barak Witkowski, Eilon Greenstein, davem@davemloft.net
In-Reply-To: <504C9EFCA2D0054393414C9CB605C37F2EB97C@SJEXCHMB06.corp.ad.broadcom.com>
Hi Dmitry,
2012/9/20 Dmitry Kravkov <dmitry@broadcom.com>:
>> -----Original Message-----
>> From: netdev-owner@vger.kernel.org [mailto:netdev-owner@vger.kernel.org]
>> On Behalf Of Jean-Michel Hautbois
>> Sent: Thursday, September 20, 2012 6:39 PM
>> To: netdev
>> Cc: Barak Witkowski; Eilon Greenstein; davem@davemloft.net
>> Subject: bnx2x: link detected up at startup even when it should be down
>>
>> Hi all,
>>
>> I am working with a HP blade which has a bnx2x based card (Broadcom
>> NetXtreme II BCM57810 10 Gigabit Ethernet).
>> I am using a 3.2 linux kernel, which works very well except on
>> detecting the link state at startup.
>> I have my ethernet interfaces linked with a bond, and I want to
>> configure it for HA (in miimon mode).
>> I am using a managed switch which helps me in disabling/enabling ports.
>>
>> When the port is disabled, at startup, the link is detected "UP".
>> When I enable the port, it is still "UP", and when I disable it again,
>> then it is detected "DOWN".
>>
>> I have tried the latest 3.6-rc6 kernel, and it works well (link is
>> "DOWN" at startup when port is disabled).
>> Then I bisected it, and I found out that the commit which makes it
>> working (yes, it is an inverse bisect, thanks to this powerful git
>> tool :)) is :
>>
>> a334872224a67b614dc888460377862621f3dac7 is the first bad commit
>> commit a334872224a67b614dc888460377862621f3dac7
>> Author: Barak Witkowski <barak@broadcom.com>
>> Date: Mon Apr 23 03:04:46 2012 +0000
>>
>> bnx2x: add afex support
>>
>> Following patch adds afex multifunction support to the driver (afex
>> multifunction is based on vntag header) and updates FW version
>> used to 7.2.51.
>>
>> Support includes the following:
>>
>> 1. Configure vif parameters in firmware (default vlan, vif id, default
>> priority, allowed priorities) according to values received from NIC.
>> 2. Configure FW to strip/add default vlan according to afex vlan mode.
>> 3. Notify link up to OS only after vif is fully initialized.
>> 4. Support vif list set/get requests and configure FW accordingly.
>> 5. Supply afex statistics upon request from NIC.
>> 6. Special handling to L2 interface in case of FCoE vif.
>>
>> Signed-off-by: Barak Witkowski <barak@broadcom.com>
>> Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
>> Signed-off-by: David S. Miller <davem@davemloft.net>
>>
>> This commit is present in the 3.5.y stable branch, but not the 3.2.y one.
>> Is there a workaround which would make this feature work correctly
>> even on older kernels ?
>> It does not seem to be trivial, but I may miss something as this
>> driver is pretty big...
>
> Jean,
> I have passed over the patch, but was unable to catch link related change out of the
> AFEX flow. We will get closer look asap in out lab (guys are out for the weekend already)
>
> Can you double check bisect result for me, pls?
>
> Thanks
I already did it twice. I think this is FW related and not only the
commit adding afex support. It may have solved a link issue (I am just
guessing, based on experiments) ?
JM
^ permalink raw reply
* [Patch net-next v2] l2tp: fix compile error when CONFIG_IPV6=m and CONFIG_L2TP=y
From: Cong Wang @ 2012-09-21 6:36 UTC (permalink / raw)
To: netdev; +Cc: David Miller, Cong Wang
When CONFIG_IPV6=m and CONFIG_L2TP=y, I got the following compile error:
LD init/built-in.o
net/built-in.o: In function `l2tp_xmit_core':
l2tp_core.c:(.text+0x147781): undefined reference to `inet6_csk_xmit'
net/built-in.o: In function `l2tp_tunnel_create':
(.text+0x149067): undefined reference to `udpv6_encap_enable'
net/built-in.o: In function `l2tp_ip6_recvmsg':
l2tp_ip6.c:(.text+0x14e991): undefined reference to `ipv6_recv_error'
net/built-in.o: In function `l2tp_ip6_sendmsg':
l2tp_ip6.c:(.text+0x14ec64): undefined reference to `fl6_sock_lookup'
l2tp_ip6.c:(.text+0x14ed6b): undefined reference to `datagram_send_ctl'
l2tp_ip6.c:(.text+0x14eda0): undefined reference to `fl6_sock_lookup'
l2tp_ip6.c:(.text+0x14ede5): undefined reference to `fl6_merge_options'
l2tp_ip6.c:(.text+0x14edf4): undefined reference to `ipv6_fixup_options'
l2tp_ip6.c:(.text+0x14ee5d): undefined reference to `fl6_update_dst'
l2tp_ip6.c:(.text+0x14eea3): undefined reference to `ip6_dst_lookup_flow'
l2tp_ip6.c:(.text+0x14eee7): undefined reference to `ip6_dst_hoplimit'
l2tp_ip6.c:(.text+0x14ef8b): undefined reference to `ip6_append_data'
l2tp_ip6.c:(.text+0x14ef9d): undefined reference to `ip6_flush_pending_frames'
l2tp_ip6.c:(.text+0x14efe2): undefined reference to `ip6_push_pending_frames'
net/built-in.o: In function `l2tp_ip6_destroy_sock':
l2tp_ip6.c:(.text+0x14f090): undefined reference to `ip6_flush_pending_frames'
l2tp_ip6.c:(.text+0x14f0a0): undefined reference to `inet6_destroy_sock'
net/built-in.o: In function `l2tp_ip6_connect':
l2tp_ip6.c:(.text+0x14f14d): undefined reference to `ip6_datagram_connect'
net/built-in.o: In function `l2tp_ip6_bind':
l2tp_ip6.c:(.text+0x14f4fe): undefined reference to `ipv6_chk_addr'
net/built-in.o: In function `l2tp_ip6_init':
l2tp_ip6.c:(.init.text+0x73fa): undefined reference to `inet6_add_protocol'
l2tp_ip6.c:(.init.text+0x740c): undefined reference to `inet6_register_protosw'
net/built-in.o: In function `l2tp_ip6_exit':
l2tp_ip6.c:(.exit.text+0x1954): undefined reference to `inet6_unregister_protosw'
l2tp_ip6.c:(.exit.text+0x1965): undefined reference to `inet6_del_protocol'
net/built-in.o:(.rodata+0xf2d0): undefined reference to `inet6_release'
net/built-in.o:(.rodata+0xf2d8): undefined reference to `inet6_bind'
net/built-in.o:(.rodata+0xf308): undefined reference to `inet6_ioctl'
net/built-in.o:(.data+0x1af40): undefined reference to `ipv6_setsockopt'
net/built-in.o:(.data+0x1af48): undefined reference to `ipv6_getsockopt'
net/built-in.o:(.data+0x1af50): undefined reference to `compat_ipv6_setsockopt'
net/built-in.o:(.data+0x1af58): undefined reference to `compat_ipv6_getsockopt'
make: *** [vmlinux] Error 1
This is due to l2tp uses symbols from IPV6, so when IPV6
is a module, l2tp is not allowed to be builtin.
Cc: David Miller <davem@davemloft.net>
Signed-off-by: Cong Wang <amwang@redhat.com>
---
diff --git a/net/l2tp/Kconfig b/net/l2tp/Kconfig
index 4b1e717..147a8fd 100644
--- a/net/l2tp/Kconfig
+++ b/net/l2tp/Kconfig
@@ -4,6 +4,7 @@
menuconfig L2TP
tristate "Layer Two Tunneling Protocol (L2TP)"
+ depends on (IPV6 || IPV6=n)
depends on INET
---help---
Layer Two Tunneling Protocol
^ permalink raw reply related
* [PATCH] stmmac: fix return value check in stmmac_open_ext_timer()
From: Wei Yongjun @ 2012-09-21 7:06 UTC (permalink / raw)
To: peppe.cavallaro; +Cc: yongjun_wei, netdev
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
In case of error, the function clk_get() returns ERR_PTR()
and never returns NULL pointer. The NULL test in the error
handling should be replaced with IS_ERR().
dpatch engine is used to auto generated this patch.
(https://github.com/weiyj/dpatch)
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
drivers/net/ethernet/stmicro/stmmac/stmmac_timer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_timer.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_timer.c
index 2a0e1ab..197fb8c 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_timer.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_timer.c
@@ -109,7 +109,7 @@ int stmmac_open_ext_timer(struct net_device *dev, struct stmmac_timer *tm)
{
timer_clock = clk_get(NULL, TMU_CHANNEL);
- if (timer_clock == NULL)
+ if (IS_ERR(timer_clock))
return -1;
if (tmu2_register_user(stmmac_timer_handler, (void *)dev) < 0) {
^ 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