<feed xmlns='http://www.w3.org/2005/Atom'>
<title>blackbird-op-linux/drivers/net/can/m_can, branch master</title>
<subtitle>Blackbird™ Linux sources for OpenPOWER</subtitle>
<id>https://git.raptorcs.com/git/blackbird-op-linux/atom?h=master</id>
<link rel='self' href='https://git.raptorcs.com/git/blackbird-op-linux/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-op-linux/'/>
<updated>2020-01-02T14:34:26+00:00</updated>
<entry>
<title>can: tcan4x5x: tcan4x5x_parse_config(): fix inconsistent IS_ERR and PTR_ERR</title>
<updated>2020-01-02T14:34:26+00:00</updated>
<author>
<name>Gustavo A. R. Silva</name>
<email>gustavo@embeddedor.com</email>
</author>
<published>2019-12-10T15:05:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-op-linux/commit/?id=93bdc0eb0b4bb5e7094fd4a95f4a394e4a927e09'/>
<id>urn:sha1:93bdc0eb0b4bb5e7094fd4a95f4a394e4a927e09</id>
<content type='text'>
Fix inconsistent IS_ERR and PTR_ERR in tcan4x5x_parse_config().

The proper pointer to be passed as argument is tcan4x5x-&gt;device_wake_gpio.

This bug was detected with the help of Coccinelle.

Fixes: 2de497356955 ("can: tcan45x: Make wake-up GPIO an optional GPIO")
Signed-off-by: Gustavo A. R. Silva &lt;gustavo@embeddedor.com&gt;
Acked-by: Dan Murphy &lt;dmurphy@ti.com&gt;
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>can: tcan4x5x: tcan4x5x_parse_config(): Disable the INH pin device-state GPIO is unavailable</title>
<updated>2020-01-02T14:34:26+00:00</updated>
<author>
<name>Dan Murphy</name>
<email>dmurphy@ti.com</email>
</author>
<published>2019-12-12T16:15:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-op-linux/commit/?id=5a1f8f5e5efa8d536d75ab532714ec248dd6da2b'/>
<id>urn:sha1:5a1f8f5e5efa8d536d75ab532714ec248dd6da2b</id>
<content type='text'>
If the device state GPIO is not connected to the host then disable the
INH output from the TCAN device per section 8.3.5 of the data sheet.

Signed-off-by: Dan Murphy &lt;dmurphy@ti.com&gt;
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>can: tcan4x5x: tcan4x5x_parse_config(): reset device before register access</title>
<updated>2020-01-02T14:34:26+00:00</updated>
<author>
<name>Sean Nyekjaer</name>
<email>sean@geanix.com</email>
</author>
<published>2019-12-11T13:58:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-op-linux/commit/?id=c3083124e6a1c0d6cd4fe3b3f627b488bd3b10c4'/>
<id>urn:sha1:c3083124e6a1c0d6cd4fe3b3f627b488bd3b10c4</id>
<content type='text'>
It's a good idea to reset a ip-block/spi device before using it, this
patch will reset the device.

And a generic reset function if needed elsewhere.

Signed-off-by: Sean Nyekjaer &lt;sean@geanix.com&gt;
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>can: tcan4x5x: tcan4x5x_can_probe(): turn on the power before parsing the config</title>
<updated>2020-01-02T14:34:26+00:00</updated>
<author>
<name>Dan Murphy</name>
<email>dmurphy@ti.com</email>
</author>
<published>2019-12-10T16:32:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-op-linux/commit/?id=3814ca3a10be795693e9d95142c69134c6189a9b'/>
<id>urn:sha1:3814ca3a10be795693e9d95142c69134c6189a9b</id>
<content type='text'>
The tcan4x5x_parse_config() function now performs action on the device
either reading or writing and a reset. If the devive has a switchable
power supppy (i.e. regulator is managed) it needs to be turned on.

So turn on the regulator if available. If the parsing fails, turn off
the regulator.

