linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: A Sun <as1033x@comcast.net>
To: Sean Young <sean@mess.org>
Cc: linux-media@vger.kernel.org, Mauro Carvalho Chehab <mchehab@kernel.org>
Subject: Re: [PATCH v2 2/3] [media] mceusb: Reword messages referring to "urb"
Date: Tue, 25 Jun 2019 17:29:02 -0400	[thread overview]
Message-ID: <44516839-3c00-1f1e-30c6-3638e45e8d2d@comcast.net> (raw)
In-Reply-To: <20190625161241.u5v7fiegokwrzvey@gofer.mess.org>


Hi again,

On 6/25/2019 12:12 PM, Sean Young wrote:
> Hello,
> 
> On Tue, Jun 25, 2019 at 11:01:32AM -0400, A Sun wrote:
>> On 6/25/2019 6:51 AM, Sean Young wrote:
>>> On Wed, Jun 19, 2019 at 03:54:21AM -0400, A Sun wrote:
>>>>
>>
>>>> -		dev_err(ir->dev, "Error: request urb status = %d (TX HALT)",
>>>> +		dev_err(ir->dev, "Error: tx urb status = %d (TX HALT)",
>>>
>>> I am not sure this makes things clearer. Some of the code still refers
>>> to request, e.g. mce_request_packet.
>>>
>>> Since this is an IR device, there is IR TX and RX; however this unrelated
>>> to that.
>>>
>>> There is one urb/endpoint on which commands are sent; on the other, we
>>> receiver responses and IR data. Calling those TX and RX is not a good
>>> idea I think.
>>
>> The tx urb described is also for IR data TX.
>> IR TX is one primary function/purpose of the device.
>>
>> It happens that the urb/endpoint for IR TX is the same urb/endpoint for
>> mceusb device commands.
> 
> The outgoing urb is for command, e.g. get version, set IR Rx timeout,
> set IR Rx carrier report, set IR wakeup protocol/scancode, resume
> device after suspend. Not everything is IR Tx.
> 

Right. Not everything is command either.
The subject USB interface endpoint-out (and -in) is intended for data
(interrupt/bulk) transfer. The only true data here is IR data.

It's a quirk of mceusb devices to use endpoint-out as a command channel too,
where commands masquerade as data.

A quick sampling of other USB devices, I'm seeing they customarily use
USB default endpoint 0 and control transfers (rather than data transfers)
for device management commands.

>>> The existing code refers to request and response, and also TX and RX in
>>> places. The microsoft documentation refers to "command and response" which
>>> would be consistent with the #define's we have (MCE_CMD_* and MCE_RSP_*).
>>>
>>
>> My intent is to try and better word several of the USB layer messages,
>> and avoid confusing Microsoft MCE terms in those messages.
>>
>> The original "(request) urb" phrases expand to "request USB Request Block"
>> and "<blank> USB Request Block" which are particularly confusing, and
>> non-specific, respectively.
> 
> How about command and response?
> 

Still seem confusing and awkward to me, as in "response USB Request Block",
or "command USB Request Block" that might be IR data. "Command" also suggests
to me USB interface endpoint 0, which isn't the case with mceusb.

Again, my intent is to avoid Microsoft MCE specific terms in messages pertaining
to USB.

In a quick look though other USB drivers, here are some other possibilities:

Endpoint-in / Endpoint-out	(not concise)
ep-in / ep-out			(abbrev may be too obscure)
in / out			("Error: in urb status.." confusing,
				 "in" is noun, adj, or verb?)
read / write			(confusing, "read" is noun, adj, verb?)
RD / WR
RX / TX

I suggest RX/TX. However, I'll have to leave it up to you to make a choice.

Thanks, ..A Sun

  reply	other threads:[~2019-06-25 21:29 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <999ae5cd-d72b-983f-2f96-5aaca72e8214@comcast.net>
2019-06-01 23:34 ` [PATCH v1 1/3] [media] mceusb: Disable "nonsensical irdata" messages A Sun
2019-06-01 23:34 ` [PATCH v1 2/3] [media] mceusb: Reword messages referring to "urb" A Sun
2019-06-01 23:35 ` [PATCH v1 3/3] [media] mceusb: Show USB halt/stall error recovery A Sun
2019-06-06  9:53   ` Sean Young
2019-06-06 21:11     ` A Sun
2019-06-08  8:37       ` Sean Young
2019-06-09  0:56         ` A Sun
2019-06-19  7:53         ` [PATCH v2 0/3] [media] mceusb: Error message text revisions A Sun
2019-06-19  7:53         ` [PATCH v2 1/3] [media] mceusb: Disable "nonsensical irdata" messages A Sun
2019-06-19  7:54         ` [PATCH v2 2/3] [media] mceusb: Reword messages referring to "urb" A Sun
2019-06-25 10:51           ` Sean Young
2019-06-25 15:01             ` A Sun
2019-06-25 16:12               ` Sean Young
2019-06-25 21:29                 ` A Sun [this message]
2019-07-15 12:28                   ` Sean Young
2019-07-21 21:31                     ` A Sun
2019-08-10 12:17                       ` Sean Young
2019-06-19  7:54         ` [PATCH v2 3/3] [media] mceusb: Show USB halt/stall error recovery A Sun
2019-07-15  2:54           ` A Sun

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44516839-3c00-1f1e-30c6-3638e45e8d2d@comcast.net \
    --to=as1033x@comcast.net \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=sean@mess.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).