<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/tty/serial/sh-sci.c, branch v3.5</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v3.5</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.5'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2012-06-13T01:22:10Z</updated>
<entry>
<title>serial: sh-sci: Make probe fail for ports that exceed the maximum count</title>
<updated>2012-06-13T01:22:10Z</updated>
<author>
<name>Laurent Pinchart</name>
<email>laurent.pinchart@ideasonboard.com</email>
</author>
<published>2012-06-12T22:28:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b6c5ef6f6d3e46d6200b141c30ac000a11b851df'/>
<id>urn:sha1:b6c5ef6f6d3e46d6200b141c30ac000a11b851df</id>
<content type='text'>
The driver supports a maximum number of ports configurable at compile
time. Make sure the probe() method fails when registering a port that
exceeds the maximum instead of returning success without registering the
port.

This fixes a crash at system suspend time, when the driver tried to
suspend a non-registered port using the UART core.

Signed-off-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Paul Mundt &lt;lethal@linux-sh.org&gt;
</content>
</entry>
<entry>
<title>serial: sh-sci: Fix probe error paths</title>
<updated>2012-06-13T01:22:08Z</updated>
<author>
<name>Laurent Pinchart</name>
<email>laurent.pinchart@ideasonboard.com</email>
</author>
<published>2012-06-12T22:28:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6dae14216c85eea13db7b12c469475c5d30e5499'/>
<id>urn:sha1:6dae14216c85eea13db7b12c469475c5d30e5499</id>
<content type='text'>
When probing fails, the driver must not try to cleanup resources that
have not been initialized. Fix this.

Signed-off-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Signed-off-by: Paul Mundt &lt;lethal@linux-sh.org&gt;
</content>
</entry>
<entry>
<title>serial: sh-sci: Fix for port types without BRI interrupts.</title>
<updated>2012-05-18T09:21:06Z</updated>
<author>
<name>Paul Mundt</name>
<email>lethal@linux-sh.org</email>
</author>
<published>2012-05-18T09:21:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0e8963de1fe95e7fbc30c79c1dbc7cb1ea0cf699'/>
<id>urn:sha1:0e8963de1fe95e7fbc30c79c1dbc7cb1ea0cf699</id>
<content type='text'>
In doing the evt2irq() + muxed vector conversion for various port types
it became apparent that some of the legacy port types will presently
error out due to the irq requesting logic attempting to acquire the
non-existent BRI IRQ. This adds some sanity checks to the request/free
path to ensure that non-existence of a source in itself is not an error.

This should restore functionality for legacy PORT_SCI ports.

Signed-off-by: Paul Mundt &lt;lethal@linux-sh.org&gt;
</content>
</entry>
<entry>
<title>serial: sh-sci: Update break_ctl handling for all SCSPTR-capable regtypes.</title>
<updated>2012-04-12T10:19:21Z</updated>
<author>
<name>Shimoda, Yoshihiro</name>
<email>yoshihiro.shimoda.uh@renesas.com</email>
</author>
<published>2012-04-12T10:19:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a4e02f6d83d4fcdb13bcaba76878fc5ea0da9911'/>
<id>urn:sha1:a4e02f6d83d4fcdb13bcaba76878fc5ea0da9911</id>
<content type='text'>
This updates the earlier break_ctl support regardless of regtype so long
as the requisite SCSPTR exists. This is the same approach used by
sci_init_pins() for providing a generic solution now that we're able to
detect register capabilities on a per-port basis.

Signed-off-by: Yoshihiro Shimoda &lt;yoshihiro.shimoda.uh@renesas.com&gt;
Signed-off-by: Paul Mundt &lt;lethal@linux-sh.org&gt;
</content>
</entry>
<entry>
<title>serial: sh-sci: modify sci_break_ctl()</title>
<updated>2012-04-09T08:39:34Z</updated>
<author>
<name>Shimoda, Yoshihiro</name>
<email>yoshihiro.shimoda.uh@renesas.com</email>
</author>
<published>2012-04-06T00:59:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=bbb4ce50f3169b08764f9965fd5b9655646d545a'/>
<id>urn:sha1:bbb4ce50f3169b08764f9965fd5b9655646d545a</id>
<content type='text'>
SCIF modules which have SCSPTR can output the break signal. Now that we
have a way of determining port features/capabilities, add trivial break
control via SCSPTR support. Tested on sh7757lcr.

