From: Philip Langdale <philipl@overt.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux kernel <linux-kernel@vger.kernel.org>,
sdhci-devel@list.drzeus.cx, Pierre Ossman <drzeus@drzeus.cx>,
Frank Seidel <fseidel@suse.de>,
Mathias Weyland <weyland@library.ethz.ch>
Subject: Re: [PATCH] ricoh_mmc: Handle newer models of Ricoh controllers (resend)
Date: Tue, 02 Dec 2008 19:37:01 -0800 [thread overview]
Message-ID: <4935FEDD.3080807@overt.org> (raw)
In-Reply-To: <20081202181043.8173d657.akpm@linux-foundation.org>
Andrew Morton wrote:
>>
>> diff --git a/drivers/mmc/host/ricoh_mmc.c b/drivers/mmc/host/ricoh_mmc.c
>> index a16d760..be9e7b3 100644
>> --- a/drivers/mmc/host/ricoh_mmc.c
>> +++ b/drivers/mmc/host/ricoh_mmc.c
>> @@ -11,9 +11,10 @@
>>
>> /*
>> * This is a conceptually ridiculous driver, but it is required by the way
>> - * the Ricoh multi-function R5C832 works. This chip implements firewire
>> - * and four different memory card controllers. Two of those controllers are
>> - * an SDHCI controller and a proprietary MMC controller. The linux SDHCI
>> + * the Ricoh multi-function chips (R5CXXX) work. These chips implement
>> + * the four main memory card controllers (SD, MMC, MS, xD) and one or both
>> + * of cardbus or firewire. It happens that they implement SD and MMC
>> + * support as separate controllers (and PCI functions). The linux SDHCI
>> * driver supports MMC cards but the chip detects MMC cards in hardware
>> * and directs them to the MMC controller - so the SDHCI driver never sees
>> * them. To get around this, we must disable the useless MMC controller.
>> @@ -21,8 +22,10 @@
>> * a detection event occurs immediately, even if the MMC card is already
>> * in the reader.
>> *
>> - * The relevant registers live on the firewire function, so this is unavoidably
>> - * ugly. Such is life.
>> + * It seems to be the case that the relevant PCI registers to deactivate the
>> + * MMC controller live on PCI function 0, which might be the cardbus controller
>> + * or the firewire controller, depending on the particular chip in question. As
>> + * such, it makes what this driver has to do unavoidably ugly. Such is life.
>> */
>>
>> #include <linux/pci.h>
>
> The above two hunks already are in linux-next.
>
>> @@ -143,6 +146,7 @@ static int __devinit ricoh_mmc_probe(struct pci_dev *pdev,
>> pci_get_device(PCI_VENDOR_ID_RICOH,
>> PCI_DEVICE_ID_RICOH_RL5C476, fw_dev))) {
>> if (PCI_SLOT(pdev->devfn) == PCI_SLOT(fw_dev->devfn) &&
>> + PCI_FUNC(fw_dev->devfn) == 0 &&
>> pdev->bus == fw_dev->bus) {
>> if (ricoh_mmc_disable(fw_dev) != 0)
>> return -ENODEV;
>> @@ -160,6 +164,7 @@ static int __devinit ricoh_mmc_probe(struct pci_dev *pdev,
>> (fw_dev = pci_get_device(PCI_VENDOR_ID_RICOH,
>> PCI_DEVICE_ID_RICOH_R5C832, fw_dev))) {
>> if (PCI_SLOT(pdev->devfn) == PCI_SLOT(fw_dev->devfn) &&
>> + PCI_FUNC(fw_dev->devfn) == 0 &&
>> pdev->bus == fw_dev->bus) {
>> if (ricoh_mmc_disable(fw_dev) != 0)
>> return -ENODEV;
>> @@ -172,7 +177,7 @@ static int __devinit ricoh_mmc_probe(struct pci_dev *pdev,
>>
>> if (!ctrlfound) {
>> printk(KERN_WARNING DRIVER_NAME
>> - ": Main firewire function not found. Cannot disable controller.\n");
>> + ": Main Ricoh function not found. Cannot disable controller.\n");
>> return -ENODEV;
>> }
>
> Those three are not.
>
Indeed. Pierre, seems like the patch didn't git-apply properly. It's this way in your
tree too. Did you apply the previous garbled version?
--phil
next prev parent reply other threads:[~2008-12-03 3:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-01 1:27 [PATCH] ricoh_mmc: Handle newer models of Ricoh controllers (resend) philipl
2008-12-03 2:10 ` Andrew Morton
2008-12-03 3:37 ` Philip Langdale [this message]
2008-12-03 7:38 ` Pierre Ossman
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=4935FEDD.3080807@overt.org \
--to=philipl@overt.org \
--cc=akpm@linux-foundation.org \
--cc=drzeus@drzeus.cx \
--cc=fseidel@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=sdhci-devel@list.drzeus.cx \
--cc=weyland@library.ethz.ch \
/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