LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 02-17-2008, 03:09 AM   #1
jimtrenton
Member
 
Registered: Oct 2007
Distribution: Slackware 14.0, 14.1
Posts: 36

Rep: Reputation: 6
Another card reader problem-but please help.


Hi.

I know this question has been asked a couple of times but either i have tried them and they don't work or I can't understand what is written (English is not my native but I understand it quite well).

But to the point I have got Slackware 12 installed on a Asus laptop (fresh install bcause been trying something and it fucked my system) it has got a built-in card reader which I need but don't know how to make it work.

lspci shows that I've got this device:
04:01.2 Generic system peripheral [0805]: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter (rev 17)

lsmod shows i've got these modules:
sdhci 18828 0
mmc_core 25988 1 sdhci.

Please tell me what i need to read to do this or if anyone has done it and feels like sharing please do. I really need some help. For the past years I've always had Windows instaled and now for some time I've got Linux. I'm a noob, I know I chose a distro for advanced users but Ihave tried couple of more user friendly distros but didn't really like them. Slack rules for me but can anyone help me get along with it.

Thanks in advance for any advice and for even reading my post.
 
Old 02-17-2008, 03:21 AM   #2
budword
Member
 
Registered: Apr 2003
Location: Wisconsin
Distribution: Switched to regualr Ubuntu, because I don't like KDE4, at all. Looks like vista on crack.....
Posts: 675

Rep: Reputation: 31
I use Kubuntu 7.10, and my card reader just works. Might be time to try another distro. Could be you just don't have a card mounted. Have you tried that ?

Good luck

David
 
Old 02-17-2008, 04:34 AM   #3
cathectic
Member
 
Registered: Sep 2004
Location: UK, Europe
Distribution: Slackware64
Posts: 761

Rep: Reputation: 35
Quote:
Originally Posted by jimtrenton View Post
04:01.2 Generic system peripheral [0805]: Ricoh Co Ltd R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter (rev 17)
First off: the MemoryStick/ Pro part of this chip isn't supported under Linux (these are not USB mass storage devices, unlike some card readers). So you're limited to just using SD & MMC cards (and SDIO in the near future, I believe).

That said - you _should_ have a /dev/mmcblkXX (where XX is some two digit number) created when you insert an MMC/ SD card.

There is an 'however' though, if you want to use MMC cards: This chip needs a hack so that Linux can handle MMC cards.

See:
http://bugzilla.kernel.org/show_bug.cgi?id=8871
http://intr.overt.org/blog/?p=59

But basically (and use this at your own risk, and only if you _need_ MMC support) where `03:01.0` is the firewire controller chip:

Code:
/sbin/setpci -s ‘03:01.0′ 0xCA=057 # (Write Enable)
/sbin/setpci -s ‘03:01.0′ 0xCB=002 # (MMC Disable)
/sbin/setpci -s ‘03:01.0′ 0xCA=000 # (Write Disable)
 
Old 02-17-2008, 05:49 AM   #4
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292Reputation: 1292
First thing to try for card readers is enable scanluns by running:
Code:
chmod a+x /etc/rc.d/rc.scanluns
as root and then either run '/etc/rc.d/rc.scanluns' or restart the machine.

To see if the card is detected, it may show up if you run 'dmesg'.

If you don't know, to run commands, open a terminal and type the commands in. To log in to root run 'su' and enter root password.

After that you may want to put a card in and run 'blkid' as root and it will be listed as having filesystem type 'vfat'. Then you can mount it by running:
Code:
mount /dev/sdx1 /mnt/tmp
The /dev/sdx1 is gonna be different for you (get this from blkid). Then check '/mnt/tmp' for the files on the memory stick.

Quote:
Originally Posted by cathectic View Post
First off: the MemoryStick/ Pro part of this chip isn't supported under Linux (these are not USB mass storage devices, unlike some card readers). So you're limited to just using SD & MMC cards (and SDIO in the near future, I believe).
The one on my laptop works just fine, can read all types of Memory Sticks including Pro ones.

Quote:
Originally Posted by budword View Post
I use Kubuntu 7.10, and my card reader just works. Might be time to try another distro. Could be you just don't have a card mounted. Have you tried that ?

Good luck

David
Please, don't go around doing this. If he asked for another distro, then go ahead and recommend one, but if he didn't then don't recommend one as a solution to a problem. I don't go around doing this and you shouldn't either. Switching distros is not a solution to anything or everything, what if there's an easier solution. I bet you would have no clue.

Last edited by H_TeXMeX_H; 02-17-2008 at 05:58 AM.
 
Old 02-17-2008, 01:53 PM   #5
cwwilson721
Senior Member
 
Registered: Dec 2004
Location: In my house.
Distribution: Ubuntu 10.10 64bit, Slackware 13.1 64-bit
Posts: 2,649
Blog Entries: 1

Rep: Reputation: 66
Quote:
Originally Posted by budword View Post
I use Kubuntu 7.10, and my card reader just works. Might be time to try another distro. Could be you just don't have a card mounted. Have you tried that ?

Good luck

David
Well, budword, I run Slackware 12. My video, audio, cards, and everything works. And my distro doesn't stop me from doing ANYTHING. You may as well run Window$ with all the handholding and hiding that distro does.

You ought to switch to SW12. It just works the way Linux is supposed to work..
 
Old 02-17-2008, 02:05 PM   #6
hitest
Guru
 
Registered: Mar 2004
Location: Prince Rupert, B.C., Canada
Distribution: Slackware, OpenBSD
Posts: 6,060

Rep: Reputation: 2264Reputation: 2264Reputation: 2264Reputation: 2264Reputation: 2264Reputation: 2264Reputation: 2264Reputation: 2264Reputation: 2264Reputation: 2264Reputation: 2264
Quote:
Originally Posted by budword View Post
I use Kubuntu 7.10, and my card reader just works. Might be time to try another distro. Could be you just don't have a card mounted. Have you tried that ?

Good luck

David
Card readers work in Slackware 12. You just need to ensure that your regular user has permission to use it. The device will auto-mount just fine, you need to edit /etc/group and add your regular user to plugdev, cdrom, audio, video.
 
Old 02-17-2008, 06:16 PM   #7
cathectic
Member
 
Registered: Sep 2004
Location: UK, Europe
Distribution: Slackware64
Posts: 761

Rep: Reputation: 35
Quote:
Originally Posted by H_TeXMeX_H View Post
First thing to try for card readers is enable scanluns by running:
This is only for USB mass storage devices. The Ricoh chip does not use this, as I have already stated.

Quote:
Originally Posted by H_TeXMeX_H View Post
The one on my laptop works just fine, can read all types of Memory Sticks including Pro ones.
Based on what you (and everyone else who has replied to the OP of this thread has said), your card readers are internally a USB mass storage reader, for which you should count yourselves very lucky. Basically, if your cards show up as /dev/sdX, it's going through the SCSI layer, which means USB mass storage.

In this case though, and for many others, we instead need something that can talk to the chip and card at a lower level (e.g. understanding the various controllers, the protocols used for communicating with the cards, etc). USB mass storage abstracts this away - but the vast majority of laptop card readers don't have nice firmware to do this for us, hence the problem here.

Last edited by cathectic; 02-17-2008 at 06:19 PM.
 
Old 02-17-2008, 06:23 PM   #8
budword
Member
 
Registered: Apr 2003
Location: Wisconsin
Distribution: Switched to regualr Ubuntu, because I don't like KDE4, at all. Looks like vista on crack.....
Posts: 675

Rep: Reputation: 31
Recommending a newbie friendly distro to someone who is a little new to linux and having some problems is valid advice. I'm sorry if it offends some people here who aren't newbies, or if I've offended your favorite distro. The (x)(K)Ubutnu's are the most popular distro right now for exactly that reason, it does do the most hand holding, and it's users are usually more friendly to newbies. You will rarely read "RTFM" coming from any Ubuntu user. Quite a few distro's still require you to edit some text files and manually mount any sort of external drive or media. The Ubuntu's rarely do, it tends to just work the way someone new to linux might expect them to, and it's not bad advice to a new linux user. I'm sorry if your distro isn't as friendly to non-guru linux users. Suggesting the friendliest newbie friendly distro to a new user isn't poor advice. Get over yourself.

David
 
Old 02-17-2008, 06:28 PM   #9
cathectic
Member
 
Registered: Sep 2004
Location: UK, Europe
Distribution: Slackware64
Posts: 761

Rep: Reputation: 35
Quote:
Originally Posted by budword View Post
Recommending a newbie friendly distro to someone who is a little new to linux and having some problems is valid advice.
Not on a Slackware thread it isn't.

Quote:
Originally Posted by budword View Post
Quite a few distro's still require you to edit some text files and manually mount any sort of external drive or media.
1) We consider that to be a _good_ thing in Slackware (the latter no longer applies)

2) This problem is a driver support and rubbish hardware vendor one, so I can assure you will not be magically cured by moving to *buntu.

So I would suggest you actually do some research first into the problem described, before just telling people to move to *buntu as if it is a magic cure all - in this case, it is certainly not.
 
Old 02-17-2008, 06:30 PM   #10
hitest
Guru
 
Registered: Mar 2004
Location: Prince Rupert, B.C., Canada
Distribution: Slackware, OpenBSD
Posts: 6,060

Rep: Reputation: 2264Reputation: 2264Reputation: 2264Reputation: 2264Reputation: 2264Reputation: 2264Reputation: 2264Reputation: 2264Reputation: 2264Reputation: 2264Reputation: 2264
Quote:
Originally Posted by budword View Post
Suggesting the friendliest newbie friendly distro to a new user isn't poor advice. Get over yourself.

David
It would be more helpful if you would suggest a fix for his current problem rather than suggest a switch to a new distro. Getting a USB device to mount is a lot less work that doing a complete reinstall.
You are over reacting to a bit of criticism, methinks.
 
Old 02-17-2008, 06:46 PM   #11
cathectic
Member
 
Registered: Sep 2004
Location: UK, Europe
Distribution: Slackware64
Posts: 761

Rep: Reputation: 35
Quote:
Originally Posted by hitest View Post
Getting a USB device to mount
A small reminder; the OP does not have an (internal) USB card reader.

Ricoh are somewhere among the least Linux friendly vendors out there, especially when it comes to their card readers (ENE and Texas Instruments are also on that list of offenders - but the TI card readers at least are well on the way to being almost fully reverse engineered).
 
Old 02-17-2008, 07:00 PM   #12
hitest
Guru
 
Registered: Mar 2004
Location: Prince Rupert, B.C., Canada
Distribution: Slackware, OpenBSD
Posts: 6,060

Rep: Reputation: 2264Reputation: 2264Reputation: 2264Reputation: 2264Reputation: 2264Reputation: 2264Reputation: 2264Reputation: 2264Reputation: 2264Reputation: 2264Reputation: 2264
Interesting.
I have a portable, generic USB card reader that works just fine in Slackware. Do you get any kind of output showing your card when you run these commands as root?

# fdisk -l

# blkid
 
Old 02-17-2008, 07:36 PM   #13
cathectic
Member
 
Registered: Sep 2004
Location: UK, Europe
Distribution: Slackware64
Posts: 761

Rep: Reputation: 35
Quote:
Originally Posted by hitest View Post
Interesting.
I have a portable, generic USB card reader that works just fine in Slackware.
But the OP does not have a USB card reader - so I appreciate everyone means well by saying "it will just work" or "it should appear as /dev/sdXX", but all of these statements are wrong, and don't apply to the chipset in question.

If you Google the Ricoh chip in question it's a long, unpleasant story of a bad vendor with a bad chip, among other bits of missing support in Linux.

Quote:
Originally Posted by hitest View Post
Do you get any kind of output showing your card when you run these commands as root?

# fdisk -l

# blkid
On non-USB mass storage card readers, you will only get output if you:

A) Have a driver that can talk to the card in question
B) Assuming A), the driver will then create a device node when it detects a card is inserted, not before

Now, since I have a TI card reader that's mostly reverse engineered for SD and MemoryStick (no xD yet), if I insert a MemoryStick Pro card I would see some /dev/mspblkXX devices pop up, but not before - but again, it would not show up as /dev/sdXX, because it's not using USB mass storage, so device nodes don't get created until a card is detected (MMC/ SD would show up as /dev/mmcblkXX).

In the OPs case, what I posted above is that he needs to disable the MMC host controller on this particular chipset (since there is no Linux driver for that), so that the SD controller can take over MMC as well as SD (for which we have the sdhci driver that can handle both, via the MMC card protocol).

