Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

USB: remove Iso status value in uhci-hcd

This patch (968) changes the way uhci-hcd reports status for
Isochronous URBs. Until now urb->status has been set to the last
detected error code. But other HCDs don't do this; they leave the
status set to 0 and report errors only in the individual iso packet
descriptors. So this patch removes the extra computation and makes
uhci-hcd behave like the others.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

authored by

Alan Stern and committed by
Greg Kroah-Hartman
ee7d1f3f dfd1e537

+3 -9
-1
drivers/usb/host/uhci-hcd.h
··· 146 146 short phase; /* Between 0 and period-1 */ 147 147 short load; /* Periodic time requirement, in us */ 148 148 unsigned int iso_frame; /* Frame # for iso_packet_desc */ 149 - int iso_status; /* Status for Isochronous URBs */ 150 149 151 150 int state; /* QH_STATE_xxx; see above */ 152 151 int type; /* Queue type (control, bulk, etc) */
+3 -8
drivers/usb/host/uhci-q.c
··· 1324 1324 if (list_empty(&qh->queue)) { 1325 1325 qh->iso_packet_desc = &urb->iso_frame_desc[0]; 1326 1326 qh->iso_frame = urb->start_frame; 1327 - qh->iso_status = 0; 1328 1327 } 1329 1328 1330 1329 qh->skel = SKEL_ISO; ··· 1360 1361 qh->iso_packet_desc->actual_length = actlength; 1361 1362 qh->iso_packet_desc->status = status; 1362 1363 } 1363 - 1364 - if (status) { 1364 + if (status) 1365 1365 urb->error_count++; 1366 - qh->iso_status = status; 1367 - } 1368 1366 1369 1367 uhci_remove_td_from_urbp(td); 1370 1368 uhci_free_td(uhci, td); 1371 1369 qh->iso_frame += qh->period; 1372 1370 ++qh->iso_packet_desc; 1373 1371 } 1374 - return qh->iso_status; 1372 + return 0; 1375 1373 } 1376 1374 1377 1375 static int uhci_urb_enqueue(struct usb_hcd *hcd, ··· 1513 1517 1514 1518 qh->iso_packet_desc = &nurb->iso_frame_desc[0]; 1515 1519 qh->iso_frame = nurb->start_frame; 1516 - qh->iso_status = 0; 1517 1520 } 1518 1521 1519 1522 /* Take the URB off the QH's queue. If the queue is now empty, ··· 1581 1586 } 1582 1587 1583 1588 uhci_giveback_urb(uhci, qh, urb); 1584 - if (status < 0 && qh->type != USB_ENDPOINT_XFER_ISOC) 1589 + if (status < 0) 1585 1590 break; 1586 1591 } 1587 1592