Am Donnerstag, 3. Mai 2007 01:08 schrieb James Graves: > > Here's those two patch files. Boy, don't I feel silly. > > James >
Hi, this is wrong for 2 reasons: +static int sierra_resume(struct usb_serial *serial) +{ + dbg("%s", __FUNCTION__); + if (serial) + sierra_setup_urbs(serial); + return 0; +} 1. sierra_setup_urb called in sierra_setup_urbs: static struct urb *sierra_setup_urb(struct usb_serial *serial, int endpoint, int dir, void *ctx, char *buf, int len, usb_complete_t callback) { struct urb *urb; if (endpoint == -1) return NULL; /* endpoint not needed */ urb = usb_alloc_urb(0, GFP_KERNEL); /* No ISO */ if (urb == NULL) { dbg("%s: alloc for endpoint %d failed.", __FUNCTION__, endpoint); return NULL; } /* Fill URB using supplied data. */ usb_fill_bulk_urb(urb, serial->dev, usb_sndbulkpipe(serial->dev, endpoint) | dir, buf, len, callback, ctx); return urb; } 1. You allocate new urbs. But you don't free the old urbs in suspend. 2. You don't restart the read queue. resume() must share code with open() in that regard +static inline void unlink_urbs(struct sierra_port_private *portdata) +{ + int i; + for (i = 0; i < N_IN_URB; i++) + usb_unlink_urb(portdata->in_urbs[i]); + for (i = 0; i < N_OUT_URB; i++) + usb_unlink_urb(portdata->out_urbs[i]); +} Use usb_kill_urb() please. Regards Oliver -- SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) This signature is a legal requirement ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel