Hi Greg,
I'm facing two problems regarding power ON/OFF problem which are mentioned below: Case 1: I'm using RHEL4 with usbserial driver for my application and here I'm facing problem while doing power ON/OFF problem. It works fine upto 10 times after that I'm getting problem in usb_dump_endpoint_descriptor. Since power ON/OFF is very essential for our application so we wanted to run it for some 100 times, its working fine up to 10 times, after that device is not able to detected by the driver. In this case close function is used as give below: static void serial_close(struct tty_struct *tty, struct file * filp) { struct usb_serial_port *port = (struct usb_serial_port *) tty->driver_data; if (!port) return; dbg("%s - port %d", __FUNCTION__, port->number); --port->open_count; if (port->open_count <= 0){ /* only call the device specific close if this * port is being closed by the last owner */ port->serial->type->close(port, filp); port->open_count = 0; if (port->tty) { if (port->tty->driver_data) port->tty->driver_data = NULL; port->tty = NULL; } } //module_put(port->serial->type->owner); //kref_put(&port->serial->kref, destroy_serial); } Case 2: One more problem I faced is if I give AT+CFUN=0 from kermit, it does the same kind of work like it disconnects the device, but it does not detect the device again. Close function is used as given below; static void serial_close(struct tty_struct *tty, struct file * filp) { struct usb_serial_port *port = (struct usb_serial_port *) tty->driver_data; if (!port) return; dbg("%s - port %d", __FUNCTION__, port->number); --port->open_count; if (port->open_count <= 0) { /* only call the device specific close if this * port is being closed by the last owner */ port->serial->type->close(port, filp); port->open_count = 0; if (port->tty) { if (port->tty->driver_data) port->tty->driver_data = NULL; port->tty = NULL; } } module_put(port->serial->type->owner); kref_put(&port->serial->kref, destroy_serial); } Please give me suggestions on this ASAP. Thanks & Regards, Shalini ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel