WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: bind PCMCIA driver  (Read 2694 times)

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
bind PCMCIA driver
« on: February 10, 2013, 01:59:24 PM »
What is the method to bind a specific driver to a PCMCIA card?
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11639
Re: bind PCMCIA driver
« Reply #1 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.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: bind PCMCIA driver
« Reply #2 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.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11639
Re: bind PCMCIA driver
« Reply #3 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.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11639
Re: bind PCMCIA driver
« Reply #4 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

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: bind PCMCIA driver
« Reply #5 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.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

aus9

  • Guest
Re: bind PCMCIA driver
« Reply #6 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
« Last Edit: February 11, 2013, 06:49:25 PM by aus9 »

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: bind PCMCIA driver
« Reply #7 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.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

aus9

  • Guest
Re: bind PCMCIA driver
« Reply #8 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
« Last Edit: February 12, 2013, 05:16:02 PM by aus9 »