Confusing, isn't it?

For MMC/ SD, the MMC specs are reasonably open, so that's been implemented for a while, and SD is backwards compatible with MMC. For MemoryStick, the card protocol has been reverse engineered and is available in 2.6.25.

Then on top of that, you have the actually host controller driver - the chip that talks to the card. Sometimes these are standardised with open specs (e.g. SDHCI), other times they are not (e.g. all the other host controller drivers).

With USB mass storage, the firmware in the card reader handles all this stuff, and then just translates that all into USB mass storage (aka SCSI protocol over USB). Without that (as in this case), we need to talk to the chip directly, and know something about all these various cards, controllers, etc.

Last edited by cathectic; 02-17-2008 at 07:47 PM. Reason: Checked the output on the laptop and cleaned up some vague comments
 
Old 02-18-2008, 01:19 AM   #14
jimtrenton
Member
 
Registered: Oct 2007
Distribution: Slackware 14.0, 14.1
Posts: 36

Original Poster
Rep: Reputation: 6
Hello again.
Everybody relax I know this is a Slackware forum or I wouldn't be here. I want a solution to the problem under Slack because if I would even consider changing distros I could easily change back to Winblows XP. No offence people but that is an OS where everything works out of the box or it just needs a driver, no searching, no thinking, no nothing, it just works (how it works is a different matter) - end of story.

/etc/rc.d/rc.scanluns shows this:
Code:
Scanning all LUNs for additional hardware:  /sbin/rescan-scsi-bus -l
No SCSI host adapters found in sysfs
blkid shows this:
Code:
/dev/hdc1: UUID="a1de12d3-9cd6-4cd6-bc98-4f282fe8ca5c" SEC_TYPE="ext2" TYPE="ext3"
/dev/hdc2: UUID="63eba1e2-71a8-472c-a207-4cc72cbdd381" SEC_TYPE="ext2" TYPE="ext3"
/dev/hdc5: UUID="a6751b46-1032-4fb6-a0b1-8dc806b7afe1" TYPE="swap"
fdisk -l gives this reply:
Code:
Disk /dev/hdc: 60.0 GB, 60011642880 bytes
255 heads, 63 sectors/track, 7296 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hdc1   *           1         729     5855661   83  Linux
/dev/hdc2             730        7233    52243380   83  Linux
/dev/hdc3            7234        7296      506047+   5  Extended
/dev/hdc5            7234        7296      506016   82  Linux swap
and I'm already a member of the aforementioned groups (plugdev, cdrom, audio, video) and it really doesn't help. The device doesn't show up in the ways suggested or I would really mount it a long time ago.
And when it comes to drivers I thought that having these modules should do the trick:
Code:
sdhci 18828 0
mmc_core 25988 1 sdhci
After reading a lot and googling a big bit I came here for advice. It is not as easy as scan, mount and voila, but I know this little piece of crap hardware works, seen it under Mandriva 2007.1 PowerPack. But it isn't a reason to run with tail between my legs to another distro.
There must be a way to make it work under Slackware. Please any advice.
 
Old 02-18-2008, 02:25 AM   #15
cathectic
Member
 
Registered: Sep 2004
Location: UK, Europe
Distribution: Slackware64
Posts: 761

Rep: Reputation: 35
Quote:
Originally Posted by jimtrenton View Post
There must be a way to make it work under Slackware. Please any advice.
Go back and re-read my first post where I explained what the problem is, what the limitations of the current state of the drivers are, and what you can do to at least get MMC/ SD support working.

I appreciate everyone here is telling you different things, but if it's not yet clear - I do know what I'm talking about on this at least
 
  


Reply

Tags
cardreader, reader, ricoh


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
USB Card Reader problem DoddyUK Linux - Hardware 8 10-10-2010 08:05 PM
card reader problem paperplane Slackware 7 02-07-2008 10:49 PM
Problem with my sd card reader Hachem Linux - Hardware 2 05-20-2007 02:19 PM
Problem with CF-card reader runa Linux - Hardware 2 10-22-2006 05:45 AM
HP Photosmart 7550 w/ Flash Card Reader on Suse 9.3. Card Reader and Print Sharing Desert Linux - Hardware 0 07-25-2005 09:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 01:45 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration