handling of error value returned from client event handler

kaustav.majumdar at wipro.com kaustav.majumdar at wipro.com
Mon Mar 13 01:23:24 EST 2006


Hi all,

We are developing driver for a PC Card with a USB host controller. For
this, we have a requirement of notifying the host controller driver for
the USB port about suspension of the PC card. From user space, when card
is suspended, this event by default does not get propagated to the host
controller driver layer. We are facing an issue regarding this.

As per as our understanding, the event handler of a PCMCIA client driver
can either return 0 on success or error value for an error condition.
Also the event handler is called from ds_event through a call to
send_event.

But in ds_event, the return value of send_event is not checked. So from
this, can we assume that even if the PCMCIA client driver will return an
error code from its event handler routine for a 'Suspend' event, then
also the socket layer will go on with removing the power?

We had also tested this behavior with orinoco_cs.c by assigning -1 to
err value (the value which is going to be returned) if it goes inside
PM_SUSPEND case in the event handler orinoco_cs_event (when a suspend
event generated). We had observed that the card gets power off for
echo -n 3 > /sys/class/pcmcia_socket/pcmcia_socket1/device/power/state
even when return value is -1.

We want to know that is this the standard behavior and if not then how
the error returned from the client driver event handler is handled in
the PCMCIA subsystem?

Thanks in advance. Looking forward to your replies

Thank you,
With Regards,
Kaustav Majumdar


The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.

www.wipro.com



More information about the linux-pcmcia mailing list