* Re: [PATCH] cxgb3: Don't call cxgb_vlan_mode until q locks are initialized
From: David Miller @ 2012-05-01 2:09 UTC (permalink / raw)
To: roland; +Cc: divy, netdev, roland
In-Reply-To: <1335806147-17310-1-git-send-email-roland@kernel.org>
From: Roland Dreier <roland@kernel.org>
Date: Mon, 30 Apr 2012 10:15:47 -0700
> From: Roland Dreier <roland@purestorage.com>
>
> The driver calls cxgb_vlan_mode() from init_one(). This calls into
> synchronize_rx(), which locks all the q locks, but the q locks are not
> initialized until cxgb_up() -> setup_sge_qsets(). So move the call to
> cxgb_vlan_mode() into cxgb_up(), after the call to setup_sge_qsets().
> We also move the body of these functions up higher to avoid having to
> a forward declaration.
>
> This was found because of the lockdep warning:
...
> Contrary to what lockdep says, the code is not fine: we are locking an
> uninitialized spinlock.
>
> Signed-off-by: Roland Dreier <roland@purestorage.com>
Applied, thanks.
^ permalink raw reply
* Re: [net v2 0/3][pull request] Intel Wired LAN Driver Updates
From: David Miller @ 2012-05-01 2:07 UTC (permalink / raw)
To: jeffrey.t.kirsher; +Cc: netdev, gospo, sassmann
In-Reply-To: <1335837495-9722-1-git-send-email-jeffrey.t.kirsher@intel.com>
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Mon, 30 Apr 2012 18:58:12 -0700
> git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net master
Pulled, thanks Jeff.
^ permalink raw reply
* [PATCH net-next] net: add a prefetch in socket backlog processing
From: Eric Dumazet @ 2012-05-01 2:07 UTC (permalink / raw)
To: David Miller; +Cc: netdev
From: Eric Dumazet <edumazet@google.com>
TCP or UDP stacks have big enough latencies that prefetching next
pointer is worth it.
Signed-off-by: Eric Dumazet <edumazet@google.com>
---
net/core/sock.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/core/sock.c b/net/core/sock.c
index 836bca6..1a88351 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -1700,6 +1700,7 @@ static void __release_sock(struct sock *sk)
do {
struct sk_buff *next = skb->next;
+ prefetch(next);
WARN_ON_ONCE(skb_dst_is_noref(skb));
skb->next = NULL;
sk_backlog_rcv(sk, skb);
^ permalink raw reply related
* [net 3/3] ixgbe: fix calling skb_put on nonlinear skb assertion bug
From: Jeff Kirsher @ 2012-05-01 1:58 UTC (permalink / raw)
To: davem; +Cc: Yi Zou, netdev, gospo, sassmann, Jeff Kirsher
In-Reply-To: <1335837495-9722-1-git-send-email-jeffrey.t.kirsher@intel.com>
From: Yi Zou <yi.zou@intel.com>
With the support to bounce buffer added, the skb is coming as nonlinear in the
case of non-DDPed data frames for FCoE, which is mostly ok as the FCoE stack
would take care of that. However, for target mode, we have to set the FC CRC
and FC EOF field to allow the protocol stack to not drop the frame for the last
data frame of that sequence. So fix this by linearizing the skb first before
doing skb_put().
Signed-off-by: Yi Zou <yi.zou@intel.com>
Tested-by: Marcus Dennis <marcusx.e.dennis@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c
index 77ea4b7..bc07933 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c
@@ -437,6 +437,7 @@ int ixgbe_fcoe_ddp(struct ixgbe_adapter *adapter,
*/
if ((fh->fh_r_ctl == FC_RCTL_DD_SOL_DATA) &&
(fctl & FC_FC_END_SEQ)) {
+ skb_linearize(skb);
crc = (struct fcoe_crc_eof *)skb_put(skb, sizeof(*crc));
crc->fcoe_eof = FC_EOF_T;
}
--
1.7.7.6
^ permalink raw reply related
* [net 1/3] igbvf: fix the bug when initializing the igbvf
From: Jeff Kirsher @ 2012-05-01 1:58 UTC (permalink / raw)
To: davem; +Cc: Samuel Liao, netdev, gospo, sassmann, Shan Wei, Jeff Kirsher
In-Reply-To: <1335837495-9722-1-git-send-email-jeffrey.t.kirsher@intel.com>
From: Samuel Liao <samuelliao@tencent.com>
Maybe it's a typo, but it cause that igbvf can't be initialized successfully.
Set perm_addr value using valid dev_addr, although which is equal to hw.mac.addr.
Signed-off-by: Samuel Liao <samuelliao@tencent.com>
Signed-off-by: Shan Wei <davidshan@tencent.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/igbvf/netdev.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/intel/igbvf/netdev.c b/drivers/net/ethernet/intel/igbvf/netdev.c
index d61ca2a..8ec74b0 100644
--- a/drivers/net/ethernet/intel/igbvf/netdev.c
+++ b/drivers/net/ethernet/intel/igbvf/netdev.c
@@ -2731,14 +2731,14 @@ static int __devinit igbvf_probe(struct pci_dev *pdev,
netdev->addr_len);
}
- if (!is_valid_ether_addr(netdev->perm_addr)) {
+ if (!is_valid_ether_addr(netdev->dev_addr)) {
dev_err(&pdev->dev, "Invalid MAC Address: %pM\n",
netdev->dev_addr);
err = -EIO;
goto err_hw_init;
}
- memcpy(netdev->perm_addr, adapter->hw.mac.addr, netdev->addr_len);
+ memcpy(netdev->perm_addr, netdev->dev_addr, netdev->addr_len);
setup_timer(&adapter->watchdog_timer, &igbvf_watchdog,
(unsigned long) adapter);
--
1.7.7.6
^ permalink raw reply related
* [net 2/3] ixgbe: Fix a memory leak in IEEE DCB
From: Jeff Kirsher @ 2012-05-01 1:58 UTC (permalink / raw)
To: davem; +Cc: Alexander Duyck, netdev, gospo, sassmann, Jeff Kirsher
In-Reply-To: <1335837495-9722-1-git-send-email-jeffrey.t.kirsher@intel.com>
From: Alexander Duyck <alexander.h.duyck@intel.com>
The driver was freeing memory in shutdown instead of remove. As a result
we were leaking memory if IEEE DCB was enabled and we loaded/unloaded the
driver. This change moves the freeing of the memory into the remove
routine where it belongs.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Acked-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index a7f3cd8..88f6b2e 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -4873,10 +4873,6 @@ static int __ixgbe_shutdown(struct pci_dev *pdev, bool *enable_wake)
}
ixgbe_clear_interrupt_scheme(adapter);
-#ifdef CONFIG_DCB
- kfree(adapter->ixgbe_ieee_pfc);
- kfree(adapter->ixgbe_ieee_ets);
-#endif
#ifdef CONFIG_PM
retval = pci_save_state(pdev);
@@ -7224,6 +7220,11 @@ static void __devexit ixgbe_remove(struct pci_dev *pdev)
ixgbe_release_hw_control(adapter);
+#ifdef CONFIG_DCB
+ kfree(adapter->ixgbe_ieee_pfc);
+ kfree(adapter->ixgbe_ieee_ets);
+
+#endif
iounmap(adapter->hw.hw_addr);
pci_release_selected_regions(pdev, pci_select_bars(pdev,
IORESOURCE_MEM));
--
1.7.7.6
^ permalink raw reply related
* [net v2 0/3][pull request] Intel Wired LAN Driver Updates
From: Jeff Kirsher @ 2012-05-01 1:58 UTC (permalink / raw)
To: davem; +Cc: Jeff Kirsher, netdev, gospo, sassmann
This series of patches contains fixes for igbvf and ixgbe.
v2: Corrected authorship for the igbvf patch to Samuel Liao.
The following are changes since commit 1cebce36d660c83bd1353e41f3e66abd4686f215:
tcp: fix infinite cwnd in tcp_complete_cwr()
and are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net master
Alexander Duyck (1):
ixgbe: Fix a memory leak in IEEE DCB
Samuel Liao (1):
igbvf: fix the bug when initializing the igbvf
Yi Zou (1):
ixgbe: fix calling skb_put on nonlinear skb assertion bug
drivers/net/ethernet/intel/igbvf/netdev.c | 4 ++--
drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c | 1 +
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 9 +++++----
3 files changed, 8 insertions(+), 6 deletions(-)
--
1.7.7.6
^ permalink raw reply
* Re: [PATCH 0/7] smsc75xx fixes
From: David Miller @ 2012-05-01 1:55 UTC (permalink / raw)
To: steve.glendinning; +Cc: netdev, fillods
In-Reply-To: <1335808616-22513-1-git-send-email-steve.glendinning@shawell.net>
From: Steve Glendinning <steve.glendinning@shawell.net>
Date: Mon, 30 Apr 2012 18:56:49 +0100
> Stephane Fillod's big patch addresses multiple issues, so this patchset
> splits it into a separate patch for each issue.
>
> Thanks to Stephane for finding and fixing these bugs.
>
> Steve Glendinning (7):
> smsc75xx: mark link down on startup and let PHY interrupt deal with
> carrier changes
> smsc75xx: fix mdio reads and writes
> smsc75xx: add more information to register io failure warnings
> smsc75xx: fix phy init reset loop
> smsc75xx: fix phy interrupt acknowledge
> smsc75xx: declare smsc75xx's MII as GMII capable
> smsc75xx: enable mac to detect speed/duplex from phy
All applied, thanks Steve.
^ permalink raw reply
* Re: [PATCH 5/5 net-next] net: makes skb_splice_bits() aware of skb->head_frag
From: David Miller @ 2012-05-01 1:48 UTC (permalink / raw)
To: eric.dumazet
Cc: netdev, ncardwell, jeffrey.t.kirsher, therbert, herbert,
bhutchings, mcarlson, mchan, maze, ilpo.jarvinen
In-Reply-To: <1335528603.2775.246.camel@edumazet-glaptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Fri, 27 Apr 2012 14:10:03 +0200
> From: Eric Dumazet <edumazet@google.com>
>
> __skb_splice_bits() can check if skb to be spliced has its skb->head
> mapped to a page fragment, instead of a kmalloc() area.
>
> If so we can avoid a copy of the skb head and get a reference on
> underlying page.
>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
Applied.
^ permalink raw reply
* Re: [PATCH 4/4 net-next] tcp: makes tcp_try_coalesce aware of skb->head_frag
From: David Miller @ 2012-05-01 1:48 UTC (permalink / raw)
To: eric.dumazet
Cc: netdev, ncardwell, jeffrey.t.kirsher, therbert, herbert,
bhutchings, mcarlson, mchan, maze, ilpo.jarvinen
In-Reply-To: <1335523113.2775.239.camel@edumazet-glaptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Fri, 27 Apr 2012 12:38:33 +0200
> From: Eric Dumazet <edumazet@google.com>
>
> TCP coalesce can check if skb to be merged has its skb->head mapped to a
> page fragment, instead of a kmalloc() area.
>
> We had to disable coalescing in this case, for performance reasons.
>
> We 'upgrade' skb->head as a fragment in itself.
>
> This reduces number of cache misses when user makes its copies, since a
> less sk_buff are fetched.
>
> This makes receive and ofo queues shorter and thus reduce cache line
> misses in TCP stack.
>
> This is a followup of patch "net: allow skb->head to be a page fragment"
>
> Tested with tg3 nic, with GRO on or off. We can see "TCPRcvCoalesce"
> counter being incremented.
>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
Applied.
^ permalink raw reply
* Re: [PATCH 3/4 v2 net-next] net: make GRO aware of skb->head_frag
From: David Miller @ 2012-05-01 1:48 UTC (permalink / raw)
To: eric.dumazet
Cc: netdev, ncardwell, therbert, jeffrey.t.kirsher, mchan, mcarlson,
herbert, bhutchings, ilpo.jarvinen, maze
In-Reply-To: <1335809434.2296.9.camel@edumazet-glaptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Mon, 30 Apr 2012 20:10:34 +0200
> From: Eric Dumazet <edumazet@google.com>
>
> GRO can check if skb to be merged has its skb->head mapped to a page
> fragment, instead of a kmalloc() area.
>
> We 'upgrade' skb->head as a fragment in itself
>
> This avoids the frag_list fallback, and permits to build true GRO skb
> (one sk_buff and up to 16 fragments), using less memory.
>
> This reduces number of cache misses when user makes its copy, since a
> single sk_buff is fetched.
>
> This is a followup of patch "net: allow skb->head to be a page fragment"
>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
Applied.
^ permalink raw reply
* Re: [PATCH 2/4 net-next] tg3: provide frags as skb head
From: David Miller @ 2012-05-01 1:48 UTC (permalink / raw)
To: eric.dumazet
Cc: netdev, ilpo.jarvinen, therbert, ncardwell, bhutchings, mcarlson,
jeffrey.t.kirsher, mchan, herbert, maze
In-Reply-To: <1335522889.2775.231.camel@edumazet-glaptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Fri, 27 Apr 2012 12:34:49 +0200
> From: Eric Dumazet <edumazet@google.com>
>
> This patch converts tg3 driver, one of our reference drivers, to use new
> build_skb() api in frag mode.
>
> Instead of using kmalloc() to allocate the memory block that will be
> used by build_skb() as skb->head, we use a page fragment.
>
> This is a followup of patch "net: allow skb->head to be a page fragment"
>
> This allows GRO, TCP coalescing, and splice() to be more efficient.
>
> Incidentally, this also removes SLUB slow path contention in kfree()
>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
Applied.
^ permalink raw reply
* Re: [PATCH 1/4 net-next] net: allow skb->head to be a page fragment
From: David Miller @ 2012-05-01 1:48 UTC (permalink / raw)
To: eric.dumazet
Cc: netdev, ilpo.jarvinen, ncardwell, therbert, maze,
jeffrey.t.kirsher, bhutchings, mcarlson, mchan, herbert
In-Reply-To: <1335522818.2775.227.camel@edumazet-glaptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Fri, 27 Apr 2012 12:33:38 +0200
> From: Eric Dumazet <edumazet@google.com>
>
> skb->head is currently allocated from kmalloc(). This is convenient but
> has the drawback the data cannot be converted to a page fragment if
> needed.
...
> Given all these issues, the following patch introduces the possibility
> of having skb->head be a fragment in itself. We use a new skb flag,
> skb->head_frag to carry this information.
...
> Signed-off-by: Eric Dumazet <edumazet@google.com>
Applied.
^ permalink raw reply
* Re: [net 1/3] igbvf: fix the bug when initializing the igbvf
From: Shan Wei @ 2012-05-01 1:48 UTC (permalink / raw)
To: Jeff Kirsher; +Cc: davem, netdev, gospo, sassmann, Samuel Liao, Shan Wei
In-Reply-To: <1335827794-26992-2-git-send-email-jeffrey.t.kirsher@intel.com>
Jeff Kirsher said, at 2012/5/1 7:16:
> From: Shan Wei <shanwei88@gmail.com>
The "From" tag will be wrote in git log as Author of this patch.
It should be "From: Samuel Liao <samuelliao@tencent.com>", not me.
So, please resubmit it to David Miller.
Thanks.
>
> Maybe it's a typo, but it cause that igbvf can't be initialized successfully.
> Set perm_addr value using valid dev_addr, although which is equal to hw.mac.addr.
>
> Signed-off-by: Samuel Liao <samuelliao@tencent.com>
> Signed-off-by: Shan Wei <davidshan@tencent.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
^ permalink raw reply
* Re: [PATCH net-next] pch_gbe: reprogram multicast address register on reset
From: David Miller @ 2012-05-01 1:47 UTC (permalink / raw)
To: roy.qing.li; +Cc: netdev, richardcochran, tshimizu818
In-Reply-To: <1335592421-31406-1-git-send-email-roy.qing.li@gmail.com>
From: roy.qing.li@gmail.com
Date: Sat, 28 Apr 2012 13:53:41 +0800
> From: RongQing.Li <roy.qing.li@gmail.com>
>
> The reset logic after a Rx FIFO overrun will clear the programmed
> multicast addresses. This patch fixes the issue by reprogramming the
> registers after the reset.
>
> The commit eefc48b tried to fix this problem, but it introduces
> unnecessary codes. In fact, all multicast addresses have been saved
> in netdev->mc, So we can call pch_gbe_set_multi() directly after
> reset_hw and reset_rx.
>
> This commit kills 50+ line codes
>
> Cc: Richard Cochran <richardcochran@gmail.com>
> Cc: Takahiro Shimizu <tshimizu818@gmail.com>
> Signed-off-by: RongQing.Li <roy.qing.li@gmail.com>
Applied.
^ permalink raw reply
* Re: [PATCH 4/4] forcedeth: add transmit timestamping support
From: David Miller @ 2012-05-01 1:47 UTC (permalink / raw)
To: eric.dumazet; +Cc: willemb, netdev, jeffrey.t.kirscher, eilong, aabdulla
In-Reply-To: <1335599385.2900.53.camel@edumazet-glaptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Sat, 28 Apr 2012 09:49:45 +0200
> On Fri, 2012-04-27 at 15:04 -0400, Willem de Bruijn wrote:
>> Insert an skb_tx_timestamp call in both ndo_start_xmit routines
>> Tested to work for the nv_start_xmit_optimized case
>>
>> Signed-off-by: Willem de Bruijn <willemb@google.com>
...
> Acked-by: Eric Dumazet <edumazet@google.com>
Applied.
^ permalink raw reply
* Re: [PATCH 3/4] bnx2x: add transmit timestamping support
From: David Miller @ 2012-05-01 1:46 UTC (permalink / raw)
To: eric.dumazet; +Cc: willemb, netdev, jeffrey.t.kirscher, eilong, aabdulla
In-Reply-To: <1335599319.2900.52.camel@edumazet-glaptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Sat, 28 Apr 2012 09:48:39 +0200
> On Fri, 2012-04-27 at 15:04 -0400, Willem de Bruijn wrote:
>> Signed-off-by: Willem de Bruijn <willemb@google.com>
...
> Acked-by: Eric Dumazet <edumazet@google.com>
Applied.
^ permalink raw reply
* Re: [PATCH 2/4] e1000e: add transmit timestamping support
From: David Miller @ 2012-05-01 1:46 UTC (permalink / raw)
To: eric.dumazet; +Cc: willemb, netdev, jeffrey.t.kirscher, eilong, aabdulla
In-Reply-To: <1335599273.2900.51.camel@edumazet-glaptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Sat, 28 Apr 2012 09:47:53 +0200
> On Fri, 2012-04-27 at 15:04 -0400, Willem de Bruijn wrote:
>> Signed-off-by: Willem de Bruijn <willemb@google.com>
...
> Acked-by: Eric Dumazet <edumazet@google.com>
Applied.
^ permalink raw reply
* Re: [PATCH 1/4] e1000: add transmit timestamping support
From: David Miller @ 2012-05-01 1:46 UTC (permalink / raw)
To: eric.dumazet; +Cc: willemb, netdev, jeffrey.t.kirscher, eilong, aabdulla
In-Reply-To: <1335599262.2900.50.camel@edumazet-glaptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Sat, 28 Apr 2012 09:47:42 +0200
> On Fri, 2012-04-27 at 15:04 -0400, Willem de Bruijn wrote:
>> Signed-off-by: Willem de Bruijn <willemb@google.com>
...
> Acked-by: Eric Dumazet <edumazet@google.com>
Applied.
^ permalink raw reply
* Re: [PATCH 00/10] atl1c: update hardware settings - v4
From: David Miller @ 2012-05-01 1:45 UTC (permalink / raw)
To: xiong; +Cc: netdev, linux-kernel, qca-linux-team, nic-devel
In-Reply-To: <1335836338-9425-1-git-send-email-xiong@qca.qualcomm.com>
From: xiong <xiong@qca.qualcomm.com>
Date: Tue, 1 May 2012 09:38:48 +0800
> This update contains a serial of patches, most of them are hardware
> settings related. register definitions are refined (or removed if
> meaningless) for each patch.
>
> This is the last patch set.
>
> The patches have addressed all sparse and checkpatch warnings.
>
> Following NICs are tested:
> AR8131/AR8132/AR8151A/AR8152A/AR8152B
> Test item includes:
> build/install/uninstall/dhcp/ping/iperf/wol/reboot/etc.
All applied, thanks.
^ permalink raw reply
* Re: [PATCH net-next 00/10] tipc: last batch from the sourceforge queue
From: David Miller @ 2012-05-01 1:45 UTC (permalink / raw)
To: paul.gortmaker; +Cc: netdev, allan.stephens, jon.maloy, erik.hugne, ying.xue
In-Reply-To: <1335825428-16053-1-git-send-email-paul.gortmaker@windriver.com>
From: Paul Gortmaker <paul.gortmaker@windriver.com>
Date: Mon, 30 Apr 2012 18:36:58 -0400
> I'm glad to say this represents the last batch of salvaged commits
> from what was the sourceforge queue of stuff misplaced on the older
> v2.6.19/v1.7.x baseline. Going forward, folks got a clear message
> that they _must_ put forward any new/prospective changes on netdev
> for peer review and ask for continuous integration and not stockpile
> crap in a corner (cause I'm sure as hell not going to volunteer to
> be Winston Wolf for it again).
>
> Anyway, knowing that there isn't any more "old" patches from that to
> worry about, I took the opportunity to close out by clobbering a bunch
> of needless extra blank lines following comments, since there isn't
> any pending patch context fallout to worry about. This one cosmetic
> change alone makes up most of the diffstat, giving:
>
> 32 files changed, 16 insertions(+), 530 deletions(-)
>
> out of the total:
>
> 34 files changed, 58 insertions(+), 567 deletions(-)
You must feel like you've just moved a mountain, Mr. Wolf.
> That aside, the meat of what is here is:
>
> -reduce some of the build up/tear down on configuration paths
>
> -more strict checks on published names and payload types
>
> -factor out some duplicated code; +some redundant code deletion.
>
> Testing has been the usual 64 <---> 32bit using tipc-utils ptts.
>
> I still want to look at your suggestion of reusing existing code
> for the logging stuff someday, now that the queue is closed out,
> but that is completely separate from the backlog, and it probably
> isn't going to be happening in the 3.5 timeframe.
Pulled, thanks.
^ permalink raw reply
* [PATCH 10/10] atl1c: remove PHY polling from atl1c_change_mtu
From: xiong @ 2012-05-01 1:38 UTC (permalink / raw)
To: davem, netdev, linux-kernel; +Cc: qca-linux-team, nic-devel, xiong
In-Reply-To: <1335836338-9425-1-git-send-email-xiong@qca.qualcomm.com>
PHY polling code for FPGA is considered in every MDIO R/W API.
no need to add additional code to atl1c_change_mtu.
Signed-off-by: xiong <xiong@qca.qualcomm.com>
Tested-by: David Liu <dwliu@qca.qaulcomm.com>
---
drivers/net/ethernet/atheros/atl1c/atl1c_main.c | 8 --------
1 files changed, 0 insertions(+), 8 deletions(-)
diff --git a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
index 05ce8ec..9cc1570 100644
--- a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
+++ b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
@@ -553,14 +553,6 @@ static int atl1c_change_mtu(struct net_device *netdev, int new_mtu)
netdev_update_features(netdev);
atl1c_up(adapter);
clear_bit(__AT_RESETTING, &adapter->flags);
- if (adapter->hw.ctrl_flags & ATL1C_FPGA_VERSION) {
- u32 phy_data;
-
- AT_READ_REG(&adapter->hw, 0x1414, &phy_data);
- phy_data |= 0x10000000;
- AT_WRITE_REG(&adapter->hw, 0x1414, phy_data);
- }
-
}
return 0;
}
--
1.7.7
^ permalink raw reply related
* [PATCH 09/10] atl1c: Disable L0S when no cable link
From: xiong @ 2012-05-01 1:38 UTC (permalink / raw)
To: davem, netdev, linux-kernel; +Cc: qca-linux-team, nic-devel, xiong
In-Reply-To: <1335836338-9425-1-git-send-email-xiong@qca.qualcomm.com>
L0S might be unstable if no cable link, only enable it when link up.
Signed-off-by: xiong <xiong@qca.qualcomm.com>
Tested-by: Liu David <dwliu@qca.qualcomm.com>
---
drivers/net/ethernet/atheros/atl1c/atl1c_main.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
index e6c62d0..05ce8ec 100644
--- a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
+++ b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
@@ -1326,7 +1326,7 @@ static void atl1c_set_aspm(struct atl1c_hw *hw, u16 link_speed)
}
/* L0S/L1 enable */
- if (hw->ctrl_flags & ATL1C_ASPM_L0S_SUPPORT)
+ if ((hw->ctrl_flags & ATL1C_ASPM_L0S_SUPPORT) && link_speed != SPEED_0)
pm_ctrl_data |= PM_CTRL_ASPM_L0S_EN | PM_CTRL_MAC_ASPM_CHK;
if (hw->ctrl_flags & ATL1C_ASPM_L1_SUPPORT)
pm_ctrl_data |= PM_CTRL_ASPM_L1_EN | PM_CTRL_MAC_ASPM_CHK;
--
1.7.7
^ permalink raw reply related
* [PATCH 08/10] atl1c: do MAC-reset when PHY link down
From: xiong @ 2012-05-01 1:38 UTC (permalink / raw)
To: davem, netdev, linux-kernel; +Cc: qca-linux-team, nic-devel, xiong
In-Reply-To: <1335836338-9425-1-git-send-email-xiong@qca.qualcomm.com>
There may be tx-skbs still pending in HW when PHY link down.
Reset MAC will make the DMA engine go to the start point.
and release all pending skbs.
Note: Reset MAC will clear any interrupt status and mask.
Signed-off-by: xiong <xiong@qca.qualcomm.com>
Tested-by: Liu David <dwliu@qca.qualcomm.com>
---
drivers/net/ethernet/atheros/atl1c/atl1c_main.c | 74 ++++++++++++++--------
1 files changed, 47 insertions(+), 27 deletions(-)
diff --git a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
index b95ef45..e6c62d0 100644
--- a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
+++ b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
@@ -60,6 +60,10 @@ static void atl1c_clean_rx_irq(struct atl1c_adapter *adapter,
int *work_done, int work_to_do);
static int atl1c_up(struct atl1c_adapter *adapter);
static void atl1c_down(struct atl1c_adapter *adapter);
+static int atl1c_reset_mac(struct atl1c_hw *hw);
+static void atl1c_reset_dma_ring(struct atl1c_adapter *adapter);
+static int atl1c_configure(struct atl1c_adapter *adapter);
+static int atl1c_alloc_rx_buffer(struct atl1c_adapter *adapter);
static const u16 atl1c_pay_load_size[] = {
128, 256, 512, 1024, 2048, 4096,
@@ -256,14 +260,16 @@ static void atl1c_check_link_status(struct atl1c_adapter *adapter)
if ((phy_data & BMSR_LSTATUS) == 0) {
/* link down */
+ netif_carrier_off(netdev);
+ netif_stop_queue(netdev);
hw->hibernate = true;
- if (atl1c_stop_mac(hw) != 0)
+ if (atl1c_reset_mac(hw) != 0)
if (netif_msg_hw(adapter))
- dev_warn(&pdev->dev, "stop mac failed\n");
+ dev_warn(&pdev->dev, "reset mac failed\n");
atl1c_set_aspm(hw, SPEED_0);
atl1c_post_phy_linkchg(hw, SPEED_0);
- netif_carrier_off(netdev);
- netif_stop_queue(netdev);
+ atl1c_reset_dma_ring(adapter);
+ atl1c_configure(adapter);
} else {
/* Link Up */
hw->hibernate = false;
@@ -341,8 +347,11 @@ static void atl1c_common_task(struct work_struct *work)
}
if (test_and_clear_bit(ATL1C_WORK_EVENT_LINK_CHANGE,
- &adapter->work_event))
+ &adapter->work_event)) {
+ atl1c_irq_disable(adapter);
atl1c_check_link_status(adapter);
+ atl1c_irq_enable(adapter);
+ }
}
@@ -1230,9 +1239,6 @@ static int atl1c_reset_mac(struct atl1c_hw *hw)
struct pci_dev *pdev = adapter->pdev;
u32 ctrl_data = 0;
- AT_WRITE_REG(hw, REG_IMR, 0);
- AT_WRITE_REG(hw, REG_ISR, ISR_DIS_INT);
-
atl1c_stop_mac(hw);
/*
* Issue Soft Reset to the MAC. This will reset the chip's
@@ -1371,7 +1377,7 @@ static void atl1c_set_aspm(struct atl1c_hw *hw, u16 link_speed)
*
* Configure the Tx /Rx unit of the MAC after a reset.
*/
-static int atl1c_configure(struct atl1c_adapter *adapter)
+static int atl1c_configure_mac(struct atl1c_adapter *adapter)
{
struct atl1c_hw *hw = &adapter->hw;
u32 master_ctrl_data = 0;
@@ -1434,6 +1440,25 @@ static int atl1c_configure(struct atl1c_adapter *adapter)
return 0;
}
+static int atl1c_configure(struct atl1c_adapter *adapter)
+{
+ struct net_device *netdev = adapter->netdev;
+ int num;
+
+ atl1c_init_ring_ptrs(adapter);
+ atl1c_set_multi(netdev);
+ atl1c_restore_vlan(adapter);
+
+ num = atl1c_alloc_rx_buffer(adapter);
+ if (unlikely(num == 0))
+ return -ENOMEM;
+
+ if (atl1c_configure_mac(adapter))
+ return -EIO;
+
+ return 0;
+}
+
static void atl1c_update_hw_stats(struct atl1c_adapter *adapter)
{
u16 hw_reg_addr = 0;
@@ -2194,41 +2219,38 @@ static int atl1c_request_irq(struct atl1c_adapter *adapter)
return err;
}
+
+static void atl1c_reset_dma_ring(struct atl1c_adapter *adapter)
+{
+ /* release tx-pending skbs and reset tx/rx ring index */
+ atl1c_clean_tx_ring(adapter, atl1c_trans_normal);
+ atl1c_clean_tx_ring(adapter, atl1c_trans_high);
+ atl1c_clean_rx_ring(adapter);
+}
+
static int atl1c_up(struct atl1c_adapter *adapter)
{
struct net_device *netdev = adapter->netdev;
- int num;
int err;
netif_carrier_off(netdev);
- atl1c_init_ring_ptrs(adapter);
- atl1c_set_multi(netdev);
- atl1c_restore_vlan(adapter);
- num = atl1c_alloc_rx_buffer(adapter);
- if (unlikely(num == 0)) {
- err = -ENOMEM;
- goto err_alloc_rx;
- }
-
- if (atl1c_configure(adapter)) {
- err = -EIO;
+ err = atl1c_configure(adapter);
+ if (unlikely(err))
goto err_up;
- }
err = atl1c_request_irq(adapter);
if (unlikely(err))
goto err_up;
+ atl1c_check_link_status(adapter);
clear_bit(__AT_DOWN, &adapter->flags);
napi_enable(&adapter->napi);
atl1c_irq_enable(adapter);
- atl1c_check_link_status(adapter);
netif_start_queue(netdev);
return err;
err_up:
-err_alloc_rx:
atl1c_clean_rx_ring(adapter);
return err;
}
@@ -2254,9 +2276,7 @@ static void atl1c_down(struct atl1c_adapter *adapter)
adapter->link_speed = SPEED_0;
adapter->link_duplex = -1;
- atl1c_clean_tx_ring(adapter, atl1c_trans_normal);
- atl1c_clean_tx_ring(adapter, atl1c_trans_high);
- atl1c_clean_rx_ring(adapter);
+ atl1c_reset_dma_ring(adapter);
}
/*
--
1.7.7
^ permalink raw reply related
* [PATCH 07/10] atl1c: cancel task when interface closed
From: xiong @ 2012-05-01 1:38 UTC (permalink / raw)
To: davem, netdev, linux-kernel; +Cc: qca-linux-team, nic-devel, xiong
In-Reply-To: <1335836338-9425-1-git-send-email-xiong@qca.qualcomm.com>
common_task might be running while close routine is called,
wait/cancel it.
Signed-off-by: xiong <xiong@qca.qualcomm.com>
Tested-by: Liu David <dwliu@qca.qualcomm.com>
---
drivers/net/ethernet/atheros/atl1c/atl1c_main.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
index d910dbb..b95ef45 100644
--- a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
+++ b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c
@@ -330,6 +330,9 @@ static void atl1c_common_task(struct work_struct *work)
adapter = container_of(work, struct atl1c_adapter, common_task);
netdev = adapter->netdev;
+ if (test_bit(__AT_DOWN, &adapter->flags))
+ return;
+
if (test_and_clear_bit(ATL1C_WORK_EVENT_RESET, &adapter->work_event)) {
netif_device_detach(netdev);
atl1c_down(adapter);
@@ -2311,6 +2314,8 @@ static int atl1c_close(struct net_device *netdev)
struct atl1c_adapter *adapter = netdev_priv(netdev);
WARN_ON(test_bit(__AT_RESETTING, &adapter->flags));
+ set_bit(__AT_DOWN, &adapter->flags);
+ cancel_work_sync(&adapter->common_task);
atl1c_down(adapter);
atl1c_free_ring_resources(adapter);
return 0;
--
1.7.7
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox