PCCARD - interruptible sleep

Jacqueline P jackie7691 at yahoo.com.mx
Wed Nov 8 10:34:32 UTC 2006


Hi all
   
  how can I implement an interruptible sleep within my pccard smart card reader driver like ?
  For Linux I do this the following way
   
  // interruptible_pause()
static inline void ipause(unsigned long amount) {
 set_current_state(TASK_INTERRUPTIBLE);
 schedule_timeout(amount);
}
   
  and within my driver I use the function DELAY which does a busy wait.
   
  The problem is, that the driver does not recognize when the pccard is detached during a read / write operation.
   
  Does the kernel update the struct device_t, so that the driver can use the function device_is_attached() to determine that the device is detached ?
   
  Thanks,
  Jacqueline
   

 		
---------------------------------
  Do You Yahoo!? La mejor conexión a Internet y 2GB extra a tu correo por $100 al mes. http://net.yahoo.com.mx 


More information about the freebsd-drivers mailing list