mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Punit Agrawal <punit1.agrawal@toshiba.co.jp>,
	linux-serial@vger.kernel.org
Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
	nobuhiro1.iwamatsu@toshiba.co.jp, shrirang.bagul@canonical.com,
	robh@kernel.org, gregkh@linuxfoundation.org, johan@kernel.org
Subject: Re: [RFC 0/1] serdes: Add whitelist to bring back missing serial port
Date: Mon, 16 Dec 2019 07:29:46 +0100	[thread overview]
Message-ID: <b1ce4dff-7239-640a-fcc3-4ff935fdb3a7@redhat.com> (raw)
In-Reply-To: <20191216040825.523720-1-punit1.agrawal@toshiba.co.jp>

HI,

On 16-12-2019 05:08, Punit Agrawal wrote:
> 
> Hi,
> 
> While booting v5.5-rc1 on Apollo Lake based UP2[0], I ran into an
> issue with the primary serial port. The kernel is able to output to
> ttyS0 but systemd isn't able to raise a login prompt. On further
> investigation, it turns out that no serial device (/dev/ttyS0) is
> being created as the device is claimed by serdev sub-system.
> 
> The issue has been reported in a few different places[0][1]. A patch
> was proposed to solve the issue but there doesn't seem to be any
> further progress[2]. Feedback on the thread suggested implementing a
> whitelist based approach - which is what this RFC does.
> 
> With this patch, systemd is able to create a login prompt. The
> whitelist has intentionally been left blank as it's not clear which
> devices go in there.

As I already mentioned when discussing this upstream:

https://marc.info/?l=linux-serial&m=152460460418058&w=2

I am afraid that a whitelist is not going to fly, that means
duplicating all the device-ids in all the relevant drivers and that
everytime we add a device-id we need to do so in 2 places. Just take
a look at drivers/bluetooth/hci_bcm.c at the device-id list starting
at line 1187 and that is just 1 driver.

I also mention a hack for RTL8723BS devices there, but those have
gotten a proper in kernel driver in the mean time.

Looking at the ACPI device id list in the proposed upstream fix
with a "hsuart serdev driver":
https://www.spinics.net/lists/linux-serial/msg30035.html

+static const struct acpi_device_id hsuart_acpi_match[] = {
+	{"INT3511", 0},
+	{"INT3512", 0},
+	{ },
+};

Then blacklist with just these 2 ids would clearly be a much better
approach, as we are talking 2 ids vs 50+ ids here for whitelist vs
blacklist.

The whitepaper on this:
https://www.intel.com/content/dam/www/public/us/en/documents/white-papers/enabling-multi-com-port-white-paper.pdf
Also mentions these 2 as "the default Hardware IDs (INT3511 and INT3512) used here are Intel HS-UART COM
port peripheral device IDs." as the hardware ids to use if the port has no
specific function, in other words to use these 2 ids when under Linux the
serial-port should just show up as a /dev/ttyS* device.

So I believe that the fix here is using a blacklist with just these 2
ids in there.

Regards,

Hans


  parent reply	other threads:[~2019-12-16  6:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-16  4:08 Punit Agrawal
2019-12-16  4:08 ` [RFC ] serdev: Only claim supported devices Punit Agrawal
2019-12-16  6:29 ` Hans de Goede [this message]
2019-12-16  6:54   ` [RFC 0/1] serdes: Add whitelist to bring back missing serial port Punit Agrawal

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=b1ce4dff-7239-640a-fcc3-4ff935fdb3a7@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=johan@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=nobuhiro1.iwamatsu@toshiba.co.jp \
    --cc=punit1.agrawal@toshiba.co.jp \
    --cc=robh@kernel.org \
    --cc=shrirang.bagul@canonical.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®