<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/include/linux/mcb.h, branch v4.19.310</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v4.19.310</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v4.19.310'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2023-10-25T09:16:31+00:00</updated>
<entry>
<title>mcb: remove is_added flag from mcb_device struct</title>
<updated>2023-10-25T09:16:31+00:00</updated>
<author>
<name>Jorge Sanjuan Garcia</name>
<email>jorge.sanjuangarcia@duagon.com</email>
</author>
<published>2023-09-06T11:49:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c691fe37c3e9d5670a2552f990b38a4582e47aee'/>
<id>urn:sha1:c691fe37c3e9d5670a2552f990b38a4582e47aee</id>
<content type='text'>
commit 0f28ada1fbf0054557cddcdb93ad17f767105208 upstream.

When calling mcb_bus_add_devices(), both mcb devices and the mcb
bus will attempt to attach a device to a driver because they share
the same bus_type. This causes an issue when trying to cast the
container of the device to mcb_device struct using to_mcb_device(),
leading to a wrong cast when the mcb_bus is added. A crash occurs
when freing the ida resources as the bus numbering of mcb_bus gets
confused with the is_added flag on the mcb_device struct.

The only reason for this cast was to keep an is_added flag on the
mcb_device struct that does not seem necessary. The function
device_attach() handles already bound devices and the mcb subsystem
does nothing special with this is_added flag so remove it completely.

Fixes: 18d288198099 ("mcb: Correctly initialize the bus's device")
Cc: stable &lt;stable@kernel.org&gt;
Signed-off-by: Jorge Sanjuan Garcia &lt;jorge.sanjuangarcia@duagon.com&gt;
Co-developed-by: Jose Javier Rodriguez Barbarin &lt;JoseJavier.Rodriguez@duagon.com&gt;
Signed-off-by: Jose Javier Rodriguez Barbarin &lt;JoseJavier.Rodriguez@duagon.com&gt;
Link: https://lore.kernel.org/r/20230906114901.63174-2-JoseJavier.Rodriguez@duagon.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>mcb: introduce mcb_get_resource()</title>
<updated>2017-08-28T18:51:22+00:00</updated>
<author>
<name>Johannes Thumshirn</name>
<email>jthumshirn@suse.de</email>
</author>
<published>2017-08-02T07:58:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2ce8008711e4837c11e99a94df55406085d0d098'/>
<id>urn:sha1:2ce8008711e4837c11e99a94df55406085d0d098</id>
<content type='text'>
Introduce mcb_get_resource() as a common accessor to a mcb device's memory or
IRQ resources.

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: Add a dma_device to mcb_device</title>
<updated>2016-09-27T10:33:47+00:00</updated>
<author>
<name>Michael Moese</name>
<email>michael.moese@men.de</email>
</author>
<published>2016-09-14T10:05:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2d8784df1a1c11ace4e244780facec1e945c5b4f'/>
<id>urn:sha1:2d8784df1a1c11ace4e244780facec1e945c5b4f</id>
<content type='text'>
When performing DMA operations on a MCB device, the device needed
for using the DMA API is "mcb_device-&gt;bus_carrier".
This is rather lengthy, so a shortcut is introduced to struct mcb_device
in order to ensure the MCB device driver uses the correct device for DMA
operations.

Signed-off-by: Michael Moese &lt;michael.moese@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: remove sub-device handling code</title>
<updated>2016-08-31T11:16:24+00:00</updated>
<author>
<name>Johannes Thumshirn</name>
<email>jthumshirn@suse.de</email>
</author>
<published>2016-08-26T07:35:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b58189b3c5cf54689a0c154e4d9cff918a29ab0b'/>
<id>urn:sha1:b58189b3c5cf54689a0c154e4d9cff918a29ab0b</id>
<content type='text'>
The MEN Chameleon specification states that a chameleon FPGA can include a
bridge descriptor, which then opens up a new bus behind this bridge. MCB
included subdevice handling code in the core, but no support for bus
descriptors in the parser, due to a lack of hardware access.

As this is technically dead code, but it gets executed on a device add,
I've decided to remove it.

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: Introduce type safety for to_mcb_*</title>
<updated>2016-08-31T11:16:24+00:00</updated>
<author>
<name>Johannes Thumshirn</name>
<email>jthumshirn@suse.de</email>
</author>
<published>2016-08-26T07:34:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=68d9671a845e11c4eec1976876c1af5687a55279'/>
<id>urn:sha1:68d9671a845e11c4eec1976876c1af5687a55279</id>
<content type='text'>
The to_mcb_{bus,device,driver}() macros lacked type safety, so convert them to
inline functions to enforce compile time type checking.

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: export bus information via sysfs</title>
<updated>2016-05-03T22:07:35+00:00</updated>
<author>
<name>Johannes Thumshirn</name>
<email>jthumshirn@suse.de</email>
</author>
<published>2016-05-03T07:46:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/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:35+00:00</updated>
<author>
<name>Johannes Thumshirn</name>
<email>jthumshirn@suse.de</email>
</author>
<published>2016-05-03T07:46:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/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: Add support for shared PCI IRQs</title>
<updated>2014-05-28T00:38:11+00:00</updated>
<author>
<name>Johannes Thumshirn</name>
<email>johannes.thumshirn@men.de</email>
</author>
<published>2014-04-24T12:35:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4ec65b77c64504e178d75aaba6ac96f68837416c'/>
<id>urn:sha1:4ec65b77c64504e178d75aaba6ac96f68837416c</id>
<content type='text'>
Add support for shared PCI IRQs to mcb and mcb-pci.

Signed-off-by: Johannes Thumshirn &lt;johannes.thumshirn@men.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>drivers: Introduce MEN Chameleon Bus</title>
<updated>2014-02-28T23:36:37+00:00</updated>
<author>
<name>Johannes Thumshirn</name>
<email>johannes.thumshirn@men.de</email>
</author>
<published>2014-02-26T16:29:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3764e82e5150d87b205c10cd78a9c9ab86fbfa51'/>
<id>urn:sha1:3764e82e5150d87b205c10cd78a9c9ab86fbfa51</id>
<content type='text'>
The MCB (MEN Chameleon Bus) is a Bus specific to MEN Mikroelektronik
FPGA based devices. It is used to identify MCB based IP-Cores within
an FPGA and provide the necessary framework for instantiating drivers
for these devices.

Signed-off-by: Johannes Thumshirn &lt;johannes.thumshirn@men.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
