Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp4461963ybi; Tue, 11 Jun 2019 07:05:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqxslx5pqi8KXI+5UreJDaBMcjobnjAglUF2KO/cDfzXN6+SqmTJYojXB6tvONWpRXHk22tc X-Received: by 2002:a17:902:bb97:: with SMTP id m23mr11741467pls.141.1560261922108; Tue, 11 Jun 2019 07:05:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560261922; cv=none; d=google.com; s=arc-20160816; b=Vz8c7CCS60DznJDL91S0Q5hAAG9G6+/8t9E6OFpDVLQYKKv5B+u7y+DZ8DUc7SYm8t twwlZLUUDMd0SxdGC6GL5kDEBFNheNfur022zCCFy+t0jnOeR1Pqi84swKvp0RSqWH7g CCExioNFbmntpaYfhftdoQNkEwJfj3oIJq7fkDaYA6pFSR1Hxs2IaugmUXLawH/KDuRO SlWgZhqCkmXZ75VeAivKRXOPU1jefMHBKSUd7FyLNedaJDQbeSdtzeEOekcVniSISfJ3 oY6G90qZ3nRWpSulXkGWvUD4bC3QfHzIIWucL/lFYNDkkiwe6w139ziWMOukCcjC1kCV OveA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=o9Fzo35JippV1+onM33v00Qp5Y8cxbvuNyBylk/rwIE=; b=tiq7afp+JxQQlBSkKylmYOTibPaX4YWEuKQhgvK7jvBqJgKNyFxy8jp4b4C7gzmlne j0VhnsSCAgQdoaAA7PPQ3I5uc4mxVXAsp7jEH0dsRndIF4BfHdLsJPTYSs2s0FV+ydX+ 5xqTOUHdhMq0nphCo1Fnp+xL706JbS0qwHtFisRYv6yjHOaUVIuDBDLfhLA51D7+EiYX HiIEYbiR6R3n6tWiN5j5MgTAeKEIhUQ/GomPJ6khlocXr2r7bhq1C9FUql+SwX4xAjkJ 8iEmDCS+HQeJ+MSjlGtAN1DijC+PDoLt6WudqzixAEyvJTw1qqi91kq0LSDTFhM9fiqp mzUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=isY0UqSM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u6si13473788pga.360.2019.06.11.07.05.04; Tue, 11 Jun 2019 07:05:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=isY0UqSM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390630AbfFKNc2 (ORCPT + 99 others); Tue, 11 Jun 2019 09:32:28 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:45478 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387683AbfFKNc1 (ORCPT ); Tue, 11 Jun 2019 09:32:27 -0400 Received: by mail-pg1-f195.google.com with SMTP id w34so6973459pga.12; Tue, 11 Jun 2019 06:32:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=o9Fzo35JippV1+onM33v00Qp5Y8cxbvuNyBylk/rwIE=; b=isY0UqSM3MN0f0vbHrtxJK7GrAYz4XTlnUN1rn7Bqy1qZMwMD0/gJaLhxHEAdwnqRV uC2e3GsKM6Sp0TnQXrZ+VuHVvJ/7nUmL/+jwB92wl8w/2orDthUlpEPyUfvhD7IMKhTk wW6wVmoniu/4YM31UabwwMn/+AjtBKHuPcJbDh/1qB8MAcEmjMbLW/LaRODQskbq8ElN UBLj4Qt2ROaYrESoLSAKCmwd1GAcSEYNOoXn3UXzfWcchnQmGm8wTdnJ041dSY1d7fFa tN5ZT2p2rQfuDN1vAwwAXCvjtlALzuhAZJkmkpMyPN1No+ODNcSGfK2LL1cTS/4t1Aok TRhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=o9Fzo35JippV1+onM33v00Qp5Y8cxbvuNyBylk/rwIE=; b=cN7+C3K/Omg/hpWM8glGaQ1JJecDFPuT+zkEjb528SUrG6GAqb5wn7gppuhs6lgfXa t64TVzAN6vFULQ9SpUbojFW6oRyANxwiUG616g7Pzm3j4o1g4cTtggFYzLgP9J9MtXhY fHMqgm58FBHymB5rjuyhdkHp/+J5DWo17n/oFuI9Ozpz8DXI9qoWfgoxjbcM2ynxSKke xvRccw5tj/CkDiIRV1qvcucyNMiAZF8rPeYf4jiAVS/HvB65lL9QId8QVUtJSNW+8mPi wnPWCzl0e7+LwTYrgBr5XIPkfIvJOfPQLPQq4j+Q8rfXRBgPBJ2cid0SULm3UIfdPMwI bxQQ== X-Gm-Message-State: APjAAAUCBILzQlbjWtbcf6bz/PXwnIfrOW8WYjzdfeFHjKofKqL88u7d DD6GZWITnUqF9dxKJr13Sus= X-Received: by 2002:a63:c903:: with SMTP id o3mr8935810pgg.295.1560259946998; Tue, 11 Jun 2019 06:32:26 -0700 (PDT) Received: from localhost ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id p6sm36249pgs.77.2019.06.11.06.32.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Jun 2019 06:32:25 -0700 (PDT) Date: Tue, 11 Jun 2019 06:32:23 -0700 From: Guenter Roeck To: laurentiu.tudor@nxp.com Cc: hch@lst.de, stern@rowland.harvard.edu, gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, marex@denx.de, leoyang.li@nxp.com, linux-kernel@vger.kernel.org, robin.murphy@arm.com, noring@nocrew.org, JuergenUrban@gmx.de Subject: Re: [PATCH v7 3/5] usb: host: ohci-sm501: init genalloc for local memory Message-ID: <20190611133223.GA30054@roeck-us.net> References: <20190529102843.13174-1-laurentiu.tudor@nxp.com> <20190529102843.13174-4-laurentiu.tudor@nxp.com> <20190605214622.GA22254@roeck-us.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190605214622.GA22254@roeck-us.net> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 05, 2019 at 02:46:22PM -0700, Guenter Roeck wrote: > On Wed, May 29, 2019 at 01:28:41PM +0300, laurentiu.tudor@nxp.com wrote: > > From: Laurentiu Tudor > > > > In preparation for dropping the existing "coherent" dma mem declaration > > APIs, replace the current dma_declare_coherent_memory() based mechanism > > with the creation of a genalloc pool that will be used in the OHCI > > subsystem as replacement for the DMA APIs. > > > > For context, see thread here: https://lkml.org/lkml/2019/4/22/357 > > > > Signed-off-by: Laurentiu Tudor > > This patch results in usb access failures when trying to boot from the > sm501-usb controller on sh4 with qemu. > > usb 1-2.1: reset full-speed USB device number 4 using sm501-usb > sd 1:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x03 driverbyte=0x00 > sd 1:0:0:0: [sda] tag#0 CDB: opcode=0x28 28 00 00 00 08 7c 00 00 f0 00 > print_req_error: I/O error, dev sda, sector 2172 flags 80700 > usb 1-2.1: reset full-speed USB device number 4 using sm501-usb > sd 1:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x03 driverbyte=0x00 > sd 1:0:0:0: [sda] tag#0 CDB: opcode=0x28 28 00 00 00 01 da 00 00 f0 00 > print_req_error: I/O error, dev sda, sector 474 flags 84700 > usb 1-2.1: reset full-speed USB device number 4 using sm501-usb > sd 1:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x03 driverbyte=0x00 > sd 1:0:0:0: [sda] tag#0 CDB: opcode=0x28 28 00 00 00 02 da 00 00 f0 00 > print_req_error: I/O error, dev sda, sector 730 flags 84700 > usb 1-2.1: reset full-speed USB device number 4 using sm501-usb > sd 1:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x03 driverbyte=0x00 > sd 1:0:0:0: [sda] tag#0 CDB: opcode=0x28 28 00 00 00 0b 50 00 00 f0 00 > print_req_error: I/O error, dev sda, sector 2896 flags 84700 > > Qemu command line is: > > The qemu command line is: > > qemu-system-sh4 -M r2d \ > -kernel ./arch/sh/boot/zImage \ > -snapshot \ > -usb -device usb-storage,drive=d0 \ > -drive file=rootfs.ext2,if=none,id=d0,format=raw \ > -append 'panic=-1 slub_debug=FZPUA root=/dev/sda rootwait console=ttySC1,115200 earlycon=scif,mmio16,0xffe80000 noiotrap' \ > -serial null -serial stdio \ > -net nic,model=rtl8139 -net user -nographic -monitor null > > Reverting this patch as well as "USB: drop HCD_LOCAL_MEM flag" fixes the > problem. Reverting "USB: drop HCD_LOCAL_MEM flag" alone does not help. > This problem is still seen in next-20190611. Has anyone actually tested this code ? Guenter