# Card reader not working



## sk8harddiefast (Feb 14, 2015)

Trying to make a workable laptop, I try to fix all the problems one by one.
My Laptop is a Lenovo p400. My card reader is not working.
Not even recognized

`sudo dmesg | grep mmc`

Return no values.

My `uname -a`

```
FreeBSD FreeBSD 10.1-RELEASE-p5 FreeBSD 10.1-RELEASE-p5 #0: Tue Jan 27 08:55:07 UTC 2015  root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64
```
On my kernel all options are enabled:

```
# MMC/SD
device  mmc  # MMC/SD bus
device  mmcsd  # MMC/SD memory card
device  sdhci  # Generic PCI SD Host Controller
```

Any idea how to make it work? I haven't any previous experience with card readers.


----------



## demonking (Feb 15, 2015)

What is the output of `pciconf -lv` ?

Edit: sorry my fault with `pciconf`.


----------



## sk8harddiefast (Feb 15, 2015)

Thank's for answer to my thread

You mean `pciconf -lv`. `pciconv` returns me: Command not found


```
[ember@FreeBSD ~]$ pciconf -lv
hostb0@pci0:0:0:0:   class=0x060000 card=0x397717aa chip=0x01548086 rev=0x09 hdr=0x00
  vendor  = 'Intel Corporation'
  device  = '3rd Gen Core processor DRAM Controller'
  class  = bridge
  subclass  = HOST-PCI
vgapci0@pci0:0:2:0:   class=0x030000 card=0x390417aa chip=0x01668086 rev=0x09 hdr=0x00
  vendor  = 'Intel Corporation'
  device  = '3rd Gen Core processor Graphics Controller'
  class  = display
  subclass  = VGA
xhci0@pci0:0:20:0:   class=0x0c0330 card=0x397717aa chip=0x1e318086 rev=0x04 hdr=0x00
  vendor  = 'Intel Corporation'
  device  = '7 Series/C210 Series Chipset Family USB xHCI Host Controller'
  class  = serial bus
  subclass  = USB
none0@pci0:0:22:0:   class=0x078000 card=0x397717aa chip=0x1e3a8086 rev=0x04 hdr=0x00
  vendor  = 'Intel Corporation'
  device  = '7 Series/C210 Series Chipset Family MEI Controller'
  class  = simple comms
ehci0@pci0:0:26:0:   class=0x0c0320 card=0x397717aa chip=0x1e2d8086 rev=0x04 hdr=0x00
  vendor  = 'Intel Corporation'
  device  = '7 Series/C210 Series Chipset Family USB Enhanced Host Controller'
  class  = serial bus
  subclass  = USB
hdac0@pci0:0:27:0:   class=0x040300 card=0x397717aa chip=0x1e208086 rev=0x04 hdr=0x00
  vendor  = 'Intel Corporation'
  device  = '7 Series/C210 Series Chipset Family High Definition Audio Controller'
  class  = multimedia
  subclass  = HDA
pcib1@pci0:0:28:0:   class=0x060400 card=0x397717aa chip=0x1e108086 rev=0xc4 hdr=0x01
  vendor  = 'Intel Corporation'
  device  = '7 Series/C210 Series Chipset Family PCI Express Root Port 1'
  class  = bridge
  subclass  = PCI-PCI
pcib2@pci0:0:28:1:   class=0x060400 card=0x397717aa chip=0x1e128086 rev=0xc4 hdr=0x01
  vendor  = 'Intel Corporation'
  device  = '7 Series/C210 Series Chipset Family PCI Express Root Port 2'
  class  = bridge
  subclass  = PCI-PCI
ehci1@pci0:0:29:0:   class=0x0c0320 card=0x397717aa chip=0x1e268086 rev=0x04 hdr=0x00
  vendor  = 'Intel Corporation'
  device  = '7 Series/C210 Series Chipset Family USB Enhanced Host Controller'
  class  = serial bus
  subclass  = USB
isab0@pci0:0:31:0:   class=0x060100 card=0x397717aa chip=0x1e598086 rev=0x04 hdr=0x00
  vendor  = 'Intel Corporation'
  device  = 'HM76 Express Chipset LPC Controller'
  class  = bridge
  subclass  = PCI-ISA
ahci0@pci0:0:31:2:   class=0x010601 card=0x397717aa chip=0x1e038086 rev=0x04 hdr=0x00
  vendor  = 'Intel Corporation'
  device  = '7 Series Chipset Family 6-port SATA Controller [AHCI mode]'
  class  = mass storage
  subclass  = SATA
none1@pci0:0:31:3:   class=0x0c0500 card=0x397717aa chip=0x1e228086 rev=0x04 hdr=0x00
  vendor  = 'Intel Corporation'
  device  = '7 Series/C210 Series Chipset Family SMBus Controller'
  class  = serial bus
  subclass  = SMBus
re0@pci0:1:0:0:   class=0x020000 card=0x397717aa chip=0x813610ec rev=0x05 hdr=0x00
  vendor  = 'Realtek Semiconductor Co., Ltd.'
  device  = 'RTL8101E/RTL8102E PCI Express Fast Ethernet controller'
  class  = network
  subclass  = ethernet
none2@pci0:2:0:0:   class=0x028000 card=0x42628086 chip=0x08888086 rev=0xc4 hdr=0x00
  vendor  = 'Intel Corporation'
  device  = 'Centrino Wireless-N 2230'
  class  = network
```


----------



## demonking (Feb 15, 2015)

Hm.. after checking it on my notebook, iI mentioned, that mmc doesn't exist in my `dmesg` too.
Is `camcontrol devlist` saying something?


----------



## sk8harddiefast (Feb 15, 2015)

`camcontrol devlist`

```
<ADATA SP900 5.6.0>  at scbus0 target 0 lun 0 (ada0,pass0)
<HL-DT-ST DVDRAM GU70N DE01>  at scbus1 target 0 lun 0 (cd0,pass1)
<AHCI SGPIO Enclosure 1.00 0001>  at scbus2 target 0 lun 0 (ses0,pass2)
```
The first is my ADATA SSD
The second is my DVD Drive.
The No 3, I don't know


----------



## demonking (Feb 17, 2015)

Hm.. it seems, that your system cannot recognize the card-reader.
Have you tried the GENERIC Kernel  ?
If it's not working, than maybe it is disabled in your Bios?

The worst case would be, that there is no driver for your device :/


----------



## sk8harddiefast (Feb 17, 2015)

Yes. I tried GENERIC Kernel. There is not option on Bios for Card Reader.
Is Realtek.
Μy `usbconfig` return this:


```
[ember@FreeBSD ~]$ sudo usbconfig
ugen0.1: <XHCI root HUB 0x8086> at usbus0, cfg=0 md=HOST spd=SUPER (5.0Gbps) pwr=SAVE (0mA)
ugen1.1: <EHCI root HUB Intel> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)
ugen2.1: <EHCI root HUB Intel> at usbus2, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)
ugen1.2: <product 0x0024 vendor 0x8087> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)
ugen2.2: <product 0x0024 vendor 0x8087> at usbus2, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)
ugen1.3: <product 0x07da vendor 0x8087> at usbus1, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (0mA)
ugen0.2: <product 0x1d10 vendor 0x06cb> at usbus0, cfg=255 md=HOST spd=FULL (12Mbps) pwr=ON (100mA)
ugen1.4: <USB2.0-CRW Generic> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA)
ugen0.3: <Lenovo EasyCamera Vimicro Corp.> at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (256mA)
```


----------



## tobik@ (Feb 17, 2015)

ugen1.4 looks like a card reader. What's the output of `usbconfig -d ugen1.4 dump_device_desc`?


----------



## sk8harddiefast (Feb 17, 2015)

```
[ember@FreeBSD ~]$ sudo  usbconfig -d ugen1.4 dump_device_desc
Password:
ugen1.4: <USB2.0-CRW Generic> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA)

  bLength = 0x0012
  bDescriptorType = 0x0001
  bcdUSB = 0x0200
  bDeviceClass = 0x00ff
  bDeviceSubClass = 0x00ff
  bDeviceProtocol = 0x00ff
  bMaxPacketSize0 = 0x0040
  idVendor = 0x0bda
  idProduct = 0x0129
  bcdDevice = 0x3960
  iManufacturer = 0x0001  <Generic>
  iProduct = 0x0002  <USB2.0-CRW>
  iSerialNumber = 0x0003  <20100201396000000>
  bNumConfigurations = 0x0001
```


----------



## tobik@ (Feb 17, 2015)

According to http://cateee.net/lkddb/web-lkddb/RTS5139.html you then have the following card reader:

```
vendor: 0bda ("Realtek Semiconductor Corp."), product: 0129 ("RTS5129 Card Reader Controller")
```
which is unfortunate because I do not believe FreeBSD supports it.


----------



## sk8harddiefast (Feb 17, 2015)

I tried this. According this: http://markmail.org/thread/7lvd6qyaybcjrhvm#query:+page:1+mid:6sesw5woc6lxpyn2+state:results

I went to /usr/src/sys/dev/usd
I open usbdevs file and changed

```
product REALTEK USB20CRW   0x0158   USB20CRW Card Reader
```
to

```
product REALTEK USB20CRW   0x0129   USB20CRW Card Reader
```

According my idProduct on this command:

`usbconfig -d ugen1.4 dump_device_desc`

Rebuild kernel but still no luck.

Any other idea?


----------

