Revision d61000a8

b/hw/usb-ehci.c
1299 1299

  
1300 1300
    if (q->usb_status < 0) {
1301 1301
        switch(q->usb_status) {
1302
        case USB_RET_IOERROR:
1302 1303
        case USB_RET_NODEV:
1303 1304
            q->qh.token |= (QTD_TOKEN_HALT | QTD_TOKEN_XACTERR);
1304 1305
            set_field(&q->qh.token, 0, QTD_TOKEN_CERR);
......
1471 1472
                default:
1472 1473
                    fprintf(stderr, "Unexpected iso usb result: %d\n", ret);
1473 1474
                    /* Fall through */
1475
                case USB_RET_IOERROR:
1474 1476
                case USB_RET_NODEV:
1475 1477
                    /* 3.3.2: XACTERR is only allowed on IN transactions */
1476 1478
                    if (dir) {
b/hw/usb-ohci.c
837 837
                        OHCI_CC_DATAUNDERRUN);
838 838
        } else {
839 839
            switch (ret) {
840
            case USB_RET_IOERROR:
840 841
            case USB_RET_NODEV:
841 842
                OHCI_SET_BM(iso_td.offset[relative_frame_number], TD_PSW_CC,
842 843
                            OHCI_CC_DEVICENOTRESPONDING);
......
1052 1053
            OHCI_SET_BM(td.flags, TD_CC, OHCI_CC_DATAUNDERRUN);
1053 1054
        } else {
1054 1055
            switch (ret) {
1056
            case USB_RET_IOERROR:
1055 1057
            case USB_RET_NODEV:
1056 1058
                OHCI_SET_BM(td.flags, TD_CC, OHCI_CC_DEVICENOTRESPONDING);
1057 1059
            case USB_RET_NAK:
b/hw/usb-uhci.c
765 765
            break;
766 766
	return 1;
767 767

  
768
    case USB_RET_IOERROR:
768 769
    case USB_RET_NODEV:
769 770
    default:
770 771
	break;
b/hw/usb.h
39 39
#define USB_TOKEN_IN    0x69 /* device -> host */
40 40
#define USB_TOKEN_OUT   0xe1 /* host -> device */
41 41

  
42
#define USB_RET_NODEV  (-1)
43
#define USB_RET_NAK    (-2)
44
#define USB_RET_STALL  (-3)
45
#define USB_RET_BABBLE (-4)
46
#define USB_RET_ASYNC  (-5)
42
#define USB_RET_NODEV   (-1)
43
#define USB_RET_NAK     (-2)
44
#define USB_RET_STALL   (-3)
45
#define USB_RET_BABBLE  (-4)
46
#define USB_RET_IOERROR (-5)
47
#define USB_RET_ASYNC   (-6)
47 48

  
48 49
#define USB_SPEED_LOW   0
49 50
#define USB_SPEED_FULL  1
b/usb-linux.c
369 369
                break;
370 370

  
371 371
            default:
372
                p->result = USB_RET_NAK;
372
                p->result = USB_RET_IOERROR;
373 373
                break;
374 374
            }
375 375

  
......
729 729
    case -EOVERFLOW:
730 730
        return USB_RET_BABBLE;
731 731
    default:
732
        return USB_RET_NAK;
732
        return USB_RET_IOERROR;
733 733
    }
734 734
}
735 735

  
b/usb-redir.c
431 431
            /* Check iso_error for stream errors, otherwise its an underrun */
432 432
            status = dev->endpoint[EP2I(ep)].iso_error;
433 433
            dev->endpoint[EP2I(ep)].iso_error = 0;
434
            return status ? USB_RET_NAK : 0;
434
            return status ? USB_RET_IOERROR : 0;
435 435
        }
436 436
        DPRINTF2("iso-token-in ep %02X status %d len %d queue-size: %d\n", ep,
437 437
                 isop->status, isop->len, dev->endpoint[EP2I(ep)].bufpq_size);
......
439 439
        status = isop->status;
440 440
        if (status != usb_redir_success) {
441 441
            bufp_free(dev, isop, ep);
442
            return USB_RET_NAK;
442
            return USB_RET_IOERROR;
443 443
        }
444 444

  
445 445
        len = isop->len;
......
1018 1018
        return USB_RET_STALL;
1019 1019
    case usb_redir_cancelled:
1020 1020
        WARNING("returning cancelled packet to HC?\n");
1021
        return USB_RET_NAK;
1021 1022
    case usb_redir_inval:
1023
        WARNING("got invalid param error from usb-host?\n");
1024
        return USB_RET_NAK;
1022 1025
    case usb_redir_ioerror:
1023 1026
    case usb_redir_timeout:
1024 1027
    default:
1025
        return USB_RET_NAK;
1028
        return USB_RET_IOERROR;
1026 1029
    }
1027 1030
}
1028 1031

  

Also available in: Unified diff