All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
	linux-pci@vger.kernel.org
Subject: Re: [PATCH 03/11] PCI: Use Header Type to detect CardBus bridges in pci_resource_alignment()
Date: Mon, 09 Nov 2026 21:26:35 +0000	[thread overview]
Message-ID: <sashiko-outbox-205668@kernel.org> (raw)
In-Reply-To: <20261109210714.3862-4-ilpo.jarvinen@linux.intel.com>

> pci_resource_alignment() detects CardBus bridges by the Class Code while
> the rest of the PCI core uses the Header Type.
> 
> When CONFIG_CARDBUS is not set, pci_cardbus_resource_alignment() returns
> zero. A non-CardBus device that reports the CardBus Class Code then gets
> zero alignment for all its resources, and pbus_size_mem() calls __ffs()
> on it, which is undefined behavior. When CARDBUS is set, the device gets
> CardBus window alignment instead of its own alignment.
> 
> Use pci_is_cardbus_bridge() in pci_resource_alignment() and make it take
> a const pointer as pci_resource_alignment() has one.
> 
> Fixes: fd29d4ea09ba ("PCI: Separate CardBus setup & build it only with CONFIG_CARDBUS")
> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261109210714.3862-1-ilpo.jarvinen@linux.intel.com?part=3


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

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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:13   ` sashiko-bot
2026-11-09 21:07 ` [PATCH 02/11] PCI: Use Header Type in __pci_bridge_assign_resources() Ilpo Järvinen
2026-11-09 21:12   ` sashiko-bot
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:26   ` sashiko-bot [this message]
2026-11-09 21:07 ` [PATCH 04/11] PCI: Fix off-by-one in CardBus resource names Ilpo Järvinen
2026-11-09 21:12   ` sashiko-bot
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:17   ` sashiko-bot
2026-11-09 21:07 ` [PATCH 06/11] mmc: sdricoh_cs: Depend on CARDBUS Ilpo Järvinen
2026-11-09 21:11   ` sashiko-bot
2026-11-09 21:07 ` [RFC PATCH 07/11] pcmcia: yenta_socket: Always select CARDBUS Ilpo Järvinen
2026-11-09 21:12   ` sashiko-bot
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:17   ` sashiko-bot
2026-11-09 21:07 ` [PATCH 09/11] PCI: Move CardBus legacy mode quirk " Ilpo Järvinen
2026-11-09 21:14   ` sashiko-bot
2026-11-09 21:07 ` [RFC PATCH 10/11] PCI: Move Ricoh RL5C476 MMC " Ilpo Järvinen
2026-11-09 21:17   ` sashiko-bot
2026-11-09 21:07 ` [PATCH 11/11] PCI: Move CardBus resource names " Ilpo Järvinen
2026-11-09 21:14   ` sashiko-bot

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=sashiko-outbox-205668@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.