<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/pci/endpoint, branch v4.17.1</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v4.17.1</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v4.17.1'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2018-04-03T11:38:05+00:00</updated>
<entry>
<title>PCI: endpoint: Make sure that BAR_5 does not have 64-bit flag set when clearing</title>
<updated>2018-04-03T11:38:05+00:00</updated>
<author>
<name>Niklas Cassel</name>
<email>niklas.cassel@axis.com</email>
</author>
<published>2018-03-28T11:50:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6474a4e5546e1e3fbba5081dd201ebed62939278'/>
<id>urn:sha1:6474a4e5546e1e3fbba5081dd201ebed62939278</id>
<content type='text'>
Since a 64-bit BAR consists of a BAR pair, and since there is no
BAR after BAR_5, BAR_5 cannot be 64-bits wide.

This sanity check is done in pci_epc_clear_bar(), so that we don't need
to do this sanity check in all epc-&gt;ops-&gt;clear_bar() implementations.

Signed-off-by: Niklas Cassel &lt;niklas.cassel@axis.com&gt;
Signed-off-by: Lorenzo Pieralisi &lt;lorenzo.pieralisi@arm.com&gt;
Acked-by: Kishon Vijay Abraham I &lt;kishon@ti.com&gt;
</content>
</entry>
<entry>
<title>PCI: endpoint: Make epc-&gt;ops-&gt;clear_bar()/pci_epc_clear_bar() take struct *epf_bar</title>
<updated>2018-04-03T11:38:05+00:00</updated>
<author>
<name>Niklas Cassel</name>
<email>niklas.cassel@axis.com</email>
</author>
<published>2018-03-28T11:50:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=77d08dbdae2e70a446c61f5db763deed5947acf3'/>
<id>urn:sha1:77d08dbdae2e70a446c61f5db763deed5947acf3</id>
<content type='text'>
Make epc-&gt;ops-&gt;clear_bar()/pci_epc_clear_bar() take struct *epf_bar.

This is needed so that epc-&gt;ops-&gt;clear_bar() can clear the BAR pair,
if the BAR is 64-bits wide.

This also makes it possible for pci_epc_clear_bar() to sanity check
the flags.

Signed-off-by: Niklas Cassel &lt;niklas.cassel@axis.com&gt;
Signed-off-by: Lorenzo Pieralisi &lt;lorenzo.pieralisi@arm.com&gt;
Reviewed-by: Gustavo Pimentel &lt;gustavo.pimentel@synopsys.com&gt;
</content>
</entry>
<entry>
<title>PCI: endpoint: Handle 64-bit BARs properly</title>
<updated>2018-04-03T11:38:04+00:00</updated>
<author>
<name>Niklas Cassel</name>
<email>niklas.cassel@axis.com</email>
</author>
<published>2018-03-28T11:50:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fca83058753456528bef62579ae2b50799d7a473'/>
<id>urn:sha1:fca83058753456528bef62579ae2b50799d7a473</id>
<content type='text'>
If a 64-bit BAR was set-up, we need to skip a BAR,
since a 64-bit BAR consists of a BAR pair.

We need to check what BAR width the epc-&gt;ops-&gt;set_bar() specific
implementation actually did set-up, since some drivers, like the
Cadence EP controller, sometimes sets up a 64-bit BAR, even though
a 32-bit BAR was requested.

Signed-off-by: Niklas Cassel &lt;niklas.cassel@axis.com&gt;
Signed-off-by: Lorenzo Pieralisi &lt;lorenzo.pieralisi@arm.com&gt;
Acked-by: Kishon Vijay Abraham I &lt;kishon@ti.com&gt;
</content>
</entry>
<entry>
<title>PCI: endpoint: Setting a BAR size &gt; 4 GB is invalid if 64-bit flag is not set</title>
<updated>2018-04-03T11:23:58+00:00</updated>
<author>
<name>Niklas Cassel</name>
<email>niklas.cassel@axis.com</email>
</author>
<published>2018-03-28T11:50:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f25b5fae29d4e5fe6ae17d3f898a959d72519b6a'/>
<id>urn:sha1:f25b5fae29d4e5fe6ae17d3f898a959d72519b6a</id>
<content type='text'>
Setting a BAR size &gt; 4 GB is invalid if PCI_BASE_ADDRESS_MEM_TYPE_64
flag is not set.

This sanity check is done in pci_epc_set_bar(), so that we don't need
to do this sanity check in all epc-&gt;ops-&gt;set_bar() implementations.

Signed-off-by: Niklas Cassel &lt;niklas.cassel@axis.com&gt;
Signed-off-by: Lorenzo Pieralisi &lt;lorenzo.pieralisi@arm.com&gt;
Acked-by: Kishon Vijay Abraham I &lt;kishon@ti.com&gt;
</content>
</entry>
<entry>
<title>PCI: endpoint: Setting 64-bit/prefetch bit is invalid when IO is set</title>
<updated>2018-04-03T11:23:52+00:00</updated>
<author>
<name>Niklas Cassel</name>
<email>niklas.cassel@axis.com</email>
</author>
<published>2018-03-28T11:50:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3567a4edd6352239586470da1bd5834989425085'/>
<id>urn:sha1:3567a4edd6352239586470da1bd5834989425085</id>
<content type='text'>
If flag PCI_BASE_ADDRESS_SPACE_IO is set, also having any
PCI_BASE_ADDRESS_MEM_* bit set is invalid.

This sanity check is done in pci_epc_set_bar(), so that we don't need
to do this sanity check in all epc-&gt;ops-&gt;set_bar() implementations.

Signed-off-by: Niklas Cassel &lt;niklas.cassel@axis.com&gt;
Signed-off-by: Lorenzo Pieralisi &lt;lorenzo.pieralisi@arm.com&gt;
Acked-by: Kishon Vijay Abraham I &lt;kishon@ti.com&gt;
</content>
</entry>
<entry>
<title>PCI: endpoint: Setting BAR_5 to 64-bits wide is invalid</title>
<updated>2018-04-03T11:23:47+00:00</updated>
<author>
<name>Niklas Cassel</name>
<email>niklas.cassel@axis.com</email>
</author>
<published>2018-03-28T11:50:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f16b1f6fdf631213428ff115ae49ea70c9ac4f2d'/>
<id>urn:sha1:f16b1f6fdf631213428ff115ae49ea70c9ac4f2d</id>
<content type='text'>
Since a 64-bit BAR consists of a BAR pair, and since there is no
BAR after BAR_5, BAR_5 cannot be 64-bits wide.

This sanity check is done in pci_epc_set_bar(), so that we don't need
to do this sanity check in all epc-&gt;ops-&gt;set_bar() implementations.

Signed-off-by: Niklas Cassel &lt;niklas.cassel@axis.com&gt;
Signed-off-by: Lorenzo Pieralisi &lt;lorenzo.pieralisi@arm.com&gt;
Acked-by: Kishon Vijay Abraham I &lt;kishon@ti.com&gt;
</content>
</entry>
<entry>
<title>PCI: endpoint: Simplify epc-&gt;ops-&gt;set_bar()/pci_epc_set_bar()</title>
<updated>2018-04-03T11:23:38+00:00</updated>
<author>
<name>Niklas Cassel</name>
<email>niklas.cassel@axis.com</email>
</author>
<published>2018-03-28T11:50:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bc4a48976f57bc88319bfa32690bcc4b6cef4a29'/>
<id>urn:sha1:bc4a48976f57bc88319bfa32690bcc4b6cef4a29</id>
<content type='text'>
Add barno and flags to struct epf_bar.
That way we can simplify epc-&gt;ops-&gt;set_bar()/pci_epc_set_bar()
by passing a struct *epf_bar instead of a whole lot of arguments.

This is needed so that epc-&gt;ops-&gt;set_bar() implementations can
modify BAR flags. Will be utilized in a succeeding patch.

