On certain device/controller combination, 0xff status is asserted
after reset and doesn't get cleared during 150ms post-reset wait. As
0xff status is interpreted as no device (for good reasons), this can
lead to misdetection on such cases.
This patch implements ata_wait_after_reset() which replaces the 150ms
sleep and waits upto ATA_TMOUT_FF_WAIT if status is 0xff.
ATA_TMOUT_FF_WAIT is currently 800ms which is enough for
HHD424020F7SV00 to get detected but not enough for Quantum GoVault
drive which is known to take upto 2s.
Without parallel probing, spending 2s on 0xff port would incur too
much delay on ata_piix's which use 0xff to indicate empty port and
doesn't have SCR register, so GoVault needs to wait till parallel
probing.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
ATA devices in SLEEP mode don't respond to any commands. SRST is
necessary to wake it up. Till now, when a command is issued to a
device in SLEEP mode, the command times out, which makes EH reset the
device and retry the command after that, causing a long delay.
This patch makes libata track SLEEP state and issue SRST automatically
if a command is about to be issued to a device in SLEEP.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Bruce Allen <ballen@gravity.phys.uwm.edu>
Cc: Andrew Paprocki <andrew@ishiboo.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Some commands need post-processing after successful completion. This
was done in ata_scsi_qc_complete() till now but this has the following
problems.
* Post-command processing gets executed when qc is completed from EH.
Some qc's are retried from EH with zero err_mask and thus triggers
unnecessary/incorrect post-command processing.
* Command post processing doesn't belong to SAT layer.
* Link-wide revalidation was scheduled where device revalidation
suffices.
This patch moves post-command processing to success completion path of
ata_qc_complete() which is travelled iff the command is going to be
completed without passing through EH and updates post-command
processing such that device-specific action is used. While at it,
restructure code a bit for readability.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
This is fixes a problem where we could jump to the wrong address. By
doing a "p0 = reti; jump (p0)". If a different, higher level interrupt
came in, just before, rather than returning to the calling function, we
would return to a random place in the kernel.
This very elegant fix from Bernd grabs the return location off the
stack, and places it into P0, so when we do a return, it goes to the
correct place.
Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Driver for ethernet on mpc5200/mpc5200b SoCs (FEC).
Signed-off-by: Domen Puncer <domen.puncer@telargo.com>
Acked-by: Dale Farnsworth <dale@farnsworth.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
- move the CONFIG_KGDB into one block, for easier reading
- remove printk from printk_address, and pass around buffers. Also
print out the labels when decoding CPLB errors, so you know exactly
where the error was.
- Do not use fixed addresses, becuase people do not know where they come from.
- Turn the printing level down on the dump, so if you don't want,
only the signal prints out - just like on other archs. If a kernel/interrupt
crashes, it should dump everything all the time
Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
eHEA resources that are allocated via H_CALLs have a unique identifier each.
These identifiers are necessary to free the resources. A reboot notifier
is used to free all eHEA resources before the indentifiers get lost, i.e
before kexec starts a new kernel.
Signed-off-by: Jan-Bernd Themann <themann@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
The legacy jumbo frame receive code is no longer needed since all
hardware can do packet split and we're no longer offering a bypass
kernel config option to disable packet split. Remove the unused code.
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
This workaround code performed software stripping instead of the
hardware which can do it much faster. None of the e1000e target
hardware has issues with this feature and should work fine. This
gives us some performance back on receive, and removes some
kludging stripping the 4 bytes.
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Upon inspection the rx FIFO size calculation code was found to have
2 significant flaws: A superfluous minus sign resulting in the
wrong size to be used for jumbo frames on 82573 and ich9, as well
as that this code rewrote the read-only adapter->pba variable
resulting in different values at each run.
Without this patch jumbo's will work but performance will be
awkward since the TX size is not adequate for two whole frames.
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Fix allocation and freeing of jumbo frames where several bugs
were recently introduced by cleanups after we forked this code
from e1000. This moves ps_pages to buffer_info where it really
belongs and makes it a dynamically allocated array. The penalty
is not that high since it's allocated outside of the buffer_info
struct anyway.
Without this patch all jumbo frames are completely broken and the
driver panics.
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
interrupt handlers return a return value these days.
Also, kill always-true test and unneeded void* cast.
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
This fixes two things:
- stop calling write_lock_irq/write_unlock_irq which can turn modify
irq levels
- don't calling mmput when handing exceptions - since this might_sleep,
which does a rti, and leaves us in kernel space (irq15, rather
than irq5).
Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
* change #warning to a code comment
* add comment and special ifdef'd 64-bit code for a situation where
we must store a pointer into a CAPI field 'Data', which is fixed by
the interface at 32 bits.
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Acked-by: Karsten Keil <kkeil@suse.de>
Change the hrtimer printk "Switched to high resolution mode .." to
be KERN_DEBUG, rather than KERN_INFO. If users need to see this they
can pass "loglevel" or "debug" on the command line, or check dmesg.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
kernel/hrtimer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
This makes sure printk format strings contain no more than a single
line.
Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This patch removes the unused
EXPORT_SYMBOL_GPL(tick_nohz_get_sleep_length).
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Clean up: fix a mixed sign comparison in sg_init_table() accidentally
introduced by commit d6ec0842. The sign of the loop index variable
should match the sign of the "nents" argument.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Jens Axboe <axboe@carl.home.kernel.dk>
Clean up: fix a mixed sign comparison in sg_last() accidentally
introduced by commit 70eb8040. The sign of the loop index variable
should match the sign of the "nents" argument.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Jens Axboe <axboe@carl.home.kernel.dk>
After turning on DEBUG_SG I hit a fail:
kernel BUG at include/linux/scatterlist.h:50!
sg_build_indirect
sg_build_reserve
sg_open
chrdev_open
__dentry_open
do_filp_open
do_sys_open
We should initialise the sg list when we allocate it in sg_build_sgat.
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
After turning on DEBUG_SG I hit a fail:
kernel BUG at include/linux/scatterlist.h:50!
ata_qc_issue
ata_scsi_translate
ipr_queuecommand
scsi_dispatch_cmd
scsi_request_fn
elv_insert
blk_execute_rq_nowait
blk_execute_rq
sg_io
scsi_cmd_ioctl
cdrom_ioctl
sr_block_ioctl
blkdev_driver_ioctl
blkdev_ioctl
block_ioctl
do_ioctl
vfs_ioctl
sys_ioctl
sg_ioctl_trans
It looks like ata_sg_setup is working on an uninitialised sg table. Call
sg_init_table to initialise it before use.
Signed-off-by: Anton Blanchard <anton@samba.org>
Note: this patch will fix it, but you could also get away with just
doing the sg_init_table() once at qc creation time.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
blk_rq_map_sg doesn't initialize sg->dma_address/length to zero
anymore. Some low level drivers reuse sg lists without initializing so
IOMMUs might get non-zero dma_address/length. If map_sg fails, we need
pass the number of the mapped entries to gart_unmap_sg.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Since we are using the last entry in the list, clear any possible
termination bit that may have already been set. Pointed out by Rusty.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
When demoting a process to use 4K HW pages (instead of 64K), which
happens under various circumstances such as doing cache inhibited
mappings on machines that do not support 64K CI pages, the assembly
hash code calls back into the C function flush_hash_page(). This
function prototype was recently changed to accomodate for 1T segments
but the assembly call site was not updated, causing applications that
do demotion to hang. In addition, when updating the per-CPU PACA for
the new sizes, we didn't properly update the slice "map", thus causing
the SLB miss code to re-insert segments for the wrong size.
This fixes both and adds a warning comment next to the C
implementation to try to avoid problems next time someone changes it.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Fix for the error below while linking vmlinux:
[...]
drivers/built-in.o: In function `ipg_ioctl':
drivers/net/ipg.c:2148: undefined reference to `generic_mii_ioctl'
drivers/built-in.o: In function `ipg_get_settings':
drivers/net/ipg.c:2181: undefined reference to `mii_ethtool_gset'
drivers/built-in.o: In function `ipg_set_settings':
drivers/net/ipg.c:2193: undefined reference to `mii_ethtool_sset'
drivers/built-in.o: In function `ipg_nway_reset':
drivers/net/ipg.c:2205: undefined reference to `mii_nway_restart'
make: *** [.tmp_vmlinux1] Error 1
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Avuton Olrich <avuton@gmail.com>
Cc: Jesse Huang <jesse@icplus.com.tw>
Cc: Sorbica Shieh <sorbica@icplus.com.tw>
Disabling napi polling early is well enough.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
Don't call napi_disable if not configured and make sure that any
misuse of napi_xxx in future fails with a compile error.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
(pointer > 0) is deeply weird; (pointer >= 0) is even dumber...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
#include <scatterlist/scatterlist.h>
is an odd thing to do...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
struct device doesn't have ->dma; it's in struct expansion_card where
that struct device is embedded into.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Acked-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This patch adds the symbol "init_level4_pgt" to the vmcoreinfo data so
that makedumpfile (dump filtering command) supports x86_64 sparsemem
kernel of linux-2.6.24.
makedumpfile creates a small dumpfile by excluding unnecessary pages for
the analysis. It checks attributes in page structures and distinguishes
necessary pages and unnecessary ones. To check them, makedumpfile gets
the vmcoreinfo data which has the minimum debugging information only for
dump filtering.
For older x86_64 kernel (linux-2.6.23 or before), makedumpfile translates
the virtual address of page structure into physical address by subtracting
PAGE_OFFSET from virtual address, but this translation isn't effective for
linux-2.6.24 sparsemem kernel, because its page structures are in virtual
memmap area. makedumpfile should translate their virtual address by 4-levels
paging and it needs the symbol "init_level4_pgt".
Signed-off-by: Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
fix this warning:
arch/x86/kernel/early-quirks.c:40: warning: nvidia_hpet_check defined but not used
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>