<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/net/irda, branch v4.4.235</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v4.4.235</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v4.4.235'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2018-06-06T14:46:21+00:00</updated>
<entry>
<title>irda: fix overly long udelay()</title>
<updated>2018-06-06T14:46:21+00:00</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2016-11-24T16:26:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9b5c9f07a78fb6052b8c0ec1ac042e9d961008f0'/>
<id>urn:sha1:9b5c9f07a78fb6052b8c0ec1ac042e9d961008f0</id>
<content type='text'>
commit c9bd28233b6d0d82ac3ba0215723be0a8262c39c upstream.

irda_get_mtt() returns a hardcoded '10000' in some cases,
and with gcc-7, we get a build error because this triggers a
compile-time check in udelay():

drivers/net/irda/w83977af_ir.o: In function `w83977af_hard_xmit':
w83977af_ir.c:(.text.w83977af_hard_xmit+0x14c): undefined reference to `__bad_udelay'

Older compilers did not run into this because they either did not
completely inline the irda_get_mtt() or did not consider the
10000 value a constant expression.

The code has been wrong since the start of git history.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Cc: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>irda: vlsi_ir: fix check for DMA mapping errors</title>
<updated>2017-12-25T13:22:12+00:00</updated>
<author>
<name>Alexey Khoroshilov</name>
<email>khoroshilov@ispras.ru</email>
</author>
<published>2017-03-24T22:48:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3af547339068ce25c67b3c29844f966dfdaaa50e'/>
<id>urn:sha1:3af547339068ce25c67b3c29844f966dfdaaa50e</id>
<content type='text'>
[ Upstream commit 6ac3b77a6ffff7513ff86b684aa256ea01c0e5b5 ]

vlsi_alloc_ring() checks for DMA mapping errors by comparing
returned address with zero, while pci_dma_mapping_error() should be used.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov &lt;khoroshilov@ispras.ru&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;alexander.levin@verizon.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>mcs7780: Fix initialization when CONFIG_VMAP_STACK is enabled</title>
<updated>2017-08-11T16:08:52+00:00</updated>
<author>
<name>Thomas Jarosch</name>
<email>thomas.jarosch@intra2net.com</email>
</author>
<published>2017-07-22T15:14:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6d1e34ee278f1a9cc7a24cc5025d8e93ab01965c'/>
<id>urn:sha1:6d1e34ee278f1a9cc7a24cc5025d8e93ab01965c</id>
<content type='text'>
[ Upstream commit 9476d393667968b4a02afbe9d35a3558482b943e ]

DMA transfers are not allowed to buffers that are on the stack.
Therefore allocate a buffer to store the result of usb_control_message().

Fixes these bugreports:
https://bugzilla.kernel.org/show_bug.cgi?id=195217

https://bugzilla.redhat.com/show_bug.cgi?id=1421387
https://bugzilla.redhat.com/show_bug.cgi?id=1427398

Shortened kernel backtrace from 4.11.9-200.fc25.x86_64:
kernel: ------------[ cut here ]------------
kernel: WARNING: CPU: 3 PID: 2957 at drivers/usb/core/hcd.c:1587
kernel: transfer buffer not dma capable
kernel: Call Trace:
kernel: dump_stack+0x63/0x86
kernel: __warn+0xcb/0xf0
kernel: warn_slowpath_fmt+0x5a/0x80
kernel: usb_hcd_map_urb_for_dma+0x37f/0x570
kernel: ? try_to_del_timer_sync+0x53/0x80
kernel: usb_hcd_submit_urb+0x34e/0xb90
kernel: ? schedule_timeout+0x17e/0x300
kernel: ? del_timer_sync+0x50/0x50
kernel: ? __slab_free+0xa9/0x300
kernel: usb_submit_urb+0x2f4/0x560
kernel: ? urb_destroy+0x24/0x30
kernel: usb_start_wait_urb+0x6e/0x170
kernel: usb_control_msg+0xdc/0x120
kernel: mcs_get_reg+0x36/0x40 [mcs7780]
kernel: mcs_net_open+0xb5/0x5c0 [mcs7780]
...

Regression goes back to 4.9, so it's a good candidate for -stable.
Though it's the decision of the maintainer.

Thanks to Dan Williams for adding the "transfer buffer not dma capable"
warning in the first place. It instantly pointed me in the right direction.

Patch has been tested with transferring data from a Polar watch.

Signed-off-by: Thomas Jarosch &lt;thomas.jarosch@intra2net.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>net: irda: irda-usb: fix firmware name on big-endian hosts</title>
<updated>2017-05-25T12:30:12+00:00</updated>
<author>
<name>Johan Hovold</name>
<email>johan@kernel.org</email>
</author>
<published>2017-05-12T10:11:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=14d0cafd3f95d08eb0f1f44e32fec1ed0376f474'/>
<id>urn:sha1:14d0cafd3f95d08eb0f1f44e32fec1ed0376f474</id>
<content type='text'>
commit 75cf067953d5ee543b3bda90bbfcbee5e1f94ae8 upstream.

Add missing endianness conversion when using the USB device-descriptor
bcdDevice field to construct a firmware file name.

Fixes: 8ef80aef118e ("[IRDA]: irda-usb.c: STIR421x cleanups")
Cc: Nick Fedchik &lt;nfedchik@atlantic-link.com.ua&gt;
Signed-off-by: Johan Hovold &lt;johan@kernel.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>net: irda: Fix use-after-free in irtty_open()</title>
<updated>2016-04-12T16:08:49+00:00</updated>
<author>
<name>Peter Hurley</name>
<email>peter@hurleysoftware.com</email>
</author>
<published>2016-01-10T01:48:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=456db805f77c45611caa217996dcb93f24afb2e5'/>
<id>urn:sha1:456db805f77c45611caa217996dcb93f24afb2e5</id>
<content type='text'>
commit 401879c57f01cbf2da204ad2e8db910525c6dbea upstream.

The N_IRDA line discipline may access the previous line discipline's closed
and already-fre private data on open [1].

The tty-&gt;disc_data field _never_ refers to valid data on entry to the
line discipline's open() method. Rather, the ldisc is expected to
initialize that field for its own use for the lifetime of the instance
(ie. from open() to close() only).

[1]
    ==================================================================
    BUG: KASAN: use-after-free in irtty_open+0x422/0x550 at addr ffff8800331dd068
    Read of size 4 by task a.out/13960
    =============================================================================
    BUG kmalloc-512 (Tainted: G    B          ): kasan: bad access detected
    -----------------------------------------------------------------------------
    ...
    Call Trace:
     [&lt;ffffffff815fa2ae&gt;] __asan_report_load4_noabort+0x3e/0x40 mm/kasan/report.c:279
     [&lt;ffffffff836938a2&gt;] irtty_open+0x422/0x550 drivers/net/irda/irtty-sir.c:436
     [&lt;ffffffff829f1b80&gt;] tty_ldisc_open.isra.2+0x60/0xa0 drivers/tty/tty_ldisc.c:447
     [&lt;ffffffff829f21c0&gt;] tty_set_ldisc+0x1a0/0x940 drivers/tty/tty_ldisc.c:567
     [&lt;     inline     &gt;] tiocsetd drivers/tty/tty_io.c:2650
     [&lt;ffffffff829da49e&gt;] tty_ioctl+0xace/0x1fd0 drivers/tty/tty_io.c:2883
     [&lt;     inline     &gt;] vfs_ioctl fs/ioctl.c:43
     [&lt;ffffffff816708ac&gt;] do_vfs_ioctl+0x57c/0xe60 fs/ioctl.c:607
     [&lt;     inline     &gt;] SYSC_ioctl fs/ioctl.c:622
     [&lt;ffffffff81671204&gt;] SyS_ioctl+0x74/0x80 fs/ioctl.c:613
     [&lt;ffffffff852a7876&gt;] entry_SYSCALL_64_fastpath+0x16/0x7a

Reported-and-tested-by: Dmitry Vyukov &lt;dvyukov@google.com&gt;
Signed-off-by: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>net: irda: pxaficp_ir: dmaengine conversion</title>
<updated>2015-09-29T05:32:48+00:00</updated>
<author>
<name>Robert Jarzmik</name>
<email>robert.jarzmik@free.fr</email>
</author>
<published>2015-09-26T18:49:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1273bc573ab13b9c76053fe0403dca7d8acffa78'/>
<id>urn:sha1:1273bc573ab13b9c76053fe0403dca7d8acffa78</id>
<content type='text'>
Convert pxaficp_ir to dmaengine. As pxa architecture is shifting from
raw DMA registers access to pxa_dma dmaengine driver, convert this
driver to dmaengine.

