mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 00/11] PCI/CardBus: Disable properly when CARDBUS=n & fix some issues along the way
@ 2026-11-09 21:07 Ilpo Järvinen
  2026-11-09 21:07 ` [PATCH 01/11] PCI: Free device name when pci_setup_device() fails Ilpo Järvinen
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: Ilpo Järvinen @ 2026-11-09 21:07 UTC (permalink / raw)
  To: linux-pci, Bjorn Helgaas, Maciej W. Rozycki
  Cc: linux-kernel, Ilpo Järvinen, Adrian Hunter, Alex Dubov,
	Dominik Brodowski, linux1394-devel, linux-mmc, Maxim Levitsky,
	Sascha Sommer, Takashi Sakamoto, Ulf Hansson

Hi all,
 
When CARDBUS=n, there are still leftovers in the bridge setup code that
add annoying corner cases by confusing CardBus bridges with normal PCI
devices. This series attempts to truly disable CardBus bridges when
config asks to do so as it seems the most reasonable way to prevent
those corner cases. That is, this series removes ability to select only
"partial CardBus support", full support for CardBus remains in kernel
and can still be enabled with CONFIG_CARDBUS. The alternative to this
would be to sprinkle pci_is_cardbus_bridge() everywhere to work around
the corner case is not reasonable given CardBus is quite old and rarely
used legacy technology.
 
Disabling CARDBUS also implies the entire Multi-Function Device is lost
because CardBus bridge at Function 0 gates enumeration of the rest of
the functions that are not CardBus related (multiple drivers affected).
This is intentionally not addressed with Kconfig dependencies; see the
changelogs for the rationale. Towards the end, part of the patches are
marked as RFC because they might have an impact on existing configs for
that reason.

The series first fixes a few issues in PCI core and CardBus integration
(4 patches, the first one is totally unrelated to CardBus but CardBus
integration will use the same label in a later change). The fixes can
be applied on their own if needed. After that, there are some
preparatory changes and the main move of CardBus setup into
setup-cardbus.c. Finally, the series moves a few CardBus specific
quirks and the resource name getter into setup-cardbus.c to keep them
out of the other PCI core code.


Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alex Dubov <oakad@yahoo.com>
Cc: Dominik Brodowski <linux@dominikbrodowski.net>
Cc: linux1394-devel@lists.sourceforge.net
Cc: linux-mmc@vger.kernel.org
Cc: "Maciej W. Rozycki" <macro@orcam.me.uk>
Cc: Maxim Levitsky <maximlevitsky@gmail.com>
Cc: Sascha Sommer <saschasommer@freenet.de>
Cc: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Cc: Ulf Hansson <ulfh@kernel.org>


Ilpo Järvinen (11):
  PCI: Free device name when pci_setup_device() fails
  PCI: Use Header Type in __pci_bridge_assign_resources()
  PCI: Use Header Type to detect CardBus bridges in
    pci_resource_alignment()
  PCI: Fix off-by-one in CardBus resource names
  PCI: Move pci_read_bases() wrapper with BUILD_BUG_ON() to pci.h
  mmc: sdricoh_cs: Depend on CARDBUS
  pcmcia: yenta_socket: Always select CARDBUS
  PCI: Move CardBus device setup to setup-cardbus.c
  PCI: Move CardBus legacy mode quirk to setup-cardbus.c
  PCI: Move Ricoh RL5C476 MMC quirk to setup-cardbus.c
  PCI: Move CardBus resource names to setup-cardbus.c

 drivers/mmc/host/Kconfig    |  2 +-
 drivers/pci/pci.c           | 25 +---------
 drivers/pci/pci.h           | 23 ++++++++-
 drivers/pci/probe.c         | 27 +++++-----
 drivers/pci/quirks.c        | 45 -----------------
 drivers/pci/setup-bus.c     |  6 +--
 drivers/pci/setup-cardbus.c | 99 +++++++++++++++++++++++++++++++++++++
 drivers/pci/setup-res.c     |  2 +-
 drivers/pcmcia/Kconfig      |  2 +-
 9 files changed, 144 insertions(+), 87 deletions(-)


base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4
-- 
2.47.3


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2026-11-09 21:09 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-09 21:07 [PATCH 00/11] PCI/CardBus: Disable properly when CARDBUS=n & fix some issues along the way Ilpo Järvinen
2026-11-09 21:07 ` [PATCH 01/11] PCI: Free device name when pci_setup_device() fails Ilpo Järvinen
2026-11-09 21:07 ` [PATCH 02/11] PCI: Use Header Type in __pci_bridge_assign_resources() Ilpo Järvinen
2026-11-09 21:07 ` [PATCH 03/11] PCI: Use Header Type to detect CardBus bridges in pci_resource_alignment() Ilpo Järvinen
2026-11-09 21:07 ` [PATCH 04/11] PCI: Fix off-by-one in CardBus resource names Ilpo Järvinen
2026-11-09 21:07 ` [PATCH 05/11] PCI: Move pci_read_bases() wrapper with BUILD_BUG_ON() to pci.h Ilpo Järvinen
2026-11-09 21:07 ` [PATCH 06/11] mmc: sdricoh_cs: Depend on CARDBUS Ilpo Järvinen
2026-11-09 21:07 ` [RFC PATCH 07/11] pcmcia: yenta_socket: Always select CARDBUS Ilpo Järvinen
2026-11-09 21:07 ` [RFC PATCH 08/11] PCI: Move CardBus device setup to setup-cardbus.c Ilpo Järvinen
2026-11-09 21:07 ` [PATCH 09/11] PCI: Move CardBus legacy mode quirk " Ilpo Järvinen
2026-11-09 21:07 ` [RFC PATCH 10/11] PCI: Move Ricoh RL5C476 MMC " Ilpo Järvinen
2026-11-09 21:07 ` [PATCH 11/11] PCI: Move CardBus resource names " Ilpo Järvinen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®