mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: linux-pci@vger.kernel.org, Bjorn Helgaas <bhelgaas@google.com>,
	"Maciej W. Rozycki" <macro@orcam.me.uk>
Cc: linux-kernel@vger.kernel.org,
	"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
	"Adrian Hunter" <adrian.hunter@intel.com>,
	"Alex Dubov" <oakad@yahoo.com>,
	"Dominik Brodowski" <linux@dominikbrodowski.net>,
	linux1394-devel@lists.sourceforge.net, linux-mmc@vger.kernel.org,
	"Maxim Levitsky" <maximlevitsky@gmail.com>,
	"Sascha Sommer" <saschasommer@freenet.de>,
	"Takashi Sakamoto" <o-takashi@sakamocchi.jp>,
	"Ulf Hansson" <ulfh@kernel.org>
Subject: [PATCH 00/11] PCI/CardBus: Disable properly when CARDBUS=n & fix some issues along the way
Date: Mon,  9 Nov 2026 23:07:00 +0200	[thread overview]
Message-ID: <20261109210714.3862-1-ilpo.jarvinen@linux.intel.com> (raw)

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


             reply	other threads:[~2026-11-09 21:07 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-09 21:07 Ilpo Järvinen [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261109210714.3862-1-ilpo.jarvinen@linux.intel.com \
    --to=ilpo.jarvinen@linux.intel.com \
    --cc=adrian.hunter@intel.com \
    --cc=bhelgaas@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux1394-devel@lists.sourceforge.net \
    --cc=linux@dominikbrodowski.net \
    --cc=macro@orcam.me.uk \
    --cc=maximlevitsky@gmail.com \
    --cc=o-takashi@sakamocchi.jp \
    --cc=oakad@yahoo.com \
    --cc=saschasommer@freenet.de \
    --cc=ulfh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®