Signed-off-by: Robert Jarzmik &lt;robert.jarzmik@free.fr&gt;
Tested-by: Petr Cvek &lt;petr.cvek@tul.cz&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: irda: pxaficp_ir: convert to readl and writel</title>
<updated>2015-09-29T05:32:48+00:00</updated>
<author>
<name>Robert Jarzmik</name>
<email>robert.jarzmik@free.fr</email>
</author>
<published>2015-09-26T18:49:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=89fa57244aa170bb344cdb5be35afdeefc219fbd'/>
<id>urn:sha1:89fa57244aa170bb344cdb5be35afdeefc219fbd</id>
<content type='text'>
Convert the pxa IRDA driver to readl and writel primitives, and remove
another set of direct registers access. This leaves only the DMA
registers access, which will be dealt with dmaengine conversion.

Signed-off-by: Robert Jarzmik &lt;robert.jarzmik@free.fr&gt;
Tested-by: Petr Cvek &lt;petr.cvek@tul.cz&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: irda: pxaficp_ir: use sched_clock() for time management</title>
<updated>2015-09-29T05:32:48+00:00</updated>
<author>
<name>Robert Jarzmik</name>
<email>robert.jarzmik@free.fr</email>
</author>
<published>2015-09-26T18:49:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=be01891e4606bc6aaa2b12fbade1aca8eb467a16'/>
<id>urn:sha1:be01891e4606bc6aaa2b12fbade1aca8eb467a16</id>
<content type='text'>
Instead of using directly the OS timer through direct register access,
use the standard sched_clock(), which will end up in OSCR reading
anyway.

This is a first step for direct access register removal and machine
specific code removal from this driver.

This commit changes the behavior, as previously the minimum turnaround
time was counted in 76ns steps, while with this patch it is counted in
microsecond steps. The strictly equal formula would have been :
	    while ((sched_clock() - si-&gt;last_clk) * 76 &lt; mtt)

Signed-off-by: Robert Jarzmik &lt;robert.jarzmik@free.fr&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>irda: ali-ircc: Fix deadlock in ali_ircc_sir_change_speed()</title>
<updated>2015-09-11T23:18:33+00:00</updated>
<author>
<name>Alexey Khoroshilov</name>
<email>khoroshilov@ispras.ru</email>
</author>
<published>2015-09-11T21:34:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e8684c88774c0ddfeefdbed0aa469b25b9962f3e'/>
<id>urn:sha1:e8684c88774c0ddfeefdbed0aa469b25b9962f3e</id>
<content type='text'>
ali_ircc_sir_change_speed() is always called with self-&gt;lock held,
so acquiring the lock inside it leads to unavoidable deadlock.

Call graph:
ali_ircc_sir_change_speed() is called from ali_ircc_change_speed()
  ali_ircc_fir_hard_xmit() under spin_lock_irqsave(&amp;self-&gt;lock, flags);
  ali_ircc_sir_hard_xmit() under spin_lock_irqsave(&amp;self-&gt;lock, flags);
  ali_ircc_net_ioctl() under spin_lock_irqsave(&amp;self-&gt;lock, flags);
  ali_ircc_dma_xmit_complete()
    ali_ircc_fir_interrupt()
      ali_ircc_interrupt() under spin_lock(&amp;self-&gt;lock);
  ali_ircc_sir_write_wakeup()
    ali_ircc_sir_interrupt()
      ali_ircc_interrupt() under spin_lock(&amp;self-&gt;lock);

The patch removes spin_lock/unlock from ali_ircc_sir_change_speed().

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov &lt;khoroshilov@ispras.ru&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>irda: irda-usb: use msecs_to_jiffies for conversions</title>
<updated>2015-05-25T21:39:21+00:00</updated>
<author>
<name>Nicholas Mc Guire</name>
<email>hofrat@osadl.org</email>
</author>
<published>2015-05-23T12:46:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bbfe0f37aee52d39999d5e475e1172a58f958a82'/>
<id>urn:sha1:bbfe0f37aee52d39999d5e475e1172a58f958a82</id>
<content type='text'>
API compliance scanning with coccinelle flagged:

Converting milliseconds to jiffies by "val * HZ / 1000" is technically
is not a clean solution as it does not handle all corner cases correctly.
By changing the conversion to use msecs_to_jiffies(val) conversion is
correct in all cases.

in the current code:
  mod_timer(&amp;self-&gt;rx_defer_timer, jiffies + (10 * HZ / 1000));
for HZ &lt; 100 (e.g. CONFIG_HZ == 64|32 in alpha) this effectively results
in no delay at all.

Patch was compile tested for x86_64_defconfig (implies CONFIG_USB_IRDA=m)

Patch is against 4.1-rc4 (localversion-next is -next-20150522)

Signed-off-by: Nicholas Mc Guire &lt;hofrat@osadl.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
