Shalini -
I'm not sure I understand the problem that you are describing. We did have
a problem handling the case where we turn power off to the USB device by
using external hardware means (i.e. we control the power supply to the
device as well). In this case the file handles did not get closed
properly. The following patch to usbserial.c fixed the problem for us on a
2.4.19 kernel. I don't really know about it's correctness and it is on an
awfully old kernel version, so we have not submitted the patch.
+++ usbserial.c 2005-05-31 03:08:47.000000000 -0400
@@ -1350,8 +1350,10 @@
if (serial) {
/* fail all future close/read/write/ioctl/etc calls */
for (i = 0; i < serial->num_ports; ++i) {
- if (serial->port[i].tty != NULL)
+ if (serial->port[i].tty != NULL) {
+ tty_hangup(serial->port[i].tty);
serial->port[i].tty->driver_data = NULL;
+ }
}
serial->dev = NULL;
@@ -1470,6 +1472,7 @@
#endif
info(DRIVER_DESC " " DRIVER_VERSION);
+ info("Fixed usbserial.o: added tty_hangup() in
usb_serial_disconnect()");
return 0;
}
I hope this helps you.
Greg
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, May 31, 2005 12:08 AM
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Cc: [email protected]
> Subject: Usb serial with power ON/OFF problem
>
>
>
> Hi Greg/Lee,
>
> On this problem one more scenario, we tried to do switch off
> mobile manually without AT+CFUN=0, with this we are not
> getting control on file descriptors and we are not able to
> reopen file descriptors.
>
> Whereas in other case we could trap AT command and open the
> file descriptor, but in this case how do we take care of it?
>
> We thought that we will make use of proc file system, but not
> sure that this gives solution for our problem.
>
> I hope you understood this problem.
>
>
> Thanks,
>
>
> Shalini
>
>
>
>
>
>
>
>
>
> Confidentiality Notice
>
>
> 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 confidential or
> privileged information. If you are not the intended
> recipient, please notify the sender at Wipro or
> [EMAIL PROTECTED] immediately and destroy all copies of
> this message and any attachments.
>
-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel