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

Re: [PATCH v3 10/10] driver/char: add RX support to the XHCI driver


  • To: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Fri, 5 Aug 2022 14:38:26 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ii8XkMyPcAtw/F2gScSdDNe2Hasbr7ZwKHZvBWFlevk=; b=DcrywsV/Cjyh07cN2StRd8WXqIYMSim+lzAWuSkVth/C/So9I0HDbU+paXkUFD2DwGCGqB8aLAopavs66Y5oSN7phU8qv6m00hysCtyrT9vKOg0pFhJBKBXf/nFufaX0Hwjfv/4FsoC/BPHipGHYQ0qY6autcHR7ZvzMcT5XZb3xl10YZaJPRgvL1ntcvIxo5V+0NZ0jWZv4F0MLk4BA4drdY3taEHHVe9DBL4hfIwyinhiDkwVG0s5tuNYpgInOQ+nqxoe9y6B1EJTuxC1JjyxsT9ySM/vCZY50RUtLrP8WzvGuSHAr49+l5qX6js/Dt57bDyB5d5n4FBpzZv2aTQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IK+PNWlStbaulS5P5WfkAM9iNGp/aW/zYkMg7idG376HCPWyhb0i/vaYTC2WXhY1DR2abv5PFgHH/vP78vLdDhF5qRj2M47pIQK5di81nZyFlprwIOU2/1xq29tFUFhh6z5TMQrZfxrGJQQgeekIRBIlXIMJ65RLHMJhtFbB2KGT9UyphevQuA9RtCAF4iJE49UsriEhpbgliHtVZzo6LnOzQO1ollOJ8lBwdOB3SsxXoVuP36kgbvS1Lu11+KVHmuaEbylzzFpqXYtI32RsMoNCgMqlbhVgiVhgTo0D/sSskHIH8+SahqM7lQJ/39W3VoU9ydnSs0ijRd3dAW0tSg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Fri, 05 Aug 2022 12:38:40 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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.

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

Jan



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.