lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <OFEA694ED7.D779260D-ON492578DB.00834494-492578DC.000262D4@mta.ricoh.co.jp>
Date:	Fri, 29 Jul 2011 09:27:56 +0900
From:	matsumur@....ricoh.co.jp
To:	andi@...stfloor.org
Cc:	ak@...ux.intel.com, cjb@...top.org, daniel.manrique@...onical.com,
	jbarnes@...tuousgeek.org, linux-kernel@...r.kernel.org,
	manoj.iyer@...onical.com, stable@...nel.org, tim.bird@...sony.com
Subject: Re: [PATCH] [9/50] mmc: Added quirks for Ricoh 1180:e823 lower base clock

Dear Sir,

Ricoh 1180:e823 device is named R5U220/R5U232 (2 devices have the same
device ID ).
So, I think it should be declared to as PCI_DEVICE_ID_RICOH_R5U220.

BTW, does anyone know whether the current SDHCI-driver sets 200Mhz to
SD-CLK for UHS-I cards ?


Thanks,

Koji Matsumuro
Ricoh Company,Ltd.




                                                                           
             Andi Kleen                                                    
             <andi@...stfloor.                                             
             org>                                                     宛先 
                                        manoj.iyer@...onical.com,          
             2011/07/29 08:44           daniel.manrique@...onical.com,     
                                        Koji Matsumuro/R/RICOH@...OH,      
                                        jbarnes@...tuousgeek.org,          
                                        cjb@...top.org,                    
                                        ak@...ux.intel.com,                
                                        linux-kernel@...r.kernel.org,      
                                        stable@...nel.org,                 
                                        tim.bird@...sony.com               
                                                                        cc 
                                                                           
                                                                      件名 
                                        [PATCH] [9/50] mmc: Added quirks   
                                        for Ricoh 1180:e823 lower base     
                                        clock                              
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           



2.6.35-longterm review patch.  If anyone has any objections, please let me
know.

------------------
From: Manoj Iyer <manoj.iyer@...onical.com>

[ upstream commit 15bed0f2fa8e1d7db201692532c210a7823d2d21 ]
 frequency

Ricoh 1180:e823 does not recognize certain types of SD/MMC cards,
as reported at http://launchpad.net/bugs/773524.  Lowering the SD
base clock frequency from 200Mhz to 50Mhz fixes this issue. This
solution was suggest by Koji Matsumuro, Ricoh Company, Ltd.

This change has no negative performance effect on standard SD
cards, though it's quite possible that there will be one on
UHS-1 cards.

Signed-off-by: Manoj Iyer <manoj.iyer@...onical.com>
Tested-by: Daniel Manrique <daniel.manrique@...onical.com>
Cc: Koji Matsumuro <matsumur@....ricoh.co.jp>
Cc: <stable@...nel.org>
Acked-by: Jesse Barnes <jbarnes@...tuousgeek.org>
Signed-off-by: Chris Ball <cjb@...top.org>
Signed-off-by: Andi Kleen <ak@...ux.intel.com>

Index: linux-2.6.35.y/drivers/pci/quirks.c
===================================================================
--- linux-2.6.35.y.orig/drivers/pci/quirks.c
+++ linux-2.6.35.y/drivers/pci/quirks.c
@@ -2698,6 +2698,29 @@ static void ricoh_mmc_fixup_r5c832(struc

  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
+      * clock frequency from 200Mhz to 50Mhz fixes this issue.
+      *
+      * 0x150 - SD2.0 mode enable for changing base clock
+      *       frequency to 50Mhz
+      * 0xe1  - Base clock frequency
+      * 0x32  - 50Mhz new clock frequency
+      * 0xf9  - Key register for 0x150
+      * 0xfc  - key register for 0xe1
+      */
+     if (dev->device == PCI_DEVICE_ID_RICOH_R5CE823) {
+           pci_write_config_byte(dev, 0xf9, 0xfc);
+           pci_write_config_byte(dev, 0x150, 0x10);
+           pci_write_config_byte(dev, 0xf9, 0x00);
+           pci_write_config_byte(dev, 0xfc, 0x01);
+           pci_write_config_byte(dev, 0xe1, 0x32);
+           pci_write_config_byte(dev, 0xfc, 0x00);
+
+           dev_notice(&dev->dev, "MMC controller base frequency changed to
50Mhz.\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);


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