Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
card reader doesn't work: rts_bpp
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
Xywa
l33t
l33t


Joined: 23 Jul 2005
Posts: 805
Location: /mnt/Gentoo/

PostPosted: Mon Apr 22, 2013 11:32 am    Post subject: card reader doesn't work: rts_bpp Reply with quote

Hi,

For the lat year I was using this solution from Gentoo forum for my card reader - driver rts_bpp
http://forums.gentoo.org/viewtopic-t-922794-start-0-postdays-0-postorder-asc-highlight-.html
Code:
wget https://bugs.launchpad.net/bugs/971876/+attachment/2991730/+files/rts_bpp.tar.bz2
 tar jxf rts_bpp.tar.bz2
 cd rts_bpp
 make
 su -c 'make install ; modprobe rts_bpp ; depmod -a'


People says from kernel 3.8 this card reader works out of the box with driver rtsx_pci (from the kernel).
Unfortunately for me doesn't work (I was trying as a module and as a build in into kernel)...

Everything looks OK on the paper.
Code:
# lsmod
Module                  Size  Used by
iwldvm                125862  0
nvidia               9119147  0
r8168                 235989  0
rtsx_pci               17588  0
mfd_core                2905  1 rtsx_pci
iwlwifi                67931  1 iwldvm


Code:
lspci -v

06:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. Device 5289 (rev 01)
        Subsystem: Realtek Semiconductor Co., Ltd. Device 5289
        Flags: bus master, fast devsel, latency 0, IRQ 55
        Memory at f7800000 (32-bit, non-prefetchable) [size=64K]
        Capabilities: [40] Power Management version 3
        Capabilities: [50] MSI: Enable+ Count=1/1 Maskable- 64bit+
        Capabilities: [70] Express Endpoint, MSI 00
        Capabilities: [b0] MSI-X: Enable- Count=1 Masked-
        Capabilities: [d0] Vital Product Data
        Capabilities: [100] Advanced Error Reporting
        Capabilities: [140] Virtual Channel
        Capabilities: [160] Device Serial Number 00-00-00-00-00-00-00-00
        Kernel driver in use: rtsx_pci
        Kernel modules: rtsx_pci


What to do? :(
When I am trying to compile it in the old way, I have such error:
Code:
# make
cp -f ./define.release ./define.h
make -C /lib/modules/3.8.8-gentoo/build/ SUBDIRS=/mnt/twardy/system/rts_bpp modules
make[1]: Entering directory `/usr/src/linux-3.8.8-gentoo'
  CC [M]  /mnt/twardy/system/rts_bpp/rtsx.o
/mnt/twardy/system/rts_bpp/rtsx.c:893:22: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘rtsx_probe’
/mnt/twardy/system/rts_bpp/rtsx.c:1048:23: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘rtsx_remove’
/mnt/twardy/system/rts_bpp/rtsx.c:1073:11: error: ‘rtsx_probe’ undeclared here (not in a function)
/mnt/twardy/system/rts_bpp/rtsx.c:1074:2: error: implicit declaration of function ‘__devexit_p’ [-Werror=implicit-function-declaration]
/mnt/twardy/system/rts_bpp/rtsx.c:1074:24: error: ‘rtsx_remove’ undeclared here (not in a function)
/mnt/twardy/system/rts_bpp/rtsx.c:255:34: warning: ‘rtsx_host_template’ defined but not used [-Wunused-variable]
/mnt/twardy/system/rts_bpp/rtsx.c:450:12: warning: ‘rtsx_control_thread’ defined but not used [-Wunused-function]
/mnt/twardy/system/rts_bpp/rtsx.c:559:12: warning: ‘rtsx_polling_thread’ defined but not used [-Wunused-function]
/mnt/twardy/system/rts_bpp/rtsx.c:715:13: warning: ‘quiesce_and_remove_host’ defined but not used [-Wunused-function]
/mnt/twardy/system/rts_bpp/rtsx.c:751:13: warning: ‘release_everything’ defined but not used [-Wunused-function]
/mnt/twardy/system/rts_bpp/rtsx.c:761:12: warning: ‘rtsx_scan_thread’ defined but not used [-Wunused-function]
/mnt/twardy/system/rts_bpp/rtsx.c:786:13: warning: ‘rtsx_init_options’ defined but not used [-Wunused-function]
cc1: some warnings being treated as errors
make[2]: *** [/mnt/twardy/system/rts_bpp/rtsx.o] Error 1
make[1]: *** [_module_/mnt/twardy/system/rts_bpp] Error 2
make[1]: Leaving directory `/usr/src/linux-3.8.8-gentoo'
make: *** [default] Error 2
Back to top
View user's profile Send private message
roarinelk
Guru
Guru


Joined: 04 Mar 2004
Posts: 434

PostPosted: Mon Apr 22, 2013 2:49 pm    Post subject: Reply with quote

remove all __devinit and __devexit references in the source.
Back to top
View user's profile Send private message
eccerr0r
Advocate
Advocate


Joined: 01 Jul 2004
Posts: 3598
Location: USA

PostPosted: Mon Apr 22, 2013 5:36 pm    Post subject: Reply with quote

What does the in-kernel driver do and (obviously) not do?

I'm tempted to try it... is it worth the try?


(Machine: HP Envy4 Ultrabook with built-in SD card reader that rts_bpp worked on...)
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed to be advocating?
Back to top
View user's profile Send private message
Xywa
l33t
l33t


Joined: 23 Jul 2005
Posts: 805
Location: /mnt/Gentoo/

PostPosted: Tue Apr 23, 2013 8:06 am    Post subject: Reply with quote

roarinelk wrote:
remove all __devinit and __devexit references in the source.


I am thinking why this compilations runs OK for kernel<3.8?
Back to top
View user's profile Send private message
eccerr0r
Advocate
Advocate


Joined: 01 Jul 2004
Posts: 3598
Location: USA

PostPosted: Wed Apr 24, 2013 6:47 am    Post subject: Reply with quote

I just built Linux 3.8.8 (straight from kernel.org) for my HP Envy4 with
Code:
01:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. Device 5289 (rev 01)
        Subsystem: Hewlett-Packard Company Device 1894
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0, Cache Line Size: 64 bytes
        Interrupt: pin B routed to IRQ 45
        Region 0: Memory at c0600000 (32-bit, non-prefetchable) [size=64K]
        Capabilities: <access denied>
        Kernel driver in use: rtsx_pci

I just tried a regular 1GB SD card and it worked! Yay! No more rts_bpp, that module was awful... Bloat Galore! (plus it was a polling driver...)
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed to be advocating?
Back to top
View user's profile Send private message
Xywa
l33t
l33t


Joined: 23 Jul 2005
Posts: 805
Location: /mnt/Gentoo/

PostPosted: Wed Apr 24, 2013 8:57 am    Post subject: Reply with quote

eccerr0r wrote:
I just built Linux 3.8.8 (straight from kernel.org) for my HP Envy4 with
Code:
01:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. Device 5289 (rev 01)
        Subsystem: Hewlett-Packard Company Device 1894
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0, Cache Line Size: 64 bytes
        Interrupt: pin B routed to IRQ 45
        Region 0: Memory at c0600000 (32-bit, non-prefetchable) [size=64K]
        Capabilities: <access denied>
        Kernel driver in use: rtsx_pci

I just tried a regular 1GB SD card and it worked! Yay! No more rts_bpp, that module was awful... Bloat Galore! (plus it was a polling driver...)


Have a look at mine (the same, but doesn't work):
Code:
lspci -v

 06:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. Device 5289 (rev 01)
         Subsystem: Realtek Semiconductor Co., Ltd. Device 5289
         Flags: bus master, fast devsel, latency 0, IRQ 55
         Memory at f7800000 (32-bit, non-prefetchable) [size=64K]
         Capabilities: [40] Power Management version 3
         Capabilities: [50] MSI: Enable+ Count=1/1 Maskable- 64bit+
         Capabilities: [70] Express Endpoint, MSI 00
         Capabilities: [b0] MSI-X: Enable- Count=1 Masked-
         Capabilities: [d0] Vital Product Data
         Capabilities: [100] Advanced Error Reporting
         Capabilities: [140] Virtual Channel
         Capabilities: [160] Device Serial Number 00-00-00-00-00-00-00-00
         Kernel driver in use: rtsx_pci
         Kernel modules: rtsx_pci
Back to top
View user's profile Send private message
DirtyHairy
l33t
l33t


Joined: 03 Jul 2006
Posts: 604
Location: Würzburg, Deutschland

PostPosted: Wed Apr 24, 2013 11:05 am    Post subject: Reply with quote

Xywa wrote:
I am thinking why this compilations runs OK for kernel<3.8?

Simple thing: kernel sources change, external driver doesn't ;)
Back to top
View user's profile Send private message
eccerr0r
Advocate
Advocate


Joined: 01 Jul 2004
Posts: 3598
Location: USA

PostPosted: Wed Apr 24, 2013 1:57 pm    Post subject: Reply with quote

This may provide some clues:
Code:
mikuru:/usr/portage/sys-kernel/gentoo-sources $ lsmod|grep rtsx_pci
rtsx_pci_ms             4970  0
rtsx_pci_sdmmc          9309  0
mmc_core               82256  2 mmc_block,rtsx_pci_sdmmc
memstick                6398  1 rtsx_pci_ms
rtsx_pci               17780  2 rtsx_pci_ms,rtsx_pci_sdmmc
mfd_core                2969  2 lpc_ich,rtsx_pci


Not sure why yours isn't pulling in these modules (I'd imagine it should do something similar to mine...)?
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed to be advocating?
Back to top
View user's profile Send private message
Xywa
l33t
l33t


Joined: 23 Jul 2005
Posts: 805
Location: /mnt/Gentoo/

PostPosted: Mon Apr 29, 2013 9:59 am    Post subject: Reply with quote

Kernel 3.8.10 - still the same.

To use card reader I had to downgrade to 3.7.10, when it will be fixed in future kernel, I will let you know.
Back to top
View user's profile Send private message
roarinelk
Guru
Guru


Joined: 04 Mar 2004
Posts: 434

PostPosted: Mon Apr 29, 2013 11:26 am    Post subject: Reply with quote

Apply this patch, then it builds for 3.9:

Code:
--- rtsx.c~     2011-12-05 04:41:04.000000000 +0100
+++ rtsx.c      2013-04-29 13:24:41.794429549 +0200
@@ -890,7 +890,7 @@ static void rtsx_init_options(struct rts
        chip->handshake_en = 1;
 }
 
-static int __devinit rtsx_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
+static int rtsx_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
 {
        struct Scsi_Host *host;
        struct rtsx_dev *dev;
@@ -1045,7 +1045,7 @@ errout:
 }
 
 
-static void __devexit rtsx_remove(struct pci_dev *pci)
+static void rtsx_remove(struct pci_dev *pci)
 {
        struct rtsx_dev *dev = (struct rtsx_dev *)pci_get_drvdata(pci);
 
@@ -1071,7 +1071,7 @@ static struct pci_driver driver = {
        .name = CR_DRIVER_NAME,
        .id_table = rts_bpp_ids,
        .probe = rtsx_probe,
-       .remove = __devexit_p(rtsx_remove),
+       .remove = rtsx_remove,
 #ifdef CONFIG_PM
        .suspend = rtsx_suspend,
        .resume = rtsx_resume,
Back to top
View user's profile Send private message
Uli Sing
Apprentice
Apprentice


Joined: 03 May 2010
Posts: 189
Location: MUC

PostPosted: Tue May 21, 2013 1:01 pm    Post subject: Reply with quote

Working for me, thanks for the patch!
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