mmlr + stippi:
Hide USB errors better from the upper layers: Only try the "clear feature" command if the error is B_DEV_STALLED. On other errors, the clear feature was likely to fail, as it should only be used on stalled devices. Errors intended to be ignored were thus not ignored because of the "clear feature" failure. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26555 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -133,8 +133,9 @@ KeyboardDevice::_InterpretBuffer()
|
||||
if (IsRemoved())
|
||||
return B_ERROR;
|
||||
|
||||
if (gUSBModule->clear_feature(fInterruptPipe,
|
||||
USB_FEATURE_ENDPOINT_HALT) != B_OK)
|
||||
if (fTransferStatus == B_DEV_STALLED
|
||||
&& gUSBModule->clear_feature(fInterruptPipe,
|
||||
USB_FEATURE_ENDPOINT_HALT) != B_OK)
|
||||
return B_ERROR;
|
||||
|
||||
return B_OK;
|
||||
|
||||
@@ -82,8 +82,9 @@ MouseDevice::_InterpretBuffer()
|
||||
if (IsRemoved())
|
||||
return B_ERROR;
|
||||
|
||||
if (gUSBModule->clear_feature(fInterruptPipe,
|
||||
USB_FEATURE_ENDPOINT_HALT) != B_OK)
|
||||
if (fTransferStatus == B_DEV_STALLED
|
||||
&& gUSBModule->clear_feature(fInterruptPipe,
|
||||
USB_FEATURE_ENDPOINT_HALT) != B_OK)
|
||||
return B_ERROR;
|
||||
|
||||
return B_OK;
|
||||
|
||||
Reference in New Issue
Block a user