Signed-off-by: Yoshihiro Shimoda &lt;yoshihiro.shimoda.uh@renesas.com&gt;
Reviewed-by: Simon Horman &lt;horms@verge.net.au&gt;
Signed-off-by: Paul Mundt &lt;lethal@linux-sh.org&gt;
</content>
</entry>
<entry>
<title>serial: sh-sci: use serial_port_in/out vs sci_in/out.</title>
<updated>2012-03-30T10:50:15Z</updated>
<author>
<name>Paul Mundt</name>
<email>lethal@linux-sh.org</email>
</author>
<published>2012-03-30T10:50:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b12bb29f847050b8e75e445c839a2d42989213df'/>
<id>urn:sha1:b12bb29f847050b8e75e445c839a2d42989213df</id>
<content type='text'>
Follows the 8250 change for pretty much the same rationale.

See commit "serial: use serial_port_in/out vs serial_in/out in 8250".

Signed-off-by: Paul Mundt &lt;lethal@linux-sh.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'sh-for-linus' of git://github.com/pmundt/linux-sh</title>
<updated>2012-03-30T07:09:17Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2012-03-30T07:09:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f52b69f86e27903d6896ed5fa7cd280fec8de532'/>
<id>urn:sha1:f52b69f86e27903d6896ed5fa7cd280fec8de532</id>
<content type='text'>
Pull SuperH updates from Paul Mundt.

* tag 'sh-for-linus' of git://github.com/pmundt/linux-sh: (25 commits)
  sh: Support I/O space swapping where needed.
  sh: use set_current_blocked() and block_sigmask()
  sh: no need to reset handler if SA_ONESHOT
  sh: intc: Fix up section mismatch for intc_ack_data
  sh: select ARCH_DISCARD_MEMBLOCK.
  sh: Consolidate duplicate _32/_64 unistd definitions.
  sh: ecovec: switch SDHI controllers to card polling
  sh: Avoid exporting unimplemented syscalls.
  sh: add platform_device for RSPI in setup-sh7757
  SH: pci-sh7780: enable big-endian operation.
  serial: sh-sci: fix a race of DMA submit_tx on transfer
  sh: dma: Collect up CHCR of SH7763, SH7764, SH7780 and SH7785
  sh: dma: Collect up CHCR of SH7723 and SH7730
  sh/next: Fix build fail by asm/system.h in asm/bitops.h
  arch/sh/drivers/dma/{dma-g2,dmabrg}.c: ensure arguments to request_irq and free_irq are compatible
  sh: cpufreq: Wire up scaling_available_freqs support.
  sh: cpufreq: notify about rate rounding fallback.
  sh: cpufreq: Support CPU clock frequency table.
  sh: cpufreq: struct device lookup from CPU topology.
  sh: cpufreq: percpu struct clk accounting.
  ...
</content>
</entry>
<entry>
<title>Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma</title>
<updated>2012-03-29T22:34:57Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2012-03-29T22:34:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ef08e78268423fc4d7fbc3e54bd9a67fc8da7cc5'/>
<id>urn:sha1:ef08e78268423fc4d7fbc3e54bd9a67fc8da7cc5</id>
<content type='text'>
Pull slave-dmaengine update from Vinod Koul:
 "This includes the cookie cleanup by Russell, the addition of context
  parameter for dmaengine APIs, more arm dmaengine driver cleanup by
  moving code to dmaengine, this time for imx by Javier and pl330 by
  Boojin along with the usual driver fixes."

Fix up some fairly trivial conflicts with various other cleanups.

