All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Marek Marczykowski-Górecki" <marmarek@invisiblethingslab.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
	George Dunlap <george.dunlap@citrix.com>,
	Julien Grall <julien@xen.org>,
	Stefano Stabellini <sstabellini@kernel.org>, Wei Liu <wl@xen.org>,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH v3 10/10] driver/char: add RX support to the XHCI driver
Date: Fri, 5 Aug 2022 14:47:04 +0200	[thread overview]
Message-ID: <Yu0RSB0OwfoKX+Fp@mail-itl> (raw)
In-Reply-To: <65f4ef5d-a174-2d23-3ed6-1c80e5f6244a@suse.com>

[-- Attachment #1: Type: text/plain, Size: 2184 bytes --]

On Fri, Aug 05, 2022 at 02:38:26PM +0200, Jan Beulich wrote:
> On 05.08.2022 11:58, Marek Marczykowski-Górecki wrote:
> > On Fri, Aug 05, 2022 at 10:38:13AM +0200, Jan Beulich wrote:
> >> On 26.07.2022 05:23, Marek Marczykowski-Górecki wrote:
> >>> @@ -454,6 +466,12 @@ static uint32_t xhci_trb_tfre_cc(const struct xhci_trb *trb)
> >>>      return trb->status >> 24;
> >>>  }
> >>>  
> >>> +/* Amount of data _not_ transferred */
> >>> +static uint32_t xhci_trb_tfre_len(const struct xhci_trb *trb)
> >>> +{
> >>> +    return trb->status & 0x1FFFF;
> >>> +}
> >>
> >> Same as xhci_trb_norm_len()?
> > 
> > Yes, I was considering to use that, but technically those are different
> > packets, only incidentally using the same bits.
> 
> I see. That's the problem with using literal numbers rather than #define-s.
> But for a driver like this I didn't want to be overly picky, and hence
> would have wanted to let you get away without introducing many more.

That's kind of the purpose of those helper functions - to extract
specific fields according to the xhci interface, one per function. An
alternative could be #define _instead of_ those functions, but I think
that would be worse.  What I mean, is the function name serves as
description of that those constants are about.

> >>> @@ -985,6 +1054,33 @@ static void dbc_flush(struct dbc *dbc, struct xhci_trb_ring *trb,
> >>>  }
> >>>  
> >>>  /**
> >>> + * Ensure DbC has a pending transfer TRB to receive data into.
> >>> + *
> >>> + * @param dbc the dbc to flush
> >>> + * @param trb the ring for the TRBs to transfer
> >>> + * @param wrk the work ring to receive data into
> >>> + */
> >>> +static void dbc_enqueue_in(struct dbc *dbc, struct xhci_trb_ring *trb,
> >>> +                           struct dbc_work_ring *wrk)
> >>
> >> I can't seem to be able to spot any use of this function - it being
> >> static, how do things build for you?
> > 
> > It's in dbc_uart_poll().
> 
> Oh, interesting. This then means that patch 1 on its own doesn't build.

Right, I need to move the call into this patch.

-- 
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2022-08-05 12:47 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-26  3:23 [PATCH v3 00/10] Add Xue - console over USB 3 Debug Capability Marek Marczykowski-Górecki
2022-07-26  3:19 ` [PATCH v3 01/10] drivers/char: Add support for USB3 DbC debugger Marek Marczykowski-Górecki
2022-07-26  3:23   ` Marek Marczykowski-Górecki
2022-08-04 12:57   ` Jan Beulich
2022-08-04 13:43     ` Marek Marczykowski-Górecki
2022-08-04 14:21       ` Jan Beulich
2022-08-04 14:28         ` Marek Marczykowski-Górecki
2022-08-04 14:36           ` Jan Beulich
2022-08-04 14:41             ` Marek Marczykowski-Górecki
2022-08-04 14:49               ` Jan Beulich
2022-08-04 14:34         ` Jan Beulich
2022-08-05  6:14           ` Jan Beulich
2022-08-05  7:23   ` Jan Beulich
2022-08-05  9:51     ` Marek Marczykowski-Górecki
2022-08-05  9:54       ` Jan Beulich
2022-08-05 10:01         ` Marek Marczykowski-Górecki
2022-07-26  3:23 ` [PATCH v3 02/10] drivers/char: reset XHCI ports when initializing dbc Marek Marczykowski-Górecki
2022-08-04 13:14   ` Jan Beulich
2022-07-26  3:23 ` [PATCH v3 03/10] drivers/char: add support for selecting specific xhci Marek Marczykowski-Górecki
2022-07-26  3:23 ` [PATCH v3 04/10] console: support multiple serial console simultaneously Marek Marczykowski-Górecki
2022-08-04 14:13   ` Jan Beulich
2022-08-05  7:41   ` Jan Beulich
2022-08-05 13:11     ` Marek Marczykowski-Górecki
2022-07-26  3:23 ` [PATCH v3 05/10] IOMMU: add common API for device reserved memory Marek Marczykowski-Górecki
2022-08-04 14:25   ` Jan Beulich
2022-08-04 14:38     ` Marek Marczykowski-Górecki
2022-08-04 14:41       ` Jan Beulich
2022-07-26  3:23 ` [PATCH v3 06/10] IOMMU/VT-d: wire common device reserved memory API Marek Marczykowski-Górecki
2022-07-26  3:23 ` [PATCH v3 07/10] IOMMU/AMD: " Marek Marczykowski-Górecki
2022-08-04 14:53   ` Jan Beulich
2022-07-26  3:23 ` [PATCH v3 08/10] drivers/char: mark DMA buffers as reserved for the XHCI Marek Marczykowski-Górecki
2022-08-05  7:05   ` Jan Beulich
2022-08-05 10:11     ` Marek Marczykowski-Górecki
2022-07-26  3:23 ` [PATCH v3 09/10] drivers/char: allow driving the rest of XHCI by a domain while Xen uses DbC Marek Marczykowski-Górecki
2022-08-05  8:15   ` Jan Beulich
2022-08-05 15:49     ` Marek Marczykowski-Górecki
2022-08-09  6:24       ` Jan Beulich
2022-07-26  3:23 ` [PATCH v3 10/10] driver/char: add RX support to the XHCI driver Marek Marczykowski-Górecki
2022-08-05  8:38   ` Jan Beulich
2022-08-05  9:58     ` Marek Marczykowski-Górecki
2022-08-05 12:38       ` Jan Beulich
2022-08-05 12:47         ` Marek Marczykowski-Górecki [this message]
2022-08-05 12:51           ` Jan Beulich
2022-07-26  6:18 ` [PATCH v3 00/10] Add Xue - console over USB 3 Debug Capability Jan Beulich
2022-07-26  9:26   ` Marek Marczykowski-Górecki

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=Yu0RSB0OwfoKX+Fp@mail-itl \
    --to=marmarek@invisiblethingslab.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=george.dunlap@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=julien@xen.org \
    --cc=sstabellini@kernel.org \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.