* unexpected TCP behaviour when deleting local IP addresses
From: Chris Friesen @ 2012-10-16 21:12 UTC (permalink / raw)
To: netdev
I'm seeing some strange behaviour with local TCP connections. The
scenario goes as follows:
1) create new IP address and assign to eth device
2) TCP server starts listening on that IP address
3) TCP client connects to server
4) remove new IP address
5) kill server with ctrl-C. At this point it appears that because the
address was removed the shutdown message isn't processed properly.
netstat shows the server socket as FIN_WAIT1, but the client socket is
still ESTABLISHED.
6) client writes to the connected socket (this passes with no error)
7) client waits for response from server, and waits forever or until
keepalive expires
This was originally seen on 2.6.27, but I've verified it on 2.6.35.
I'll see about trying it on current git.
Is the waiting forever in step 7 a bug, or is this legitimate TCP
behaviour since the server was basically shut down uncleanly?
If we don't remove the address in step 4, then step 5 results in the
server socket going to FIN_WAIT2 and the client socket going to
CLOSE_WAIT and step 7 returns right away with zero bytes.
In the "remove IP address" case I would expect step 6 to cause some sort
of error since the IP address no longer exists.
The interesting thing is that if you do this sort of scenario with the
client and server on different hosts then you get a "no route to host"
error at step 6.
Curious how this is supposed to work...
Chris
^ permalink raw reply
* Re: [stable 2.6.32.y] net/ipv4: fix cached ipv4 dsts never invalidated
From: Willy Tarreau @ 2012-10-16 21:22 UTC (permalink / raw)
To: Benjamin LaHaise; +Cc: David Miller, stable, netdev
In-Reply-To: <20121016204955.GA25971@kvack.org>
On Tue, Oct 16, 2012 at 04:49:55PM -0400, Benjamin LaHaise wrote:
> On Tue, Oct 16, 2012 at 04:45:39PM -0400, David Miller wrote:
> > This is only a partial fix.
> >
> > Only recently did this issue get resolved completely.
> >
> > See commits surrounding:
>
> Thanks for the pointers David. I'll cherry pick / backport the relevant
> changes for Willy as well.
They will be much welcome, thank you guys !
Willy
^ permalink raw reply
* Re: [PATCH 1/5] ARM: OMAP2+: gpmc: Fix kernel BUG for DT boot mode
From: Tony Lindgren @ 2012-10-16 21:26 UTC (permalink / raw)
To: Jon Hunter
Cc: Richard Cochran, Afzal Mohammed, Russell King, Arnd Bergmann,
netdev, hvaibhav@ti.com, David Miller, linux-arm-kernel,
linux-omap@vger.kernel.org
In-Reply-To: <507DCA8D.7060309@ti.com>
* Jon Hunter <jon-hunter@ti.com> [121016 14:00]:
> Hi Tony,
>
> On 10/16/2012 12:48 PM, Tony Lindgren wrote:
> > * Richard Cochran <richardcochran@gmail.com> [121015 12:18]:
> >> From: hvaibhav@ti.com <hvaibhav@ti.com>
> >>
> >> With recent changes in omap gpmc driver code, in case of DT
> >> boot mode, where bootloader does not configure gpmc cs space
> >> will result into kernel BUG() inside gpmc_mem_init() function,
> >> as gpmc cs0 gpmc_config7[0].csvalid bit is set to '1' and
> >> gpmc_config7[0].baseaddress is set to '0' on reset.
> >>
> >> This use-case is applicable for any board/EVM which doesn't have
> >> any peripheral connected to gpmc cs0, for example BeagleXM and
> >> BeagleBone, so DT boot mode fails.
> >>
> >> This patch adds of_have_populated_dt() check before creating
> >> device, so that for DT boot mode, gpmc probe will not be called
> >> which is expected behavior, as gpmc is not supported yet from DT.
> >
> > I'm applying this one into omap-for-v3.7-rc1/fixes-part2.
> >
> > Next time, please also cc linux-omap@vger.kernel.org for series
> > like this. I'm sure the people reading the omap list are interested
> > in these.
>
> This patch appears to be masking an underlying issue. How about
> something like the following ...
OK that looks good to me. I'll drop the earlier fix and use
yours instead.
Regards,
Tony
^ permalink raw reply
* Re: [PATCH] ipv6: addrconf: fix /proc/net/if_inet6
From: Joe Perches @ 2012-10-16 22:01 UTC (permalink / raw)
To: Jan Hinnerk Stosch; +Cc: Eric Dumazet, David Miller, netdev, Mihai Maruseac
In-Reply-To: <CAO_aot45DY4A-uM-O1udZUh9XDKJxszgD7w+iVpJw_qcivEeMw@mail.gmail.com>
On Tue, 2012-10-16 at 20:30 +0200, Jan Hinnerk Stosch wrote:
> 2012/10/16 Eric Dumazet <eric.dumazet@gmail.com>:
> > From: Eric Dumazet <edumazet@google.com>
> >
> > Commit 1d5783030a1 (ipv6/addrconf: speedup /proc/net/if_inet6 filling)
> > added bugs hiding some devices from if_inet6 and breaking applications.
> >
> > "ip -6 addr" could still display all IPv6 addresses, while "ifconfig -a"
> > couldnt.
Thanks Eric and Jan. Well done.
^ permalink raw reply
* [PATCH 4/6] ptp: add api to get ptp seq id and event type from skb
From: Mugunthan V N @ 2012-10-16 22:45 UTC (permalink / raw)
To: netdev; +Cc: davem, Richard Cochran, Mugunthan V N
In-Reply-To: <1350427518-7230-1-git-send-email-mugunthanvnm@ti.com>
Cc: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
---
include/linux/ptp_classify.h | 42 ++++++++++++++++++++++++++++++++++++++++++
1 files changed, 42 insertions(+), 0 deletions(-)
diff --git a/include/linux/ptp_classify.h b/include/linux/ptp_classify.h
index 1dc420b..9b3b55b 100644
--- a/include/linux/ptp_classify.h
+++ b/include/linux/ptp_classify.h
@@ -137,4 +137,46 @@ static inline int ptp_filter_init(struct sock_filter *f, int len)
{OP_RETA, 0, 0, 0 }, /* */ \
/*L6x*/ {OP_RETK, 0, 0, PTP_CLASS_NONE },
+static inline int ptp_get_skb_event(struct sk_buff *skb, u32 ptp_class,
+ u16 *evt_seqid, u8 *evt_msgtype)
+{
+ u16 *seqid;
+ unsigned int offset;
+ u8 *msgtype, *data = skb->data;
+
+ switch (ptp_class) {
+ case PTP_CLASS_V1_IPV4:
+ case PTP_CLASS_V2_IPV4:
+ offset = ETH_HLEN + IPV4_HLEN(data) + UDP_HLEN;
+ break;
+ case PTP_CLASS_V1_IPV6:
+ case PTP_CLASS_V2_IPV6:
+ offset = OFF_PTP6;
+ break;
+ case PTP_CLASS_V2_L2:
+ offset = ETH_HLEN;
+ break;
+ case PTP_CLASS_V2_VLAN:
+ offset = ETH_HLEN + VLAN_HLEN;
+ break;
+ default:
+ return 0;
+ }
+
+ if (skb->len + ETH_HLEN < offset + OFF_PTP_SEQUENCE_ID + sizeof(*seqid))
+ return 0;
+
+ if (unlikely(ptp_class & PTP_CLASS_V1))
+ msgtype = data + offset + OFF_PTP_CONTROL;
+ else
+ msgtype = data + offset;
+
+ seqid = (u16 *)(data + offset + OFF_PTP_SEQUENCE_ID);
+
+ *evt_seqid = ntohs(*seqid);
+ *evt_msgtype = *msgtype & 0xf;
+
+ return 0;
+}
+
#endif
--
1.7.0.4
^ permalink raw reply related
* [PATCH 0/6] Add CPTS PTP driver support
From: Mugunthan V N @ 2012-10-16 22:45 UTC (permalink / raw)
To: netdev; +Cc: davem, Richard Cochran, Mugunthan V N
This patch series contains driver implementation for TI Common Platform
Time Sync (CPTS) driver for PTP packet timestamping.
CPTS is found in following TI SoC.
* AM335X - http://www.ti.com/litv/pdf/spruh73c
* DM814X - http://www.ti.com/litv/pdf/sprugz8
The Common Platform Time Sync (CPTS) module is used to facilitate host
control of time sync operations. It enables compliance with the IEEE 1588-2008
standard for a precision clock synchronization protocol
This patch series is tested over vanilla kernel with the below patches
http://marc.info/?l=linux-arm-kernel&m=135032863723906&w=2
Tested both L2 and L4 PTP packet timestamping
Mugunthan V N (6):
drivers: net: ethernet: cpsw: add support for CPSW register offset
changes in different IP version
drivers: net: ethernet: davinci_cpdma: add clear api for statistics
interrupt
drivers: net: ethernet: cpsw: add multicast address to ALE table
ptp: add api to get ptp seq id and event type from skb
drivers: net: ethernet: cpts: implement cpts hardware clock
drivers: net: ethernet: cpsw: implement timestamping capabilities in
cpsw
Documentation/devicetree/bindings/net/cpsw.txt | 3 +
drivers/net/ethernet/ti/Kconfig | 10 +
drivers/net/ethernet/ti/Makefile | 2 +-
drivers/net/ethernet/ti/cpsw.c | 409 ++++++++++++++++++++++--
drivers/net/ethernet/ti/cpsw_ale.c | 31 ++-
drivers/net/ethernet/ti/cpsw_ale.h | 1 +
drivers/net/ethernet/ti/cpts.c | 399 +++++++++++++++++++++++
drivers/net/ethernet/ti/cpts.h | 118 +++++++
drivers/net/ethernet/ti/davinci_cpdma.c | 8 +
drivers/net/ethernet/ti/davinci_cpdma.h | 1 +
include/linux/platform_data/cpsw.h | 1 +
include/linux/ptp_classify.h | 42 +++
12 files changed, 991 insertions(+), 34 deletions(-)
create mode 100644 drivers/net/ethernet/ti/cpts.c
create mode 100644 drivers/net/ethernet/ti/cpts.h
^ permalink raw reply
* [PATCH 2/6] drivers: net: ethernet: davinci_cpdma: add clear api for statistics interrupt
From: Mugunthan V N @ 2012-10-16 22:45 UTC (permalink / raw)
To: netdev; +Cc: davem, Richard Cochran, Mugunthan V N
In-Reply-To: <1350427518-7230-1-git-send-email-mugunthanvnm@ti.com>
Adding api to clear statistics interrupt which is generated by
CPTS event pend, stat pend, mdio interrupts
Cc: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
---
drivers/net/ethernet/ti/davinci_cpdma.c | 8 ++++++++
drivers/net/ethernet/ti/davinci_cpdma.h | 1 +
2 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/drivers/net/ethernet/ti/davinci_cpdma.c b/drivers/net/ethernet/ti/davinci_cpdma.c
index d15c888..656712c 100644
--- a/drivers/net/ethernet/ti/davinci_cpdma.c
+++ b/drivers/net/ethernet/ti/davinci_cpdma.c
@@ -63,6 +63,8 @@
#define CPDMA_TEARDOWN_VALUE 0xfffffffc
+#define CPDMA_STAT_PEND_EOI 0x3
+
struct cpdma_desc {
/* hardware fields */
u32 hw_next;
@@ -479,6 +481,12 @@ void cpdma_ctlr_eoi(struct cpdma_ctlr *ctlr)
dma_reg_write(ctlr, CPDMA_MACEOIVECTOR, 0);
}
+void cpdma_ctlr_eoi_statistics(struct cpdma_ctlr *ctlr)
+{
+ dma_reg_write(ctlr, CPDMA_MACEOIVECTOR, CPDMA_STAT_PEND_EOI);
+}
+EXPORT_SYMBOL_GPL(cpdma_ctlr_eoi_statistics);
+
struct cpdma_chan *cpdma_chan_create(struct cpdma_ctlr *ctlr, int chan_num,
cpdma_handler_fn handler)
{
diff --git a/drivers/net/ethernet/ti/davinci_cpdma.h b/drivers/net/ethernet/ti/davinci_cpdma.h
index afa19a0..e25e9d5 100644
--- a/drivers/net/ethernet/ti/davinci_cpdma.h
+++ b/drivers/net/ethernet/ti/davinci_cpdma.h
@@ -87,6 +87,7 @@ int cpdma_chan_process(struct cpdma_chan *chan, int quota);
int cpdma_ctlr_int_ctrl(struct cpdma_ctlr *ctlr, bool enable);
void cpdma_ctlr_eoi(struct cpdma_ctlr *ctlr);
+void cpdma_ctlr_eoi_statistics(struct cpdma_ctlr *ctlr);
int cpdma_chan_int_ctrl(struct cpdma_chan *chan, bool enable);
enum cpdma_control {
--
1.7.0.4
^ permalink raw reply related
* [PATCH 1/6] drivers: net: ethernet: cpsw: add support for CPSW register offset changes in different IP version
From: Mugunthan V N @ 2012-10-16 22:45 UTC (permalink / raw)
To: netdev; +Cc: davem, Richard Cochran, Mugunthan V N
In-Reply-To: <1350427518-7230-1-git-send-email-mugunthanvnm@ti.com>
Register offsets for slave register are different between the CPSW IP
found in TI814X and AM335X, so this patch adds support to access slave
registers with CPSW versions
Cc: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
---
drivers/net/ethernet/ti/cpsw.c | 86 +++++++++++++++++++++++++++++++---------
1 files changed, 67 insertions(+), 19 deletions(-)
diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index df55e24..cdf9ecc 100644
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -70,6 +70,11 @@ do { \
dev_notice(priv->dev, format, ## __VA_ARGS__); \
} while (0)
+#define CPSW_VERSION_1 0x19010a
+#define CPSW_VERSION_2 0x19010c
+#define cpsw_slave_reg(priv, slave, reg) \
+ ((slave)->regs + (priv)->slave_reg_ofs[(reg)])
+
#define CPSW_MAJOR_VERSION(reg) (reg >> 8 & 0x7)
#define CPSW_MINOR_VERSION(reg) (reg & 0xff)
#define CPSW_RTL_VERSION(reg) ((reg >> 11) & 0x1f)
@@ -117,6 +122,48 @@ do { \
disable_irq_nosync(priv->irqs_table[i]); \
} while (0);
+enum CPSW_SLAVE_REG_OFS {
+ MAX_BLKS,
+ BLK_CNT,
+ FLOW_THRESH,
+ PORT_VLAN,
+ TX_PRI_MAP,
+ TS_CTL,
+ TS_SEQ_LTYPE,
+ TS_VLAN,
+ SA_LO,
+ SA_HI,
+ PORT_CONTROL,
+ TS_SEQ_MTYPE,
+ TS_CONTROL,
+};
+
+static const u32 slave_reg_map_ip_v1[] = {
+ [MAX_BLKS] = 0x00,
+ [BLK_CNT] = 0x04,
+ [FLOW_THRESH] = 0x08,
+ [PORT_VLAN] = 0x0c,
+ [TX_PRI_MAP] = 0x10,
+ [TS_CTL] = 0x14,
+ [TS_SEQ_LTYPE] = 0x18,
+ [TS_VLAN] = 0x1c,
+ [SA_LO] = 0x20,
+ [SA_HI] = 0x24,
+};
+
+static const u32 slave_reg_map_ip_v2[] = {
+ [PORT_CONTROL] = 0x00,
+ [TS_CONTROL] = 0x04,
+ [MAX_BLKS] = 0x08,
+ [BLK_CNT] = 0x0c,
+ [FLOW_THRESH] = 0x10,
+ [PORT_VLAN] = 0x14,
+ [TX_PRI_MAP] = 0x18,
+ [TS_SEQ_MTYPE] = 0x1c,
+ [SA_LO] = 0x20,
+ [SA_HI] = 0x24,
+};
+
static int debug_level;
module_param(debug_level, int, 0);
MODULE_PARM_DESC(debug_level, "cpsw debug level (NETIF_MSG bits)");
@@ -146,19 +193,13 @@ struct cpsw_regs {
u32 soft_reset;
u32 stat_port_en;
u32 ptype;
-};
-
-struct cpsw_slave_regs {
- u32 max_blks;
- u32 blk_cnt;
- u32 flow_thresh;
- u32 port_vlan;
- u32 tx_pri_map;
- u32 ts_ctl;
- u32 ts_seq_ltype;
- u32 ts_vlan;
- u32 sa_lo;
- u32 sa_hi;
+ u32 soft_idle;
+ u32 thru_rate;
+ u32 gap_thresh;
+ u32 tx_start_wds;
+ u32 flow_control;
+ u32 vlan_ltype;
+ u32 ts_ltype;
};
struct cpsw_host_regs {
@@ -185,7 +226,7 @@ struct cpsw_sliver_regs {
};
struct cpsw_slave {
- struct cpsw_slave_regs __iomem *regs;
+ void __iomem *regs;
struct cpsw_sliver_regs __iomem *sliver;
int slave_num;
u32 mac_control;
@@ -215,6 +256,8 @@ struct cpsw_priv {
struct cpdma_ctlr *dma;
struct cpdma_chan *txch, *rxch;
struct cpsw_ale *ale;
+ u32 cpsw_version;
+ u32 *slave_reg_ofs;
/* snapshot of IRQ numbers */
u32 irqs_table[4];
u32 num_irqs;
@@ -359,8 +402,8 @@ static inline void soft_reset(const char *module, void __iomem *reg)
static void cpsw_set_slave_mac(struct cpsw_slave *slave,
struct cpsw_priv *priv)
{
- __raw_writel(mac_hi(priv->mac_addr), &slave->regs->sa_hi);
- __raw_writel(mac_lo(priv->mac_addr), &slave->regs->sa_lo);
+ writel(mac_hi(priv->mac_addr), cpsw_slave_reg(priv, slave, SA_HI));
+ writel(mac_lo(priv->mac_addr), cpsw_slave_reg(priv, slave, SA_LO));
}
static void _cpsw_adjust_link(struct cpsw_slave *slave,
@@ -445,8 +488,8 @@ static void cpsw_slave_open(struct cpsw_slave *slave, struct cpsw_priv *priv)
soft_reset(name, &slave->sliver->soft_reset);
/* setup priority mapping */
- __raw_writel(RX_PRIORITY_MAPPING, &slave->sliver->rx_pri_map);
- __raw_writel(TX_PRIORITY_MAPPING, &slave->regs->tx_pri_map);
+ writel(RX_PRIORITY_MAPPING, &slave->sliver->rx_pri_map);
+ writel(TX_PRIORITY_MAPPING, cpsw_slave_reg(priv, slave, TX_PRI_MAP));
/* setup max packet size, and mac address */
__raw_writel(priv->rx_packet_max, &slave->sliver->rx_maxlen);
@@ -505,7 +548,12 @@ static int cpsw_ndo_open(struct net_device *ndev)
pm_runtime_get_sync(&priv->pdev->dev);
- reg = __raw_readl(&priv->regs->id_ver);
+ reg = readl(&priv->regs->id_ver);
+ priv->cpsw_version = reg;
+ if (reg == CPSW_VERSION_1)
+ priv->slave_reg_ofs = (u32 *)slave_reg_map_ip_v1;
+ else
+ priv->slave_reg_ofs = (u32 *)slave_reg_map_ip_v2;
dev_info(priv->dev, "initializing cpsw version %d.%d (%d)\n",
CPSW_MAJOR_VERSION(reg), CPSW_MINOR_VERSION(reg),
--
1.7.0.4
^ permalink raw reply related
* [PATCH 5/6] drivers: net: ethernet: cpts: implement cpts hardware clock
From: Mugunthan V N @ 2012-10-16 22:45 UTC (permalink / raw)
To: netdev; +Cc: davem, Richard Cochran, Mugunthan V N
In-Reply-To: <1350427518-7230-1-git-send-email-mugunthanvnm@ti.com>
Implement of hardware clock and network packet time stamping
using CPTS module.
Cc: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
---
drivers/net/ethernet/ti/Kconfig | 10 +
drivers/net/ethernet/ti/Makefile | 2 +-
drivers/net/ethernet/ti/cpts.c | 399 ++++++++++++++++++++++++++++++++++++++
drivers/net/ethernet/ti/cpts.h | 118 +++++++++++
4 files changed, 528 insertions(+), 1 deletions(-)
create mode 100644 drivers/net/ethernet/ti/cpts.c
create mode 100644 drivers/net/ethernet/ti/cpts.h
diff --git a/drivers/net/ethernet/ti/Kconfig b/drivers/net/ethernet/ti/Kconfig
index b26cbda..6db7e6c 100644
--- a/drivers/net/ethernet/ti/Kconfig
+++ b/drivers/net/ethernet/ti/Kconfig
@@ -60,6 +60,16 @@ config TI_CPSW
To compile this driver as a module, choose M here: the module
will be called cpsw.
+config TI_CPTS
+ boolean "TI Common Platform Time Sync (CPTS) Support"
+ depends on TI_CPSW && (PTP_1588_CLOCK=y)
+ ---help---
+ This driver supports the Common Platform Time Sync unit of
+ the CPSW Ethernet Switch.
+
+ The unit can time stamp PTP UDP/IPv4
+ and Layer 2 packets, and the driver offers a PTP Hardware Clock.
+
config TLAN
tristate "TI ThunderLAN support"
depends on (PCI || EISA)
diff --git a/drivers/net/ethernet/ti/Makefile b/drivers/net/ethernet/ti/Makefile
index 91bd8bb..c65148e 100644
--- a/drivers/net/ethernet/ti/Makefile
+++ b/drivers/net/ethernet/ti/Makefile
@@ -8,4 +8,4 @@ obj-$(CONFIG_TI_DAVINCI_EMAC) += davinci_emac.o
obj-$(CONFIG_TI_DAVINCI_MDIO) += davinci_mdio.o
obj-$(CONFIG_TI_DAVINCI_CPDMA) += davinci_cpdma.o
obj-$(CONFIG_TI_CPSW) += ti_cpsw.o
-ti_cpsw-y := cpsw_ale.o cpsw.o
+ti_cpsw-y := cpsw_ale.o cpsw.o cpts.o
diff --git a/drivers/net/ethernet/ti/cpts.c b/drivers/net/ethernet/ti/cpts.c
new file mode 100644
index 0000000..dd2b37b
--- /dev/null
+++ b/drivers/net/ethernet/ti/cpts.c
@@ -0,0 +1,399 @@
+/*
+ * Texas Instruments Common Platform Time Sync PTP Clock Driver
+ *
+ * Copyright (C) 2012 Texas Instruments
+ *
+ * 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 version 2.
+ *
+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any
+ * kind, whether express or implied; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+/*
+ * PTP 1588 clock using the CPTS
+ */
+#include <linux/module.h>
+#include <linux/device.h>
+#include <linux/ptp_classify.h>
+#include <linux/ptp_clock_kernel.h>
+#include <plat/clock.h>
+#include <linux/clk.h>
+#include <linux/skbuff.h>
+
+#include "cpts.h"
+
+#ifdef CONFIG_TI_CPTS
+
+#define nanosec_to_cptscount(cpts, ns) (div_u64((ns), \
+ (cpts)->time_offs_correction))
+#define cptscount_to_nanosec(cpts, ns) ((ns) * (cpts)->time_offs_correction)
+
+static struct sock_filter ptp_filter[] = {
+ PTP_FILTER
+};
+
+void cpts_systime_write(struct cpts_priv *cpts, u64 ns)
+{
+ ns = nanosec_to_cptscount(cpts, ns);
+ writel((u32)(ns & 0xffffffff), &cpts->reg->ts_load_val);
+ writel(CPTS_TS_LOAD_CMD, &cpts->reg->ts_load_en);
+ cpts->tshi = (u32)(ns >> 32);
+}
+
+int cpts_systime_read(struct cpts_priv *cpts, u64 *ns)
+{
+ int ret = 0;
+ int i;
+
+ cpts->time_push = 0;
+ writel(CPTS_TS_PUSH_CMD, &cpts->reg->ts_push);
+ for (i = 0; i < CPTS_EVT_RETRY_COUNT; i++) {
+ cpts_event_fifo_read(cpts);
+ if (cpts->time_push)
+ break;
+ }
+ if (i >= CPTS_EVT_RETRY_COUNT) {
+ *ns = 0;
+ return -EBUSY;
+ }
+
+ *ns = cpts->time_push;
+ return ret;
+}
+
+static int cpts_evt_expired(struct cpts_evts *evt)
+{
+ return time_after(jiffies, evt->timeout);
+}
+
+static void cpts_rx_timestamp_pop(struct cpts_priv *cpts,
+ struct sk_buff *skb, u32 evt_high)
+{
+ struct skb_shared_hwtstamps *shhwtstamps;
+ struct list_head *this, *next;
+ struct cpts_evts *evt;
+ unsigned long flags;
+
+ spin_lock_irqsave(&cpts->lock, flags);
+ list_for_each_safe(this, next, &cpts->ts_list) {
+ evt = list_entry(this, struct cpts_evts, list);
+ if (evt_high == evt->event_high) {
+ shhwtstamps = skb_hwtstamps(skb);
+ memset(shhwtstamps, 0, sizeof(*shhwtstamps));
+ shhwtstamps->hwtstamp = ns_to_ktime(evt->ts);
+ list_del_init(&evt->list);
+ list_add(&evt->list, &cpts->ts_pool);
+ break;
+ } else if (cpts_evt_expired(evt)) {
+ list_del_init(&evt->list);
+ list_add(&evt->list, &cpts->ts_pool);
+ }
+ }
+ spin_unlock_irqrestore(&cpts->lock, flags);
+}
+
+static void cpts_tx_timestamp_pop(struct cpts_priv *cpts,
+ struct sk_buff *skb, u32 evt_high)
+{
+ struct skb_shared_hwtstamps shhwtstamps;
+ struct list_head *this, *next;
+ struct cpts_evts *evt;
+ unsigned long flags;
+
+ spin_lock_irqsave(&cpts->lock, flags);
+ list_for_each_safe(this, next, &cpts->ts_list) {
+ evt = list_entry(this, struct cpts_evts, list);
+ if (evt_high == evt->event_high) {
+ memset(&shhwtstamps, 0,
+ sizeof(struct skb_shared_hwtstamps));
+ shhwtstamps.hwtstamp = ns_to_ktime(evt->ts);
+ skb_tstamp_tx(skb, &shhwtstamps);
+ list_del_init(&evt->list);
+ list_add(&evt->list, &cpts->ts_pool);
+ break;
+ }
+ }
+ spin_unlock_irqrestore(&cpts->lock, flags);
+}
+
+/*
+ * PTP clock operations
+ */
+
+static int ptp_cpts_adjfreq(struct ptp_clock_info *ptp, s32 ppb)
+{
+ unsigned long freq, target_freq, current_freq;
+ int diff;
+ int neg_adj = 0;
+ u64 adj;
+ struct cpts_priv *cpts = container_of(ptp, struct cpts_priv,
+ caps);
+
+ if (IS_ERR(cpts->refclk)) {
+ /* No clock to adjust frequency */
+ return 0;
+ }
+ current_freq = cpts->refclk->recalc(
+ cpts->refclk);
+ freq = cpts->initial_freq;
+
+ if (ppb < 0) {
+ neg_adj = 1;
+ ppb = -ppb;
+ }
+
+ adj = freq;
+ adj *= ppb;
+ diff = div_u64(adj, GHZ_COUNTS_PER_SEC);
+ target_freq = (neg_adj ? freq - diff : freq + diff);
+
+ clk_set_rate(cpts->refclk, target_freq);
+
+ return 0;
+}
+
+static int ptp_cpts_adjtime(struct ptp_clock_info *ptp, s64 delta)
+{
+ s64 now;
+ unsigned long flags;
+ struct cpts_priv *cpts = container_of(ptp,
+ struct cpts_priv, caps);
+
+ spin_lock_irqsave(&cpts->lock, flags);
+
+ cpts_systime_read(cpts, &now);
+ now += delta;
+ cpts_systime_write(cpts, now);
+
+ spin_unlock_irqrestore(&cpts->lock, flags);
+
+ return 0;
+}
+
+static int ptp_cpts_gettime(struct ptp_clock_info *ptp, struct timespec *ts)
+{
+ u64 ns;
+ unsigned long flags;
+ struct cpts_priv *cpts = container_of(ptp,
+ struct cpts_priv, caps);
+
+ spin_lock_irqsave(&cpts->lock, flags);
+
+ cpts_systime_read(cpts, &ns);
+
+ spin_unlock_irqrestore(&cpts->lock, flags);
+
+ *ts = ns_to_timespec(ns);
+ return 0;
+}
+
+static int ptp_cpts_settime(struct ptp_clock_info *ptp,
+ const struct timespec *ts)
+{
+ u64 ns;
+ unsigned long flags;
+ struct cpts_priv *cpts = container_of(ptp,
+ struct cpts_priv, caps);
+
+ ns = timespec_to_ns(ts);
+
+ spin_lock_irqsave(&cpts->lock, flags);
+
+ cpts_systime_write(cpts, ns);
+
+ spin_unlock_irqrestore(&cpts->lock, flags);
+
+ return 0;
+}
+
+static int ptp_cpts_enable(struct ptp_clock_info *ptp,
+ struct ptp_clock_request *rq, int on)
+{
+ return -EOPNOTSUPP;
+}
+
+static struct ptp_clock_info ptp_cpts_caps = {
+ .owner = THIS_MODULE,
+ .name = "CTPS timer",
+ .n_ext_ts = EXT_TS_INSTANCE_CNT,
+ .pps = 0,
+ .adjfreq = ptp_cpts_adjfreq,
+ .adjtime = ptp_cpts_adjtime,
+ .gettime = ptp_cpts_gettime,
+ .settime = ptp_cpts_settime,
+ .enable = ptp_cpts_enable,
+};
+
+void cpts_event_fifo_read(struct cpts_priv *cpts)
+{
+ while (readl(&cpts->reg->intstat_raw) & 0x01) {
+ u64 ts;
+ u32 event_high;
+ u32 event_tslo;
+ u32 evt_type;
+ struct cpts_evts *evt;
+
+ event_high = readl(&cpts->reg->event_high);
+ event_tslo = readl(&cpts->reg->event_low);
+ writel(CPTS_EVT_POP, &cpts->reg->event_pop);
+
+ if (cpts->first_half && event_tslo & CPTS_CNT_FIRST_HALF)
+ ts = (u64)(cpts->tshi - 1); /* this is misaligned ts */
+ else
+ ts = (u64)(cpts->tshi);
+ ts = (ts << 32) | event_tslo;
+ ts = cptscount_to_nanosec(cpts, ts);
+
+ evt_type = event_high & CPTS_EVT_MASK;
+
+ switch (evt_type) {
+ case CPTS_TS_PUSH:
+ /*Push TS to Read */
+ cpts->time_push = ts;
+ break;
+
+ case CPTS_TS_ROLLOVER:
+ /* Roll over */
+ cpts->tshi++;
+ cpts->first_half = true;
+ break;
+
+ case CPTS_TS_HROLLOVER:
+ /* Half Roll Over */
+ cpts->first_half = false;
+ break;
+
+ case CPTS_TS_HW_PUSH:
+ /* HW TS Push */
+ pr_err("CPTS hwts are not utilized\n");
+ /* TBD */
+ break;
+
+ case CPTS_TS_ETH_RX:
+ /* Ethernet Rx Ts */
+ if (!cpts->enable_rxts)
+ break;
+ evt = list_first_entry(&cpts->ts_pool,
+ struct cpts_evts, list);
+ list_del_init(&evt->list);
+ evt->event_high = event_high & CPTS_EVT_TS_MASK;
+ evt->ts = ts;
+ list_add_tail(&evt->list, &cpts->ts_list);
+ break;
+
+ case CPTS_TS_ETH_TX:
+ /* Ethernet Tx Ts */
+ if (!cpts->enable_txts)
+ break;
+ evt = list_first_entry(&cpts->ts_pool,
+ struct cpts_evts, list);
+ list_del_init(&evt->list);
+ evt->event_high = event_high & CPTS_EVT_TS_MASK;
+ evt->ts = ts;
+ list_add_tail(&evt->list, &cpts->ts_list);
+ break;
+ }
+ }
+}
+
+void cpts_rx_timestamp(struct cpts_priv *cpts, struct sk_buff *skb)
+{
+ u32 evt_high = 0;
+ u16 seq_id = 0;
+ u8 evt_type = 0;
+ u32 ptp_class = 0;
+
+ if (!cpts->enable_rxts)
+ return;
+
+ ptp_class = sk_run_filter(skb, ptp_filter);
+ if (ptp_class == PTP_CLASS_NONE)
+ return;
+
+ ptp_get_skb_event(skb, ptp_class, &seq_id, &evt_type);
+ evt_high = seq_id | (evt_type << 16) | CPTS_TS_ETH_RX;
+ cpts_rx_timestamp_pop(cpts, skb, evt_high);
+}
+
+void cpts_tx_timestamp(struct cpts_priv *cpts, struct sk_buff *skb)
+{
+ u32 evt_high = 0;
+ u16 seq_id = 0;
+ u8 evt_type = 0;
+ u32 ptp_class = 0;
+
+ if (!cpts->enable_txts)
+ return;
+
+ ptp_class = sk_run_filter(skb, ptp_filter);
+ if (ptp_class == PTP_CLASS_NONE)
+ return;
+
+ ptp_get_skb_event(skb, ptp_class, &seq_id, &evt_type);
+ evt_high = seq_id | (evt_type << 16) | CPTS_TS_ETH_TX;
+ cpts_tx_timestamp_pop(cpts, skb, evt_high);
+}
+
+void cpts_unregister(struct cpts_priv *cpts)
+{
+ if (!IS_ERR(cpts->refclk)) {
+ clk_disable(cpts->refclk);
+ clk_put(cpts->refclk);
+ }
+ if (!IS_ERR(cpts->ptp_clock))
+ ptp_clock_unregister(cpts->ptp_clock);
+}
+
+int cpts_register(struct device *dev, struct cpts_priv *cpts)
+{
+ int i;
+ u32 reg;
+
+ reg = readl(&cpts->reg->id_ver);
+ if (reg != CPTS_VERSION) {
+ pr_err("cpts: Cannot find CPTS\n");
+ return -ENODEV;
+ }
+
+ if (ptp_filter_init(ptp_filter, ARRAY_SIZE(ptp_filter))) {
+ pr_err("cpts: bad ptp filter\n");
+ return -EINVAL;
+ }
+
+ cpts->refclk = clk_get(NULL, CPTS_REF_CLOCK_NAME);
+ if (IS_ERR(cpts->refclk)) {
+ pr_err("cpts: Could not get %s clk\n", CPTS_REF_CLOCK_NAME);
+ return PTR_ERR(cpts->ptp_clock);
+ }
+ clk_enable(cpts->refclk);
+ spin_lock_init(&cpts->lock);
+
+ INIT_LIST_HEAD(&cpts->ts_list);
+ INIT_LIST_HEAD(&cpts->ts_pool);
+ for (i = 0; i < CPTS_TS_POOL_SIZE; i++)
+ list_add(&cpts->ts_pool_data[i].list, &cpts->ts_pool);
+
+ cpts->initial_freq = cpts->refclk->recalc(cpts->refclk);
+ cpts->time_offs_correction = GHZ_COUNTS_PER_SEC/cpts->initial_freq;
+ cpts->caps = ptp_cpts_caps;
+
+ cpts->ptp_clock = ptp_clock_register(&cpts->caps, dev);
+ if (IS_ERR(cpts->ptp_clock)) {
+ clk_disable(cpts->refclk);
+ clk_put(cpts->refclk);
+ return PTR_ERR(cpts->ptp_clock);
+ }
+
+ pr_info("Found CPTS and initializing...\n");
+ /* Enable CPTS */
+ writel(CPTS_CTRL_EN, &cpts->reg->control);
+ /* Enable CPTS Interrupt */
+ writel(CPTS_INTR_EN, &cpts->reg->int_enable);
+
+ return 0;
+}
+
+#endif
diff --git a/drivers/net/ethernet/ti/cpts.h b/drivers/net/ethernet/ti/cpts.h
new file mode 100644
index 0000000..bc48dc4
--- /dev/null
+++ b/drivers/net/ethernet/ti/cpts.h
@@ -0,0 +1,118 @@
+/*
+ * Texas Instruments Common Platform Time Sync Header
+ *
+ * Copyright (C) 2012 Texas Instruments
+ *
+ * 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 version 2.
+ *
+ * This program is distributed "as is" WITHOUT ANY WARRANTY of any
+ * kind, whether express or implied; without even the implied warranty
+ * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef __TI_CPTS_H__
+#define __TI_CPTS_H__
+
+#include <linux/ptp_clock_kernel.h>
+#include <linux/device.h>
+#include <linux/skbuff.h>
+
+#define CPTS_VERSION 0x4e8a0101
+#define CPTS_CTRL_EN BIT(0)
+#define CPTS_INTR_EN BIT(0)
+#define CPTS_EVT_POP BIT(0)
+#define CPTS_TS_PUSH_CMD BIT(0)
+#define CPTS_TS_LOAD_CMD BIT(0)
+#define CPTS_TS_PUSH 0x0
+#define CPTS_TS_ROLLOVER (0x1 << 20)
+#define CPTS_TS_HROLLOVER (0x2 << 20)
+#define CPTS_TS_HW_PUSH (0x3 << 20)
+#define CPTS_TS_ETH_RX (0x4 << 20)
+#define CPTS_TS_ETH_TX (0x5 << 20)
+#define CPSW_801_1Q_LTYPE 0x88f7
+#define CPSW_SEQ_ID_OFS 0x1e
+#define CPTS_CNT_FIRST_HALF BIT(31)
+#define CPTS_EVT_MASK 0xf00000
+#define CPTS_EVT_RETRY_COUNT 20
+#define CPTS_INT_MASK BIT(0)
+#define CPTS_EVT_TS_MASK 0xffffff
+#define GHZ_COUNTS_PER_SEC 1000000000ULL
+
+#define CPTS_TS_POOL_SIZE 32
+
+#define CPTS_READ_TS_MAX_TRY 20
+#define CPTS_REF_CLOCK_NAME "cpsw_cpts_rft_clk"
+#define EXT_TS_INSTANCE_CNT 4
+/*
+ * CPTS Regs
+ */
+struct cpts_regs {
+ u32 id_ver;
+ u32 control;
+ u32 rftclk_sel;
+ u32 ts_push;
+ u32 ts_load_val;
+ u32 ts_load_en;
+ u32 mem_allign1[2];
+ u32 intstat_raw;
+ u32 intstat_masked;
+ u32 int_enable;
+ u32 mem_allign2;
+ u32 event_pop;
+ u32 event_low;
+ u32 event_high;
+};
+
+/*
+ * CPTS Events
+ */
+struct cpts_evts {
+ struct list_head list;
+ u32 event_high;
+ u64 ts;
+ unsigned long timeout;
+};
+
+/*
+ * Time Handle
+ */
+struct cpts_priv {
+ spinlock_t lock;
+ struct ptp_clock *ptp_clock;
+ struct ptp_clock_info caps;
+ struct cpts_regs __iomem *reg;
+ struct list_head ts_list;
+ struct list_head ts_pool;
+ struct cpts_evts ts_pool_data[CPTS_TS_POOL_SIZE];
+ struct clk *refclk;
+ u64 time_push;
+ bool enable_txts;
+ bool enable_rxts;
+ u32 tshi;
+ bool first_half;
+ u32 initial_freq;
+ u32 time_offs_correction;
+};
+
+#ifdef CONFIG_TI_CPTS
+
+void cpts_rx_timestamp(struct cpts_priv *cpts, struct sk_buff *skb);
+void cpts_tx_timestamp(struct cpts_priv *cpts, struct sk_buff *skb);
+int cpts_register(struct device *dev, struct cpts_priv *cpts);
+void cpts_unregister(struct cpts_priv *cpts);
+void cpts_event_fifo_read(struct cpts_priv *cpts);
+
+#else
+
+#define cpts_rx_timestamp(cpts, skb)
+#define cpts_tx_timestamp(cpts, skb)
+#define cpts_register(dev, cpts) (-ENODEV)
+#define cpts_unregister(cpts)
+#define cpts_event_fifo_read(cpts)
+
+#endif
+
+#endif
--
1.7.0.4
^ permalink raw reply related
* [PATCH 3/6] drivers: net: ethernet: cpsw: add multicast address to ALE table
From: Mugunthan V N @ 2012-10-16 22:45 UTC (permalink / raw)
To: netdev; +Cc: davem, Richard Cochran, Mugunthan V N
In-Reply-To: <1350427518-7230-1-git-send-email-mugunthanvnm@ti.com>
Adding multicast address to ALE table via netdev ops to subscribe, transmit
or receive multicast frames to and from the network
Cc: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
---
drivers/net/ethernet/ti/cpsw.c | 27 +++++++++++++++++++++++++++
drivers/net/ethernet/ti/cpsw_ale.c | 31 ++++++++++++++++++++++++++++---
drivers/net/ethernet/ti/cpsw_ale.h | 1 +
3 files changed, 56 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index cdf9ecc..b6af1c6 100644
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -75,6 +75,8 @@ do { \
#define cpsw_slave_reg(priv, slave, reg) \
((slave)->regs + (priv)->slave_reg_ofs[(reg)])
+#define ALE_ALL_PORTS 0x7
+
#define CPSW_MAJOR_VERSION(reg) (reg >> 8 & 0x7)
#define CPSW_MINOR_VERSION(reg) (reg & 0xff)
#define CPSW_RTL_VERSION(reg) ((reg >> 11) & 0x1f)
@@ -271,6 +273,30 @@ struct cpsw_priv {
(func)((priv)->slaves + idx, ##arg); \
} while (0)
+static void cpsw_ndo_set_rx_mode(struct net_device *ndev)
+{
+ struct cpsw_priv *priv = netdev_priv(ndev);
+
+ if (ndev->flags & IFF_PROMISC) {
+ /* Enable promiscuous mode */
+ dev_err(priv->dev, "Ignoring Promiscuous mode\n");
+ return;
+ }
+
+ /* Clear all mcast from ALE */
+ cpsw_ale_flush_multicast(priv->ale, ALE_ALL_PORTS << priv->host_port);
+
+ if (!netdev_mc_empty(ndev)) {
+ struct netdev_hw_addr *ha;
+
+ /* program multicast address list into ALE register */
+ netdev_for_each_mc_addr(ha, ndev) {
+ cpsw_ale_add_mcast(priv->ale, (u8 *)ha->addr,
+ ALE_ALL_PORTS << priv->host_port, 0, 0);
+ }
+ }
+}
+
static void cpsw_intr_enable(struct cpsw_priv *priv)
{
__raw_writel(0xFF, &priv->ss_regs->tx_en);
@@ -721,6 +747,7 @@ static const struct net_device_ops cpsw_netdev_ops = {
.ndo_change_mtu = eth_change_mtu,
.ndo_tx_timeout = cpsw_ndo_tx_timeout,
.ndo_get_stats = cpsw_ndo_get_stats,
+ .ndo_set_rx_mode = cpsw_ndo_set_rx_mode,
#ifdef CONFIG_NET_POLL_CONTROLLER
.ndo_poll_controller = cpsw_ndo_poll_controller,
#endif
diff --git a/drivers/net/ethernet/ti/cpsw_ale.c b/drivers/net/ethernet/ti/cpsw_ale.c
index ca0d48a..0e9ccc2 100644
--- a/drivers/net/ethernet/ti/cpsw_ale.c
+++ b/drivers/net/ethernet/ti/cpsw_ale.c
@@ -20,6 +20,7 @@
#include <linux/io.h>
#include <linux/stat.h>
#include <linux/sysfs.h>
+#include <linux/etherdevice.h>
#include "cpsw_ale.h"
@@ -211,10 +212,34 @@ static void cpsw_ale_flush_mcast(struct cpsw_ale *ale, u32 *ale_entry,
mask &= ~port_mask;
/* free if only remaining port is host port */
- if (mask == BIT(ale->params.ale_ports))
- cpsw_ale_set_entry_type(ale_entry, ALE_TYPE_FREE);
- else
+ if (mask)
cpsw_ale_set_port_mask(ale_entry, mask);
+ else
+ cpsw_ale_set_entry_type(ale_entry, ALE_TYPE_FREE);
+}
+
+int cpsw_ale_flush_multicast(struct cpsw_ale *ale, int port_mask)
+{
+ u32 ale_entry[ALE_ENTRY_WORDS];
+ int ret, idx;
+
+ for (idx = 0; idx < ale->params.ale_entries; idx++) {
+ cpsw_ale_read(ale, idx, ale_entry);
+ ret = cpsw_ale_get_entry_type(ale_entry);
+ if (ret != ALE_TYPE_ADDR && ret != ALE_TYPE_VLAN_ADDR)
+ continue;
+
+ if (cpsw_ale_get_mcast(ale_entry)) {
+ u8 addr[6];
+
+ cpsw_ale_get_addr(ale_entry, addr);
+ if (!is_broadcast_ether_addr(addr))
+ cpsw_ale_flush_mcast(ale, ale_entry, port_mask);
+ }
+
+ cpsw_ale_write(ale, idx, ale_entry);
+ }
+ return 0;
}
static void cpsw_ale_flush_ucast(struct cpsw_ale *ale, u32 *ale_entry,
diff --git a/drivers/net/ethernet/ti/cpsw_ale.h b/drivers/net/ethernet/ti/cpsw_ale.h
index a95b37b..2bd09cb 100644
--- a/drivers/net/ethernet/ti/cpsw_ale.h
+++ b/drivers/net/ethernet/ti/cpsw_ale.h
@@ -80,6 +80,7 @@ void cpsw_ale_stop(struct cpsw_ale *ale);
int cpsw_ale_set_ageout(struct cpsw_ale *ale, int ageout);
int cpsw_ale_flush(struct cpsw_ale *ale, int port_mask);
+int cpsw_ale_flush_multicast(struct cpsw_ale *ale, int port_mask);
int cpsw_ale_add_ucast(struct cpsw_ale *ale, u8 *addr, int port, int flags);
int cpsw_ale_del_ucast(struct cpsw_ale *ale, u8 *addr, int port);
int cpsw_ale_add_mcast(struct cpsw_ale *ale, u8 *addr, int port_mask,
--
1.7.0.4
^ permalink raw reply related
* [PATCH 6/6] drivers: net: ethernet: cpsw: implement timestamping capabilities in cpsw
From: Mugunthan V N @ 2012-10-16 22:45 UTC (permalink / raw)
To: netdev; +Cc: davem, Richard Cochran, Mugunthan V N
In-Reply-To: <1350427518-7230-1-git-send-email-mugunthanvnm@ti.com>
This patch implements timestamping capabilities in cpsw through IOCTL interface
to enable and disable PTP time stamping and adds hardware time stamps to the
packet's skb buffer using cpts api
Cc: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
---
Documentation/devicetree/bindings/net/cpsw.txt | 3 +
drivers/net/ethernet/ti/cpsw.c | 296 +++++++++++++++++++++++-
include/linux/platform_data/cpsw.h | 1 +
3 files changed, 289 insertions(+), 11 deletions(-)
diff --git a/Documentation/devicetree/bindings/net/cpsw.txt b/Documentation/devicetree/bindings/net/cpsw.txt
index dcaabe9..7111019 100644
--- a/Documentation/devicetree/bindings/net/cpsw.txt
+++ b/Documentation/devicetree/bindings/net/cpsw.txt
@@ -16,6 +16,7 @@ Required properties:
- ale_entries : Specifies No of entries ALE can hold
- host_port_reg_ofs : Specifies host port register offset
- hw_stats_reg_ofs : Specifies hardware statistics register offset
+- cpts_reg_ofs : Specifies the offset of the CPTS registers
- bd_ram_ofs : Specifies internal desciptor RAM offset
- bd_ram_size : Specifies internal descriptor RAM size
- rx_descs : Specifies number of Rx descriptors
@@ -52,6 +53,7 @@ Examples:
ale_entries = <1024>;
host_port_reg_ofs = <0x108>;
hw_stats_reg_ofs = <0x900>;
+ cpts_reg_ofs = <0xc00>;
bd_ram_ofs = <0x2000>;
bd_ram_size = <0x2000>;
no_bd_ram = <0>;
@@ -86,6 +88,7 @@ Examples:
ale_entries = <1024>;
host_port_reg_ofs = <0x108>;
hw_stats_reg_ofs = <0x900>;
+ cpts_reg_ofs = <0xc00>;
bd_ram_ofs = <0x2000>;
bd_ram_size = <0x2000>;
no_bd_ram = <0>;
diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index b6af1c6..45babaa 100644
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -31,11 +31,13 @@
#include <linux/of.h>
#include <linux/of_net.h>
#include <linux/of_device.h>
+#include <linux/net_tstamp.h>
#include <linux/platform_data/cpsw.h>
#include "cpsw_ale.h"
#include "davinci_cpdma.h"
+#include "cpts.h"
#define CPSW_DEBUG (NETIF_MSG_HW | NETIF_MSG_WOL | \
NETIF_MSG_DRV | NETIF_MSG_LINK | \
@@ -124,6 +126,41 @@ do { \
disable_irq_nosync(priv->irqs_table[i]); \
} while (0);
+#define CPSW_MISC_INTR_EN BIT(4)
+
+#define CPSW_EVT_SYNC_EN BIT(0)
+#define CPSW_EVT_DELAY_REQ_EN BIT(1)
+#define CPSW_EVT_PDELAY_REQ_EN BIT(2)
+#define CPSW_EVT_PDELAY_RESP_EN BIT(3)
+#define CPSW_EVT_MSG_TYPE_EN (CPSW_EVT_SYNC_EN | \
+ CPSW_EVT_DELAY_REQ_EN | \
+ CPSW_EVT_PDELAY_REQ_EN | \
+ CPSW_EVT_PDELAY_RESP_EN)
+#define CPSW_V1_TS_RX_EN BIT(0)
+#define CPSW_V1_TS_TX_EN BIT(4)
+#define CPSW_V1_MSG_TYPE_OFS 16
+#define CPSW_V1_SEQ_ID_OFS_SHIFT 16
+
+#define CPSW_V2_TS_RX_EN BIT(0)
+#define CPSW_V2_TS_TX_EN BIT(1)
+#define CPSW_V2_TS_LTYPE_1_EN BIT(2)
+#define CPSW_V2_TS_LTYPE_2_EN BIT(3)
+#define CPSW_V2_TS_ANNEX_D_EN BIT(4)
+#define CPSW_V2_TS_320 BIT(14)
+#define CPSW_V2_TS_319 BIT(13)
+#define CPSW_V2_TS_132 BIT(12)
+#define CPSW_V2_TS_131 BIT(11)
+#define CPSW_V2_TS_130 BIT(10)
+#define CPSW_V2_TS_129 BIT(9)
+#define CPSW_V2_TS_TTL BIT(8)
+#define CPSW_V2_SEQ_ID_OFS_SHIFT 16
+#define CPSW_V2_TS_EN (CPSW_V2_TS_ANNEX_D_EN | \
+ CPSW_V2_TS_LTYPE_1_EN | \
+ CPSW_V2_TS_320 | CPSW_V2_TS_319 | \
+ CPSW_V2_TS_132 | CPSW_V2_TS_131 | \
+ CPSW_V2_TS_130 | CPSW_V2_TS_129 | \
+ CPSW_V2_TS_TTL)
+
enum CPSW_SLAVE_REG_OFS {
MAX_BLKS,
BLK_CNT,
@@ -248,6 +285,7 @@ struct cpsw_priv {
struct cpsw_regs __iomem *regs;
struct cpsw_ss_regs __iomem *ss_regs;
struct cpsw_host_regs __iomem *host_port_regs;
+ struct cpts_priv *cpts;
u32 msg_enable;
struct net_device_stats stats;
int rx_packet_max;
@@ -263,6 +301,7 @@ struct cpsw_priv {
/* snapshot of IRQ numbers */
u32 irqs_table[4];
u32 num_irqs;
+ u32 statistics_irq;
};
#define napi_to_priv(napi) container_of(napi, struct cpsw_priv, napi)
@@ -297,6 +336,180 @@ static void cpsw_ndo_set_rx_mode(struct net_device *ndev)
}
}
+#ifdef CONFIG_TI_CPTS
+
+#define cpts_interrupt(priv) \
+ do { \
+ if (unlikely(readl(&priv->cpts->reg->intstat_raw) & 0x01)) \
+ cpts_event_fifo_read(priv->cpts); \
+ } while (0)
+
+static int cpts_enable_ts(struct cpsw_priv *priv, bool tx_state, bool rx_state)
+{
+ u32 ts_en = 0;
+ u32 seq_id = 0;
+
+ if (priv->cpsw_version == CPSW_VERSION_1) {
+ if (tx_state || rx_state) {
+ /* Enable TS */
+ if (tx_state)
+ ts_en = CPSW_V1_TS_TX_EN;
+ if (rx_state)
+ ts_en |= CPSW_V1_TS_RX_EN;
+ ts_en |= CPSW_EVT_MSG_TYPE_EN << CPSW_V1_MSG_TYPE_OFS;
+
+ writel(ts_en, cpsw_slave_reg(priv, &priv->slaves[0],
+ TS_CTL));
+ writel(ts_en, cpsw_slave_reg(priv, &priv->slaves[1],
+ TS_CTL));
+
+ seq_id = (CPSW_SEQ_ID_OFS << CPSW_V1_SEQ_ID_OFS_SHIFT) |
+ CPSW_801_1Q_LTYPE;
+ writel(seq_id, cpsw_slave_reg(priv, &priv->slaves[0],
+ TS_SEQ_LTYPE));
+ writel(seq_id, cpsw_slave_reg(priv, &priv->slaves[1],
+ TS_SEQ_LTYPE));
+ } else {
+ /* Disable TS */
+ writel(0, cpsw_slave_reg(priv, &priv->slaves[0],
+ TS_CTL));
+ writel(0, cpsw_slave_reg(priv, &priv->slaves[1],
+ TS_CTL));
+ }
+ } else {
+ if (tx_state || rx_state) {
+ /* Enable TS */
+ if (tx_state)
+ ts_en = CPSW_V2_TS_TX_EN;
+ if (rx_state)
+ ts_en |= CPSW_V2_TS_RX_EN;
+ ts_en |= CPSW_V2_TS_EN;
+
+ writel(ts_en, cpsw_slave_reg(priv, &priv->slaves[0],
+ PORT_CONTROL));
+ writel(ts_en, cpsw_slave_reg(priv, &priv->slaves[1],
+ PORT_CONTROL));
+
+ seq_id = (CPSW_SEQ_ID_OFS << CPSW_V2_SEQ_ID_OFS_SHIFT) |
+ CPSW_EVT_MSG_TYPE_EN;
+ writel(seq_id, cpsw_slave_reg(priv, &priv->slaves[0],
+ TS_SEQ_MTYPE));
+ writel(seq_id, cpsw_slave_reg(priv, &priv->slaves[1],
+ TS_SEQ_MTYPE));
+
+ writel(CPSW_801_1Q_LTYPE, &priv->regs->ts_ltype);
+ } else {
+ /* Disable TS */
+ writel(0, cpsw_slave_reg(priv, &priv->slaves[0],
+ PORT_CONTROL));
+ writel(0, cpsw_slave_reg(priv, &priv->slaves[1],
+ PORT_CONTROL));
+
+ writel(0, cpsw_slave_reg(priv, &priv->slaves[0],
+ TS_SEQ_MTYPE));
+ writel(0, cpsw_slave_reg(priv, &priv->slaves[1],
+ TS_SEQ_MTYPE));
+ }
+ }
+
+ if (tx_state || rx_state)
+ pr_info("cpts: Enabling PTP Time stamping...\n");
+ else
+ pr_info("cpts: Disabling PTP Time stamping...\n");
+
+ return 0;
+}
+
+static int cpsw_hwtstamp_ioctl(struct net_device *ndev,
+ struct ifreq *ifr, int cmd)
+{
+ struct hwtstamp_config config;
+ struct cpsw_priv *priv = netdev_priv(ndev);
+
+ if (copy_from_user(&config, ifr->ifr_data, sizeof(config)))
+ return -EFAULT;
+
+ netdev_dbg(priv->ndev,
+ "%s config flag:0x%x, tx_type:0x%x, rx_filter:0x%x\n",
+ __func__, config.flags, config.tx_type, config.rx_filter);
+
+ /* reserved for future extensions */
+ if (config.flags)
+ return -EINVAL;
+
+ switch (config.tx_type) {
+ case HWTSTAMP_TX_OFF:
+ priv->cpts->enable_txts = false;
+ break;
+ case HWTSTAMP_TX_ON:
+ priv->cpts->enable_txts = true;
+ break;
+ default:
+ return -ERANGE;
+ }
+
+ switch (config.rx_filter) {
+ case HWTSTAMP_FILTER_NONE:
+ /*
+ * Don't allow any timestamping
+ */
+ priv->cpts->enable_rxts = false;
+ break;
+
+ case HWTSTAMP_FILTER_PTP_V1_L4_EVENT:
+ case HWTSTAMP_FILTER_PTP_V1_L4_SYNC:
+ case HWTSTAMP_FILTER_PTP_V1_L4_DELAY_REQ:
+ netdev_err(priv->ndev,
+ "PTP V1 L4 Timestamping is not supported!!!\n");
+ config.rx_filter = HWTSTAMP_FILTER_NONE;
+ config.tx_type = HWTSTAMP_TX_OFF;
+ break;
+
+ case HWTSTAMP_FILTER_PTP_V2_L4_EVENT:
+ case HWTSTAMP_FILTER_PTP_V2_L4_SYNC:
+ case HWTSTAMP_FILTER_PTP_V2_L4_DELAY_REQ:
+ if (priv->cpsw_version == CPSW_VERSION_1) {
+ netdev_err(priv->ndev,
+ "PTP V1 L4 Timestamping is not supported!!!\n");
+ priv->cpts->enable_txts = false;
+ priv->cpts->enable_rxts = false;
+ break;
+ }
+ case HWTSTAMP_FILTER_PTP_V2_L2_EVENT:
+ case HWTSTAMP_FILTER_PTP_V2_L2_SYNC:
+ case HWTSTAMP_FILTER_PTP_V2_L2_DELAY_REQ:
+ case HWTSTAMP_FILTER_PTP_V2_EVENT:
+ case HWTSTAMP_FILTER_PTP_V2_SYNC:
+ case HWTSTAMP_FILTER_PTP_V2_DELAY_REQ:
+ if (priv->cpsw_version == CPSW_VERSION_1)
+ config.rx_filter = HWTSTAMP_FILTER_PTP_V2_L2_EVENT;
+ else
+ config.rx_filter = HWTSTAMP_FILTER_PTP_V2_EVENT;
+ priv->cpts->enable_rxts = true;
+ break;
+ default:
+ return -ERANGE;
+ }
+
+ cpts_enable_ts(priv, priv->cpts->enable_txts, priv->cpts->enable_rxts);
+
+ return copy_to_user(ifr->ifr_data, &config, sizeof(config)) ?
+ -EFAULT : 0;
+}
+
+static inline void cpts_enable_hw_clock(struct cpsw_priv *priv)
+{
+ if (cpts_register(&priv->pdev->dev, priv->cpts) == 0)
+ /* Enable CPSW_SS Misc Interrupt */
+ writel(CPSW_MISC_INTR_EN, &priv->ss_regs->misc_en);
+}
+
+#else
+#define cpts_interrupt(priv)
+#define cpsw_hwtstamp_ioctl(ndev, ifr, cmd) (-EOPNOTSUPP)
+#define cpts_enable_hw_clock(priv)
+#endif
+
static void cpsw_intr_enable(struct cpsw_priv *priv)
{
__raw_writel(0xFF, &priv->ss_regs->tx_en);
@@ -323,6 +536,7 @@ void cpsw_tx_handler(void *token, int len, int status)
if (unlikely(netif_queue_stopped(ndev)))
netif_start_queue(ndev);
+ cpts_tx_timestamp(priv->cpts, skb);
priv->stats.tx_packets++;
priv->stats.tx_bytes += len;
dev_kfree_skb_any(skb);
@@ -343,6 +557,7 @@ void cpsw_rx_handler(void *token, int len, int status)
}
if (likely(status >= 0)) {
skb_put(skb, len);
+ cpts_rx_timestamp(priv->cpts, skb);
skb->protocol = eth_type_trans(skb, ndev);
netif_receive_skb(skb);
priv->stats.rx_bytes += len;
@@ -367,6 +582,16 @@ void cpsw_rx_handler(void *token, int len, int status)
WARN_ON(ret < 0);
}
+static irqreturn_t cpsw_statistics_interrupt(int irq, void *dev_id)
+{
+ struct cpsw_priv *priv = dev_id;
+
+ cpts_interrupt(priv);
+
+ cpdma_ctlr_eoi_statistics(priv->dma);
+ return IRQ_HANDLED;
+}
+
static irqreturn_t cpsw_interrupt(int irq, void *dev_id)
{
struct cpsw_priv *priv = dev_id;
@@ -618,6 +843,9 @@ static int cpsw_ndo_open(struct net_device *ndev)
/* continue even if we didn't manage to submit all receive descs */
cpsw_info(priv, ifup, "submitted %d rx descriptors\n", i);
+ /* Enable CPTS clock */
+ cpts_enable_hw_clock(priv);
+
cpdma_ctlr_start(priv->dma);
cpsw_intr_enable(priv);
napi_enable(&priv->napi);
@@ -641,12 +869,14 @@ static int cpsw_ndo_stop(struct net_device *ndev)
cpsw_info(priv, ifdown, "shutting down cpsw device\n");
cpsw_intr_disable(priv);
+ disable_irq_nosync(priv->statistics_irq);
cpdma_ctlr_int_ctrl(priv->dma, false);
cpdma_ctlr_stop(priv->dma);
netif_stop_queue(priv->ndev);
napi_disable(&priv->napi);
netif_carrier_off(priv->ndev);
cpsw_ale_stop(priv->ale);
+ cpts_unregister(priv->cpts);
for_each_slave(priv, cpsw_slave_stop, priv);
pm_runtime_put_sync(&priv->pdev->dev);
return 0;
@@ -738,6 +968,23 @@ static void cpsw_ndo_poll_controller(struct net_device *ndev)
}
#endif
+static int cpsw_ndo_do_ioctl(struct net_device *ndev, struct ifreq *ifrq,
+ int cmd)
+{
+ if (!(netif_running(ndev)))
+ return -EINVAL;
+
+ switch (cmd) {
+
+ case SIOCSHWTSTAMP:
+ return cpsw_hwtstamp_ioctl(ndev, ifrq, cmd);
+
+ default:
+ return -EOPNOTSUPP;
+ }
+ return 0;
+}
+
static const struct net_device_ops cpsw_netdev_ops = {
.ndo_open = cpsw_ndo_open,
.ndo_stop = cpsw_ndo_stop,
@@ -748,6 +995,7 @@ static const struct net_device_ops cpsw_netdev_ops = {
.ndo_tx_timeout = cpsw_ndo_tx_timeout,
.ndo_get_stats = cpsw_ndo_get_stats,
.ndo_set_rx_mode = cpsw_ndo_set_rx_mode,
+ .ndo_do_ioctl = cpsw_ndo_do_ioctl,
#ifdef CONFIG_NET_POLL_CONTROLLER
.ndo_poll_controller = cpsw_ndo_poll_controller,
#endif
@@ -874,6 +1122,13 @@ static int cpsw_probe_dt(struct cpsw_platform_data *data,
}
data->hw_stats_reg_ofs = prop;
+ if (of_property_read_u32(node, "cpts_reg_ofs", &prop)) {
+ pr_err("Missing cpts_reg_ofs property in the DT.\n");
+ ret = -EINVAL;
+ goto error_ret;
+ }
+ data->cpts_reg_ofs = prop;
+
if (of_property_read_u32(node, "bd_ram_ofs", &prop)) {
pr_err("Missing bd_ram_ofs property in the DT.\n");
ret = -EINVAL;
@@ -952,7 +1207,6 @@ static int __devinit cpsw_probe(struct platform_device *pdev)
struct cpdma_params dma_params;
struct cpsw_ale_params ale_params;
void __iomem *regs;
- struct resource *res;
int ret = 0, i, k = 0;
ndev = alloc_etherdev(sizeof(struct cpsw_priv));
@@ -967,6 +1221,12 @@ static int __devinit cpsw_probe(struct platform_device *pdev)
priv->pdev = pdev;
priv->ndev = ndev;
priv->dev = &ndev->dev;
+ priv->cpts = devm_kzalloc(&pdev->dev, sizeof(struct cpts_priv),
+ GFP_KERNEL);
+ if (!priv->cpts) {
+ ret = -EBUSY;
+ goto clean_ndev_ret;
+ }
priv->msg_enable = netif_msg_init(debug_level, CPSW_DEBUG);
priv->rx_packet_max = max(rx_packet_max, 128);
@@ -1026,6 +1286,8 @@ static int __devinit cpsw_probe(struct platform_device *pdev)
priv->regs = regs;
priv->host_port = data->host_port_num;
priv->host_port_regs = regs + data->host_port_reg_ofs;
+ /* Init CPTS Regs offsets */
+ priv->cpts->reg = regs + data->cpts_reg_ofs;
priv->cpsw_ss_res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
if (!priv->cpsw_ss_res) {
@@ -1119,17 +1381,27 @@ static int __devinit cpsw_probe(struct platform_device *pdev)
goto clean_ale_ret;
}
- while ((res = platform_get_resource(priv->pdev, IORESOURCE_IRQ, k))) {
- for (i = res->start; i <= res->end; i++) {
- if (request_irq(i, cpsw_interrupt, IRQF_DISABLED,
- dev_name(&pdev->dev), priv)) {
- dev_err(priv->dev, "error attaching irq\n");
- goto clean_ale_ret;
- }
- priv->irqs_table[k] = i;
- priv->num_irqs = k;
+ for (k = 0; (k < 3) ; k++) {
+ i = platform_get_irq(pdev, k);
+ if (i < 0)
+ continue;
+ if (request_irq(i, cpsw_interrupt, IRQF_DISABLED,
+ dev_name(&pdev->dev), priv)) {
+ dev_err(priv->dev, "error attaching irq\n");
+ goto clean_ale_ret;
+ }
+ priv->irqs_table[k] = i;
+ priv->num_irqs = k+1;
+ }
+
+ i = platform_get_irq(pdev, k);
+ if (i >= 0) {
+ if (request_irq(i, cpsw_statistics_interrupt, IRQF_DISABLED,
+ dev_name(&pdev->dev), priv)) {
+ dev_err(priv->dev, "error attaching irq\n");
+ goto clean_ale_ret;
}
- k++;
+ priv->statistics_irq = i;
}
ndev->flags |= IFF_ALLMULTI; /* see cpsw_ndo_change_rx_flags() */
@@ -1154,6 +1426,7 @@ static int __devinit cpsw_probe(struct platform_device *pdev)
clean_irq_ret:
free_irq(ndev->irq, priv);
+ free_irq(priv->statistics_irq, priv);
clean_ale_ret:
cpsw_ale_destroy(priv->ale);
clean_dma_ret:
@@ -1187,6 +1460,7 @@ static int __devexit cpsw_remove(struct platform_device *pdev)
platform_set_drvdata(pdev, NULL);
free_irq(ndev->irq, priv);
+ free_irq(priv->statistics_irq, priv);
cpsw_ale_destroy(priv->ale);
cpdma_chan_destroy(priv->txch);
cpdma_chan_destroy(priv->rxch);
diff --git a/include/linux/platform_data/cpsw.h b/include/linux/platform_data/cpsw.h
index c4e23d0..4b4b1b8 100644
--- a/include/linux/platform_data/cpsw.h
+++ b/include/linux/platform_data/cpsw.h
@@ -41,6 +41,7 @@ struct cpsw_platform_data {
u32 host_port_num; /* The port number for the host port */
u32 hw_stats_reg_ofs; /* cpsw hardware statistics counters */
+ u32 cpts_reg_ofs; /* cpts register offset */
u32 bd_ram_ofs; /* embedded buffer descriptor RAM offset*/
u32 bd_ram_size; /*buffer descriptor ram size */
--
1.7.0.4
^ permalink raw reply related
* Re: [Bug 1063038] Re: Broadcom BCM57780 Cannot Connect at Gigabit Speed using tg3 module.
From: Justin Chudgar @ 2012-10-16 23:08 UTC (permalink / raw)
To: Nithin Sujir; +Cc: Michael Chan, 1063038@bugs.launchpad.net, netdev
In-Reply-To: <507D66A3.1050703@broadcom.com>
[-- Attachment #1: Type: text/plain, Size: 80628 bytes --]
Well, first off, let me thank you for your efforts up 'til now. I
appreciate it. You, Nithin and Michael were both quick to respond and
very helpful. I understand that you, working for Broadcom, must work
within the parameters of the business agreements they make.
With that said, though, I wish to express my displeasure with this
practice artificially limiting the performance and/or capabilities of
hardware via hidden firmware settings. It seems to be thoroughly
contrary to both the liberty intended by Free Software and to the
liberty to use purchased goods in any legal manner.
The end result that since Acer decided to deceptively limit hardware
function via firmware, presumably to generate artificial pricepoint
differentiation, Broadcom (not you guys) will agree not to fully support
their hardware reflects poorly on Broadcom as well as Acer. I know that
this will make me hesitant to buy devices from Acer or those
incorporating Broadcom hardware.
I hope that Broadcom rethinks this business practice and that they
continue to support that great work that the two of you do.
Justin Chudgar | Weed, CA 96094 | 530 921 0738 | http://www.justinzane.com/
On 10/16/2012 06:52 AM, Nithin Sujir wrote:
> Justin,
> I guess you didn't see my mail to you yesterday. This is as designed
> as per our hardware team. This what they had to say.
>
> "Per our record, this Acer system with BCM57780 and SSID:0601 was
> intended by Acer to be a 10/100 system. The system is able to connect
> at 10/100Mbps and therefore it is working as designed. Broadcom cannot
> support any software/hardware request to override this built in design."
>
>
> Thanks,
> Nithin.
>
> On 10/15/2012 08:43 PM, Justin Chudgar wrote:
>> First set of output is with ethtool -s advertise 0x03f [Which only works
>> at 100Mbps]. Second set is with ethtool -s advertise 0x020 [which fails
>> to link].
>> --------------------------------
>> Settings for eth0:
>> Supported ports: [ TP MII ]
>> Supported link modes: 10baseT/Half 10baseT/Full
>> 100baseT/Half 100baseT/Full
>> 1000baseT/Half 1000baseT/Full
>> Supported pause frame use: Symmetric Receive-only
>> Supports auto-negotiation: Yes
>> Advertised link modes: 10baseT/Half 10baseT/Full
>> 100baseT/Half 100baseT/Full
>> 1000baseT/Half 1000baseT/Full
>> Advertised pause frame use: Symmetric Receive-only
>> Advertised auto-negotiation: Yes
>> Speed: 10Mb/s
>> Duplex: Half
>> Port: MII
>> PHYAD: 1
>> Transceiver: external
>> Auto-negotiation: on
>> Supports Wake-on: g
>> Wake-on: g
>> Current message level: 0x000000ff (255)
>> drv probe link timer ifdown ifup rx_err
>> tx_err
>> Link detected: no
>> --------------------------------
>> 400
>> 0000:01:00.0 @80 = 00e04808
>> 404
>> 0000:01:00.0 @80 = 00400000
>> 408
>> 0000:01:00.0 @80 = 00000000
>> 45c
>> 0000:01:00.0 @80 = 00000102
>> 460
>> 0000:01:00.0 @80 = 00000000
>> 3600
>> 0000:01:00.0 @80 = e0236600
>> 3601
>> 0000:01:00.0 @80 = e0236600
>> 3602
>> 0000:01:00.0 @80 = e0236600
>> 3603
>> 0000:01:00.0 @80 = e0236600
>> 3604
>> 0000:01:00.0 @80 = 00170000
>> 3605
>> 0000:01:00.0 @80 = 00170000
>> 3606
>> 0000:01:00.0 @80 = 00170000
>> 3607
>> 0000:01:00.0 @80 = 00170000
>> 3608
>> 0000:01:00.0 @80 = 00110000
>> 3609
>> 0000:01:00.0 @80 = 00110000
>> 3610
>> 0000:01:00.0 @80 = 00170000
>> 362c
>> 0000:01:00.0 @80 = 00182036
>> 3630
>> 0000:01:00.0 @80 = 00170000
>> --------------------------------
>> Settings for eth0:
>> Supported ports: [ TP MII ]
>> Supported link modes: 10baseT/Half 10baseT/Full
>> 100baseT/Half 100baseT/Full
>> 1000baseT/Half 1000baseT/Full
>> Supported pause frame use: Symmetric Receive-only
>> Supports auto-negotiation: Yes
>> Advertised link modes: 1000baseT/Full
>> Advertised pause frame use: No
>> Advertised auto-negotiation: Yes
>> Speed: 10Mb/s
>> Duplex: Half
>> Port: MII
>> PHYAD: 1
>> Transceiver: external
>> Auto-negotiation: on
>> Supports Wake-on: g
>> Wake-on: g
>> Current message level: 0x000000ff (255)
>> drv probe link timer ifdown ifup rx_err
>> tx_err
>> Link detected: no
>> --------------------------------
>> 400
>> 0000:01:00.0 @80 = 00e04808
>> 404
>> 0000:01:00.0 @80 = 00400000
>> 408
>> 0000:01:00.0 @80 = 00000000
>> 45c
>> 0000:01:00.0 @80 = 00000102
>> 460
>> 0000:01:00.0 @80 = 00000000
>> 3600
>> 0000:01:00.0 @80 = e0236600
>> 3601
>> 0000:01:00.0 @80 = e0236600
>> 3602
>> 0000:01:00.0 @80 = e0236600
>> 3603
>> 0000:01:00.0 @80 = e0236600
>> 3604
>> 0000:01:00.0 @80 = 00170000
>> 3605
>> 0000:01:00.0 @80 = 00170000
>> 3606
>> 0000:01:00.0 @80 = 00170000
>> 3607
>> 0000:01:00.0 @80 = 00170000
>> 3608
>> 0000:01:00.0 @80 = 00110000
>> 3609
>> 0000:01:00.0 @80 = 00110000
>> 3610
>> 0000:01:00.0 @80 = 00170000
>> 362c
>> 0000:01:00.0 @80 = 00182036
>> 3630
>> 0000:01:00.0 @80 = 00170000
>> --------------------------------
>>
>> Justin Chudgar | Weed, CA 96094 | 530 921 0738 |
>> http://www.justinzane.com/
>>
>> On 10/15/2012 08:41 AM, Nithin Sujir wrote:
>>> This is an indirect read method. You write the register address in
>>> 78 and read back from 80.
>>> Note - there is no "= <value>" for the 80 line.
>>>
>>> What you've done is write to 80, which means you've overwritten
>>> every register with its address.
>>>
>>> You may have to power cycle the system to make sure the card is in
>>> an ok state.
>>> And then redo the register reads. Don't write to register 80, only
>>> read. Also redo the mii-tool experiments.
>>>
>>> I think we can ignore the dmesg because I suspect writing to these
>>> register may have triggered it.
>>>
>>> Nithin.
>>>
>>>
>>>> -----Original Message-----
>>>> From: Justin Chudgar [mailto:justin@justinzane.com]
>>>> Sent: Friday, October 12, 2012 9:02 PM
>>>> To: Nithin Sujir
>>>> Cc: 1063038@bugs.launchpad.net
>>>> Subject: Re: [Bug 1063038] Re: Broadcom BCM57780 Cannot Connect at
>>>> Gigabit
>>>> Speed using tg3 module.
>>>>
>>>> Well, there is no output on stdout or stderr from any of these
>>>> commands:
>>>>
>>>> setpci -s 01:00.0 78.l=400
>>>> setpci -s 01:00.0 80.l=400
>>>> setpci -s 01:00.0 78.l=404
>>>> setpci -s 01:00.0 80.l=404
>>>> setpci -s 01:00.0 78.l=408
>>>> setpci -s 01:00.0 80.l=408
>>>> setpci -s 01:00.0 78.l=45c
>>>> setpci -s 01:00.0 80.l=45c
>>>> setpci -s 01:00.0 78.l=460
>>>> setpci -s 01:00.0 80.l=460
>>>>
>>>> There is, however, a bunch of output via dmesg:
>>>> [ 5752.372423] ------------[ cut here ]------------
>>>> [ 5752.372436] WARNING: at
>>>> /build/buildd/linux-3.5.0/net/sched/sch_generic.c:255
>>>> dev_watchdog+0x272/0x280()
>>>> [ 5752.372439] Hardware name: Aspire 5733
>>>> [ 5752.372441] NETDEV WATCHDOG: eth0 (tg3): transmit queue 0 timed out
>>>> [ 5752.372443] Modules linked in: ip6table_filter ip6_tables
>>>> ebtable_nat
>>>> ebtables snd_hrtimer ipt_MASQUERADE iptable_nat nf_nat
>>>> nf_conntrack_ipv4
>>>> nf_defrag_ipv4 xt_state nf_conntrack ipt_REJECT xt_CHECKSUM
>>>> iptable_mangle xt_tcpudp iptable_filter ip_tables x_tables bridge stp
>>>> llc dm_crypt des_generic md4 nls_utf8 cifs fscache rfcomm parport_pc
>>>> bnep bluetooth ppdev joydev acer_wmi sparse_keymap
>>>> snd_hda_codec_realtek
>>>> kvm_intel snd_hda_intel snd_hda_codec kvm snd_hwdep snd_pcm
>>>> snd_seq_midi
>>>> microcode snd_rawmidi snd_seq_midi_event snd_seq arc4 snd_timer
>>>> snd_seq_device ath9k uvcvideo videobuf2_core intel_ips mac80211
>>>> videodev
>>>> videobuf2_vmalloc snd videobuf2_memops psmouse serio_raw ath9k_common
>>>> ath9k_hw lpc_ich ath soundcore snd_page_alloc cfg80211 mei mac_hid
>>>> coretemp lp parport btrfs zlib_deflate libcrc32c i915
>>>> drm_kms_helper drm
>>>> tg3 i2c_algo_bit mxm_wmi wmi video
>>>> [ 5752.372528] Pid: 0, comm: swapper/1 Not tainted 3.5.0-17-generic
>>>> #26-Ubuntu
>>>> [ 5752.372530] Call Trace:
>>>> [ 5752.372533] <IRQ> [<ffffffff81052cdf>]
>>>> warn_slowpath_common+0x7f/0xc0
>>>> [ 5752.372543] [<ffffffff81052dd6>] warn_slowpath_fmt+0x46/0x50
>>>> [ 5752.372550] [<ffffffff8159e862>] dev_watchdog+0x272/0x280
>>>> [ 5752.372556] [<ffffffff81070240>] ? __queue_work+0x330/0x330
>>>> [ 5752.372560] [<ffffffff8159e5f0>] ? pfifo_fast_dequeue+0xe0/0xe0
>>>> [ 5752.372563] [<ffffffff8159e5f0>] ? pfifo_fast_dequeue+0xe0/0xe0
>>>> [ 5752.372569] [<ffffffff81062d26>] call_timer_fn+0x46/0x160
>>>> [ 5752.372572] [<ffffffff8159e5f0>] ? pfifo_fast_dequeue+0xe0/0xe0
>>>> [ 5752.372577] [<ffffffff81064672>] run_timer_softirq+0x132/0x2a0
>>>> [ 5752.372583] [<ffffffff810a4035>] ? ktime_get+0x65/0xe0
>>>> [ 5752.372588] [<ffffffff8105bac8>] __do_softirq+0xa8/0x210
>>>> [ 5752.372593] [<ffffffff810ab194>] ? tick_program_event+0x24/0x30
>>>> [ 5752.372598] [<ffffffff816a665c>] call_softirq+0x1c/0x30
>>>> [ 5752.372604] [<ffffffff81016245>] do_softirq+0x65/0xa0
>>>> [ 5752.372608] [<ffffffff8105beae>] irq_exit+0x8e/0xb0
>>>> [ 5752.372612] [<ffffffff816a6f9e>]
>>>> smp_apic_timer_interrupt+0x6e/0x99
>>>> [ 5752.372617] [<ffffffff816a5d0a>] apic_timer_interrupt+0x6a/0x70
>>>> [ 5752.372619] <EOI> [<ffffffff81398b0a>] ? intel_idle+0xea/0x150
>>>> [ 5752.372628] [<ffffffff81398aec>] ? intel_idle+0xcc/0x150
>>>> [ 5752.372633] [<ffffffff815346f9>] cpuidle_enter+0x19/0x20
>>>> [ 5752.372637] [<ffffffff81534d1c>] cpuidle_idle_call+0xac/0x2a0
>>>> [ 5752.372642] [<ffffffff8101d89f>] cpu_idle+0xcf/0x120
>>>> [ 5752.372647] [<ffffffff8167950d>] start_secondary+0xc3/0xc5
>>>> [ 5752.372650] ---[ end trace 2a2ef50d1a96a258 ]---
>>>> [ 5752.372656] tg3 0000:01:00.0: >eth0: transmit timed out, resetting
>>>> [ 5754.363636] tg3 0000:01:00.0: >eth0: 0x00000000: 0x169214e4,
>>>> 0x00100406, 0x02000001, 0x00000010
>>>> [ 5754.363647] tg3 0000:01:00.0: >eth0: 0x00000010: 0xd3400004,
>>>> 0x00000000, 0x00000000, 0x00000000
>>>> [ 5754.363653] tg3 0000:01:00.0: >eth0: 0x00000020: 0x00000000,
>>>> 0x00000000, 0x00000000, 0x06011025
>>>> [ 5754.363659] tg3 0000:01:00.0: >eth0: 0x00000030: 0x00000000,
>>>> 0x00000048, 0x00000000, 0x0000010a
>>>> [ 5754.363665] tg3 0000:01:00.0: >eth0: 0x00000040: 0x00000000,
>>>> 0x00000000, 0xc0036001, 0x08002008
>>>> [ 5754.363671] tg3 0000:01:00.0: >eth0: 0x00000050: 0x0081cc05,
>>>> 0xfee0100c, 0x00000000, 0x00004189
>>>> [ 5754.363677] tg3 0000:01:00.0: >eth0: 0x00000060: 0x006c5009,
>>>> 0xffa85ef5, 0xf0010298, 0x76180000
>>>> [ 5754.363683] tg3 0000:01:00.0: >eth0: 0x00000070: 0x000010f2,
>>>> 0x00000000, 0x00000460, 0x00000000
>>>> [ 5754.363689] tg3 0000:01:00.0: >eth0: 0x00000080: 0x00000000,
>>>> 0x40000040, 0x00000000, 0x00000000
>>>> [ 5754.363695] tg3 0000:01:00.0: >eth0: 0x000000b0: 0x00000000,
>>>> 0x00000000, 0x00000000, 0x57780001
>>>> [ 5754.363701] tg3 0000:01:00.0: >eth0: 0x000000c0: 0x00000000,
>>>> 0x00000000, 0x0000000e, 0x00020010
>>>> [ 5754.363706] tg3 0000:01:00.0: >eth0: 0x000000d0: 0x05908fa0,
>>>> 0x00112000, 0x0006cc11, 0x10110143
>>>> [ 5754.363712] tg3 0000:01:00.0: >eth0: 0x000000f0: 0x0000001f,
>>>> 0x00000000, 0x00000000, 0x00000000
>>>> [ 5754.363718] tg3 0000:01:00.0: >eth0: 0x00000100: 0x13c10001,
>>>> 0x00100000, 0x00000000, 0x00062031
>>>> [ 5754.363724] tg3 0000:01:00.0: >eth0: 0x00000110: 0x00000001,
>>>> 0x00002000, 0x000000b4, 0x40000001
>>>> [ 5754.363729] tg3 0000:01:00.0: >eth0: 0x00000120: 0x0000000f,
>>>> 0xd3400400, 0x00000080, 0x00000000
>>>> [ 5754.363735] tg3 0000:01:00.0: >eth0: 0x00000130: 0x00000000,
>>>> 0x00000000, 0x00000000, 0x16010002
>>>> [ 5754.363741] tg3 0000:01:00.0: >eth0: 0x00000150: 0x800000ff,
>>>> 0x00000000, 0x00000000, 0x00000000
>>>> [ 5754.363747] tg3 0000:01:00.0: >eth0: 0x00000160: 0x16c10003,
>>>> 0xfeac38d5, 0xdc0ea1ff, 0x00010004
>>>> [ 5754.363752] tg3 0000:01:00.0: >eth0: 0x00000170: 0x00000000,
>>>> 0x00078116, 0x00000001, 0x00000000
>>>> [ 5754.363758] tg3 0000:01:00.0: >eth0: 0x00000180: 0x00000000,
>>>> 0x00000000, 0x00000000, 0xffffffff
>>>> [ 5754.363764] tg3 0000:01:00.0: >eth0: 0x00000200: 0x00000000,
>>>> 0x3d000000, 0x00000000, 0x00000000
>>>> [ 5754.363770] tg3 0000:01:00.0: >eth0: 0x00000260: 0x00000000,
>>>> 0x00000000, 0x00000000, 0x000000b5
>>>> [ 5754.363775] tg3 0000:01:00.0: >eth0: 0x00000280: 0x00000000,
>>>> 0x000001ed, 0x00000000, 0x00000000
>>>> [ 5754.363781] tg3 0000:01:00.0: >eth0: 0x00000300: 0x00000000,
>>>> 0x00000050, 0x00000000, 0x00000050
>>>> [ 5754.363787] tg3 0000:01:00.0: >eth0: 0x00000310: 0x00000000,
>>>> 0x00000050, 0x00000000, 0x00000050
>>>> [ 5754.363792] tg3 0000:01:00.0: >eth0: 0x00000320: 0x00000000,
>>>> 0x00000050, 0x00000000, 0x00000050
>>>> [ 5754.363798] tg3 0000:01:00.0: >eth0: 0x00000330: 0x00000000,
>>>> 0x00000050, 0x00000000, 0x00000050
>>>> [ 5754.363804] tg3 0000:01:00.0: >eth0: 0x00000340: 0x00000000,
>>>> 0x00000050, 0x00000000, 0x00000050
>>>> [ 5754.363809] tg3 0000:01:00.0: >eth0: 0x00000350: 0x00000000,
>>>> 0x00000050, 0x00000000, 0x00000050
>>>> [ 5754.363815] tg3 0000:01:00.0: >eth0: 0x00000360: 0x00000000,
>>>> 0x00000050, 0x00000000, 0x00000050
>>>> [ 5754.363821] tg3 0000:01:00.0: >eth0: 0x00000370: 0x00000000,
>>>> 0x00000050, 0x00000000, 0x00000050
>>>> [ 5754.363826] tg3 0000:01:00.0: >eth0: 0x00000380: 0x00000000,
>>>> 0x00000050, 0x00000000, 0x00000050
>>>> [ 5754.363832] tg3 0000:01:00.0: >eth0: 0x00000390: 0x00000000,
>>>> 0x00000050, 0x00000000, 0x00000050
>>>> [ 5754.363838] tg3 0000:01:00.0: >eth0: 0x000003a0: 0x00000000,
>>>> 0x00000050, 0x00000000, 0x00000050
>>>> [ 5754.363843] tg3 0000:01:00.0: >eth0: 0x000003b0: 0x00000000,
>>>> 0x00000050, 0x00000000, 0x00000050
>>>> [ 5754.363849] tg3 0000:01:00.0: >eth0: 0x000003c0: 0x00000000,
>>>> 0x00000050, 0x00000000, 0x00000050
>>>> [ 5754.363855] tg3 0000:01:00.0: >eth0: 0x000003d0: 0x00000000,
>>>> 0x00000050, 0x00000000, 0x00000050
>>>> [ 5754.363860] tg3 0000:01:00.0: >eth0: 0x000003e0: 0x00000000,
>>>> 0x00000050, 0x00000000, 0x00000050
>>>> [ 5754.363866] tg3 0000:01:00.0: >eth0: 0x000003f0: 0x00000000,
>>>> 0x00000050, 0x00000000, 0x00000050
>>>> [ 5754.363872] tg3 0000:01:00.0: >eth0: 0x00000400: 0x00000000,
>>>> 0x00400000, 0x00000000, 0x00009900
>>>> [ 5754.363878] tg3 0000:01:00.0: >eth0: 0x00000410: 0x0000dc0e,
>>>> 0xa1ac38d5, 0x0000dc0e, 0xa1ac38d5
>>>> [ 5754.363883] tg3 0000:01:00.0: >eth0: 0x00000420: 0x0000dc0e,
>>>> 0xa1ac38d5, 0x0000dc0e, 0xa1ac38d5
>>>> [ 5754.363889] tg3 0000:01:00.0: >eth0: 0x00000430: 0x00000000,
>>>> 0x00000000, 0x0000029d, 0x000005f2
>>>> [ 5754.363895] tg3 0000:01:00.0: >eth0: 0x00000440: 0x00000000,
>>>> 0x00000000, 0x00000000, 0x08240de1
>>>> [ 5754.363901] tg3 0000:01:00.0: >eth0: 0x00000450: 0x00000001,
>>>> 0x00008000, 0x00000000, 0x00000050
>>>> [ 5754.363906] tg3 0000:01:00.0: >eth0: 0x00000460: 0x00000000,
>>>> 0x00002620, 0x01000006, 0x00000000
>>>> [ 5754.363912] tg3 0000:01:00.0: >eth0: 0x00000470: 0xa0000000,
>>>> 0x00000020, 0x10000000, 0x51000000
>>>> [ 5754.363918] tg3 0000:01:00.0: >eth0: 0x00000480: 0x42000000,
>>>> 0x7fffffff, 0x06000004, 0x7fffffff
>>>> [ 5754.363924] tg3 0000:01:00.0: >eth0: 0x00000500: 0x00000008,
>>>> 0x00000002, 0x00000000, 0x00000000
>>>> [ 5754.363930] tg3 0000:01:00.0: >eth0: 0x00000590: 0x00900001,
>>>> 0x00000000, 0x00000000, 0x00000000
>>>> [ 5754.363936] tg3 0000:01:00.0: >eth0: 0x00000600: 0xffffffff,
>>>> 0x00f80010, 0x00000000, 0x00001f04
>>>> [ 5754.363941] tg3 0000:01:00.0: >eth0: 0x00000610: 0xffffffff,
>>>> 0x00000000, 0x07c00004, 0x30407000
>>>> [ 5754.363947] tg3 0000:01:00.0: >eth0: 0x00000620: 0x00000040,
>>>> 0x00000000, 0x00000000, 0x00000000
>>>> [ 5754.363953] tg3 0000:01:00.0: >eth0: 0x00000800: 0x00000000,
>>>> 0xffffffff, 0x00000000, 0x00000000
>>>> [ 5754.363959] tg3 0000:01:00.0: >eth0: 0x00000810: 0x00000000,
>>>> 0xffffffff, 0x00000000, 0x00000000
>>>> [ 5754.363964] tg3 0000:01:00.0: >eth0: 0x00000820: 0x00000000,
>>>> 0x00000000, 0xffffffff, 0x00000000
>>>> [ 5754.363970] tg3 0000:01:00.0: >eth0: 0x00000830: 0x00000000,
>>>> 0xffffffff, 0xffffffff, 0xffffffff
>>>> [ 5754.363976] tg3 0000:01:00.0: >eth0: 0x00000840: 0xffffffff,
>>>> 0xffffffff, 0xffffffff, 0xffffffff
>>>> [ 5754.363982] tg3 0000:01:00.0: >eth0: 0x00000850: 0xffffffff,
>>>> 0xffffffff, 0xffffffff, 0xffffffff
>>>> [ 5754.363987] tg3 0000:01:00.0: >eth0: 0x00000860: 0xffffffff,
>>>> 0xffffffff, 0xffffffff, 0x00000000
>>>> [ 5754.363993] tg3 0000:01:00.0: >eth0: 0x00000880: 0x00000000,
>>>> 0x0008b598, 0x00000000, 0x00000000
>>>> [ 5754.363999] tg3 0000:01:00.0: >eth0: 0x00000c00: 0x0000000a,
>>>> 0x00000000, 0x00000003, 0x00000001
>>>> [ 5754.364005] tg3 0000:01:00.0: >eth0: 0x00000c10: 0x00000000,
>>>> 0x00000000, 0x00000000, 0x01560000
>>>> [ 5754.364010] tg3 0000:01:00.0: >eth0: 0x00000c80: 0x00000050,
>>>> 0x00000000, 0x00000000, 0x00000000
>>>> [ 5754.364016] tg3 0000:01:00.0: >eth0: 0x00000ce0: 0xb1f88802,
>>>> 0x00000001, 0x00000156, 0x00040028
>>>> [ 5754.364022] tg3 0000:01:00.0: >eth0: 0x00000cf0: 0x00000000,
>>>> 0x50000050, 0x00000000, 0x00000000
>>>> [ 5754.364028] tg3 0000:01:00.0: >eth0: 0x00001000: 0x00000002,
>>>> 0x00000000, 0xa0000558, 0x00000000
>>>> [ 5754.364034] tg3 0000:01:00.0: >eth0: 0x00001010: 0x504d04e0,
>>>> 0x00000558, 0x00000000, 0x00000000
>>>> [ 5754.364040] tg3 0000:01:00.0: >eth0: 0x00001400: 0x00000006,
>>>> 0x00000000, 0x00000000, 0x00000000
>>>> [ 5754.364046] tg3 0000:01:00.0: >eth0: 0x00001440: 0x00000050,
>>>> 0x00000050, 0x00000050, 0x00000050
>>>> [ 5754.364052] tg3 0000:01:00.0: >eth0: 0x00001450: 0x00000050,
>>>> 0x00000050, 0x00000050, 0x00000050
>>>> [ 5754.364057] tg3 0000:01:00.0: >eth0: 0x00001460: 0x00000050,
>>>> 0x00000050, 0x00000050, 0x00000050
>>>> [ 5754.364063] tg3 0000:01:00.0: >eth0: 0x00001470: 0x00000050,
>>>> 0x00000050, 0x00000050, 0x00000050
>>>> [ 5754.364069] tg3 0000:01:00.0: >eth0: 0x00001480: 0x00000001,
>>>> 0x00000000, 0x00000000, 0x00000000
>>>> [ 5754.364075] tg3 0000:01:00.0: >eth0: 0x00001800: 0x00000016,
>>>> 0x00000000, 0x00000050, 0x00000000
>>>> [ 5754.364080] tg3 0000:01:00.0: >eth0: 0x00001840: 0x00000000,
>>>> 0x00000000, 0x00000200, 0x00000010
>>>> [ 5754.364086] tg3 0000:01:00.0: >eth0: 0x00001850: 0xb09824f0,
>>>> 0x00000001, 0x000040f0, 0x00500050
>>>> [ 5754.364092] tg3 0000:01:00.0: >eth0: 0x00001860: 0x01000000,
>>>> 0x00000000, 0x00000000, 0x00000000
>>>> [ 5754.364098] tg3 0000:01:00.0: >eth0: 0x00001c00: 0x00000002,
>>>> 0x00000000, 0x00000000, 0x00000000
>>>> [ 5754.364104] tg3 0000:01:00.0: >eth0: 0x00002000: 0x00000002,
>>>> 0x00000000, 0x00000000, 0x00000000
>>>> [ 5754.364110] tg3 0000:01:00.0: >eth0: 0x00002010: 0x00000181,
>>>> 0x00000001, 0x007bfffd, 0x00000000
>>>> [ 5754.364116] tg3 0000:01:00.0: >eth0: 0x00002100: 0x000cce67,
>>>> 0x000cce67, 0x00000000, 0x00000000
>>>> [ 5754.364122] tg3 0000:01:00.0: >eth0: 0x00002110: 0x000cce67,
>>>> 0x000cce67, 0x00000000, 0x00000000
>>>> [ 5754.364127] tg3 0000:01:00.0: >eth0: 0x00002120: 0x000cce67,
>>>> 0x000cce67, 0x00000000, 0x00000000
>>>> [ 5754.364133] tg3 0000:01:00.0: >eth0: 0x00002130: 0x000cce67,
>>>> 0x000cce67, 0x00000000, 0x00000000
>>>> [ 5754.364138] tg3 0000:01:00.0: >eth0: 0x00002140: 0x000cce67,
>>>> 0x000cce67, 0x00000000, 0x00000000
>>>> [ 5754.364144] tg3 0000:01:00.0: >eth0: 0x00002150: 0x000cce67,
>>>> 0x000cce67, 0x00000000, 0x00000000
>>>> [ 5754.364150] tg3 0000:01:00.0: >eth0: 0x00002160: 0x000cce67,
>>>> 0x000cce67, 0x00000000, 0x00000000
>>>> [ 5754.364155] tg3 0000:01:00.0: >eth0: 0x00002170: 0x000cce67,
>>>> 0x000cce67, 0x00000000, 0x00000000
>>>> [ 5754.364161] tg3 0000:01:00.0: >eth0: 0x00002180: 0x000cce67,
>>>> 0x000cce67, 0x00000000, 0x00000000
>>>> [ 5754.364167] tg3 0000:01:00.0: >eth0: 0x00002190: 0x000cce67,
>>>> 0x000cce67, 0x00000000, 0x00000000
>>>> [ 5754.364172] tg3 0000:01:00.0: >eth0: 0x000021a0: 0x000cce67,
>>>> 0x000cce67, 0x00000000, 0x00000000
>>>> [ 5754.364178] tg3 0000:01:00.0: >eth0: 0x000021b0: 0x000cce67,
>>>> 0x000cce67, 0x00000000, 0x00000000
>>>> [ 5754.364184] tg3 0000:01:00.0: >eth0: 0x000021c0: 0x000cce67,
>>>> 0x000cce67, 0x00000000, 0x00000000
>>>> [ 5754.364189] tg3 0000:01:00.0: >eth0: 0x000021d0: 0x000cce67,
>>>> 0x000cce67, 0x00000000, 0x00000000
>>>> [ 5754.364195] tg3 0000:01:00.0: >eth0: 0x000021e0: 0x000cce67,
>>>> 0x000cce67, 0x00000000, 0x00000000
>>>> [ 5754.364201] tg3 0000:01:00.0: >eth0: 0x000021f0: 0x000cce67,
>>>> 0x000cce67, 0x00000000, 0x00000000
>>>> [ 5754.364207] tg3 0000:01:00.0: >eth0: 0x00002200: 0x00002909,
>>>> 0x00000000, 0x00000000, 0x00000000
>>>> [ 5754.364213] tg3 0000:01:00.0: >eth0: 0x00002400: 0x00000012,
>>>> 0x00000000, 0x00000000, 0x00000000
>>>> [ 5754.364219] tg3 0000:01:00.0: >eth0: 0x00002450: 0x00000001,
>>>> 0xb0994000, 0x02000000, 0x00006000
>>>> [ 5754.364225] tg3 0000:01:00.0: >eth0: 0x00002470: 0x00000000,
>>>> 0x000001ed, 0x00000000, 0x00000000
>>>> [ 5754.364230] tg3 0000:01:00.0: >eth0: 0x000024c0: 0x08000001,
>>>> 0x00000000, 0x00000000, 0x00000000
>>>> [ 5754.364236] tg3 0000:01:00.0: >eth0: 0x00002800: 0x00000006,
>>>> 0x00000000, 0x00000000, 0x00000000
>>>> [ 5754.364242] tg3 0000:01:00.0: >eth0: 0x00002c00: 0x00000006,
>>>> 0x00000000, 0x00000000, 0x00000020
>>>> [ 5754.364248] tg3 0000:01:00.0: >eth0: 0x00002c10: 0x00000000,
>>>> 0x00000000, 0x00000010, 0x00000000
>>>> [ 5754.364254] tg3 0000:01:00.0: >eth0: 0x00002c20: 0x00000001,
>>>> 0x00000000, 0x00000000, 0x00000000
>>>> [ 5754.364260] tg3 0000:01:00.0: >eth0: 0x00003000: 0x00000006,
>>>> 0x00000000, 0x00000000, 0x00000020
>>>> [ 5754.364266] tg3 0000:01:00.0: >eth0: 0x00003600: 0xe0236600,
>>>> 0x00170000, 0x00110000, 0x00000000
>>>> [ 5754.364272] tg3 0000:01:00.0: >eth0: 0x00003610: 0x00170000,
>>>> 0x00130000, 0x00150000, 0x00000000
>>>> [ 5754.364278] tg3 0000:01:00.0: >eth0: 0x00003620: 0x00000000,
>>>> 0x00000000, 0x00000000, 0x00082080
>>>> [ 5754.364283] tg3 0000:01:00.0: >eth0: 0x00003630: 0x00110000,
>>>> 0x30020000, 0x00001000, 0x00000000
>>>> [ 5754.364289] tg3 0000:01:00.0: >eth0: 0x00003640: 0x00000000,
>>>> 0x00000000, 0x00000020, 0x0000004b
>>>> [ 5754.364295] tg3 0000:01:00.0: >eth0: 0x00003650: 0x00000171,
>>>> 0x00000bff, 0x57780001, 0x00000000
>>>> [ 5754.364301] tg3 0000:01:00.0: >eth0: 0x00003660: 0x00000000,
>>>> 0x00000000, 0x000000af, 0x00000000
>>>> [ 5754.364306] tg3 0000:01:00.0: >eth0: 0x00003670: 0x0000002a,
>>>> 0xfeffffe3, 0x00000000, 0x00000000
>>>> [ 5754.364312] tg3 0000:01:00.0: >eth0: 0x000036a0: 0x00000000,
>>>> 0x42000000, 0x00000000, 0x00000041
>>>> [ 5754.364318] tg3 0000:01:00.0: >eth0: 0x00003c00: 0x00000302,
>>>> 0x00000000, 0x00000014, 0x00000048
>>>> [ 5754.364324] tg3 0000:01:00.0: >eth0: 0x00003c10: 0x00000005,
>>>> 0x00000035, 0x00000000, 0x00000000
>>>> [ 5754.364330] tg3 0000:01:00.0: >eth0: 0x00003c20: 0x00000005,
>>>> 0x00000005, 0x00000000, 0x00000000
>>>> [ 5754.364335] tg3 0000:01:00.0: >eth0: 0x00003c30: 0x00000000,
>>>> 0x00000000, 0x00000001, 0xaf244000
>>>> [ 5754.364341] tg3 0000:01:00.0: >eth0: 0x00003c40: 0x00000000,
>>>> 0x00000b00, 0x00000000, 0x00000000
>>>> [ 5754.364347] tg3 0000:01:00.0: >eth0: 0x00003c50: 0x00000000,
>>>> 0x000001ed, 0x00000000, 0x00000000
>>>> [ 5754.364353] tg3 0000:01:00.0: >eth0: 0x00003c80: 0x000001ed,
>>>> 0x00000000, 0x00000000, 0x00000000
>>>> [ 5754.364358] tg3 0000:01:00.0: >eth0: 0x00003cc0: 0x0000004d,
>>>> 0x00000000, 0x00000000, 0x00000000
>>>> [ 5754.364364] tg3 0000:01:00.0: >eth0: 0x00004000: 0x00000002,
>>>> 0x00000000, 0x001a1bd1, 0x001a5ebe
>>>> [ 5754.364370] tg3 0000:01:00.0: >eth0: 0x00004010: 0x0040c670,
>>>> 0x00267012, 0x00800440, 0x0041d062
>>>> [ 5754.364376] tg3 0000:01:00.0: >eth0: 0x00004020: 0x00000000,
>>>> 0x00000000, 0x00000010, 0x00000000
>>>> [ 5754.364382] tg3 0000:01:00.0: >eth0: 0x00004030: 0x00000010,
>>>> 0x00000030, 0x00000000, 0x00000000
>>>> [ 5754.364387] tg3 0000:01:00.0: >eth0: 0x00004040: 0x00000000,
>>>> 0x00000000, 0x01081e20, 0x00000000
>>>> [ 5754.364393] tg3 0000:01:00.0: >eth0: 0x00004050: 0x00000000,
>>>> 0x00000000, 0x00267010, 0x0041a002
>>>> [ 5754.364399] tg3 0000:01:00.0: >eth0: 0x00004060: 0x0041d000,
>>>> 0x00000000, 0x00000000, 0x00000000
>>>> [ 5754.364405] tg3 0000:01:00.0: >eth0: 0x00004400: 0x00000006,
>>>> 0x00000000, 0x00010000, 0x00004000
>>>> [ 5754.364411] tg3 0000:01:00.0: >eth0: 0x00004410: 0x00000000,
>>>> 0x00000010, 0x00000060, 0x00000000
>>>> [ 5754.364416] tg3 0000:01:00.0: >eth0: 0x00004420: 0x0000003d,
>>>> 0x00000000, 0x00000000, 0x00000000
>>>> [ 5754.364422] tg3 0000:01:00.0: >eth0: 0x00004440: 0x00000000,
>>>> 0x00000000, 0x00000000, 0x00c03022
>>>> [ 5754.364428] tg3 0000:01:00.0: >eth0: 0x00004450: 0x00012a7f,
>>>> 0x00680069, 0x00000000, 0x00000000
>>>> [ 5754.364434] tg3 0000:01:00.0: >eth0: 0x00004800: 0x18033bfe,
>>>> 0x00000000, 0x00000000, 0x00000020
>>>> [ 5754.364440] tg3 0000:01:00.0: >eth0: 0x00004810: 0x00000000,
>>>> 0x00000003, 0x0156028c, 0x00000000
>>>> [ 5754.364446] tg3 0000:01:00.0: >eth0: 0x00004820: 0x00000021,
>>>> 0x00000000, 0xf03b0000, 0xb1f88958
>>>> [ 5754.364451] tg3 0000:01:00.0: >eth0: 0x00004830: 0x00000000,
>>>> 0x000000df, 0x000000df, 0x00000000
>>>> [ 5754.364457] tg3 0000:01:00.0: >eth0: 0x00004840: 0x00000050,
>>>> 0x0000004e, 0x030e2202, 0x1d2a3d51
>>>> [ 5754.364463] tg3 0000:01:00.0: >eth0: 0x00004850: 0xffffbb40,
>>>> 0xc2ae0156, 0x1a191a19, 0x00000000
>>>> [ 5754.364469] tg3 0000:01:00.0: >eth0: 0x00004860: 0x03000021,
>>>> 0x00000000, 0x00000000, 0x00000000
>>>> [ 5754.364474] tg3 0000:01:00.0: >eth0: 0x00004900: 0x00028207,
>>>> 0x50200e08, 0x00000000, 0x00000000
>>>> [ 5754.364480] tg3 0000:01:00.0: >eth0: 0x00004910: 0x00000018,
>>>> 0x00000000, 0x00000000, 0x00000000
>>>> [ 5754.364486] tg3 0000:01:00.0: >eth0: 0x00004c00: 0x200003fe,
>>>> 0x00000000, 0x00000000, 0x00000000
>>>> [ 5754.364492] tg3 0000:01:00.0: >eth0: 0x00004c10: 0x0000003f,
>>>> 0x00000000, 0x00000006, 0x00000000
>>>> [ 5754.364498] tg3 0000:01:00.0: >eth0: 0x00004c20: 0x00000000,
>>>> 0x00000000, 0x00000000, 0x00000006
>>>> [ 5754.364503] tg3 0000:01:00.0: >eth0: 0x00004c30: 0x00000000,
>>>> 0x00000000, 0x0000001e, 0x0000001e
>>>> [ 5754.364509] tg3 0000:01:00.0: >eth0: 0x00004c40: 0x00000000,
>>>> 0xaf244000, 0x00010020, 0x00000020
>>>> [ 5754.364515] tg3 0000:01:00.0: >eth0: 0x00004c50: 0x07ffffec,
>>>> 0x07b7d9ff, 0x00000000, 0xf6ad3d3d
>>>> [ 5754.364521] tg3 0000:01:00.0: >eth0: 0x00005000: 0x00009800,
>>>> 0x80008000, 0x00000000, 0x00000000
>>>> [ 5754.364527] tg3 0000:01:00.0: >eth0: 0x00005010: 0x00000000,
>>>> 0x00000000, 0x00000000, 0x40003544
>>>> [ 5754.364533] tg3 0000:01:00.0: >eth0: 0x00005020: 0x8fbf001c,
>>>> 0x00000000, 0x00000000, 0x40000020
>>>> [ 5754.364538] tg3 0000:01:00.0: >eth0: 0x00005030: 0x00000000,
>>>> 0x00000051, 0x00000000, 0x00000000
>>>> [ 5754.364544] tg3 0000:01:00.0: >eth0: 0x00005040: 0x00000000,
>>>> 0x00000000, 0x400036b0, 0x00000000
>>>> [ 5754.364550] tg3 0000:01:00.0: >eth0: 0x00005080: 0x00009800,
>>>> 0x80000000, 0x00000000, 0x00000000
>>>> [ 5754.364555] tg3 0000:01:00.0: >eth0: 0x00005090: 0x00000000,
>>>> 0x00000000, 0x00000000, 0x40003550
>>>> [ 5754.364561] tg3 0000:01:00.0: >eth0: 0x000050a0: 0x8fb00010,
>>>> 0x00000000, 0x00000000, 0x40000020
>>>> [ 5754.364567] tg3 0000:01:00.0: >eth0: 0x000050b0: 0x00000000,
>>>> 0x00000051, 0x00000000, 0x00000000
>>>> [ 5754.364573] tg3 0000:01:00.0: >eth0: 0x000050c0: 0x00000000,
>>>> 0x00000000, 0x40002ccc, 0x00000000
>>>> [ 5754.364578] tg3 0000:01:00.0: >eth0: 0x00005100: 0x00009800,
>>>> 0x80008000, 0x00000000, 0x00000000
>>>> [ 5754.364584] tg3 0000:01:00.0: >eth0: 0x00005110: 0x00000000,
>>>> 0x00000000, 0x00000000, 0x40003568
>>>> [ 5754.364590] tg3 0000:01:00.0: >eth0: 0x00005120: 0x3c030008,
>>>> 0x00000000, 0x00000000, 0x40000020
>>>> [ 5754.364595] tg3 0000:01:00.0: >eth0: 0x00005130: 0x00000000,
>>>> 0x00000051, 0x00000000, 0x00000000
>>>> [ 5754.364601] tg3 0000:01:00.0: >eth0: 0x00005140: 0x00000000,
>>>> 0x00000000, 0x40002e28, 0x00000000
>>>> [ 5754.364607] tg3 0000:01:00.0: >eth0: 0x00005180: 0x00009800,
>>>> 0x80000000, 0x00000000, 0x00000000
>>>> [ 5754.364613] tg3 0000:01:00.0: >eth0: 0x00005190: 0x00000000,
>>>> 0x00000000, 0x00000000, 0x40001d2c
>>>> [ 5754.364618] tg3 0000:01:00.0: >eth0: 0x000051a0: 0x3c054000,
>>>> 0x00000000, 0x00000000, 0x40000020
>>>> [ 5754.364624] tg3 0000:01:00.0: >eth0: 0x000051b0: 0x00000000,
>>>> 0x00000051, 0x00000000, 0x00000000
>>>> [ 5754.364630] tg3 0000:01:00.0: >eth0: 0x000051c0: 0x00000000,
>>>> 0x00000000, 0x40002cc4, 0x00000000
>>>> [ 5754.364635] tg3 0000:01:00.0: >eth0: 0x00005200: 0xa1020000,
>>>> 0x00000000, 0x00000000, 0x00000000
>>>> [ 5754.364641] tg3 0000:01:00.0: >eth0: 0x00005210: 0x00000000,
>>>> 0x400036b4, 0x40001d2c, 0x40001d2c
>>>> [ 5754.364647] tg3 0000:01:00.0: >eth0: 0x00005220: 0x40001d2c,
>>>> 0x400036b4, 0x08004c80, 0x08005fc8
>>>> [ 5754.364653] tg3 0000:01:00.0: >eth0: 0x00005230: 0x08005fc8,
>>>> 0x08005fc8, 0x08004c80, 0xc0000000
>>>> [ 5754.364659] tg3 0000:01:00.0: >eth0: 0x00005240: 0x00000000,
>>>> 0xa1020000, 0x00000000, 0x00000000
>>>> [ 5754.364664] tg3 0000:01:00.0: >eth0: 0x00005260: 0x40001d2c,
>>>> 0x00000000, 0x400036b4, 0x08004c80
>>>> [ 5754.364670] tg3 0000:01:00.0: >eth0: 0x00005270: 0x08005fc8,
>>>> 0x08005fc8, 0x08005fc8, 0x08004c80
>>>> [ 5754.364676] tg3 0000:01:00.0: >eth0: 0x00005280: 0x00009800,
>>>> 0x80000000, 0x00000000, 0x00000000
>>>> [ 5754.364682] tg3 0000:01:00.0: >eth0: 0x00005290: 0x00000000,
>>>> 0x00000000, 0x00000000, 0x40003688
>>>> [ 5754.364688] tg3 0000:01:00.0: >eth0: 0x000052a0: 0x27bd0020,
>>>> 0x00000000, 0x00000000, 0x40000020
>>>> [ 5754.364693] tg3 0000:01:00.0: >eth0: 0x000052b0: 0x00000000,
>>>> 0x00000051, 0x00000000, 0x00000000
>>>> [ 5754.364699] tg3 0000:01:00.0: >eth0: 0x000052c0: 0x00000000,
>>>> 0x00000000, 0x40003696, 0x00000000
>>>> [ 5754.364705] tg3 0000:01:00.0: >eth0: 0x00005300: 0x00009800,
>>>> 0x80000000, 0x00000000, 0x00000000
>>>> [ 5754.364710] tg3 0000:01:00.0: >eth0: 0x00005310: 0x00000000,
>>>> 0x00000000, 0x00000000, 0x40003548
>>>> [ 5754.364716] tg3 0000:01:00.0: >eth0: 0x00005320: 0x8fb20018,
>>>> 0x00000000, 0x00000000, 0x40000020
>>>> [ 5754.364722] tg3 0000:01:00.0: >eth0: 0x00005330: 0x00000000,
>>>> 0x00000051, 0x00000000, 0x00000000
>>>> [ 5754.364727] tg3 0000:01:00.0: >eth0: 0x00005340: 0x00000000,
>>>> 0x00000000, 0x40001d30, 0x00000000
>>>> [ 5754.364733] tg3 0000:01:00.0: >eth0: 0x00005380: 0x00009800,
>>>> 0x80000000, 0x00000000, 0x00000000
>>>> [ 5754.364739] tg3 0000:01:00.0: >eth0: 0x00005390: 0x00000000,
>>>> 0x00000000, 0x00000000, 0x40003544
>>>> [ 5754.364744] tg3 0000:01:00.0: >eth0: 0x000053a0: 0x00000000,
>>>> 0x00000000, 0x00000000, 0x40000020
>>>> [ 5754.364750] tg3 0000:01:00.0: >eth0: 0x000053b0: 0x00000000,
>>>> 0x00000051, 0x00000000, 0x00000000
>>>> [ 5754.364756] tg3 0000:01:00.0: >eth0: 0x000053c0: 0x00000000,
>>>> 0x00000000, 0x40001d30, 0x00000000
>>>> [ 5754.364762] tg3 0000:01:00.0: >eth0: 0x00005600: 0x169214e4,
>>>> 0x00100406, 0x02000001, 0x00000010
>>>> [ 5754.364768] tg3 0000:01:00.0: >eth0: 0x00005610: 0xd3400004,
>>>> 0x00000000, 0x00000000, 0x00000000
>>>> [ 5754.364773] tg3 0000:01:00.0: >eth0: 0x00005620: 0x00000000,
>>>> 0x00000000, 0x00000000, 0x06011025
>>>> [ 5754.364779] tg3 0000:01:00.0: >eth0: 0x00005630: 0x00000000,
>>>> 0x00000048, 0x00000000, 0x0000010a
>>>> [ 5754.364785] tg3 0000:01:00.0: >eth0: 0x00005640: 0x00000000,
>>>> 0x00000000, 0xc0036001, 0x08002008
>>>> [ 5754.364791] tg3 0000:01:00.0: >eth0: 0x00005650: 0x0081cc05,
>>>> 0xfee0100c, 0x00000000, 0x00004189
>>>> [ 5754.364796] tg3 0000:01:00.0: >eth0: 0x00005660: 0x006c5009,
>>>> 0xffa85ef5, 0xf0010298, 0x76180000
>>>> [ 5754.364802] tg3 0000:01:00.0: >eth0: 0x00005670: 0x000010f2,
>>>> 0x00000000, 0x00000460, 0x00000000
>>>> [ 5754.364808] tg3 0000:01:00.0: >eth0: 0x00005680: 0x40000008,
>>>> 0x40000008, 0x00000000, 0x00000000
>>>> [ 5754.364814] tg3 0000:01:00.0: >eth0: 0x000056b0: 0x00000000,
>>>> 0x00000000, 0x00000000, 0x57780001
>>>> [ 5754.364819] tg3 0000:01:00.0: >eth0: 0x000056c0: 0x00000000,
>>>> 0x00000000, 0x0000000e, 0x00020010
>>>> [ 5754.364825] tg3 0000:01:00.0: >eth0: 0x000056d0: 0x05908fa0,
>>>> 0x00112000, 0x0006cc11, 0x10110143
>>>> [ 5754.364831] tg3 0000:01:00.0: >eth0: 0x000056f0: 0x0000001f,
>>>> 0x00000000, 0x00000000, 0x00000000
>>>> [ 5754.364837] tg3 0000:01:00.0: >eth0: 0x00005700: 0x13c10001,
>>>> 0x00100000, 0x00000000, 0x00062031
>>>> [ 5754.364842] tg3 0000:01:00.0: >eth0: 0x00005710: 0x00000001,
>>>> 0x00002000, 0x000000b4, 0x40000001
>>>> [ 5754.364848] tg3 0000:01:00.0: >eth0: 0x00005720: 0x0000000f,
>>>> 0xd3400400, 0x00000080, 0x00000000
>>>> [ 5754.364854] tg3 0000:01:00.0: >eth0: 0x00005730: 0x00000000,
>>>> 0x00000000, 0x00000000, 0x16010002
>>>> [ 5754.364859] tg3 0000:01:00.0: >eth0: 0x00005750: 0x800000ff,
>>>> 0x00000000, 0x00000000, 0x00000000
>>>> [ 5754.364865] tg3 0000:01:00.0: >eth0: 0x00005760: 0x16c10003,
>>>> 0xfeac38d5, 0xdc0ea1ff, 0x00010004
>>>> [ 5754.364871] tg3 0000:01:00.0: >eth0: 0x00005770: 0x00000000,
>>>> 0x00078116, 0x00000001, 0x00000000
>>>> [ 5754.364877] tg3 0000:01:00.0: >eth0: 0x00005780: 0x00000000,
>>>> 0x00000000, 0x00000000, 0xffffffff
>>>> [ 5754.364882] tg3 0000:01:00.0: >eth0: 0x00005800: 0x00000000,
>>>> 0x3d000000, 0x00000000, 0x00000000
>>>> [ 5754.364888] tg3 0000:01:00.0: >eth0: 0x00005860: 0x00000000,
>>>> 0x00000000, 0x00000000, 0x000000b5
>>>> [ 5754.364894] tg3 0000:01:00.0: >eth0: 0x00005880: 0x00000000,
>>>> 0x000001ed, 0x00000000, 0x00000000
>>>> [ 5754.364899] tg3 0000:01:00.0: >eth0: 0x00005900: 0x00000000,
>>>> 0x00000050, 0x00000000, 0x00000000
>>>> [ 5754.364905] tg3 0000:01:00.0: >eth0: 0x00005980: 0x00000000,
>>>> 0x00000050, 0x00000000, 0x00000000
>>>> [ 5754.364911] tg3 0000:01:00.0: >eth0: 0x00005a00: 0x00012001,
>>>> 0x00000000, 0x00010000, 0x00000000
>>>> [ 5754.364917] tg3 0000:01:00.0: >eth0: 0x00006000: 0x00000002,
>>>> 0x00000000, 0x00000000, 0x00000000
>>>> [ 5754.364924] tg3 0000:01:00.0: >eth0: 0x00006800: 0x04130034,
>>>> 0x20085082, 0x01009219, 0x54f00671
>>>> [ 5754.364929] tg3 0000:01:00.0: >eth0: 0x00006810: 0xa1020000,
>>>> 0xffffffff, 0x00000000, 0x00000000
>>>> [ 5754.364935] tg3 0000:01:00.0: >eth0: 0x000068a0: 0x00000000,
>>>> 0x20010001, 0x00000000, 0x00000000
>>>> [ 5754.364941] tg3 0000:01:00.0: >eth0: 0x000068b0: 0x00040000,
>>>> 0x00000000, 0x00000000, 0x00000000
>>>> [ 5754.364947] tg3 0000:01:00.0: >eth0: 0x00006c20: 0x00000000,
>>>> 0x00100000, 0x00000000, 0x00000000
>>>> [ 5754.364953] tg3 0000:01:00.0: >eth0: 0x00007000: 0x08000188,
>>>> 0x00000000, 0x00000000, 0x00000000
>>>> [ 5754.364959] tg3 0000:01:00.0: >eth0: 0x00007010: 0xffffffff,
>>>> 0x00008200, 0x000500db, 0x03000a00
>>>> [ 5754.364965] tg3 0000:01:00.0: >eth0: 0x00007020: 0x00000000,
>>>> 0x00000000, 0x00000406, 0x10004000
>>>> [ 5754.364970] tg3 0000:01:00.0: >eth0: 0x00007030: 0x00020000,
>>>> 0x00000004, 0x001f0010, 0x00000000
>>>> [ 5754.364977] tg3 0000:01:00.0: >eth0: 0x00007500: 0x00000000,
>>>> 0x00000000, 0x0000008b, 0x00000240
>>>> [ 5754.364987] tg3 0000:01:00.0: >eth0: 0: Host status block
>>>> [00000001:0000003d:(0000:01ed:0000):(01ed:004d)]
>>>> [ 5754.364994] tg3 0000:01:00.0: >eth0: 0: NAPI info
>>>> [0000003d:0000003d:(0050:004d:01ff):01ed:(00b5:0000:0000:0000)]
>>>> [ 5754.371432] tg3 0000:01:00.0: >eth0: Link is down
>>>> [ 5754.382537] tg3 0000:01:00.0: >eth0: Link is down
>>>> [ 5768.375375] tg3 0000:01:00.0: >eth0: Link is up at 100 Mbps,
>>>> full duplex
>>>> [ 5768.375381] tg3 0000:01:00.0: >eth0: Flow control is on for TX
>>>> and on
>>>> for RX
>>>> [ 5858.332265] tg3 0000:01:00.0: >eth0: transmit timed out, resetting
>>>> [ 5860.322807] tg3 0000:01:00.0: >eth0: 0x00000000: 0x169214e4,
>>>> 0x00100406, 0x02000001, 0x00000010
>>>> [ 5860.322811] tg3 0000:01:00.0: >eth0: 0x00000010: 0xd3400004,
>>>> 0x00000000, 0x00000000, 0x00000000
>>>> [ 5860.322813] tg3 0000:01:00.0: >eth0: 0x00000020: 0x00000000,
>>>> 0x00000000, 0x00000000, 0x06011025
>>>> [ 5860.322821] tg3 0000:01:00.0: >eth0: 0x00000030: 0x00000000,
>>>> 0x00000048, 0x00000000, 0x0000010a
>>>> [ 5860.322827] tg3 0000:01:00.0: >eth0: 0x00000040: 0x00000000,
>>>> 0x00000000, 0xc0036001, 0x08002008
>>>> [ 5860.322833] tg3 0000:01:00.0: >eth0: 0x00000050: 0x0081cc05,
>>>> 0xfee0100c, 0x00000000, 0x00004189
>>>> [ 5860.322839] tg3 0000:01:00.0: >eth0: 0x00000060: 0x006c5009,
>>>> 0xffa85ef5, 0xf0010298, 0x76180000
>>>> [ 5860.322844] tg3 0000:01:00.0: >eth0: 0x00000070: 0x000010f2,
>>>> 0x00000000, 0x00000460, 0x00000000
>>>> [ 5860.322850] tg3 0000:01:00.0: >eth0: 0x00000080: 0x00000000,
>>>> 0x40000040, 0x00000000, 0x00000000
>>>> [ 5860.322855] tg3 0000:01:00.0: >eth0: 0x000000b0: 0x00000000,
>>>> 0x00000000, 0x00000000, 0x57780001
>>>> [ 5860.322861] tg3 0000:01:00.0: >eth0: 0x000000c0: 0x00000000,
>>>> 0x00000000, 0x0000000e, 0x00020010
>>>> [ 5860.322867] tg3 0000:01:00.0: >eth0: 0x000000d0: 0x05908fa0,
>>>> 0x00112000, 0x0006cc11, 0x10110143
>>>> [ 5860.322872] tg3 0000:01:00.0: >eth0: 0x000000f0: 0x0000001f,
>>>> 0x00000000, 0x00000000, 0x00000000
>>>> [ 5860.322878] tg3 0000:01:00.0: >eth0: 0x00000100: 0x13c10001,
>>>> 0x00100000, 0x00000000, 0x00062031
>>>> [ 5860.322883] tg3 0000:01:00.0: >eth0: 0x00000110: 0x00000001,
>>>> 0x00002000, 0x000000b4, 0x40000001
>>>> [ 5860.322889] tg3 0000:01:00.0: >eth0: 0x00000120: 0x0000000f,
>>>> 0xd3400400, 0x00000080, 0x00000000
>>>> [ 5860.322894] tg3 0000:01:00.0: >eth0: 0x00000130: 0x00000000,
>>>> 0x00000000, 0x00000000, 0x16010002
>>>> [ 5860.322900] tg3 0000:01:00.0: >eth0: 0x00000150: 0x800000ff,
>>>> 0x00000000, 0x00000000, 0x00000000
>>>> [ 5860.322906] tg3 0000:01:00.0: >eth0: 0x00000160: 0x16c10003,
>>>> 0xfeac38d5, 0xdc0ea1ff, 0x00010004
>>>> [ 5860.322911] tg3 0000:01:00.0: >eth0: 0x00000170: 0x00000000,
>>>> 0x00078116, 0x00000001, 0x00000000
>>>> [ 5860.322917] tg3 0000:01:00.0: >eth0: 0x00000180: 0x00000000,
>>>> 0x00000000, 0x00000000, 0xffffffff
>>>> [ 5860.322922] tg3 0000:01:00.0: >eth0: 0x00000200: 0x00000000,
>>>> 0x44000000, 0x00000000, 0x00000000
>>>> [ 5860.322928] tg3 0000:01:00.0: >eth0: 0x00000260: 0x00000000,
>>>> 0x00000000, 0x00000000, 0x00000106
>>>> [ 5860.322933] tg3 0000:01:00.0: >eth0: 0x00000280: 0x00000000,
>>>> 0x0000003e, 0x00000000, 0x00000000
>>>> [ 5860.322939] tg3 0000:01:00.0: >eth0: 0x00000300: 0x00000000,
>>>> 0x00000007, 0x00000000, 0x00000007
>>>> [ 5860.322944] tg3 0000:01:00.0: >eth0: 0x00000310: 0x00000000,
>>>> 0x00000007, 0x00000000, 0x00000007
>>>> [ 5860.322949] tg3 0000:01:00.0: >eth0: 0x00000320: 0x00000000,
>>>> 0x00000007, 0x00000000, 0x00000007
>>>> [ 5860.322955] tg3 0000:01:00.0: >eth0: 0x00000330: 0x00000000,
>>>> 0x00000007, 0x00000000, 0x00000007
>>>> [ 5860.322960] tg3 0000:01:00.0: >eth0: 0x00000340: 0x00000000,
>>>> 0x00000007, 0x00000000, 0x00000007
>>>> [ 5860.322965] tg3 0000:01:00.0: >eth0: 0x00000350: 0x00000000,
>>>> 0x00000007, 0x00000000, 0x00000007
>>>> [ 5860.322971] tg3 0000:01:00.0: >eth0: 0x00000360: 0x00000000,
>>>> 0x00000007, 0x00000000, 0x00000007
>>>> [ 5860.322976] tg3 0000:01:00.0: >eth0: 0x00000370: 0x00000000,
>>>> 0x00000007, 0x00000000, 0x00000007
>>>> [ 5860.322981] tg3 0000:01:00.0: >eth0: 0x00000380: 0x00000000,
>>>> 0x00000007, 0x00000000, 0x00000007
>>>> [ 5860.322987] tg3 0000:01:00.0: >eth0: 0x00000390: 0x00000000,
>>>> 0x00000007, 0x00000000, 0x00000007
>>>> [ 5860.322992] tg3 0000:01:00.0: >eth0: 0x000003a0: 0x00000000,
>>>> 0x00000007, 0x00000000, 0x00000007
>>>> [ 5860.322998] tg3 0000:01:00.0: >eth0: 0x000003b0: 0x00000000,
>>>> 0x00000007, 0x00000000, 0x00000007
>>>> [ 5860.323003] tg3 0000:01:00.0: >eth0: 0x000003c0: 0x00000000,
>>>> 0x00000007, 0x00000000, 0x00000007
>>>> [ 5860.323008] tg3 0000:01:00.0: >eth0: 0x000003d0: 0x00000000,
>>>> 0x00000007, 0x00000000, 0x00000007
>>>> [ 5860.323014] tg3 0000:01:00.0: >eth0: 0x000003e0: 0x00000000,
>>>> 0x00000007, 0x00000000, 0x00000007
>>>> [ 5860.323019] tg3 0000:01:00.0: >eth0: 0x000003f0: 0x00000000,
>>>> 0x00000007, 0x00000000, 0x00000007
>>>> [ 5860.323025] tg3 0000:01:00.0: >eth0: 0x00000400: 0x00000000,
>>>> 0x00400000, 0x00000000, 0x00009d00
>>>> [ 5860.323030] tg3 0000:01:00.0: >eth0: 0x00000410: 0x0000dc0e,
>>>> 0xa1ac38d5, 0x0000dc0e, 0xa1ac38d5
>>>> [ 5860.323036] tg3 0000:01:00.0: >eth0: 0x00000420: 0x0000dc0e,
>>>> 0xa1ac38d5, 0x0000dc0e, 0xa1ac38d5
>>>> [ 5860.323041] tg3 0000:01:00.0: >eth0: 0x00000430: 0x00000000,
>>>> 0x00000000, 0x000000ab, 0x000005f2
>>>> [ 5860.323047] tg3 0000:01:00.0: >eth0: 0x00000440: 0x00000000,
>>>> 0x00000000, 0x00000000, 0x08240de1
>>>> [ 5860.323052] tg3 0000:01:00.0: >eth0: 0x00000450: 0x00000001,
>>>> 0x00008000, 0x00000000, 0x00000050
>>>> [ 5860.323058] tg3 0000:01:00.0: >eth0: 0x00000460: 0x00000000,
>>>> 0x00002620, 0x01000006, 0x00000000
>>>> [ 5860.323064] tg3 0000:01:00.0: >eth0: 0x00000470: 0xa0000000,
>>>> 0x00000020, 0x10000000, 0x51000000
>>>> [ 5860.323069] tg3 0000:01:00.0: >eth0: 0x00000480: 0x42000000,
>>>> 0x7fffffff, 0x06000004, 0x7fffffff
>>>> [ 5860.323075] tg3 0000:01:00.0: >eth0: 0x00000500: 0x00000008,
>>>> 0x00000002, 0x00000000, 0x00000000
>>>> [ 5860.323080] tg3 0000:01:00.0: >eth0: 0x00000590: 0x00900000,
>>>> 0x00000000, 0x00000000, 0x00000000
>>>> [ 5860.323086] tg3 0000:01:00.0: >eth0: 0x00000600: 0xffffffff,
>>>> 0x00f80010, 0x00000000, 0x00001f04
>>>> [ 5860.323092] tg3 0000:01:00.0: >eth0: 0x00000610: 0xffffffff,
>>>> 0x00000000, 0x07c00004, 0x30407000
>>>> [ 5860.323097] tg3 0000:01:00.0: >eth0: 0x00000620: 0x00000040,
>>>> 0x00000000, 0x00000000, 0x00000000
>>>> [ 5860.323103] tg3 0000:01:00.0: >eth0: 0x00000800: 0x00000000,
>>>> 0xffffffff, 0x00000000, 0x00000000
>>>> [ 5860.323108] tg3 0000:01:00.0: >eth0: 0x00000810: 0x00000000,
>>>> 0xffffffff, 0x00000000, 0x00000000
>>>> [ 5860.323114] tg3 0000:01:00.0: >eth0: 0x00000820: 0x00000000,
>>>> 0x00000000, 0xffffffff, 0x00000000
>>>> [ 5860.323119] tg3 0000:01:00.0: >eth0: 0x00000830: 0x00000000,
>>>> 0xffffffff, 0xffffffff, 0xffffffff
>>>> [ 5860.323125] tg3 0000:01:00.0: >eth0: 0x00000840: 0xffffffff,
>>>> 0xffffffff, 0xffffffff, 0xffffffff
>>>> [ 5860.323130] tg3 0000:01:00.0: >eth0: 0x00000850: 0xffffffff,
>>>> 0xffffffff, 0xffffffff, 0xffffffff
>>>> [ 5860.323136] tg3 0000:01:00.0: >eth0: 0x00000860: 0xffffffff,
>>>> 0xffffffff, 0xffffffff, 0x00000000
>>>> [ 5860.323141] tg3 0000:01:00.0: >eth0: 0x00000880: 0x00000000,
>>>> 0x00000fdc, 0x00000000, 0x00000000
>>>> [ 5860.323147] tg3 0000:01:00.0: >eth0: 0x00000c00: 0x0000000a,
>>>> 0x00000000, 0x00000003, 0x00000001
>>>> [ 5860.323153] tg3 0000:01:00.0: >eth0: 0x00000c10: 0x00000000,
>>>> 0x00000000, 0x00000000, 0x01560000
>>>> [ 5860.323158] tg3 0000:01:00.0: >eth0: 0x00000c80: 0x00000007,
>>>> 0x00000000, 0x00000000, 0x00000000
>>>> [ 5860.323164] tg3 0000:01:00.0: >eth0: 0x00000ce0: 0xb1f88802,
>>>> 0x00000001, 0x00000156, 0x00040028
>>>> [ 5860.323169] tg3 0000:01:00.0: >eth0: 0x00000cf0: 0x00000000,
>>>> 0x50000007, 0x00000000, 0x00000000
>>>> [ 5860.323175] tg3 0000:01:00.0: >eth0: 0x00001000: 0x00000002,
>>>> 0x00000000, 0xa0000517, 0x00000000
>>>> [ 5860.323180] tg3 0000:01:00.0: >eth0: 0x00001010: 0x50050060,
>>>> 0x00000517, 0x00000000, 0x00000000
>>>> [ 5860.323186] tg3 0000:01:00.0: >eth0: 0x00001400: 0x00000006,
>>>> 0x00000000, 0x00000000, 0x00000000
>>>> [ 5860.323192] tg3 0000:01:00.0: >eth0: 0x00001440: 0x00000007,
>>>> 0x00000007, 0x00000007, 0x00000007
>>>> [ 5860.323197] tg3 0000:01:00.0: >eth0: 0x00001450: 0x00000007,
>>>> 0x00000007, 0x00000007, 0x00000007
>>>> [ 5860.323202] tg3 0000:01:00.0: >eth0: 0x00001460: 0x00000007,
>>>> 0x00000007, 0x00000007, 0x00000007
>>>> [ 5860.323208] tg3 0000:01:00.0: >eth0: 0x00001470: 0x00000007,
>>>> 0x00000007, 0x00000007, 0x00000007
>>>> [ 5860.323213] tg3 0000:01:00.0: >eth0: 0x00001480: 0x00000001,
>>>> 0x00000000, 0x00000000, 0x00000000
>>>> [ 5860.323219] tg3 0000:01:00.0: >eth0: 0x00001800: 0x00000016,
>>>> 0x00000000, 0x00000007, 0x00000000
>>>> [ 5860.323225] tg3 0000:01:00.0: >eth0: 0x00001840: 0x00000000,
>>>> 0x00000000, 0x00000200, 0x00000010
>>>> [ 5860.323230] tg3 0000:01:00.0: >eth0: 0x00001850: 0xb0982060,
>>>> 0x00000001, 0x00004060, 0x00070007
>>>> [ 5860.323236] tg3 0000:01:00.0: >eth0: 0x00001860: 0x01000000,
>>>> 0x00000000, 0x00000000, 0x00000000
>>>> [ 5860.323241] tg3 0000:01:00.0: >eth0: 0x00001c00: 0x00000002,
>>>> 0x00000000, 0x00000000, 0x00000000
>>>> [ 5860.323247] tg3 0000:01:00.0: >eth0: 0x00002000: 0x00000002,
>>>> 0x00000000, 0x00000000, 0x00000000
>>>> [ 5860.323253] tg3 0000:01:00.0: >eth0: 0x00002010: 0x00000181,
>>>> 0x00000001, 0x007bfffd, 0x00000000
>>>> [ 5860.323258] tg3 0000:01:00.0: >eth0: 0x00002100: 0x000c9249,
>>>> 0x000c9249, 0x00000000, 0x00000000
>>>> [ 5860.323264] tg3 0000:01:00.0: >eth0: 0x00002110: 0x000c9249,
>>>> 0x000c9249, 0x00000000, 0x00000000
>>>> [ 5860.323269] tg3 0000:01:00.0: >eth0: 0x00002120: 0x000c9249,
>>>> 0x000c9249, 0x00000000, 0x00000000
>>>> [ 5860.323275] tg3 0000:01:00.0: >eth0: 0x00002130: 0x000c9249,
>>>> 0x000c9249, 0x00000000, 0x00000000
>>>> [ 5860.323280] tg3 0000:01:00.0: >eth0: 0x00002140: 0x000c9249,
>>>> 0x000c9249, 0x00000000, 0x00000000
>>>> [ 5860.323286] tg3 0000:01:00.0: >eth0: 0x00002150: 0x000c9249,
>>>> 0x000c9249, 0x00000000, 0x00000000
>>>> [ 5860.323291] tg3 0000:01:00.0: >eth0: 0x00002160: 0x000c9249,
>>>> 0x000c9249, 0x00000000, 0x00000000
>>>> [ 5860.323297] tg3 0000:01:00.0: >eth0: 0x00002170: 0x000c9249,
>>>> 0x000c9249, 0x00000000, 0x00000000
>>>> [ 5860.323302] tg3 0000:01:00.0: >eth0: 0x00002180: 0x000c9249,
>>>> 0x000c9249, 0x00000000, 0x00000000
>>>> [ 5860.323308] tg3 0000:01:00.0: >eth0: 0x00002190: 0x000c9249,
>>>> 0x000c9249, 0x00000000, 0x00000000
>>>> [ 5860.323313] tg3 0000:01:00.0: >eth0: 0x000021a0: 0x000c9249,
>>>> 0x000c9249, 0x00000000, 0x00000000
>>>> [ 5860.323319] tg3 0000:01:00.0: >eth0: 0x000021b0: 0x000c9249,
>>>> 0x000c9249, 0x00000000, 0x00000000
>>>> [ 5860.323324] tg3 0000:01:00.0: >eth0: 0x000021c0: 0x000c9249,
>>>> 0x000c9249, 0x00000000, 0x00000000
>>>> [ 5860.323329] tg3 0000:01:00.0: >eth0: 0x000021d0: 0x000c9249,
>>>> 0x000c9249, 0x00000000, 0x00000000
>>>> [ 5860.323335] tg3 0000:01:00.0: >eth0: 0x000021e0: 0x000c9249,
>>>> 0x000c9249, 0x00000000, 0x00000000
>>>> [ 5860.323340] tg3 0000:01:00.0: >eth0: 0x000021f0: 0x000c9249,
>>>> 0x000c9249, 0x00000000, 0x00000000
>>>> [ 5860.323346] tg3 0000:01:00.0: >eth0: 0x00002200: 0x0000004a,
>>>> 0x00000000, 0x00000000, 0x00000000
>>>> [ 5860.323352] tg3 0000:01:00.0: >eth0: 0x00002400: 0x00000012,
>>>> 0x00000000, 0x00000000, 0x00000000
>>>> [ 5860.323357] tg3 0000:01:00.0: >eth0: 0x00002450: 0x00000001,
>>>> 0xb0994000, 0x02000000, 0x00006000
>>>> [ 5860.323363] tg3 0000:01:00.0: >eth0: 0x00002470: 0x00000000,
>>>> 0x0000003e, 0x00000000, 0x00000000
>>>> [ 5860.323369] tg3 0000:01:00.0: >eth0: 0x000024c0: 0x08000001,
>>>> 0x00000000, 0x00000000, 0x00000000
>>>> [ 5860.323375] tg3 0000:01:00.0: >eth0: 0x00002800: 0x00000006,
>>>> 0x00000000, 0x00000000, 0x00000000
>>>> [ 5860.323380] tg3 0000:01:00.0: >eth0: 0x00002c00: 0x00000006,
>>>> 0x00000000, 0x00000000, 0x00000070
>>>> [ 5860.323386] tg3 0000:01:00.0: >eth0: 0x00002c10: 0x00000000,
>>>> 0x00000000, 0x00000010, 0x00000000
>>>> [ 5860.323391] tg3 0000:01:00.0: >eth0: 0x00002c20: 0x00000002,
>>>> 0x00000000, 0x00000000, 0x00000000
>>>> [ 5860.323397] tg3 0000:01:00.0: >eth0: 0x00003000: 0x00000006,
>>>> 0x00000000, 0x00000000, 0x00000070
>>>> [ 5860.323403] tg3 0000:01:00.0: >eth0: 0x00003600: 0xe0236600,
>>>> 0x00170000, 0x00110000, 0x00000000
>>>> [ 5860.323409] tg3 0000:01:00.0: >eth0: 0x00003610: 0x00170000,
>>>> 0x00130000, 0x00150000, 0x00000000
>>>> [ 5860.323414] tg3 0000:01:00.0: >eth0: 0x00003620: 0x00000000,
>>>> 0x00000000, 0x00000000, 0x00082080
>>>> [ 5860.323420] tg3 0000:01:00.0: >eth0: 0x00003630: 0x00110000,
>>>> 0x30020000, 0x00001000, 0x00000000
>>>> [ 5860.323425] tg3 0000:01:00.0: >eth0: 0x00003640: 0x00000000,
>>>> 0x00000000, 0x00000020, 0x0000004b
>>>> [ 5860.323431] tg3 0000:01:00.0: >eth0: 0x00003650: 0x00000171,
>>>> 0x00000bff, 0x57780001, 0x00000000
>>>> [ 5860.323436] tg3 0000:01:00.0: >eth0: 0x00003660: 0x00000000,
>>>> 0x00000000, 0x000000af, 0x00000000
>>>> [ 5860.323465] tg3 0000:01:00.0: >eth0: 0x00003670: 0x0000002a,
>>>> 0xfeffffe3, 0x00000000, 0x00000000
>>>> [ 5860.323474] tg3 0000:01:00.0: >eth0: 0x000036a0: 0x00000000,
>>>> 0x42000000, 0x00000000, 0x00000041
>>>> [ 5860.323480] tg3 0000:01:00.0: >eth0: 0x00003c00: 0x00000302,
>>>> 0x00000000, 0x00000014, 0x00000048
>>>> [ 5860.323486] tg3 0000:01:00.0: >eth0: 0x00003c10: 0x00000005,
>>>> 0x00000035, 0x00000000, 0x00000000
>>>> [ 5860.323491] tg3 0000:01:00.0: >eth0: 0x00003c20: 0x00000005,
>>>> 0x00000005, 0x00000000, 0x00000000
>>>> [ 5860.323497] tg3 0000:01:00.0: >eth0: 0x00003c30: 0x00000000,
>>>> 0x00000000, 0x00000001, 0xaf244000
>>>> [ 5860.323502] tg3 0000:01:00.0: >eth0: 0x00003c40: 0x00000000,
>>>> 0x00000b00, 0x00000000, 0x00000000
>>>> [ 5860.323508] tg3 0000:01:00.0: >eth0: 0x00003c50: 0x00000000,
>>>> 0x0000003e, 0x00000000, 0x00000000
>>>> [ 5860.323513] tg3 0000:01:00.0: >eth0: 0x00003c80: 0x0000003e,
>>>> 0x00000000, 0x00000000, 0x00000000
>>>> [ 5860.323519] tg3 0000:01:00.0: >eth0: 0x00003cc0: 0x00000005,
>>>> 0x00000000, 0x00000000, 0x00000000
>>>> [ 5860.323524] tg3 0000:01:00.0: >eth0: 0x00004000: 0x00000002,
>>>> 0x00000000, 0x001a1bd1, 0x001a5ebe
>>>> [ 5860.323530] tg3 0000:01:00.0: >eth0: 0x00004010: 0x0040b040,
>>>> 0x00249012, 0x00800440, 0x00418062
>>>> [ 5860.323536] tg3 0000:01:00.0: >eth0: 0x00004020: 0x00000000,
>>>> 0x00000000, 0x00000010, 0x00000000
>>>> [ 5860.323541] tg3 0000:01:00.0: >eth0: 0x00004030: 0x00000010,
>>>> 0x00000030, 0x00000000, 0x00000000
>>>> [ 5860.323547] tg3 0000:01:00.0: >eth0: 0x00004040: 0x00000000,
>>>> 0x00000000, 0x01080c20, 0x00000000
>>>> [ 5860.323552] tg3 0000:01:00.0: >eth0: 0x00004050: 0x00000000,
>>>> 0x00000000, 0x00249010, 0x00419002
>>>> [ 5860.323558] tg3 0000:01:00.0: >eth0: 0x00004060: 0x0041c000,
>>>> 0x00000000, 0x00000000, 0x00000000
>>>> [ 5860.323564] tg3 0000:01:00.0: >eth0: 0x00004400: 0x00000006,
>>>> 0x00000000, 0x00010000, 0x00004000
>>>> [ 5860.323569] tg3 0000:01:00.0: >eth0: 0x00004410: 0x00000000,
>>>> 0x00000010, 0x00000060, 0x00000000
>>>> [ 5860.323575] tg3 0000:01:00.0: >eth0: 0x00004420: 0x0000003d,
>>>> 0x00000000, 0x00000000, 0x00000000
>>>> [ 5860.323580] tg3 0000:01:00.0: >eth0: 0x00004440: 0x00000000,
>>>> 0x00000000, 0x00000000, 0x00802c1d
>>>> [ 5860.323586] tg3 0000:01:00.0: >eth0: 0x00004450: 0x0001227f,
>>>> 0x004a004b, 0x00000000, 0x00000000
>>>> [ 5860.323592] tg3 0000:01:00.0: >eth0: 0x00004800: 0x18033bfe,
>>>> 0x00000000, 0x00000000, 0x00000020
>>>> [ 5860.323597] tg3 0000:01:00.0: >eth0: 0x00004810: 0x00000000,
>>>> 0x00000003, 0x015602ca, 0x00000000
>>>> [ 5860.323603] tg3 0000:01:00.0: >eth0: 0x00004820: 0x0000001c,
>>>> 0x00000000, 0xf03b0000, 0xb1f88958
>>>> [ 5860.323608] tg3 0000:01:00.0: >eth0: 0x00004830: 0x00000000,
>>>> 0x000000fb, 0x000000fb, 0x00000000
>>>> [ 5860.323614] tg3 0000:01:00.0: >eth0: 0x00004840: 0x00000007,
>>>> 0x00000006, 0x030e2201, 0x1c2a3d51
>>>> [ 5860.323619] tg3 0000:01:00.0: >eth0: 0x00004850: 0xffffbb40,
>>>> 0xc2ae0156, 0x19181918, 0x00000000
>>>> [ 5860.323625] tg3 0000:01:00.0: >eth0: 0x00004860: 0x0300001c,
>>>> 0x00000000, 0x00000000, 0x00000000
>>>> [ 5860.323630] tg3 0000:01:00.0: >eth0: 0x00004900: 0x00028207,
>>>> 0x50200e08, 0x00000000, 0x00000000
>>>> [ 5860.323636] tg3 0000:01:00.0: >eth0: 0x00004910: 0x00000018,
>>>> 0x00000000, 0x00000000, 0x00000000
>>>> [ 5860.323642] tg3 0000:01:00.0: >eth0: 0x00004c00: 0x200003fe,
>>>> 0x00000000, 0x00000000, 0x00000000
>>>> [ 5860.323647] tg3 0000:01:00.0: >eth0: 0x00004c10: 0x00000000,
>>>> 0x00000000, 0x00000006, 0x00000000
>>>> [ 5860.323652] tg3 0000:01:00.0: >eth0: 0x00004c20: 0x00000000,
>>>> 0x00000000, 0x00000000, 0x00000006
>>>> [ 5860.323658] tg3 0000:01:00.0: >eth0: 0x00004c30: 0x00000000,
>>>> 0x00000000, 0x00000078, 0x00000078
>>>> [ 5860.323664] tg3 0000:01:00.0: >eth0: 0x00004c40: 0x00000000,
>>>> 0xaf244000, 0x00010020, 0x00000020
>>>> [ 5860.323669] tg3 0000:01:00.0: >eth0: 0x00004c50: 0x07fffe3d,
>>>> 0x00f87bff, 0x00000000, 0x1f3e4444
>>>> [ 5860.323675] tg3 0000:01:00.0: >eth0: 0x00005000: 0x00009800,
>>>> 0x80000000, 0x00000000, 0x00000000
>>>> [ 5860.323681] tg3 0000:01:00.0: >eth0: 0x00005010: 0x00000000,
>>>> 0x00000000, 0x00000000, 0x40003544
>>>> [ 5860.323686] tg3 0000:01:00.0: >eth0: 0x00005020: 0x8fbf001c,
>>>> 0x00000000, 0x00000000, 0x40000020
>>>> [ 5860.323692] tg3 0000:01:00.0: >eth0: 0x00005030: 0x00000000,
>>>> 0x00000051, 0x00000000, 0x00000000
>>>> [ 5860.323697] tg3 0000:01:00.0: >eth0: 0x00005040: 0x00000000,
>>>> 0x00000000, 0x40003696, 0x00000000
>>>> [ 5860.323703] tg3 0000:01:00.0: >eth0: 0x00005080: 0x00009800,
>>>> 0x80008000, 0x00000000, 0x00000000
>>>> [ 5860.323708] tg3 0000:01:00.0: >eth0: 0x00005090: 0x00000000,
>>>> 0x00000000, 0x00000000, 0x40001d40
>>>> [ 5860.323714] tg3 0000:01:00.0: >eth0: 0x000050a0: 0x24020001,
>>>> 0x00000000, 0x00000000, 0x40000020
>>>> [ 5860.323719] tg3 0000:01:00.0: >eth0: 0x000050b0: 0x00000000,
>>>> 0x00000051, 0x00000000, 0x00000000
>>>> [ 5860.323725] tg3 0000:01:00.0: >eth0: 0x000050c0: 0x00000000,
>>>> 0x00000000, 0x40003696, 0x00000000
>>>> [ 5860.323730] tg3 0000:01:00.0: >eth0: 0x00005100: 0x00009800,
>>>> 0x80008000, 0x00000000, 0x00000000
>>>> [ 5860.323735] tg3 0000:01:00.0: >eth0: 0x00005110: 0x00000000,
>>>> 0x00000000, 0x00000000, 0x400036c0
>>>> [ 5860.323741] tg3 0000:01:00.0: >eth0: 0x00005120: 0xafb10014,
>>>> 0x00000000, 0x00000000, 0x40000020
>>>> [ 5860.323746] tg3 0000:01:00.0: >eth0: 0x00005130: 0x00000000,
>>>> 0x00000051, 0x00000000, 0x00000000
>>>> [ 5860.323752] tg3 0000:01:00.0: >eth0: 0x00005140: 0x00000000,
>>>> 0x00000000, 0x40002e20, 0x00000000
>>>> [ 5860.323757] tg3 0000:01:00.0: >eth0: 0x00005180: 0x00009800,
>>>> 0x80008000, 0x00000000, 0x00000000
>>>> [ 5860.323763] tg3 0000:01:00.0: >eth0: 0x00005190: 0x00000000,
>>>> 0x00000000, 0x00000000, 0x400036a8
>>>> [ 5860.323768] tg3 0000:01:00.0: >eth0: 0x000051a0: 0xafb20018,
>>>> 0x00000000, 0x00000000, 0x40000020
>>>> [ 5860.323774] tg3 0000:01:00.0: >eth0: 0x000051b0: 0x00000000,
>>>> 0x00000051, 0x00000000, 0x00000000
>>>> [ 5860.323779] tg3 0000:01:00.0: >eth0: 0x000051c0: 0x00000000,
>>>> 0x00000000, 0x40002c92, 0x00000000
>>>> [ 5860.323785] tg3 0000:01:00.0: >eth0: 0x00005200: 0x08005fe8,
>>>> 0x00000000, 0x00000000, 0x400036b4
>>>> [ 5860.323790] tg3 0000:01:00.0: >eth0: 0x00005210: 0x08005fe8,
>>>> 0x00000000, 0x08004c80, 0x08005fc8
>>>> [ 5860.323796] tg3 0000:01:00.0: >eth0: 0x00005220: 0x00000000,
>>>> 0x400036b4, 0x08005fe8, 0x08005fc8
>>>> [ 5860.323802] tg3 0000:01:00.0: >eth0: 0x00005230: 0x00000000,
>>>> 0x00000000, 0x08004c80, 0x00000000
>>>> [ 5860.323807] tg3 0000:01:00.0: >eth0: 0x00005240: 0x00000000,
>>>> 0x00000000, 0x00000000, 0x81020000
>>>> [ 5860.323813] tg3 0000:01:00.0: >eth0: 0x00005260: 0x00000000,
>>>> 0x81020000, 0x00000000, 0x00000000
>>>> [ 5860.323818] tg3 0000:01:00.0: >eth0: 0x00005270: 0x00000000,
>>>> 0x00000000, 0x400036b4, 0x40001d2c
>>>> [ 5860.323824] tg3 0000:01:00.0: >eth0: 0x00005280: 0x00009800,
>>>> 0x80000000, 0x00000000, 0x00000000
>>>> [ 5860.323829] tg3 0000:01:00.0: >eth0: 0x00005290: 0x00000000,
>>>> 0x00000000, 0x00000000, 0x40002c80
>>>> [ 5860.323835] tg3 0000:01:00.0: >eth0: 0x000052a0: 0x16220003,
>>>> 0x00000000, 0x00000000, 0x40000020
>>>> [ 5860.323840] tg3 0000:01:00.0: >eth0: 0x000052b0: 0x00000000,
>>>> 0x00000051, 0x00000000, 0x00000000
>>>> [ 5860.323846] tg3 0000:01:00.0: >eth0: 0x000052c0: 0x00000000,
>>>> 0x00000000, 0x40003696, 0x00000000
>>>> [ 5860.323851] tg3 0000:01:00.0: >eth0: 0x00005300: 0x00009800,
>>>> 0x80008000, 0x00000000, 0x00000000
>>>> [ 5860.323857] tg3 0000:01:00.0: >eth0: 0x00005310: 0x00000000,
>>>> 0x00000000, 0x00000000, 0x40002cac
>>>> [ 5860.323862] tg3 0000:01:00.0: >eth0: 0x00005320: 0x24020001,
>>>> 0x00000000, 0x00000000, 0x40000020
>>>> [ 5860.323868] tg3 0000:01:00.0: >eth0: 0x00005330: 0x00000000,
>>>> 0x00000051, 0x00000000, 0x00000000
>>>> [ 5860.323873] tg3 0000:01:00.0: >eth0: 0x00005340: 0x00000000,
>>>> 0x00000000, 0x40002ca8, 0x00000000
>>>> [ 5860.323879] tg3 0000:01:00.0: >eth0: 0x00005380: 0x00009800,
>>>> 0x80008000, 0x00000000, 0x00000000
>>>> [ 5860.323884] tg3 0000:01:00.0: >eth0: 0x00005390: 0x00000000,
>>>> 0x00000000, 0x00000000, 0x400036bc
>>>> [ 5860.323890] tg3 0000:01:00.0: >eth0: 0x000053a0: 0x27bdffe0,
>>>> 0x00000000, 0x00000000, 0x40000020
>>>> [ 5860.323895] tg3 0000:01:00.0: >eth0: 0x000053b0: 0x00000000,
>>>> 0x00000051, 0x00000000, 0x00000000
>>>> [ 5860.323901] tg3 0000:01:00.0: >eth0: 0x000053c0: 0x00000000,
>>>> 0x00000000, 0x40002cc4, 0x00000000
>>>> [ 5860.323906] tg3 0000:01:00.0: >eth0: 0x00005600: 0x169214e4,
>>>> 0x00100406, 0x02000001, 0x00000010
>>>> [ 5860.323912] tg3 0000:01:00.0: >eth0: 0x00005610: 0xd3400004,
>>>> 0x00000000, 0x00000000, 0x00000000
>>>> [ 5860.323918] tg3 0000:01:00.0: >eth0: 0x00005620: 0x00000000,
>>>> 0x00000000, 0x00000000, 0x06011025
>>>> [ 5860.323923] tg3 0000:01:00.0: >eth0: 0x00005630: 0x00000000,
>>>> 0x00000048, 0x00000000, 0x0000010a
>>>> [ 5860.323929] tg3 0000:01:00.0: >eth0: 0x00005640: 0x00000000,
>>>> 0x00000000, 0xc0036001, 0x08002008
>>>> [ 5860.323934] tg3 0000:01:00.0: >eth0: 0x00005650: 0x0081cc05,
>>>> 0xfee0100c, 0x00000000, 0x00004189
>>>> [ 5860.323940] tg3 0000:01:00.0: >eth0: 0x00005660: 0x006c5009,
>>>> 0xffa85ef5, 0xf0010298, 0x76180000
>>>> [ 5860.323945] tg3 0000:01:00.0: >eth0: 0x00005670: 0x000010f2,
>>>> 0x00000000, 0x00000460, 0x00000000
>>>> [ 5860.323951] tg3 0000:01:00.0: >eth0: 0x00005680: 0x40000008,
>>>> 0x40000008, 0x00000000, 0x00000000
>>>> [ 5860.323956] tg3 0000:01:00.0: >eth0: 0x000056b0: 0x00000000,
>>>> 0x00000000, 0x00000000, 0x57780001
>>>> [ 5860.323962] tg3 0000:01:00.0: >eth0: 0x000056c0: 0x00000000,
>>>> 0x00000000, 0x0000000e, 0x00020010
>>>> [ 5860.323968] tg3 0000:01:00.0: >eth0: 0x000056d0: 0x05908fa0,
>>>> 0x00112000, 0x0006cc11, 0x10110143
>>>> [ 5860.323973] tg3 0000:01:00.0: >eth0: 0x000056f0: 0x0000001f,
>>>> 0x00000000, 0x00000000, 0x00000000
>>>> [ 5860.323979] tg3 0000:01:00.0: >eth0: 0x00005700: 0x13c10001,
>>>> 0x00100000, 0x00000000, 0x00062031
>>>> [ 5860.323984] tg3 0000:01:00.0: >eth0: 0x00005710: 0x00000001,
>>>> 0x00002000, 0x000000b4, 0x40000001
>>>> [ 5860.323990] tg3 0000:01:00.0: >eth0: 0x00005720: 0x0000000f,
>>>> 0xd3400400, 0x00000080, 0x00000000
>>>> [ 5860.323995] tg3 0000:01:00.0: >eth0: 0x00005730: 0x00000000,
>>>> 0x00000000, 0x00000000, 0x16010002
>>>> [ 5860.324001] tg3 0000:01:00.0: >eth0: 0x00005750: 0x800000ff,
>>>> 0x00000000, 0x00000000, 0x00000000
>>>> [ 5860.324006] tg3 0000:01:00.0: >eth0: 0x00005760: 0x16c10003,
>>>> 0xfeac38d5, 0xdc0ea1ff, 0x00010004
>>>> [ 5860.324012] tg3 0000:01:00.0: >eth0: 0x00005770: 0x00000000,
>>>> 0x00078116, 0x00000001, 0x00000000
>>>> [ 5860.324017] tg3 0000:01:00.0: >eth0: 0x00005780: 0x00000000,
>>>> 0x00000000, 0x00000000, 0xffffffff
>>>> [ 5860.324023] tg3 0000:01:00.0: >eth0: 0x00005800: 0x00000000,
>>>> 0x44000000, 0x00000000, 0x00000000
>>>> [ 5860.324028] tg3 0000:01:00.0: >eth0: 0x00005860: 0x00000000,
>>>> 0x00000000, 0x00000000, 0x00000106
>>>> [ 5860.324034] tg3 0000:01:00.0: >eth0: 0x00005880: 0x00000000,
>>>> 0x0000003e, 0x00000000, 0x00000000
>>>> [ 5860.324039] tg3 0000:01:00.0: >eth0: 0x00005900: 0x00000000,
>>>> 0x00000007, 0x00000000, 0x00000000
>>>> [ 5860.324045] tg3 0000:01:00.0: >eth0: 0x00005980: 0x00000000,
>>>> 0x00000007, 0x00000000, 0x00000000
>>>> [ 5860.324050] tg3 0000:01:00.0: >eth0: 0x00005a00: 0x00012001,
>>>> 0x00000000, 0x00010000, 0x00000000
>>>> [ 5860.324056] tg3 0000:01:00.0: >eth0: 0x00006000: 0x00000002,
>>>> 0x00000000, 0x00000000, 0x00000000
>>>> [ 5860.324063] tg3 0000:01:00.0: >eth0: 0x00006800: 0x04130034,
>>>> 0x20085082, 0x01009219, 0x064451b3
>>>> [ 5860.324068] tg3 0000:01:00.0: >eth0: 0x00006810: 0x81020000,
>>>> 0xffffffff, 0x00000000, 0x00000000
>>>> [ 5860.324074] tg3 0000:01:00.0: >eth0: 0x000068a0: 0x00000000,
>>>> 0x20010001, 0x00000000, 0x00000000
>>>> [ 5860.324079] tg3 0000:01:00.0: >eth0: 0x000068b0: 0x00040000,
>>>> 0x00000000, 0x00000000, 0x00000000
>>>> [ 5860.324085] tg3 0000:01:00.0: >eth0: 0x00006c20: 0x00000000,
>>>> 0x00100000, 0x00000000, 0x00000000
>>>> [ 5860.324091] tg3 0000:01:00.0: >eth0: 0x00007000: 0x08000188,
>>>> 0x00000000, 0x00000000, 0x00000000
>>>> [ 5860.324097] tg3 0000:01:00.0: >eth0: 0x00007010: 0xffffffff,
>>>> 0x00008200, 0x000500db, 0x03000a00
>>>> [ 5860.324102] tg3 0000:01:00.0: >eth0: 0x00007020: 0x00000000,
>>>> 0x00000000, 0x00000406, 0x10004000
>>>> [ 5860.324108] tg3 0000:01:00.0: >eth0: 0x00007030: 0x00020000,
>>>> 0x00000004, 0x001f0010, 0x00000000
>>>> [ 5860.324114] tg3 0000:01:00.0: >eth0: 0x00007500: 0x00000000,
>>>> 0x00000000, 0x0000008b, 0x00000240
>>>> [ 5860.324124] tg3 0000:01:00.0: >eth0: 0: Host status block
>>>> [00000001:00000044:(0000:003e:0000):(003e:0005)]
>>>> [ 5860.324131] tg3 0000:01:00.0: >eth0: 0: NAPI info
>>>> [00000044:00000044:(0007:0005:01ff):003e:(0106:0000:0000:0000)]
>>>> [ 5860.330543] tg3 0000:01:00.0: >eth0: Link is down
>>>> [ 5860.341734] tg3 0000:01:00.0: >eth0: Link is down
>>>> [ 5874.335216] tg3 0000:01:00.0: >eth0: Link is up at 100 Mbps,
>>>> full duplex
>>>> [ 5874.335222] tg3 0000:01:00.0: >eth0: Flow control is on for TX
>>>> and on
>>>> for RX
>>>>
>>>> Justin Chudgar | Weed, CA 96094 | 530 921 0738 |
>>>> http://www.justinzane.com/
>>>>
>>>> On 10/12/2012 05:12 PM, Nithin Nayak Sujir wrote:
>>>>>> lspci | grep 57780
>>>>> 43:00.0 Ethernet controller: Broadcom Corporation NetLink BCM57780
>>>>> Gigabit Ethernet PCIe (rev 01)
>>>>>
>>>>>
>>>>> To read register 0x400
>>>>>
>>>>>> sudo setpci -s 43:00.0 78.l=400
>>>>>> sudo setpci -s 43:00.0 80.l
>>>>> 00e04806
>>>>>
>>>>>
>>>>>
>>>>> Nithin.
>>>>>
>>>>>
>>>>> On 10/12/2012 05:09 PM, Justin Chudgar wrote:
>>>>>> # ethtool eth0
>>>>>> I'm sorry, but I'm not quite understanding item #2. Could you
>>>>>> send me an
>>>>>> actual example with lspci and the setpci commands. Thanks.
>>>>>>
>>>>>> Justin Chudgar | Weed, CA 96094 | 530 921 0738 |
>>>>>> http://www.justinzane.com/
>>>>>>
>>>>>> On 10/12/2012 01:24 PM, Nithin Sujir wrote:
>>>>>>> Justin,
>>>>>>> I'm checking with the hardware team to see what info they need to
>>>>>>> diagnose. In the meantime can you send me the output of
>>>>>>>
>>>>>>> 1. ethtool <iface>
>>>>>>> 2. Reg read of the following registers. You can do this by indirect
>>>>>>> access for e.g. to read register 0x400. Everything is in hex so
>>>>>>> don't add a 0x to any number.
>>>>>>> setpci -s <pci bus>:<pci dev>.<pci fn> 78.l=400
>>>>>>> setpci -s <pci bus>:<pci dev>.<pci fn> 80.l
>>>>>>>
>>>>>>> Give me the readings for 0x400, 0x404, 0x408, 0x45c, 0x460,
>>>>>>> all
>>>>>>> from 0x3600-0x3610, 0x362c, 0x3630.
>>>>>>>
>>>>>>> Can you do this for both when it links up in 100Mbit and when you
>>>>>>> force it to 0x20 and it doesn't link up.
>>>>>>>
>>>>>>> Thanks,
>>>>>>> Nithin.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>> -----Original Message-----
>>>>>>>> From: Justin Chudgar [mailto:justin@justinzane.com]
>>>>>>>> Sent: Thursday, October 11, 2012 11:38 PM
>>>>>>>> To: Nithin Sujir
>>>>>>>> Cc: 1063038@bugs.launchpad.net
>>>>>>>> Subject: Re: [Bug 1063038] Re: Broadcom BCM57780 Cannot Connect at
>>>>>>>> Gigabit
>>>>>>>> Speed using tg3 module.
>>>>>>>>
>>>>>>>> One thing I noticed is that my `ethtool -i eth0` output is
>>>>>>>> different. I've
>>>>>>>> listed your values to the right where the seem to be significant.
>>>>>>>> I'm a little in the dark as to why my `firmware-version` string
>>>>>>>> and
>>>>>>>> `eeprom-
>>>>>>>> access` bool values are different and whether that has any import.
>>>>>>>>
>>>>>>>> # ethtool -i eth0
>>>>>>>> driver: tg3
>>>>>>>>>> version: 3.123 << 3.121
>>>>>>>>>> firmware-version: sb << 57780-v3.15
>>>>>>>> bus-info: 0000:01:00.0
>>>>>>>> supports-statistics: yes
>>>>>>>> supports-test: yes
>>>>>>>>>> supports-eeprom-access: no << yes
>>>>>>>> supports-register-dump: yes
>>>>>>>>
>>>>>>>> Another interesting observation is that `ethtool -s eth0 advertise
>>>>>>>> 0x020`
>>>>>>>> forcing autoneg to select 1000Mbps/Full kills the connection. Do
>>>>>>>> you have any suggestions as to how to debug the rate/duplex
>>>>>>>> autonegotiation?
>>>>>>>> I'm unsure how to proceed to further diagnose this problem.
>>>>>>>>
>>>>>>>> [BTW, I just changed DNS servers and am still ironing out side
>>>>>>>> effects. If
>>>>>>>> I've duplicated mail to you, I'm sorry.]
>>>>>>>>
>>>>>>>> Justin Chudgar | Weed, CA 96094 | 530 921 0738 |
>>>>>>>> http://www.justinzane.com/
>>>>>>>>
>>>>>>>> On 10/11/2012 04:23 PM, Nithin Sujir wrote:
>>>>>>>>
>>>>>>>>> Justin,
>>>>>>>>> Sorry, I'd already replied to netdev but found out later it
>>>>>>>>> didn't
>>>>>>>>> make it.
>>>>>>>> Resending what I sent netdev but did not reach there.
>>>>>>>>> Basically I'm not seeing a problem with the 57780 with either
>>>>>>>>> RedHat or
>>>>>>>> Ubuntu.
>>>>>>>>> So I'm not sure what it could be the problem in your case.
>>>>>>>>>
>>>>>>>>> Thanks,
>>>>>>>>> Nithin.
>>>>>>>>>
>>>>>>>>> --- Quote ---
>>>>>>>>> I don't see a problem linking up with 57780 at gigabit. I tested
>>>>>>>>> the latest
>>>>>>>> net kernel (3.6.0) and
>>>>>>>>> to make sure it's not ubuntu specific, tested ubuntu 12.04 as
>>>>>>>>> well
>>>>>>>> (3.2.0.23-generic). Everything
>>>>>>>>> works fine here on my setup. As you can see below, link is up at
>>>>>>>>> gigabit and
>>>>>>>> I'm able to send/receive.
>>>>>>>>> > sudo ethtool -i eth7
>>>>>>>>> driver: tg3
>>>>>>>>> version: 3.121
>>>>>>>>> firmware-version: 57780-v3.15
>>>>>>>>> bus-info: 0000:43:00.0
>>>>>>>>> supports-statistics: yes
>>>>>>>>> supports-test: yes
>>>>>>>>> supports-eeprom-access: yes
>>>>>>>>> supports-register-dump: yes
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> > sudo ethtool eth7
>>>>>>>>> Settings for eth7:
>>>>>>>>> Supported ports: [ TP MII ]
>>>>>>>>> Supported link modes: 10baseT/Half 10baseT/Full
>>>>>>>>> 100baseT/Half 100baseT/Full
>>>>>>>>> 1000baseT/Half 1000baseT/Full
>>>>>>>>> Supported pause frame use: Symmetric Receive-only
>>>>>>>>> Supports auto-negotiation: Yes
>>>>>>>>> Advertised link modes: 10baseT/Half 10baseT/Full
>>>>>>>>> 100baseT/Half 100baseT/Full
>>>>>>>>> 1000baseT/Half 1000baseT/Full
>>>>>>>>> Advertised pause frame use: Symmetric Receive-only
>>>>>>>>> Advertised auto-negotiation: Yes
>>>>>>>>> Speed: 1000Mb/s
>>>>>>>>> Duplex: Full
>>>>>>>>> Port: MII
>>>>>>>>> PHYAD: 1
>>>>>>>>> Transceiver: external
>>>>>>>>> Auto-negotiation: on
>>>>>>>>> Supports Wake-on: g
>>>>>>>>> Wake-on: d
>>>>>>>>> Current message level: 0x000000ff (255)
>>>>>>>>> drv probe link timer ifdown ifup rx_err tx_err
>>>>>>>>> Link detected: yes
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> > ifconfig eth7
>>>>>>>>> eth7 Link encap:Ethernet HWaddr 00:10:18:2a:18:cd
>>>>>>>>> inet addr:3.3.3.1 Bcast:3.3.3.255 Mask:255.255.255.0
>>>>>>>>> inet6 addr: fe80::210:18ff:fe2a:18cd/64 Scope:Link
>>>>>>>>> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
>>>>>>>>> RX packets:1224 errors:0 dropped:0 overruns:0 frame:0
>>>>>>>>> TX packets:1114 errors:0 dropped:0 overruns:0 carrier:0
>>>>>>>>> collisions:0 txqueuelen:1000
>>>>>>>>> RX bytes:115500 (115.5 KB) TX bytes:146587 (146.5 KB)
>>>>>>>>> Interrupt:80
>>>>>>>>>
>>>>>>>>> > ping 3.3.3.2 -c 1
>>>>>>>>> PING 3.3.3.2 (3.3.3.2) 56(84) bytes of data.
>>>>>>>>> 64 bytes from 3.3.3.2: icmp_req=1 ttl=64 time=0.185 ms
>>>>>>>>>
>>>>>>>>> --- 3.3.3.2 ping statistics ---
>>>>>>>>> 1 packets transmitted, 1 received, 0% packet loss, time 0ms
>>>>>>>>> rtt min/avg/max/mdev = 0.185/0.185/0.185/0.000 ms
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Thanks,
>>>>>>>>> Nithin.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>> -----Original Message-----
>>>>>>>>>> From: Michael Chan
>>>>>>>>>> Sent: Thursday, October 11, 2012 4:16 PM
>>>>>>>>>> To: Justin Chudgar; Nithin Sujir
>>>>>>>>>> Cc: 1063038@bugs.launchpad.net
>>>>>>>>>> Subject: RE: [Bug 1063038] Re: Broadcom BCM57780 Cannot Connect
>>>>>>>>>> at Gigabit
>>>>>>>>>> Speed using tg3 module.
>>>>>>>>>>
>>>>>>>>>> We saw this post on netdev a few days ago. Nithin, who is now
>>>>>>>>>> working with
>>>>>>>> me
>>>>>>>>>> on the tg3 driver has looked into it. I think he is having some
>>>>>>>>>> email
>>>>>>>>>> problems and will reply to you soon. Thanks.
>>>>>>>>>>
>>>>>>>>>> -----Original Message-----
>>>>>>>>>> From: Justin Chudgar [mailto:justin@justinzane.com]
>>>>>>>>>> Sent: Thursday, October 11, 2012 3:47 PM
>>>>>>>>>> To: Matthew Carlson; Michael Chan
>>>>>>>>>> Cc: 1063038@bugs.launchpad.net
>>>>>>>>>> Subject: Fwd: [Bug 1063038] Re: Broadcom BCM57780 Cannot Connect
>>>>>>>>>> at Gigabit
>>>>>>>>>> Speed using tg3 module.
>>>>>>>>>>
>>>>>>>>>> Matt & Michael:
>>>>>>>>>>
>>>>>>>>>> I apologize if this is an inappropriate way to deal with a bug;
>>>>>>>>>> please
>>>>>>>>>> instruct me if it is. I initially made the below-listed
>>>>>>>>>> report to
>>>>>>>>>> Ubuntu
>>>>>>>>>> and was directed upstream. I posted to the netdev list, but it
>>>>>>>>>> seems to
>>>>>>>>>> have been buried there. I just want to make sure that whomever
>>>>>>>>>> needs to
>>>>>>>>>> know does.
>>>>>>>>>>
>>>>>>>>>> Thanks.
>>>>>>>>>>
>>>>>>>>>> Justin Chudgar | Weed, CA 96094 | 530 921 0738 |
>>>>>>>>>> http://www.justinzane.com/
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> -------- Original Message --------
>>>>>>>>>> Subject: Fwd: [Bug 1063038] Re: Broadcom BCM57780 Cannot
>>>>>>>>>> Connect at
>>>>>>>>>> Gigabit Speed using tg3 module.
>>>>>>>>>> Date: Wed, 10 Oct 2012 05:24:35 -0700
>>>>>>>>>> From: Justin Chudgar <justin@justinzane.com>
>>>>>>>>>> To: netdev@vger.kernel.org
>>>>>>>>>> CC: 1063038@bugs.launchpad.net
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> I've got a device with a Broadcom 57780 ethernet NIC. It uses
>>>>>>>>>> the
>>>>>>>>>> tg3.ko
>>>>>>>>>> driver module. The problem is that this NIC cannot connect at
>>>>>>>>>> gigabit
>>>>>>>>>> (1000MBps) speed. In all cases connection works well at
>>>>>>>>>> 100MBps. I
>>>>>>>>>> reported this to Ubuntu as noted below and was directed here.
>>>>>>>>>> [https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1063038]
>>>>>>>>>> Following
>>>>>>>>>> are the tests I've completed:
>>>>>>>>>>
>>>>>>>>>> - Cables tested with cable tester
>>>>>>>>>> - Cables tested to work at gigabit speed with Realtek and Intel
>>>>>>>>>> gigabit
>>>>>>>>>> NICs.
>>>>>>>>>> - All unmanaged switch ports tested at gigabit speed with other
>>>>>>>>>> NICs.
>>>>>>>>>> - Tried to connect with NetworkManager enabled and disabled.
>>>>>>>>>> - Tried both dhcp and static connections.
>>>>>>>>>> - Tried to renegotiate connection with `ethtool -r` both with
>>>>>>>>>> TSO
>>>>>>>>>> enabled and disabled.
>>>>>>>>>> - Tried 3.2.0-23-generic 3.5.0-15-generic3.5.0-17-generic
>>>>>>>>>> 3.6.0-999-generic kernels from main, xorg-edgers and mainline
>>>>>>>>>> repos.
>>>>>>>>>> - Used 'tg3_debug=1' kernel option in grub with the following
>>>>>>>>>> output:
>>>>>>>>>>
>>>>>>>>>> [ 0.000000] Command line:
>>>>>>>>>> BOOT_IMAGE=/vmlinuz-3.5.0-17-generic
>>>>>>>>>> root=UUID=eccabacd-efb2-45b4-b7a6-2f530d50afd3 ro
>>>>>>>>>> rootflags=subvol=@
>>>>>>>>>> tg3_debug=1 i915_enable_rc6=7 i915_enable_fbc=1 lvds_downclock=1
>>>>>>>>>> [ 0.000000] Kernel command line:
>>>>>>>>>> BOOT_IMAGE=/vmlinuz-3.5.0-17-generic
>>>>>>>>>> root=UUID=eccabacd-efb2-45b4-b7a6-2f530d50afd3 ro
>>>>>>>>>> rootflags=subvol=@
>>>>>>>>>> tg3_debug=1 i915_enable_rc6=7 i915_enable_fbc=1 lvds_downclock=1
>>>>>>>>>> [ 5.963136] tg3.c:v3.123 (March 21, 2012)
>>>>>>>>>> [ 5.995781] tg3 mdio bus: probed
>>>>>>>>>> [ 6.005583] tg3 0000:01:00.0: >eth0: Tigon3
>>>>>>>>>> [partno(BCM57780) rev
>>>>>>>>>> 57780001] (PCI Express) MAC address dc:0e:a1:ac:38:d5
>>>>>>>>>> [ 6.005687] tg3 0000:01:00.0: >eth0: attached PHY driver
>>>>>>>>>> [Broadcom
>>>>>>>>>> BCM57780] (mii_bus:phy_addr=100:01)
>>>>>>>>>> [ 6.005790] tg3 0000:01:00.0: >eth0: RXcsums[1]
>>>>>>>>>> LinkChgREG[0]
>>>>>>>>>> MIirq[0] ASF[0] TSOcap[1]
>>>>>>>>>> [ 6.005887] tg3 0000:01:00.0: >eth0: dma_rwctrl[76180000]
>>>>>>>>>> dma_mask[64-bit]
>>>>>>>>>> [ 294.987653] tg3 0000:01:00.0: >irq 44 for MSI/MSI-X
>>>>>>>>>> [ 295.893224] tg3 0000:01:00.0: >eth0: Link is down
>>>>>>>>>> [ 309.887879] tg3 0000:01:00.0: >eth0: Link is up at 100
>>>>>>>>>> Mbps, full
>>>>>>>>>> duplex
>>>>>>>>>> [ 309.887886] tg3 0000:01:00.0: >eth0: Flow control is on
>>>>>>>>>> for TX and
>>>>>>>>>> on for RX
>>>>>>>>>>
>>>>>>>>>> Other distros' forums suggest loading broadcom.ko first;
>>>>>>>>>> however,
>>>>>>>>>> this
>>>>>>>>>> module is no present. Any suggestions would be much appreciated.
>>>>>>>>>>
>>>>>>>>>> lspci -vv:
>>>>>>>>>> 01:00.0 Ethernet controller: Broadcom Corporation NetLink
>>>>>>>>>> BCM57780
>>>>>>>>>> Gigabit Ethernet PCIe (rev 01)
>>>>>>>>>> Subsystem: Acer Incorporated [ALI] Device 0601
>>>>>>>>>> Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV-
>>>>>>>>>> VGASnoop-
>>>>>>>>>> ParErr- Stepping- SERR- FastB2B- DisINTx+
>>>>>>>>>> Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast
>>>>>>>>>>> TAbort-
>>>>>>>>>> <TAbort- <MAbort- >SERR- <PERR- INTx-
>>>>>>>>>> Latency: 0, Cache Line Size: 64 bytes
>>>>>>>>>> Interrupt: pin A routed to IRQ 44
>>>>>>>>>> Region 0: Memory at d3400000 (64-bit,
>>>>>>>>>> non-prefetchable)
>>>>>>>>>> [size=64K]
>>>>>>>>>> Capabilities: [48] Power Management version 3
>>>>>>>>>> Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA
>>>>>>>>>> PME(D0-,D1-,D2-,D3hot+,D3cold+)
>>>>>>>>>>
>>>>>>>>>> Status: D0 NoSoftRst+ PME-Enable- DSel=0
>>>>>>>>>> DScale=1 PME-
>>>>>>>>>> Capabilities: [60] Vendor Specific Information:
>>>>>>>>>> Len=6c <?>
>>>>>>>>>> Capabilities: [50] MSI: Enable+ Count=1/1 Maskable-
>>>>>>>>>> 64bit+
>>>>>>>>>> Address: 00000000fee0100c Data: 4189
>>>>>>>>>> Capabilities: [cc] Express (v2) Endpoint, MSI 00
>>>>>>>>>> DevCap: MaxPayload 128 bytes, PhantFunc 0,
>>>>>>>>>> Latency L0s
>>>>>>>>>> <4us, L1 unlimited
>>>>>>>>>> ExtTag+ AttnBtn- AttnInd- PwrInd- RBE+
>>>>>>>>>> FLReset-
>>>>>>>>>> DevCtl: Report errors: Correctable- Non-Fatal-
>>>>>>>>>> Fatal-
>>>>>>>>>> Unsupported-
>>>>>>>>>> RlxdOrd- ExtTag- PhantFunc- AuxPwr-
>>>>>>>>>> NoSnoop-
>>>>>>>>>> MaxPayload 128 bytes, MaxReadReq
>>>>>>>>>> 512 bytes
>>>>>>>>>> DevSta: CorrErr+ UncorrErr- FatalErr-
>>>>>>>>>> UnsuppReq-
>>>>>>>>>> AuxPwr+
>>>>>>>>>> TransPend+
>>>>>>>>>> LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM
>>>>>>>>>> L0s L1,
>>>>>>>>>> Latency L0 <1us, L1 <32us
>>>>>>>>>> ClockPM+ Surprise- LLActRep- BwNot-
>>>>>>>>>> LnkCtl: ASPM L0s L1 Enabled; RCB 64 bytes
>>>>>>>>>> Disabled-
>>>>>>>>>> Retrain- CommClk+
>>>>>>>>>> ExtSynch- ClockPM+ AutWidDis- BWInt-
>>>>>>>>>> AutBWInt-
>>>>>>>>>> LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train-
>>>>>>>>>> SlotClk+
>>>>>>>>>> DLActive- BWMgmt- ABWMgmt-
>>>>>>>>>> DevCap2: Completion Timeout: Range ABCD,
>>>>>>>>>> TimeoutDis+
>>>>>>>>>> DevCtl2: Completion Timeout: 50us to 50ms,
>>>>>>>>>> TimeoutDis-
>>>>>>>>>> LnkCtl2: Target Link Speed: 2.5GT/s,
>>>>>>>>>> EnterCompliance-
>>>>>>>>>> SpeedDis-, Selectable De-emphasis: -6dB
>>>>>>>>>> Transmit Margin: Normal Operating
>>>>>>>>>> Range,
>>>>>>>>>> EnterModifiedCompliance- ComplianceSOS-
>>>>>>>>>> Compliance De-emphasis: -6dB
>>>>>>>>>> LnkSta2: Current De-emphasis Level: -6dB
>>>>>>>>>> Capabilities: [100 v1] Advanced Error Reporting
>>>>>>>>>> UESta: DLP- SDES- TLP- FCP- CmpltTO-
>>>>>>>>>> CmpltAbrt-
>>>>>>>>>> UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
>>>>>>>>>> UEMsk: DLP- SDES- TLP- FCP- CmpltTO-
>>>>>>>>>> CmpltAbrt-
>>>>>>>>>> UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
>>>>>>>>>> UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO-
>>>>>>>>>> CmpltAbrt-
>>>>>>>>>> UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
>>>>>>>>>> CESta: RxErr+ BadTLP- BadDLLP- Rollover-
>>>>>>>>>> Timeout-
>>>>>>>>>> NonFatalErr-
>>>>>>>>>> CEMsk: RxErr- BadTLP- BadDLLP- Rollover-
>>>>>>>>>> Timeout-
>>>>>>>>>> NonFatalErr+
>>>>>>>>>> AERCap: First Error Pointer: 00, GenCap+
>>>>>>>>>> CGenEn-
>>>>>>>>>> ChkCap+
>>>>>>>>>> ChkEn-
>>>>>>>>>> Capabilities: [13c v1] Virtual Channel
>>>>>>>>>> Caps: LPEVC=0 RefClk=100ns PATEntryBits=1
>>>>>>>>>> Arb: Fixed- WRR32- WRR64- WRR128-
>>>>>>>>>> Ctrl: ArbSelect=Fixed
>>>>>>>>>> Status: InProgress-
>>>>>>>>>> VC0: Caps: PATOffset=00 MaxTimeSlots=1
>>>>>>>>>> RejSnoopTrans-
>>>>>>>>>> Arb: Fixed- WRR32- WRR64- WRR128-
>>>>>>>>>> TWRR128- WRR256-
>>>>>>>>>> Ctrl: Enable+ ID=0 ArbSelect=Fixed
>>>>>>>>>> TC/VC=ff
>>>>>>>>>> Status: NegoPending- InProgress-
>>>>>>>>>> Capabilities: [160 v1] Device Serial Number
>>>>>>>>>> dc-0e-a1-ff-fe-ac-38-d5
>>>>>>>>>> Capabilities: [16c v1] Power Budgeting <?>
>>>>>>>>>> Kernel driver in use: tg3
>>>>>>>>>> Kernel modules: tg3
>>>>>>>>>> ---
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Justin Chudgar | Weed, CA 96094 | 530 921 0738 |
>>>>>>>>>> http://www.justinzane.com/
>>>>>>>>>>
>>>>>>>>>> -------- Original Message --------
>>>>>>>>>> Subject: [Bug 1063038] Re: Broadcom BCM57780 Cannot
>>>>>>>>>> Connect at
>>>>>>>> Gigabit
>>>>>>>>>> Speed using tg3 module.
>>>>>>>>>> Date: Tue, 09 Oct 2012 14:38:45 -0000
>>>>>>>>>> From: Joseph Salisbury <joseph.salisbury@canonical.com>
>>>>>>>>>> Reply-To: Bug 1063038 <1063038@bugs.launchpad.net>
>>>>>>>>>> To: justin@justinzane.com
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> This issue appears to be an upstream bug, since you tested the
>>>>>>>>>> latest
>>>>>>>>>> upstream kernel. Would it be possible for you to open an
>>>>>>>>>> upstream bug
>>>>>>>>>> report[0]? That will allow the upstream Developers to
>>>>>>>>>> examine the
>>>>>>>>>> issue, and may provide a quicker resolution to the bug.
>>>>>>>>>>
>>>>>>>>>> Please follow the instructions on the wiki page[0]. The first
>>>>>>>>>> step is
>>>>>>>>>> to email the appropriate mailing list. If no response is
>>>>>>>>>> received, then
>>>>>>>>>> a bug may be opened on bugzilla.kernel.org.
>>>>>>>>>>
>>>>>>>>>> [0] https://wiki.ubuntu.com/Bugs/Upstream/kernel
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> ** Changed in: linux (Ubuntu)
>>>>>>>>>> Status: Confirmed => Triaged
>>>>>>>>>>
>>>>>>>>>> ** Changed in: linux (Ubuntu)
>>>>>>>>>> Importance: Undecided => Medium
>>>>>>>>>>
>>>>>>>>>> ** Tags added: kernel-bug-exists-upstream
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> You received this bug notification because you are subscribed to
>>>>>>>>>> the bug
>>>>>>>>>> report.
>>>>>>>>>> https://bugs.launchpad.net/bugs/1063038
>>>>>>>>>>
>>>>>>>>>> Title:
>>>>>>>>>> Broadcom BCM57780 Cannot Connect at Gigabit Speed using tg3
>>>>>>>>>> module.
>>>>>>>>>>
>>>>>>>>>> To manage notifications about this bug go to:
>>>>>>>>>>
>>>> https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1063038/+subscriptions
>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>
>
[-- Attachment #2: justin.vcf --]
[-- Type: text/x-vcard, Size: 150 bytes --]
begin:vcard
fn:Justin Chudgar
n:Chudgar;Justin
email;internet:justin@justinzane.com
tel;cell:530-921-0738
x-mozilla-html:FALSE
version:2.1
end:vcard
^ permalink raw reply
* Re: [PATCH 4/6] ptp: add api to get ptp seq id and event type from skb
From: Ben Hutchings @ 2012-10-16 23:10 UTC (permalink / raw)
To: Mugunthan V N; +Cc: netdev, davem, Richard Cochran
In-Reply-To: <1350427518-7230-5-git-send-email-mugunthanvnm@ti.com>
On Wed, 2012-10-17 at 04:15 +0530, Mugunthan V N wrote:
> Cc: Richard Cochran <richardcochran@gmail.com>
> Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
> ---
> include/linux/ptp_classify.h | 42 ++++++++++++++++++++++++++++++++++++++++++
> 1 files changed, 42 insertions(+), 0 deletions(-)
>
> diff --git a/include/linux/ptp_classify.h b/include/linux/ptp_classify.h
> index 1dc420b..9b3b55b 100644
> --- a/include/linux/ptp_classify.h
> +++ b/include/linux/ptp_classify.h
> @@ -137,4 +137,46 @@ static inline int ptp_filter_init(struct sock_filter *f, int len)
> {OP_RETA, 0, 0, 0 }, /* */ \
> /*L6x*/ {OP_RETK, 0, 0, PTP_CLASS_NONE },
>
> +static inline int ptp_get_skb_event(struct sk_buff *skb, u32 ptp_class,
> + u16 *evt_seqid, u8 *evt_msgtype)
> +{
> + u16 *seqid;
> + unsigned int offset;
> + u8 *msgtype, *data = skb->data;
> +
> + switch (ptp_class) {
> + case PTP_CLASS_V1_IPV4:
> + case PTP_CLASS_V2_IPV4:
> + offset = ETH_HLEN + IPV4_HLEN(data) + UDP_HLEN;
> + break;
> + case PTP_CLASS_V1_IPV6:
> + case PTP_CLASS_V2_IPV6:
> + offset = OFF_PTP6;
> + break;
> + case PTP_CLASS_V2_L2:
> + offset = ETH_HLEN;
> + break;
> + case PTP_CLASS_V2_VLAN:
> + offset = ETH_HLEN + VLAN_HLEN;
> + break;
> + default:
> + return 0;
> + }
> +
> + if (skb->len + ETH_HLEN < offset + OFF_PTP_SEQUENCE_ID + sizeof(*seqid))
> + return 0;
> +
> + if (unlikely(ptp_class & PTP_CLASS_V1))
> + msgtype = data + offset + OFF_PTP_CONTROL;
> + else
> + msgtype = data + offset;
> +
> + seqid = (u16 *)(data + offset + OFF_PTP_SEQUENCE_ID);
This assumes the skb is linear. Use skb_header_pointer() to allow for
fragmented skbs.
Ben.
> + *evt_seqid = ntohs(*seqid);
> + *evt_msgtype = *msgtype & 0xf;
> +
> + return 0;
> +}
> +
> #endif
--
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
^ permalink raw reply
* RE: [PATCH V2 0/7] support the cpts found on am335x devices
From: N, Mugunthan V @ 2012-10-16 23:11 UTC (permalink / raw)
To: Richard Cochran
Cc: netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
David Miller, Chemparathy, Cyril, Govindarajan, Sriramakrishnan
In-Reply-To: <20121016171407.GA2176@netboy.at.omicron.at>
> -----Original Message-----
> From: Richard Cochran [mailto:richardcochran@gmail.com]
> Sent: Tuesday, October 16, 2012 10:44 PM
> To: N, Mugunthan V
> Cc: netdev@vger.kernel.org; linux-arm-kernel@lists.infradead.org; David
> Miller; Chemparathy, Cyril; Govindarajan, Sriramakrishnan
> Subject: Re: [PATCH V2 0/7] support the cpts found on am335x devices
>
> On Tue, Oct 16, 2012 at 04:33:55PM +0000, N, Mugunthan V wrote:
> > I had seen some issues with the patch series.
>
> Please take another look. Excepting the last, none of your points
> holds water.
>
> > * CPTS will hold only LSB 32 bits of 64 bit Timer and the upper 32
> bit
> > time value has to be taken care by the software, but the time stamp
> > which is passed to skb or PTP clock consist of only 32 bit time
> value
>
> The driver handles this already.
Yes, I do agree that driver handles it. As Half roll over and Full roll
over events are not handled in the driver, I am just curious how will
the misaligned TS would be handled and also in cpts set time, the Lower
32 bit time is written to CPTS counter
>
> > * CPTS interrupts should be utilized to service Half and Full roll
> over
> > events as it is non sync events with respect to get/set time and
> PTP
> > pkt Tx/Rx
>
> Nope, no need for interrupts, since we already have a better way to
> handle this.
Since we poll for the 32bit over flow for every HZ * 8 cycle, won't
there be a system overhead. If the CPTS ref clock is changed according
to the ptp freq adjust api, how will the timecounter take care of change
in frequency
>
> > * CPTS Time which is obtained from hardware is not actually a nano
> > seconds as the CPTS ref clock is tied to 250MHz for AM335x.
>
> Did you even look at the code in my patch?
I had gone through the patch, but the same driver can be used in TI814x
where the user has the option to change the frequency from 250MHz may to
1GHz also, I thought of how it will be handled if we fix the multiplication
factor
>
> > * CPSW register mapping done in this patch series removes the CPSW
> > driver support for previous version found in TI814x
>
> In which Linux version (or commit) did this driver appear?
> I never saw it.
The current driver which is in vanilla kernel doesn't use extended slave
address which are conflict between TI814x CPSW IP version and AM335x CPSW
IP version. I have just posted my version of CPTS implementation. May be
we can work together make the driver compatible with both CPSW versions
>
> > * CPSW Time stamping is done only for port 0 and port 1 is not done
>
> Yes, you are right, and it is strange that the hardware time stamps on
> the external ports of the switch, and not at the host port as it
> should. Of course it does present us with a problem, since we cannot
> reasonably have both ports time stamping at the same time. I propose
> simply using a device tree attribute to tell which port to activate.
Since CPSW is a 3port Switch we should not fix time stamping will be enabled
only for slave 0 or passing slave number through DT. Its better if we
can configure both the slaves. This can be tested with EVM-sk which has
both the slave ports pinned out.
>
> Thanks,
> Richard
^ permalink raw reply
* Re: listen(2) backlog changes in or around Linux 3.1?
From: enh @ 2012-10-16 23:31 UTC (permalink / raw)
To: netdev
In-Reply-To: <CAJgzZoqhw6HJxa6uRbekLMaVTDVOo92YDtzqHnZoRiQ8tq6G2g@mail.gmail.com>
boiling things down to a short C++ program, i see that i can reproduce
the behavior even on 2.6 kernels. if i run this, i see 4 connections
immediately (3 + 1, as i'd expect)... but then about 10s later i see
another 2. and every few seconds after that, i see another 2. i've let
this run until i have hundreds of connect(2) calls that have returned,
despite my small listen(2) backlog and the fact that i'm not
accept(2)ing.
so i guess the only thing that's changed with newer kernels is timing
(hell, since i only see newer kernels on newer hardware, it might just
be a hardware thing).
and clearly i don't understand what the listen(2) backlog means any more.
#include <netinet/ip.h>
#include <netinet/tcp.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <iostream>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
void dump_ti(int fd) {
tcp_info ti;
socklen_t tcp_info_length = sizeof(tcp_info);
int rc = getsockopt(fd, SOL_IP, TCP_INFO, &ti, &tcp_info_length);
if (rc == -1) {
std::cout << "getsockopt rc " << rc << ": " << strerror(errno) << "\n";
return;
}
std::cout << "ti.tcpi_unacked=" << ti.tcpi_unacked << "\n";
std::cout << "ti.tcpi_sacked=" << ti.tcpi_sacked << "\n";
}
void connect_to(sockaddr_in& sa) {
int s = socket(AF_INET, SOCK_STREAM, 0);
if (s == -1) {
abort();
}
int rc = connect(s, (sockaddr*) &sa, sizeof(sockaddr_in));
std::cout << "connect = " << rc << "\n";
}
int main() {
int ss = socket(AF_INET, SOCK_STREAM, 0);
std::cout << "socket fd " << ss << "\n";
sockaddr_in sa;
memset(&sa, 0, sizeof(sa));
sa.sin_family = AF_INET;
sa.sin_addr.s_addr = htonl(INADDR_ANY);
sa.sin_port = htons(9877);
int rc = bind(ss, (sockaddr*) &sa, sizeof(sa));
std::cout << "bind rc " << rc << ": " << strerror(errno) << "\n";
std::cout << "bind port " << sa.sin_port << "\n";
rc = listen(ss, 1);
std::cout << "listen rc " << rc << ": " << strerror(errno) << "\n";
dump_ti(ss);
while (true) {
connect_to(sa);
dump_ti(ss);
}
return 0;
}
On Mon, Oct 15, 2012 at 10:26 AM, enh <enh@google.com> wrote:
> On Mon, Oct 15, 2012 at 10:12 AM, Venkat Venkatsubra
> <venkat.x.venkatsubra@oracle.com> wrote:
>> On 10/12/2012 6:40 PM, enh wrote:
>>>
>>> i used to use the following hack to unit test connect timeouts: i'd
>>> call listen(2) on a socket and then deliberately connect (backlog + 3)
>>> sockets without accept(2)ing any of the connections. (why 3? because
>>> Stevens told me so, and experiment backed him up. see figure 4.10 in
>>> his UNIX Network Programming.)
>>>
>>> with "old" kernels, 2.6.35-ish to 3.0-ish, this worked great. my next
>>> connect(2) to the same loopback port would hang indefinitely. i could
>>> even unblock the connect by calling accept(2) in another thread. this
>>> was awesome for testing.
>>>
>>> in 3.1 on ARM, 3.2 on x86 (Ubuntu desktop), and 3.4 on ARM, this no
>>> longer works. it doesn't seem to be as simple as "the constant is no
>>> longer 3". my tests are now flaky. sometimes they work like they used
>>> to, and sometimes an extra connect(2) will succeed. (or, if i'm in
>>> non-blocking mode, my poll(2) will return with the non-blocking socket
>>> that's trying to connect now ready.)
>>>
>>> i'm guessing if this changed in 3.1 and is still changed in 3.4,
>>> whatever's changed wasn't an accident. but i haven't been able to find
>>> the right search terms to RTFM. i also finally got around to grepping
>>> the kernel for the "+ 3", but wasn't able to find that. (so i'd be
>>> interested to know where the old behavior came from too.)
>>>
>>> my least worst workaround at the moment is to use one of RFC5737's
>>> test networks, but that requires that the device have a network
>>> connection, otherwise my connect(2)s fail immediately with
>>> ENETUNREACH, which is no use to me. also, unlike my old trick, i've
>>> got no way to suddenly "unblock" a slow connect(2) (this is useful for
>>> unit testing the code that does the poll(2) part of the usual
>>> connect-with-timeout implementation).
>>> https://android-review.googlesource.com/#/c/44563/
>>>
>>> hopefully someone here can shed some light on this? ideally someone
>>> will have a workaround as good as my old trick. i realize i was
>>> relying on undocumented behavior, and i'm happy to have to check
>>> /proc/version and behave appropriately, but i'd really like a way to
>>> keep my unit tests!
>>>
>>> thanks,
>>> elliott
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe netdev" in
>>> the body of a message to majordomo@vger.kernel.org
>>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>>
>> Hi Elliott,
>>
>> In BSD I think the backlog used to be reset to 3/2 times that passed by the
>> user. So, 2 becomes 3.
>> Probably the 1/2 times increase was to accommodate the ones in
>> partial/incomplete queue.
>> In Linux is it possible you were getting the same behavior before the below
>> commit ?
>> Since the check used to be "backlog+1" a 2 will behave as 3 ?
>
> i don't think so, because with <= 3.0 kernels i used to have a backlog
> of 1 and be able to make _4_ connections before my next connect would
> hang. but this > to >= change is at least something for me to
> investigate...
>
>> commit 8488df894d05d6fa41c2bd298c335f944bb0e401
>> Author: Wei Dong <weid@np.css.fujitsu.com>
>> Date: Fri Mar 2 12:37:26 2007 -0800
>>
>> [NET]: Fix bugs in "Whether sock accept queue is full" checking
>>
>> when I use linux TCP socket, and find there is a bug in function
>> sk_acceptq_is_full().
>>
>> When a new SYN comes, TCP module first checks its validation. If
>> valid,
>> send SYN,ACK to the client and add the sock to the syn hash table. Next
>> time if received the valid ACK for SYN,ACK from the client. server will
>> accept this connection and increase the sk->sk_ack_backlog -- which is
>> done in function tcp_check_req().We check wether acceptq is full in
>> function tcp_v4_syn_recv_sock().
>>
>> Consider an example:
>>
>> After listen(sockfd, 1) system call, sk->sk_max_ack_backlog is set to
>> 1. As we know, sk->sk_ack_backlog is initialized to 0. Assuming accept()
>> system call is not invoked now.
>>
>> 1. 1st connection comes. invoke sk_acceptq_is_full().
>> sk->sk_ack_backlog=0 sk->sk_max_ack_backlog=1, function return 0 accept
>> this connection.
>> Increase the sk->sk_ack_backlog
>> 2. 2nd connection comes. invoke sk_acceptq_is_full().
>> sk->sk_ack_backlog=1 sk->sk_max_ack_backlog=1, function return 0 accept
>> this connection.
>> Increase the sk->sk_ack_backlog
>> 3. 3rd connection comes. invoke sk_acceptq_is_full().
>> sk->sk_ack_backlog=2 sk->sk_max_ack_backlog=1, function return 1.
>> Refuse this connection.
>>
>> I think it has bugs. after listen system call. sk->sk_max_ack_backlog=1
>> but now it can accept 2 connections.
>>
>> Signed-off-by: Wei Dong <weid@np.css.fujitsu.com>
>> Signed-off-by: David S. Miller <davem@davemloft.net>
>>
>> Venkat
^ permalink raw reply
* Re: [PATCH net] netfilter: nf_conntrack: fix rt_gateway checks for h323
From: Pablo Neira Ayuso @ 2012-10-16 23:55 UTC (permalink / raw)
To: Julian Anastasov; +Cc: netfilter-devel, netdev
In-Reply-To: <1349823647-2166-1-git-send-email-ja@ssi.bg>
Hi Julian,
On Wed, Oct 10, 2012 at 02:00:47AM +0300, Julian Anastasov wrote:
> After the change "Adjust semantics of rt->rt_gateway"
> (commit f8126f1d51) we should properly match the nexthop when
> destinations are directly connected because rt_gateway can be 0.
>
> Signed-off-by: Julian Anastasov <ja@ssi.bg>
> ---
>
> This patch needs a closer look from the Netfilter team.
>
> It restores the check as it was committed originally,
> i.e. to compare nexthops. I'm not sure what is the desired logic,
> it can depend on the following:
>
> - two directly connected hosts (rt_gateway=0) can be from different
> subnets or not
>
> - one party A is the gateway (rt_gateway=0), another party uses
> this gateway (rt_gateway=A)
>
> May be someone that knows this code better can comment
> if the check should be different.
Your patch gets it working like before David's change in the
rt_gateway semantics.
I think the H.323 helper is doing "its best" to handle the following
call-forwarding scenario:
1) A calls B.
2) B replies to A that the alternate address is C.
3) A calls C.
Now assume that:
1) all traffic between A and B goes through the firewall.
and
2) all traffic between A and C don't go through the firewall.
If you want a picture, see section 5.2 of this site:
http://people.netfilter.org/zhaojingmin/h323_conntrack_nat_helper/#_Toc133598073
That code below is trying to detect if A and C don't go through the
firewall, just to skip the creation of one useless expectation (since
they can communicate without going through the firewall).
With the code below (function callforward_do_filter):
a) if A and C are on-link, then:
rt_nexthop(rt1, fl1.daddr) != rt_nexthop(rt2, fl2.daddr)
Bad luck, we create the expectation even if we don't need it.
b) if A and C are behind the same next hop:
rt_nexthop(rt1, fl1.daddr) == rt_nexthop(rt2, fl2.daddr)
We don't create the expectation.
c) if A is on-link and C is behind next hop:
rt_nexthop(rt1, fl1.daddr) != rt_nexthop(rt2, fl2.daddr)
Bad luck again, we create the expectation again.
This seems documented. We could make it better if we would have a way
to guess that A and C do not need to communicate through the firewall.
I'll take your patch, it leaves things just like it was before (which
was not really good).
Please, let me know if I'm missing anything. Thanks.
> net/netfilter/nf_conntrack_h323_main.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/net/netfilter/nf_conntrack_h323_main.c b/net/netfilter/nf_conntrack_h323_main.c
> index 1b30b0d..962795e 100644
> --- a/net/netfilter/nf_conntrack_h323_main.c
> +++ b/net/netfilter/nf_conntrack_h323_main.c
> @@ -753,7 +753,8 @@ static int callforward_do_filter(const union nf_inet_addr *src,
> flowi4_to_flowi(&fl1), false)) {
> if (!afinfo->route(&init_net, (struct dst_entry **)&rt2,
> flowi4_to_flowi(&fl2), false)) {
> - if (rt1->rt_gateway == rt2->rt_gateway &&
> + if (rt_nexthop(rt1, fl1.daddr) ==
> + rt_nexthop(rt2, fl2.daddr) &&
> rt1->dst.dev == rt2->dst.dev)
> ret = 1;
> dst_release(&rt2->dst);
> --
> 1.7.3.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* regression between v3.0 and v3.3 in bringing up IPoIB devices in a bond at boot
From: Jon Stanley @ 2012-10-17 1:16 UTC (permalink / raw)
To: netdev, Jiri Pirko, Andy Gospodarek, davem, fubar, kaber
Firstly, I apologize that this report isn't as well-formed as it
should be (i.e. I can't point to a specific commit that broke it), but
I'll do my best failing that. The reason I can't be as specific as I'd
like is that starting at 3.1-rc1, I'd run into the original VLAN
problem that I was having, and the patchset required to fix it (the
patch just submitted, efc73f4b, and 9b361c1) won't apply cleanly to
older kernels and I'm not sure it's worth the (seemingly massive)
effort required to backport them to something I don't plan to use :)
First, let me explain the configuration a little:
bond0 -> eth0, eth1.100
bond1 -> ib0, ib1
The first problem, which is now resolved, was that ib0 and ib1
wouldn't enslave at all because of the presence of VLAN0. I can now
get them to enslave manually (echo +ib0 > /sys/.../slaves) *if* the
bond is down. If the bond is up, I still get the "refused to change
device type", which is fairly expected (I think, but that could be the
problem here).
However, if I leave the distro (stock RHEL except the kernel) to it's
own devices to bring it up at boot, I get the same symptoms as though
the master (bond1 in this case) isn't down ("refused to change device
type"). If I go back to v3.0, everything works fine. I've also
verified that it doesn't work on current mainline, and that it works
fine without any VLAN devices configured on bond0.
Like I said, the only reason that I haven't already bisected this is
that I know that intermediate points are broken in a possibly
unrelated, but fatal, way. I'm more than willing to try things out to
figure this one out, it's got me stumped!
Thanks!
-Jon
^ permalink raw reply
* Re: [Bug 1063038] Re: Broadcom BCM57780 Cannot Connect at Gigabit Speed using tg3 module.
From: Michael Chan @ 2012-10-17 2:17 UTC (permalink / raw)
To: Justin Chudgar; +Cc: Nithin Sujir, 1063038@bugs.launchpad.net, netdev
In-Reply-To: <507DE8EF.4090807@justinzane.com>
On Tue, 2012-10-16 at 16:08 -0700, Justin Chudgar wrote:
> With that said, though, I wish to express my displeasure with this
> practice artificially limiting the performance and/or capabilities of
> hardware via hidden firmware settings. It seems to be thoroughly
> contrary to both the liberty intended by Free Software and to the
> liberty to use purchased goods in any legal manner.
>
> The end result that since Acer decided to deceptively limit hardware
> function via firmware, presumably to generate artificial pricepoint
> differentiation, Broadcom (not you guys) will agree not to fully support
> their hardware reflects poorly on Broadcom as well as Acer. I know that
> this will make me hesitant to buy devices from Acer or those
> incorporating Broadcom hardware.
Firmware plays no role here. It is their hardware design on the board
or on the RJ45 connector that makes 1Gbps not possible. I wasn't aware
of this until now because Acer did not even require Linux support on
these systems. So the right thing to do for these systems is to
recognize them as 10/100Mbps capable devices in the tg3 driver.
^ permalink raw reply
* Re: regression between v3.0 and v3.3 in bringing up IPoIB devices in a bond at boot
From: Jay Vosburgh @ 2012-10-17 4:58 UTC (permalink / raw)
To: Jon Stanley; +Cc: netdev, Jiri Pirko, Andy Gospodarek, davem, kaber
In-Reply-To: <CAJtaB1vQymkE7ebTj6QRJ-+mfirpTjh=j6vxTdXQFqwtKrKQVg@mail.gmail.com>
Jon Stanley <jstanley@rmrf.net> wrote:
>Firstly, I apologize that this report isn't as well-formed as it
>should be (i.e. I can't point to a specific commit that broke it), but
>I'll do my best failing that. The reason I can't be as specific as I'd
>like is that starting at 3.1-rc1, I'd run into the original VLAN
>problem that I was having, and the patchset required to fix it (the
>patch just submitted, efc73f4b, and 9b361c1) won't apply cleanly to
>older kernels and I'm not sure it's worth the (seemingly massive)
>effort required to backport them to something I don't plan to use :)
>
>First, let me explain the configuration a little:
>
>bond0 -> eth0, eth1.100
>bond1 -> ib0, ib1
>
>The first problem, which is now resolved, was that ib0 and ib1
>wouldn't enslave at all because of the presence of VLAN0. I can now
>get them to enslave manually (echo +ib0 > /sys/.../slaves) *if* the
>bond is down. If the bond is up, I still get the "refused to change
>device type", which is fairly expected (I think, but that could be the
>problem here).
>
>However, if I leave the distro (stock RHEL except the kernel) to it's
>own devices to bring it up at boot, I get the same symptoms as though
>the master (bond1 in this case) isn't down ("refused to change device
>type"). If I go back to v3.0, everything works fine. I've also
>verified that it doesn't work on current mainline, and that it works
>fine without any VLAN devices configured on bond0.
I haven't debugged on a live kernel yet to verify this, but I
think I see what may be happening. Basically, when the device is up,
VID 0 has been added, and the VLAN code refuses to change type on a
device with a VLAN configured (even VID 0).
If the bond is down (really, has never been up) when the
NETDEV_PRE_TYPE_CHANGE event happens, the vlan_device_event callback
will exit, because dev->vlan_info is NULL (dev here is the bond). It's
NULL because vlan_device_event will respond to a NETDEV_UP event by
adding VID 0 to the device, which is what allocates the dev->vlan_info,
so when the bond has never been up, there is no dev->vlan_info.
Once the bond is up, when the NETDEV_PRE_TYPE_CHANGE event
reaches vlan_device_event, it will not exit as before, but proceed into
the switch, and the NETDEV_PRE_TYPE_CHANGE case always returns
NOTIFY_BAD, which results in the "refused to change type" message.
It (in theory) works with no VLANs on bond0 because then I'll
guess that you have no VLANs at all, and therefore the 8021q module
isn't loaded, and so the whole "VID 0" and vlan_device_event business
doesn't take place.
I think that if vlan_device_event instead uses the new &
improved vlan_uses_dev() test instead of its current test, that may
resolve the problem; here's a patch against current net that I have not
tested at all, but may fix things. I'm not 100% sure this is the right
thing to do, as it may result in IPoIB interfaces with VID 0 configured
on them.
diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c
index 9096bcb..57170fa 100644
--- a/net/8021q/vlan.c
+++ b/net/8021q/vlan.c
@@ -342,7 +342,7 @@ static int vlan_device_event(struct notifier_block *unused, unsigned long event,
}
vlan_info = rtnl_dereference(dev->vlan_info);
- if (!vlan_info)
+ if (!vlan_info || !vlan_info->grp.nr_vlan_devs)
goto out;
grp = &vlan_info->grp;
Comments?
-J
---
-Jay Vosburgh, IBM Linux Technology Center, fubar@us.ibm.com
^ permalink raw reply related
* Missing or wrong firmware file bnx2 driver
From: Grzegorz Chmurzynski @ 2012-10-17 5:34 UTC (permalink / raw)
To: netdev
I noticed that for a long time no valid driver file in the 3.x branch of kernel.
Patch:
diff -ruNp linux-3.4/drivers/net/ethernet/broadcom/bnx2.c linux-3.4p/drivers/net/ethernet/broadcom/bnx2.c
--- linux-3.4/drivers/net/ethernet/broadcom/bnx2.c 2012-09-12 19:08:37.000000000 +0200
+++ linux-3.4p/drivers/net/ethernet/broadcom/bnx2.c 2012-09-17 09:34:16.000000000 +0200
@@ -59,7 +59,7 @@
#define DRV_MODULE_NAME "bnx2"
#define DRV_MODULE_VERSION "2.2.1"
#define DRV_MODULE_RELDATE "Dec 18, 2011"
-#define FW_MIPS_FILE_06 "bnx2/bnx2-mips-06-6.2.3.fw"
+#define FW_MIPS_FILE_06 "bnx2/bnx2-mips-06-6.2.1.fw"
#define FW_RV2P_FILE_06 "bnx2/bnx2-rv2p-06-6.0.15.fw"
#define FW_MIPS_FILE_09 "bnx2/bnx2-mips-09-6.2.1b.fw"
#define FW_RV2P_FILE_09_Ax "bnx2/bnx2-rv2p-09ax-6.0.17.fw"
--
Pozdrawiam
Grzegorz Chmurzynski
^ permalink raw reply
* Re: [PATCH] xfrm: use ISO C standard for array in linux/xfrm.h
From: Steffen Klassert @ 2012-10-17 5:43 UTC (permalink / raw)
To: nicolas.dichtel; +Cc: herbert, netdev, davem
In-Reply-To: <1350402153-3889-1-git-send-email-nicolas.dichtel@6wind.com>
On Tue, Oct 16, 2012 at 05:42:33PM +0200, nicolas.dichtel@6wind.com wrote:
> From: Nicolas Dichtel <nicolas.dichtel@6wind.com>
>
> Use the ISO C standard compliant form instead of the gcc extension.
>
> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
> ---
> include/uapi/linux/xfrm.h | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/include/uapi/linux/xfrm.h b/include/uapi/linux/xfrm.h
> index 28e493b..6a6a605 100644
> --- a/include/uapi/linux/xfrm.h
> +++ b/include/uapi/linux/xfrm.h
> @@ -30,7 +30,7 @@ struct xfrm_sec_ctx {
> __u8 ctx_alg;
> __u16 ctx_len;
> __u32 ctx_sid;
> - char ctx_str[0];
> + char ctx_str[];
Hm, what's the benefit of such a change? The kernel source is full
of these foo[0] type arrays. I don't see a reason to change this
just for xfrm.
^ permalink raw reply
* Re: [PATCH] xfrm: use ISO C standard for array in linux/xfrm.h
From: David Miller @ 2012-10-17 6:16 UTC (permalink / raw)
To: steffen.klassert; +Cc: nicolas.dichtel, herbert, netdev
In-Reply-To: <20121017054343.GA12671@secunet.com>
From: Steffen Klassert <steffen.klassert@secunet.com>
Date: Wed, 17 Oct 2012 07:43:43 +0200
> On Tue, Oct 16, 2012 at 05:42:33PM +0200, nicolas.dichtel@6wind.com wrote:
>> From: Nicolas Dichtel <nicolas.dichtel@6wind.com>
>>
>> Use the ISO C standard compliant form instead of the gcc extension.
>>
>> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
>> ---
>> include/uapi/linux/xfrm.h | 10 +++++-----
>> 1 file changed, 5 insertions(+), 5 deletions(-)
>>
>> diff --git a/include/uapi/linux/xfrm.h b/include/uapi/linux/xfrm.h
>> index 28e493b..6a6a605 100644
>> --- a/include/uapi/linux/xfrm.h
>> +++ b/include/uapi/linux/xfrm.h
>> @@ -30,7 +30,7 @@ struct xfrm_sec_ctx {
>> __u8 ctx_alg;
>> __u16 ctx_len;
>> __u32 ctx_sid;
>> - char ctx_str[0];
>> + char ctx_str[];
>
> Hm, what's the benefit of such a change? The kernel source is full
> of these foo[0] type arrays. I don't see a reason to change this
> just for xfrm.
Agreed.
^ permalink raw reply
* [PATCH] qla3xxx: Ensure req_q_phy_addr writes to the register
From: Joe Jin @ 2012-10-17 6:32 UTC (permalink / raw)
To: Ron Mercer, Jitendra Kalsaria, linux-driver
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Greg Marsden
[-- Attachment #1: Type: text/plain, Size: 879 bytes --]
Make sure req_q_phy_addr write to the register.
Signed-off-by: Joe Jin <joe.jin@oracle.com>
Cc: Ron Mercer <ron.mercer@qlogic.com>
Cc: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
---
drivers/net/ethernet/qlogic/qla3xxx.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/net/ethernet/qlogic/qla3xxx.c b/drivers/net/ethernet/qlogic/qla3xxx.c
index df09b1c..78b4cba 100644
--- a/drivers/net/ethernet/qlogic/qla3xxx.c
+++ b/drivers/net/ethernet/qlogic/qla3xxx.c
@@ -2525,6 +2525,12 @@ static int ql_alloc_net_req_rsp_queues(struct ql3_adapter *qdev)
qdev->req_q_size =
(u32) (NUM_REQ_Q_ENTRIES * sizeof(struct ob_mac_iocb_req));
+ /*
+ * The barrier is required to ensure that req_q_phy_addr writes to
+ * the memory.
+ */
+ wmb();
+
qdev->req_q_virt_addr =
pci_alloc_consistent(qdev->pdev,
(size_t) qdev->req_q_size,
--
1.7.11.7
[-- Attachment #2: Attached Message Part --]
[-- Type: text/plain, Size: 0 bytes --]
^ permalink raw reply related
* Re: [PATCH] xfrm: use ISO C standard for array in linux/xfrm.h
From: Nicolas Dichtel @ 2012-10-17 7:50 UTC (permalink / raw)
To: Steffen Klassert; +Cc: herbert, netdev, davem
In-Reply-To: <20121017054343.GA12671@secunet.com>
Le 17/10/2012 07:43, Steffen Klassert a écrit :
> On Tue, Oct 16, 2012 at 05:42:33PM +0200, nicolas.dichtel@6wind.com wrote:
>> From: Nicolas Dichtel <nicolas.dichtel@6wind.com>
>>
>> Use the ISO C standard compliant form instead of the gcc extension.
>>
>> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
>> ---
>> include/uapi/linux/xfrm.h | 10 +++++-----
>> 1 file changed, 5 insertions(+), 5 deletions(-)
>>
>> diff --git a/include/uapi/linux/xfrm.h b/include/uapi/linux/xfrm.h
>> index 28e493b..6a6a605 100644
>> --- a/include/uapi/linux/xfrm.h
>> +++ b/include/uapi/linux/xfrm.h
>> @@ -30,7 +30,7 @@ struct xfrm_sec_ctx {
>> __u8 ctx_alg;
>> __u16 ctx_len;
>> __u32 ctx_sid;
>> - char ctx_str[0];
>> + char ctx_str[];
>
> Hm, what's the benefit of such a change? The kernel source is full
> of these foo[0] type arrays. I don't see a reason to change this
> just for xfrm.
>
We got a problem with "ip xfrm state add" when compiled with gcc 4.4.6.
Error was "*** buffer overflow detected ***: ip terminated", because when we try
to copy the key in struct xfrm_algo, the function strncpy() calls some builtin
checks about the size of the destination buffer, which is 0. With the standard
notation, there is no problem.
With gcc 4.7.0, there is no problem, I don't know exactly which version of gcc
triggers the problem.
^ permalink raw reply
* RE: [PATCHv5 1/4] modem_shm: Add Modem Access Framework
From: Arun MURTHY @ 2012-10-17 8:00 UTC (permalink / raw)
To: Greg KH
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
linux-doc@vger.kernel.org, alan@lxorguk.ukuu.org.uk
In-Reply-To: <20121015212943.GA12540@kroah.com>
> On Mon, Oct 15, 2012 at 10:58:37AM +0530, Arun Murthy wrote:
>
> I'm going to ignore your .c logic, as there are things in it that I don't think is
> correct. But it all comes down to your data structures, if you fix them, then
> the .c logic will become correct:
>
> > --- /dev/null
> > +++ b/include/linux/modem_shm/modem.h
> > @@ -0,0 +1,59 @@
> > +/*
> > + * Copyright (C) ST-Ericsson SA 2011
> > + *
> > + * License Terms: GNU General Public License v2
> > + * Author: Kumar Sanghvi
> > + * Arun Murthy <arun.murthy@stericsson.com>
> > + *
> > + * Heavily adapted from Regulator framework */ #ifndef __MODEM_H__
> > +#define __MODEM_H__
>
> __MODEM_SHM_MODEM_H__, right?
>
Done!
> > +
> > +#include <linux/device.h>
> > +
> > +struct clients {
> > + struct device *dev;
>
> Why is this a pointer? It should be embedded in the structure.
This is the pointer to the clients's device structure. There will be a
single entity for a modem but multiple clients. Hence this struct is
specific for each client.
>
> > + const char *name;
>
> Why is this needed? It should be the same as the device, right?
Ok, will remove this.
>
> > + atomic_t cnt;
>
> Why is this needed at all? And if it's needed, why is it an atomic?
> (hint, your use of atomic_t really isn't correct at all in this patch, it's not doing
> what you think it is doing...)
Basically the operation done by this, i.e modem access/release has a lot of
affect on the clients. Since we are accesing some modem registers without
this modem request it might lead to system freeze. Hence such cross over
scenarios are considered and the counter is increased/decreased after the
operation(modem access/release). And reading of these variable are done
especially during system suspend, where decision is taken based on the value
of the counter read, hence any modification done should preside over read.
Moreover since there are multiple clients, using atomic for a simple locking
mechanism.
>
> > +};
>
> Also, the name of the structure here is _VERY_ generic, that's not acceptable
> in the global kernel namespace. Hint, it probably isn't even needed to be
> defined in this .h file at all, right?
Yes, even I felt so yest while reviewing, will change it accordingly.
>
> > +
> > +struct modem_desc {
> > + int (*request)(struct modem_desc *);
> > + void (*release)(struct modem_desc *);
> > + int (*is_requested)(struct modem_desc *);
> > + struct clients *mclients;
>
> Why do you have a pointer to a device, and yet:
This pointer to device is for the clients device.
>
> > + struct device *dev;
>
> have a device here?
This pointer to device is the modem's device struct.
>
> > + char *name;
>
> Same *dev and name comment as above.
Ok will remove this.
>
> > + u8 no_clients;
> > + atomic_t use_cnt;
> > + atomic_t cli_cnt;
>
> Same question about these atomic_t variables, why are they here, and most
> importantly, why are they an atomic variable?
Explained above.
Thanks and Regards,
Arun R Murthy
------------------
^ 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