<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/pci/switch, branch v6.19.11</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.19.11</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.19.11'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2025-08-28T15:39:54+00:00</updated>
<entry>
<title>PCI: switchtec: Replace manual locks with guard</title>
<updated>2025-08-28T15:39:54+00:00</updated>
<author>
<name>Erick Karanja</name>
<email>karanja99erick@gmail.com</email>
</author>
<published>2025-08-28T09:35:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f2543da14dc2b9bee337f1f9466ab3fedae1cd84'/>
<id>urn:sha1:f2543da14dc2b9bee337f1f9466ab3fedae1cd84</id>
<content type='text'>
Replace lock/unlock pairs with guards to simplify and tidy up the code.

Generated-by: Coccinelle SmPL

Signed-off-by: Erick Karanja &lt;karanja99erick@gmail.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Reviewed-by: Logan Gunthorpe &lt;logang@deltatee.com&gt;
Link: https://patch.msgid.link/20250828093556.810911-1-karanja99erick@gmail.com
</content>
</entry>
<entry>
<title>PCI: switchtec: Add Microchip PCI100X device IDs</title>
<updated>2025-01-21T16:47:28+00:00</updated>
<author>
<name>Rakesh Babu Saladi</name>
<email>Saladi.Rakeshbabu@microchip.com</email>
</author>
<published>2025-01-20T09:55:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a3282f84b2151d254dc4abf24d1255c6382be774'/>
<id>urn:sha1:a3282f84b2151d254dc4abf24d1255c6382be774</id>
<content type='text'>
Add Microchip parts to the Device ID table so the driver supports PCI100x
devices.

Add a new macro to quirk the Microchip Switchtec PCI100x parts to allow DMA
access via NTB to work when the IOMMU is turned on.

PCI100x family has 6 variants; each variant is designed for different
application usages, different port counts and lane counts:

  PCI1001 has 1 x4 upstream port and 3 x4 downstream ports
  PCI1002 has 1 x4 upstream port and 4 x2 downstream ports
  PCI1003 has 2 x4 upstream ports, 2 x2 upstream ports, and 2 x2
    downstream ports
  PCI1004 has 4 x4 upstream ports
  PCI1005 has 1 x4 upstream port and 6 x2 downstream ports
  PCI1006 has 6 x2 upstream ports and 2 x2 downstream ports

