|
@@ -157,6 +157,7 @@ static struct usb_endpoint_driver_operations ncm_intr_operations = {
|
157
|
157
|
* @ret rc Return status code
|
158
|
158
|
*/
|
159
|
159
|
static int ncm_in_prefill ( struct ncm_device *ncm ) {
|
|
160
|
+ struct usb_bus *bus = ncm->bus;
|
160
|
161
|
size_t mtu;
|
161
|
162
|
unsigned int count;
|
162
|
163
|
int rc;
|
|
@@ -178,6 +179,8 @@ static int ncm_in_prefill ( struct ncm_device *ncm ) {
|
178
|
179
|
/* Attempt allocation at this MTU */
|
179
|
180
|
if ( mtu > NCM_MAX_NTB_INPUT_SIZE )
|
180
|
181
|
continue;
|
|
182
|
+ if ( mtu > bus->mtu )
|
|
183
|
+ continue;
|
181
|
184
|
count = ( NCM_IN_MIN_SIZE / mtu );
|
182
|
185
|
if ( count < NCM_IN_MIN_COUNT )
|
183
|
186
|
count = NCM_IN_MIN_COUNT;
|