Re: [PATCH 04/12] usb: usbtmc: Add ioctls for trigger, EOM bit and TermChar

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

 




Zitat von Oliver Neukum <oneukum@xxxxxxxx>:

Am Donnerstag, den 17.05.2018, 19:03 +0200 schrieb Guido Kiener:
+       retval = usb_bulk_msg(data->usb_dev,
+                             usb_sndbulkpipe(data->usb_dev,
+                                             data->bulk_out),
+                             buffer, USBTMC_HEADER_SIZE,
+                             &actual, file_data->timeout);
+
+       /* Store bTag (in case we need to abort) */
+       data->bTag_last_write = data->bTag;
+
+       /* Increment bTag -- and increment again if zero */
+       data->bTag++;
+       if (!data->bTag)
+               data->bTag++;
+

Independent of whether this needs to be split up, do you really
want to do this regardless of usb_bulk_msg() returning an error?

	Regards
		Oliver


I think it is ok. Our devices do not care much about the
right order of sequence numbers. It is just a hint to abort the last
messages. And the client should know the last message numbers itself.

The current implementation does it the same way.
https://elixir.bootlin.com/linux/v4.17-rc6/source/drivers/usb/class/usbtmc.c#L835

Regards

Guido

--
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