aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/serial/cypress_m8.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/drivers/usb/serial/cypress_m8.c b/drivers/usb/serial/cypress_m8.c
index 57b8e27285fc..163386336a5d 100644
--- a/drivers/usb/serial/cypress_m8.c
+++ b/drivers/usb/serial/cypress_m8.c
@@ -1275,10 +1275,11 @@ static void cypress_read_int_callback(struct urb *urb)
1275 int bytes = 0; 1275 int bytes = 0;
1276 int result; 1276 int result;
1277 int i = 0; 1277 int i = 0;
1278 int status = urb->status;
1278 1279
1279 dbg("%s - port %d", __FUNCTION__, port->number); 1280 dbg("%s - port %d", __FUNCTION__, port->number);
1280 1281
1281 switch (urb->status) { 1282 switch (status) {
1282 case 0: /* success */ 1283 case 0: /* success */
1283 break; 1284 break;
1284 case -ECONNRESET: 1285 case -ECONNRESET:
@@ -1292,7 +1293,7 @@ static void cypress_read_int_callback(struct urb *urb)
1292 default: 1293 default:
1293 /* something ugly is going on... */ 1294 /* something ugly is going on... */
1294 dev_err(&urb->dev->dev,"%s - unexpected nonzero read status received: %d\n", 1295 dev_err(&urb->dev->dev,"%s - unexpected nonzero read status received: %d\n",
1295 __FUNCTION__,urb->status); 1296 __FUNCTION__, status);
1296 cypress_set_dead(port); 1297 cypress_set_dead(port);
1297 return; 1298 return;
1298 } 1299 }
@@ -1419,10 +1420,11 @@ static void cypress_write_int_callback(struct urb *urb)
1419 struct usb_serial_port *port = (struct usb_serial_port *)urb->context; 1420 struct usb_serial_port *port = (struct usb_serial_port *)urb->context;
1420 struct cypress_private *priv = usb_get_serial_port_data(port); 1421 struct cypress_private *priv = usb_get_serial_port_data(port);
1421 int result; 1422 int result;
1423 int status = urb->status;
1422 1424
1423 dbg("%s - port %d", __FUNCTION__, port->number); 1425 dbg("%s - port %d", __FUNCTION__, port->number);
1424 1426
1425 switch (urb->status) { 1427 switch (status) {
1426 case 0: 1428 case 0:
1427 /* success */ 1429 /* success */
1428 break; 1430 break;
@@ -1430,7 +1432,8 @@ static void cypress_write_int_callback(struct urb *urb)
1430 case -ENOENT: 1432 case -ENOENT:
1431 case -ESHUTDOWN: 1433 case -ESHUTDOWN:
1432 /* this urb is terminated, clean up */ 1434 /* this urb is terminated, clean up */
1433 dbg("%s - urb shutting down with status: %d", __FUNCTION__, urb->status); 1435 dbg("%s - urb shutting down with status: %d",
1436 __FUNCTION__, status);
1434 priv->write_urb_in_use = 0; 1437 priv->write_urb_in_use = 0;
1435 return; 1438 return;
1436 case -EPIPE: /* no break needed; clear halt and resubmit */ 1439 case -EPIPE: /* no break needed; clear halt and resubmit */
@@ -1438,7 +1441,8 @@ static void cypress_write_int_callback(struct urb *urb)
1438 break; 1441 break;
1439 usb_clear_halt(port->serial->dev, 0x02); 1442 usb_clear_halt(port->serial->dev, 0x02);
1440 /* error in the urb, so we have to resubmit it */ 1443 /* error in the urb, so we have to resubmit it */
1441 dbg("%s - nonzero write bulk status received: %d", __FUNCTION__, urb->status); 1444 dbg("%s - nonzero write bulk status received: %d",
1445 __FUNCTION__, status);
1442 port->interrupt_out_urb->transfer_buffer_length = 1; 1446 port->interrupt_out_urb->transfer_buffer_length = 1;
1443 port->interrupt_out_urb->dev = port->serial->dev; 1447 port->interrupt_out_urb->dev = port->serial->dev;
1444 result = usb_submit_urb(port->interrupt_out_urb, GFP_ATOMIC); 1448 result = usb_submit_urb(port->interrupt_out_urb, GFP_ATOMIC);
@@ -1450,7 +1454,7 @@ static void cypress_write_int_callback(struct urb *urb)
1450 break; 1454 break;
1451 default: 1455 default:
1452 dev_err(&urb->dev->dev,"%s - unexpected nonzero write status received: %d\n", 1456 dev_err(&urb->dev->dev,"%s - unexpected nonzero write status received: %d\n",
1453 __FUNCTION__,urb->status); 1457 __FUNCTION__, status);
1454 cypress_set_dead(port); 1458 cypress_set_dead(port);
1455 break; 1459 break;
1456 } 1460 }