<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/mcb, branch v4.8</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=v4.8</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.8'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2016-06-14T01:49:30Z</updated>
<entry>
<title>mcb: Acquire reference to carrier module in core</title>
<updated>2016-06-14T01:49:30Z</updated>
<author>
<name>Johannes Thumshirn</name>
<email>jthumshirn@suse.de</email>
</author>
<published>2016-05-10T10:39:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4d2ec8575357d4afc965564e2e910a72fe608d39'/>
<id>urn:sha1:4d2ec8575357d4afc965564e2e910a72fe608d39</id>
<content type='text'>
Acquire a reference to the carrier's kernel module in bus code, so
it can't be removed from the kernel while it still has a bus and thus
possibly devices attached to it.

Signed-off-by: Johannes Thumshirn &lt;jthumshirn@suse.de&gt;
Reported-by: Andreas Werner &lt;andreas.werner@men.de&gt;
Tested-by: Andreas Werner &lt;andreas.werner@men.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>mcb: Acquire reference to device in probe</title>
<updated>2016-06-14T01:49:30Z</updated>
<author>
<name>Johannes Thumshirn</name>
<email>jthumshirn@suse.de</email>
</author>
<published>2016-05-10T10:39:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7bc364097a89a0a9a5e5e4989d6b3e6fb2027a9e'/>
<id>urn:sha1:7bc364097a89a0a9a5e5e4989d6b3e6fb2027a9e</id>
<content type='text'>
mcb_probe() does not aqcuire a reference to the probed device but drops one
when removing the device. As it is actually using the device, it should grab
a reference via get_device().

This could lead to a panic found with a rmmod/modprobe stress test

Signed-off-by: Johannes Thumshirn &lt;jthumshirn@suse.de&gt;
Reported-by: Andreas Werner &lt;andreas.werner@men.de&gt;
Tested-by: Andreas Werner &lt;andreas.werner@men.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>mcb: Delete num_cells variable which is not required</title>
<updated>2016-05-03T22:52:28Z</updated>
<author>
<name>Andreas Werner</name>
<email>andreas.werner@men.de</email>
</author>
<published>2016-05-03T10:42:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8cd1f9d01cbf4f46eace90d9792e65a209c37d31'/>
<id>urn:sha1:8cd1f9d01cbf4f46eace90d9792e65a209c37d31</id>
<content type='text'>
The num_cells variable is only used in the dev_dbg print,
but we can directly use the ret variable which also includes the same
value.

Signed-off-by: Andreas Werner &lt;andreas.werner@men.de&gt;
Signed-off-by: Johannes Thumshirn &lt;jthumshirn@suse.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>mcb: Fixed bar number assignment for the gdd</title>
<updated>2016-05-03T22:52:28Z</updated>
<author>
<name>Andreas Werner</name>
<email>andreas.werner@men.de</email>
</author>
<published>2016-05-03T10:42:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f75564d343010b025301d9548f2304f48eb25f01'/>
<id>urn:sha1:f75564d343010b025301d9548f2304f48eb25f01</id>
<content type='text'>
The bar number is found in reg2 within the gdd. Therefore
we need to change the assigment from reg1 to reg2 which
is the correct location.

Signed-off-by: Andreas Werner &lt;andreas.werner@men.de&gt;
Fixes: '3764e82e5' drivers: Introduce MEN Chameleon Bus
Cc: stable@vger.kernel.org # v3.15+
Signed-off-by: Johannes Thumshirn &lt;jthumshirn@suse.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>mcb: Replace ioremap and request_region with the devm version</title>
<updated>2016-05-03T22:52:28Z</updated>
<author>
<name>Andreas Werner</name>
<email>andreas.werner@men.de</email>
</author>
<published>2016-05-03T10:42:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d19366f1d66705d9b07e9beff9c50896606b8e44'/>
<id>urn:sha1:d19366f1d66705d9b07e9beff9c50896606b8e44</id>
<content type='text'>
Replaced ioremap with devm_ioremap and request_mem_region with
devm_request_mem_region. This makes the code much more cleaner.

Signed-off-by: Andreas Werner &lt;andreas.werner@men.de&gt;
Signed-off-by: Johannes Thumshirn &lt;jthumshirn@suse.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>mcb: Implement bus-&gt;dev.release callback</title>
<updated>2016-05-03T22:52:28Z</updated>
<author>
<name>Johannes Thumshirn</name>
<email>jthumshirn@suse.de</email>
</author>
<published>2016-05-03T10:42:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5d9e2ab9fea4cdf0a2522f5cbed2e7fbb220d757'/>
<id>urn:sha1:5d9e2ab9fea4cdf0a2522f5cbed2e7fbb220d757</id>
<content type='text'>
The mcb_bus structure previously was released in mcb_release_bus. This lead to
the following warning on module unload:

------------[ cut here ]------------
WARNING: CPU: 1 PID: 2032 at drivers/base/core.c:251 device_release+0x73/0x90
Device 'mcb:0' does not have a release() function, it is broken and must be fixed.
Modules linked in: men_z135_uart mcb_pci(-) mcb
CPU: 1 PID: 2032 Comm: rmmod Not tainted 4.6.0-rc4+ #3
Hardware name: N/A N/A/COMe-mBTi10, BIOS MVV1R921 X64 10/14/2015
 00000286 00000286 c0117de4 c12d6f16 c0117e2c c18be0d3 c0117dfc c104f6e1
 000000fb f5ccbe08 f5ccbe00 f5c64600 c0117e18 c104f728 00000009 00000000
 c0117e10 c18db674 c0117e2c c0117e3c c13ce5c3 c18be0d3 000000fb c18db674
