* [PATCH] mmc: Always check for lower base frequency quirk for Ricoh 1180:e823
@ 2011-10-05 15:44 Josh Boyer
2011-10-05 16:27 ` Manoj Iyer
2011-10-14 16:07 ` Jesse Barnes
0 siblings, 2 replies; 7+ messages in thread
From: Josh Boyer @ 2011-10-05 15:44 UTC (permalink / raw)
To: Manoj Iyer, Chris Ball; +Cc: Koji Matsumuro, Jesse Barnes, stable, linux-kernel
Commit 15bed0f2f added a quirk for the e823 Ricoh card reader to lower the
base frequency. However, the quirk first checks to see if the proprietary
MMC controller is disabled, and returns if so. On some devices, such as the
Lenovo X220, the MMC controller is already disabled by firmware it seems,
but the frequency change is still needed so sdhci-pci can talk to the cards.
Since the MMC controller is disabled, the frequency fixup was never being run
on these machines.
This moves the e823 check above the MMC controller check so that it always
gets run.
This fixes https://bugzilla.redhat.com/show_bug.cgi?id=722509
Signed-off-by: Josh Boyer <jwboyer@redhat.com>
---
drivers/pci/quirks.c | 28 ++++++++++++++--------------
1 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 1196f61..cec4629 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -2745,20 +2745,6 @@ static void ricoh_mmc_fixup_r5c832(struct pci_dev *dev)
/* disable must be done via function #0 */
if (PCI_FUNC(dev->devfn))
return;
-
- pci_read_config_byte(dev, 0xCB, &disable);
-
- if (disable & 0x02)
- return;
-
- pci_read_config_byte(dev, 0xCA, &write_enable);
- pci_write_config_byte(dev, 0xCA, 0x57);
- pci_write_config_byte(dev, 0xCB, disable | 0x02);
- pci_write_config_byte(dev, 0xCA, write_enable);
-
- dev_notice(&dev->dev, "proprietary Ricoh MMC controller disabled (via firewire function)\n");
- dev_notice(&dev->dev, "MMC cards are now supported by standard SDHCI controller\n");
-
/*
* RICOH 0xe823 SD/MMC card reader fails to recognize
* certain types of SD/MMC cards. Lowering the SD base
@@ -2781,6 +2767,20 @@ static void ricoh_mmc_fixup_r5c832(struct pci_dev *dev)
dev_notice(&dev->dev, "MMC controller base frequency changed to 50Mhz.\n");
}
+
+ pci_read_config_byte(dev, 0xCB, &disable);
+
+ if (disable & 0x02)
+ return;
+
+ pci_read_config_byte(dev, 0xCA, &write_enable);
+ pci_write_config_byte(dev, 0xCA, 0x57);
+ pci_write_config_byte(dev, 0xCB, disable | 0x02);
+ pci_write_config_byte(dev, 0xCA, write_enable);
+
+ dev_notice(&dev->dev, "proprietary Ricoh MMC controller disabled (via firewire function)\n");
+ dev_notice(&dev->dev, "MMC cards are now supported by standard SDHCI controller\n");
+
}
DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_RICOH, PCI_DEVICE_ID_RICOH_R5C832, ricoh_mmc_fixup_r5c832);
DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_RICOH, PCI_DEVICE_ID_RICOH_R5C832, ricoh_mmc_fixup_r5c832);
--
1.7.6.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] mmc: Always check for lower base frequency quirk for Ricoh 1180:e823
2011-10-05 15:44 [PATCH] mmc: Always check for lower base frequency quirk for Ricoh 1180:e823 Josh Boyer
@ 2011-10-05 16:27 ` Manoj Iyer
2011-10-05 16:43 ` Josh Boyer
2011-10-14 16:07 ` Jesse Barnes
1 sibling, 1 reply; 7+ messages in thread
From: Manoj Iyer @ 2011-10-05 16:27 UTC (permalink / raw)
To: Josh Boyer
Cc: Manoj Iyer, Chris Ball, Koji Matsumuro, Jesse Barnes, stable,
linux-kernel
On Wed, 5 Oct 2011, Josh Boyer wrote:
> Commit 15bed0f2f added a quirk for the e823 Ricoh card reader to lower the
> base frequency. However, the quirk first checks to see if the proprietary
> MMC controller is disabled, and returns if so. On some devices, such as the
> Lenovo X220, the MMC controller is already disabled by firmware it seems,
It is possible that the newer firmware from Lenovo disables the MMC
controller. When the patch was done, these laptops had just been
announced, so they had a very early version of the firmware (ver 1.02
iirc).
> but the frequency change is still needed so sdhci-pci can talk to the cards.
> Since the MMC controller is disabled, the frequency fixup was never being run
> on these machines.
>
> This moves the e823 check above the MMC controller check so that it always
> gets run.
>
> This fixes https://bugzilla.redhat.com/show_bug.cgi?id=722509
>
> Signed-off-by: Josh Boyer <jwboyer@redhat.com>
> ---
> drivers/pci/quirks.c | 28 ++++++++++++++--------------
> 1 files changed, 14 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
> index 1196f61..cec4629 100644
> --- a/drivers/pci/quirks.c
> +++ b/drivers/pci/quirks.c
> @@ -2745,20 +2745,6 @@ static void ricoh_mmc_fixup_r5c832(struct pci_dev *dev)
> /* disable must be done via function #0 */
> if (PCI_FUNC(dev->devfn))
> return;
> -
> - pci_read_config_byte(dev, 0xCB, &disable);
> -
> - if (disable & 0x02)
> - return;
> -
> - pci_read_config_byte(dev, 0xCA, &write_enable);
> - pci_write_config_byte(dev, 0xCA, 0x57);
> - pci_write_config_byte(dev, 0xCB, disable | 0x02);
> - pci_write_config_byte(dev, 0xCA, write_enable);
> -
> - dev_notice(&dev->dev, "proprietary Ricoh MMC controller disabled (via firewire function)\n");
> - dev_notice(&dev->dev, "MMC cards are now supported by standard SDHCI controller\n");
> -
> /*
> * RICOH 0xe823 SD/MMC card reader fails to recognize
> * certain types of SD/MMC cards. Lowering the SD base
> @@ -2781,6 +2767,20 @@ static void ricoh_mmc_fixup_r5c832(struct pci_dev *dev)
>
> dev_notice(&dev->dev, "MMC controller base frequency changed to 50Mhz.\n");
> }
> +
> + pci_read_config_byte(dev, 0xCB, &disable);
> +
> + if (disable & 0x02)
> + return;
> +
> + pci_read_config_byte(dev, 0xCA, &write_enable);
> + pci_write_config_byte(dev, 0xCA, 0x57);
> + pci_write_config_byte(dev, 0xCB, disable | 0x02);
> + pci_write_config_byte(dev, 0xCA, write_enable);
> +
> + dev_notice(&dev->dev, "proprietary Ricoh MMC controller disabled (via firewire function)\n");
> + dev_notice(&dev->dev, "MMC cards are now supported by standard SDHCI controller\n");
> +
> }
> DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_RICOH, PCI_DEVICE_ID_RICOH_R5C832, ricoh_mmc_fixup_r5c832);
> DECLARE_PCI_FIXUP_RESUME_EARLY(PCI_VENDOR_ID_RICOH, PCI_DEVICE_ID_RICOH_R5C832, ricoh_mmc_fixup_r5c832);
> --
> 1.7.6.4
>
>
--
====================
Manoj Iyer
Ubuntu/Canonical
Hardware Enablement
====================
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] mmc: Always check for lower base frequency quirk for Ricoh 1180:e823
2011-10-05 16:27 ` Manoj Iyer
@ 2011-10-05 16:43 ` Josh Boyer
2011-10-05 18:19 ` Manoj Iyer
0 siblings, 1 reply; 7+ messages in thread
From: Josh Boyer @ 2011-10-05 16:43 UTC (permalink / raw)
To: Manoj Iyer; +Cc: Chris Ball, Koji Matsumuro, Jesse Barnes, stable, linux-kernel
On Wed, Oct 05, 2011 at 11:27:01AM -0500, Manoj Iyer wrote:
> On Wed, 5 Oct 2011, Josh Boyer wrote:
>
> >Commit 15bed0f2f added a quirk for the e823 Ricoh card reader to lower the
> >base frequency. However, the quirk first checks to see if the proprietary
> >MMC controller is disabled, and returns if so. On some devices, such as the
> >Lenovo X220, the MMC controller is already disabled by firmware it seems,
>
> It is possible that the newer firmware from Lenovo disables the MMC
> controller. When the patch was done, these laptops had just been
> announced, so they had a very early version of the firmware (ver
> 1.02 iirc).
Seems so. The X220 laptop I debugged this on shows:
[jwboyer@zod linux-2.6]$ cat /sys/devices/virtual/dmi/id/bios_version
8DET42WW (1.12 )
josh
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] mmc: Always check for lower base frequency quirk for Ricoh 1180:e823
2011-10-05 16:43 ` Josh Boyer
@ 2011-10-05 18:19 ` Manoj Iyer
0 siblings, 0 replies; 7+ messages in thread
From: Manoj Iyer @ 2011-10-05 18:19 UTC (permalink / raw)
To: Josh Boyer
Cc: Manoj Iyer, Chris Ball, Koji Matsumuro, Jesse Barnes, stable,
linux-kernel
On Wed, 5 Oct 2011, Josh Boyer wrote:
> On Wed, Oct 05, 2011 at 11:27:01AM -0500, Manoj Iyer wrote:
>> On Wed, 5 Oct 2011, Josh Boyer wrote:
>>
>>> Commit 15bed0f2f added a quirk for the e823 Ricoh card reader to lower the
>>> base frequency. However, the quirk first checks to see if the proprietary
>>> MMC controller is disabled, and returns if so. On some devices, such as the
>>> Lenovo X220, the MMC controller is already disabled by firmware it seems,
>>
>> It is possible that the newer firmware from Lenovo disables the MMC
>> controller. When the patch was done, these laptops had just been
>> announced, so they had a very early version of the firmware (ver
>> 1.02 iirc).
>
> Seems so. The X220 laptop I debugged this on shows:
>
> [jwboyer@zod linux-2.6]$ cat /sys/devices/virtual/dmi/id/bios_version
> 8DET42WW (1.12 )
I was able to track down the one I debugged, luckily the firmware on it was
never updated, and great! the bios is even older than I thought...
u@u:~$ cat /sys/devices/virtual/dmi/id/bios_version
8DET25WW (0.25 )
u@u:~$
So, yes definitely looks like BIOS might have disabled MMC in the newer
releases. /me wonders when IBVs will get their act together ...
>
> josh
>
>
--
====================
Manoj Iyer
Ubuntu/Canonical
Hardware Enablement
====================
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] mmc: Always check for lower base frequency quirk for Ricoh 1180:e823
2011-10-05 15:44 [PATCH] mmc: Always check for lower base frequency quirk for Ricoh 1180:e823 Josh Boyer
2011-10-05 16:27 ` Manoj Iyer
@ 2011-10-14 16:07 ` Jesse Barnes
2011-10-14 16:24 ` Josh Boyer
1 sibling, 1 reply; 7+ messages in thread
From: Jesse Barnes @ 2011-10-14 16:07 UTC (permalink / raw)
To: Josh Boyer; +Cc: Manoj Iyer, Chris Ball, Koji Matsumuro, stable, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 972 bytes --]
On Wed, 5 Oct 2011 11:44:50 -0400
Josh Boyer <jwboyer@redhat.com> wrote:
> Commit 15bed0f2f added a quirk for the e823 Ricoh card reader to lower the
> base frequency. However, the quirk first checks to see if the proprietary
> MMC controller is disabled, and returns if so. On some devices, such as the
> Lenovo X220, the MMC controller is already disabled by firmware it seems,
> but the frequency change is still needed so sdhci-pci can talk to the cards.
> Since the MMC controller is disabled, the frequency fixup was never being run
> on these machines.
>
> This moves the e823 check above the MMC controller check so that it always
> gets run.
>
> This fixes https://bugzilla.redhat.com/show_bug.cgi?id=722509
>
Applied to linux-next, thanks. I forgot to cc stable on it though;
once it hits Linus's tree you may want to make sure it gets backported
to 3.0.x and 3.1.x.
Thanks,
--
Jesse Barnes, Intel Open Source Technology Center
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] mmc: Always check for lower base frequency quirk for Ricoh 1180:e823
2011-10-14 16:07 ` Jesse Barnes
@ 2011-10-14 16:24 ` Josh Boyer
2011-11-01 18:47 ` Greg KH
0 siblings, 1 reply; 7+ messages in thread
From: Josh Boyer @ 2011-10-14 16:24 UTC (permalink / raw)
To: Jesse Barnes; +Cc: Manoj Iyer, Chris Ball, Koji Matsumuro, stable, linux-kernel
On Fri, Oct 14, 2011 at 09:07:27AM -0700, Jesse Barnes wrote:
> On Wed, 5 Oct 2011 11:44:50 -0400
> Josh Boyer <jwboyer@redhat.com> wrote:
>
> > Commit 15bed0f2f added a quirk for the e823 Ricoh card reader to lower the
> > base frequency. However, the quirk first checks to see if the proprietary
> > MMC controller is disabled, and returns if so. On some devices, such as the
> > Lenovo X220, the MMC controller is already disabled by firmware it seems,
> > but the frequency change is still needed so sdhci-pci can talk to the cards.
> > Since the MMC controller is disabled, the frequency fixup was never being run
> > on these machines.
> >
> > This moves the e823 check above the MMC controller check so that it always
> > gets run.
> >
> > This fixes https://bugzilla.redhat.com/show_bug.cgi?id=722509
> >
>
> Applied to linux-next, thanks. I forgot to cc stable on it though;
> once it hits Linus's tree you may want to make sure it gets backported
> to 3.0.x and 3.1.x.
OK. Will do. Thanks Jesse.
josh
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] mmc: Always check for lower base frequency quirk for Ricoh 1180:e823
2011-10-14 16:24 ` Josh Boyer
@ 2011-11-01 18:47 ` Greg KH
0 siblings, 0 replies; 7+ messages in thread
From: Greg KH @ 2011-11-01 18:47 UTC (permalink / raw)
To: Josh Boyer
Cc: Jesse Barnes, Manoj Iyer, Chris Ball, Koji Matsumuro, stable,
linux-kernel
On Fri, Oct 14, 2011 at 12:24:37PM -0400, Josh Boyer wrote:
> On Fri, Oct 14, 2011 at 09:07:27AM -0700, Jesse Barnes wrote:
> > On Wed, 5 Oct 2011 11:44:50 -0400
> > Josh Boyer <jwboyer@redhat.com> wrote:
> >
> > > Commit 15bed0f2f added a quirk for the e823 Ricoh card reader to lower the
> > > base frequency. However, the quirk first checks to see if the proprietary
> > > MMC controller is disabled, and returns if so. On some devices, such as the
> > > Lenovo X220, the MMC controller is already disabled by firmware it seems,
> > > but the frequency change is still needed so sdhci-pci can talk to the cards.
> > > Since the MMC controller is disabled, the frequency fixup was never being run
> > > on these machines.
> > >
> > > This moves the e823 check above the MMC controller check so that it always
> > > gets run.
> > >
> > > This fixes https://bugzilla.redhat.com/show_bug.cgi?id=722509
> > >
> >
> > Applied to linux-next, thanks. I forgot to cc stable on it though;
> > once it hits Linus's tree you may want to make sure it gets backported
> > to 3.0.x and 3.1.x.
>
> OK. Will do. Thanks Jesse.
I've queued it up now, no need for you to remind me.
greg k-h
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2011-11-01 18:51 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-05 15:44 [PATCH] mmc: Always check for lower base frequency quirk for Ricoh 1180:e823 Josh Boyer
2011-10-05 16:27 ` Manoj Iyer
2011-10-05 16:43 ` Josh Boyer
2011-10-05 18:19 ` Manoj Iyer
2011-10-14 16:07 ` Jesse Barnes
2011-10-14 16:24 ` Josh Boyer
2011-11-01 18:47 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox