* Re: [PATCH] usbnet: sanitise overlong driver information strings
From: David Miller @ 2012-06-17 23:20 UTC (permalink / raw)
To: phil.sutter; +Cc: netdev
In-Reply-To: <1339672722-22793-1-git-send-email-phil.sutter@viprinet.com>
From: Phil Sutter <phil.sutter@viprinet.com>
Date: Thu, 14 Jun 2012 13:18:42 +0200
> As seen on smsc75xx, driver_info->description being longer than 32
> characters messes up 'ethtool -i' output.
>
> Signed-off-by: Phil Sutter <phil.sutter@viprinet.com>
Applied.
^ permalink raw reply
* Re: [PATCH 0/3] be2net: patches fix max gso size, modify driver log info and stats struct.
From: David Miller @ 2012-06-17 23:19 UTC (permalink / raw)
To: sarveshwar.bandi; +Cc: netdev
In-Reply-To: <8b01e121-64f5-4a7a-ace5-2f811b097a8d@exht1.ad.emulex.com>
From: <sarveshwar.bandi@emulex.com>
Date: Thu, 14 Jun 2012 11:21:42 +0530
> Please apply these patches. Thanks.
You've been doing this long enough to know that you can't just
say "apply these patches", you also need to tell me which tree
you want them applied to.
Since they are fixes, I assumed 'net' and applied them there,
but next time I'm simply going to drop your patches entirely
if you can't be bothered to tell me where they belong.
Thanks.
^ permalink raw reply
* Re: [net-next PATCH] bnx2x: correct LPI pass-through configuration
From: David Miller @ 2012-06-17 23:17 UTC (permalink / raw)
To: yuvalmin; +Cc: netdev, dan.carpenter, eilong, yaniv.rosner
In-Reply-To: <1339934690-28191-1-git-send-email-yuvalmin@broadcom.com>
From: "Yuval Mintz" <yuvalmin@broadcom.com>
Date: Sun, 17 Jun 2012 15:04:50 +0300
> Commit c8c60d88c59cbb48737732ba948663a3efe882aa contained
> an incorrect logic which enabled a buffer overflow when accessing
> an array during LPI pass-through configuration.
> This patch fixes this issue by removing that logic altogether.
>
> Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
> Signed-off-by: Yaniv Rosner <yaniv.rosner@broadcom.com>
> Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Applied.
^ permalink raw reply
* Re: [net] ixgbe: Fix PHC loophole allowing misconfiguration of increment register
From: David Miller @ 2012-06-17 23:16 UTC (permalink / raw)
To: jeffrey.t.kirsher; +Cc: jacob.e.keller, netdev, gospo, sassmann
In-Reply-To: <1339925340-26286-1-git-send-email-jeffrey.t.kirsher@intel.com>
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Sun, 17 Jun 2012 02:29:00 -0700
> From: Jacob Keller <jacob.e.keller@intel.com>
>
> This patch fixes a potential hole when configuring the cycle counter used to
> generate the nanosecond time clock. This clock is based off of the SYSTIME
> registers along with the TIMINCA registers. The TIMINCA register determines
> the increment to be added to the SYSTIME registers every DMA clock tick. This
> register needs to be reconfigured whenever the link-speed changes. However,
> the value calculated stays the same when link is down and when link is up.
> Misconfiguration can occur if the link status changes due to a reset, which
> causes the TIMINCA register to be reset. This reset puts the device in an
> unstable state where the SYSTIME registers stop incrementing and the PTP
> protocol does not function.
>
> The solution is to double check the TIMINCA value and always reset the value
> if the register is zero. This prevents a misconfiguration bug that halts the
> PHC.
>
> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
> Acked-by: Don Skidmore <donald.c.skidmore@intel.com>
> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Applied, thanks.
^ permalink raw reply
* Re: [PATCH v2] fec: fix clk handling for Coldfire.
From: David Miller @ 2012-06-17 23:16 UTC (permalink / raw)
To: sfking; +Cc: netdev
In-Reply-To: <201206170306.58576.sfking@fdwdc.com>
Your email client corrupted the patch, don't waste my time like
this.
^ permalink raw reply
* Re: [PATCH 4/5] powerpc: bitops: Introduce {clear,set}_bit_le()
From: Benjamin Herrenschmidt @ 2012-06-17 21:49 UTC (permalink / raw)
To: Takuya Yoshikawa
Cc: akpm, bhutchings, grundler, arnd, avi, mtosatti,
linux-net-drivers, netdev, linux-kernel, linux-arch, kvm,
takuya.yoshikawa
In-Reply-To: <20120613130438.b1cd04db.yoshikawa.takuya@oss.ntt.co.jp>
On Wed, 2012-06-13 at 13:04 +0900, Takuya Yoshikawa wrote:
> From: Takuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp>
>
> Needed to replace test_and_set_bit_le() in virt/kvm/kvm_main.c which is
> being used for this missing function.
>
> Signed-off-by: Takuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> ---
> arch/powerpc/include/asm/bitops.h | 10 ++++++++++
> 1 files changed, 10 insertions(+), 0 deletions(-)
>
> diff --git a/arch/powerpc/include/asm/bitops.h b/arch/powerpc/include/asm/bitops.h
> index efdc926..dc2cf9c 100644
> --- a/arch/powerpc/include/asm/bitops.h
> +++ b/arch/powerpc/include/asm/bitops.h
> @@ -288,6 +288,16 @@ static __inline__ int test_bit_le(unsigned long nr,
> return (tmp[nr >> 3] >> (nr & 7)) & 1;
> }
>
> +static inline void set_bit_le(int nr, void *addr)
> +{
> + set_bit(nr ^ BITOP_LE_SWIZZLE, addr);
> +}
> +
> +static inline void clear_bit_le(int nr, void *addr)
> +{
> + clear_bit(nr ^ BITOP_LE_SWIZZLE, addr);
> +}
> +
> static inline void __set_bit_le(int nr, void *addr)
> {
> __set_bit(nr ^ BITOP_LE_SWIZZLE, addr);
^ permalink raw reply
* hi
From: GRACE BENSON @ 2012-06-17 17:46 UTC (permalink / raw)
To: gracebenson1987
Hello
Dear how are you today?
Am miss Grace Benson, i hope you are doing well
as it is my wish,
, i will like to know about you please,
may be we can be friends and know
what the future holds for us,write
me back on this emaill(gracebenson1987@yahoo.com)
so that we can get to know each other the
more and i will also send you my
picture,thanks and hope to hear from you soon,
yours Grace, God bless.
^ permalink raw reply
* Re: mlx4_core: Modify driver initialization flow to accommodate SRIOV for Ethernet
From: Jack Morgenstein @ 2012-06-17 15:18 UTC (permalink / raw)
To: Ben Hutchings; +Cc: Dan Carpenter, netdev, dotanb, Or Gerlitz, yevgenyp
In-Reply-To: <1339290217.21665.164.camel@deadeye.wl.decadent.org.uk>
On Sunday 10 June 2012 04:03, Ben Hutchings wrote:
> It would be more idiomatic to write the condition as:
>
> if (hca_param.global_caps & ~(u64)HCA_GLOBAL_CAP_MASK)
>
> (although that cast probably belongs in the definition of
> HCA_GLOBAL_CAP_MASK).
>
You are correct!
We need to submit a patch to fix this.
-Jack
^ permalink raw reply
* [ANNOUNCE] ulogd 2.0.0 release
From: Pablo Neira Ayuso @ 2012-06-17 12:07 UTC (permalink / raw)
To: netfilter-devel; +Cc: netdev, netfilter, netfilter-announce, lwn
[-- Attachment #1: Type: text/plain, Size: 1823 bytes --]
Hi!
The Netfilter project proudly presents:
ulogd 2.0.0
ulogd is a userspace logging daemon for netfilter/iptables related
logging. This includes per-packet logging of security violations,
per-packet logging for accounting, per-flow logging and flexible
user-defined accounting.
ulogd was almost entirely written by Harald Welte, with contributions
from fellow hackers such as Pablo Neira Ayuso, Eric Leblond and Pierre
Chifflier.
ulogd-2.x requires several libraries:
* libnfnetlink that provides basic communication infrastructure via
Netlink.
* libmnl that provides basic communication infrastructure via
Netlink, this library will supersede libnfnetlink. Still, we require
both libraries as we are still in transition to entirely replace
libnfnetlink by libmnl.
* libnetfilter_log for stateless packet-based logging via nfnetlink_queue.
* libnetfilter_conntrack for stateful flow-based via nf_conntrack_netlink.
* libnetfilter_acct for flexible traffic accounting via nfnetlink_acct
and iptables nfacct match (it requires Linux kernel >= 3.3.x).
This requires a Linux kernel >= 2.6.14, but Linux kernel >= 2.6.18 is
strongly recommended. Note that if you need SQL database output
suport, you will need the header files of the respective libraries.
Main features are:
* Packet and flow-based traffic accounting
* Flexible user-defined traffic accounting via nfacct infrastructure
* SQL database back-end support: SQLite3, MySQL and PostgreSQL
* Text-based output formats: CSV, XML, Netfilter's LOG, Netfilter's
conntrack.
This releases supersedes 1.x series. Please, upgrade to 2.x series!
See ChangeLog that comes attached to this email for more details.
You can download it from:
http://www.netfilter.org/projects/ulogd/downloads.html
ftp://ftp.netfilter.org/pub/ulogd/
Have fun!
[-- Attachment #2: changes-ulogd-2.0.0.txt --]
[-- Type: text/plain, Size: 3052 bytes --]
Björn Lässig (2):
build: use pkglibdir instead of pkglibexecdir for automake
doc: add documentation for SIGUSR2
Eric Leblond (8):
Mysql schema: fix delimiter
Mysql schema: fix procedure declaration
ulogd.conf: fix mysql definition for NFCT
autoconf: fix sqlite configure description message.
HWHDR: Fix various crashes
DB output: fix crash in SIGHUP handling
pcap: fix build on some recent x86_64 platform
pcap: add file option to configuration file
Harald Welte (1):
ulogd2 / DBI / table name
Jan Andres (1):
pcap: fix packet length handling
Jan Engelhardt (20):
build: move global automake options into configure.ac
build: remove statements without obvious effect
build: remove -fPIC flag
build: remove unused $(all_includes)
output/LOGEMU: resolve build warning
build: default to not building static libraries
build: propagate global CFLAGS
build: no need for error message in PKG_CHECK_MODULES
filter/HWHDR: remove redundant sizeof(char)
build: avoid use of LIBS variable
build: use appropriate location for program modules
build: use compile/link information from pkgconfig
build: simplify sqlite3 check
build: abort autogen on subcommand failure
Update .gitignore
build: use AC_CONFIG_AUX_DIR and stash away tools
build: disable implicit .tar.gz archive generation and use POSIX mode
sqlite: resolve compiler warnings
nfacct: resolve build failure
pcap: resolve unreliable detection
Jozsef Kadlecsik (2):
Support stored mysql procedures besides stored functions
A simple filter plugin called IP2HBIN added
Pablo Neira Ayuso (20):
NFCT: fix bug in polling mode
ulogd: fix double call of stop for reused input plugins
config: add file option for NACCT pluging to the example config file
sqlite3: initial support extracted from Holger Eitzenberger's work
sqlite3: add configuration examples and new tables layout
NFCT: use nfct_copy() instead of deprecated nfct_sizeof() function
NFLOG: don't display overrun message once we have reach the buffer limit
sqlite3: use continue instead of goto in sqlite3_interp()
sqlite3: cleanup error handling of sqlite3_bind_int() in sqlite3_interp()
sqlite3: fix warning during compilation
sqlite3: remove automatic creation of table `daily'
build: Linux kernel-style for compilation messages
ulogd: add okey_set_u64
OPRINT: display u64 fields
output: add GPRINT plugin
input: add nfacct plugin
src: add example use of GPRINT to ulogd.conf.in configuration file
NFCT: add `reliable' config option to enable reliable flow-based logging
build: bump release version to 2.0.0
build: require 1.0.0 of all libraries
Pierre Chifflier (2):
Add new input plugin UNIXSOCK
Add helper script pcap2ulog
Salih Gonullu (1):
ulogd: fix segfault if syslog and SIGTERM is received
^ permalink raw reply
* [net-next PATCH] bnx2x: correct LPI pass-through configuration
From: Yuval Mintz @ 2012-06-17 12:04 UTC (permalink / raw)
To: davem, netdev; +Cc: dan.carpenter, eilong, Yuval Mintz, Yaniv Rosner
Commit c8c60d88c59cbb48737732ba948663a3efe882aa contained
an incorrect logic which enabled a buffer overflow when accessing
an array during LPI pass-through configuration.
This patch fixes this issue by removing that logic altogether.
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Yaniv Rosner <yaniv.rosner@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
---
Thanks goes to Dan Carpenter for finding this bug.
Dave, please apply this patch to 'net-next'.
Thanks,
Yuval Mintz
---
drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c | 18 ++++++------------
1 files changed, 6 insertions(+), 12 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
index c7c814d..91aa565 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
@@ -4057,18 +4057,12 @@ static void bnx2x_warpcore_set_10G_XFI(struct bnx2x_phy *phy,
MDIO_WC_REG_DIGITAL4_MISC3, val | 0x8080);
/* Enable LPI pass through */
- if ((params->eee_mode & EEE_MODE_ADV_LPI) &&
- (phy->flags & FLAGS_EEE_10GBT) &&
- (!(params->eee_mode & EEE_MODE_ENABLE_LPI) ||
- bnx2x_eee_calc_timer(params)) &&
- (params->req_duplex[bnx2x_phy_selection(params)] == DUPLEX_FULL)) {
- DP(NETIF_MSG_LINK, "Configure WC for LPI pass through\n");
- bnx2x_cl45_write(bp, phy, MDIO_WC_DEVAD,
- MDIO_WC_REG_EEE_COMBO_CONTROL0,
- 0x7c);
- bnx2x_cl45_read_or_write(bp, phy, MDIO_WC_DEVAD,
- MDIO_WC_REG_DIGITAL4_MISC5, 0xc000);
- }
+ DP(NETIF_MSG_LINK, "Configure WC for LPI pass through\n");
+ bnx2x_cl45_write(bp, phy, MDIO_WC_DEVAD,
+ MDIO_WC_REG_EEE_COMBO_CONTROL0,
+ 0x7c);
+ bnx2x_cl45_read_or_write(bp, phy, MDIO_WC_DEVAD,
+ MDIO_WC_REG_DIGITAL4_MISC5, 0xc000);
/* 10G XFI Full Duplex */
bnx2x_cl45_write(bp, phy, MDIO_WC_DEVAD,
--
1.7.9.rc2
^ permalink raw reply related
* [PATCH v2] fec: fix clk handling for Coldfire.
From: Steven King @ 2012-06-17 10:06 UTC (permalink / raw)
To: netdev
commit f4d40de39a23f0c39cca55ac63e1175c69c3d2f7
'net fec: do not depend on grouped clocks' broke fec for Coldfire.
Hide the details of fec clk management in a trio of new functions:
fec_clk_get, fec_clk_prepare and fec_clk_disable_unprepare.
Signed-off-by: Steven King <sfking@fdwdc.com>
---
drivers/net/ethernet/freescale/fec.c | 84
++++++++++++++++++++++++++--------
1 file changed, 65 insertions(+), 19 deletions(-)
diff --git a/drivers/net/ethernet/freescale/fec.c
b/drivers/net/ethernet/freescale/fec.c
index ff7f4c5..1072da6 100644
--- a/drivers/net/ethernet/freescale/fec.c
+++ b/drivers/net/ethernet/freescale/fec.c
@@ -207,8 +207,12 @@ struct fec_enet_private {
struct net_device *netdev;
+#ifdef CONFIG_COLDFIRE
+ struct clk *clk;
+#else
struct clk *clk_ipg;
struct clk *clk_ahb;
+#endif
/* The saved address of a sent-in-place packet/buffer, for skfree(). */
unsigned char *tx_bounce[TX_RING_SIZE];
@@ -248,6 +252,56 @@ struct fec_enet_private {
int irq[FEC_IRQ_NUM];
};
+static int fec_clk_get(struct platform_device *pdev,
+ struct fec_enet_private *fep)
+{
+ int ret;
+
+#ifdef CONFIG_COLDFIRE
+ fep->clk = clk_get(&pdev->dev, NULL);
+ if (IS_ERR(fep->clk)) {
+ ret = PTR_ERR(fep->clk);
+ goto failed_clk;
+ }
+#else
+ fep->clk_ipg = devm_clk_get(&pdev->dev, "ipg");
+ if (IS_ERR(fep->clk_ipg)) {
+ ret = PTR_ERR(fep->clk_ipg);
+ goto failed_clk;
+ }
+
+ fep->clk_ahb = devm_clk_get(&pdev->dev, "ahb");
+ if (IS_ERR(fep->clk_ahb)) {
+ ret = PTR_ERR(fep->clk_ahb);
+ goto failed_clk;
+ }
+#endif
+ return 0;
+
+failed_clk:
+ return ret;
+}
+
+static void fec_clk_prepare(struct fec_enet_private *fep)
+{
+#ifdef CONFIG_COLDFIRE
+ clk_prepare_enable(fep->clk);
+#else
+ clk_prepare_enable(fep->clk_ahb);
+ clk_prepare_enable(fep->clk_ipg);
+#endif
+}
+
+static void fec_clk_disable_unprepare(struct fec_enet_private *fep)
+{
+#ifdef CONFIG_COLDFIRE
+ clk_disable_unprepare(fep->clk);
+#else
+ clk_disable_unprepare(fep->clk_ahb);
+ clk_disable_unprepare(fep->clk_ipg);
+#endif
+}
+
/* FEC MII MMFR bits definition */
#define FEC_MMFR_ST (1 << 30)
#define FEC_MMFR_OP_READ (2 << 28)
@@ -1066,7 +1120,11 @@ static int fec_enet_mii_init(struct platform_device
*pdev)
* Reference Manual has an error on this, and gets fixed on i.MX6Q
* document.
*/
+#ifdef CONFIG_COLDFIRE
+ fep->phy_speed = DIV_ROUND_UP(clk_get_rate(fep->clk), 5000000);
+#else
fep->phy_speed = DIV_ROUND_UP(clk_get_rate(fep->clk_ahb), 5000000);
+#endif
if (id_entry->driver_data & FEC_QUIRK_ENET_MAC)
fep->phy_speed--;
fep->phy_speed <<= 1;
@@ -1619,20 +1677,11 @@ fec_probe(struct platform_device *pdev)
goto failed_pin;
}
- fep->clk_ipg = devm_clk_get(&pdev->dev, "ipg");
- if (IS_ERR(fep->clk_ipg)) {
- ret = PTR_ERR(fep->clk_ipg);
- goto failed_clk;
- }
- fep->clk_ahb = devm_clk_get(&pdev->dev, "ahb");
- if (IS_ERR(fep->clk_ahb)) {
- ret = PTR_ERR(fep->clk_ahb);
+ if (fec_clk_get(pdev, fep))
goto failed_clk;
- }
- clk_prepare_enable(fep->clk_ahb);
- clk_prepare_enable(fep->clk_ipg);
+ fec_clk_prepare(fep);
ret = fec_enet_init(ndev);
if (ret)
@@ -1655,8 +1704,7 @@ failed_register:
fec_enet_mii_remove(fep);
failed_mii_init:
failed_init:
- clk_disable_unprepare(fep->clk_ahb);
- clk_disable_unprepare(fep->clk_ipg);
+ fec_clk_disable_unprepare(fep);
failed_pin:
failed_clk:
for (i = 0; i < FEC_IRQ_NUM; i++) {
@@ -1689,8 +1737,7 @@ fec_drv_remove(struct platform_device *pdev)
if (irq > 0)
free_irq(irq, ndev);
}
- clk_disable_unprepare(fep->clk_ahb);
- clk_disable_unprepare(fep->clk_ipg);
+ fec_clk_disable_unprepare(fep);
iounmap(fep->hwp);
free_netdev(ndev);
@@ -1714,8 +1761,7 @@ fec_suspend(struct device *dev)
fec_stop(ndev);
netif_device_detach(ndev);
}
- clk_disable_unprepare(fep->clk_ahb);
- clk_disable_unprepare(fep->clk_ipg);
+ fec_clk_disable_unprepare(fep);
return 0;
}
@@ -1726,8 +1772,8 @@ fec_resume(struct device *dev)
struct net_device *ndev = dev_get_drvdata(dev);
struct fec_enet_private *fep = netdev_priv(ndev);
- clk_prepare_enable(fep->clk_ahb);
- clk_prepare_enable(fep->clk_ipg);
+ fec_clk_prepare(fep);
+
if (netif_running(ndev)) {
fec_restart(ndev, fep->full_duplex);
netif_device_attach(ndev);
^ permalink raw reply related
* Re: [net-next patch 8/12] bnx2x: Allow up to 63 RSS queues default 8 queues
From: Eilon Greenstein @ 2012-06-17 9:31 UTC (permalink / raw)
To: David Miller; +Cc: meravs, eric.dumazet, netdev
In-Reply-To: <20120617.020058.2281757592609638666.davem@davemloft.net>
On Sun, 2012-06-17 at 02:00 -0700, David Miller wrote:
> From: "Eilon Greenstein" <eilong@broadcom.com>
> Date: Sun, 17 Jun 2012 11:33:56 +0300
>
> > drivers now, it does not sound like a good path - so I was asking if you
> > can consider a kernel parameter as acceptable path. To be clear, I'm
> > asking if adding the default for all multi-queue drivers in the form of
> > a kernel parameter is a good path to explore.
>
> If it's the default, there's no need for a kernel command line
> parameter. Those suck, just pick a good default.
>
OK. So we will send an RFC series setting the default (hard coded
define) to 8 for all multi-queue drivers and that will start a
discussion if this is a good default number or not. The side-effect of
this series will be that drivers that did not implement set_channels
will not be able to change this default back to the HW limit like they
run today (assuming the HW limit is higher than the chosen default).
On top of that, we will send this series for the bnx2x again without any
default -allowing up to 64 queues unless set_channels is used.
Eilon
^ permalink raw reply
* [net] ixgbe: Fix PHC loophole allowing misconfiguration of increment register
From: Jeff Kirsher @ 2012-06-17 9:29 UTC (permalink / raw)
To: davem; +Cc: Jacob Keller, netdev, gospo, sassmann, Jeff Kirsher
From: Jacob Keller <jacob.e.keller@intel.com>
This patch fixes a potential hole when configuring the cycle counter used to
generate the nanosecond time clock. This clock is based off of the SYSTIME
registers along with the TIMINCA registers. The TIMINCA register determines
the increment to be added to the SYSTIME registers every DMA clock tick. This
register needs to be reconfigured whenever the link-speed changes. However,
the value calculated stays the same when link is down and when link is up.
Misconfiguration can occur if the link status changes due to a reset, which
causes the TIMINCA register to be reset. This reset puts the device in an
unstable state where the SYSTIME registers stop incrementing and the PTP
protocol does not function.
The solution is to double check the TIMINCA value and always reset the value
if the register is zero. This prevents a misconfiguration bug that halts the
PHC.
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Acked-by: Don Skidmore <donald.c.skidmore@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
index ddc6a4d..dcebd12 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ptp.c
@@ -708,6 +708,7 @@ void ixgbe_ptp_start_cyclecounter(struct ixgbe_adapter *adapter)
{
struct ixgbe_hw *hw = &adapter->hw;
u32 incval = 0;
+ u32 timinca = 0;
u32 shift = 0;
u32 cycle_speed;
unsigned long flags;
@@ -730,8 +731,16 @@ void ixgbe_ptp_start_cyclecounter(struct ixgbe_adapter *adapter)
break;
}
- /* Bail if the cycle speed didn't change */
- if (adapter->cycle_speed == cycle_speed)
+ /*
+ * grab the current TIMINCA value from the register so that it can be
+ * double checked. If the register value has been cleared, it must be
+ * reset to the correct value for generating a cyclecounter. If
+ * TIMINCA is zero, the SYSTIME registers do not increment at all.
+ */
+ timinca = IXGBE_READ_REG(hw, IXGBE_TIMINCA);
+
+ /* Bail if the cycle speed didn't change and TIMINCA is non-zero */
+ if (adapter->cycle_speed == cycle_speed && timinca)
return;
/* disable the SDP clock out */
--
1.7.10.2
^ permalink raw reply related
* Re: [net-next patch 8/12] bnx2x: Allow up to 63 RSS queues default 8 queues
From: David Miller @ 2012-06-17 9:00 UTC (permalink / raw)
To: eilong; +Cc: meravs, eric.dumazet, netdev
In-Reply-To: <1339922036.2486.1.camel@lb-tlvb-eilong.il.broadcom.com>
From: "Eilon Greenstein" <eilong@broadcom.com>
Date: Sun, 17 Jun 2012 11:33:56 +0300
> drivers now, it does not sound like a good path - so I was asking if you
> can consider a kernel parameter as acceptable path. To be clear, I'm
> asking if adding the default for all multi-queue drivers in the form of
> a kernel parameter is a good path to explore.
If it's the default, there's no need for a kernel command line
parameter. Those suck, just pick a good default.
^ permalink raw reply
* Re: [PATCH] fec: fix clk handling for Coldfire.
From: David Miller @ 2012-06-17 9:00 UTC (permalink / raw)
To: sfking; +Cc: netdev
In-Reply-To: <201206170121.18807.sfking@fdwdc.com>
From: Steven King <sfking@fdwdc.com>
Date: Sun, 17 Jun 2012 01:21:18 -0700
> On Sunday 17 June 2012 1:08:49 am David Miller wrote:
>> Sorry, I'm not going to allow you to crap up this driver with
>> ifdefs. Find a way to fix it without that.
>
> Well, then how about then revert the commit and have the imx folks
> do whatever they need to do without breaking things for Coldfire?
Read what I said, you have the time to fix the problem cleanly.
It's not like there's a kernel release tomorrow.
^ permalink raw reply
* Re: [net-next patch 8/12] bnx2x: Allow up to 63 RSS queues default 8 queues
From: Eilon Greenstein @ 2012-06-17 8:33 UTC (permalink / raw)
To: David Miller; +Cc: meravs, eric.dumazet, netdev
In-Reply-To: <20120617.010817.1214320083280899562.davem@davemloft.net>
On Sun, 2012-06-17 at 01:08 -0700, David Miller wrote:
> If you're not going to read what I wrote, don't pretend that you did.
> That really irritates me and makes me want to not review or apply your
> patches.
>
> I didn't say that there wasn't a problem.
>
> I said that I don't want you to just blaze your own trail without
> getting agreement and coordinating to adjust the other drivers in
> unison as well. I refuse to allow you to just change the default of
> your driver and then well... maybe other drivers follow and maybe
> others do not. That hodge-podge inconsistent situation sucks for
> users.
>
> So now are you going to try again to explain the problem to me or
> are you going to understand what my actual concern is?
>
I understood what you are saying, and if it looks like I was still
pushing for this patch to be accepted then I apologize, it is not what
I'm trying to do. What I am trying to do now, is to find a way to set a
default for all drivers. Since set_channels is applicable to only two
drivers now, it does not sound like a good path - so I was asking if you
can consider a kernel parameter as acceptable path. To be clear, I'm
asking if adding the default for all multi-queue drivers in the form of
a kernel parameter is a good path to explore.
^ permalink raw reply
* Re: [PATCH] fec: fix clk handling for Coldfire.
From: Steven King @ 2012-06-17 8:21 UTC (permalink / raw)
To: David Miller; +Cc: netdev
In-Reply-To: <20120617.010849.1446855262442120268.davem@davemloft.net>
On Sunday 17 June 2012 1:08:49 am David Miller wrote:
> Sorry, I'm not going to allow you to crap up this driver with
> ifdefs. Find a way to fix it without that.
Well, then how about then revert the commit and have the imx folks do whatever
they need to do without breaking things for Coldfire?
^ permalink raw reply
* Re: [PATCH] fec: fix clk handling for Coldfire.
From: David Miller @ 2012-06-17 8:08 UTC (permalink / raw)
To: sfking; +Cc: netdev
In-Reply-To: <201206170000.48076.sfking@fdwdc.com>
Sorry, I'm not going to allow you to crap up this driver with
ifdefs. Find a way to fix it without that.
^ permalink raw reply
* Re: [net-next patch 8/12] bnx2x: Allow up to 63 RSS queues default 8 queues
From: David Miller @ 2012-06-17 8:08 UTC (permalink / raw)
To: eilong; +Cc: meravs, eric.dumazet, netdev
In-Reply-To: <1339916031.2486.0.camel@lb-tlvb-eilong.il.broadcom.com>
If you're not going to read what I wrote, don't pretend that you did.
That really irritates me and makes me want to not review or apply your
patches.
I didn't say that there wasn't a problem.
I said that I don't want you to just blaze your own trail without
getting agreement and coordinating to adjust the other drivers in
unison as well. I refuse to allow you to just change the default of
your driver and then well... maybe other drivers follow and maybe
others do not. That hodge-podge inconsistent situation sucks for
users.
So now are you going to try again to explain the problem to me or
are you going to understand what my actual concern is?
Thanks.
^ permalink raw reply
* [PATCH] fec: fix clk handling for Coldfire.
From: Steven King @ 2012-06-17 7:00 UTC (permalink / raw)
To: netdev
commit f4d40de39a23f0c39cca55ac63e1175c69c3d2f7
'net fec: do not depend on grouped clocks' broke fec for Coldfire.
Add #ifdef's to restore the working 3.4 clk handling for Coldfire.
Signed-off-by: Steven King <sfking@fdwdc.com>
---
drivers/net/ethernet/freescale/fec.c | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)
diff --git a/drivers/net/ethernet/freescale/fec.c b/drivers/net/ethernet/freescale/fec.c
index ff7f4c5..f7b0372 100644
--- a/drivers/net/ethernet/freescale/fec.c
+++ b/drivers/net/ethernet/freescale/fec.c
@@ -207,8 +207,12 @@ struct fec_enet_private {
struct net_device *netdev;
+#ifdef CONFIG_COLDFIRE
+ struct clk *clk;
+#else
struct clk *clk_ipg;
struct clk *clk_ahb;
+#endif
/* The saved address of a sent-in-place packet/buffer, for skfree(). */
unsigned char *tx_bounce[TX_RING_SIZE];
@@ -1066,7 +1070,11 @@ static int fec_enet_mii_init(struct platform_device *pdev)
* Reference Manual has an error on this, and gets fixed on i.MX6Q
* document.
*/
+#ifdef CONFIG_COLDFIRE
+ fep->phy_speed = DIV_ROUND_UP(clk_get_rate(fep->clk), 5000000);
+#else
fep->phy_speed = DIV_ROUND_UP(clk_get_rate(fep->clk_ahb), 5000000);
+#endif
if (id_entry->driver_data & FEC_QUIRK_ENET_MAC)
fep->phy_speed--;
fep->phy_speed <<= 1;
@@ -1619,6 +1627,14 @@ fec_probe(struct platform_device *pdev)
goto failed_pin;
}
+#ifdef CONFIG_COLDFIRE
+ fep->clk = clk_get(&pdev->dev, NULL);
+ if (IS_ERR(fep->clk)) {
+ ret = PTR_ERR(fep->clk);
+ goto failed_clk;
+ }
+ clk_prepare_enable(fep->clk);
+#else
fep->clk_ipg = devm_clk_get(&pdev->dev, "ipg");
if (IS_ERR(fep->clk_ipg)) {
ret = PTR_ERR(fep->clk_ipg);
@@ -1633,6 +1649,7 @@ fec_probe(struct platform_device *pdev)
clk_prepare_enable(fep->clk_ahb);
clk_prepare_enable(fep->clk_ipg);
+#endif
ret = fec_enet_init(ndev);
if (ret)
@@ -1655,8 +1672,12 @@ failed_register:
fec_enet_mii_remove(fep);
failed_mii_init:
failed_init:
+#ifdef CONFIG_COLDFIRE
+ clk_disable_unprepare(fep->clk);
+#else
clk_disable_unprepare(fep->clk_ahb);
clk_disable_unprepare(fep->clk_ipg);
+#endif
failed_pin:
failed_clk:
for (i = 0; i < FEC_IRQ_NUM; i++) {
@@ -1689,8 +1710,12 @@ fec_drv_remove(struct platform_device *pdev)
if (irq > 0)
free_irq(irq, ndev);
}
+#ifdef CONFIG_COLDFIRE
+ clk_disable_unprepare(fep->clk);
+#else
clk_disable_unprepare(fep->clk_ahb);
clk_disable_unprepare(fep->clk_ipg);
+#endif
iounmap(fep->hwp);
free_netdev(ndev);
@@ -1714,8 +1739,12 @@ fec_suspend(struct device *dev)
fec_stop(ndev);
netif_device_detach(ndev);
}
+#ifdef CONFIG_COLDFIRE
+ clk_disable_unprepare(fep->clk);
+#else
clk_disable_unprepare(fep->clk_ahb);
clk_disable_unprepare(fep->clk_ipg);
+#endif
return 0;
}
@@ -1726,8 +1755,12 @@ fec_resume(struct device *dev)
struct net_device *ndev = dev_get_drvdata(dev);
struct fec_enet_private *fep = netdev_priv(ndev);
+#ifdef CONFIG_COLDFIRE
+ clk_prepare_enable(fep->clk);
+#else
clk_prepare_enable(fep->clk_ahb);
clk_prepare_enable(fep->clk_ipg);
+#endif
if (netif_running(ndev)) {
fec_restart(ndev, fep->full_duplex);
netif_device_attach(ndev);
^ permalink raw reply related
* Re: [net-next patch 8/12] bnx2x: Allow up to 63 RSS queues default 8 queues
From: Eilon Greenstein @ 2012-06-17 6:53 UTC (permalink / raw)
To: David Miller; +Cc: meravs, eric.dumazet, netdev
In-Reply-To: <20120614.133649.794229745961162963.davem@davemloft.net>
On Thu, 2012-06-14 at 13:36 -0700, David Miller wrote:
> From: "Merav Sicron" <meravs@broadcom.com>
> Date: Thu, 14 Jun 2012 18:34:06 +0300
>
> > That's why we think (and so does Eric Dumazet) that it is better
> > to have a smaller default number which is good for most cases.
> > Do you agree with that?
>
> What I think is that the thing which is more important than the
> default we choose, is that it is consistently followed by all
> multiqueue drivers.
>
> By blazing your own unique path here, that is nearly guaranteed not to
> happen.
>
> I'd much rather have a bad default that every driver adheres to.
>
The increasing number of CPUs together with the increasing number of
supported MSI-X vectors per device, is causing a lot of memory to be
allocated for the networking channels. This is a problem on low memory
platforms such as 32bits installations. 64 queues per device (and in
most cases, there are few devices) is a becoming a real problem.
If the device does not implement the ethtool .set_channels operation,
then the default is practically the only way to go, and there is no such
thing as a good default - it really depends on the use case. This is the
reason why we are only setting the default in the series that adds
support for this operation.
So what do you say about setting a new default only for devices that
supports .set_channels? There are only 2 of those right now (qlcnic,
bnx2 and hopefully bnx2x soon). Is it acceptable to keep the default
hard coded value or do you want it to be configurable? If the latter, is
a kernel parameter a valid option?
Please note that today, on a system with enough CPUs, you cannot really
tell how many channels will be created per device - each vendor is
allocating up to its HW limit - usually 8 or 16, but there is no easy
way to determine it beside reading the code. So adding a kernel
parameter to limit the number can actually increase the consistency.
Thanks,
Eilon
^ permalink raw reply
* Re: [net PATCH 0/2] bnx2x: link bug fixes.
From: David Miller @ 2012-06-17 6:39 UTC (permalink / raw)
To: yuvalmin; +Cc: netdev, eilong, yaniv.rosner
In-Reply-To: <1339914435-12912-1-git-send-email-yuvalmin@broadcom.com>
From: "Yuval Mintz" <yuvalmin@broadcom.com>
Date: Sun, 17 Jun 2012 09:27:13 +0300
> This patch series contain relatively small corrections
> to the link initialization of the bnx2x driver.
>
> Please consider applying it to 'net'.
Both applied, thanks.
^ permalink raw reply
* [net PATCH 2/2] bnx2x: fix link for BCM57711 with 84823 phy
From: Yuval Mintz @ 2012-06-17 6:27 UTC (permalink / raw)
To: davem, netdev; +Cc: eilong, yaniv.rosner, Yuval Mintz
In-Reply-To: <1339914435-12912-1-git-send-email-yuvalmin@broadcom.com>
Signed-off-by: Yaniv Rosner <yaniv.rosner@broadcom.com>
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
---
drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
index 65f673f..e0b1fbc 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
@@ -9754,7 +9754,7 @@ static int bnx2x_848x3_config_init(struct bnx2x_phy *phy,
msleep(1);
- if (!(CHIP_IS_E1(bp)))
+ if (!(CHIP_IS_E1x(bp)))
port = BP_PATH(bp);
else
port = params->port;
--
1.7.9.rc2
^ permalink raw reply related
* [net PATCH 1/2] bnx2x: fix I2C non-respondent issue
From: Yuval Mintz @ 2012-06-17 6:27 UTC (permalink / raw)
To: davem, netdev; +Cc: eilong, yaniv.rosner, Yuval Mintz
In-Reply-To: <1339914435-12912-1-git-send-email-yuvalmin@broadcom.com>
When I2C is not responding it's usually due to a previous
unexpected reset during I2C operation. We release it by
powering down and up the SFP+ module.
Signed-off-by: Yaniv Rosner <yaniv.rosner@broadcom.com>
Signed-off-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
---
drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c | 52 ++++++++++++----------
1 files changed, 29 insertions(+), 23 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
index a3fb721..65f673f 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
@@ -40,6 +40,7 @@
#define I2C_BSC0 0
#define I2C_BSC1 1
#define I2C_WA_RETRY_CNT 3
+#define I2C_WA_PWR_ITER (I2C_WA_RETRY_CNT - 1)
#define MCPR_IMC_COMMAND_READ_OP 1
#define MCPR_IMC_COMMAND_WRITE_OP 2
@@ -7659,6 +7660,28 @@ static int bnx2x_8726_read_sfp_module_eeprom(struct bnx2x_phy *phy,
return -EINVAL;
}
+static void bnx2x_warpcore_power_module(struct link_params *params,
+ struct bnx2x_phy *phy,
+ u8 power)
+{
+ u32 pin_cfg;
+ struct bnx2x *bp = params->bp;
+
+ pin_cfg = (REG_RD(bp, params->shmem_base +
+ offsetof(struct shmem_region,
+ dev_info.port_hw_config[params->port].e3_sfp_ctrl)) &
+ PORT_HW_CFG_E3_PWR_DIS_MASK) >>
+ PORT_HW_CFG_E3_PWR_DIS_SHIFT;
+
+ if (pin_cfg == PIN_CFG_NA)
+ return;
+ DP(NETIF_MSG_LINK, "Setting SFP+ module power to %d using pin cfg %d\n",
+ power, pin_cfg);
+ /* Low ==> corresponding SFP+ module is powered
+ * high ==> the SFP+ module is powered down
+ */
+ bnx2x_set_cfg_pin(bp, pin_cfg, power ^ 1);
+}
static int bnx2x_warpcore_read_sfp_module_eeprom(struct bnx2x_phy *phy,
struct link_params *params,
u16 addr, u8 byte_cnt,
@@ -7678,6 +7701,12 @@ static int bnx2x_warpcore_read_sfp_module_eeprom(struct bnx2x_phy *phy,
/* 4 byte aligned address */
addr32 = addr & (~0x3);
do {
+ if (cnt == I2C_WA_PWR_ITER) {
+ bnx2x_warpcore_power_module(params, phy, 0);
+ /* Note that 100us are not enough here */
+ usleep_range(1000,1000);
+ bnx2x_warpcore_power_module(params, phy, 1);
+ }
rc = bnx2x_bsc_read(params, phy, 0xa0, addr32, 0, byte_cnt,
data_array);
} while ((rc != 0) && (++cnt < I2C_WA_RETRY_CNT));
@@ -8200,29 +8229,6 @@ static void bnx2x_set_sfp_module_fault_led(struct link_params *params,
bnx2x_set_e1e2_module_fault_led(params, gpio_mode);
}
-static void bnx2x_warpcore_power_module(struct link_params *params,
- struct bnx2x_phy *phy,
- u8 power)
-{
- u32 pin_cfg;
- struct bnx2x *bp = params->bp;
-
- pin_cfg = (REG_RD(bp, params->shmem_base +
- offsetof(struct shmem_region,
- dev_info.port_hw_config[params->port].e3_sfp_ctrl)) &
- PORT_HW_CFG_E3_PWR_DIS_MASK) >>
- PORT_HW_CFG_E3_PWR_DIS_SHIFT;
-
- if (pin_cfg == PIN_CFG_NA)
- return;
- DP(NETIF_MSG_LINK, "Setting SFP+ module power to %d using pin cfg %d\n",
- power, pin_cfg);
- /* Low ==> corresponding SFP+ module is powered
- * high ==> the SFP+ module is powered down
- */
- bnx2x_set_cfg_pin(bp, pin_cfg, power ^ 1);
-}
-
static void bnx2x_warpcore_hw_reset(struct bnx2x_phy *phy,
struct link_params *params)
{
--
1.7.9.rc2
^ permalink raw reply related
* [net PATCH 0/2] bnx2x: link bug fixes.
From: Yuval Mintz @ 2012-06-17 6:27 UTC (permalink / raw)
To: davem, netdev; +Cc: eilong, yaniv.rosner, Yuval Mintz
Hello Dave,
This patch series contain relatively small corrections
to the link initialization of the bnx2x driver.
Please consider applying it to 'net'.
Thanks,
Yuval Mintz
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox