Jan Engelhardt [Wed, 24 Feb 2010 17:36:04 +0000 (18:36 +0100)]
netfilter: xtables: reduce arguments to translate_table
Just pass in the entire repl struct. In case of a new table (e.g.
ip6t_register_table), the repldata has been previously filled with
table->name and table->size already (in ip6t_alloc_initial_table).
Signed-off-by: Jan Engelhardt <jengelh@medozas.de> Signed-off-by: Patrick McHardy <kaber@trash.net>
Tim Gardner [Tue, 23 Feb 2010 13:55:21 +0000 (14:55 +0100)]
netfilter: xt_recent: fix buffer overflow
e->index overflows e->stamps[] every ip_pkt_list_tot packets.
Consider the case when ip_pkt_list_tot==1; the first packet received is stored
in e->stamps[0] and e->index is initialized to 1. The next received packet
timestamp is then stored at e->stamps[1] in recent_entry_update(),
a buffer overflow because the maximum e->stamps[] index is 0.
Signed-off-by: Tim Gardner <tim.gardner@canonical.com> Cc: stable@kernel.org Signed-off-by: Patrick McHardy <kaber@trash.net>
Jamal Hadi Salim [Mon, 22 Feb 2010 11:32:59 +0000 (11:32 +0000)]
xfrm: Allow user space config of SAD mark
Add ability for netlink userspace to manipulate the SAD
and manipulate the mark, retrieve it and get events with a defined
mark.
MIGRATE may be added later.
Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca> Signed-off-by: David S. Miller <davem@davemloft.net>
Convert AF_PACKET to use RCU, eliminating one more reader/writer lock.
There is no need for a real sk_del_node_init_rcu(), because sk_del_node_init
is doing the equivalent thing to hlst_del_init_rcu already; but added
some comments to try and make that obvious.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Sriram [Mon, 22 Feb 2010 03:35:36 +0000 (03:35 +0000)]
can:ti_hecc: Add pm hook-up
Added the suspend and resume implementation in the HECC (CAN)
driver.
Signed-off-by: K R Baalaaji <krbaalaaji@ti.com> Signed-off-by: Sriramakrishnan <srk@ti.com> Acked-by: Anant Gole <anantgole@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Tilman Schmidt [Mon, 22 Feb 2010 11:09:38 +0000 (11:09 +0000)]
isdn: fix a few Kconfig imperfections
1. Rewrite the outdated help texts for config options ISDN and ISDN_CAPI.
2. The MISDN config option appeared between ISDN_I4L and the I4L hardware
driver options; move it to a less irritating place.
3. HYSDN is not in fact an I4L driver, and needn't depend on ISDN_I4L, so
move it from the I4L section to the general section.
4. ISDN_HDLC is now also used by drivers outside I4L. Move it from the
I4L section to the general section, too.
Signed-off-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: David S. Miller <davem@davemloft.net>
Joe Perches [Sun, 21 Feb 2010 17:08:47 +0000 (17:08 +0000)]
drivers/net/typhoon.c: Use (pr|netdev)_<level> macro helpers
David Dillow took my suggestions and improved on them.
Here is this latest version.
Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
Remove #define PFX
Remove #define ERR_PFX
Remove now unused member name from struct typhoon
Use pr_<level>
Use netdev_<level>
Coalesce long formats
Remove version information
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David Dillow <dave@thedillows.org> Signed-off-by: Joe Perches <joe@perches.com> Acked-by: David Dillow <dave@thedillows.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Hauke Mehrtens [Sat, 20 Feb 2010 10:55:25 +0000 (10:55 +0000)]
b44: Set PHY address to NO_PHY if reset fails.
Do a PHY reset to test if there is an active phy and set the PHY address
to B44_PHY_ADDR_NO_PHY in case of an not active phy. This is needed for
the Linksys WRTSL54GS and Asus WL-500W.
This patch was used in OpenWRT for a long time.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Alexander Duyck [Fri, 19 Feb 2010 17:57:46 +0000 (17:57 +0000)]
pci: add support for 82576NS serdes to existing SR-IOV quirk
This patch adds support for the 82576NS Serdes adapter to the existing pci
quirk for 82576 parts.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Milton Miller [Fri, 19 Feb 2010 17:44:42 +0000 (17:44 +0000)]
ixgbe: prevent speculative processing of descriptors before ready
The PowerPC architecture does not require loads to independent bytes to be
ordered without adding an explicit barrier.
In ixgbe_clean_rx_irq we load the status bit then load the packet data.
With packet split disabled if these loads go out of order we get a
stale packet, but we will notice the bad sequence numbers and drop it.
The problem occurs with packet split enabled where the TCP/IP header and data
are in different descriptors. If the reads go out of order we may have data
that doesn't match the TCP/IP header. Since we use hardware checksumming this
bad data is never verified and it makes it all the way to the application.
This bug was found during stress testing and adding this barrier has been shown
to fix it.
Signed-off-by: Milton Miller <miltonm@bga.com> Signed-off-by: Anton Blanchard <anton@samba.org> Acked-by: Don Skidmore <donald.c.skidmore@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Ajit Khaparde [Fri, 19 Feb 2010 13:57:12 +0000 (13:57 +0000)]
be2net: Maintain tx and rx counters in driver
For certain skews of the BE adapter, H/W Tx and Rx
counters could be common for more than one interface.
Add Tx and Rx counters in the adapter structure
(to maintain stats on a per interfae basis).
Signed-off-by: Ajit Khaparde <ajitk@serverengines.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Robert Hancock [Sat, 20 Feb 2010 01:10:15 +0000 (17:10 -0800)]
r8169: enable 64-bit DMA by default for PCI Express devices (v2)
Currently use of 64-bit DMA is disabled in r8169 unless the user passes the
use_dac module option. This is reasonable for conventional PCI devices where
broken chipsets may not handle dual-address-cycle transfers properly for
32-bit slots and so this may not be safe. However, PCI Express should not have
this problem and not using 64-bit DMA results in DMA transfers needlessly using
the IOMMU or SWIOTLB. Set the use_dac module parameter to a new default value of
-1 which results in 64-bit DMA being enabled by default for PCI Express devices
only.
Signed-off-by: Robert Hancock <hancockrwd@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
FUJITA Tomonori [Thu, 4 Feb 2010 18:57:42 +0000 (18:57 +0000)]
mlx4: replace the dma_sync_single_range_for_cpu/device API
There are only two users of the dma_sync_single_range_for_cpu/device
API in mainline (mlx4 and ssb). The
dma_sync_single_range_for_cpu/device API has never been documented and
the dma_sync_single_for_cpu/device API also support a partial sync.
This converts mlx4 to use the dma_sync_single_for_cpu/device API
(preparations for the removal of the dma_sync_single_range_for_cpu/device API).
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: David S. Miller <davem@davemloft.net>
Jamal Hadi Salim [Fri, 19 Feb 2010 02:00:42 +0000 (02:00 +0000)]
xfrm: Flushing empty SPD generates false events
To see the effect make sure you have an empty SPD.
On window1 "ip xfrm mon" and on window2 issue "ip xfrm policy flush"
You get prompt back in window2 and you see the flush event on window1.
With this fix, you still get prompt on window1 but no event on window2.
Thanks to Alexey Dobriyan for finding a bug in earlier version
when using pfkey to do the flushing.
Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca> Signed-off-by: David S. Miller <davem@davemloft.net>
Jamal Hadi Salim [Fri, 19 Feb 2010 02:00:41 +0000 (02:00 +0000)]
xfrm: Flushing empty SAD generates false events
To see the effect make sure you have an empty SAD.
On window1 "ip xfrm mon" and on window2 issue "ip xfrm state flush"
You get prompt back in window2 and you see the flush event on window1.
With this fix, you still get prompt on window1 but no event on window2.
Thanks to Alexey Dobriyan for finding a bug in earlier version
when using pfkey to do the flushing.
Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca> Signed-off-by: David S. Miller <davem@davemloft.net>
Jamal Hadi Salim [Fri, 19 Feb 2010 02:00:40 +0000 (02:00 +0000)]
pfkey: fix SA and SP flush sequence
RFC 2367 says flushing behavior should be:
1) user space -> kernel: flush
2) kernel: flush
3) kernel -> user space: flush event to ALL listeners
This is not realistic today in the presence of selinux policies
which may reject the flush etc. So we make the sequence become:
1) user space -> kernel: flush
2) kernel: flush
3) kernel -> user space: flush response to originater from #1
4) if there were no errors then:
kernel -> user space: flush event to ALL listeners
Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca> Signed-off-by: David S. Miller <davem@davemloft.net>
Patrick McHardy [Fri, 19 Feb 2010 17:18:37 +0000 (18:18 +0100)]
netfilter: nf_conntrack_reasm: properly handle packets fragmented into a single fragment
When an ICMPV6_PKT_TOOBIG message is received with a MTU below 1280,
all further packets include a fragment header.
Unlike regular defragmentation, conntrack also needs to "reassemble"
those fragments in order to obtain a packet without the fragment
header for connection tracking. Currently nf_conntrack_reasm checks
whether a fragment has either IP6_MF set or an offset != 0, which
makes it ignore those fragments.
Remove the invalid check and make reassembly handle fragment queues
containing only a single fragment.
Reported-and-tested-by: Ulrich Weber <uweber@astaro.com> Signed-off-by: Patrick McHardy <kaber@trash.net>
netfilter: ctnetlink: fix creation of conntrack with helpers
This patch fixes a bug that triggers an assertion if you create
a conntrack entry with a helper and netfilter debugging is enabled.
Basically, we hit the assertion because the confirmation flag is
set before the conntrack extensions are added. To fix this, we
move the extension addition before the aforementioned flag is
set.
This patch also removes the possibility of setting a helper for
existing conntracks. This operation would also trigger the
assertion since we are not allowed to add new extensions for
existing conntracks. We know noone that could benefit from
this operation sanely.
Thanks to Eric Dumazet for initial posting a preliminary patch
to address this issue.
Reported-by: David Ramblewski <David.Ramblewski@atosorigin.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: Patrick McHardy <kaber@trash.net>
Patrick McHardy [Fri, 19 Feb 2010 07:03:28 +0000 (08:03 +0100)]
netfilter: restore POST_ROUTING hook in NF_HOOK_COND
Commit 2249065 ("netfilter: get rid of the grossness in netfilter.h")
inverted the logic for conditional hook invocation, breaking the
POST_ROUTING hook invoked by ip_output().
Correct the logic and remove an unnecessary initialization.
Reported-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: Patrick McHardy <kaber@trash.net>
Joe Perches [Wed, 17 Feb 2010 20:00:17 +0000 (20:00 +0000)]
drivers/net/sis190.c: Use (pr|netdev|netif)_<level> macro helpers
Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
Remove #define PFX
Use pr_<level>
Use netdev_<level>
Use netif_<level> and netif_msg_<test>
Remove local #define net_<test> macros
Remove periods from formats
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Joe Perches [Wed, 17 Feb 2010 19:44:19 +0000 (19:44 +0000)]
drivers/net/tg3.c: Use (pr|netdev)_<level> macro helpers
Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
Remove #define PFX
Use pr_<level>
Use netdev_<level>
Remove periods from most formats
Coalesce long formats
Use printk_once
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Due to lack of time, space, motivation, hardware and probably expertise,
I have reluctantly decided to orphan the DECnet code in the kernel.
Judging by the deafening silence on the linux-decnet mailing list I
suspect it's either not being used anyway, or the few people that are
using it are happy with their older kernels.
Signed-Off-By: Christine Caulfield <christine.caulfield@googlemail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Sathya Perla [Thu, 18 Feb 2010 00:37:17 +0000 (00:37 +0000)]
be2net: free tx buffers when completions never arrive
be2net: free tx buffers when completions never arrive
In cases like when a pci device is disconnected on an error,
pending tx completions will never arrive. Unmap and free such
buffers in the tx cleanup path.
Signed-off-by: Sathya Perla <sathyap@serverengines.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Andreas Petlund [Thu, 18 Feb 2010 04:48:19 +0000 (04:48 +0000)]
net: TCP thin dupack
This patch enables fast retransmissions after one dupACK for
TCP if the stream is identified as thin. This will reduce
latencies for thin streams that are not able to trigger fast
retransmissions due to high packet interarrival time. This
mechanism is only active if enabled by iocontrol or syscontrol
and the stream is identified as thin.
Signed-off-by: Andreas Petlund <apetlund@simula.no> Signed-off-by: David S. Miller <davem@davemloft.net>
Andreas Petlund [Thu, 18 Feb 2010 02:47:01 +0000 (02:47 +0000)]
net: TCP thin linear timeouts
This patch will make TCP use only linear timeouts if the
stream is thin. This will help to avoid the very high latencies
that thin stream suffer because of exponential backoff. This
mechanism is only active if enabled by iocontrol or syscontrol
and the stream is identified as thin. A maximum of 6 linear
timeouts is tried before exponential backoff is resumed.
Signed-off-by: Andreas Petlund <apetlund@simula.no> Signed-off-by: David S. Miller <davem@davemloft.net>
Andreas Petlund [Thu, 18 Feb 2010 02:45:45 +0000 (02:45 +0000)]
net: TCP thin-stream detection
Inline function to dynamically detect thin streams based on
the number of packets in flight. Used to dynamically trigger
thin-stream mechanisms if enabled by ioctl or sysctl.
Signed-off-by: Andreas Petlund <apetlund@simula.no> Signed-off-by: David S. Miller <davem@davemloft.net>
Arnd Bergmann [Thu, 18 Feb 2010 05:48:17 +0000 (05:48 +0000)]
macvtap: add GSO/csum offload support
Added flags field to macvtap_queue to enable/disable processing of
virtio_net_hdr via IFF_VNET_HDR. This flag is checked to prepend virtio_net_hdr
in the receive path and process/skip virtio_net_hdr in the send path.
Original patch by Sridhar, further changes by Arnd.
Signed-off-by: Sridhar Samudrala <sri@us.ibm.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Arnd Bergmann [Thu, 18 Feb 2010 05:45:36 +0000 (05:45 +0000)]
macvtap: rework object lifetime rules
This reworks the change done by the previous patch
in a more complete way.
The original macvtap code has a number of problems
resulting from the use of RCU for protecting the
access to struct macvtap_queue from open files.
This includes
- need for GFP_ATOMIC allocations for skbs
- potential deadlocks when copy_*_user sleeps
- inability to work with vhost-net
Changing the lifetime of macvtap_queue to always
depend on the open file solves all these. The
RCU reference simply moves one step down to
the reference on the macvlan_dev, which we
only need for nonblocking operations.
Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Sridhar Samudrala <sri@us.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Patrick McHardy [Thu, 18 Feb 2010 18:04:44 +0000 (19:04 +0100)]
netfilter: nf_defrag_ipv4: fix compilation error with NF_CONNTRACK=n
As reported by Randy Dunlap <randy.dunlap@oracle.com>, compilation
of nf_defrag_ipv4 fails with:
include/net/netfilter/nf_conntrack.h:94: error: field 'ct_general' has incomplete type
include/net/netfilter/nf_conntrack.h:178: error: 'const struct sk_buff' has no member named 'nfct'
include/net/netfilter/nf_conntrack.h:185: error: implicit declaration of function 'nf_conntrack_put'
include/net/netfilter/nf_conntrack.h:294: error: 'const struct sk_buff' has no member named 'nfct'
net/ipv4/netfilter/nf_defrag_ipv4.c:45: error: 'struct sk_buff' has no member named 'nfct'
net/ipv4/netfilter/nf_defrag_ipv4.c:46: error: 'struct sk_buff' has no member named 'nfct'
net/nf_conntrack.h must not be included with NF_CONNTRACK=n, add a
few #ifdefs. Long term the header file should be fixed to be usable
even with NF_CONNTRACK=n.
Tested-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Patrick McHardy <kaber@trash.net>
Enhance IPVS to load balance SCTP transport protocol packets. This is done
based on the SCTP rfc 4960. All possible control chunks have been taken
care. The state machine used in this code looks some what lengthy. I tried
to make the state machine easy to understand.
Signed-off-by: Venkata Mohan Reddy Koppula <mohanreddykv@gmail.com> Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: Patrick McHardy <kaber@trash.net>
Joe Perches [Wed, 17 Feb 2010 15:02:02 +0000 (15:02 +0000)]
drivers/net/yellowfin.c: Use (pr|netdev)_<level> macro helpers
Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
Remove #define PFX
Use pr_<level>
Use netdev_<level>
Convert formats like %8.8 to %08
Remove periods from formats
Coalesce long formats
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Joe Perches [Wed, 17 Feb 2010 15:01:55 +0000 (15:01 +0000)]
drivers/net/pci-skeleton.c: Use (pr|netdev|netif)_<level> macro helpers
Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
Remove #define PFX
Use pr_<level>
Use netdev_<level>
Use netif_<level>
Checkpatch cleaning
Convert formats like 0x%08x to %#08x
Remove periods from formats
Coalesce long formats
Use print_hex_dump
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Joe Perches [Wed, 17 Feb 2010 15:01:54 +0000 (15:01 +0000)]
drivers/net/cnic.c: Use (pr|netdev)_<level> macro helpers
Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
Remove #define PFX
Use pr_<level>
Use netdev_<level>
Remove periods from formats
Coalesce long formats
Use __func__
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Joe Perches [Wed, 17 Feb 2010 15:01:53 +0000 (15:01 +0000)]
drivers/net/cassini.c: Use (pr|netdev|netif)_<level> macro helpers
Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
Remove #define PFX
Use pr_<level>
Use netdev_<level>
Use netif_<level>
Remove periods from formats
Coalesce long formats
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Joe Perches [Wed, 17 Feb 2010 15:01:52 +0000 (15:01 +0000)]
drivers/net/bnx2x: Use (pr|netdev|netif)_<level> macro helpers
Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
Convert struct bnx2x member msglevel to msg_enable for netif_msg_<foo> macros
Remove #define PFX
Use pr_<level>
Use netdev_<level>
Use netif_<level>
Coalesce long formats
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Joe Perches [Wed, 17 Feb 2010 15:01:51 +0000 (15:01 +0000)]
drivers/net/bnx2.c: Use (pr|netdev|netif)_<level> macro helpers
Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
Remove #define PFX
Use pr_<level>
Use netdev_<level>
Use netif_<level>
Remove periods from formats
Coalesce long formats
Coalesce some printks
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Joe Perches [Wed, 17 Feb 2010 15:01:50 +0000 (15:01 +0000)]
drivers/net/b44.c: Use (pr|netdev|netif)_<level> macro helpers
Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
Remove #define PFX
Use pr_<level>
Use netdev_<level>
Use netif_<level>
Remove periods from formats
Coalesce long formats
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Joe Perches [Wed, 17 Feb 2010 15:01:49 +0000 (15:01 +0000)]
drivers/net/8139too.c: Use (pr|netdev|netif)_<level> macro helpers
Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
Remove #define PFX
Use pr_<level>
Use netdev_<level>
Use netif_<level>
Convert formats like %8.8 to %08
Remove periods from formats
Coalesce long formats
Use print_hex_dump
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Joe Perches [Wed, 17 Feb 2010 15:01:48 +0000 (15:01 +0000)]
drivers/net/8139cp.c: Use (pr|netdev|netif)_<level> macro helpers
Add #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
Remove #define PFX
Use pr_<level>
Use netdev_<level>
Use netif_<level>
Remove periods from formats
Coalesce long formats
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Matt Carlson [Wed, 17 Feb 2010 15:17:05 +0000 (15:17 +0000)]
tg3: Update version to 3.108
This patch updates the tg3 version to 3.108.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Matt Carlson [Wed, 17 Feb 2010 15:17:04 +0000 (15:17 +0000)]
tg3: Push phylib definitions to phylib
This patch pushes phylib definitions out to phylib headers. For phy
IDs, this removes some code duplication.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Matt Carlson [Wed, 17 Feb 2010 15:17:03 +0000 (15:17 +0000)]
tg3: Rename tg3 phy ID preprocessor definitions
The phylib presents the phy ID in a different format than the one tg3
has traditionally used. To highlight the distinction, this patch
prepends the tg3 native phy ID format with TG3.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Matt Carlson [Wed, 17 Feb 2010 15:17:02 +0000 (15:17 +0000)]
tg3: Reformat SSID to phy ID table
This patch reformats the SSID to phy ID table, replacing constants with
preprocessor definitions. This patch is also prep work for the
following patch, which will push line lengths beyond 80 chars.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Matt Carlson [Wed, 17 Feb 2010 15:17:01 +0000 (15:17 +0000)]
tg3: Discover phy address once
The phy address will not change after it has been identified. Move the
discovery code to a location that only gets executed once.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Matt Carlson [Wed, 17 Feb 2010 15:17:00 +0000 (15:17 +0000)]
tg3: Reduce indent level of tg3_rx_prodring_alloc
This patch adds an inverted "jumbo ring enable" test and jumps to the exit
if it succeeds. The change reduces the indent level of the remaining
code making it more readable.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Matt Carlson [Wed, 17 Feb 2010 15:16:59 +0000 (15:16 +0000)]
tg3: Rename TG3_FLG3_RGMII_STD_IBND_DISABLE
The STD part of this preprocessor definition is a bit of a misnomer.
This flag is a coarse control of the RGMII inband status facilities.
This patch renames the definition to be more accurate.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Matt Carlson [Wed, 17 Feb 2010 15:16:58 +0000 (15:16 +0000)]
tg3: Add more partno entries for fallback path
This patch adds 57765 asic partno entries for the path executed if VPD
is not present in NVRAM.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Matt Carlson [Wed, 17 Feb 2010 15:16:57 +0000 (15:16 +0000)]
tg3: Allow phylib flowctrl changes anytime
This patch loosens the restriction that the phylib interface must be up
and running to change the flow control parameters.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Matt Carlson [Wed, 17 Feb 2010 15:16:56 +0000 (15:16 +0000)]
tg3: Add support for 2 new selfboot formats
This patch adds new offsets to the bootcode version extraction code to
support NVRAM format versions 4 and 5.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>