Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
SATA disk and CardReader are both /dev/sda !!
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
urcindalo
l33t
l33t


Joined: 08 Feb 2005
Posts: 623
Location: Almeria, Spain

PostPosted: Sun Apr 30, 2006 4:58 pm    Post subject: SATA disk and CardReader are both /dev/sda !! Reply with quote

Thanks for reading this.

I'm trying to make my brother switch to Gentoo. After installing the stable x86 version from scratch, I got a problem with the integrated card reader in his box. The reader occupies an external 3.5" bay under the floppy drive, but I'm not sure which interface it is using.

dmesg finds it:
Code:
wbsd: Winbond W83L51xD SD/MMC card interface driver, 1.5
wbsd: Copyright(c) Pierre Ossman
pnp: the driver 'wbsd' has been registered


I compiled built-in support in the kernel for MMC cards, and I load mmc_block and wbsd as modules. They load successfully.

However, I was seeing nothing in /var/log/messages nor in dmesg when I inserted something inside the reader.
Now I think the cause is the internal SATA drive and the reader are both /dev/sda, so I suspect the reader has an internal USB connection:
Code:
$ ls -lA /dev/disk/by-id
total 0
lrwxrwxrwx 1 root root  9 abr 30  2006 ata-ST3120023A_3KA0H08D -> ../../hdc
...
lrwxrwxrwx 1 root root  9 abr 30  2006 scsi-SATA_Maxtor_6B200M0_B41RWSMH -> ../../sda
...
lrwxrwxrwx 1 root root  9 abr 30  2006 usb-IC_USB_Storage-CFC_20020509145305401 -> ../../sda


Another signal the reader is not found:
Code:

# modinfo wbsd
filename:       /lib/modules/2.6.16-gentoo-r3/kernel/drivers/mmc/wbsd.ko
license:        GPL
author:         Pierre Ossman <drzeus@drzeus.cx>
description:    Winbond W83L51xD SD/MMC card interface driver
version:        1.5
vermagic:       2.6.16-gentoo-r3 SMP PENTIUM4 gcc-3.4
depends:
alias:          pnp:dWEC0517*
alias:          pnp:dWEC0518*
srcversion:     4D3ABE9E2D18E3B94B6BA76
parm:           dma:DMA channel to allocate. -1 for no DMA. (default 2) (int)
parm:           irq:IRQ to allocate. (default 6) (uint)
parm:           io:I/O base to allocate. Must be 8 byte aligned. (default 0x248) (uint)
parm:           nopnp:Scan for device instead of relying on PNP. (default 0) (uint)

What's more interesting is that the Gentoo 2006.0 LiveCD was detecting the SATA drive as /dev/sdb, but after installation it is now /dev/sda. As a result, I can't use the reader, since /dev/sda is assigned to the SATA disk.

Why is this happening? What can I do to recoverthe reader?

Thanks in advance.
Back to top
View user's profile Send private message
troymc
Guru
Guru


Joined: 22 Mar 2006
Posts: 553

PostPosted: Sun Apr 30, 2006 5:20 pm    Post subject: Reply with quote

Most card readers that I have seen show up as USB devices with the cards showing up as SCSI drives.

So, my question to you is:

Do you have USB enabled in your kernel? and USB mass storage? and SCSI? and SCSI disk devices?

Code:

Device Drivers --->
    USB support --->
        <*> Support for Host-side USB
            <M> UHCI HCD (most Intel and VIA) support
        <*> USB Mass Storage support
    SCSI device support --->
        <*> SCSI device support
            [ * ] legacy /proc/scsi/ support
            <*> SCSI disk support




troymc
Back to top
View user's profile Send private message
urcindalo
l33t
l33t


Joined: 08 Feb 2005
Posts: 623
Location: Almeria, Spain

PostPosted: Sun Apr 30, 2006 8:51 pm    Post subject: Reply with quote

troymc wrote:
Do you have USB enabled in your kernel? and USB mass storage? and SCSI? and SCSI disk devices?

Code:

Device Drivers --->
    USB support --->
        <*> Support for Host-side USB
            <M> UHCI HCD (most Intel and VIA) support
        <*> USB Mass Storage support
    SCSI device support --->
        <*> SCSI device support
            [ * ] legacy /proc/scsi/ support
            <*> SCSI disk support


Thanks for replying.
Yes, I have everything enabled. The only diffrerence is I have UHCI HCD compiled in the kernel, not as a module.

