# This is a BitKeeper generated patch for the following project: # Project Name: Linux kernel tree # This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas: # ChangeSet 1.456 -> 1.457 # drivers/usb/serial/keyspan_pda.c 1.17 -> 1.18 # # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 02/06/11 greg@kroah.com 1.457 # USB keyspan_pda.c : fix problems found by CHECKER # # pay attention to the return value of usb_control_msg as found by the CHECKER tool. # -------------------------------------------- # diff -Nru a/drivers/usb/serial/keyspan_pda.c b/drivers/usb/serial/keyspan_pda.c --- a/drivers/usb/serial/keyspan_pda.c Tue Jun 11 14:58:37 2002 +++ b/drivers/usb/serial/keyspan_pda.c Tue Jun 11 14:58:37 2002 @@ -194,20 +194,24 @@ static void keyspan_pda_request_unthrottle( struct usb_serial *serial ) { + int result; dbg(" request_unthrottle"); /* ask the device to tell us when the tx buffer becomes sufficiently empty */ - usb_control_msg(serial->dev, - usb_sndctrlpipe(serial->dev, 0), - 7, /* request_unthrottle */ - USB_TYPE_VENDOR | USB_RECIP_INTERFACE - | USB_DIR_OUT, - 16, /* value: threshold */ - 0, /* index */ - NULL, - 0, - 2*HZ); + result = usb_control_msg(serial->dev, + usb_sndctrlpipe(serial->dev, 0), + 7, /* request_unthrottle */ + USB_TYPE_VENDOR | USB_RECIP_INTERFACE + | USB_DIR_OUT, + 16, /* value: threshold */ + 0, /* index */ + NULL, + 0, + 2*HZ); + if (result < 0) + dbg("%s - error %d from usb_control_msg", + __FUNCTION__, result); } @@ -334,14 +338,19 @@ { struct usb_serial *serial = port->serial; int value; + int result; + if (break_state == -1) value = 1; /* start break */ else value = 0; /* clear break */ - usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0), - 4, /* set break */ - USB_TYPE_VENDOR | USB_RECIP_INTERFACE | USB_DIR_OUT, - value, 0, NULL, 0, 2*HZ); + result = usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0), + 4, /* set break */ + USB_TYPE_VENDOR | USB_RECIP_INTERFACE | USB_DIR_OUT, + value, 0, NULL, 0, 2*HZ); + if (result < 0) + dbg("%s - error %d from usb_control_msg", + __FUNCTION__, result); /* there is something funky about this.. the TCSBRK that 'cu' performs ought to translate into a break_ctl(-1),break_ctl(0) pair HZ/4 seconds apart, but it feels like the break sent isn't as long as it