Problem RHEL4 on usb serial driver

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

 



Hi All,

 

I’m new to this list and this my first query to group.

 

I'm facing two problems regarding USB device power ON/OFF, 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 up to 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

 

 

 


From: redhat-devel-list-bounces@xxxxxxxxxx [mailto:redhat-devel-list-bounces@xxxxxxxxxx] On Behalf Of Ankur Chaudhary
Sent: Friday, September 30, 2005 7:25 PM
To: redhat-devel-list@xxxxxxxxxx
Subject: <Ankur Chaudhary: What Topic going on?>

 

hi,

This Ankur Chaudhary, Cananybody plz tell what topic actually goingon.

 

Have a nice day!


Yahoo! for Good
Click here to donate to the Hurricane Katrina relief effort.

_______________________________________________
Redhat-devel-list mailing list
Redhat-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/redhat-devel-list

[Index of Archives]     [Kernel Newbies]     [Red Hat General]     [Fedora]     [Red Hat Install]     [Linux Kernel Development]     [Yosemite News]

  Powered by Linux