From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752042Ab3HOUup (ORCPT ); Thu, 15 Aug 2013 16:50:45 -0400 Received: from mail-pd0-f175.google.com ([209.85.192.175]:51371 "EHLO mail-pd0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751771Ab3HOUuo (ORCPT ); Thu, 15 Aug 2013 16:50:44 -0400 Date: Thu, 15 Aug 2013 13:50:44 -0700 From: Guenter Roeck To: Peter Maydell Cc: Russell King - ARM Linux , Paul Gortmaker , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , QEMU Developers , Arnd Bergmann Subject: Re: [Qemu-devel] SCSI bus failures with qemu-arm in kernel 3.8+ Message-ID: <20130815205044.GA21599@roeck-us.net> References: <5207B3C3.9080508@roeck-us.net> <20130811220450.GY23006@n2100.arm.linux.org.uk> <52082EF8.10005@roeck-us.net> <20130813034054.GA18218@roeck-us.net> <20130815175428.GA18580@roeck-us.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 15, 2013 at 07:05:22PM +0100, Peter Maydell wrote: > On 15 August 2013 18:54, Guenter Roeck wrote: > > On Thu, Aug 15, 2013 at 05:45:42PM +0100, Peter Maydell wrote: > >> On 13 August 2013 04:40, Guenter Roeck wrote: > >> > Patch tested and working with qemu 1.5.2, using the configuration file > >> > from the yocto project. Patch applied on top of kernel version 3.11-rc5. > >> > >> OK, I tested this on PB926+PCI backplane hardware, and it is > >> definitely better than current mainline, in that the test USB > >> card that I have no longer causes the kernel to generate this sort of > >> backtrace: > >> > > Do you mean my patch fixes the traceback below as a side effect ? > > Would be great ... it would be one more reason to get it applied. > > Yes, exactly -- the kernel currently has the wrong irq mapping, > which causes the traceback (ie h/w asserts irq 93 but the kernel > is listening on something else). That the patch fixes this confirms > that it is the behaviour of hardware as well as of QEMU. > > >> However it still doesn't seem to reliably detect the USB harddisk > >> plugged into the card, so I think there may be further issues, possibly > >> some subset of those Arnd identified and fixed with this patch: > >> http://permalink.gmane.org/gmane.linux.ports.arm.kernel/93397 > >> > > Does it get better if you apply Arnd's patch ? > > Arnd's patch is ancient and won't apply as is (due to intervening > changes and also because some of the things it fixes were fixed > in later patches); I'm currently trying to extract the relevant parts. > > If you want you can confirm that I/O port PCI access is broken on > QEMU too -- disable CONFIG_SCSI_SYM53C8XX_MMIO so > the driver uses PCI IO rather than MMIO and you'll see QEMU's > SCSI device doesn't work any more. > > >> so I'd like to continue testing. > >> > >> The other thing this patch should (IMHO) have is the > >> line in pci_versatile_setup() which tells QEMU that the > >> kernel really does expect hardware-like behaviour: > > >> (Without this line QEMU will guess whether the kernel is broken > >> or not and will get it right most but not necessarily all of the time.) > >> > > Might make sense, but I think it should be a separate patch. > > It needs to go in the same patch, because a kernel with the fixed > irq remapping must also tell QEMU it is fixed; if you split the > two then at the point between the two patches the kernel is > broken for bisection purposes. > Thinking about it - is that really true ? My image with the patch applied works just fine under qemu 1.5.2, and unless I am missing something it won't work with qemu 1.4 anyway. So what exactly is broken ? Thanks, Guenter From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56374) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VA4ca-0002fd-10 for qemu-devel@nongnu.org; Thu, 15 Aug 2013 16:58:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VA4VJ-0000CQ-DK for qemu-devel@nongnu.org; Thu, 15 Aug 2013 16:50:56 -0400 Received: from mail-pb0-x22f.google.com ([2607:f8b0:400e:c01::22f]:52597) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VA4VJ-0000C7-48 for qemu-devel@nongnu.org; Thu, 15 Aug 2013 16:50:45 -0400 Received: by mail-pb0-f47.google.com with SMTP id rr4so1211330pbb.6 for ; Thu, 15 Aug 2013 13:50:44 -0700 (PDT) Sender: Guenter Roeck Date: Thu, 15 Aug 2013 13:50:44 -0700 From: Guenter Roeck Message-ID: <20130815205044.GA21599@roeck-us.net> References: <5207B3C3.9080508@roeck-us.net> <20130811220450.GY23006@n2100.arm.linux.org.uk> <52082EF8.10005@roeck-us.net> <20130813034054.GA18218@roeck-us.net> <20130815175428.GA18580@roeck-us.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] SCSI bus failures with qemu-arm in kernel 3.8+ List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Russell King - ARM Linux , "linux-kernel@vger.kernel.org" , QEMU Developers , Paul Gortmaker , Arnd Bergmann , "linux-arm-kernel@lists.infradead.org" On Thu, Aug 15, 2013 at 07:05:22PM +0100, Peter Maydell wrote: > On 15 August 2013 18:54, Guenter Roeck wrote: > > On Thu, Aug 15, 2013 at 05:45:42PM +0100, Peter Maydell wrote: > >> On 13 August 2013 04:40, Guenter Roeck wrote: > >> > Patch tested and working with qemu 1.5.2, using the configuration file > >> > from the yocto project. Patch applied on top of kernel version 3.11-rc5. > >> > >> OK, I tested this on PB926+PCI backplane hardware, and it is > >> definitely better than current mainline, in that the test USB > >> card that I have no longer causes the kernel to generate this sort of > >> backtrace: > >> > > Do you mean my patch fixes the traceback below as a side effect ? > > Would be great ... it would be one more reason to get it applied. > > Yes, exactly -- the kernel currently has the wrong irq mapping, > which causes the traceback (ie h/w asserts irq 93 but the kernel > is listening on something else). That the patch fixes this confirms > that it is the behaviour of hardware as well as of QEMU. > > >> However it still doesn't seem to reliably detect the USB harddisk > >> plugged into the card, so I think there may be further issues, possibly > >> some subset of those Arnd identified and fixed with this patch: > >> http://permalink.gmane.org/gmane.linux.ports.arm.kernel/93397 > >> > > Does it get better if you apply Arnd's patch ? > > Arnd's patch is ancient and won't apply as is (due to intervening > changes and also because some of the things it fixes were fixed > in later patches); I'm currently trying to extract the relevant parts. > > If you want you can confirm that I/O port PCI access is broken on > QEMU too -- disable CONFIG_SCSI_SYM53C8XX_MMIO so > the driver uses PCI IO rather than MMIO and you'll see QEMU's > SCSI device doesn't work any more. > > >> so I'd like to continue testing. > >> > >> The other thing this patch should (IMHO) have is the > >> line in pci_versatile_setup() which tells QEMU that the > >> kernel really does expect hardware-like behaviour: > > >> (Without this line QEMU will guess whether the kernel is broken > >> or not and will get it right most but not necessarily all of the time.) > >> > > Might make sense, but I think it should be a separate patch. > > It needs to go in the same patch, because a kernel with the fixed > irq remapping must also tell QEMU it is fixed; if you split the > two then at the point between the two patches the kernel is > broken for bisection purposes. > Thinking about it - is that really true ? My image with the patch applied works just fine under qemu 1.5.2, and unless I am missing something it won't work with qemu 1.4 anyway. So what exactly is broken ? Thanks, Guenter From mboxrd@z Thu Jan 1 00:00:00 1970 From: linux@roeck-us.net (Guenter Roeck) Date: Thu, 15 Aug 2013 13:50:44 -0700 Subject: [Qemu-devel] SCSI bus failures with qemu-arm in kernel 3.8+ In-Reply-To: References: <5207B3C3.9080508@roeck-us.net> <20130811220450.GY23006@n2100.arm.linux.org.uk> <52082EF8.10005@roeck-us.net> <20130813034054.GA18218@roeck-us.net> <20130815175428.GA18580@roeck-us.net> Message-ID: <20130815205044.GA21599@roeck-us.net> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Thu, Aug 15, 2013 at 07:05:22PM +0100, Peter Maydell wrote: > On 15 August 2013 18:54, Guenter Roeck wrote: > > On Thu, Aug 15, 2013 at 05:45:42PM +0100, Peter Maydell wrote: > >> On 13 August 2013 04:40, Guenter Roeck wrote: > >> > Patch tested and working with qemu 1.5.2, using the configuration file > >> > from the yocto project. Patch applied on top of kernel version 3.11-rc5. > >> > >> OK, I tested this on PB926+PCI backplane hardware, and it is > >> definitely better than current mainline, in that the test USB > >> card that I have no longer causes the kernel to generate this sort of > >> backtrace: > >> > > Do you mean my patch fixes the traceback below as a side effect ? > > Would be great ... it would be one more reason to get it applied. > > Yes, exactly -- the kernel currently has the wrong irq mapping, > which causes the traceback (ie h/w asserts irq 93 but the kernel > is listening on something else). That the patch fixes this confirms > that it is the behaviour of hardware as well as of QEMU. > > >> However it still doesn't seem to reliably detect the USB harddisk > >> plugged into the card, so I think there may be further issues, possibly > >> some subset of those Arnd identified and fixed with this patch: > >> http://permalink.gmane.org/gmane.linux.ports.arm.kernel/93397 > >> > > Does it get better if you apply Arnd's patch ? > > Arnd's patch is ancient and won't apply as is (due to intervening > changes and also because some of the things it fixes were fixed > in later patches); I'm currently trying to extract the relevant parts. > > If you want you can confirm that I/O port PCI access is broken on > QEMU too -- disable CONFIG_SCSI_SYM53C8XX_MMIO so > the driver uses PCI IO rather than MMIO and you'll see QEMU's > SCSI device doesn't work any more. > > >> so I'd like to continue testing. > >> > >> The other thing this patch should (IMHO) have is the > >> line in pci_versatile_setup() which tells QEMU that the > >> kernel really does expect hardware-like behaviour: > > >> (Without this line QEMU will guess whether the kernel is broken > >> or not and will get it right most but not necessarily all of the time.) > >> > > Might make sense, but I think it should be a separate patch. > > It needs to go in the same patch, because a kernel with the fixed > irq remapping must also tell QEMU it is fixed; if you split the > two then at the point between the two patches the kernel is > broken for bisection purposes. > Thinking about it - is that really true ? My image with the patch applied works just fine under qemu 1.5.2, and unless I am missing something it won't work with qemu 1.4 anyway. So what exactly is broken ? Thanks, Guenter