Don't want IRQ on FIFO error because there is nothing useful to do with it.
But do want IRQ on duplex change.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
This restores the previously removed netif_poll_enable call in e1000_open.
It's needed on all but the first call to e1000_open for a NIC as
e1000_close always calls netif_poll_disable.
netif_poll_enable can only be called safely if no polls have been
scheduled. This should be the case as long as we don't enter our IRQ
handler.
In order to guarantee this we explicitly disable IRQs as early as possible
when we're probing the NIC.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "Kok, Auke" <auke-jan.h.kok@intel.com>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
If ioremap_nocache() is unfortunate enough to fail, the error code is not
set correctly leading to a false success from dfx_register(). This change
fixes the problem.
Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Driver was reading value from one register, setting bit and then
writing the wrong register.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Driver was not correctly setting up transmit descriptor when doing
VLAN tag insertion with checksum offload.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
This code inherited from the sk98lin driver is incorrect on the Yukon2.
The GPHY_CTRL register values are specific to the internal PHY of the chip
and the values used were leftovers.
Driver was setting bit 13 which is now the INT polarity for the PHY!
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
The -rt patch triggered a lockdep warning in the amba serial drivers, which never
shows up on UP kernels. On SMP systems this would trigger as well.
Release the port lock before calling tty_flip_buffer_push() and reacquire it after
the call. This matches the code in the 8250 serial driver.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
We are currently using the ARMv6 operations but need to duplicate some
of the code because of the introduction of the new CPU barrier
instructions in ARMv7.
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This patch removes apparently unnecessary extern declarations in
coyote-pci.c and ixdpg425-pci.c within arch/arm/mach-ixp4xx and
has been compile-tested without producing warnings or errors.
Kernel coding style forbids the use of extern declarations within .c
files.
Signed-off-by: Michael-Luke Jones <mlj28@cam.ac.uk>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Fix the undeclared symbols sparse is warning about.
arch/arm/nwfpe/softfloat.c:1727:7: warning: symbol 'float64_to_uint32' was not declared. Should it be static?
arch/arm/nwfpe/softfloat.c:1753:7: warning: symbol 'float64_to_uint32_round_to_zero' was not declared. Should it be static?
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
The map_io function does not need to be exported
from this file, and therefore should be declared
static.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Fix sparse warnings in the arch/arm/mach-s3c2443/clock.c,
including an bug in initialising the cf clock initialiser
where two values are being set for the ctrlbit.
arch/arm/mach-s3c2443/clock.c:397:12: warning: symbol 'clk_usb_bus_host' was not declared. Should it be static?
arch/arm/mach-s3c2443/clock.c:760:4: error: Initializer entry defined twice
arch/arm/mach-s3c2443/clock.c:761:4: also defined here
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
The S3C2412 has an reset-errata where the clock
may cause a glitch switching back to EXTCLK. We
force a switch to EXTCLK before writing the
reset register to force use of the CLKCON sync
logic to properly switch.
Fix problem reported by Matthieu Castet.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Fix a error reported by newer versions of GCC.
error: static declaration of 'ks8695_reg' follows non-static declaration
Signed-off-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Fix lockdep warnings, caused by 'set_affinity' being called without
the correct locks taken and local interrupts disabled:
=================================
[ INFO: inconsistent lock state ]
2.6.22-rc2 #1
---------------------------------
inconsistent {in-hardirq-W} -> {hardirq-on-W} usage.
swapper/1 [HC0[0]:SC0[0]:HE1:SE1] takes:
(irq_controller_lock){++..}, at: [<c002be50>] gic_set_cpu+0x60/0xa0
{in-hardirq-W} state was registered at:
[<c005d9a8>] lock_acquire+0x58/0x6c
[<c0233068>] _spin_lock+0x40/0x50
[<c002c020>] gic_mask_irq+0x2c/0x6c
[<c0069c64>] handle_level_irq+0x11c/0x14c
[<c0020060>] asm_do_IRQ+0x60/0x84
[<c0020d2c>] __irq_svc+0x4c/0xc0
[<c000ed84>] __alloc_bootmem_nopanic+0x74/0x88
[<c000edb0>] __alloc_bootmem+0x18/0x3c
[<c000fa00>] alloc_large_system_hash+0x16c/0x200
[<c00108dc>] inode_init_early+0x5c/0xa4
[<c00106dc>] vfs_caches_init_early+0x24/0xa0
[<c0008e54>] start_kernel+0x220/0x2fc
[<00008078>] 0x8078
irq event stamp: 88438
hardirqs last enabled at (88438): [<c0020dc0>] preempt_return+0x20/0x2c
hardirqs last disabled at (88436): [<c00417bc>] __do_softirq+0xb0/0x138
softirqs last enabled at (88437): [<c0041810>] __do_softirq+0x104/0x138
softirqs last disabled at (88428): [<c0041d9c>] irq_exit+0x68/0x7c
other info that might help us debug this:
no locks held by swapper/1.
stack backtrace:
[<c0025ecc>] (dump_stack+0x0/0x14) from [<c005b1e4>] (print_usage_bug+0x138/0x168)
[<c005b0ac>] (print_usage_bug+0x0/0x168) from [<c005be80>] (mark_lock+0x484/0x6a0)
[<c005b9fc>] (mark_lock+0x0/0x6a0) from [<c005cc48>] (__lock_acquire+0x3c0/0x10c8)
[<c005c888>] (__lock_acquire+0x0/0x10c8) from [<c005d9a8>] (lock_acquire+0x58/0x6c)
[<c005d950>] (lock_acquire+0x0/0x6c) from [<c0233068>] (_spin_lock+0x40/0x50)
[<c0233028>] (_spin_lock+0x0/0x50) from [<c002be50>] (gic_set_cpu+0x60/0xa0)
[<c002bdf0>] (gic_set_cpu+0x0/0xa0) from [<c01b04cc>] (em_route_irq+0x38/0x40)
[<c01b0494>] (em_route_irq+0x0/0x40) from [<c01b04ec>] (em_setup+0x18/0xa4)
[<c01b04d4>] (em_setup+0x0/0xa4) from [<c001570c>] (oprofile_arch_init+0x24/0xe8)
[<c00156e8>] (oprofile_arch_init+0x0/0xe8) from [<c0015640>] (oprofile_init+0x1c/0x64)
[<c0015624>] (oprofile_init+0x0/0x64) from [<c0008a20>] (kernel_init+0x154/0x368)
[<c00088cc>] (kernel_init+0x0/0x368) from [<c003ef34>] (do_exit+0x0/0x904)
oprofile: using arm/mpcore
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Fix an oops in the stacktrace code, caused by improper range checking.
We subtract 12 off 'fp' before testing to see if it's below the low
bound. However, if 'fp' were zero before, it becomes a very large
positive number, causing this test to succeed where it should fail.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Use the newly introduced __used attribute in place of the deprecated
__attribute_used__. Functionally the same.
Signed-off-by: David Rientjes <rientjes@google.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Add data from zero-entropy random_writes directly to output pools to
avoid accounting difficulties on machines without entropy sources.
Tested on lguest with all entropy sources disabled.
Signed-off-by: Matt Mackall <mpm@selenic.com>
Acked-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/roland/infiniband:
IB/mlx4: Fix last allocated object tracking in bitmap allocator
IB/cm: Fix stale connection detection
IPoIB/cm: Fix performance regression on Mellanox
IB/mthca: Fix handling of send CQE with error for QPs connected to SRQ
get_next_timer_interrupt() returns a delta of (LONG_MAX > 1) in case
there is no timer pending. On 64 bit machines this results in a
multiplication overflow in tick_nohz_stop_sched_tick().
Reported by: Dave Miller <davem@davemloft.net>
Make the return value a constant and limit the return value to a 32 bit
value.
When the max timeout value is returned, we can safely stop the tick
timer device. The max jiffies delta results in a 12 days timeout for
HZ=1000.
In the long term the get_next_timer_interrupt() code needs to be
reworked to return ktime instead of jiffies, but we have to wait until
the last users of the original NO_IDLE_HZ code are converted.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Set last allocated object to the object after the one just allocated
before ORing in the extra top bits. Also handle the case where this
wraps around.
Signed-off-by: Roland Dreier <rolandd@cisco.com>
The ib_cm can incorrectly detect a stale connection (a new connection
request for a QPN that is already connected) as a duplicate connection
request. Separate the handling of potential duplicate REQs from stale
connections.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
commit 518b1646 ("IPoIB/cm: Fix SRQ WR leak") introduced a severe
performance regression on Mellanox cards, because keeping a QP in the
error state for extended periods of time moves hardware to the slow
path (until the QP is destroyed). For example, MPI latency goes from
~3 usecs to ~7 usecs.
Fix this by posting a send WR on one of the QPs that are being
flushed, instead of using a separate drain QP that is kept in the
error state.
This fixes bug <https://bugs.openfabrics.org/show_bug.cgi?id=636>,
reported and bisected by Scott Weitzenkamp at Cisco and debugged by
Sasha Mikheev at Voltaire.
Signed-off-by: Michael S. Tsirkin <mst@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
mthca_free_err_wqe() currently treats both send and receive CQEs
identically if a QP is using an SRQ. But for Tavor hardware, send
CQEs with error can be chained together even if the RQ is part of SRQ,
so we may miss some CQEs.
Fix by following the WQE chain for all send CQEs even for non-SRQ QPs.
This fixes crashes in IPoIB CM:
<https://bugs.openfabrics.org//show_bug.cgi?id=604>
Signed-off-by: Michael S. Tsirkin <mst@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
[SPARC64]: Fill holes in hypervisor APIs and fix KTSB registry.
[SPARC64]: Fix two bugs wrt. kernel 4MB TSB.
[SPARC]: Mark as emulating cmpxchg, add appropriate depends for DRM.
[SPARC]: Emulate cmpxchg like parisc
[SPARC64]: Fix _PAGE_EXEC_4U check in sun4u I-TLB miss handler.
[SPARC]: Linux always started with 9600 8N1
[SPARC64]: arch/sparc64/time.c doesn't compile on Ultra 1 (no PCI)
[SPARC64]: Eliminate NR_CPUS limitations.
[SPARC64]: Use machine description and OBP properly for cpu probing.
[SPARC64]: Negotiate hypervisor API for PCI services.
[SPARC64]: Report proper system soft state to the hypervisor.
[SPARC64]: Fix typo in sun4v_hvapi_register error handling.
[SCSI] ESP: Kill SCSI_ESP_CORE and link directly just like jazz_esp
[SCSI] jazz_esp: Converted to use esp_core.
[SPARC64]: PCI device scan is way too verbose by default.
[SERIAL] sunzilog: section mismatch fix
[SPARC32]: Removes mismatch section warnigs in sparc time.c file
[SPARC64]: Don't be picky about virtual-dma values on sun4v.
[SPARC64]: Kill unused DIE_PAGE_FAULT enum value.
[SCSI] pluto: Use wait_for_completion_timeout.
* 'hwmon-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6:
hwmon/applesmc: Handle name file creation error and deletion
hwmon/applesmc: Simplify dependencies
hwmon-vid: Don't spam the logs when VRM version is missing
hwmon/w83627hf: Be quiet when no chip is found
hwmon/coretemp: Add more safety checks
hwmon/ds1621: Fix swapped temperature limits
* master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6:
[SCSI] megaraid_sas: intercept cmd timeout and throttle io
[SCSI] fusion: Fix |/|| confusion
[SCSI] aic94xx: asd_clear_nexus should fail if the cleared task does not complete
[SCSI] aic7xxx: fix aicasm build failure with gcc-3.4.6
[SCSI] aacraid: apply commit config for reset_devices flag
[SCSI] sd: fix refcounting regression in suspend/resume routines
[SCSI] aacraid: fix panic on short Inquiry
[SCSI] aacraid: Correct sa platform support. (Was: [Bug 8469] Bad EIP value on pentium3 SMP kernel-2.6.21.1)
[SCSI] NCR53C9x: correct spelling mistake in deprecation notice
[SCSI] tgt: fix a rdma indirect transfer error bug
[SCSI] MegaRAID: Update MAINTAINERS email-id
[SCSI] stex: minor cleanup and version update
[SCSI] stex: fix reset recovery for console device
[SCSI] stex: extend hard reset wait time
[SCSI] stex: fix id mapping issue
[SCSI] ipr: Proper return codes for eh_dev_reset for SATA devices
[SCSI] zfcp: IO stall after deleting and path checker changes after reenabling zfcp devices
[SCSI] zfcp: avoid clutter in erp_dbf
This patch (as912) replaces a couple of calls to flush_workqueue()
with cancel_sync_work() and cancel_rearming_delayed_work(). Using a
more directed approach allows us to avoid some nasty deadlocks. The
prime example occurs when a first-level device (the parent is a root
hub) is removed while at the same time the root hub gets a remote
wakeup request. khubd would try to flush the autosuspend workqueue
while holding the root-hub's lock, and the remote-wakeup workqueue
routine would be waiting to lock the root hub.
The patch also reorganizes the power management portion of
usb_disconnect(), separating it out into its own routine. The
autosuspend workqueue entry is cancelled immediately instead of
waiting for the device's release routine. In addition,
synchronization with the autosuspend thread is carried out even for
root hubs (an oversight in the original code).
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Greg KH <gregkh@suse.de>
Cc: Mark Lord <lkml@rtr.ca>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
The RO_DATA section were hardcoded to a specific
alignment in include/asm-generic/vmlinux.h.
But for sparc64 this did not match the PAGE_SIZE.
Introduce a new section definition named:
RO_DATA that takes actual alignment as parameter.
RODATA are provided for backward compatibility.
On top of this avoid hardcoding alignment for
sparc64 in reset of the script
Fix is build-tested on sparc64 + x86_64.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
When hostap_tx_encrypt() tries to allocate enough headroom and
tailroom for ieee80211 encryption, it only makes enough room for the
"mpdu" phase of the operation, but forgets about the "msdu" phase.
(For TKIP, these two phases require, respectively, 4 and 8 bytes of
tailroom, per the "ieee80211_crypt_tkip" structure at the bottom of
net/ieee80211/ieee80211_crypt_tkip.c.)
Signed-off-by: Brandon Craig Rhodes <brandon@rhodesmill.org>
Signed-off-by: Jouni Malinen <j@w1.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This patch adds missing NULL check and trims a line longer than 80 columns.
Cc: Johannes Berg <johannes@sipsolutions.net>
Cc: Joe Jezak <josejx@gentoo.org>
Cc: Daniel Drake <dsd@gentoo.org>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Fix error message:
Unable to network device. --> Unable to allocate network device.
Cc: James Ketrenos <jketreno@linux.intel.com>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Manually set the device of a skb for prism54 cards that are in monitor
mode as we never call eth_type_trans in that case.
Signed-off-by: Björn Steinbrink <B.Steinbrink@gmx.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
ieee80211_open should always set the carrier status since we may have set
it to off before.
Signed-off-by: Michael Wu <flamingice@sourmilk.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
We forget to free all the fragments when defraging them into one packet.
Signed-off-by: Hong Liu <hong.liu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Some APs have strict checking between associate and reassociate. In
a case when an AP is restarted during a connection, it denies the
mac80211 reassoc request since this is a new association for the AP.
To fix this problem, we need to check the status code against
WLAN_STATUS_REASSOC_NO_ASSOC and clear ifsta->prev_bssid_set in
handling the association failure response.
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Several interfaces were missing and others misnumbered or
improperly documented.
Also, make sure to check the return value when registering
the kernel TSBs with the hypervisor. This helped to find
the 4MB kernel TSB alignment bug fixed in a previous changeset.
Signed-off-by: David S. Miller <davem@davemloft.net>
1) The TSB lookup was not using the correct hash mask.
2) It was not aligned on a boundary equal to it's size,
which is required by the sun4v Hypervisor.
wasn't having it's return value checked, and that bug will be fixed up
as well in a subsequent changeset.
Signed-off-by: David S. Miller <davem@davemloft.net>
The DRM code depends on an atomic version of cmpxchg(), which is not
available on sparc32. Since other platforms besides sparc32 have this
issue a KCONFIG option is added for it.
Signed-off-by: Martin Habets <errandir_news@mph.eclipse.co.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
It was using an immediate _PAGE_EXEC_4U value in an 'and'
instruction to perform the test. This doesn't work because
the immediate field is signed 13-bit, this the mask being
tested against the PTE was 0x1000 sign-extended to 32-bits
instead of just plain 0x1000.
Signed-off-by: David S. Miller <davem@davemloft.net>
The Linux kernel ignored the PROM's serial settings (115200,n,8,1 in
my case). This was because mode_prop remained "ttyX-mode" (expected:
"ttya-mode") due to the constness of string literals when used with
"char *". Since there is no "ttyX-mode" property in the PROM, Linux
always used the default 9600.
[ Investigation of the suncore.s assembler reveals that gcc optimizied
away the stores, yet did not emit a warning, which is a pretty
anti-social thing to do and is the only reason this bug lived for
so long -DaveM ]
Signed-off-by: Jan Engelhardt <jengelh@gmx.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
This is bug 8540 on bugzilla.kernel.org
arch/sparc64/time.c contains references to assorted bq4802 stuff if
CONFIG_PCI is not set, and compile fails. I #ifdef'ed out everything
that looks PCI-ish in that file.
Signed-off-by: David S. Miller <davem@davemloft.net>
Cheetah systems can have cpuids as large as 1023, although physical
systems don't have that many cpus.
Only three limitations existed in the kernel preventing arbitrary
NR_CPUS values:
1) dcache dirty cpu state stored in page->flags on
D-cache aliasing platforms. With some build time
calculations and some build-time BUG checks on
page->flags layout, this one was easily solved.
2) The cheetah XCALL delivery code could only handle
a cpumask with up to 32 cpus set. Some simple looping
logic clears that up too.
3) thread_info->cpu was a u8, easily changed to a u16.
There are a few spots in the kernel that still put NR_CPUS
sized arrays on the kernel stack, but that's not a sparc64
specific problem.
Signed-off-by: David S. Miller <davem@davemloft.net>