From patchwork Fri Dec 8 19:06:44 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 10103191 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8EDE060325 for ; Fri, 8 Dec 2017 19:08:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7FEB728EEF for ; Fri, 8 Dec 2017 19:08:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7493528EF1; Fri, 8 Dec 2017 19:08:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.4 required=2.0 tests=BAYES_00,FAKE_REPLY_C, FREEMAIL_FROM,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7982428EEF for ; Fri, 8 Dec 2017 19:08:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753177AbdLHTIq (ORCPT ); Fri, 8 Dec 2017 14:08:46 -0500 Received: from mout.gmx.net ([212.227.17.20]:50542 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752521AbdLHTIl (ORCPT ); Fri, 8 Dec 2017 14:08:41 -0500 Received: from ls3530.fritz.box ([91.36.207.181]) by mail.gmx.com (mrgmx101 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MgXCF-1ek9wk1nlv-00Nwis; Fri, 08 Dec 2017 20:08:09 +0100 Date: Fri, 8 Dec 2017 20:06:44 +0100 From: Helge Deller To: Frank Scheiner , linux-parisc@vger.kernel.org, John David Anglin , Andy Shevchenko , linux-serial@vger.kernel.org Cc: debian-hppa@lists.debian.org Subject: Re: Have my PA8800 back online... (serial port missing on v4.14) Message-ID: <20171208190644.GA22228@ls3530.fritz.box> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <53815372-58e8-70e2-bab4-1777e848cf5e@web.de> User-Agent: Mutt/1.9.1 (2017-09-22) X-Provags-ID: V03:K0:m6mZ8heboz0u1bFw7z2kg6zi6CcO1vImD6R/mzSFk1SeSBWuP10 Fuczk+S9Y9carzbcs0Qok3IdfHeMuncYjGDyGrdYc4denTZBAFmoknpVsnj4OV29FYGYb4o ADzVXqz/Hyrxsmk9ObDFCDTCmsiW5ePijE/UB/4Qqyv/aAULdQ8Sd+OiuQ93Wc/vXDg8K5E /7QieksSw8Iq0XoLE5vDw== X-UI-Out-Filterresults: notjunk:1; V01:K0:vTGmlJYm4ro=:23YahBmY9e13i6N075txbp yC+oqtbhpw8B9WHjFUMdtebPZZZCK+ZgH/VNO0zfEYVCm2ZgZ39W+Jmf0mTr/bL8o3cFADtV/ NncScHNEJC3RaqyJOXNCvYvSJ/pP0QtWTz/tdqL4xq40KjeqIipAnECuSxQR8gqs7yg3/9g3D rcknjWkp+Pta97rYygveHexrlhDssanAk5/Uo0xte2Zrcsd5zs+54D9nEVxy5GmemZS3nfGCp SkvWB+nb/KLWYcJKdk8TPQ/fHG0yscffXwusZiyqma62rIFnaCUYAYsZgO88GmoK7CyV1XTB3 0uE2jtrOMsq9wE9yBu3YmTAC+SclYslVKjayT/ZKGaWe9chzHxkgITnQGjyOYRRkVfL7UyaBi xr3h67Uf8/+QAVCYuhUwCdiDeZVa5dJHhrwkIqrwszLltx2/KPG/BogTxm5gxSmXRg/RostyG QXKS0Em+EhFb8HDTSRZp1v34EW0tUFjw0hsttXvwJP5lzTExyIz9/jnkUIwo9m/St3EkVmPPU kE2+E36f61SYZcLYMlKh8Tn0WL7cNZ2vtjUHhl119zvSrCjfg9V0xP3scitz8RZ5RYoGW8psp j5xPBMLyxiSXQQkGcI+3kBVMhpf8Jvq4DyDmSf7cryUBIi3DUxauBGGhr+MmrrokN+lANm5At 9moP3Q2DlQq7jOnx53GwSg5CBm7NE9XYiRj+CLU/2L+S8o5+N6a66DVfqqj5v60twrDWjPWsE HMBKTd0Zf4162Oe6x4x5hZ3z2sXBS7OdLKtRhNHyiZUnEUkbtftvakyb6gtyD0KfgzFidIv+Q tOjRKtx+t44o99GHdIQZfFGYpeZzQ== Sender: linux-parisc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Adding the linux-serial mailing list: * Frank Scheiner : > On 12/04/2017 03:54 PM, Helge Deller wrote: > > Anyway, the *only* problem we have right now is, that the Linux kernel 4.14 doesn't detect all serial ports which were detected in earlier kernels. > > Thus the kernel will talk to the non-existant serial port at 0xfffffffff4050010 instead of 0xfffffffff4050000. > > > > 4.13: > > [ 28.882849] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled > > [ 28.898720] 0000:e0:01.0: ttyS0 at MMIO 0xfffffffff4051000 (irq = 73, base_baud = 115200) is a 16450 > > [ 28.934669] 0000:e0:01.1: ttyS1 at MMIO 0xfffffffff4050000 (irq = 73, base_baud = 115200) is a 16550A > > [ 28.963031] 0000:e0:01.1: ttyS2 at MMIO 0xfffffffff4050010 (irq = 73, base_baud = 115200) is a 16550A > > [ 28.984946] 0000:e0:01.1: ttyS3 at MMIO 0xfffffffff4050038 (irq = 73, base_baud = 115200) is a 16550A > > > > > ...but for v4.14.x only the following serial ports are detected: > > [ 28.671984] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled > > [ 28.708902] 0000:e0:01.1: ttyS0 at MMIO 0xfffffffff4050000 (irq = 73, base_baud = 115200) is a 16550A > > [ 28.731145] 0000:e0:01.1: ttyS1 at MMIO 0xfffffffff4050010 (irq = 73, base_baud = 115200) is a 16550A > > > > > > Maybe reverting this commit brings back the old behavior: > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7d8905d064058f4b65057e0101588f362f288bc0 > > I'm unsure about this commit, it speaks more of avoiding duplicate messages > for device enabling. Reverting this commit: commit 7d8905d064058f4b65057e0101588f362f288bc0 Author: Andy Shevchenko Date: Mon Jul 24 20:28:32 2017 +0300 serial: 8250_pci: Enable device after we check black list indeed fixes the problem. After reverting, the serial port from the Diva card shows up as ttyS0 (as before). With that patch applied, the serial port from the Diva card gets ignored and the previous ttyS1 port becomes ttyS0 which then breaks booting the parisc machine because the kernel expects the serial port on ttyS1. I'm not sure what the best way forward is. Fact is, that the patch above changes the behaviour and serial ports which were existant before suddenly vanish with kernel 4.14. This following patch does work, and adds back the Diva serial port on parisc. Not sure if it's acceptable though. Helge Reviewed-by: Andy Shevchenko --- To unsubscribe from this list: send the line "unsubscribe linux-parisc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/8250/8250_pci.c index 0c101a7470b0..61319e968e8c 100644 --- a/drivers/tty/serial/8250/8250_pci.c +++ b/drivers/tty/serial/8250/8250_pci.c @@ -3393,6 +3393,10 @@ static int serial_pci_is_class_communication(struct pci_dev *dev) * (Should we try to make guesses for multiport serial devices * later?) */ + if (IS_ENABLED(CONFIG_PARISC) && + (dev->class >> 8) == PCI_CLASS_COMMUNICATION_OTHER) + return 0; + if ((((dev->class >> 8) != PCI_CLASS_COMMUNICATION_SERIAL) && ((dev->class >> 8) != PCI_CLASS_COMMUNICATION_MODEM)) || (dev->class & 0xff) > 6)