Tiny Core Linux

Tiny Core Base => TCB Q&A Forum => Topic started by: tinypoodle on February 10, 2013, 01:59:24 PM

Title: bind PCMCIA driver
Post by: tinypoodle on February 10, 2013, 01:59:24 PM
What is the method to bind a specific driver to a PCMCIA card?
Title: Re: bind PCMCIA driver
Post by: Rich on February 10, 2013, 05:22:52 PM
Hi tinypoodle
Not sure if this is what you are looking for:
http://www.mjmwired.net/kernel/Documentation/pcmcia/driver.txt
More details as to the nature of your problem may provide more useful answers.
Title: Re: bind PCMCIA driver
Post by: tinypoodle on February 10, 2013, 06:05:01 PM
Well, after 48 hours of searching the web, asking around in various IRC channels and fiddling with a lot of files and settings I was rather skeptical when looking at this url... but it seems that finally did the trick, thanks a lot Rich!   ;D

What I want to achieve is to be able to switch between different drivers available for same device which used to be a piece of cake with the old pcmcia utils by changing the "bind drivername" line in /etc/pcmcia/config.

Not marking this as solved yet, as I wouldn't exclude there might be a more convenient and/or more permanent way to deal with this.
Title: Re: bind PCMCIA driver
Post by: Rich on February 10, 2013, 10:10:26 PM
Hi tinypoodle
Quote
... used to be a piece of cake with the old pcmcia utils ...
Are you referring to cardmgr, cardctl, etc?
Maybe you want to use  pccardctl  to eject a card, which should allow modprobe to unload the current driver if
you want to try a different driver.
Title: Re: bind PCMCIA driver
Post by: Rich on February 10, 2013, 10:42:43 PM
Hi tinypoodle
Forgot to mention,  pccardctl  is part of base, some more information is here:
http://linux.die.net/man/8/pccardctl
Title: Re: bind PCMCIA driver
Post by: tinypoodle on February 10, 2013, 11:12:23 PM
Hi tinypoodle
Quote
... used to be a piece of cake with the old pcmcia utils ...
Are you referring to cardmgr, cardctl, etc?
Yes
Quote
Maybe you want to use  pccardctl  to eject a card, which should allow modprobe to unload the current driver if you want to try a different driver.
Believe me, I had used pccardctl and pcmcia-socket-startup and modprobe several hundred times before first posting...
Driver unloading and loading is one thing, but the issue here is how to bind a driver to the card, and with that I only succeeded with the echo to sys command from link in Reply #1.
Title: Re: bind PCMCIA driver
Post by: aus9 on February 11, 2013, 06:44:09 PM
tinypoodle
Quote
as I wouldn't exclude there might be a more convenient and/or more permanent way to deal with this.

why not create udev rules since I assume you can find out the identifiers of your various hardware?
I am not suggesting I am an expert on udev rules but I think they can be used to
a) for a certain known hardware device....run a certain script
b) for a diff known hardware device .......run a diff certain script

then create a tcz of your handiwork, and I am assuming you are hot swapping without reboot of various pcmcia devices

good luck
Title: Re: bind PCMCIA driver
Post by: tinypoodle on February 12, 2013, 11:44:30 AM
tinypoodle
Quote
as I wouldn't exclude there might be a more convenient and/or more permanent way to deal with this.

why not create udev rules since I assume you can find out the identifiers of your various hardware?
udev had crossed my mind and I wouldn't exclude it could play a role but my understanding about it is most minimal... Any specific suggestions would be welcome.
Quote
I am not suggesting I am an expert on udev rules but I think they can be used to
a) for a certain known hardware device....run a certain script
b) for a diff known hardware device .......run a diff certain script
ok, but issue in question differs from that, it is about switching between different drivers at will for one and same device.
Title: Re: bind PCMCIA driver
Post by: aus9 on February 12, 2013, 05:14:28 PM
Quote
switching between different drivers at will for one and same device

sorry udev no help there, but two simple scripts  (as I am simple minded) might help auto-mate it for you?
---since you already know the commands that work for you at the moment.

script 1 for driver 1, 2 the other