22 Jan, 2011
1 commit
-
copy_to_user() used PRIV(dev)->stats instead of local stats variable.
Zero stats were returned to user in case of (zero != 0), also memcpy()
was pointless.Signed-off-by: Vasiliy Kulikov
Signed-off-by: David S. Miller
21 Jan, 2011
3 commits
-
In commit 44b8288308ac9d (net_sched: pfifo_head_drop problem), we fixed
a problem with pfifo_head drops that incorrectly decreased
sch->bstats.bytes and sch->bstats.packetsSeveral qdiscs (CHOKe, SFQ, pfifo_head, ...) are able to drop a
previously enqueued packet, and bstats cannot be changed, so
bstats/rates are not accurate (over estimated)This patch changes the qdisc_bstats updates to be done at dequeue() time
instead of enqueue() time. bstats counters no longer account for dropped
frames, and rates are more correct, since enqueue() bursts dont have
effect on dequeue() rate.Signed-off-by: Eric Dumazet
Acked-by: Stephen Hemminger
Signed-off-by: David S. Miller -
Recently reported oops:
kernel BUG at net/core/skbuff.c:813!
invalid opcode: 0000 [#1] SMP
last sysfs file: /sys/devices/virtual/net/bond0/broadcast
CPU 8
Modules linked in: sit tunnel4 cpufreq_ondemand acpi_cpufreq freq_table bonding
ipv6 dm_mirror dm_region_hash dm_log cdc_ether usbnet mii serio_raw i2c_i801
i2c_core iTCO_wdt iTCO_vendor_support shpchp ioatdma i7core_edac edac_core bnx2
ixgbe dca mdio sg ext4 mbcache jbd2 sd_mod crc_t10dif mptsas mptscsih mptbase
scsi_transport_sas dm_mod [last unloaded: microcode]Modules linked in: sit tunnel4 cpufreq_ondemand acpi_cpufreq freq_table bonding
ipv6 dm_mirror dm_region_hash dm_log cdc_ether usbnet mii serio_raw i2c_i801
i2c_core iTCO_wdt iTCO_vendor_support shpchp ioatdma i7core_edac edac_core bnx2
ixgbe dca mdio sg ext4 mbcache jbd2 sd_mod crc_t10dif mptsas mptscsih mptbase
scsi_transport_sas dm_mod [last unloaded: microcode]
Pid: 0, comm: swapper Not tainted 2.6.32-71.el6.x86_64 #1 BladeCenter HS22
-[7870AC1]-
RIP: 0010:[] []
pskb_expand_head+0x36/0x1e0
RSP: 0018:ffff880028303b70 EFLAGS: 00010202
RAX: 0000000000000002 RBX: ffff880c6458ec80 RCX: 0000000000000020
RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff880c6458ec80
RBP: ffff880028303bc0 R08: ffffffff818a6180 R09: ffff880c6458ed64
R10: ffff880c622b36c0 R11: 0000000000000400 R12: 0000000000000000
R13: 0000000000000180 R14: ffff880c622b3000 R15: 0000000000000000
FS: 0000000000000000(0000) GS:ffff880028300000(0000) knlGS:0000000000000000
CS: 0010 DS: 0018 ES: 0018 CR0: 000000008005003b
CR2: 00000038653452a4 CR3: 0000000001001000 CR4: 00000000000006e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process swapper (pid: 0, threadinfo ffff8806649c2000, task ffff880c64f16ab0)
Stack:
ffff880028303bc0 ffffffff8104fff9 000000000000001c 0000000100000000
ffff880000047d80 ffff880c6458ec80 000000000000001c ffff880c6223da00
ffff880c622b3000 0000000000000000 ffff880028303c10 ffffffff81407f7a
Call Trace:[] ? __wake_up_common+0x59/0x90
[] __pskb_pull_tail+0x2aa/0x360
[] bond_arp_rcv+0x2c0/0x2e0 [bonding]
[] ? packet_rcv+0x377/0x440
[] netif_receive_skb+0x2db/0x670
[] napi_skb_finish+0x58/0x70
[] napi_gro_receive+0x39/0x50
[] ixgbe_clean_rx_irq+0x35b/0x900 [ixgbe]
[] ixgbe_clean_rxtx_many+0x136/0x240 [ixgbe]
[] net_rx_action+0x103/0x210
[] __do_softirq+0xb7/0x1e0
[] ? handle_IRQ_event+0x60/0x170
[] call_softirq+0x1c/0x30
[] do_softirq+0x65/0xa0
[] irq_exit+0x85/0x90
[] do_IRQ+0x75/0xf0
[] ret_from_intr+0x0/0x11
[] ? mwait_idle+0x71/0xd0
[] ? atomic_notifier_call_chain+0x1a/0x20
[] cpu_idle+0xb6/0x110
[] start_secondary+0x1fc/0x23fResulted from bonding driver registering packet handlers via dev_add_pack and
then trying to call pskb_may_pull. If another packet handler (like for AF_PACKET
sockets) gets called first, the delivered skb will have a user count > 1, which
causes pskb_may_pull to BUG halt when it does its skb_shared check. Fix this by
calling skb_share_check prior to the may_pull call sites in the bonding driver
to clone the skb when needed. Tested by myself and the reported successfully.Signed-off-by: Neil Horman
CC: Andy Gospodarek
CC: Jay Vosburgh
CC: "David S. Miller"
Signed-off-by: Jay Vosburgh
Signed-off-by: Andy Gospodarek
Signed-off-by: David S. Miller -
Currently tools like ip and ifconfig report incorrect state for cxgb4
interfaces that are up but do not have link and do so until first link
establishment. This is because the initial netif_carrier_off call is
before register_netdev and it needs to be after to be fully effective.
Fix this by moving netif_carrier_off into .ndo_open.Signed-off-by: Dimitris Michailidis
Signed-off-by: David S. Miller
20 Jan, 2011
3 commits
-
The option name of Delayed SACK Timer should be SCTP_DELAYED_SACK,
not SCTP_DELAYED_ACK.Left SCTP_DELAYED_ACK be concomitant with SCTP_DELAYED_SACK,
for making compatibility with existing applications.Reference:
8.1.19. Get or Set Delayed SACK Timer (SCTP_DELAYED_SACK)
(http://tools.ietf.org/html/draft-ietf-tsvwg-sctpsocket-25)Signed-off-by: Shan Wei
Acked-by: Wei Yongjun
Acked-by: Vlad Yasevich
Signed-off-by: David S. Miller -
commit 0363466866d901fbc (net offloading: Convert checksums to use
centrally computed features.) mistakenly swapped can_checksum_protocol()
arguments.This broke IPv6 on bnx2 for instance, on NIC without TCPv6 checksum
offloads.Reported-by: Hans de Bruin
Signed-off-by: Eric Dumazet
Acked-by: Jesse Gross
Signed-off-by: David S. Miller -
This reverts commit 0ab03c2b1478f2438d2c80204f7fef65b1bca9cf.
It breaks several things including the avahi daemon.
Signed-off-by: David S. Miller
19 Jan, 2011
17 commits
-
Just stumbled upon the issue while looking for another bug.
The code looks correct, the indentation is not.
Signed-off-by: Anton Vorontsov
Signed-off-by: David S. Miller -
sh_irda can not use RX/TX in same time,
but this driver didn't return to RX mode when TX error occurred.
This patch care xmit error case to solve this issue.Signed-off-by: Kuninori Morimoto
Signed-off-by: David S. Miller -
In netif_skb_features() we return only the features that are valid for vlans
if we have a vlan packet. However, we should not mask out NETIF_F_HW_VLAN_TX
since it enables transmission of vlan tags and is obviously valid.Reported-by: Eric Dumazet
Signed-off-by: Jesse Gross
Acked-by: Eric Dumazet
Signed-off-by: David S. Miller -
- tx_fixup() can be called from either timer callback or from xmit()
in usbnet, so spinlock is added to avoid concurrency-related problem.
- minor correction due to checkpatch warning for some line over 80
chars after previous patch was applied.Signed-off-by: Alexey Orishko
Signed-off-by: David S. Miller -
In drivers/net/ns83820.c::ns83820_init_one() we dynamically allocate
memory via alloc_etherdev(). We then call PRIV() on the returned storage
which is 'return netdev_priv()'. netdev_priv() takes the pointer it is
passed and adds 'ALIGN(sizeof(struct net_device), NETDEV_ALIGN)' to it and
returns it. Then we test the resulting pointer for NULL, which it is
unlikely to be at this point, and later dereference it. This will go bad
if alloc_etherdev() actually returned NULL.This patch reworks the code slightly so that we test for a NULL pointer
(and return -ENOMEM) directly after calling alloc_etherdev().Signed-off-by: Jesper Juhl
Signed-off-by: Benjamin LaHaise
Signed-off-by: David S. Miller -
When a network namespace is created (via CLONE_NEWNET), the loopback
interface is automatically added to the new namespace, triggering a
printk in ipv6_add_dev() if CONFIG_IPV6_PRIVACY is set.This is problematic for applications which use CLONE_NEWNET as
part of a sandbox, like Chromium's suid sandbox or recent versions of
vsftpd. On a busy machine, it can lead to thousands of useless
"lo: Disabled Privacy Extensions" messages appearing in dmesg.It's easy enough to check the status of privacy extensions via the
use_tempaddr sysctl, so just removing the printk seems like the most
sensible solution.Signed-off-by: Romain Francoise
Signed-off-by: David S. Miller -
Update bnx2x version to 1.62.00-4
Signed-off-by: Yaniv Rosner
Signed-off-by: Eilon Greenstein
Signed-off-by: David S. Miller -
Fix AER settings for BCM57712 to allow accessing all device addresses range in CL45 MDC/MDIO
Signed-off-by: Yaniv Rosner
Signed-off-by: Eilon Greenstein
Signed-off-by: David S. Miller -
Fix BCM84823 LED behavior which may show on some systems
Signed-off-by: Yaniv Rosner
Signed-off-by: Eilon Greenstein
Signed-off-by: David S. Miller -
Device may show incorrect duplex mode for devices with external PHY
Signed-off-by: Yaniv Rosner
Signed-off-by: Eilon Greenstein
Signed-off-by: David S. Miller -
Improve microcode loading verification before proceeding to next stage
Signed-off-by: Yaniv Rosner
Signed-off-by: Eilon Greenstein
Signed-off-by: David S. Miller -
LED on BCM57712+BCM8727 systems requires different settings
Signed-off-by: Yaniv Rosner
Signed-off-by: Eilon Greenstein
Signed-off-by: David S. Miller -
Common init used to be called by the driver when the first port comes up, mainly to reset and reload external PHY microcode.
However, in case management driver is active on the other port, traffic would halted. So limit the common init to be done only once after POR.Signed-off-by: Yaniv Rosner
Signed-off-by: Eilon Greenstein
Signed-off-by: David S. Miller -
Enable controlling BCM8073 PN polarity swap through nvm configuration, which is required in certain systems
Signed-off-by: Yaniv Rosner
Signed-off-by: Eilon Greenstein
Signed-off-by: David S. Miller -
When read valid tx/rx chains from EEPROM, there is a bug to use the
tx chain value for both tx and rx, the result of this cause low
receive throughput on 1x2 devices becuase rx will only utilize single
chain instead of two chainsSigned-off-by: Wey-Yi Guy
Signed-off-by: John W. Linville -
ath5k_reset must be called with sc->lock. Since the tx queue
watchdog runs in a workqueue and accesses sc, it's appropriate
to just take the lock over the whole function.Signed-off-by: Bob Copeland
Signed-off-by: John W. Linville
18 Jan, 2011
3 commits
-
The power detector adc offset calibration has to be done
on 4 minutes interval (longcal * pa_skip_count). But the commit
"ath9k_hw: fix a noise floor calibration related race condition"
makes the PA calibration executed more frequently beased on
nfcal_pending value. Running PAOffset calibration lesser than
longcal interval doesn't help anything and the worse part is that
it causes NF load timeouts and RX deaf conditions.In a very noisy environment, where the distance b/w AP & station
is ~10 meter and running a downlink udp traffic with frequent
background scan causes "Timeout while waiting for nf to load:
AR_PHY_AGC_CONTROL=0x40d1a" and moves the chip into deaf state.
This issue was originaly reported in Android platform where
the network-manager application does bgscan more frequently
on AR9271 chips. (AR9285 family usb device).Cc: stable@kernel.org
Signed-off-by: Vasanthakumar Thiagarajan
Signed-off-by: Rajkumar Manoharan
Signed-off-by: John W. Linville -
Signed-off-by: Rajkumar Manoharan
Signed-off-by: John W. Linville -
There is an interoperability with AR9382/AR9380 in L1 state with a
few root complexes which can cause a hang. This is fixed by
setting some work around bits on the PCIE PHY. We fix by using
a new ini array to modify these bits when the radio is idle.Cc: stable@kernel.org
Cc: Jack Lee
Cc: Carl Huang
Cc: David Quan
Cc: Nael Atallah
Cc: Sarvesh Shrivastava
Signed-off-by: Luis R. Rodriguez
Signed-off-by: John W. Linville
16 Jan, 2011
13 commits
-
In case of single tx and rx queues, three MSI-x vectors are allocated instead
of two. This patch fixes that.Signed-off-by: Shreyas N Bhatewara
Signed-off-by: David S. Miller -
Access to cmd register is racey, especially in smp environments. Protect
it using a spinlock.Signed-off-by: Matthieu Bucchianeri
Signed-off-by: Shreyas N Bhatewara
Signed-off-by: David S. Miller -
There is a small possibility of a race where the suspend routine gets
called, while a napi callback is still pending and when that comes up,
it enables interrupts which just got disabled in the suspend routine.
This change adds napi disable call in suspend and enable in resume to
avoid race.Signed-off-by: Shreyas N Bhatewara
Acked-by: Dmitry Torokhov
Signed-off-by: David S. Miller -
Show per-queue stats in ethtool -S output for vmxnet3 interface. Register dump
of ethtool should dump registers for all tx and rx queues.Signed-off-by: Shreyas N Bhatewara
Signed-off-by: David S. Miller -
This is a performance enhancement fix. vmxnet3 device performs better when
provided with at least 54 bytes (ethernet 14 + IP 20+ TCP 20) in the first SG
buffer. For UDP packets driver provides lesser than that in first sg. This
change fixes the same. Also avoid the redundant pskb_may_pull() call.Signed-off-by: Shreyas N Bhatewara
Signed-off-by: David S. Miller -
Make hw vlan tag stripping as enabled by default. Thereby remove
the code to conditionally enable it later.Signed-off-by: Guolin Yang
Signed-off-by: Shreyas N Bhatewara
Signed-off-by: David S. Miller -
While activating the device get it's MAC address from netdev. This will allow
the MAC address configured using ifconfig to persist through the reset.Signed-off-by: Shreyas N Bhatewara
Signed-off-by: David S. Miller -
Fix a bug while changing ring size when MTU is changed.
Signed-off-by: Shreyas N Bhatewara
Acked-by: Dmitry Torokhov
Signed-off-by: David S. Miller -
In the original code we check if (servl == NULL) twice. The first time
should print the message that cfmuxl_remove_uplayer() failed and set
"ret" correctly, but instead it just returns success. The second check
should be checking the value of "ret" instead of "servl".Signed-off-by: Dan Carpenter
Acked-by: Sjur Braendeland
Signed-off-by: David S. Miller -
This patch makes the CAN socket code conform to the manpage of sendmsg.
Signed-off-by: Kurt Van Dijck
Acked-by: Oliver Hartkopp
Signed-off-by: David S. Miller -
Some OSA level have a bug in the hw tx csum logic. We can circumvent
this bug by turning on IP hw csum also.Signed-off-by: Frank Blaschka
Signed-off-by: David S. Miller -
The open function of qeth is not executed if the qeth device is in
state DOWN or HARDSETUP. A recovery switches from state SOFTSETUP to
HARDSETUP to DOWN to HARDSETUP and back to SOFTSETUP. If open and
recover are running concurrently, open fails if it hits the states
HARDSETUP or DOWN. This patch inserts waiting for recovery finish
in the qeth open functions to enable successful qeth device opening
in spite of a running recovery.Signed-off-by: Ursula Braun
Signed-off-by: Frank Blaschka
Signed-off-by: David S. Miller