14 Jul, 2011
10 commits
-
In general, the mxs-dma users get separate irq for each channel,
but gpmi is special one which has only one irq shared by all gpmi
channels. It causes mxs_dma channel allocation function fail for
all other gpmi channels except the first one calling into the
function.The patch gets request_irq call skipped for NO_IRQ case, and leaves
this gpmi specific quirk to gpmi driver to sort out. It will fix
above problem if gpmi driver sets chan_irq as gpmi irq for only one
channel and NO_IRQ for all the rest channels.Signed-off-by: Shawn Guo
Cc: Vinod Koul
Signed-off-by: Vinod Koul -
While testing Per Forlins MMC speed improvements I noticed a
semantic bug in the COH901318 driver: it will write to channel
registers in the prep_slave_sg() function, instead of deferring
it to later, breaking the assumption from the drivers to be able
to queue up new jobs while another job is running. Fix this by
storing up the initial register writes in the job descriptors
and write them to hardware when we process the descriptor
instead. Now the stress tests work.Acked-by: Per Forlin
Signed-off-by: Linus Walleij
Signed-off-by: Vinod Koul -
Currently the runtime config implementation forces the memory side
parameters to be the same as the peripheral side. Allow these to be
different, and check for misconfiguration.Signed-off-by: Rabin Vincent
Reviewed-by: Ulf HANSSON
Tested-by: Stefan Nilsson
Reviewed-by: Per Forlin
Reviewed-by: Srinidhi Kasagar
Cc: Robert Marklund
Signed-off-by: Linus Walleij
Signed-off-by: Vinod Koul -
The DMA40 is not a PrimeCell from ARM, but it still use the same
ID registers. So let's utilize the existing macros in the
PrimeCell header to identify manufacturer and revision of the IP
block instead of reinventing the wheel.Cc: Robert Marklund
Cc: Per Forlin
Cc: Rabin Vincent
Signed-off-by: Linus Walleij
Signed-off-by: Vinod Koul -
This function may be initiated from IRQ context, so the allocation
must allocate NOWAIT memory.Signed-off-by: Robert Marklund
Reviewed-by: Rabin Vincent
Reviewed-by: Philippe Langlais
Signed-off-by: Linus Walleij
Signed-off-by: Vinod Koul -
Missing documentation creates kernel-doc warnings, so add
the documenation.Signed-off-by: Om Prakash
Reviewed-by: Rabin Vincent
Reviewed-by: Jonas Aberg
Reviewed-by: Srinidhi Kasagar
Signed-off-by: Linus Walleij
Signed-off-by: Vinod Koul -
ste_dma40 now implements issue_pending according to documentation.
Submit adds descriptos to a pending queue with are flushed down to the DMAC
at issue_pending.Signed-off-by: Per Forlin
Signed-off-by: Vinod Koul -
tx_submit will add descriptors to the pending queue. Issue pending
will then move the pending descriptors to the transfer queue.Signed-off-by: Per Forlin
Signed-off-by: Vinod Koul -
Fix for the following INFO message
=================================
[ INFO: inconsistent lock state ]
2.6.39+ #89
---------------------------------
inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage.
rs232/822 [HC1[1]:SC0[0]:HE0:SE1] takes:
(&(&pd_chan->lock)->rlock){?.....}, at: [] pdc_desc_get+0x16/0xab
{HARDIRQ-ON-W} state was registered at:
[] mark_irqflags+0xbd/0x11a
[] __lock_acquire+0x501/0x6bb
[] lock_acquire+0x63/0x7b
[] _raw_spin_lock_bh+0x43/0x51
[] pd_alloc_chan_resources+0x92/0x11e
[] dma_chan_get+0x9b/0x107
[] __dma_request_channel+0x61/0xdc
[] pch_request_dma+0x61/0x19e
[] pch_uart_startup+0x16a/0x1a2
[] uart_startup+0x87/0x147
[] uart_open+0x117/0x13e
[] tty_open+0x23c/0x34c
[] chrdev_open+0x140/0x15f
[] __dentry_open.clone.14+0x14a/0x22b
[] nameidata_to_filp+0x36/0x40
[] do_last+0x513/0x635
[] path_openat+0x9c/0x2aa
[] do_filp_open+0x27/0x69
[] do_sys_open+0xfd/0x184
[] sys_open+0x24/0x2a
[] sysenter_do_call+0x12/0x32
irq event stamp: 2522
hardirqs last enabled at (2521): [] _raw_spin_unlock_irqrestore+0x36/0x52
hardirqs last disabled at (2522): [] common_interrupt+0x27/0x34
softirqs last enabled at (2354): [] __do_softirq+0x10a/0x11a
softirqs last disabled at (2299): [] do_softirq+0x57/0xa4other info that might help us debug this:
2 locks held by rs232/822:
#0: (&tty->atomic_write_lock){+.+.+.}, at: [] tty_write_lock+0x14/0x3c
#1: (&port_lock_key){-.....}, at: [] pch_uart_interrupt+0x17/0x1e9stack backtrace:
Pid: 822, comm: rs232 Not tainted 2.6.39+ #89
Call Trace:
[] ? printk+0x19/0x1b
[] print_usage_bug+0x184/0x18f
[] ? print_irq_inversion_bug+0x10e/0x10e
[] mark_lock_irq+0xa5/0x1f6
[] mark_lock+0x208/0x2d7
[] mark_irqflags+0x55/0x11a
[] __lock_acquire+0x501/0x6bb
[] ? dump_trace+0x92/0xb6
[] lock_acquire+0x63/0x7b
[] ? pdc_desc_get+0x16/0xab
[] _raw_spin_lock+0x3e/0x4c
[] ? pdc_desc_get+0x16/0xab
[] pdc_desc_get+0x16/0xab
[] ? __lock_acquire+0x653/0x6bb
[] pd_prep_slave_sg+0x7c/0x1cb
[] ? nommu_map_sg+0x6e/0x81
[] dma_handle_tx+0x2cf/0x344
[] ? pch_uart_interrupt+0x17/0x1e9
[] pch_uart_interrupt+0x160/0x1e9
[] handle_irq_event_percpu+0x25/0x127
[] handle_irq_event+0x2c/0x43
[] ? handle_fasteoi_irq+0x84/0x84
[] handle_edge_irq+0xac/0xce
[] ? do_IRQ+0x38/0x9d
[] ? common_interrupt+0x2e/0x34
[] ? __lock_acquire+0x1f6/0x6bb
[] ? _raw_spin_unlock_irqrestore+0x38/0x52
[] ? uart_start+0x2d/0x32
[] ? uart_flush_chars+0x8/0xa
[] ? n_tty_write+0x12c/0x1c6
[] ? try_to_wake_up+0x251/0x251
[] ? tty_write+0x169/0x1dc
[] ? n_tty_ioctl+0xb7/0xb7
[] ? vfs_write+0x91/0x10d
[] ? tty_write_lock+0x3c/0x3c
[] ? sys_write+0x3e/0x63
[] ? sysenter_do_call+0x12/0x32Signed-off-by: Alexander Stein
Tested-by: Tomoya MORINAGA
Signed-off-by: Vinod Koul -
Signed-off-by: H Hartley Sweeten
Cc: Dan Williams (supporter:ASYNCHRONOUS TRAN...)
Cc: Vinod Koul (supporter:DMA GENERIC OFFLO...)
Signed-off-by: Vinod Koul
24 Jun, 2011
1 commit
-
There exist systems with multiple DMA controllers with different
capabilities. For example, on some sh-mobile / rmobile systems there are
DMA controllers, whose channels can be configured to be used with
SD- and MMC-host controllers, serial ports etc. Besides there are also
DMA controllers, that can only be used for one special function, e.g.,
for USB. In such cases the DMA client filter function can just choose
to specify to the DMA driver, which channel it needs. Then the
.device_alloc_chan_resources() method of the DMA driver will check,
whether it can provide that dunction. If not, it will fail and the loop
in __dma_request_channel() will continue to the next DMA device, until
it finds a suitable one. This works fine with just one minor glitch:
the kernel logs error messages likedmaengine: failed to get : (-)
after each such non-critical failure. This patch lowers priority of
this message to the debug level.Reported-by: Kuninori Morimoto
Signed-off-by: Guennadi Liakhovetski
Tested-by: Kuninori Morimoto
Tested-by: Magnus Damm
Signed-off-by: Vinod Koul
16 Jun, 2011
1 commit
-
The symbol 'ep93xx_dma_prep_dma_memcpy' is only used in this driver
and should be marked static.Signed-off-by: H Hartley Sweeten
Cc: Mika Westerberg
Cc: Dan Williams
Cc: Vinod Koul
Acked-by: Mika Westerberg
Signed-off-by: Vinod Koul
10 Jun, 2011
1 commit
09 Jun, 2011
4 commits
-
This patch adds DMA support for the EP93xx SPI driver. By default the DMA is
not enabled but it can be enabled by setting ep93xx_spi_info.use_dma to true
in board configuration file.Note that the SPI driver still uses PIO for small transfers (
Acked-by: H Hartley Sweeten
Acked-by: Vinod Koul
Signed-off-by: Grant Likely -
The ep93xx DMA controller has 10 independent memory to peripheral (M2P)
channels, and 2 dedicated memory to memory (M2M) channels. M2M channels can
also be used by SPI and IDE to perform DMA transfers to/from their memory
mapped FIFOs.This driver supports both M2P and M2M channels with DMA_SLAVE, DMA_CYCLIC and
DMA_MEMCPY (M2M only) capabilities.Signed-off-by: Mika Westerberg
Signed-off-by: Ryan Mallon
Acked-by: H Hartley Sweeten
Acked-by: Vinod Koul
Signed-off-by: Grant Likely -
One new offender detected by the recently increased type checking in
platform_get_drvdata():drivers/rtc/rtc-m41t93.c: In function ‘m41t93_remove’:
drivers/rtc/rtc-m41t93.c:192: warning: passing argument 1 of ‘platform_get_drvdata’ from incompatible pointer typeUse spi_get_drvdata() instead of platform_get_drvdata(), cfr. commit
42fea15d6dc410e62dac6a764142045280624a5b ("spi/rtc-{ds1390,ds3234,m41t94}:
Use spi_get_drvdata() for SPI devices")Signed-off-by: Geert Uytterhoeven
Signed-off-by: Grant Likely
06 Jun, 2011
5 commits
-
* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/staging:
hwmon: (max6642): Better chip detection schema
hwmon: (coretemp) Further relax temperature range checks
hwmon: (coretemp) Fix TjMax detection for older CPUs
hwmon: (coretemp) Relax target temperature range check
hwmon: (max6642) Rename temp_fault sysfs attribute to temp2_fault -
Signed-off-by: H Hartley Sweeten
Cc: Dan Williams
Cc: Vinod Koul
Signed-off-by: Vinod Koul -
Signed-off-by: H Hartley Sweeten
Cc: Dan Williams
Cc: Vinod Koul
Cc: Guennadi Liakhovetski
Cc: Anatolij Gustschin
Signed-off-by: Vinod Koul -
This patch adds DMA support for the EP93xx SPI driver. By default the DMA is
not enabled but it can be enabled by setting ep93xx_spi_info.use_dma to true
in board configuration file.Note that the SPI driver still uses PIO for small transfers (
Acked-by: H Hartley Sweeten
Cc: Grant Likely
Acked-by: Grant Likely
Signed-off-by: Vinod Koul -
The ep93xx DMA controller has 10 independent memory to peripheral (M2P)
channels, and 2 dedicated memory to memory (M2M) channels. M2M channels can
also be used by SPI and IDE to perform DMA transfers to/from their memory
mapped FIFOs.This driver supports both M2P and M2M channels with DMA_SLAVE, DMA_CYCLIC and
DMA_MEMCPY (M2M only) capabilities.Signed-off-by: Mika Westerberg
Signed-off-by: Ryan Mallon
Acked-by: H Hartley Sweeten
Acked-by: Vinod Koul
Cc: Dan Williams
Signed-off-by: Vinod Koul
05 Jun, 2011
1 commit
-
Improve detection of MAX6642 by reading non existing registers (0x04, 0x06
and 0xff). Reading those registers returns the previously read value.Signed-off-by: Per Dalen
[guenter.roeck@ericsson.com: added second set of register reads]
Signed-off-by: Guenter Roeck
04 Jun, 2011
7 commits
-
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6:
[SCSI] Fix oops caused by queue refcounting failure -
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (40 commits)
tg3: Fix tg3_skb_error_unmap()
net: tracepoint of net_dev_xmit sees freed skb and causes panic
drivers/net/can/flexcan.c: add missing clk_put
net: dm9000: Get the chip in a known good state before enabling interrupts
drivers/net/davinci_emac.c: add missing clk_put
af-packet: Add flag to distinguish VID 0 from no-vlan.
caif: Fix race when conditionally taking rtnl lock
usbnet/cdc_ncm: add missing .reset_resume hook
vlan: fix typo in vlan_dev_hard_start_xmit()
net/ipv4: Check for mistakenly passed in non-IPv4 address
iwl4965: correctly validate temperature value
bluetooth l2cap: fix locking in l2cap_global_chan_by_psm
ath9k: fix two more bugs in tx power
cfg80211: don't drop p2p probe responses
Revert "net: fix section mismatches"
drivers/net/usb/catc.c: Fix potential deadlock in catc_ctrl_run()
sctp: stop pending timers and purge queues when peer restart asoc
drivers/net: ks8842 Fix crash on received packet when in PIO mode.
ip_options_compile: properly handle unaligned pointer
iwlagn: fix incorrect PCI subsystem id for 6150 devices
... -
* 'for-linus' of git://git.kernel.dk/linux-block:
block: Use hlist_entry() for io_context.cic_list.first
cfq-iosched: Remove bogus check in queue_fail path
xen/blkback: potential null dereference in error handling
xen/blkback: don't call vbd_size() if bd_disk is NULL
block: blkdev_get() should access ->bd_disk only after success
CFQ: Fix typo and remove unnecessary semicolon
block: remove unwanted semicolons
Revert "block: Remove extra discard_alignment from hd_struct."
nbd: adjust 'max_part' according to part_shift
nbd: limit module parameters to a sane value
nbd: pass MSG_* flags to kernel_recvmsg()
block: improve the bio_add_page() and bio_add_pc_page() descriptions -
* 'sh-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6:
dmaengine: shdma: fix a regression: initialise DMA channels for memcpy
dmaengine: shdma: Fix up fallout from runtime PM changes.
Revert "clocksource: sh_cmt: Runtime PM support"
Revert "clocksource: sh_tmu: Runtime PM support"
sh: Fix up asm-generic/ptrace.h fallout.
sh64: Move from P1SEG to CAC_ADDR for consistent sync.
sh64: asm/pgtable.h needs asm/mmu.h
sh: asm/tlb.h needs linux/swap.h
sh: mark DMA slave ID 0 as invalid
sh: Update shmin to reflect PIO dependency.
sh: arch/sh/kernel/process_32.c needs linux/prefetch.h.
sh: add MMCIF runtime PM support on ecovec
sh: switch ap325rxa to dynamically manage the platform camera -
This reverts commit b1c43f82c5aa265442f82dba31ce985ebb7aa71c.
It was broken in so many ways, and results in random odd pty issues.
It re-introduced the buggy schedule_work() in flush_to_ldisc() that can
cause endless work-loops (see commit a5660b41af6a: "tty: fix endless
work loop when the buffer fills up").It also used an "unsigned int" return value fo the ->receive_buf()
function, but then made multiple functions return a negative error code,
and didn't actually check for the error in the caller.And it didn't actually work at all. BenH bisected down odd tty behavior
to it:
"It looks like the patch is causing some major malfunctions of the X
server for me, possibly related to PTYs. For example, cat'ing a
large file in a gnome terminal hangs the kernel for -minutes- in a
loop of what looks like flush_to_ldisc/workqueue code, (some ftrace
data in the quoted bits further down)....
Some more data: It -looks- like what happens is that the
flush_to_ldisc work queue entry constantly re-queues itself (because
the PTY is full ?) and the workqueue thread will basically loop
forver calling it without ever scheduling, thus starving the consumer
process that could have emptied the PTY."which is pretty much exactly the problem we fixed in a5660b41af6a.
Milton Miller pointed out the 'unsigned int' issue.
Reported-by: Benjamin Herrenschmidt
Reported-by: Milton Miller
Cc: Stefan Bigler
Cc: Toby Gray
Cc: Felipe Balbi
Cc: Greg Kroah-Hartman
Cc: Alan Cox
Signed-off-by: Linus Torvalds -
fixes below compilation warning. The variable doesn't actual ever get
used uninitialized, but that's no reason to be sloppy.drivers/spi/omap2_mcspi.c: In function 'omap2_mcspi_txrx_dma':
drivers/spi/omap2_mcspi.c:301: warning: 'elements' may be used uninitialized in this functionSigned-off-by: Govindraj.R
[grant.likely: amended description]
Signed-off-by: Grant Likely -
…wireless-2.6 into for-davem
03 Jun, 2011
1 commit
-
This function attempts to free one fragment beyond the number of
fragments that were actually mapped. This patch brings back the limit
to the correct spot.Signed-off-by: Matt Carlson
Tested-by: Alex Williamson
Signed-off-by: David S. Miller
02 Jun, 2011
9 commits
-
In certain circumstances, we can get an oops from a torn down device.
Most notably this is from CD roms trying to call scsi_ioctl. The root
cause of the problem is the fact that after scsi_remove_device() has
been called, the queue is fully torn down. This is actually wrong
since the queue can be used until the sdev release function is called.
Therefore, we add an extra reference to the queue which is released in
sdev->release, so the queue always exists.Reported-by: Parag Warudkar
Cc: stable@kernel.org
Signed-off-by: James Bottomley -
The failed_get label is used after the call to clk_get has succeeded, so it
should be moved up above the call to clk_put.The failed_req labels doesn't do anything different than failed_get, so
delete it.A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)//
@r exists@
expression e1,e2;
statement S;
@@e1 = clk_get@p1(...);
... when != e1 = e2
when != clk_put(e1)
when any
if (...) { ... when != clk_put(e1)
when != if (...) { ... clk_put(e1) ... }
* return@p3 ...;
} else S
//Signed-off-by: Julia Lawall
Signed-off-by: David S. Miller -
A recent patch has introduced a regression, where repeating a memcpy
DMA test with shdma module unloading between them skips the DMA channel
configuration. Fix this regression by always configuring the channel
during its allocation.Signed-off-by: Guennadi Liakhovetski
Signed-off-by: Paul Mundt -
Currently the DM9000 driver requests the primary interrupt before it
resets the chip and puts it into a known good state. This means that if
the chip is asserting interrupt for some reason we can end up with a
screaming IRQ that the interrupt handler is unable to deal with. Avoid
this by only requesting the interrupt after we've reset the chip so we
know what state it's in.This started manifesting itself on one of my boards in the past month or
so, I suspect as a result of some core infrastructure changes removing
some form of mitigation against bad behaviour here, even when things boot
it seems that the new code brings the interface up more quickly.Signed-off-by: Mark Brown
Signed-off-by: David S. Miller -
Go to existing error handling code at the end of the function that calls
clk_put.A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)//
@r exists@
expression e1,e2;
statement S;
@@e1 = clk_get@p1(...);
... when != e1 = e2
when != clk_put(e1)
when any
if (...) { ... when != clk_put(e1)
when != if (...) { ... clk_put(e1) ... }
* return@p3 ...;
} else S
//Signed-off-by: Julia Lawall
Acked-by: Kevin Hilman
Signed-off-by: David S. Miller -
This avoids messages like this after suspend:
cdc_ncm 2-1.4:1.6: no reset_resume for driver cdc_ncm?
cdc_ncm 2-1.4:1.7: no reset_resume for driver cdc_ncm?
cdc_ncm 2-1.4:1.6: usb0: unregister 'cdc_ncm' usb-0000:00:1d.0-1.4, CDC NCMThis is important for the Ericsson F5521gw GSM/UMTS modem.
Otherwise modemmanager looses the fact that the cdc_ncm and cdc_acm devices
belong together.The cdc_ether module does the same.
Signed-off-by: Stefan Metzmacher
Signed-off-by: David S. Miller -
Further relax temperature range checks after reading the IA32_TEMPERATURE_TARGET
register. If the register returns a value other than 0 in bits 16..32, assume
that the returned value is correct.This change applies to both packet and core temperature limits.
Cc: Carsten Emde
Cc: Fenghua Yu
Cc: Jean Delvare
Signed-off-by: Guenter Roeck
Acked-by: Fenghua Yu -
Commit a321cedb12904114e2ba5041a3673ca24deb09c9 excludes CPU models 0xe, 0xf,
0x16, and 0x1a from TjMax temperature adjustment, even though several of those
CPUs are known to have TiMax other than 100 degrees C, and even though the code
in adjust_tjmax() explicitly handles those CPUs and points to a Web document
listing several of the affected CPU IDs.Reinstate original TjMax adjustment if TjMax can not be determined using the
IA32_TEMPERATURE_TARGET register.https://bugzilla.kernel.org/show_bug.cgi?id=32582
Signed-off-by: Guenter Roeck
Cc: Huaxu Wan
Cc: Carsten Emde
Cc: Valdis Kletnieks
Cc: Henrique de Moraes Holschuh
Cc: Yong Wang
Cc: Rudolf Marek
Cc: Fenghua Yu
Tested-by: Jean Delvare
Acked-by: Jean Delvare
Acked-by: Fenghua Yu
Cc: # .35.x .36.x .37.x .38.x .39.x -
* git://git.infradead.org/iommu-2.6:
intel-iommu: Fix off-by-one in RMRR setup
intel-iommu: Add domain check in domain_remove_one_dev_info
intel-iommu: Remove Host Bridge devices from identity mapping
intel-iommu: Use coherent DMA mask when requested
intel-iommu: Dont cache iova above 32bit
intel-iommu: Speed up processing of the identity_mapping function
intel-iommu: Check for identity mapping candidate using system dma mask
intel-iommu: Only unlink device domains from iommu
intel-iommu: Enable super page (2MiB, 1GiB, etc.) support
intel-iommu: Flush unmaps at domain_exit
intel-iommu: Remove obsolete comment from detect_intel_iommu
intel-iommu: fix VT-d PMR disable for TXT on S3 resume