There must be something else. Is there any developer here who could explain why the 2006.0 LiveCD was seeing the SATA disk as /dev/sdb instead of /dev/sda? I think that might be the answer to this issue... :?
Back to top
View user's profile Send private message
urcindalo
l33t
l33t


Joined: 08 Feb 2005
Posts: 623
Location: Almeria, Spain

PostPosted: Sun Apr 30, 2006 10:47 pm    Post subject: Reply with quote

I found them!!

Looking into the several /dev/disk/* directories I was able to infer the four card types the reader reads are /dev/ub[a-d], and the cards are accesible under /dev/ub[a-d]1. So, I've added this to my /etc/fstab:
Code:
/dev/uba1       /mnt/CF         auto            user,exec,noauto,noatime,sync,managed 0 0
/dev/ubb1       /mnt/ubb1       auto            user,exec,noauto,noatime,sync,managed 0 0
/dev/ubc1       /mnt/ubc1       auto            user,exec,noauto,noatime,sync,managed 0 0
/dev/ubd1       /mnt/MS         auto            user,exec,noauto,noatime,sync,managed 0 0

Since I don't have any SD or SM cards I don't know which one is udb1 and udc1, but CompactFlash (CF) and MemoryStick (MS) are correctly accessed through the KDE Desktop :D

Hope this helps anyone.
Back to top
View user's profile Send private message
troymc
Guru
Guru


Joined: 22 Mar 2006
Posts: 553

PostPosted: Mon May 01, 2006 6:59 am    Post subject: Reply with quote

Ah, that makes sense now.

You probably have the Low Performance USB driver in your new kernel.

Code:

Device Drivers --->
    Block Devices --->
        < > Low Performance USB Block driver


That's why the devices are now showing up as /dev/ubx instead of /dev/sdax.

You probably don't want this since it comes with this warning message:

Code:

Warning: Enabling this cripples the usb-storage driver.


And this will impact any other USB storage devices you might use.


troymc
Back to top
View user's profile Send private message
urcindalo
l33t
l33t


Joined: 08 Feb 2005
Posts: 623
Location: Almeria, Spain

PostPosted: Mon May 01, 2006 9:09 am    Post subject: Reply with quote

troymc wrote:
You probably have the Low Performance USB driver in your new kernel.


You were right.

After removing it, I'm able to mount FlashCards under /dev/sdb1:
Code:
# fdisk -l
Disco /dev/hdc: 120.0 GB, 120034123776 bytes
255 cabezas, 63 sectores/pista, 14593 cilindros
Unidades = cilindros de 16065 * 512 = 8225280 bytes

Disposit. Inicio    Comienzo      Fin      Bloques  Id  Sistema
/dev/hdc2               2       14593   117210240    f  W95 Ext'd (LBA)
/dev/hdc5               2        2550    20474811    7  HPFS/NTFS
/dev/hdc6            2551       14593    96735366    b  W95 FAT32

Disco /dev/sda: 203.9 GB, 203928109056 bytes
255 cabezas, 63 sectores/pista, 24792 cilindros
Unidades = cilindros de 16065 * 512 = 8225280 bytes

Disposit. Inicio    Comienzo      Fin      Bloques  Id  Sistema
/dev/sda1               1        6079    48828125+   7  HPFS/NTFS
/dev/sda2            6079        7903    14648438    c  W95 FAT32 (LBA)
/dev/sda3            7903        9848    15625000+  83  Linux
/dev/sda4            9848       24793   120046948+   5  Extendida
/dev/sda5            9848        9910      500000+  82  Linux swap / Solaris
/dev/sda6            9910       11856    15625000+  83  Linux
/dev/sda7           11856       18417    52707861+  83  Linux
/dev/sda8           18418       24793    51213960    7  HPFS/NTFS

Disco /dev/sdb: 512 MB, 512483328 bytes
16 cabezas, 63 sectores/pista, 993 cilindros
Unidades = cilindros de 1008 * 512 = 516096 bytes

Disposit. Inicio    Comienzo      Fin      Bloques  Id  Sistema
/dev/sdb1   *           1         992      499936+   6  FAT16

However, I'm NOT able to mount the MemoryStick card, whilst with Low Performance USB driver in the kernel it mounted under /dev/ubd1.
If the logic was the same, then it would mount under /dev/sde1, but when I try that I get that /dev/sde1 does not exist (I also tried /dev/sd[b-d][1-5]. In fact, this is what I get in /dev:
Code:
$ ls sd*
sda    sda12  sda2  sda6  sdb    sdb12  sdb2  sdb6  sdc    sdc12  sdc2  sdc6  sdd    sdd12  sdd2  sdd6
sda1   sda13  sda3  sda7  sdb1   sdb13  sdb3  sdb7  sdc1   sdc13  sdc3  sdc7  sdd1   sdd13  sdd3  sdd7
sda10  sda14  sda4  sda8  sdb10  sdb14  sdb4  sdb8  sdc10  sdc14  sdc4  sdc8  sdd10  sdd14  sdd4  sdd8
sda11  sda15  sda5  sda9  sdb11  sdb15  sdb5  sdb9  sdc11  sdc15  sdc5  sdc9  sdd11  sdd15  sdd5  sdd9

As you can see, there's a series of generic devices /dev/sd[a-d][1-15]. This means the list is not generated at all by reading what I actually have [using udev 087 (x86 stable) in a just installed system]. Here is the content of /dev/disk:
Code:
localhost disk # ll by-id
total 0
lrwxrwxrwx 1 root root  9 may  1  2006 ata-ST3120023A_3KA0H08D -> ../../hdc
lrwxrwxrwx 1 root root 10 may  1  2006 ata-ST3120023A_3KA0H08D-part2 -> ../../hdc2
lrwxrwxrwx 1 root root 10 may  1  2006 ata-ST3120023A_3KA0H08D-part5 -> ../../hdc5
lrwxrwxrwx 1 root root 10 may  1  2006 ata-ST3120023A_3KA0H08D-part6 -> ../../hdc6
lrwxrwxrwx 1 root root  9 may  1  2006 scsi-SATA_Maxtor_6B200M0_B41RWSMH -> ../../sda
lrwxrwxrwx 1 root root 10 may  1  2006 scsi-SATA_Maxtor_6B200M0_B41RWSMH-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 may  1  2006 scsi-SATA_Maxtor_6B200M0_B41RWSMH-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 may  1  2006 scsi-SATA_Maxtor_6B200M0_B41RWSMH-part3 -> ../../sda3
lrwxrwxrwx 1 root root 10 may  1  2006 scsi-SATA_Maxtor_6B200M0_B41RWSMH-part4 -> ../../sda4
lrwxrwxrwx 1 root root 10 may  1  2006 scsi-SATA_Maxtor_6B200M0_B41RWSMH-part5 -> ../../sda5
lrwxrwxrwx 1 root root 10 may  1  2006 scsi-SATA_Maxtor_6B200M0_B41RWSMH-part6 -> ../../sda6
lrwxrwxrwx 1 root root 10 may  1  2006 scsi-SATA_Maxtor_6B200M0_B41RWSMH-part7 -> ../../sda7
lrwxrwxrwx 1 root root 10 may  1  2006 scsi-SATA_Maxtor_6B200M0_B41RWSMH-part8 -> ../../sda8
lrwxrwxrwx 1 root root  9 may  1  2006 usb-IC_USB_Storage-CFC_20020509145305401 -> ../../sdb
lrwxrwxrwx 1 root root 10 may  1  2006 usb-IC_USB_Storage-CFC_20020509145305401-part1 -> ../../sdb1
localhost disk # ll by-label
total 0
lrwxrwxrwx 1 root root 10 may  1  2006 Local -> ../../hdc5
lrwxrwxrwx 1 root root 10 may  1  2006 TOSHIBA512M -> ../../sdb1
localhost disk # ll by-path
total 0
lrwxrwxrwx 1 root root  9 may  1  2006 pci-0000:00:1f.2-scsi-0:0:0:0 -> ../../sda
lrwxrwxrwx 1 root root 10 may  1  2006 pci-0000:00:1f.2-scsi-0:0:0:0-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 may  1  2006 pci-0000:00:1f.2-scsi-0:0:0:0-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 may  1  2006 pci-0000:00:1f.2-scsi-0:0:0:0-part3 -> ../../sda3
lrwxrwxrwx 1 root root 10 may  1  2006 pci-0000:00:1f.2-scsi-0:0:0:0-part4 -> ../../sda4
lrwxrwxrwx 1 root root 10 may  1  2006 pci-0000:00:1f.2-scsi-0:0:0:0-part5 -> ../../sda5
lrwxrwxrwx 1 root root 10 may  1  2006 pci-0000:00:1f.2-scsi-0:0:0:0-part6 -> ../../sda6
lrwxrwxrwx 1 root root 10 may  1  2006 pci-0000:00:1f.2-scsi-0:0:0:0-part7 -> ../../sda7
lrwxrwxrwx 1 root root 10 may  1  2006 pci-0000:00:1f.2-scsi-0:0:0:0-part8 -> ../../sda8
lrwxrwxrwx 1 root root  9 may  1  2006 pci-0000:01:04.0-ide-0:0 -> ../../hdc
lrwxrwxrwx 1 root root 10 may  1  2006 pci-0000:01:04.0-ide-0:0-part2 -> ../../hdc2
lrwxrwxrwx 1 root root 10 may  1  2006 pci-0000:01:04.0-ide-0:0-part5 -> ../../hdc5
lrwxrwxrwx 1 root root 10 may  1  2006 pci-0000:01:04.0-ide-0:0-part6 -> ../../hdc6
lrwxrwxrwx 1 root root  9 may  1  2006 usb-20020509145305401:0:0:0 -> ../../sdb
lrwxrwxrwx 1 root root 10 may  1  2006 usb-20020509145305401:0:0:0-part1 -> ../../sdb1
localhost disk # ll by-uuid
total 0
lrwxrwxrwx 1 root root 10 may  1  2006 000000003EFCA643 -> ../../hdc5
lrwxrwxrwx 1 root root 10 may  1  2006 015796a1-251f-473d-8fd0-dff0ef535d78 -> ../../sda5
lrwxrwxrwx 1 root root 10 may  1  2006 0e139e2b-8f06-4481-a139-e72228379dd4 -> ../../sda7
lrwxrwxrwx 1 root root 10 may  1  2006 1215374A1041FAB1 -> ../../sda8
lrwxrwxrwx 1 root root 10 may  1  2006 2005-0707 -> ../../sdb1
lrwxrwxrwx 1 root root 10 may  1  2006 3EAA-FF63 -> ../../hdc6
lrwxrwxrwx 1 root root 10 may  1  2006 4454-F46A -> ../../sda2
lrwxrwxrwx 1 root root 10 may  1  2006 82acc79f-0b09-4caa-8315-f82d33733815 -> ../../sdb5
lrwxrwxrwx 1 root root 10 may  1  2006 882C-5EB2 -> ../../uba1
lrwxrwxrwx 1 root root 10 may  1  2006 ca6ab511-b9e2-4578-b263-5313873510e8 -> ../../sda3
lrwxrwxrwx 1 root root 10 may  1  2006 e63d2eec-c1ce-47a9-9409-d0e2b4f22818 -> ../../sda6
lrwxrwxrwx 1 root root 10 may  1  2006 f002bb0f-aeca-4cbb-8ffd-b1146d7cc20f -> ../../sdb3


You can see a /dev/sdb3 and /dev/sdb5 in /dev/disk/by-uuid, but if I trie to mount the MS there I get a /dev/sdb3[or 5] is not a valid block device (the card is still unformatted, but with the previous kernel it showed up with a file in it). For your information, I had the Flash and the MemoryStick plugged-in when I rebooted with the new kernel, and these are my services:
Code:
# rc-update -s
           alsasound |      default
            bootmisc | boot
             checkfs | boot
           checkroot | boot
               clock | boot
            coldplug | boot
         consolefont | boot
     courier-authlib |
       courier-imapd |
   courier-imapd-ssl |
       courier-pop3d |
   courier-pop3d-ssl |
         crypto-loop |
               cupsd |
         dante-sockd |
                dbus |
          domainname | boot
              esound |
          fancontrol |
            festival |
                 gpm |      default
                hald |
              hdparm |
            hostname | boot
             hotplug |      default
             ifplugd |
               ivman |
             keymaps | boot
               lircd |
              lircmd |
                lisa |
          lm_sensors |
               local |      default nonetwork
          localmount | boot
               mdnsd |
             modules | boot
                 nas |
            net.eth0 |
            net.eth1 |
            net.eth2 |
            net.gre0 |
              net.lo | boot
            netmount |      default
            net.sit0 |
           net.tunl0 |
           net.wlan0 |      default
                nscd |
             numlock |
              openct |
              pcmcia |
             pwcheck |
             reslisa |
           rmnologin | boot
              rsyncd |
               samba |
           saslauthd |
               slapd |
                slpd |
              slurpd |
               snmpd |
           snmptrapd |
                sshd |      default
           syndaemon |
           syslog-ng |      default
             unicode |      default
             urandom | boot
          vixie-cron |      default
                 xdm |      default
                 xfs |
              xinetd |
              xprint |


Thanks in advance.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum