[Prev][Next][Index][Thread]

Re: PCMCIA support



I've got a design question. First some general information about pcmcia-cs.

  The Linux kernel PCMCIA system has three main components.  At the lowest 
  level are the socket drivers.  Next is the Card Services module.  Drivers 
  for specific cards are layered on top of Card Services.  One special 
  Card Services client, called Driver Services, provides a link betweek user 
  level utility programs and the kernel facilities.

  Driver Services provides a link between Card Services client drivers and 
  user mode utilities like the cardmgr daemon. It is a sort of Card Services 
  'super-client'. Driver Services uses the BindDevice function to link other 
  client drivers with their corresponding cards. Unlike other clients, Driver 
  Services remains permanently bound to all sockets as cards are inserted and 
  removed.

  Driver Services creates a pseudo-device for communicating with user mode 
  PC Card utilities. The major number of the device is chosen dynamically, 
  and PC Card utilities should read /proc/devices to determine it. Minor 
  device numbers correspond to socket numbers, starting with 0.

  Only one process is allowed to open a socket for read/write access. Other 
  processes can open the socket in read-only mode. A read-only connection to 
  Driver Services can perform a subset of ioctl calls. A read/write 
  connection can issue all ioctl calls, and can also receive Card Services 
  event notifications.

  Cardmgr monitors PCMCIA sockets for card insertion and removal events. 
  When a card is inserted, cardmgr looks up the card in a database of 
  known cards. If the card can be identified, appropriate device drivers 
  will be loaded and bound to the card.  When a card is ejected, that card's
  drivers will be shut down and unloaded if possible. Based on the contents 
  of the PCMCIA card configuration database, cardmgr may also execute 
  arbitrary commands when appropriate cards are either inserted or removed. 

The question is now, how should the "user mode PC Card utilities" (aka cardmgr)
look like in oskit? It would be desirable to have a full transparent pcmcia
support. For this, a special version of cardmgr is needed, which could be
placed between pcmcia-cs and the fdev interface. Is this feasible? 

Furthermore I'm a bit confused how to handle the select call (Is it safe to 
use select? On what depends it?).

wagi

-- 
Daniel Wagner                       "Don't drink and derive."        
email: wagi@gmx.ch

GnuPG: 1024D/DCDE890A (public key available on any keyserver)

References: