Alan Stern wrote:
This doesn't sound like a particularly easy problem to solve.

However, it's simple to detect, and I suspect usb-storage should probably add a test to make sure incoming scatterlists are ok. Something like:

  for (i = 0; i < (sg_len - 1); i++) {
      if ((sg[i].length % ep_maxpacket) != 0) {
          dev_err(... "no can do\n");
          return -EINVAL;
      }
  }

That is, only the last transfer can be "short".  If failing
is undesirable (vs non-success?) then the "EINVAL" case could
eventually morph into some bounce-buffer strategy.

- Dave




------------------------------------------------------- This SF. Net email is sponsored by: GoToMyPC GoToMyPC is the fast, easy and secure way to access your computer from any Web browser or wireless device. Click here to Try it Free! https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to