Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp1378021pxv; Fri, 16 Jul 2021 08:04:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwnVE4FECJZe55+iolRnKbDmwQlJzq2g1xCZcvihluQoANyIWN077rgEHpWg/2DZP/fug1K X-Received: by 2002:aa7:df12:: with SMTP id c18mr15273571edy.62.1626447852384; Fri, 16 Jul 2021 08:04:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626447852; cv=none; d=google.com; s=arc-20160816; b=qpHEvRQfCOGcHgKiuv+frHDz8vZ2kONoO/h2I6QYaQDzwA6fCgY26NrW9JyegNyfEw u+8lk2DV3G0A8qmmeg9nDSPTLR0IxLuadnkMGupMKNYpU9vdPNt/V6tO51nZmOVbhmUk IKJc1GpuMpXkjCcttFQmzd8UpH6okpV+nf1sASBWXKbe6wVapnMLapxNZPIBD/wAmDnF 7yADiT+xiv2Y35cTiZ/sBF8Cdx4xCkapI7+EEn9KdGuPS2+19dCy9JLZsP6gchvRRnlu kI0QNFWueo0EPA8oy2r1awlEDnTRV6Pf9dwav/Wwdm86YRHYKsX7WmyQdAnIJAlbvTCS w+Pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=RTNfCanVuMDv0YAtWhLerL5+C1xCvNyWoo4wS8Mr6Vg=; b=dntx2zm9TOzLHxwxZd+1Wp23o1oiPCrdZq9a3nwtzZYJZhyFPIT5j6HES6xX1r6OTH 3gjUSTKjpP22IJJQBdPSqtfQZHt61z7k9LNvu3ZLLCMVa+Pc6In7B57PrPBpLmdKjrUM vVMQcd7JA3/HeoMAg4+TB6Di0kwG0wlGvskXuf7NbcVTBY2Nib0MQp/rAt2ZlJPaCeYa Pi7cxZ2lBNU4NFBdwjJ/nH7iq0q+BXMMg/vznV4UZNNRefIvPcTd/rnphNN0IbgT8H8r wQqMkb3h8ZEzLLpjvisZq/yoerUIEVAwOPBHj7YGV7Kmnzm8trl1asOwCTw7Oq+AVmXn j9gQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=pKnKwYi5; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w10si12976801ejv.754.2021.07.16.08.03.46; Fri, 16 Jul 2021 08:04:12 -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=@gmail.com header.s=20161025 header.b=pKnKwYi5; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240478AbhGPPFT (ORCPT + 99 others); Fri, 16 Jul 2021 11:05:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49892 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232861AbhGPPFT (ORCPT ); Fri, 16 Jul 2021 11:05:19 -0400 Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 59BFBC06175F; Fri, 16 Jul 2021 08:02:23 -0700 (PDT) Received: by mail-pj1-x102d.google.com with SMTP id p14-20020a17090ad30eb02901731c776526so9020180pju.4; Fri, 16 Jul 2021 08:02:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=RTNfCanVuMDv0YAtWhLerL5+C1xCvNyWoo4wS8Mr6Vg=; b=pKnKwYi5pbyE2W300C0RlHhuZNTN9q9ktdzWRkJgr6WVu6Lz1+t26bWlJYkGbT6Ch9 kZyAV/6fZnT7qfrSk2SvB32a1pQoghzWmjzCLoT0bl5EQh6SzDU82JMblpLFrHEGlOOQ SfHcErZUZIJUXZX7sMFS/1qV3s76NVuuFPUv5No3/gF3kGXTtzN5j5vB/gUIclZbYvnX Cb9JZEJ00UvCjjZtmk2V5drh3eY/yskl5uPsy3s/Kx4dlVOurQg2NObX+KOO8ad4GGzE ZsiZ5vcVK06K7vxT6YasC2DiCxpQO0HelnbDmnkmOSMJ1afYT7TOmstiFAdKn2MsYHtU cteQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=RTNfCanVuMDv0YAtWhLerL5+C1xCvNyWoo4wS8Mr6Vg=; b=Jw6Z0hpHu+Ef/0eX6H739lWf/LjF0Wy6iaXffwVFolqmYCpAwT0dPIAUdqPMTQmOw2 lAjOUYH7+RmYaaG4YkC7+CrCyLxFYrA/qUc2wOJOxWeonXGO6AmXQvtTVnG45M2Wfqig 8nCY6TiPo43SqqYDTg8LH9rtC7ekX/kQ6YQ7k3ZPRVWiUxF29lSAzxvV/ZcDVg/gGgL9 haysEzB2rBx9W9g3q3ie1B4L4jbl41Hr5JhTsM25Oh4ku3r92GMkitPQ7mZYhtIZlrWb OAkGpF+5GtPXmVQSpw59aL8jz/6OWD8GXvGA3WYOhVsJdwvSxs39oN59zWjmPqVRcbyP fMCQ== X-Gm-Message-State: AOAM531XlJrYgsOelyEluEKMn0B3iKqVCawDECXOzZMzdlxqfKLypSnD 91I27JaeDzjaQ9f3Zf0MyWXpfYjx7lw8ziJ/nBg= X-Received: by 2002:a17:902:b198:b029:11b:2246:e374 with SMTP id s24-20020a170902b198b029011b2246e374mr8161599plr.17.1626447742450; Fri, 16 Jul 2021 08:02:22 -0700 (PDT) MIME-Version: 1.0 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> In-Reply-To: From: Andy Shevchenko Date: Fri, 16 Jul 2021 18:01:42 +0300 Message-ID: Subject: Re: [EXT] Re: [PATCH v1 3/4] serial: 8250_pci: Always try MSI/MSI-X To: Ralf Ramsauer Cc: Jiri Slaby , Andy Shevchenko , linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 16, 2021 at 4:07 PM Ralf Ramsauer wrote: > 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 de= vices > >>> 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 su= pport > >>> 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 th= em > >> 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 lon= g > >> 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: Win Chip Head (WCH) > 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 =3D 104, base_baud =3D 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 =3D 104, base_baud =3D 115200) is = a > XR16850 > > After loading 8250_pci, lspci -vvs 18:0.0 tells: > > Capabilities: [68] MSI: Enable+ Count=3D1/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) =3D 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. Can you share somehow the `lspci -vvv -xx -nk; lspci -t` with and without MSI enabled? (I want to understand what is going on with it) > 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=E2=80=A6 --=20 With Best Regards, Andy Shevchenko