Fixes: 2de497356955 ("can: tcan45x: Make wake-up GPIO an optional GPIO")
Signed-off-by: Dan Murphy &lt;dmurphy@ti.com&gt;
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>can: tcan4x5x: tcan4x5x_can_probe(): get the device out of standby before register access</title>
<updated>2020-01-02T14:34:26+00:00</updated>
<author>
<name>Sean Nyekjaer</name>
<email>sean@geanix.com</email>
</author>
<published>2019-12-11T13:58:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-op-linux/commit/?id=3069ce620daed85e4ef2b0c087dca2509f809470'/>
<id>urn:sha1:3069ce620daed85e4ef2b0c087dca2509f809470</id>
<content type='text'>
The m_can tries to detect if Non ISO Operation is available while in
standby mode, this function results in the following error:

| tcan4x5x spi2.0 (unnamed net_device) (uninitialized): Failed to init module
| tcan4x5x spi2.0: m_can device registered (irq=84, version=32)
| tcan4x5x spi2.0 can2: TCAN4X5X successfully initialized.

When the tcan device comes out of reset it goes in standby mode. The
m_can driver tries to access the control register but fails due to the
device being in standby mode.

So this patch will put the tcan device in normal mode before the m_can
driver does the initialization.

Fixes: 5443c226ba91 ("can: tcan4x5x: Add tcan4x5x driver to the kernel")
Cc: stable@vger.kernel.org
Signed-off-by: Sean Nyekjaer &lt;sean@geanix.com&gt;
Acked-by: Dan Murphy &lt;dmurphy@ti.com&gt;
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>can: tcan45x: Make wake-up GPIO an optional GPIO</title>
<updated>2019-12-08T11:22:01+00:00</updated>
<author>
<name>Dan Murphy</name>
<email>dmurphy@ti.com</email>
</author>
<published>2019-12-04T17:51:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-op-linux/commit/?id=2de497356955ce58cd066fb03d2da5235f3c7c23'/>
<id>urn:sha1:2de497356955ce58cd066fb03d2da5235f3c7c23</id>
<content type='text'>
The device has the ability to disable the wake-up pin option. The
wake-up pin can be either force to GND or Vsup and does not have to be
tied to a GPIO. In order for the device to not use the wake-up feature
write the register to disable the WAKE_CONFIG option.

Signed-off-by: Dan Murphy &lt;dmurphy@ti.com&gt;
Cc: Sean Nyekjaer &lt;sean@geanix.com&gt;
Reviewed-by: Sean Nyekjaer &lt;sean@geanix.com&gt;
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>can: m_can: tcan4x5x: add required delay after reset</title>
<updated>2019-12-08T11:22:01+00:00</updated>
<author>
<name>Sean Nyekjaer</name>
<email>sean@geanix.com</email>
</author>
<published>2019-12-06T15:29:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-op-linux/commit/?id=60552253e29c8860ee5bf1e6064591b0917c0394'/>
<id>urn:sha1:60552253e29c8860ee5bf1e6064591b0917c0394</id>
<content type='text'>
According to section "8.3.8 RST Pin" in the datasheet we are required to
wait &gt;700us after the device is reset.

