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>, "Roger Pau Monné" <roger.pau@citrix.com>,
xen-devel@lists.xenproject.org,
"Connor Davis" <connojdavis@gmail.com>
Subject: Re: [PATCH v2 1/9] drivers/char: Add support for Xue USB3 debugger
Date: Wed, 20 Jul 2022 22:12:01 +0200 [thread overview]
Message-ID: <YthhkXbFpFRSHHHR@mail-itl> (raw)
In-Reply-To: <dc195aca-79e1-7faa-d29a-ea0626e257ad@suse.com>
[-- Attachment #1: Type: text/plain, Size: 1728 bytes --]
On Thu, Jul 14, 2022 at 01:58:25PM +0200, Jan Beulich wrote:
> On 06.07.2022 17:32, Marek Marczykowski-Górecki wrote:
> > +static int xue_init_dbc(struct xue *xue)
> > +{
> > + uint64_t erdp = 0;
> > + uint64_t out = 0;
> > + uint64_t in = 0;
> > + uint64_t mbs = 0;
> > + struct xue_dbc_reg *reg = xue_find_dbc(xue);
> > +
> > + if ( !reg )
> > + return 0;
> > +
> > + xue->dbc_reg = reg;
> > + xue_disable_dbc(xue);
> > +
> > + xue_trb_ring_init(xue, &xue->dbc_ering, 0, XUE_DB_INVAL);
> > + xue_trb_ring_init(xue, &xue->dbc_oring, 1, XUE_DB_OUT);
> > + xue_trb_ring_init(xue, &xue->dbc_iring, 1, XUE_DB_IN);
> > +
> > + erdp = virt_to_maddr(xue->dbc_ering.trb);
> > + if ( !erdp )
> > + return 0;
> > +
> > + memset(xue->dbc_erst, 0, sizeof(*xue->dbc_erst));
> > + xue->dbc_erst->base = erdp;
> > + xue->dbc_erst->size = XUE_TRB_RING_CAP;
> > +
> > + mbs = (reg->ctrl & 0xFF0000) >> 16;
> > + out = virt_to_maddr(xue->dbc_oring.trb);
> > + in = virt_to_maddr(xue->dbc_iring.trb);
> > +
> > + memset(xue->dbc_ctx, 0, sizeof(*xue->dbc_ctx));
> > + xue_init_strings(xue, xue->dbc_ctx->info);
> > + xue_init_ep(xue->dbc_ctx->ep_out, mbs, xue_ep_bulk_out, out);
> > + xue_init_ep(xue->dbc_ctx->ep_in, mbs, xue_ep_bulk_in, in);
> > +
> > + reg->erstsz = 1;
> > + reg->erstba = virt_to_maddr(xue->dbc_erst);
> > + reg->erdp = erdp;
> > + reg->cp = virt_to_maddr(xue->dbc_ctx);
>
> The only place this field is read looks to be xue_dump().
No, reg is MMIO, all those assignments are actually configuring the
device.
--
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2022-07-20 20:12 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-06 15:32 [PATCH v2 0/9] Add Xue - console over USB 3 Debug Capability Marek Marczykowski-Górecki
2022-07-06 15:32 ` [PATCH v2 1/9] drivers/char: Add support for Xue USB3 debugger Marek Marczykowski-Górecki
2022-07-08 2:11 ` Marek Marczykowski-Górecki
2022-07-12 15:59 ` Jan Beulich
2022-07-18 10:45 ` Marek Marczykowski-Górecki
2022-07-18 10:55 ` Jan Beulich
2022-07-12 16:06 ` Jan Beulich
2022-07-14 6:05 ` Jan Beulich
2022-07-16 22:40 ` Marek Marczykowski-Górecki
2022-07-14 11:58 ` Jan Beulich
2022-07-16 23:32 ` Marek Marczykowski-Górecki
2022-07-20 20:12 ` Marek Marczykowski-Górecki [this message]
2022-07-21 10:25 ` Jan Beulich
2022-07-06 15:32 ` [PATCH v2 2/9] xue: reset XHCI ports when initializing dbc Marek Marczykowski-Górecki
2022-07-13 7:19 ` Jan Beulich
2022-07-06 15:32 ` [PATCH v2 3/9] xue: add support for selecting specific xhci Marek Marczykowski-Górecki
2022-07-13 7:24 ` Jan Beulich
2022-07-06 15:32 ` [PATCH v2 4/9] console: support multiple serial console simultaneously Marek Marczykowski-Górecki
2022-07-13 9:39 ` Jan Beulich
2022-07-18 12:48 ` Marek Marczykowski-Górecki
2022-07-18 14:37 ` Jan Beulich
2022-07-06 15:32 ` [PATCH v2 5/9] IOMMU: add common API for device reserved memory Marek Marczykowski-Górecki
2022-07-14 10:17 ` Jan Beulich
2022-07-18 10:53 ` Marek Marczykowski-Górecki
2022-07-18 11:14 ` Jan Beulich
2022-07-18 11:03 ` Marek Marczykowski-Górecki
2022-07-18 11:15 ` Jan Beulich
2022-07-06 15:32 ` [PATCH v2 6/9] IOMMU/VT-d: wire common device reserved memory API Marek Marczykowski-Górecki
2022-07-06 15:32 ` [PATCH v2 7/9] IOMMU/AMD: " Marek Marczykowski-Górecki
2022-07-14 10:22 ` Jan Beulich
2022-07-18 11:35 ` Marek Marczykowski-Górecki
2022-07-18 11:44 ` Jan Beulich
2022-07-06 15:32 ` [PATCH v2 8/9] xue: mark DMA buffers as reserved for the device Marek Marczykowski-Górecki
2022-07-14 11:51 ` Jan Beulich
2022-07-18 13:15 ` Marek Marczykowski-Górecki
2022-07-20 20:17 ` Marek Marczykowski-Górecki
2022-07-21 10:30 ` Jan Beulich
2022-07-06 15:32 ` [PATCH v2 9/9] xue: allow driving the rest of XHCI by a domain while Xen uses DbC Marek Marczykowski-Górecki
2022-07-14 12:06 ` Jan Beulich
2022-07-18 12:54 ` Marek Marczykowski-Górecki
2022-07-18 15:07 ` Jan Beulich
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=YthhkXbFpFRSHHHR@mail-itl \
--to=marmarek@invisiblethingslab.com \
--cc=andrew.cooper3@citrix.com \
--cc=connojdavis@gmail.com \
--cc=george.dunlap@citrix.com \
--cc=jbeulich@suse.com \
--cc=julien@xen.org \
--cc=roger.pau@citrix.com \
--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.