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

Re: [PATCH v5 1/9] drivers/char: separate dbgp=xhci to dbc=xhci option


  • To: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 25 Aug 2022 17:44:54 +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=AOvEdHyZ5rTZoc1MJBHnVG7KzKZdD5hwPoXSmyAdY+M=; b=HdnIvP/w4pvX8FYMSkPFBG9JI/gJTEGLihfub2Dra3WeojZCr/lgMlWgX7KX7fYK7k40RTX38uqEMfZ0PgvsSGSGKo0q33XfjlzvSXVsTAgHKVt2qSFozSoqdi7o6USGPvc757YNoHIVeEYrtu/8dEw5KKNx2CmAoGh6zTzP+gZdp/G8FWAX6MsenIYuZYIJxwOgurZX6W2L0CMVl0NqnYy61523jc/S6/vhxsGykCN4kqOUSKGa5/EODA3HlAHTziPRBnJJBzjui+867HPmHaxDz/NCQ1qUr9A3s/CQwmUQhdSNiGDFyj1HOzS8ZBTJztk65J6W4zhQQB+cLTCBiw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HJCvlaKe97pLnEUrGOWFpFBtLVPWVDcUnqclEqk1mwLx2TYWjgibQkwAIzpuTT91BM9YSuz4DWJMGKK+1zUVQQYtSmP3+yoMCK7/1UZKEaGua804YLbbNT8mZbyDZBueS30MFvixiZvaOaDeVIMVrcn9+Udn0KR0Ik2OJG7Bkfz+9Q0oZ4bDuVB83E4fQk88dS8Z3hHZzal4/RdfVtevB4qfKpctFbhbJdh7hhz9iPePicWTsVf/VhSZA+iz7vloBB+EMRe+Xx5Gchzh3Lk9i9eDBj7Lsov4bqMRjFg9KyTuK9wHc3pPfXoKTZaF2PoY+6ld3DqCU3AQQI0Z0o81IA==
  • 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: Thu, 25 Aug 2022 15:45:27 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 22.08.2022 17:27, Marek Marczykowski-Górecki wrote:
> This allows configuring EHCI and XHCI consoles separately,
> simultaneously.
> 
> Suggested-by: Jan Beulich <jbeulich@xxxxxxxx>

But was I maybe confused, and much less of a change would suffice? After
all ...

> --- a/xen/drivers/char/xhci-dbc.c
> +++ b/xen/drivers/char/xhci-dbc.c
> @@ -1058,9 +1058,9 @@ static struct xhci_dbc_ctx ctx __aligned(16);
>  static uint8_t out_wrk_buf[DBC_WORK_RING_CAP];
>  static struct xhci_string_descriptor str_buf[DBC_STRINGS_COUNT];
>  
> -static char __initdata opt_dbgp[30];
> +static char __initdata opt_dbc[30];
>  
> -string_param("dbgp", opt_dbgp);
> +string_param("dbc", opt_dbc);
>  
>  void __init xhci_dbc_uart_init(void)
>  {
> @@ -1068,25 +1068,25 @@ void __init xhci_dbc_uart_init(void)
>      struct dbc *dbc = &uart->dbc;
>      const char *e;
>  
> -    if ( strncmp(opt_dbgp, "xhci", 4) )
> +    if ( strncmp(opt_dbc, "xhci", 4) )
>          return;

... this already avoids mixing up who's going to parse what. So right
now I think that ...

> @@ -1102,7 +1102,7 @@ void __init xhci_dbc_uart_init(void)
>      dbc->dbc_str = str_buf;
>  
>      if ( dbc_open(dbc) )
> -        serial_register_uart(SERHND_DBGP, &dbc_uart_driver, &dbc_uart);
> +        serial_register_uart(SERHND_DBC, &dbc_uart_driver, &dbc_uart);
>  }

... this and other SERHND_* related changes are enough, and there's no
need for a separate "dbc=" option.

> --- a/xen/include/xen/serial.h
> +++ b/xen/include/xen/serial.h
> @@ -95,6 +95,7 @@ struct uart_driver {
>  # define SERHND_COM1    (0<<0)
>  # define SERHND_COM2    (1<<0)
>  # define SERHND_DBGP    (2<<0)
> +# define SERHND_DBC     (3<<0)

Please also update the comment just out of context.

Jan



 


Rackspace

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