Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp7289325ybi; Wed, 5 Jun 2019 14:49:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqyulehPSWIkpNX1qUSF1WR9A9ZEmMhgjIv6mG0uDIn5vs9nI7ev9mJc88/eFnKPpqeFzXBj X-Received: by 2002:a17:90a:1911:: with SMTP id 17mr22658192pjg.113.1559771392034; Wed, 05 Jun 2019 14:49:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559771392; cv=none; d=google.com; s=arc-20160816; b=0Zji99PLUNWkNUnU5k0fuPwZxqlIK4wvjiyjw/zpBq5O+by7UmZIONlkxp0JlL8pXu a1ID8XjWiLZXC0vFTnExwWp+i1JjbURDjogHPhYtxUPJ3ASig3B8EAtYgitHY6R9m/XD QrSNAL6yy9XQk20jN1Ig3ajIeDSMILAtaFZKxU6xmug0l41i7Ywozctgqric4msaROfN CjyZKCB5VoMwXUdeDypmSrDB9YOqH/wB1llMLqT+E0sONbvkJx8l4VUvZd5dw1Xw/uDT EdgpU7t7MMzq6JRqhe3V3NCkf+WLj3IZ1/0bT8C8+QiP71osyPMYyZSD1QYLPCcG4BMt QPtw== 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=wVHClWl83LJ+u63GhFAh1l0RQa+NY4Hk0/D4slzQzV0=; b=y4TXJymhu6AtlP7VKFB4kveL162C8M78yXpDo7De6NFza3S5PCK5FaWuykaifKlNBB xqUVOaPO4W7TIwJ2UWtSOgGC10czsGtL+ww8qMWdqKfGkt5eE6MVayMz2Ovys2QTfvNu BBYZX9AwD1nxyjyO4hEf2aVUtDZoEaehbiGytXMkyvpbTYbWSV14pWhh9bNfySyKghOy 08en2lnVeD0qp0AJqGomWY1kURU0ye8gySrwTHcy+u0dP/HSY7Buy2d1tyn6hiYWPu5F t7t3AL+supSq9H6KoKZ4z8wj8+wLW7uF/7a3Psl9zMiOpzIIKuuA11V5AA99zWYJ4BtD nCYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=t9AJGRyI; 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 68si30447079plc.160.2019.06.05.14.49.22; Wed, 05 Jun 2019 14:49:52 -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=t9AJGRyI; 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 S1726581AbfFEVqZ (ORCPT + 99 others); Wed, 5 Jun 2019 17:46:25 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:34717 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726502AbfFEVqZ (ORCPT ); Wed, 5 Jun 2019 17:46:25 -0400 Received: by mail-pg1-f193.google.com with SMTP id h2so85719pgg.1; Wed, 05 Jun 2019 14:46:24 -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=wVHClWl83LJ+u63GhFAh1l0RQa+NY4Hk0/D4slzQzV0=; b=t9AJGRyI9SEqXVZAmAUs3ZqRfMyaQekOOYs/ZD8huILdYj5wezynTdJTEzpTaQUA/I IbX+nUZ8ZaR/gQjgV5WnQno2tB8vpSEvZl23fY6+Z1hEAqgk339Wlry8xPCHVIauNMHu cf/EDc3o3byv2vPvlFwqZtdgw3s3H/IP6IxQvgX/J2GeTw4lxPhrQx335Kto4tpXqLcJ 3rI0w4PqFGXWAymbzWX64UaOdqZ/D+MokoA7stnLz1sBybjFZpSQm7bIrhkxhLdrxpaB psLHnY3mcGuu5Tu2zUUcgdYV3swchhXSiUZyFSGQ0B4BT9pBU1audVh2HGoS7ME1rhMP moqQ== 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=wVHClWl83LJ+u63GhFAh1l0RQa+NY4Hk0/D4slzQzV0=; b=k0b4TMedpb8DvC9yYyfhstvXL3x0SBgsZrOUWZFcighLF5/LN9L6/8DOCGM2CaH7FG V0fLsPzHKDEPFwyS4mbWXJRtQ5/jgff8Um6XjXBhZlVUziStR1tlaJBm3Rby6sCFd/07 OKXaZdwoQIVlg38YhL9Uyq/oeueQxhl2mZjtrTQyarBd79FT0OdmYtV/GiYpbVpZAnh0 gl2i/DVN6X9fA/w9Ap76nvfGdFMj1NWp9XxUU4HGt1RTYDidfz0cWYUI55j8XTOVm/CD p0HO2AdqY+sksewnX3shh+hOPoYkeVGop3q8rI1Av+oTLPXuy0cjoNaZL2TzXejyPJo9 RtYw== X-Gm-Message-State: APjAAAURa+1Y+G2bLRg2PJ6zzTOgW7yMX982zv70bjjJX0EhU/wdXXYx ouBsda/S+Efp61aBFBEoIS4= X-Received: by 2002:a17:90a:dd42:: with SMTP id u2mr47466072pjv.118.1559771184444; Wed, 05 Jun 2019 14:46:24 -0700 (PDT) Received: from localhost ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id z15sm6282401pge.40.2019.06.05.14.46.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Jun 2019 14:46:23 -0700 (PDT) Date: Wed, 5 Jun 2019 14:46:22 -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: <20190605214622.GA22254@roeck-us.net> References: <20190529102843.13174-1-laurentiu.tudor@nxp.com> <20190529102843.13174-4-laurentiu.tudor@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190529102843.13174-4-laurentiu.tudor@nxp.com> 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, 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. Guenter