[Historical note: these parts use PCI_VENDOR_ID_EFAR (0x1055), from EFAR
Microsystems, which was acquired in 1996 by Standard Microsystems Corp,
which was acquired by Microchip Technology in 2012.  The PCI-SIG confirms
that Vendor ID 0x1055 is assigned to Microchip even though it's not
visible via https://pcisig.com/membership/member-companies]

Link: https://lore.kernel.org/r/20250120095524.243103-1-Saladi.Rakeshbabu@microchip.com
Signed-off-by: Rakesh Babu Saladi &lt;Saladi.Rakeshbabu@microchip.com&gt;
[bhelgaas: Vendor ID history]
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Acked-By: Logan Gunthorpe &lt;logang@deltatee.com&gt;
</content>
</entry>
<entry>
<title>PCI: switchtec: Make switchtec_class constant</title>
<updated>2024-06-10T20:03:30+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2024-06-10T08:20:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8a74e4eaa72c14f997df6d820effb6aac400d470'/>
<id>urn:sha1:8a74e4eaa72c14f997df6d820effb6aac400d470</id>
<content type='text'>
Now that the driver core allows for struct class to be in read-only memory,
we should make all 'class' structures declared at build time placing them
into read-only memory, instead of having to be dynamically allocated at
runtime.

Link: https://lore.kernel.org/r/2024061053-online-unwound-b173@gregkh
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Reviewed-by: Dave Jiang &lt;dave.jiang@intel.com&gt;
Reviewed-By: Logan Gunthorpe &lt;logang@deltatee.com&gt;
Cc: Kurt Schwemmer &lt;kurt.schwemmer@microsemi.com&gt;
Cc: Jon Mason &lt;jdmason@kudzu.us&gt;
Cc: Allen Hubbe &lt;allenbh@gmail.com&gt;
</content>
</entry>
<entry>
<title>PCI: switchtec: Fix an error handling path in switchtec_pci_probe()</title>
<updated>2024-02-08T21:35:38+00:00</updated>
<author>
<name>Christophe JAILLET</name>
<email>christophe.jaillet@wanadoo.fr</email>
</author>
<published>2023-12-24T14:30:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=dec529b0b0572b32f9eb91c882dd1f08ca657efb'/>
<id>urn:sha1:dec529b0b0572b32f9eb91c882dd1f08ca657efb</id>
<content type='text'>
The commit in Fixes changed the logic on how resources are released and
introduced a new switchtec_exit_pci() that need to be called explicitly in
order to undo a corresponding switchtec_init_pci().

This was done in the remove function, but not in the probe.

Fix the probe now.

Fixes: df25461119d9 ("PCI: switchtec: Fix stdev_release() crash after surprise hot remove")
Link: https://lore.kernel.org/r/01446d2ccb91a578239915812f2b7dfbeb2882af.1703428183.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Christophe JAILLET &lt;christophe.jaillet@wanadoo.fr&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
</content>
</entry>
<entry>
<title>PCI: switchtec: Fix stdev_release() crash after surprise hot remove</title>
<updated>2023-11-22T15:44:06+00:00</updated>
<author>
<name>Daniel Stodden</name>
<email>dns@arista.com</email>
</author>
<published>2023-11-22T04:23:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=df25461119d987b8c81d232cfe4411e91dcabe66'/>
<id>urn:sha1:df25461119d987b8c81d232cfe4411e91dcabe66</id>
<content type='text'>
A PCI device hot removal may occur while stdev-&gt;cdev is held open. The call
to stdev_release() then happens during close or exit, at a point way past
switchtec_pci_remove(). Otherwise the last ref would vanish with the
trailing put_device(), just before return.

At that later point in time, the devm cleanup has already removed the
stdev-&gt;mmio_mrpc mapping. Also, the stdev-&gt;pdev reference was not a counted
one. Therefore, in DMA mode, the iowrite32() in stdev_release() will cause
a fatal page fault, and the subsequent dma_free_coherent(), if reached,
would pass a stale &amp;stdev-&gt;pdev-&gt;dev pointer.

Fix by moving MRPC DMA shutdown into switchtec_pci_remove(), after
stdev_kill(). Counting the stdev-&gt;pdev ref is now optional, but may prevent
future accidents.

Reproducible via the script at
https://lore.kernel.org/r/20231113212150.96410-1-dns@arista.com

Link: https://lore.kernel.org/r/20231122042316.91208-2-dns@arista.com
Signed-off-by: Daniel Stodden &lt;dns@arista.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Reviewed-by: Logan Gunthorpe &lt;logang@deltatee.com&gt;
Reviewed-by: Dmitry Safonov &lt;dima@arista.com&gt;
</content>
</entry>
<entry>
<title>PCI: switchtec: Add support for PCIe Gen5 devices</title>
<updated>2023-08-09T19:16:44+00:00</updated>
<author>
<name>Kelvin Cao</name>
<email>kelvin.cao@microchip.com</email>
</author>
<published>2023-06-24T00:00:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0fb53e64705ae0fabd9593102e0f0e6812968802'/>
<id>urn:sha1:0fb53e64705ae0fabd9593102e0f0e6812968802</id>
<content type='text'>
Advertise support of Gen5 devices in the driver's device ID table and
add the same IDs for the switchtec quirks. Also update driver code to
accommodate them.

Link: https://lore.kernel.org/r/20230624000003.2315364-3-kelvin.cao@microchip.com
Signed-off-by: Kelvin Cao &lt;kelvin.cao@microchip.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Reviewed-by: Logan Gunthorpe &lt;logang@deltatee.com&gt;
</content>
</entry>
<entry>
<title>PCI: switchtec: Use normal comment style</title>
<updated>2023-08-09T19:16:35+00:00</updated>
<author>
<name>Kelvin Cao</name>
<email>kelvin.cao@microchip.com</email>
</author>
<published>2023-06-24T00:00:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=846691f5483d61259db2f4d6a3dce8b98d518794'/>
<id>urn:sha1:846691f5483d61259db2f4d6a3dce8b98d518794</id>
<content type='text'>
Use normal comment style '/* */' for device ID description.

Link: https://lore.kernel.org/r/20230624000003.2315364-2-kelvin.cao@microchip.com
Signed-off-by: Kelvin Cao &lt;kelvin.cao@microchip.com&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Reviewed-by: Logan Gunthorpe &lt;logang@deltatee.com&gt;
</content>
</entry>
<entry>
<title>driver core: class: remove module * from class_create()</title>
<updated>2023-03-17T14:16:33+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2023-03-13T18:18:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1aaba11da9aa7d7d6b52a74d45b31cac118295a1'/>
<id>urn:sha1:1aaba11da9aa7d7d6b52a74d45b31cac118295a1</id>
<content type='text'>
The module pointer in class_create() never actually did anything, and it
shouldn't have been requred to be set as a parameter even if it did
something.  So just remove it and fix up all callers of the function in
the kernel tree at the same time.

Cc: "Rafael J. Wysocki" &lt;rafael@kernel.org&gt;
Acked-by: Benjamin Tissoires &lt;benjamin.tissoires@redhat.com&gt;
Link: https://lore.kernel.org/r/20230313181843.1207845-4-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>PCI: switchtec: Return -EFAULT for copy_to_user() errors</title>
<updated>2023-01-18T17:11:20+00:00</updated>
<author>
<name>Bjorn Helgaas</name>
<email>bhelgaas@google.com</email>
</author>
<published>2022-12-16T16:21:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ddc10938e08cd7aac63d8385f7305f7889df5179'/>
<id>urn:sha1:ddc10938e08cd7aac63d8385f7305f7889df5179</id>
<content type='text'>
switchtec_dev_read() didn't handle copy_to_user() errors correctly: it
assigned "rc = -EFAULT", but actually returned either "size", -ENXIO, or
-EBADMSG instead.

Update the failure cases to unlock mrpc_mutex and return -EFAULT directly.

Link: https://lore.kernel.org/r/20221216162126.207863-3-helgaas@kernel.org
Fixes: 080b47def5e5 ("MicroSemi Switchtec management interface driver")
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Reviewed-by: Logan Gunthorpe &lt;logang@deltatee.com&gt;
</content>
</entry>
<entry>
<title>PCI: switchtec: Simplify switchtec_dma_mrpc_isr()</title>
<updated>2023-01-18T17:11:14+00:00</updated>
<author>
<name>Bjorn Helgaas</name>
<email>bhelgaas@google.com</email>
</author>
<published>2022-12-16T16:21:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4e353ff40a830c9c5a9feee13d1cacbc3f803e8f'/>
<id>urn:sha1:4e353ff40a830c9c5a9feee13d1cacbc3f803e8f</id>
<content type='text'>
The "ret" variable in switchtec_dma_mrpc_isr() is superfluous.  Remove it
and just return the value.  No functional change intended.

Link: https://lore.kernel.org/r/20221216162126.207863-2-helgaas@kernel.org
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;
Reviewed-by: Logan Gunthorpe &lt;logang@deltatee.com&gt;
</content>
</entry>
</feed>