Signed-off-by: Niklas Cassel &lt;niklas.cassel@axis.com&gt;
Signed-off-by: Lorenzo Pieralisi &lt;lorenzo.pieralisi@arm.com&gt;
Reviewed-by: Gustavo Pimentel &lt;gustavo.pimentel@synopsys.com&gt;
Acked-by: Kishon Vijay Abraham I &lt;kishon@ti.com&gt;
</content>
</entry>
<entry>
<title>PCI: endpoint: BAR width should not depend on sizeof dma_addr_t</title>
<updated>2018-04-03T11:23:30+00:00</updated>
<author>
<name>Niklas Cassel</name>
<email>niklas.cassel@axis.com</email>
</author>
<published>2018-03-28T11:50:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bf597574b6bee5ac741c58da763ad2f10df19065'/>
<id>urn:sha1:bf597574b6bee5ac741c58da763ad2f10df19065</id>
<content type='text'>
If a BAR supports 64-bit width or not depends on the hardware,
and should thus not depend on sizeof(dma_addr_t).

If a certain hardware doesn't support 64-bit BARs, its
epc-&gt;ops-&gt;set_bar() implementation should return -EINVAL
when PCI_BASE_ADDRESS_MEM_TYPE_64 is set.

We can't change pci_epc_set_bar() to only set
PCI_BASE_ADDRESS_MEM_TYPE_64 based on size, since if the user,
for some reason, wants to configure a BAR with a 64-bit width,
even though the BAR size is less than 4 GB, he should be able
to do that.

However, since pci-epf-test is simply a test and not an API,
we can set PCI_BASE_ADDRESS_MEM_TYPE_64 in pci-epf-test itself
only based on size.

Signed-off-by: Niklas Cassel &lt;niklas.cassel@axis.com&gt;
Signed-off-by: Lorenzo Pieralisi &lt;lorenzo.pieralisi@arm.com&gt;
Acked-by: Kishon Vijay Abraham I &lt;kishon@ti.com&gt;
</content>
</entry>
<entry>
<title>PCI: endpoint: Remove goto labels in pci_epf_create()</title>
<updated>2018-03-01T11:58:54+00:00</updated>
<author>
<name>Rolf Evers-Fischer</name>
<email>rolf.evers.fischer@aptiv.com</email>
</author>
<published>2018-02-28T17:32:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=50ee106137f2947958b2931de853010582e9d719'/>
<id>urn:sha1:50ee106137f2947958b2931de853010582e9d719</id>
<content type='text'>
Remove the pci_epf_create() goto labels completely and handle the
errors at the respective call site to simplify the function error
handling.

Signed-off-by: Rolf Evers-Fischer &lt;rolf.evers.fischer@aptiv.com&gt;
Signed-off-by: Lorenzo Pieralisi &lt;lorenzo.pieralisi@arm.com&gt;
</content>
</entry>
<entry>
<title>PCI: endpoint: Fix kernel panic after put_device()</title>
<updated>2018-03-01T11:58:45+00:00</updated>
<author>
<name>Rolf Evers-Fischer</name>
<email>rolf.evers.fischer@aptiv.com</email>
</author>
<published>2018-02-28T17:32:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9eef6a5c3b0bf90eb292d462ea267bcb6ad1c334'/>
<id>urn:sha1:9eef6a5c3b0bf90eb292d462ea267bcb6ad1c334</id>
<content type='text'>
'put_device()' calls the relase function 'pci_epf_dev_release()',
which already frees 'epf-&gt;name' and 'epf'.

Therefore we must not free them again after 'put_device()'.

Fixes: 5e8cb4033807 ("PCI: endpoint: Add EP core layer to enable EP controller and EP functions")

Signed-off-by: Rolf Evers-Fischer &lt;rolf.evers.fischer@aptiv.com&gt;
Signed-off-by: Lorenzo Pieralisi &lt;lorenzo.pieralisi@arm.com&gt;
Acked-by: Kishon Vijay Abraham I &lt;kishon@ti.com&gt;
Reviewed-by: Andy Shevchenko &lt;andy.shevchenko@gmail.com&gt;
</content>
</entry>
</feed>
