Menu

Works only on boot 2

2008-05-10
2013-04-23
  • Mikael O. Bonnier

    If I insert the SD Card (SanDisk 2 GB) after boot it works and shows as a card in Storage Media in D3lphin, and I can read and write. If I remove it using Safely Remove (right clicking it and choosing Actions/Safely Remove) and then insert it nothing happens and the device doesn't exist. The only way I can get it to work again with my current knowledge is to reboot and insert it again. Is there a way remove a card and insert it again so that I don't have to restart?

    I used sdricoh_cs-0.1.3.tar.gz compiled using make and sudo make install and it went without problems.

    I have a Lenovo 3000 N200 with Kubuntu Hardy Heron.

    $ lspci | grep Ricoh
    08:06.0 FireWire (IEEE 1394): Ricoh Co Ltd R5C832 IEEE 1394 Controller
    08:06.1 SD Host controller: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter (rev 19)
    08:06.2 System peripheral: Ricoh Co Ltd R5C843 MMC Host Controller (rev 01)
    08:06.3 System peripheral: Ricoh Co Ltd R5C592 Memory Stick Bus Host Adapter (rev 0a)
    08:06.4 System peripheral: Ricoh Co Ltd xD-Picture Card Controller (rev 05)

    $ uname -a
    Linux Empathy20080224 2.6.24-16-generic #1 SMP Thu Apr 10 13:23:42 UTC 2008 i686 GNU/Linux

    If you need more information I can send it.

     
    • Mikael O. Bonnier

      I discovered that it worked excellently if I skipped Safely Remove. Then I can remove and insert and switch cards and everything works. It would be good though if Safely Remove also worked for SD cards like it does for USB memories, since the choice exists and some will try it.

       
      • Sascha Sommer

        Sascha Sommer - 2008-05-11

        I don't know what safely remove does but could you modprobe the driver with debug=1 ? And do a dmesg after you did the savely remove and reinserted the card?

         
        • Mikael O. Bonnier

          Now, insertion works even if I do Safely Remove so I couldn't reproduce
          the problem.

          Now when it works this happens:
          $ sudo modprobe -v sdricoh_cs debug=1
          (No output.)
          (Safely Remove)
          $ dmesg
          (No new output.)
          (I remove the card.)
          $ dmesg
          [  384.326299] mmc0: card e624 removed
          (I insert the card)
          $ dmesg
          [  393.156735] mmc0: new SD card at address e624
          [  393.156887] mmcblk0: mmc0:e624 SD02G 1985024KiB
          [  393.156947]  mmcblk0: p1

          But I have discovered another problem. If I Suspend the computer with or without the card in and then take it out of suspend by lifting the lid of the laptop I have no device (mmcblk0 and mmcblk0p1) and nothing is registered in dmesg when I remove or insert the card.

          I have done this in that case also:
          $ sudo modprobe sdricoh_cs debug=1
          (No output.)

          After I Restart it works again. Since I almost never normally Turn Off the computer (only suspends) this is a rather big problem.

           
          • Sascha Sommer

            Sascha Sommer - 2008-05-11

            Does removing the module before the suspend help? Unfortunatelly my laptop does not like to be suspended on linux so I cannot test this.

            Regards

            Sascha

             
            • Mikael O. Bonnier

              I get an error when I do this (both with or without the card in, and the card slot is working normally):
              $ sudo rmmod -v sdricoh_cs
              ERROR: Module sdricoh_cs does not exist in /proc/modules

              It's strange maybe the modules are not loaded when I insert the card the first time after boot, still it works.

              When I suspend and after unsuspend the OS does not seem to react to the card as before. The led is still lit when I insert and remove the card even when it's not working.

               
              • Sascha Sommer

                Sascha Sommer - 2008-05-12

                I'm sorry for not noticing this earlier but
                08:06.1 SD Host controller: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter

                probably uses a different host controller driver. I think your device requires the ricoh_mmc and sdhci drivers. So you might want to try to unload them before suspend and reload them after suspend.
                Anyway I cannot help you because I'm not the author of these drivers and do not have any hardware that uses them.

                 

Log in to post a comment.