Make that queue_request() call into a clear_feature() call, as that's how it was
probably meant to be. The call as it was made no sense at all, as it hardcoded the endpoint number and tried to supply data to a non-data request. It also wasn't using a synchronous call, possibly triggering the callback function with an incompletely set-up device structure, depending on how quickly the request would return. This caused bug #4107. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31666 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -273,17 +273,10 @@ got_one:
|
|||||||
if ((my_dev = create_device (dev, intf, ifno)) == NULL) {
|
if ((my_dev = create_device (dev, intf, ifno)) == NULL) {
|
||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
st = usb->queue_request(dev,
|
usb->clear_feature(intf->endpoint[0].handle, USB_FEATURE_ENDPOINT_HALT);
|
||||||
USB_REQTYPE_ENDPOINT_OUT | USB_REQTYPE_STANDARD,
|
// TODO: verify if this is necessary at all
|
||||||
USB_REQUEST_CLEAR_FEATURE,
|
|
||||||
USB_FEATURE_ENDPOINT_HALT, 1, my_dev->total_report_size,
|
|
||||||
my_dev->buffer, my_dev->total_report_size, midi_usb_callback, my_dev);
|
|
||||||
if (st != B_OK) {
|
|
||||||
DPRINTF_ERR ((MY_ID "queue_request() error %d\n", (int)st));
|
|
||||||
return B_ERROR;
|
|
||||||
}
|
|
||||||
|
|
||||||
my_dev->timestamp = system_time ();
|
my_dev->timestamp = system_time ();
|
||||||
|
|
||||||
/* issue bulk transfer */
|
/* issue bulk transfer */
|
||||||
|
|||||||
Reference in New Issue
Block a user