Changing MAXIMUM_TRANSFER_SIZE pipe policy in WinUSB

Is there any way to change MAXIMUM_TRANSFER_SIZE for the bulk out pipe in WinUSB? This parameter is set to 2.1 MB (0x1FEC00) when It is read using WinUSB_GetPipePolicy API.

I’m debugging some USB 3.0 issues and I need to lower this value.

xxxxx@hotmail.com wrote:

Is there any way to change MAXIMUM_TRANSFER_SIZE for the bulk out pipe in WinUSB? This parameter is set to 2.1 MB (0x1FEC00) when It is read using WinUSB_GetPipePolicy API.

I’m debugging some USB 3.0 issues and I need to lower this value.

That doesn’t make sense. That value is merely telling you the largest
transfer that WinUSB will support. You are not REQUIRED to submit
transfers of that size. If you need to submit smaller transfers, then
by golly just submit smaller transfers.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

yes ,Tim Reberts is right.

but i find a problem if you application is Maximum_tranfer_size?2.1MB? ,and the device return size also 2.1MB?but sometime if the transfer process lose some packet?then the application can not receive any dada?and the return size is zero.

Tim,

Thanks for the reply.

But my application sends more than 4 MB of data in each call to WinUsb_WritePipe API and I assume win USB driver will segment it into MAXIMUM_TRANSFER_SIZE transfers when submit the URBs to the bulk out pipe.

To debug some of the issues in the device side, I need to limit each transfer to 1MB. If I can reduce MAXIMUM_TRANSFER_SIZE value to 1 MB, WinUSB driver will segments my 4 MB of data to 1 MB transfer.

Or I’ll have to segment them in the application before call to WinUsb_WritePipe.

zhonghong200@163.com wrote:

yes ,Tim Reberts is right.

but i find a problem if you application is Maximum_tranfer_size?2.1MB? ,and the device return size also 2.1MB?but sometime if the transfer process lose some packet?then the application can not receive any dada?and the return size is zero.

The word is “data”, NOT “dada”.

Bulk pipe transfers cannot lose packets. If there is a packet error,
the bus will keep retrying until the transfer succeeds.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

xxxxx@hotmail.com wrote:

But my application sends more than 4 MB of data in each call to WinUsb_WritePipe API and I assume win USB driver will segment it into MAXIMUM_TRANSFER_SIZE transfers when submit the URBs to the bulk out pipe.

To debug some of the issues in the device side, I need to limit each transfer to 1MB. If I can reduce MAXIMUM_TRANSFER_SIZE value to 1 MB, WinUSB driver will segments my 4 MB of data to 1 MB transfer.

Or I’ll have to segment them in the application before call to WinUsb_WritePipe.

If you need peculiar segmenting, then you need to do the segmentation in
your application. It’s just that easy.

However, this whole conversation is a bit confusing. Devices don’t know
anything about the maximum transfer size. That is nothing more than a
software convention. On the bus, the transfer is just a long series of
512-byte transfers. Whether it is a single 4MB transfer, or four
transfers of 4MB, it will look absolutely identical on the bus.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

There is not a mechanism in WinUSB to modify its auto-segmentation sizes. You will need to segment it yourself.

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@hotmail.com
Sent: Tuesday, August 31, 2010 6:50 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Changing MAXIMUM_TRANSFER_SIZE pipe policy in WinUSB

Tim,

Thanks for the reply.

But my application sends more than 4 MB of data in each call to WinUsb_WritePipe API and I assume win USB driver will segment it into MAXIMUM_TRANSFER_SIZE transfers when submit the URBs to the bulk out pipe.

To debug some of the issues in the device side, I need to limit each transfer to 1MB. If I can reduce MAXIMUM_TRANSFER_SIZE value to 1 MB, WinUSB driver will segments my 4 MB of data to 1 MB transfer.

Or I’ll have to segment them in the application before call to WinUsb_WritePipe.


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

There is not a mechanism in WinUSB to allow you to modify its auto segmentation sizes. If you want smaller transfers, you will have to implement that segmentation in your code.

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@hotmail.com
Sent: Tuesday, August 31, 2010 6:50 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Changing MAXIMUM_TRANSFER_SIZE pipe policy in WinUSB

Tim,

Thanks for the reply.

But my application sends more than 4 MB of data in each call to WinUsb_WritePipe API and I assume win USB driver will segment it into MAXIMUM_TRANSFER_SIZE transfers when submit the URBs to the bulk out pipe.

To debug some of the issues in the device side, I need to limit each transfer to 1MB. If I can reduce MAXIMUM_TRANSFER_SIZE value to 1 MB, WinUSB driver will segments my 4 MB of data to 1 MB transfer.

Or I’ll have to segment them in the application before call to WinUsb_WritePipe.


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer