PCI/CardBus: Disable properly when CARDBUS=n & fix some issues along the way
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest11 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/11 | PCI: Free device name when pci_setup_device() failsdrivers/ | +7 | 0 replies | |
| 2/11 | PCI: Use Header Type in __pci_bridge_assign_resources()drivers/ | +3 | 0 replies | |
| 3/11 | PCI: Use Header Type to detect CardBus bridges in pci_resource_alignment()drivers/ drivers/ | +2 | 0 replies | |
| 4/11 | PCI: Fix off-by-one in CardBus resource namesdrivers/ | +1 | 0 replies | |
| 5/11 | PCI: Move pci_read_bases() wrapper with BUILD_BUG_ON() to pci.hdrivers/ drivers/ | +11 | 0 replies | |
| 6/11 | mmc: sdricoh_cs: Depend on CARDBUSdrivers/ | +1 | 0 replies | |
| 7/11 | pcmcia: yenta_socket: Always select CARDBUSdrivers/ | +1 | 0 replies | |
| 8/11 | PCI: Move CardBus device setup to setup-cardbus.cdrivers/ drivers/ drivers/ | +26 | 0 replies | |
| 9/11 | PCI: Move CardBus legacy mode quirk to setup-cardbus.cdrivers/ drivers/ | +15 | 0 replies | |
| 10/11 | PCI: Move Ricoh RL5C476 MMC quirk to setup-cardbus.cdrivers/ drivers/ | +41 | 0 replies | |
| 11/11 | PCI: Move CardBus resource names to setup-cardbus.cdrivers/ drivers/ drivers/ | +37 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 00/11] PCI/CardBus: Disable properly when CARDBUS=n & fix some issues along the way
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.
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
Signature · 1 line
2.47.3