Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp1291308pxv; Fri, 16 Jul 2021 06:10:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyCR+PhX4AOhcOelFcK8bOHPYArxDxvxgW6AxFa0NMqkzrKqlEmckDjdYc96kdMbds5/nHe X-Received: by 2002:a5e:c20b:: with SMTP id v11mr7326705iop.93.1626441020592; Fri, 16 Jul 2021 06:10:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626441020; cv=none; d=google.com; s=arc-20160816; b=vfTYoWOssy9yhzHEtiSOei7v42Dwlrchyifid7DxshXWwSXGasTBUENb38PAgPCTDI WOmStfjnyz9LHVB41jtOGJysqKXFg2sCxAPChPDvFsGL4qcDk5Pq5X0ym1JJHD+UUnP8 0FyQ0ApeucCxUDwk0PsoKUBMMBYaJqnMztLluDfTceJn1gXlMgB926vZkBCkpe38hfWn 7Ft2WsYfl4n0PWTPn0ZsjZfAUAC1Vb250mYbSmS9RXWSj4kx6Xib0oYV1Kyc8O4shBr4 BlU8KVvCjzM1M4SWhUgSCIWImbaU5GjW4kYVtNDuNS8fZVLSOz5I4S6KqGQUo0Yxeygs kQdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=ouFmdmxN9fdZ0nW/HOuNa4kwdbEZ+5X3c22BP5HazTQ=; b=thMILu90ftOV27C6xOaqVNlvGgZZPfW9g42QUlVYrWHsY4ITyObKEp8tg+5Posy0XJ QMw367lk4/ItvGjShDmAXdvV9UIQ04EaHo8U1WfADvf9RzGFWqAH0fmqgBZilqQEY2Vw dQTrAT6wZ8IP/1dqcpn7AZ369qFYufpjJSoVOwIVTSY9G+DFv+Cu85FMv0VqPiRQ/rFc 6OTvjluu48YZqljN5QamNKHpskfPRXq5to6e3otK2H/X3fk2CR/9KxEDlQeg7edWvvBa qWHwHDPKIpSxAIgmw3u6aShYRX54/iZTZ7/eOvmqBrO5SNdXzm6bsuw8GVm1vZGcdOV7 oAbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oth-regensburg.de header.s=mta01-20160622 header.b=Yy5exus8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oth-regensburg.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m9si10242867jaj.89.2021.07.16.06.10.04; Fri, 16 Jul 2021 06:10:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@oth-regensburg.de header.s=mta01-20160622 header.b=Yy5exus8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oth-regensburg.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239125AbhGPNKO (ORCPT + 99 others); Fri, 16 Jul 2021 09:10:14 -0400 Received: from mta02.hs-regensburg.de ([194.95.104.12]:55476 "EHLO mta02.hs-regensburg.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238380AbhGPNKN (ORCPT ); Fri, 16 Jul 2021 09:10:13 -0400 Received: from E16S03.hs-regensburg.de (e16s03.hs-regensburg.de [IPv6:2001:638:a01:8013::93]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "E16S03", Issuer "E16S03" (not verified)) by mta02.hs-regensburg.de (Postfix) with ESMTPS id 4GRBNN6NC5zy2y; Fri, 16 Jul 2021 15:07:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oth-regensburg.de; s=mta01-20160622; t=1626440836; bh=ouFmdmxN9fdZ0nW/HOuNa4kwdbEZ+5X3c22BP5HazTQ=; h=Subject:To:CC:References:From:Date:In-Reply-To:From; b=Yy5exus8dhK9N7VsMhq5VzrOcLNW5cQSVfVjHjfrcajRKkOZ1odLg4kjUadpabMHl nNM70AW5X9OwFFm/Nvq6ZtEZmd8ev1BvdrmvzvNrX0vAws1xwb2QgzEj60r+dBydGf lDxj1zweK9QTDT7yWP2pDIgH8zmzIpm+Mpg7DxRg9U1wINo933Tf13PeZnvLbQk6Em e09HV9tHgRCAYEhRdRLPXsuf2op9W8UPJmGa2jfI+jgMBEEcc68Gnj3tggFHq5C+v4 oRnZmLGgfjB3rbgcQGrjs+pZfhTwXoKgwsc/Kqc5kTG7GBVOtu/h4ObmcDmAH/esvc snyJCoSynmXxQ== Received: from [IPv6:2001:638:a01:8061:5c51:6883:5436:5db] (2001:638:a01:8013::138) by E16S03.hs-regensburg.de (2001:638:a01:8013::93) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Fri, 16 Jul 2021 15:07:16 +0200 Subject: Re: [EXT] Re: [PATCH v1 3/4] serial: 8250_pci: Always try MSI/MSI-X To: Andy Shevchenko CC: Jiri Slaby , Andy Shevchenko , , , Greg Kroah-Hartman References: <20210713104026.58560-1-andriy.shevchenko@linux.intel.com> <20210713104026.58560-3-andriy.shevchenko@linux.intel.com> <9af24b96-8119-7ccf-f0d0-d725af80aa0b@kernel.org> <784629f9-677e-ee53-aceb-89397ce0951a@oth-regensburg.de> From: Ralf Ramsauer Message-ID: Date: Fri, 16 Jul 2021 15:07:16 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 8bit X-Originating-IP: [2001:638:a01:8013::138] X-ClientProxiedBy: E16S02.hs-regensburg.de (2001:638:a01:8013::92) To E16S03.hs-regensburg.de (2001:638:a01:8013::93) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 14/07/2021 15:35, Andy Shevchenko wrote: > On Wed, Jul 14, 2021 at 3:56 PM Ralf Ramsauer > wrote: >> On 14/07/2021 08:54, Jiri Slaby wrote: >>> On 13. 07. 21, 12:40, Andy Shevchenko wrote: > >>> Hmm, have you checked the commit which introduced the whitelist? >>> >>> Nevertheless, this needs to handled with care: while many 8250 devices >>> actually claim to support MSI(-X) interrupts it should not be >>> enabled be >>> default. I had at least one device in my hands with broken MSI >>> implementation. >>> >>> So better introduce a whitelist with devices that are known to support >>> MSI(-X) interrupts. I tested all devices mentioned in the patch. >>> >>> >>> You should have at least CCed the author for an input. >> >> Yep, back then I was testing three different 8250 pci cards. All of them >> claimed to support MSI, while one really worked with MSI, the one that I >> whitelisted. So I thought it would be better to use legacy IRQs as long >> as no one tested a specific card to work with MSI. > > Can you shed a light eventually what those cards are? So I found a no-name el-cheapo card that has some issues with MSI: 18:00.0 Serial controller: Device 1c00:3253 (rev 10) (prog-if 05 [16850]) The card comes with two serial lines. It comes perfectly up, if I enable it to use MSI in the whitelist: serial 0000:18:00.0: Using MSI(-X) interrupts serial 0000:18:00.0: Setup PCI port: port 40c0, irq 104, type 0 0000:18:00.0: ttyS6 at I/O 0x40c0 (irq = 104, base_baud = 115200) is a XR16850 serial 0000:18:00.0: Setup PCI port: port 40c8, irq 104, type 0 0000:18:00.0: ttyS7 at I/O 0x40c8 (irq = 104, base_baud = 115200) is a XR16850 After loading 8250_pci, lspci -vvs 18:0.0 tells: Capabilities: [68] MSI: Enable+ Count=1/32 Maskable+ 64bit+ Address: 00000000fee000b8 Data: 0000 Masking: ffffffff Pending: 00000000 Looks good so far. Now let's echo to the device. $ echo asdf > /dev/ttyS6 -- stuck. The echoing process stucks at close(): write(1, "asdf\n", 5) = 5 close(1 Stuck in the sense of: the echo is still killable, no crashes. The same happens if I try to access the device with stty. So something is odd here. However, the Netmos cards that I whitelisted do a great job. So I can't tell if I was just unlucky to grab a card that has issues with MSI, and this is an exception rather than the rule… HTH, Ralf > >> Don't do that… And don't convert it to a blacklist. A blacklist will >> break users until they report that something doesn't work. > > White list is not okay either. MSI in general is a right thing to do. > preventing users from MSI is asking for the performance degradation > and IRQ resource conflicts (in case the IRQ line is shared). > > Besides that, shouldn't it be rather the specific field in private (to > 8250_pci) structure than constantly growing list? >