lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aINZIJTz5bxO66OW@hovoldconsulting.com>
Date: Fri, 25 Jul 2025 12:14:56 +0200
From: Johan Hovold <johan@...nel.org>
To: Martin Blumenstingl <martin.blumenstingl@...glemail.com>
Cc: Greg KH <gregkh@...uxfoundation.org>,
	Corentin Labbe <clabbe@...libre.com>, linux-kernel@...r.kernel.org,
	linux-usb@...r.kernel.org, david@...t.cz
Subject: Re: [PATCH v8 1/2] usb: serial: add support for CH348

On Wed, Jul 16, 2025 at 11:31:49AM +0200, Martin Blumenstingl wrote:
> On Wed, Jul 16, 2025 at 10:57 AM Greg KH <gregkh@...uxfoundation.org> wrote:

> > And are you trying to only have one set of urbs out for any port being
> > opened (i.e. you only have one control, one read, and one write urb for
> > the whole device, and the port info are multiplexed over these urbs?  Or
> > do you have one endpoint per port?)

> CH348 provides up to 8 serial ports using these four endpoints, so
> multiplexing is going on:
> - one bulk out for TX (see struct ch348_txbuf)
> - one bulk in for RX (see struct ch348_rxbuf)
> - one bulk out for CONFIG handling (see struct ch348_config_buf)
> - one bulk in for STATUS handling (see struct ch348_status_entry)
> 
> > If you are sharing endpoints, try looking at one of the other usb-serial
> > drivers that do this today, like io_edgeport.c, that has had shared
> > endpoints for 25 years, it's not a new thing :)

> My understanding is that io_edgeport is submits the URBs that are
> shared across ports outside of .open/.close.
> So this will be a question for Johan: am I still good with the
> original approach - or can you convince Greg that a different approach
> is better?

It's definitely better not to waste power when the device is plugged in
but not in use. :)

Take a look at f81534 for an example of how this can be implemented.

Johan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