Signed-off-by: Sean Nyekjaer &lt;sean@geanix.com&gt;
Acked-by: Dan Murphy &lt;dmurphy@ti.com&gt;
Cc: linux-stable &lt;stable@vger.kernel.org&gt; # &gt;= v5.4
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net</title>
<updated>2019-11-23T00:27:24+00:00</updated>
<author>
<name>Jakub Kicinski</name>
<email>jakub.kicinski@netronome.com</email>
</author>
<published>2019-11-23T00:27:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-op-linux/commit/?id=a9f852e92e40992c4ff09ac3940f7725e016317a'/>
<id>urn:sha1:a9f852e92e40992c4ff09ac3940f7725e016317a</id>
<content type='text'>
Minor conflict in drivers/s390/net/qeth_l2_main.c, kept the lock
from commit c8183f548902 ("s390/qeth: fix potential deadlock on
workqueue flush"), removed the code which was removed by commit
9897d583b015 ("s390/qeth: consolidate some duplicated HW cmd code").

Signed-off-by: Jakub Kicinski &lt;jakub.kicinski@netronome.com&gt;
</content>
</entry>
<entry>
<title>can: m_can_platform: remove unnecessary m_can_class_resume() call</title>
<updated>2019-11-22T14:34:37+00:00</updated>
<author>
<name>Pankaj Sharma</name>
<email>pankj.sharma@samsung.com</email>
</author>
<published>2019-11-19T10:20:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-op-linux/commit/?id=0704c57436947c9f9f6472fd1a5ade41fc4c19d8'/>
<id>urn:sha1:0704c57436947c9f9f6472fd1a5ade41fc4c19d8</id>
<content type='text'>
The function m_can_runtime_resume() is getting recursively called from
m_can_class_resume(). This results in a lock up.

We need not call m_can_class_resume() during m_can_runtime_resume().

Fixes: f524f829b75a ("can: m_can: Create a m_can platform framework")
Signed-off-by: Pankaj Sharma &lt;pankj.sharma@samsung.com&gt;
Signed-off-by: Sriram Dash &lt;sriram.dash@samsung.com&gt;
Acked-by: Dan Murphy &lt;dmurphy@ti.com&gt;
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>can: m_can_platform: set net_device structure as driver data</title>
<updated>2019-11-22T14:32:32+00:00</updated>
<author>
<name>Pankaj Sharma</name>
<email>pankj.sharma@samsung.com</email>
</author>
<published>2019-11-19T10:20:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/blackbird-op-linux/commit/?id=2ea872490e18cb0d6558de518d8fc35f5671567d'/>
<id>urn:sha1:2ea872490e18cb0d6558de518d8fc35f5671567d</id>
<content type='text'>
The current code is failing during clock prepare enable because of not
getting proper clock from platform device.

[    0.852089] Call trace:
[    0.854516]  0xffff0000fa22a668
[    0.857638]  clk_prepare+0x20/0x34
[    0.861019]  m_can_runtime_resume+0x2c/0xe4
[    0.865180]  pm_generic_runtime_resume+0x28/0x38
[    0.869770]  __rpm_callback+0x16c/0x1bc
[    0.873583]  rpm_callback+0x24/0x78
[    0.877050]  rpm_resume+0x428/0x560
[    0.880517]  __pm_runtime_resume+0x7c/0xa8
[    0.884593]  m_can_clk_start.isra.9.part.10+0x1c/0xa8
[    0.889618]  m_can_class_register+0x138/0x370
[    0.893950]  m_can_plat_probe+0x120/0x170
[    0.897939]  platform_drv_probe+0x4c/0xa0
[    0.901924]  really_probe+0xd8/0x31c
[    0.905477]  driver_probe_device+0x58/0xe8
[    0.909551]  device_driver_attach+0x68/0x70
[    0.913711]  __driver_attach+0x9c/0xf8
[    0.917437]  bus_for_each_dev+0x50/0xa0
[    0.921251]  driver_attach+0x20/0x28
[    0.924804]  bus_add_driver+0x148/0x1fc
[    0.928617]  driver_register+0x6c/0x124
[    0.932431]  __platform_driver_register+0x48/0x50
[    0.937113]  m_can_plat_driver_init+0x18/0x20
[    0.941446]  do_one_initcall+0x4c/0x19c
[    0.945259]  kernel_init_freeable+0x1d0/0x280
[    0.949591]  kernel_init+0x10/0x100
[    0.953057]  ret_from_fork+0x10/0x18
[    0.956614] Code: 00000000 00000000 00000000 00000000 (fa22a668)
[    0.962681] ---[ end trace 881f71bd609de763 ]---
[    0.967301] Kernel panic - not syncing: Attempted to kill init!

A device driver for CAN controller hardware registers itself with the
Linux network layer as a network device. So, the driver data for m_can
should ideally be of type net_device.

Fixes: f524f829b75a ("can: m_can: Create a m_can platform framework")
Signed-off-by: Pankaj Sharma &lt;pankj.sharma@samsung.com&gt;
Signed-off-by: Sriram Dash &lt;sriram.dash@samsung.com&gt;
Acked-by: Dan Murphy &lt;dmurphy@ti.com&gt;
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
</content>
</entry>
</feed>
