Author Topic: Why does USB not have "payload size" field in transaction itself?  (Read 4584 times)

matrixofdynamism

  • Member
  • ***
  • Posts: 12
Unlike Ethernet, in USB there is no "payload size" field. The DATA0 and DATA1 do not contain size information. Is it because only the host is for responsible and it finds out the endpoint size from descriptors and for IN transactions, it has a huge amount of buffer available?

I am talking about USB2.0. Not sure about USB3.0.

Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: Why does USB not have "payload size" field in transaction itself?
« Reply #1 on: January 26, 2017, 12:04:27 pm »
In the endpoint descriptor, bMaxPacketSize gives the maximum number of data bytes per transaction. A USB transfer is made up of one or more transactions.

The transfer's total payload size and/or end of transfer indicator are defined by the class or vendor-defined protocol that the host assigns to the device. Often, end of transfer is indicated by a less-than-maximum-size data packet (which can be a 0-length data packet). For some classes, higher-level protocols such as SCSI or Ethernet (USB communications class) provide the payload size.