From: Bjorn Helgaas <helgaas@kernel.org>
To: Dominik Brodowski <linux@dominikbrodowski.net>
Cc: linux-pci@vger.kernel.org, "Michael ." <keltoiboy@gmail.com>,
linux-kernel@vger.kernel.org,
Trevor Jacobs <trevor_jacobs@aol.com>,
Kris Cleveland <tridentperfusion@yahoo.com>,
Jeff <bluerocksaddles@willitsonline.com>,
Morgan Klym <moklym@gmail.com>
Subject: Re: PCI device function not being enumerated [Was: PCMCIA not working on Panasonic Toughbook CF-29]
Date: Mon, 21 Oct 2019 11:09:52 -0500 [thread overview]
Message-ID: <20191021160952.GA229204@google.com> (raw)
In-Reply-To: <20191020090800.GA2778@light.dominikbrodowski.net>
On Sun, Oct 20, 2019 at 11:08:00AM +0200, Dominik Brodowski wrote:
> On the basis of the additional information (thanks), there might be a
> more specific path to investigate: It is that the PCI code does not
> enumerate the second cardbus bridge PCI function in the more recent 4.19
> kernel compared to the anvient (and working) 2.6 kernel.
>
> Namely, only one CardBus bridge is recognized
>
> ...
> 06:01.0 CardBus bridge: Ricoh Co Ltd RL5c476 II (rev 8b)
> 06:01.1 SD Host controller: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter (rev 11)
> 06:02.0 Network controller: Intel Corporation PRO/Wireless 2915ABG [Calexico2] Network Connection (rev 05)
> ...
>
> instead of the two which really should be present:
>
> ...
> 06:01.0 CardBus bridge: Ricoh Co Ltd RL5c476 II (rev 8b)
> 06:01.1 CardBus bridge: Ricoh Co Ltd RL5c476 II (rev 8b)
> 06:01.2 SD Host controller: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter (rev 11)
> 06:02.0 Network controller: Intel Corporation PRO/Wireless 2915ABG [Calexico2] Network Connection (rev 05)
> ...
>
> To the PCI folks: any idea on what may cause the second cardbus bridge PCI
> device function to be missed? Are there any command line options the users
> who reported this issue[*] may try?
Thanks for the report. Could you try disabling
ricoh_mmc_fixup_rl5c476(), e.g., with the patch below (this is based
on v5.4-rc1, but you can use v4.9 if that's easier for you)? This
isn't a fix; it's just something that looks like it might be related.
> [*] For more information, see this thread:
> https://lore.kernel.org/lkml/CAFjuqNi+knSb9WVQOahCVFyxsiqoGgwoM7Z1aqDBebNzp_-jYw@mail.gmail.com/
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 320255e5e8f8..7a1e1a242506 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -3036,38 +3036,6 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_HINT, 0x0020, quirk_hotplug_bridge);
* #1, and this will confuse the PCI core.
*/
#ifdef CONFIG_MMC_RICOH_MMC
-static void ricoh_mmc_fixup_rl5c476(struct pci_dev *dev)
-{
- u8 write_enable;
- u8 write_target;
- u8 disable;
-
- /*
- * Disable via CardBus interface
- *
- * This must be done via function #0
- */
- if (PCI_FUNC(dev->devfn))
- return;
-
- pci_read_config_byte(dev, 0xB7, &disable);
- if (disable & 0x02)
- return;
-
- pci_read_config_byte(dev, 0x8E, &write_enable);
- pci_write_config_byte(dev, 0x8E, 0xAA);
- pci_read_config_byte(dev, 0x8D, &write_target);
- pci_write_config_byte(dev, 0x8D, 0xB7);
- pci_write_config_byte(dev, 0xB7, disable | 0x02);
- pci_write_config_byte(dev, 0x8E, write_enable);
- pci_write_config_byte(dev, 0x8D, write_target);
-
- pci_notice(dev, "proprietary Ricoh MMC controller disabled (via CardBus function)\n");
- pci_notice(dev, "MMC cards are now supported by standard SDHCI controller\n");
-}
-DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_RICOH, PCI_DEVICE_ID_RICOH_RL5C476, ricoh_mmc_fixup_rl5c476);
-DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_RICOH, PCI_DEVICE_ID_RICOH_RL5C476, ricoh_mmc_fixup_rl5c476);
-
static void ricoh_mmc_fixup_r5c832(struct pci_dev *dev)
{
u8 write_enable;
next prev parent reply other threads:[~2019-10-21 16:09 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAFjuqNh1=B7Ft6v7nzo3BW70EbAvK=Eko_4yqrJ4Z4N3w_Y+Xw@mail.gmail.com>
[not found] ` <CAFjuqNjLJw8J0nU2oo8rDfDUBavHLC7D0=AAwM62tp6=kHHk-A@mail.gmail.com>
2019-10-15 6:48 ` PCMCIA not working on Panasonic Toughbook CF-29 Dominik Brodowski
2019-10-15 7:03 ` Michael .
[not found] ` <CANfzparZ17SMzE1qzzF=Rixu=aYpf1RiKqR4KXXS0S+u7Q3TwQ@mail.gmail.com>
2019-10-20 9:08 ` PCI device function not being enumerated [Was: PCMCIA not working on Panasonic Toughbook CF-29] Dominik Brodowski
2019-10-21 16:09 ` Bjorn Helgaas [this message]
2019-10-21 18:17 ` Michael .
2019-10-21 18:47 ` Dominik Brodowski
2019-10-21 18:59 ` Michael .
2019-10-24 23:22 ` Michael .
2019-10-25 2:38 ` Michael .
2019-10-25 7:55 ` Dominik Brodowski
2019-10-25 18:34 ` Michael .
2019-10-29 8:58 ` Michael .
2019-10-29 17:02 ` Bjorn Helgaas
2020-02-22 16:56 ` Bjorn Helgaas
2020-02-22 18:14 ` Michael .
2020-02-25 15:03 ` Ulf Hansson
2020-02-25 19:15 ` Bjorn Helgaas
2020-02-25 23:46 ` bluerocksaddles
2020-02-26 1:13 ` Arvind Sankar
2020-02-26 1:50 ` Michael .
2020-02-26 3:12 ` Trevor Jacobs
2020-02-26 4:51 ` Arvind Sankar
2020-02-26 5:20 ` Philip Langdale
2020-02-26 6:10 ` Michael .
2020-02-26 19:46 ` bluerocksaddles
2020-07-28 1:50 ` Michael .
2020-08-02 5:58 ` Michael .
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=20191021160952.GA229204@google.com \
--to=helgaas@kernel.org \
--cc=bluerocksaddles@willitsonline.com \
--cc=keltoiboy@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux@dominikbrodowski.net \
--cc=moklym@gmail.com \
--cc=trevor_jacobs@aol.com \
--cc=tridentperfusion@yahoo.com \
/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.