Am Freitag, 3. Juni 2005 11:10 schrieb Greg KH:
> On Fri, Jun 03, 2005 at 03:24:51PM +0800, Enzo Chen (?????h) wrote:
> >  
> > Dear Greg,
> > 
> >   Thanks for your quick response, we very appreciate it.
> >  
> >   Our driver is developed based on the usbserial module.
> >   The code listed below is our open function:
> > 
> >       mxu2s_open() {
> >               ......
> >               if(port->read_urb->status != -EINPROGRESS) {
> >                       port->read_urb->dev = port->serial->dev;
> >                       port->read_urb->transfer_buffer_length =
> >                               URB_TRANSFER_BUFFER_SIZE;
> >       
> >                       usb_fill_bulk_urb(port->read_urb, port->serial->dev,
> >                               usb_rcvbulkpipe(port->serial->dev,
> >                                       port->bulk_in_endpointAddress),
> >                               port->read_urb->transfer_buffer,
> >                               port->read_urb->transfer_buffer_length,
> >                               mxu2s_read_bulk_callback, port);
> > 
> >                       rc = usb_submit_urb(port->read_urb, GFP_KERNEL);
> >               ......
> >       }
> > 
> >   we submit the read_urb here, and then it will be submit again
> >   in the read_bulk_callback function : 
> > 
> >       mxu2s_read_bulk_callback() {
> >               ......
> >               if(port->read_urb->status != -EINPROGRESS) {
> 
> This will never be true from within a callback.

On the contrary. It will be always true.

        Regards
                Oliver

Reply via email to