drivers/built-in.o: In function `get_tun_socket':
net.c:(.text+0x15436e): undefined reference to `tun_get_socket'
If tun is a module, vhost must be a module, too.
If tun is built-in or disabled, vhost can be built-in.
Note: TUN || !TUN might look a bit strange until you realize
that boolean logic rules do not apply for tristate variables.
Reported-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Matt Carlson [Wed, 20 Jan 2010 16:58:11 +0000 (16:58 +0000)]
tg3: Add 57765 phy ID and enable devices.
This patch rounds out the 57765 asic rev support by adding the 57765 phy
ID and entering the 57765 device IDs in the pci table.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Reviewed-by: Benjamin Li <benli@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Matt Carlson [Wed, 20 Jan 2010 16:58:10 +0000 (16:58 +0000)]
tg3: Bypass power source switching for 57765
The 57765 repurposes all the GPIOs normally used to switch power sources
when configured as a NIC device. This patch changes the code to avoid
touching the GPIOs for this asic rev.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Reviewed-by: Benjamin Li <benli@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Matt Carlson [Wed, 20 Jan 2010 16:58:09 +0000 (16:58 +0000)]
tg3: Turn off the debug UART for 57765
If the debug UART is left enabled, the LEDs will not work properly.
This patch disables the debug UART.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Reviewed-by: Benjamin Li <benli@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Matt Carlson [Wed, 20 Jan 2010 16:58:08 +0000 (16:58 +0000)]
tg3: Fix tx mailbox initialization
If a device supports MSI-X interrupts, the driver assumes TSS will be
available. This is not true for the 57765. This patch changes the code
so that only the default tx mailbox is initialized if TSS is not
available.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Reviewed-by: Benjamin Li <benli@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Matt Carlson [Wed, 20 Jan 2010 16:58:07 +0000 (16:58 +0000)]
tg3: Supply a nicaddr for 57765 jumbo RCB
The 57765 needs the driver to supply a nic address to the jumbo RCB,
just like all other devices except the 5717. This patch changes the
test to single out the 5717 rather than maintain a lengthy whitelist of
asic revs.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Reviewed-by: Benjamin Li <benli@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Matt Carlson [Wed, 20 Jan 2010 16:58:06 +0000 (16:58 +0000)]
tg3: Fix 5717 and 57765 memory selftests
Both the 5717 and the 57765 will fail 'ethtool -t' selftests at the
memory selftest portion. The memory map for these two devices differs
from the rest of the asic revs and each other. This patch adds a new
memory map to use for memory selftests.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Reviewed-by: Benjamin Li <benli@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Matt Carlson [Wed, 20 Jan 2010 16:58:05 +0000 (16:58 +0000)]
tg3: Abort phy init for 5717 serdes devices
The 5717 serdes devices have a different phy register layout than all
other previous serdes devices. This patch aborts the phy init sequence
in tg3_phy_reset() if the device is a 5717 serdes. It also aborts the
tg3_phy_toggle_apd() operation. Most other operations in the MII_SERDES
path are O.K.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Reviewed-by: Benjamin Li <benli@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Matt Carlson [Wed, 20 Jan 2010 16:58:04 +0000 (16:58 +0000)]
tg3: Add 5717 serdes phy ID
The serdes and copper phys of the 5717 asic rev have different phy IDs.
This patch adds the serdes phy ID.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Reviewed-by: Benjamin Li <benli@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Matt Carlson [Wed, 20 Jan 2010 16:58:03 +0000 (16:58 +0000)]
tg3: Improve internal resource allocations
The 5717 and the 57765 have more resources at their disposal internally.
This patch tunes the driver to get better performance. The adjustments
made here only apply to the 57765 and 5717 asic revs.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Reviewed-by: Benjamin Li <benli@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Matt Carlson [Wed, 20 Jan 2010 16:58:02 +0000 (16:58 +0000)]
tg3: Enable PLL PD when CLKREQ disabled for 5717A0
PCIe PLL power down cannot be used if CLKREQ is enabled because data
corruption will occur. If CLKREQ is disabled though, enabling PCIE P1
PLL power-down saves some power.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Reviewed-by: Benjamin Li <benli@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Allan Stephens [Tue, 19 Jan 2010 22:23:57 +0000 (14:23 -0800)]
tipc: Clean up configuration file
This patch addresses a number of minor (mostly cosmetic) issues relating
to the configuration of TIPC, including the following:
- Corrects range limits for maximum number of ports per node
- Adds missing range limits for size of log buffer
- Removes configuration setting relating to unsupported slave node capability
- Standardizes description and help text wording for configuration settings
- Removes unneeded blank spaces
Signed-off-by: Allan Stephens <allan.stephens@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Octavian Purdila [Mon, 18 Jan 2010 12:58:44 +0000 (12:58 +0000)]
ipv4: allow warming up the ARP cache with request type gratuitous ARP
If the per device ARP_ACCEPT option is enable, currently we only allow
creating new ARP cache entries for response type gratuitous ARP.
Allowing gratuitous ARP to create new ARP entries (not only to update
existing ones) is useful when we want to avoid unnecessary delays for
the first packet of a stream.
This patch allows request type gratuitous ARP to create new ARP cache
entries as well. This is useful when we want to populate the ARP cache
entries for a large number of hosts on the same LAN.
Signed-off-by: Octavian Purdila <opurdila@ixiacom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
I was just looking at ppp_generic, and noticed that it fairly recently
(as in the last year) got rather mangled with many spaces turned into tabs
in places they very much shouldn't have been. I tracked it down to commit 9c705260feea6ae329bc6b6d5f6d2ef0227eda0a (ppp: ppp_mp_explode() redesign).
I am amazed if that patch passed the patch checking script. I have no
idea what kind of weird editor setting did this, but it has to have been a
weird editor setting or a very unfortunate search and replace gone wrong.
I only found it trying to apply a patch I was playing with and wondering
why it wouldn't apply. Then I found there were tabs in the middle of
comments that used to be spaces.
Well here is a patch that should fix it up as far as I can tell.
Purely whitespace repair. No actual code changes.
Signed-off-by: Len Sorensen <lsorense@csclub.uwaterloo.ca> Signed-off-by: David S. Miller <davem@davemloft.net>
Michael Chan [Sun, 17 Jan 2010 07:30:44 +0000 (07:30 +0000)]
bnx2: Save statistics during reset.
MTU changes, ring size changes, etc cause the chip to be reset and the
statisctics flushed. To keep track of the accumulated statistics, we
add code to save the whole statistics block before reset. We also
modify the macros and statistics functions to return the sum of the
saved and current counters.
Based on original patch by Breno Leitao <leitao@linux.vnet.ibm.com>
Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Michael Chan [Sun, 17 Jan 2010 07:30:43 +0000 (07:30 +0000)]
bnx2: Refine statistics code.
Refine the statistics macros by passing in just the name of the
counter field. This makes it a lot easier and cleaner to add
counters saved before the last reset in the next patch.
Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Octavian Purdila [Mon, 18 Jan 2010 03:09:39 +0000 (19:09 -0800)]
tcp: account SYN-ACK timeouts & retransmissions
Currently we don't increment SYN-ACK timeouts & retransmissions
although we do increment the same stats for SYN. We seem to have lost
the SYN-ACK accounting with the introduction of tcp_syn_recv_timer
(commit 2248761e in the netdev-vger-cvs tree).
This patch fixes this issue. In the process we also rename the v4/v6
syn/ack retransmit functions for clarity. We also add a new
request_socket operations (syn_ack_timeout) so we can keep code in
inet_connection_sock.c protocol agnostic.
Signed-off-by: Octavian Purdila <opurdila@ixiacom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Patrick Mullaney [Sat, 16 Jan 2010 09:05:38 +0000 (01:05 -0800)]
macvlan: add GRO bit to features mask
Allow macvlan devices to support GRO.
Signed-off-by: Patrick Mullaney <pmullaney@novell.com> Acked-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Ron Mercer [Fri, 15 Jan 2010 13:31:28 +0000 (13:31 +0000)]
qlge: Add basic firmware dump.
Adding the infrstructure and basic data for the firmware
core dump.
The firmware coredump is turned OFF by default. There will be no
memory allocations for data dumps to the log.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Felix Fietkau [Fri, 15 Jan 2010 01:33:40 +0000 (02:33 +0100)]
ath9k: cleanup slot time and ack/cts timeout handling
Previously ath9k left the initialization of slot timing and ACK/CTS
timeout to the mode specific initvals. This does not handle short vs
long slot in 2.4 GHz and uses a rather strange value for the 2.4 GHz
ACK timeout (64 usec).
This patch uses the proper ath9k_hw functions for setting slot time and
timeouts and also implements the switch between short and long slot
time in 2.4 GHz
Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
mac80211: use Probe Request template when sending a direct scan
The patch is against the latest wireless-test tree.
Signed-off-by: Ming Lei <tom.leiming@gmail.com> Reviewed-by: Kalle Valo <kalle.valo@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Felix Fietkau [Fri, 15 Jan 2010 02:00:48 +0000 (03:00 +0100)]
mac80211: force use_short_slot=true for 5GHz
Normally 5GHz does not have a concept of long vs short slot time,
however the slot time that it ends up using is the same as for 2.4 GHZ
and use_short_slot == true
Because of that, it makes more sense to force use_short_slot = true
whenever 5 GHz is being used, so that this particular check does not
have to be in every single driver that uses this flag.
Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
cfg80211: make regulatory_hint_11d() band specific
In practice APs do not send country IE channel triplets for channels
the AP is not operating on and if they were to do so they would have
to use the regulatory extension which we currently do not process.
No AP has been seen in practice that does this though so just drop
those country IEs.
Additionally it has been noted the first series of country IE
channels triplets are specific to the band the AP sends. Propagate
the band on which the country IE was found on reject the country
IE then if the triplets are ever oustide of the band.
Although we now won't process country IE information with multiple
band information we leave the intersection work as is as it is
technically possible for someone to want to eventually process these
type of country IEs with regulatory extensions.
Cc: Jouni Malinen <jouni.malinen@atheros.com> Cc: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
mac80211: Fixed netif_tx_wake_all_queues in IBSS mode
When ieee80211_offchannel_return is called, it needs to re-enabled TX
queues that have been stopped in ieee80211_offchannel_stop_beaconing or
ieee80211_offchannel_stop_station. It happens if we are doing a scan with an
IBSS interface. In this case, the interface stopped transmitting.
Signed-off-by: Benoit Papillault <benoit.papillault@free.fr> Signed-off-by: John W. Linville <linville@tuxdriver.com>
What it is: vhost net is a character device that can be used to reduce
the number of system calls involved in virtio networking.
Existing virtio net code is used in the guest without modification.
There's similarity with vringfd, with some differences and reduced scope
- uses eventfd for signalling
- structures can be moved around in memory at any time (good for
migration, bug work-arounds in userspace)
- write logging is supported (good for migration)
- support memory table and not just an offset (needed for kvm)
common virtio related code has been put in a separate file vhost.c and
can be made into a separate module if/when more backends appear. I used
Rusty's lguest.c as the source for developing this part : this supplied
me with witty comments I wouldn't be able to write myself.
What it is not: vhost net is not a bus, and not a generic new system
call. No assumptions are made on how guest performs hypercalls.
Userspace hypervisors are supported as well as kvm.
How it works: Basically, we connect virtio frontend (configured by
userspace) to a backend. The backend could be a network device, or a tap
device. Backend is also configured by userspace, including vlan/mac
etc.
Status: This works for me, and I haven't see any crashes.
Compared to userspace, people reported improved latency (as I save up to
4 system calls per packet), as well as better bandwidth and CPU
utilization.
Features that I plan to look at in the future:
- mergeable buffers
- zero copy
- scalability tuning: figure out the best threading model to use
Note on RCU usage (this is also documented in vhost.h, near
private_pointer which is the value protected by this variant of RCU):
what is happening is that the rcu_dereference() is being used in a
workqueue item. The role of rcu_read_lock() is taken on by the start of
execution of the workqueue item, of rcu_read_unlock() by the end of
execution of the workqueue item, and of synchronize_rcu() by
flush_workqueue()/flush_work(). In the future we might need to apply
some gcc attribute or sparse annotation to the function passed to
INIT_WORK(). Paul's ack below is for this RCU usage.
(Includes fixes by Alan Cox <alan@linux.intel.com>,
David L Stevens <dlstevens@us.ibm.com>,
Chris Wright <chrisw@redhat.com>)
Acked-by: Rusty Russell <rusty@rustcorp.com.au> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
vhost net module wants to do copy to/from user from a kernel thread,
which needs use_mm. Export it to modules.
Acked-by: Andrea Arcangeli <aarcange@redhat.com> Acked-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Tun device looks similar to a packet socket
in that both pass complete frames from/to userspace.
This patch fills in enough fields in the socket underlying tun driver
to support sendmsg/recvmsg operations, and message flags
MSG_TRUNC and MSG_DONTWAIT, and exports access to this socket
to modules. Regular read/write behaviour is unchanged.
This way, code using raw sockets to inject packets
into a physical device, can support injecting
packets into host network stack almost without modification.
First user of this interface will be vhost virtualization
accelerator.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Herbert Xu <herbert@gondor.apana.org.au> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: David S. Miller <davem@davemloft.net>
This patch adds error checking of ctrlmode values for CAN devices. As
an example all availabe bits are implemented in the mcp251x driver.
Signed-off-by: Christian Pellegrin <chripell@fsfe.org> Acked-by: Wolfgang Grandegger <wg@grandegger.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Larry Finger [Thu, 14 Jan 2010 19:13:47 +0000 (13:13 -0600)]
Staging: r8187se: Fix compile error from wireless-testing commit 7044cc56
In wireless-testing, commit 7044cc56 added struct ieee80211_hdr_3addr
to include/linux/ieee80211.h. This definition collides with one that is
in the r8187se driver in staging.
The conflict is resolved by changing r8187se to use the definition from
include/linuc/ieee80211.h.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Kalle Valo [Thu, 14 Jan 2010 11:09:21 +0000 (13:09 +0200)]
mac80211: improve powersave documentation
There has been some confusion how drivers should implement powersave
support. Improve the documentation a bit to make it more clear what
drivers need to do. Also mention about U-APSD.
Signed-off-by: Kalle Valo <kalle.valo@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith [Thu, 14 Jan 2010 04:50:57 +0000 (10:20 +0530)]
ath9k: Fix panic on driver load
The device has to be marked as invalid before
registering the ISR. HW initialization takes place
after the ISR has been registered, and the invalid
flag is eventually cleared in the ->stop() callback.
Reported-by: Pavel Roskin <proski@gnu.org> Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Christoph Egger [Wed, 13 Jan 2010 13:36:24 +0000 (14:36 +0100)]
Remove config option B43_LEGACY_RFKILL completely
In f41f3f373dd72344c65d801d6381fe83ef3a2c54 the B43 driver was ported
to use the cfg80211 API for rfkill and consequently the config option
was dropped (RFKILL is now unconditionally enabled).
However in the Kernel Info the feature is still checked and reported
missing. This patch just removes the conditional and the relevant code
blocks while still reporting that feature unconditionally would be
another option (it's always there).
Signed-off-by: Christoph Egger <siccegge@stud.informatik.uni-erlangen.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
These are unused and as with a previous patch 5ef5da for wl1251
this removes some other unused flags. the IRQ_MASK specifically
conflicts with include/pcmcia/cs.h when using compat-wireless.
Cc: Kalle Valo <kalle.valo@nokia.com> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Tim Gardner [Tue, 12 Jan 2010 18:58:17 +0000 (12:58 -0600)]
b43legacy: Declare all possible ucodeX.fw files
Enhance module information with the names of the firmware files
that could be used by this driver. This helps tools like Jockey to
correctly detect and/or install the firmware files relevant to
this driver.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
cfg80211: fix 2 GHz subband calculation for country IEs
Country IEs triplets are getting an extra channel with
the current count. This does not affect regulatory because
we always took the intersection between what the AP gave
and what CRDA believed is correct.
This however does fix processing some Country IEs with multiple
sequential 2 GHz triplets. Since our parser and the spec mandates
all channels be monitonically increasing we would drop the IE after
noticing the second triplet begins on a channel already processed.
APs that send these type of country IEs seems rare though.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Tim Gardner [Thu, 7 Jan 2010 18:10:38 +0000 (11:10 -0700)]
b43: Declare at least one real firmware file using MODULE_FIRMWARE.
BugLink: http://bugs.launchpad.net/bugs/488636
Enhances module information with the names of the firmware files
that could be used by this driver. This helps tools like Jockey to
correctly detect and/or install the firmware files relevant to
this driver.
Signed-off-by: Tim Gardner <tim.gardner@canonical.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
From Message-ID: <1262663293.551.117.camel@debian>
On Sat, 2010-01-02 at 22:09 +0800, Dan Carpenter wrote:
> It don't think 6c853da3f30c93 is right. That's the patch
> titled "iwmc3200wifi: fix array out-of-boundary access"
>
> Allocate priv->rx_packets[IWM_RX_ID_HASH + 1] because the max array
> index is IWM_RX_ID_HASH according to IWM_RX_ID_GET_HASH().
>
> In 2.6.33-rc2 IWM_RX_ID_GET_HASH() doesn't go as high as IWM_RX_ID_HASH
> and I don't see any array out-of-bounds.
>
> #define IWM_RX_ID_GET_HASH(id) ((id) % IWM_RX_ID_HASH)
Ah, you are right. I took '%' for '&'. John, would you revert it? Sorry
for the false alarm.
Thanks,
-yi
Reported-by: Dan Carpenter <error27@gmail.com> Reviewed-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>