Rafael J. Wysocki [Sun, 10 Aug 2008 17:30:28 +0000 (19:30 +0200)]
sky2: Fix suspend/hibernation/shutdown regression with WOL enabled (rev. 2)
On my test box with the Asus M3A32-MVP main board there is a
regression from 2.6.26 related to suspend, hibernation and
shutdown. Namely, if Wake-on-LAN is enabled with
'ethtool -s eth0 wol g', the box hangs solid during all of these
operations, while executing either sky2_suspend(), or
sky2_shutdown(). This patch fixes it for me.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Vegard Nossum [Wed, 6 Aug 2008 12:12:11 +0000 (14:12 +0200)]
au1000_eth: use 'unsigned long' for irqflags
The patch was generated using the Coccinelle semantic patch framework.
Cc: Julia Lawall <julia@diku.dk>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Brice Goglin [Wed, 13 Aug 2008 19:05:52 +0000 (21:05 +0200)]
myri10ge: myri10ge_fw_name also overrides the rss firmware
When myri10ge_fw_name is given, use it to override the rss firmware
name as well.
Signed-off-by: Brice Goglin <brice@myri.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Mikael Pettersson [Wed, 13 Aug 2008 19:08:14 +0000 (21:08 +0200)]
ixp4xx_eth: fix dma_mapping_error() compile errors
The arm ixp4xx_eth driver doesn't compile in 2.6.27-rc1:
CC [M] drivers/net/arm/ixp4xx_eth.o
drivers/net/arm/ixp4xx_eth.c: In function 'eth_poll':
drivers/net/arm/ixp4xx_eth.c:554: warning: passing argument 1 of 'dma_mapping_error' makes pointer from integer without a cast
drivers/net/arm/ixp4xx_eth.c:554: error: too few arguments to function 'dma_mapping_error'
drivers/net/arm/ixp4xx_eth.c: In function 'eth_xmit':
drivers/net/arm/ixp4xx_eth.c:701: warning: passing argument 1 of 'dma_mapping_error' makes pointer from integer without a cast
drivers/net/arm/ixp4xx_eth.c:701: error: too few arguments to function 'dma_mapping_error'
drivers/net/arm/ixp4xx_eth.c: In function 'init_queues':
drivers/net/arm/ixp4xx_eth.c:886: warning: passing argument 1 of 'dma_mapping_error' makes pointer from integer without a cast
drivers/net/arm/ixp4xx_eth.c:886: error: too few arguments to function 'dma_mapping_error'
make[3]: *** [drivers/net/arm/ixp4xx_eth.o] Error 1
make[2]: *** [drivers/net/arm] Error 2
make[1]: *** [drivers/net] Error 2
make: *** [drivers] Error 2
dma_mapping_error() changed in 2.6.27-rc1 to also take a device parameter,
but nobody bothered updating ixp4xx_eth.c. Fixed by passing the appropriate
device value in the dma_mapping_error() calls.
Tested on an ixp425 box.
Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>
Acked-by: Krzysztof Halasa <khc@pm.waw.pl>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Scott Wood [Tue, 12 Aug 2008 20:10:46 +0000 (15:10 -0500)]
gianfar: Call gfar_halt_nodisable() from gfar_halt().
gfar_halt() was factored out into halting and disabling by commit
d87eb12785c14de1586e3bad86ca2c0991300339, as the suspend() method
only wants to do the former. However, the call to gfar_halt_nodisable()
from gfar_halt() apparently got lost during the patch respin process.
This adds it back.
Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Huang Weiyi [Mon, 11 Aug 2008 04:56:44 +0000 (12:56 +0800)]
[netdrvr] remove unnecessary #include
The drivers below do not use LINUX_VERSION_CODE nor KERNEL_VERSION.
drivers/net/acenic.c
drivers/net/bnx2x_link.c
drivers/net/bnx2x_main.c
drivers/net/cpmac.c
drivers/net/gianfar_sysfs.c
drivers/net/ipg.h
drivers/net/ppp_mppe.c
drivers/net/pppol2tp.c
drivers/net/r6040.c
drivers/net/sh_eth.c
drivers/net/sky2.c
drivers/net/tehuti.h
drivers/net/typhoon.c
This patch removes the said #include <linux/version.h>.
Signed-off-by: Huang Weiyi <hwy@cn.fujitsu.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Daniel Lezcano [Wed, 13 Aug 2008 23:15:57 +0000 (16:15 -0700)]
netns: Fix crash by making igmp per namespace
This patch makes the multicast socket to be per namespace.
When a network namespace is created, other than the init_net and a
multicast packet is received, the kernel goes to a hang or a kernel panic.
How to reproduce ?
* create a child network namespace
* create a pair virtual device veth
* ip link add type veth
* move one side to the pair network device to the child namespace
* ip link set netns <childpid> dev veth1
* ping -I veth0 224.0.0.1
The bug appears because the function ip_mc_init_dev does not initialize
the different multicast fields as it exits because it is not the init_net.
BUG: soft lockup - CPU#0 stuck for 61s! [avahi-daemon:2695]
Modules linked in:
irq event stamp: 50350
hardirqs last enabled at (50349): [<
c03ee949>] _spin_unlock_irqrestore+0x34/0x39
hardirqs last disabled at (50350): [<
c03ec639>] schedule+0x9f/0x5ff
softirqs last enabled at (45712): [<
c0374d4b>] ip_setsockopt+0x8e7/0x909
softirqs last disabled at (45710): [<
c03ee682>] _spin_lock_bh+0x8/0x27
Pid: 2695, comm: avahi-daemon Not tainted (
2.6.27-rc2-00029-g0872073 #3)
EIP: 0060:[<
c03ee47c>] EFLAGS:
00000297 CPU: 0
EIP is at __read_lock_failed+0x8/0x10
EAX:
c4f38810 EBX:
c4f38810 ECX:
00000000 EDX:
c04cc22e
ESI:
fb0000e0 EDI:
00000011 EBP:
0f02000a ESP:
c4e3faa0
DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
CR0:
8005003b CR2:
44618a40 CR3:
04e37000 CR4:
000006d0
DR0:
00000000 DR1:
00000000 DR2:
00000000 DR3:
00000000
DR6:
ffff0ff0 DR7:
00000400
[<
c02311f8>] ? _raw_read_lock+0x23/0x25
[<
c0390666>] ? ip_check_mc+0x1c/0x83
[<
c036d478>] ? ip_route_input+0x229/0xe92
[<
c022e2e4>] ? trace_hardirqs_on_thunk+0xc/0x10
[<
c0104c9c>] ? do_IRQ+0x69/0x7d
[<
c0102e64>] ? restore_nocheck_notrace+0x0/0xe
[<
c036fdba>] ? ip_rcv+0x227/0x505
[<
c0358764>] ? netif_receive_skb+0xfe/0x2b3
[<
c03588d2>] ? netif_receive_skb+0x26c/0x2b3
[<
c035af31>] ? process_backlog+0x73/0xbd
[<
c035a8cd>] ? net_rx_action+0xc1/0x1ae
[<
c01218a8>] ? __do_softirq+0x7b/0xef
[<
c0121953>] ? do_softirq+0x37/0x4d
[<
c035b50d>] ? dev_queue_xmit+0x3d4/0x40b
[<
c0122037>] ? local_bh_enable+0x96/0xab
[<
c035b50d>] ? dev_queue_xmit+0x3d4/0x40b
[<
c012181e>] ? _local_bh_enable+0x79/0x88
[<
c035fcb8>] ? neigh_resolve_output+0x20f/0x239
[<
c0373118>] ? ip_finish_output+0x1df/0x209
[<
c0373364>] ? ip_dev_loopback_xmit+0x62/0x66
[<
c0371db5>] ? ip_local_out+0x15/0x17
[<
c0372013>] ? ip_push_pending_frames+0x25c/0x2bb
[<
c03891b8>] ? udp_push_pending_frames+0x2bb/0x30e
[<
c038a189>] ? udp_sendmsg+0x413/0x51d
[<
c038a1a9>] ? udp_sendmsg+0x433/0x51d
[<
c038f927>] ? inet_sendmsg+0x35/0x3f
[<
c034f092>] ? sock_sendmsg+0xb8/0xd1
[<
c012d554>] ? autoremove_wake_function+0x0/0x2b
[<
c022e6de>] ? copy_from_user+0x32/0x5e
[<
c022e6de>] ? copy_from_user+0x32/0x5e
[<
c034f238>] ? sys_sendmsg+0x18d/0x1f0
[<
c0175e90>] ? pipe_write+0x3cb/0x3d7
[<
c0170347>] ? do_sync_write+0xbe/0x105
[<
c012d554>] ? autoremove_wake_function+0x0/0x2b
[<
c03503b2>] ? sys_socketcall+0x176/0x1b0
[<
c01085ea>] ? syscall_trace_enter+0x6c/0x7b
[<
c0102e1a>] ? syscall_call+0x7/0xb
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eilon Greenstein [Wed, 13 Aug 2008 22:59:45 +0000 (15:59 -0700)]
bnx2x: Version update
Version update
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eilon Greenstein [Wed, 13 Aug 2008 22:59:25 +0000 (15:59 -0700)]
bnx2x: Checkpatch compliance
Checkpatch compliance
The latest version of checkpatch found the following style errors in the
code
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eilon Greenstein [Wed, 13 Aug 2008 22:59:08 +0000 (15:59 -0700)]
bnx2x: Spelling mistakes
Spelling mistakes
Spelling has to L's in it...
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eilon Greenstein [Wed, 13 Aug 2008 22:58:49 +0000 (15:58 -0700)]
bnx2x: Minor code improvements
Minor code improvements
Small changes to make the code a little bit more efficient and mostly
more readable:
- Using unified macros for EMAC_RD/WR which looks like normal REG_RD/WR
- Removing the NIG_WR since it did nothing and was only confusing
- On bnx2x_panic_dump, print only the used parts of the rings
- define parameters only on the branch they are needed and not at the
beginning of the function
- using NETIF_MSG_INTR and not private BNX2X_MSG_SP for debug prints
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eilon Greenstein [Wed, 13 Aug 2008 22:58:30 +0000 (15:58 -0700)]
bnx2x: Driver info
Driver info
The internal FW which is downloaded by the driver should not be
displayed - it is only causing confusion and it is redundant since it
can be concluded from the driver version. Display only FW which is
burned on the board nvram
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eilon Greenstein [Wed, 13 Aug 2008 22:58:12 +0000 (15:58 -0700)]
bnx2x: 1G LED does not turn off
1G LED does not turn off
The 1G LED was not switched to off when the link was lost
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Yaniv Rosner [Wed, 13 Aug 2008 22:57:28 +0000 (15:57 -0700)]
bnx2x: 8073 PHY changes
8073 PHY changes
The initial support we had for this PHY needs some serious changing. The
major change is that this PHY should be initialized only when the first
function is loaded and not for each function. The official SPI-ROM of
this PHY was released and it requires some changes in the initialization
code as well
Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eilon Greenstein [Wed, 13 Aug 2008 22:56:59 +0000 (15:56 -0700)]
bnx2x: Change GPIO for any port
Change GPIO for any port
The set GPIO function should receive the port index to allow changing
the GPIO of another port. This is needed for the common init phase (one
the first driver is loaded for the chip)
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Yaniv Rosner [Wed, 13 Aug 2008 22:56:17 +0000 (15:56 -0700)]
bnx2x: Pause settings
Pause settings
- 1G pause was not working due to missing write to the emac block
(TX_MODE_FLOW_EN)
- The flow control should use the negotiated result (after autoneg) so
we should save both the requested autoneg and the result
- The HW credits with flow control at 1G speed were not optimized and
caused low throughput
- It is recommended to turn off flow control if the MTU is bigger than
5000B due to internal buffers size
Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Yaniv Rosner [Wed, 13 Aug 2008 22:55:28 +0000 (15:55 -0700)]
bnx2x: Link order with external PHY
Link order with external PHY
When external PHY exists (second chip with the PHY to translate to
another physical medium) the link with the eternal PHY and the network
should be established before setting the link between the 5771x and the
PHY. This is the right order and it is important when using autoneg -
the link to the network should use the autoneg and the link between the
two chips should be forced to the network result.
Signed-off-by: Yaniv Rosner <yanivr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Vladislav Zolotarov [Wed, 13 Aug 2008 22:53:38 +0000 (15:53 -0700)]
bnx2x: No LRO without Rx checksum
No LRO without Rx checksum
Disabling LRO when Rx checksum is disabled
Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Yitchak Gertner [Wed, 13 Aug 2008 22:53:12 +0000 (15:53 -0700)]
bnx2x: Wrong structure size
Wrong structure size
The wrong structure was used in the sizeof to clear (luckily both
structures have the same size in this version...)
Signed-off-by: Yitchak Gertner <gertner@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eilon Greenstein [Wed, 13 Aug 2008 22:52:46 +0000 (15:52 -0700)]
bnx2x: WoL capability
WoL capability
All designs reported WoL capability regardless of HW limitations - check
if this device is actually capable of WoL
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Yitchak Gertner [Wed, 13 Aug 2008 22:52:28 +0000 (15:52 -0700)]
bnx2x: Clearing MAC addresses filters
Clearing MAC addresses filters
When the driver unloads, it should clear the MAC addresses filters in
the HW - this prevents packets from entering the chip when the driver is
re-loaded before initializing the right filters
Signed-off-by: Yitchak Gertner <gertner@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Yitchak Gertner [Wed, 13 Aug 2008 22:52:08 +0000 (15:52 -0700)]
bnx2x: Delay in while loops
Delay in while loops
The delay in the loop should be after the change. This has very little
effect (can save one delay) but it is the right thing to do
Signed-off-by: Yitchak Gertner <gertner@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eilon Greenstein [Wed, 13 Aug 2008 22:51:48 +0000 (15:51 -0700)]
bnx2x: PBA Table Page Alignment Workaround
PBA Table Page Alignment Workaround
The PBA table starts on the middle of the page and that's causing very
low performance with virtualization. The solution is not to update via
the BAR directly but via chip access to the same memory
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Yitchak Gertner [Wed, 13 Aug 2008 22:51:28 +0000 (15:51 -0700)]
bnx2x: Self-test false positive
Self-test false positive
- The memory test should use a mask according to the chip type
- In the register test, check the port only once and not inside the for
loop (not causing a failure - just ugly)
Signed-off-by: Yitchak Gertner <gertner@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eilon Greenstein [Wed, 13 Aug 2008 22:51:07 +0000 (15:51 -0700)]
bnx2x: Memory allocation
Memory allocation
- The CQE ring was allocated to the max size even for a chip that does
not support it. Fixed to allocate according to the chip type to save
memory
- The rx_page_ring was not freed on driver unload
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eilon Greenstein [Wed, 13 Aug 2008 22:50:45 +0000 (15:50 -0700)]
bnx2x: HW attention lock
HW attention lock
Making sure that only one function will handle the HW attention. This
makes the device parameter aeu_mask redundant so it is removed
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Yitchak Gertner [Wed, 13 Aug 2008 22:50:23 +0000 (15:50 -0700)]
bnx2x: HW lock mechanism
HW lock mechanism
Enhancing the HW lock to work per function and not only per port - this
is needed for the next patch that protects races over HW attention
detection between the different functions. At this chance, changing the
functions names to be more inline with the current naming convention
Signed-off-by: Yitchak Gertner <gertner@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Vladislav Zolotarov [Wed, 13 Aug 2008 22:50:00 +0000 (15:50 -0700)]
bnx2x: Load/Unload under traffic
Load/Unload under traffic
Few issues were found when loading and unloading under traffic:
- When receiving Tx interrupt call netif_wake_queue if the queue is
stopped but the state is open
- Check that interrupts are enabled before doing anything else on the
msix_fp_int function
- In nic_load, enable the interrupts only when needed and ready for it
- Function stop_leading returns status since it can fail
- Add 1ms delay when unloading the driver to validate that there are no
open transactions that already started by the FW
- Splitting the "has work" function into Tx and Rx so the same function
will be used on unload and interrupts
- Do not request for WoL if only resetting the device (save the time
that it takes the FW to set the link after reset)
- Fixing the device reset after iSCSI boot and before driver load - all
internal buffers must be cleared before the driver is loaded
Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eilon Greenstein [Wed, 13 Aug 2008 22:49:35 +0000 (15:49 -0700)]
bnx2x: FW Internal Memory structure
FW Internal Memory structure
The FW uses data structures on the chip internal memory to aggregate the
connections when TPA is enabled. The driver was clearing the wrong offsets
and therefore one function could cause another function to loose packets.
Changing the initialization of the chip internal memory to clear only the
relevant memory for each function which is being loaded
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Yitchak Gertner [Wed, 13 Aug 2008 22:49:05 +0000 (15:49 -0700)]
bnx2x: Statistics
Statistics
- Making sure that each drop is accounted for in the driver statistics
- Clearing the FW statistics when driver is loaded to prevent
inconsistency with HW statistics
- Once error is detected (bnx2x_panic_dump), stop the statistics
before other actions (currently it is stopped last and can corrupt
the data) - Adding HW checksum error counter to the statistics
- Removing unused variable stats_ticks
- Using macros instead of magic numbers to indicate which statistics are
shared per port and which are per function
Signed-off-by: Yitchak Gertner <gertner@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eilon Greenstein [Wed, 13 Aug 2008 22:48:29 +0000 (15:48 -0700)]
bnx2x: Not dropping packets with L3/L4 checksum error
Not dropping packets with L3/L4 checksum error
Those packets should be passed to the OS. The problem is clear in
forwarding mode.
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eilon Greenstein [Wed, 13 Aug 2008 22:47:33 +0000 (15:47 -0700)]
bnx2x: FW (bootcode) interface fixes
FW (bootcode) interface fixes
- Making sure that the device will not cause kernel panic of the
bootcode is corrupted or missing
- Removing module debug parameter "nomcp" since no one should work
without the bootcode (this is a left over from the chip bring up days)
- Instead of waiting fix amount of time for bootcode response, sample it
every 10ms (usually the answer is ready after less than 10ms)
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Jarek Poplawski [Wed, 13 Aug 2008 22:20:24 +0000 (15:20 -0700)]
pkt_sched: Protect gen estimators under est_lock.
gen_kill_estimator() required rtnl_lock() protection, but since it is
moved to an RCU callback __qdisc_destroy() let's use est_lock instead.
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Wed, 13 Aug 2008 22:18:38 +0000 (15:18 -0700)]
pkt_sched: Fix queue quiescence testing in dev_deactivate().
Based upon discussions with Jarek P. and Herbert Xu.
First, we're testing the wrong qdisc. We just reset the device
queue qdiscs to &noop_qdisc and checking it's state is completely
pointless here.
We want to wait until the previous qdisc that was sitting at
the ->qdisc pointer is not busy any more. And that would be
->qdisc_sleeping.
Because of how we propagate the samples qdisc pointer down into
qdisc_run and friends via per-cpu ->output_queue and netif_schedule,
we have to wait also for the __QDISC_STATE_SCHED bit to clear as
well.
Signed-off-by: David S. Miller <davem@davemloft.net>
Jarek Poplawski [Wed, 13 Aug 2008 22:16:43 +0000 (15:16 -0700)]
pkt_sched: Fix oops in htb_delete.
Recent changes introduced a bug in htb_delete(): cl->parent->children
counter update misses checking cl->parent for NULL, which is used for
root classes, so deleting them causes an oops.
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Andrew Gallatin [Wed, 13 Aug 2008 22:16:00 +0000 (15:16 -0700)]
pktgen: prevent pktgen from using bad tx queue
With the new multi-queue transmit code, it is possible to accidentally
make pktgen pick a non-existing tx queue simply by using a stale
script to drive pktgen. Access to this non-existing tx queue will
then trigger a bad memory access and kill the machine.
For example, setting "queue_map_max 2" will cause my machine to die
when accessing a garbage spinlock in the non-existing tx queue:
BUG: spinlock bad magic on CPU#0, kpktgend_0/564
lock:
ffff88001ddf6718, .magic:
ffffffff, .owner: /-1, .owner_cpu: 0
Pid: 564, comm: kpktgend_0 Not tainted 2.6.27-rc3 #35
Call Trace:
[<
ffffffff803a1228>] spin_bug+0xa4/0xac
[<
ffffffff803a1253>] _raw_spin_lock+0x23/0x123
[<
ffffffff8055b06f>] _spin_lock_bh+0x17/0x1b
[<
ffffffff804cb57d>] pktgen_thread_worker+0xa97/0x1002
[<
ffffffff8022874d>] ? finish_task_switch+0x38/0x97
[<
ffffffff80242077>] ? autoremove_wake_function+0x0/0x36
[<
ffffffff80242077>] ? autoremove_wake_function+0x0/0x36
[<
ffffffff804caae6>] ? pktgen_thread_worker+0x0/0x1002
[<
ffffffff80241a40>] kthread+0x44/0x6d
[<
ffffffff8020c399>] child_rip+0xa/0x11
[<
ffffffff802419fc>] ? kthread+0x0/0x6d
[<
ffffffff8020c38f>] ? child_rip+0x0/0x11
The attached patch adds some sanity checking to prevent
these sorts of configuration errors.
Signed-off-by: Andrew Gallatin <gallatin@myri.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Arnaldo Carvalho de Melo [Wed, 13 Aug 2008 20:48:39 +0000 (13:48 -0700)]
dccp: change L/R must have at least one byte in the dccpsf_val field
Thanks to Eugene Teo for reporting this problem.
Signed-off-by: Eugene Teo <eugenete@kernel.sg>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Jean-Christophe DUBOIS [Wed, 13 Aug 2008 20:35:37 +0000 (13:35 -0700)]
xfrm: remove unnecessary variable in xfrm_output_resume() 2nd try
Small fix removing an unnecessary intermediate variable.
Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Jamal Hadi Salim [Wed, 13 Aug 2008 09:41:45 +0000 (02:41 -0700)]
net-sched: fix Action flushing return code
Flushing must consistently return ENOMEM on failure of any allocation
Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
Jamal Hadi Salim [Wed, 13 Aug 2008 09:41:22 +0000 (02:41 -0700)]
net-sched: Fix actions flushing
Flushing of actions has been broken since we changed
the semantics of netlink parsed tb[X] to mean X is an attribute type.
This makes the flushing work.
Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
Julien Brunel [Wed, 13 Aug 2008 09:40:48 +0000 (02:40 -0700)]
net/rxrpc: Use an IS_ERR test rather than a NULL test
In case of error, the function rxrpc_get_transport returns an ERR
pointer, but never returns a NULL pointer. So after a call to this
function, a NULL test should be replaced by an IS_ERR test.
A simplified version of the semantic patch that makes this change is
as follows:
(http://www.emn.fr/x-info/coccinelle/)
// <smpl>
@correct_null_test@
expression x,E;
statement S1, S2;
@@
x = rxrpc_get_transport(...)
<... when != x = E
if (
(
- x@p2 != NULL
+ ! IS_ERR ( x )
|
- x@p2 == NULL
+ IS_ERR( x )
)
)
S1
else S2
...>
? x = E;
// </smpl>
Signed-off-by: Julien Brunel <brunel@diku.dk>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Jamal Hadi Salim [Wed, 13 Aug 2008 09:39:56 +0000 (02:39 -0700)]
wext: Send name on events
In the minimal the wireless extensions oughta send at least
the name in addition to the ifindex.
Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
Rami Rosen [Wed, 13 Aug 2008 09:35:39 +0000 (02:35 -0700)]
ipv6: Kill unused ip6_prohibit_entry and ip6_blk_hole_entry declarations.
This patch removes ip6_prohibit_entry and ip6_blk_hole_entry
declarations from include/net/ip6_route.h as they are unused.
Signed-off-by: Rami Rosen <ramirose@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Rami Rosen [Wed, 13 Aug 2008 09:34:39 +0000 (02:34 -0700)]
ipv6: ip6_route.h cleanup.
This patch removes rt6_lock declaration from include/net/ip6_route.h
as it is unused.
Signed-off-by: Rami Rosen <ramirose@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Andrew Morton [Wed, 13 Aug 2008 09:32:06 +0000 (02:32 -0700)]
net/tipc/subscr.c: don't use ___constant_swab32
It's an internal implementation detail which we _should_ be free to change.
So we did, and it promptly broke.
The compiler shold be able to work out when to use the __constant version
anyway.
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Wed, 13 Aug 2008 09:13:34 +0000 (02:13 -0700)]
pkt_sched: Add queue stopped test back to qdisc_run().
Based upon a bug report by Andrew Gallatin on netdev
with subject "CPU utilization increased in 2.6.27rc"
In commit
37437bb2e1ae8af470dfcd5b4ff454110894ccaf
("pkt_sched: Schedule qdiscs instead of netdev_queue.")
the test of the queue being stopped was erroneously
removed from qdisc_run().
When the TX queue of the device fills up, this omission
causes lots of extraneous useless work to be queued up
to softirq context, where we'll just return immediately
because the device is still stuffed up.
Signed-off-by: David S. Miller <davem@davemloft.net>
Brian Haley [Wed, 13 Aug 2008 08:58:57 +0000 (01:58 -0700)]
ipv6: Fix OOPS, ip -f inet6 route get fec0::1, linux-2.6.26, ip6_route_output, rt6_fill_node+0x175
Alexey Dobriyan wrote:
> On Thu, Aug 07, 2008 at 07:00:56PM +0200, John Gumb wrote:
>> Scenario: no ipv6 default route set.
>
>> # ip -f inet6 route get fec0::1
>>
>> BUG: unable to handle kernel NULL pointer dereference at
00000000
>> IP: [<
c0369b85>] rt6_fill_node+0x175/0x3b0
>> EIP is at rt6_fill_node+0x175/0x3b0
>
> 0xffffffff80424dd3 is in rt6_fill_node (net/ipv6/route.c:2191).
> 2186 } else
> 2187 #endif
> 2188 NLA_PUT_U32(skb, RTA_IIF, iif);
> 2189 } else if (dst) {
> 2190 struct in6_addr saddr_buf;
> 2191 ====> if (ipv6_dev_get_saddr(ip6_dst_idev(&rt->u.dst)->dev,
> ^^^^^^^^^^^^^^^^^^^^^^^^
> NULL
>
> 2192 dst, 0, &saddr_buf) == 0)
> 2193 NLA_PUT(skb, RTA_PREFSRC, 16, &saddr_buf);
> 2194 }
The commit that changed this can't be reverted easily, but the patch
below works for me.
Fix NULL de-reference in rt6_fill_node() when there's no IPv6 input
device present in the dst entry.
Signed-off-by: Brian Haley <brian.haley@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Gerrit Renker [Tue, 12 Aug 2008 01:17:17 +0000 (18:17 -0700)]
skbuff: Code readability NiT
Inserting a space between the `-' improved the C readability (some languages
allow hyphens within functions and variable names, which is confusing).
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Jarek Poplawski [Tue, 12 Aug 2008 01:11:06 +0000 (18:11 -0700)]
pkt_sched: Add BH protection for qdisc_stab_lock.
Since qdisc_stab_lock is used in qdisc_put_stab(), which is called in
BH context from __qdisc_destroy() RCU callback, softirq safe locking
is needed.
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Tue, 12 Aug 2008 01:04:35 +0000 (18:04 -0700)]
Merge branch 'stealer/ipvs/for-davem' of git://git.stealer.net/linux-2.6
Simon Horman [Mon, 11 Aug 2008 21:33:40 +0000 (14:33 -0700)]
ipvs: add lvs-devel as a list contact
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Simon Horman [Mon, 11 Aug 2008 07:19:14 +0000 (17:19 +1000)]
ipvs: Explictly clear ip_vs_stats members
In order to align the coding styles of ip_vs_zero_stats() and
its child-function ip_vs_zero_estimator(), clear ip_vs_stats
members explicitlty rather than doing a limited memset().
This was chosen over modifying ip_vs_zero_estimator() to use
memset() as it is more robust against changes in members
in the relevant structures. memset() would be prefered if
all members of the structure were to be cleared.
Cc: Sven Wegener <sven.wegener@stealer.net>
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
Sven Wegener [Sun, 10 Aug 2008 18:24:41 +0000 (18:24 +0000)]
ipvs: No need to zero out ip_vs_stats during initialization
It's a global variable and automatically initialized to zero. And now we can
also initialize the lock at compile time.
Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
Acked-by: Simon Horman <horms@verge.net.au>
Sven Wegener [Sun, 10 Aug 2008 18:24:41 +0000 (18:24 +0000)]
ipvs: Embed estimator object into stats object
There's no reason for dynamically allocating an estimator object for every
stats object. Directly embed an estimator object into every stats object and
switch to using the kernel-provided list implementation. This makes the code
much simpler and faster, as we do not need to traverse the list of all
estimators to find the one belonging to a stats object. There's no need to use
an rwlock, as we only have one reader. Also reorder the members of the
estimator structure slightly to avoid padding overhead. This can't be done
with the stats object as the members are currently copied to our user space
object via memcpy() and changing it would break ABI.
Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
Acked-by: Simon Horman <horms@verge.net.au>
Sven Wegener [Sun, 10 Aug 2008 18:24:40 +0000 (18:24 +0000)]
ipvs: Mark net_vs_ctl_path const
Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
Acked-by: Simon Horman <horms@verge.net.au>
Sven Wegener [Sun, 10 Aug 2008 18:24:35 +0000 (18:24 +0000)]
ipvs: Annotate init functions with __init
Being able to discard these functions saves a couple of bytes at runtime. The
cleanup functions can't be annotated with __exit as they are also called from
init functions.
Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
Acked-by: Simon Horman <horms@verge.net.au>
Sven Wegener [Sun, 10 Aug 2008 09:18:02 +0000 (09:18 +0000)]
ipvs: Initialize schedulers' struct list_head at compile time
No need to do it at runtime and this saves a couple of bytes in the text
section.
Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
Acked-by: Simon Horman <horms@verge.net.au>
Sven Wegener [Sun, 10 Aug 2008 09:18:02 +0000 (09:18 +0000)]
ipvs: Use list_empty() instead of open-coding the same functionality
Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
Acked-by: Simon Horman <horms@verge.net.au>
Sven Wegener [Sun, 10 Aug 2008 09:18:01 +0000 (09:18 +0000)]
ipvs: Use ARRAY_SIZE()
Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
Acked-by: Simon Horman <horms@verge.net.au>
Sven Wegener [Sun, 10 Aug 2008 09:17:59 +0000 (09:17 +0000)]
ipvs: Fix possible deadlock in estimator code
There is a slight chance for a deadlock in the estimator code. We can't call
del_timer_sync() while holding our lock, as the timer might be active and
spinning for the lock on another cpu. Work around this issue by using
try_to_del_timer_sync() and releasing the lock. We could actually delete the
timer outside of our lock, as the add and kill functions are only every called
from userspace via [gs]etsockopt() and are serialized by a mutex, but better
make this explicit.
Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
Cc: stable <stable@kernel.org>
Acked-by: Simon Horman <horms@verge.net.au>
Sven Wegener [Sun, 10 Aug 2008 09:14:05 +0000 (09:14 +0000)]
ipvs: Fix possible deadlock in sync code
Commit
998e7a76804b7a273a0460c2cdd5a51fa9856717 ("ipvs: Use kthread_run()
instead of doing a double-fork via kernel_thread()") introduced a possible
deadlock in the sync code. We need to use the _bh versions for the lock, as the
lock is also accessed from a bottom half.
Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
Acked-by: Simon Horman <horms@verge.net.au>
Herbert Xu [Sat, 9 Aug 2008 07:35:05 +0000 (00:35 -0700)]
udp: Drop socket lock for encapsulated packets
The socket lock is there to protect the normal UDP receive path.
Encapsulation UDP sockets don't need that protection. In fact
the locking is deadly for them as they may contain another UDP
packet within, possibly with the same addresses.
Also the nested bit was copied from TCP. TCP needs it because
of accept(2) spawning sockets. This simply doesn't apply to UDP
so I've removed it.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Sat, 9 Aug 2008 06:23:39 +0000 (23:23 -0700)]
pkt_sched: Fix ingress deletion and filter attachment.
Based upon bug reports by Stephen Hemminger.
We still had some cases using ->qdisc instead of ->qdisc_sleeping.
Also, qdisc_lookup() should return ingress qdiscs.
Signed-off-by: David S. Miller <davem@davemloft.net>
Jamal Hadi Salim [Fri, 8 Aug 2008 03:37:22 +0000 (20:37 -0700)]
pkt_sched: Fix actions referencing
When an action is added several times with the same exact index
it gets deleted on every even-numbered attempt.
This fixes that issue.
Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
Randy Dunlap [Fri, 8 Aug 2008 03:33:19 +0000 (20:33 -0700)]
bnx2x: fix logical op
Fix dubious logical operation that was found by sparse:
linux-next-
20080807/drivers/net/bnx2x_main.c:7205:27: warning: dubious: !x & y
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Fri, 8 Aug 2008 03:28:46 +0000 (20:28 -0700)]
Merge branch 'master' of git://git./linux/kernel/git/holtmann/bluetooth-2.6
Adam Langley [Fri, 8 Aug 2008 03:27:45 +0000 (20:27 -0700)]
tcp: (whitespace only) fix confusing indentation
The indentation in part of tcp_minisocks makes it look like one of the if
statements is much more important than it actually is.
Signed-off-by: Adam Langley <agl@imperialviolet.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Fri, 8 Aug 2008 03:26:40 +0000 (20:26 -0700)]
pkt_sched: Fix qdisc config when link is down.
Bug reported by Stephen Hemminger.
We need to fetch the root from ->qdisc_sleeping not ->qdisc.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Fri, 8 Aug 2008 01:52:57 +0000 (18:52 -0700)]
Merge branch 'ath9k' of git://git./linux/kernel/git/linville/wireless-2.6
Marcel Holtmann [Thu, 7 Aug 2008 20:26:56 +0000 (22:26 +0200)]
[Bluetooth] Add full quirk implementation for btusb driver
This implements all the quirk handling from the hci_usb driver to the
new btusb driver.
Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Marcel Holtmann [Thu, 7 Aug 2008 20:26:55 +0000 (22:26 +0200)]
[Bluetooth] Removal of unnecessary ignore module parameter
This removes the unnecessary ignore parameter, which is useless. There
are alternate methods of kicking a driver off an USB device.
Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Marcel Holtmann [Thu, 7 Aug 2008 20:26:54 +0000 (22:26 +0200)]
[Bluetooth] Add parameters to control BNEP header compression
The Bluetooth qualification for PAN demands testing with BNEP header
compression disabled. This is actually pretty stupid and the Linux
implementation outsmarts the test system since it compresses whenever
possible. So to pass qualification two need parameters have been added
to control the compression of source and destination headers.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Sujith [Thu, 7 Aug 2008 05:24:57 +0000 (10:54 +0530)]
ath9k: Revamp wireless mode usage
Use a single enum for managing modes, store supported modes by
the HW in a bitmask.
Register legacy rates with mac80211 only at init.
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith [Thu, 7 Aug 2008 05:24:33 +0000 (10:54 +0530)]
ath9k: More unused macros
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith [Thu, 7 Aug 2008 05:24:07 +0000 (10:54 +0530)]
ath9k: Remove a few unused macros and fix indentation
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith [Thu, 7 Aug 2008 05:23:39 +0000 (10:53 +0530)]
ath9k: Use mac80211's band macros and remove enum hal_freq_band
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith [Thu, 7 Aug 2008 05:23:10 +0000 (10:53 +0530)]
ath9k: Remove redundant data structure ath9k_txq_info
Use ath9k_tx_queue_info which contains the same elements,
and merge get/set functions of tx queue properties.
Also, fix whitespace damage in struct ath_softc.
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Sujith [Thu, 7 Aug 2008 05:22:38 +0000 (10:52 +0530)]
ath9k: Cleanup data structures related to HW capabilities
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Adrian Bunk [Tue, 5 Aug 2008 19:06:51 +0000 (22:06 +0300)]
ath9k: work around gcc ICEs
This patch works around an internal compiler error (gcc bug #37014) in
all gcc 4.2 compilers and the gcc 4.3 series up to at least 4.3.1
on at least powerpc and mips.
Many thanks to Andrew Pinski for analyzing the gcc bug.
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luis R. Rodriguez [Mon, 4 Aug 2008 07:16:41 +0000 (00:16 -0700)]
ath9k: Add new Atheros IEEE 802.11n driver
This adds the new mac80211 11n ath9k Atheros driver. Only STA support
is currently enabled and tested.
Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Jack Howarth <howarth@bromo.msbb.uc.edu>
Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luis R. Rodriguez [Mon, 4 Aug 2008 07:16:40 +0000 (00:16 -0700)]
ath5k: remove Atheros 11n devices from supported list
Remove Atheros 11n devices from being claimed by ath5k as its
now handled by ath9k.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luis R. Rodriguez [Wed, 6 Aug 2008 20:28:54 +0000 (13:28 -0700)]
list.h: add list_cut_position()
This adds list_cut_position() which lets you cut a list into
two lists given a pivot in the list.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luis R. Rodriguez [Wed, 6 Aug 2008 22:21:26 +0000 (15:21 -0700)]
list.h: Add list_splice_tail() and list_splice_tail_init()
If you are using linked lists for queues list_splice() will not do what
you would expect even if you use the elements passed reversed. We need
to handle these differently. We add list_splice_tail() and
list_splice_tail_init().
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Christian Lamparter [Thu, 7 Aug 2008 08:22:28 +0000 (10:22 +0200)]
p54: swap short slot time dcf values
these "magic" values must to be the other way round...
Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Ivo van Doorn [Wed, 6 Aug 2008 14:18:31 +0000 (16:18 +0200)]
rt2x00: Block all unsupported modes
It was possible for unsupported operating modes
to be accepted by the add_interface callback function.
This patch will block those modes until proper support
has been implemented for them.
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luis Carlos Cobo [Wed, 6 Aug 2008 11:17:54 +0000 (13:17 +0200)]
mac80211: keep mesh ifaces in allmulti mode
Currently a mesh node will not forward a multicast frame if it is not subscribed
to the specific multicast address. This patch addresses the issue and fixes mesh
multicast forwarding.
Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luis Carlos Cobo [Tue, 5 Aug 2008 17:34:52 +0000 (19:34 +0200)]
mac80211: fix use of skb->cb for mesh forwarding
Now we deal with mesh forwarding before the 802.11->802.3 conversion, thus
eliminating a few unnecessary steps. The next hop lookup is called from
ieee80211_master_start_xmit() instead of subif_start_xmit(). Until the next hop
is found, RA in the frame will be all zeroes for frames originating from the
device. For forwarded frames, RA will contain the TA of the received frame,
which will be necessary to send a path error if a next hop is not found.
Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Larry Finger [Tue, 5 Aug 2008 16:23:16 +0000 (11:23 -0500)]
p54: Fix for TX sequence number problem
Following "mac80211: fix TX sequence numbers", if a packet
has the IEEE80211_TX_CTL_ASSIGN_SEQ assigned, a sequence number must be
supplied, either by hardware or software. AFAIK, no such hardware exists
for the p54, thus it must be done in software. With this patch, a connection
qith p54usb is stable, whereas the interface went off-line in 2-3 hours
without this change. Note that this code will have to be reworked for proper
sequence numbers on beacons. In addition, the sequence number has been placed
in the hardware state, not the vif state.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Tomas Winkler [Mon, 4 Aug 2008 08:00:44 +0000 (16:00 +0800)]
iwlwifi: cleanup iwl_tx_skb
This patch cleans up iwl_tx_skb function.
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Robert Olsson [Thu, 7 Aug 2008 09:23:01 +0000 (02:23 -0700)]
pktgen: multiqueue etc.
Sofar far pktgen have had a restriction to only use one device per kernel
thread. With the new multiqueue architecture this is no longer adequate.
The patch below is an effort to remove this by in pktgen configuration
adding a tag to the device name a la eth0@0 etc. The tag is used for
usual device config just as before. Also a new flag is introduced to mirror
queue_map with sending threads smp_processor_id() QUEUE_MAP_CPU.
An example: We use 4 CPU's to send to one 10g interface (eth0)
and we use the new tagging to send a mix of packet sizes, 64, 576 and
1500 bytes. Also we use TX queues according to smp_processor_id()
PGDEV=/proc/net/pktgen/kpktgend_0
pgset "add_device eth0@0"
PGDEV=/proc/net/pktgen/kpktgend_1
pgset "add_device eth0@1"
PGDEV=/proc/net/pktgen/kpktgend_2
pgset "add_device eth0@2"
PGDEV=/proc/net/pktgen/kpktgend_3
pgset "add_device eth0@3"
....
PGDEV=/proc/net/pktgen/eth0@0
pgset "pkt_size 64"
pgset "flag QUEUE_MAP_CPU"
PGDEV=/proc/net/pktgen/eth0@1
pgset "pkt_size 572"
pgset "flag QUEUE_MAP_CPU"
PGDEV=/proc/net/pktgen/eth0@2
pgset "pkt_size 1496"
PGDEV=/proc/net/pktgen/eth0@3
pgset "pkt_size 1496"
pgset "flag QUEUE_MAP_CPU"
Signed-off-by: Robert Olsson <robert.olsson@its.uu.se>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Thu, 7 Aug 2008 09:10:27 +0000 (02:10 -0700)]
Merge branch 'upstream-davem' of /linux/kernel/git/jgarzik/netdev-2.6
Jeff Garzik [Thu, 7 Aug 2008 08:05:46 +0000 (04:05 -0400)]
Merge branch 'for-jeff' of git://git./linux/kernel/git/chris/linux-2.6 into tmp
Krzysztof Halasa [Mon, 30 Jun 2008 20:09:15 +0000 (22:09 +0200)]
WAN: remove extra help text from HDLC_PPP config option
Remove extra help text from HDLC_PPP config option.
Signed-off-by: Krzysztof HaĆasa <khc@pm.waw.pl>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Joe Eykholt [Thu, 3 Jul 2008 01:22:02 +0000 (18:22 -0700)]
net/core: Allow receive on active slaves.
If a packet_type specifies an active slave to bonding and not just any
interface, allow it to receive frames that came in on that interface.
Signed-off-by: Joe Eykholt <jre@nuovasystems.com>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Joe Eykholt [Thu, 3 Jul 2008 01:22:01 +0000 (18:22 -0700)]
net/core: Allow certain receives on inactive slave.
Allow a packet_type that specifies the exact device to receive
even on an inactive bonding slave devices. This is important for some
L2 protocols such as LLDP and FCoE. This can eventually be used
for the bonding special cases as well.
Signed-off-by: Joe Eykholt <jre@nuovasystems.com>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Joe Eykholt [Thu, 3 Jul 2008 01:22:00 +0000 (18:22 -0700)]
net/core: Uninline skb_bond().
Otherwise subsequent changes need multiple return values.
Signed-off-by: Joe Eykholt <jre@nuovasystems.com>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Moni Shoua [Thu, 3 Jul 2008 01:21:59 +0000 (18:21 -0700)]
bonding: Don't destroy bonding master when removing slave via sysfs
It is wrong to destroy a bonding master from a context that uses the sysfs
of that bond. When last IPoIB slave is unenslaved from by writing to a
sysfs file (for bond0 this would be /sys/class/net/bond0/bonding/slaves)
the driver tries to destroy the bond. This is wrong and can lead to a
lockup or a crash. This fix lets the bonding master stay and relies on
the user to destroy the bonding master if necessary (i.e. before module
ib_ipoib is unloaded)
This patch affects only bonds of IPoIB slaves. Ethernet slaves stay
unaffected.
Signed-off-by: Moni Shoua <monis@voltaire.com>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Jay Vosburgh [Thu, 3 Jul 2008 01:21:58 +0000 (18:21 -0700)]
bonding: refactor mii monitor
Refactor mii monitor. As with the previous ARP monitor refactor,
the motivation for this is to handle locking rationally (in this case,
removing conditional locking) and generally clean up the code.
This patch breaks up the monolithic mii monitor into two phases:
an inspection phase, followed by an optional commit phase. The commit phase
is the only portion that requires RTNL or makes changes to state, and is
only called when inspection finds something to change.
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Gui Jianfeng [Thu, 7 Aug 2008 06:50:04 +0000 (23:50 -0700)]
tcp: Fix kernel panic when calling tcp_v(4/6)_md5_do_lookup
If the following packet flow happen, kernel will panic.
MathineA MathineB
SYN
---------------------->
SYN+ACK
<----------------------
ACK(bad seq)
---------------------->
When a bad seq ACK is received, tcp_v4_md5_do_lookup(skb->sk, ip_hdr(skb)->daddr))
is finally called by tcp_v4_reqsk_send_ack(), but the first parameter(skb->sk) is
NULL at that moment, so kernel panic happens.
This patch fixes this bug.
OOPS output is as following:
[ 302.812793] IP: [<
c05cfaa6>] tcp_v4_md5_do_lookup+0x12/0x42
[ 302.817075] Oops: 0000 [#1] SMP
[ 302.819815] Modules linked in: ipv6 loop dm_multipath rtc_cmos rtc_core rtc_lib pcspkr pcnet32 mii i2c_piix4 parport_pc i2c_core parport ac button ata_piix libata dm_mod mptspi mptscsih mptbase scsi_transport_spi sd_mod scsi_mod crc_t10dif ext3 jbd mbcache uhci_hcd ohci_hcd ehci_hcd [last unloaded: scsi_wait_scan]
[ 302.849946]
[ 302.851198] Pid: 0, comm: swapper Not tainted (2.6.27-rc1-guijf #5)
[ 302.855184] EIP: 0060:[<
c05cfaa6>] EFLAGS:
00010296 CPU: 0
[ 302.858296] EIP is at tcp_v4_md5_do_lookup+0x12/0x42
[ 302.861027] EAX:
0000001e EBX:
00000000 ECX:
00000046 EDX:
00000046
[ 302.864867] ESI:
ceb69e00 EDI:
1467a8c0 EBP:
cf75f180 ESP:
c0792e54
[ 302.868333] DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068
[ 302.871287] Process swapper (pid: 0, ti=
c0792000 task=
c0712340 task.ti=
c0746000)
[ 302.875592] Stack:
c06f413a 00000000 cf75f180 ceb69e00 00000000 c05d0d86 000016d0 ceac5400
[ 302.883275]
c05d28f8 000016d0 ceb69e00 ceb69e20 681bf6e3 00001000 00000000 0a67a8c0
[ 302.890971]
ceac5400 c04250a3 c06f413a c0792eb0 c0792edc cf59a620 cf59a620 cf59a634
[ 302.900140] Call Trace:
[ 302.902392] [<
c05d0d86>] tcp_v4_reqsk_send_ack+0x17/0x35
[ 302.907060] [<
c05d28f8>] tcp_check_req+0x156/0x372
[ 302.910082] [<
c04250a3>] printk+0x14/0x18
[ 302.912868] [<
c05d0aa1>] tcp_v4_do_rcv+0x1d3/0x2bf
[ 302.917423] [<
c05d26be>] tcp_v4_rcv+0x563/0x5b9
[ 302.920453] [<
c05bb20f>] ip_local_deliver_finish+0xe8/0x183
[ 302.923865] [<
c05bb10a>] ip_rcv_finish+0x286/0x2a3
[ 302.928569] [<
c059e438>] dev_alloc_skb+0x11/0x25
[ 302.931563] [<
c05a211f>] netif_receive_skb+0x2d6/0x33a
[ 302.934914] [<
d0917941>] pcnet32_poll+0x333/0x680 [pcnet32]
[ 302.938735] [<
c05a3b48>] net_rx_action+0x5c/0xfe
[ 302.941792] [<
c042856b>] __do_softirq+0x5d/0xc1
[ 302.944788] [<
c042850e>] __do_softirq+0x0/0xc1
[ 302.948999] [<
c040564b>] do_softirq+0x55/0x88
[ 302.951870] [<
c04501b1>] handle_fasteoi_irq+0x0/0xa4
[ 302.954986] [<
c04284da>] irq_exit+0x35/0x69
[ 302.959081] [<
c0405717>] do_IRQ+0x99/0xae
[ 302.961896] [<
c040422b>] common_interrupt+0x23/0x28
[ 302.966279] [<
c040819d>] default_idle+0x2a/0x3d
[ 302.969212] [<
c0402552>] cpu_idle+0xb2/0xd2
[ 302.972169] =======================
[ 302.974274] Code: fc ff 84 d2 0f 84 df fd ff ff e9 34 fe ff ff 83 c4 0c 5b 5e 5f 5d c3 90 90 57 89 d7 56 53 89 c3 50 68 3a 41 6f c0 e8 e9 55 e5 ff <8b> 93 9c 04 00 00 58 85 d2 59 74 1e 8b 72 10 31 db 31 c9 85 f6
[ 303.011610] EIP: [<
c05cfaa6>] tcp_v4_md5_do_lookup+0x12/0x42 SS:ESP 0068:
c0792e54
[ 303.018360] Kernel panic - not syncing: Fatal exception in interrupt
Signed-off-by: Gui Jianfeng <guijianfeng@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Thu, 7 Aug 2008 06:35:59 +0000 (23:35 -0700)]
pkt_sched: Fix "parent is root" test in qdisc_create().
As noticed by Stephen Hemminger, the root qdisc is denoted by
TC_H_ROOT, not zero.
Signed-off-by: David S. Miller <davem@davemloft.net>