* 'next' of git://git.infradead.org/users/vkoul/slave-dma: (67 commits)
  dmaengine: imx: fix the build failure on x86_64
  dmaengine: i.MX: Fix merge of cookie branch.
  dmaengine: i.MX: Add support for interleaved transfers.
  dmaengine: imx-dma: use 'dev_dbg' and 'dev_warn' for messages.
  dmaengine: imx-dma: remove 'imx_dmav1_baseaddr' and 'dma_clk'.
  dmaengine: imx-dma: remove unused arg of imxdma_sg_next.
  dmaengine: imx-dma: remove internal structure.
  dmaengine: imx-dma: remove 'resbytes' field of 'internal' structure.
  dmaengine: imx-dma: remove 'in_use' field of 'internal' structure.
  dmaengine: imx-dma: remove sg member from internal structure.
  dmaengine: imx-dma: remove 'imxdma_setup_sg_hw' function.
  dmaengine: imx-dma: remove 'imxdma_config_channel_hw' function.
  dmaengine: imx-dma: remove 'imxdma_setup_mem2mem_hw' function.
  dmaengine: imx-dma: remove dma_mode member of internal structure.
  dmaengine: imx-dma: remove data member from internal structure.
  dmaengine: imx-dma: merge old dma-v1.c with imx-dma.c
  dmaengine: at_hdmac: add slave config operation
  dmaengine: add context parameter to prep_slave_sg and prep_dma_cyclic
  dmaengine/dma_slave: introduce inline wrappers
  dma: imx-sdma: Treat firmware messages as warnings instead of erros
  ...
</content>
</entry>
<entry>
<title>serial: sh-sci: fix a race of DMA submit_tx on transfer</title>
<updated>2012-03-28T05:26:05Z</updated>
<author>
<name>Yoshii Takashi</name>
<email>takashi.yoshii.zj@renesas.com</email>
</author>
<published>2012-03-14T07:14:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=49d4bcaddca977fffdea8b0b71f6e5da96dac78e'/>
<id>urn:sha1:49d4bcaddca977fffdea8b0b71f6e5da96dac78e</id>
<content type='text'>
When DMA is enabled, sh-sci transfer begins with
 uart_start()
  sci_start_tx()
    if (cookie_tx &lt; 0) schedule_work()
Then, starts DMA when wq scheduled, -- (A)
 process_one_work()
  work_fn_rx()
   cookie_tx = desc-&gt;submit_tx()
And finishes when DMA transfer ends, -- (B)
 sci_dma_tx_complete()
  async_tx_ack()
  cookie_tx = -EINVAL
  (possible another schedule_work())

This A to B sequence is not reentrant, since controlling variables
(for example, cookie_tx above) are not queues nor lists. So, they
must be invoked as A B A B..., otherwise results in kernel crash.

To ensure the sequence, sci_start_tx() seems to test if cookie_tx &lt; 0
(represents "not used") to call schedule_work().
But cookie_tx will not be set (to a cookie, also means "used") until
in the middle of work queue scheduled function work_fn_tx().

This gap between the test and set allows the breakage of the sequence
under the very frequently call of uart_start().
Another gap between async_tx_ack() and another schedule_work() results
in the same issue, too.

This patch introduces a new condition "cookie_tx == 0" just to mark
it is "busy" and assign it within spin-locked region to fill the gaps.

Signed-off-by: Takashi Yoshii &lt;takashi.yoshii.zj@renesas.com&gt;
Reviewed-by: Guennadi Liakhovetski &lt;g.liakhovetski@gmx.de&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Paul Mundt &lt;lethal@linux-sh.org&gt;
</content>
</entry>
<entry>
<title>dmaengine/dma_slave: introduce inline wrappers</title>
<updated>2012-03-21T13:50:22Z</updated>
<author>
<name>Alexandre Bounine</name>
<email>alexandre.bounine@idt.com</email>
</author>
<published>2012-03-08T21:11:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=16052827d98fbc13c31ebad560af4bd53e2b4dd5'/>
<id>urn:sha1:16052827d98fbc13c31ebad560af4bd53e2b4dd5</id>
<content type='text'>
Add inline wrappers for device_prep_slave_sg() and device_prep_dma_cyclic()
interfaces to hide new parameter from current users of affected interfaces.
Convert current users to use new wrappers instead of direct calls.
Suggested by Russell King [https://lkml.org/lkml/2012/2/3/269].

Signed-off-by: Alexandre Bounine &lt;alexandre.bounine@idt.com&gt;
Signed-off-by: Vinod Koul &lt;vinod.koul@linux.intel.com&gt;
</content>
</entry>
</feed>