Call Trace:
 [&lt;c12d6f16&gt;] dump_stack+0x47/0x61
 [&lt;c104f6e1&gt;] __warn+0xc1/0xe0
 [&lt;c104f728&gt;] warn_slowpath_fmt+0x28/0x30
 [&lt;c13ce5c3&gt;] device_release+0x73/0x90
 [&lt;c12d92e4&gt;] kobject_release+0x34/0x80
 [&lt;c12d929d&gt;] ? kobject_del+0x2d/0x40
 [&lt;c12d9205&gt;] kobject_put+0x25/0x50
 [&lt;c13ce77f&gt;] put_device+0xf/0x20
 [&lt;c13d114b&gt;] klist_devices_put+0xb/0x10
 [&lt;c1752673&gt;] klist_next+0x73/0xf0
 [&lt;c13d1140&gt;] ? unbind_store+0x100/0x100
 [&lt;f8a23370&gt;] ? mcb_bus_add_devices+0x30/0x30 [mcb]
 [&lt;c13d0a81&gt;] bus_for_each_dev+0x51/0x80
 [&lt;f8a23319&gt;] mcb_release_bus+0x19/0x40 [mcb]
 [&lt;f8a23370&gt;] ? mcb_bus_add_devices+0x30/0x30 [mcb]
 [&lt;f8a2b033&gt;] mcb_pci_remove+0x13/0x20 [mcb_pci]
 [&lt;c130d358&gt;] pci_device_remove+0x28/0xb0
 [&lt;c13d201b&gt;] __device_release_driver+0x7b/0x110
 [&lt;c13d2847&gt;] driver_detach+0x87/0x90
 [&lt;c13d1b9b&gt;] bus_remove_driver+0x3b/0x80
 [&lt;c13d2ed0&gt;] driver_unregister+0x20/0x50
 [&lt;c130be53&gt;] pci_unregister_driver+0x13/0x60
 [&lt;f8a2b1f4&gt;] mcb_pci_driver_exit+0xd/0xf [mcb_pci]
 [&lt;c10be588&gt;] SyS_delete_module+0x138/0x200
 [&lt;c1159208&gt;] ? ____fput+0x8/0x10
 [&lt;c1068054&gt;] ? task_work_run+0x74/0x90
 [&lt;c1001879&gt;] do_fast_syscall_32+0x69/0x120
 [&lt;c1757597&gt;] sysenter_past_esp+0x40/0x6a
---[ end trace 1ed34c2aa3019875 ]---

Release a mcb_bus' memory on the device's release callback, to avoid above
warning.

Signed-off-by: Johannes Thumshirn &lt;jthumshirn@suse.de&gt;
Reported-by: Andreas Werner &lt;andreas.werner@men.de&gt;
Tested-by: Andreas Werner &lt;andreas.werner@men.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>mcb: export bus information via sysfs</title>
<updated>2016-05-03T22:07:35Z</updated>
<author>
<name>Johannes Thumshirn</name>
<email>jthumshirn@suse.de</email>
</author>
<published>2016-05-03T07:46:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=803f1ca60d5c0107adfbce4e2d70488598b03a80'/>
<id>urn:sha1:803f1ca60d5c0107adfbce4e2d70488598b03a80</id>
<content type='text'>
Export information about the bus stored in the FPGA's header to userspace via
sysfs, instead of hiding it in pr_debug()s from everyone.

Signed-off-by: Johannes Thumshirn &lt;jthumshirn@suse.de&gt;
Reviewed-by: Andreas Werner &lt;andreas.werner@men.de&gt;
Tested-by: Andreas Werner &lt;andreas.werner@men.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>mcb: Correctly initialize the bus's device</title>
<updated>2016-05-03T22:07:35Z</updated>
<author>
<name>Johannes Thumshirn</name>
<email>jthumshirn@suse.de</email>
</author>
<published>2016-05-03T07:46:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=18d28819809909c3f24bb72183a901c5e332a63d'/>
<id>urn:sha1:18d28819809909c3f24bb72183a901c5e332a63d</id>
<content type='text'>
The mcb bus' device member wasn't correctly initialized and thus wasn't placed
correctly into the driver model.

Signed-off-by: Johannes Thumshirn &lt;jthumshirn@suse.de&gt;
Reviewed-by: Andreas Werner &lt;andreas.werner@men.de&gt;
Tested-by: Andreas Werner &lt;andreas.werner@men.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>mcb: Destroy IDA on module unload</title>
<updated>2015-10-29T00:02:16Z</updated>
<author>
<name>Johannes Thumshirn</name>
<email>jthumshirn@suse.de</email>
</author>
<published>2015-10-28T07:22:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=169883a63eb7e34e8e1c92fd451f34a5635c29ad'/>
<id>urn:sha1:169883a63eb7e34e8e1c92fd451f34a5635c29ad</id>
<content type='text'>
Destroy mcb_ida on module_unload

Signed-off-by: Johannes Thumshirn &lt;jthumshirn@suse.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>mcb: Do not return zero on error path in mcb_pci_probe()</title>
<updated>2015-10-29T00:02:16Z</updated>
<author>
<name>Alexey Khoroshilov</name>
<email>khoroshilov@ispras.ru</email>
</author>
<published>2015-10-28T07:22:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=bf25c19979b2ee1019201b809e93b6bca9947cfd'/>
<id>urn:sha1:bf25c19979b2ee1019201b809e93b6bca9947cfd</id>
<content type='text'>
There is an error path in mcb_pci_probe() where
it returns zero instead of error code.

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

Signed-off-by: Alexey Khoroshilov &lt;khoroshilov@ispras.ru&gt;
Signed-off-by: Johannes Thumshirn &lt;jthumshirn@suse.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
