3479
3480 if ((hdw->ctl_read_urb->status != 0) &&
3481 (hdw->ctl_read_urb->status != -ENOENT) &&
3482 (hdw->ctl_read_urb->status != -ESHUTDOWN) &&
3483 (hdw->ctl_read_urb->status != -ECONNRESET)) {
3484
3485
3486 status = hdw->ctl_read_urb->status;
3487 if (!probe_fl) {
3488 pvr2_trace(PVR2_TRACE_ERROR_LEGS,
3489 "control-read URB failure,"
3490 " status=%d",
3491 status);
3492 }
3493 goto done;
3494 }
3495 if (hdw->ctl_read_urb->actual_length < read_len) {
3496
3497 status = -EIO;
3498 if (!probe_fl) {
3499 pvr2_trace(PVR2_TRACE_ERROR_LEGS,
3500 "control-read URB short,"
3501 " expected=%d got=%d",
3502 read_len,
3503 hdw->ctl_read_urb->actual_length);
3504 }
3505 goto done;
3506 }
3507
3508 for (idx = 0; idx < read_len; idx++) {
3509 ((unsigned char *)read_data)[idx] =
3510 hdw->ctl_read_buffer[idx];
3511 }
3512 }
3513
3514 done:
3515
3516 hdw->cmd_debug_state = 0;
3517 if ((status < 0) && (!probe_fl)) {
3518 pvr2_hdw_render_useless(hdw);
3519 }