Re: [PATCH 06/12] usb: usbtmc: Add vendor specific/asynchronous read/write ioctls

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, May 17, 2018 at 07:03:30PM +0200, Guido Kiener wrote:
> - ioctl USBTMC_IOCTL_WRITE sends an (a)synchronous generic message
>   to bulk OUT. The message is split into chunks of 4k (page size).
>   Message size is aligned to 32 bit boundaries.
> 
>   With flag USBTMC_FLAG_ASYNC the ioctl is non blocking.
>   With flag USBTMC_FLAG_APPEND additional urbs are queued and
>   out_status/out_transfer_size is not reset. EPOLLOUT | EPOLLWRNORM
>   is signaled when all submitted urbs are completed.
> 
> - ioctl USBTMC_IOCTL_WRITE_RESULT copies current out_transfer_size
>   to given __u64 pointer and returns current out_status of the last
>   USBTMC_IOCTL_WRITE call.
> 
> - ioctl USBTMC_IOCTL_READ reads an (a)synchronous generic message
>   from bulk IN. Depending on transfer_size the function submits one
>   (<=4kB) or more urbs (up to 16) with a size of 4k.
> 
>   The flag USBTMC_FLAG_IGNORE_TRAILER can be used when the transmission
>   size is already known. Then the function does not truncate the
>   transfer_size to a multiple of 4 kB, but does reserve extra space
>   to receive the final short or zero length packet. Note that the
>   instrument is allowed to send up to wMaxPacketSize - 1 bytes at the
>   end of a message to avoid sending a zero length packet.

Again, one patch per ioctl please, it makes it easier to review.

And why are you allowing arbitrary bulk messages now?

What good is this spec if everyone goes around it?

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux