Received: by 10.223.185.116 with SMTP id b49csp4643143wrg; Mon, 26 Feb 2018 23:27:15 -0800 (PST) X-Google-Smtp-Source: AH8x225cHzFE8D3PIjho1tl3qpUnFVeYgDZnwhjib3iixclAjn2iVqhQGYmkvpYrRMsR7IwGAtQX X-Received: by 2002:a17:902:9002:: with SMTP id a2-v6mr13248557plp.412.1519716434912; Mon, 26 Feb 2018 23:27:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519716434; cv=none; d=google.com; s=arc-20160816; b=BQOujavee7F0GsKmeQxp2Y8GxOiM1snYtPS1ttlCYW+HD3U0/t5WrwuDKMh8Mpfx/I RwiymzM8L9i8jrSStqpFTPhzpjotFYwfJBl6b240BLlZNsrOvee1Sp+uQBDP6+bIhFLx 9cNdR66PrQOKM5Xv5yltasrFFPDAqcId9Ib5sRQVH9Rh5IivYKIx3ALq1KUF8bKdoUAS SngSmRTzocVvAZqlqzpkKY9qwczysUhLcTlrMyMTP5kFZgGy5r4irCoPUCn341dnvUU4 UEQbR8tJ8N/Vy0KaZYTcNsP8C8zEu8vuOSYSKdM6K/qBpCKCtQ4J2b80bVJEBmnhdoxr tipQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type:content-language :content-transfer-encoding:user-agent:date:message-id:cc:subject :from:to:mime-version:dkim-signature:dkim-filter :arc-authentication-results; bh=WvGyzTxKa2EcBXKj0z2AGcFgiaQ20keJAuCPwmB50Bo=; b=ma0OgeDhKZ0Wiw94kslzchMrQBo6/bfowikdqaZ/NRjfXG88lpSwC62b2BD+6QdUJr r2sC3GsIgG2JX4v395vkuArV8QmxQ+xzPiyln5it8wrhYvTyhfXtw7RtWlFMIHhhXfes rGrV8IGBwyVlxCXo+cuMAiMLM6lfnJWZkUcUSwP0LbQeZ+zjq/cBrSioGn16lB3QrXgz 1KWtiwgkSUFQCpXrp24c2prmsIhdQ8JRdS2AMHRG08zKlyWDqX7ZVn9bjPBN7UvSP1C/ UmrcEo6SzYbMhwX4v7lpHQ4QCdluGmEWqE6AIue/cuxKmVIJ5yUJ+vUHaY4BnejzzgEr AaKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=J+gOT//x; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t1-v6si8273637plr.558.2018.02.26.23.27.00; Mon, 26 Feb 2018 23:27:14 -0800 (PST) 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=pass header.i=@samsung.com header.s=mail20170921 header.b=J+gOT//x; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752504AbeB0H0K (ORCPT + 99 others); Tue, 27 Feb 2018 02:26:10 -0500 Received: from mailout2.w1.samsung.com ([210.118.77.12]:53297 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752175AbeB0H0G (ORCPT ); Tue, 27 Feb 2018 02:26:06 -0500 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20180227072603euoutp02d1ddc9825abdb07f658c0c8a1a0e9fae~XHfsR8UmK3223632236euoutp02p; Tue, 27 Feb 2018 07:26:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20180227072603euoutp02d1ddc9825abdb07f658c0c8a1a0e9fae~XHfsR8UmK3223632236euoutp02p DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1519716363; bh=WvGyzTxKa2EcBXKj0z2AGcFgiaQ20keJAuCPwmB50Bo=; h=To:From:Subject:Cc:Date:References:From; b=J+gOT//xnMIi53Ltu0j5786aTzYL9vhkeP0etd/+MENQRj+SYrbwIF7MfaInpxRxw 5JmVzoZFK1mOeZ5tJCqYDxfvFavf5qbwmu30ULqjuQY84iys2GfKmxw2gARNzpHrSy ve/Ge+PXUBH+lJMIRNCKyCiPDPRGbwZCQLjfqeX4= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20180227072602eucas1p294dd9ea610690bd00182c8fe25143c07~XHfrudJGH2329523295eucas1p2H; Tue, 27 Feb 2018 07:26:02 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 51.5E.05700.A08059A5; Tue, 27 Feb 2018 07:26:02 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20180227072602eucas1p28dcdba711b3153820bd409d838cc63bd~XHfrC0y_K2329123291eucas1p2J; Tue, 27 Feb 2018 07:26:02 +0000 (GMT) X-AuditID: cbfec7f2-1c1ff70000011644-06-5a95080a5def Received: from eusync1.samsung.com ( [203.254.199.211]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 38.ED.04178.A08059A5; Tue, 27 Feb 2018 07:26:02 +0000 (GMT) MIME-version: 1.0 Content-type: text/plain; charset="utf-8"; format="flowed" Received: from [106.116.147.30] by eusync1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0P4S00A5OSND4P10@eusync1.samsung.com>; Tue, 27 Feb 2018 07:26:01 +0000 (GMT) To: netdev@vger.kernel.org, Linux USB Mailing List , LKML , 'Linux Samsung SOC' From: Marek Szyprowski Subject: inconsistent lock state with usbnet/asix usb ethernet and xhci Cc: Dean Jenkins , Oliver Neukum Message-id: Date: Tue, 27 Feb 2018 08:26:00 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 Content-transfer-encoding: 8bit Content-language: en-US X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrGIsWRmVeSWpSXmKPExsWy7djP87pcHFOjDJr/K1g836hvcXnXHDaL Gef3MVksWtbKbHFsgZhF1+OVbA5sHru/NjF6rN9ylcXj8ya5AOYoLpuU1JzMstQifbsEroz5 J/YyF/SaV9xr+cDcwPhDv4uRk0NCwERi15tHbF2MXBxCAisYJZZe/cgC4XxmlHjzrYkFpmrr 7JeMEIlljBIfnqxjAknwCghK/Jh8D6yIWcBK4tm/VlaIoueMEj2334MlRAQ2MEpc+RsKYrMJ GEp0ve1iA7GFBdwltmyaC1TDAdTsI7H4UCHETDuJM9fng5WwCKhK9JzfywxSIioQI/H6jxvE KnmJg1eeQ60Vl2huvQl2tITADDaJlb8uskMc7SLRuG8DM4QtLPHq+BaouIxEZ8dBJoiGfkaJ f/9fQjkzGCXWf2yFqrKWOHz8IivECj6JSdumg10hIcAr0dEmBFHiIXHs/2J2iLCjxKPObJCw kECsxORt31knMMrOQgqiWUhBNAvJD7OQ/LCAkWUVo3hqaXFuemqxYV5quV5xYm5xaV66XnJ+ 7iZGYGo4/e/4px2MXy8lHWIU4GBU4uGdITclSog1say4MvcQowQHs5II78rFk6OEeFMSK6tS i/Lji0pzUosPMUpzsCiJ88Zp1EUJCaQnlqRmp6YWpBbBZJk4OKUaGHdsSTr4KeHt8anTC9d9 6T3wscoy+2rPuVOyf3dOWPL1ZOcOYS8RDqdzcbeWHY1tuPNme5jWotsdPycI5biUMy/fKv+3 XD7qwDPrDSeb74h4H2FVbhZL7Oxw6pROm5UraeueztQxL9s7uvJI2uMe9liLdkuZlL7025EG 2otC20Ibbbt6fny+qMRSnJFoqMVcVJwIAAISBBQJAwAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrHLMWRmVeSWpSXmKPExsVy+t/xy7pcHFOjDO4eZbR4vlHf4vKuOWwW M87vY7JYtKyV2eLYAjGLrscr2RzYPHZ/bWL0WL/lKovH501yAcxRXDYpqTmZZalF+nYJXBnz T+xlLug1r7jX8oG5gfGHfhcjJ4eEgInE1tkvGbsYuTiEBJYwSvydOYMFJMErICjxY/I9MJtZ wEziy8vDrBBFzxkl5jw6wALiiAhsYJTYMvM+K0gVm4ChRNfbLjYQW1jAXWLLprlARRxA3T4S iw8VQgy1kzhzfT5YCYuAqkTP+b3MILaoQIzE1I8bWSGWyUscvPIcarG4RHPrTZYJjHyzkNw0 C8lNs5C0zELSsoCRZRWjSGppcW56brGhXnFibnFpXrpecn7uJkZgqG479nPzDsZLG4MPMQpw MCrx8M6QmxIlxJpYVlyZe4hRgoNZSYR35eLJUUK8KYmVValF+fFFpTmpxYcYpTlYlMR5zxtU RgkJpCeWpGanphakFsFkmTg4pRoYja8K6bcu2bfYXVE/dsaG1I3is+3/3p4hx69SaKZUMKvS Zmnp1ge8Emazbq62Wpu8Z/nJ/UES3j90BJ4EKf46GbmFJeTLudgzsyVZ2p5Yns7smW/8rmXK wXWvy3c2tZXtU9bY5LhM/+aPI00ugp956o2itx5aeWaBe+Tl7hc/91R9vizS+i6vQImlOCPR UIu5qDgRAHIyJclRAgAA X-CMS-MailID: 20180227072602eucas1p28dcdba711b3153820bd409d838cc63bd X-Msg-Generator: CA CMS-TYPE: 201P X-CMS-RootMailID: 20180227072602eucas1p28dcdba711b3153820bd409d838cc63bd X-RootMTR: 20180227072602eucas1p28dcdba711b3153820bd409d838cc63bd References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi I've noticed that USBnet/ASIX AX88772B USB driver produces deplock kernel warning ("inconsistent lock state") on Chromebook2 Peach-PIT board. No special activity is needed to reproduce this issue, it happens almost on every boot. ASIX USB ethernet is connected to XHCI USB host controller on that board. Is it a known issue? Frankly I have no idea where to look to fix it. The same adapter connected to EHCI ports on other boards based on the same SoC works fine without any warnings. Here are some more information from that board: # lsusb Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 005 Device 002: ID 0b95:772b ASIX Electronics Corp. AX88772B Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 001 Device 002: ID 2232:1056 Silicon Motion Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub # lsusb -t /:  Bus 06.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M /:  Bus 05.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M     |__ Port 1: Dev 2, If 0, Class=Vendor Specific Class, Driver=asix, 480M /:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M /:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M /:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=exynos-ohci/3p, 12M /:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=exynos-ehci/3p, 480M     |__ Port 1: Dev 2, If 0, Class=Video, Driver=, 480M     |__ Port 1: Dev 2, If 1, Class=Video, Driver=, 480M And the log with mentioned warning: [   17.768040] ================================ [   17.772239] WARNING: inconsistent lock state [   17.776511] 4.16.0-rc3-next-20180227-00007-g876c53a7493c #453 Not tainted [   17.783329] -------------------------------- [   17.787580] inconsistent {IN-HARDIRQ-W} -> {HARDIRQ-ON-W} usage. [   17.793607] swapper/0/0 [HC0[0]:SC1[1]:HE1:SE0] takes: [   17.798751]  (&syncp->seq#5){?.-.}, at: [<9b22e5f0>] asix_rx_fixup_internal+0x188/0x288 [   17.806790] {IN-HARDIRQ-W} state was registered at: [   17.811677]   tx_complete+0x100/0x208 [   17.815319]   __usb_hcd_giveback_urb+0x60/0xf0 [   17.819770]   xhci_giveback_urb_in_irq+0xa8/0x240 [   17.824469]   xhci_td_cleanup+0xf4/0x16c [   17.828367]   xhci_irq+0xe74/0x2240 [   17.831827]   usb_hcd_irq+0x24/0x38 [   17.835343]   __handle_irq_event_percpu+0x98/0x510 [   17.840111]   handle_irq_event_percpu+0x1c/0x58 [   17.844623]   handle_irq_event+0x38/0x5c [   17.848519]   handle_fasteoi_irq+0xa4/0x138 [   17.852681]   generic_handle_irq+0x18/0x28 [   17.856760]   __handle_domain_irq+0x6c/0xe4 [   17.860941]   gic_handle_irq+0x54/0xa0 [   17.864666]   __irq_svc+0x70/0xb0 [   17.867964]   arch_cpu_idle+0x20/0x3c [   17.871578]   arch_cpu_idle+0x20/0x3c [   17.875190]   do_idle+0x144/0x218 [   17.878468]   cpu_startup_entry+0x18/0x1c [   17.882454]   start_kernel+0x394/0x400 [   17.886177] irq event stamp: 161912 [   17.889616] hardirqs last  enabled at (161912): [<7bedfacf>] __netdev_alloc_skb+0xcc/0x140 [   17.897893] hardirqs last disabled at (161911): [] __netdev_alloc_skb+0x94/0x140 [   17.904903] exynos5-hsi2c 12ca0000.i2c: tx timeout [   17.906116] softirqs last  enabled at (161904): [<387102ff>] irq_enter+0x78/0x80 [   17.906123] softirqs last disabled at (161905): [] irq_exit+0x134/0x158 [   17.925722]. [   17.925722] other info that might help us debug this: [   17.933435]  Possible unsafe locking scenario: [   17.933435]. [   17.940331]        CPU0 [   17.942488]        ---- [   17.944894]   lock(&syncp->seq#5); [   17.948274]   [   17.950847]     lock(&syncp->seq#5); [   17.954386]. [   17.954386]  *** DEADLOCK *** [   17.954386]. [   17.962422] no locks held by swapper/0/0. [   17.966011]. [   17.966011] stack backtrace: [   17.971333] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.16.0-rc3-next-20180227-00007-g876c53a7493c #453 [   17.980312] Hardware name: SAMSUNG EXYNOS (Flattened Device Tree) [   17.986380] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [   17.994128] [] (show_stack) from [] (dump_stack+0x90/0xc8) [   18.001339] [] (dump_stack) from [] (print_usage_bug+0x25c/0x2cc) [   18.009161] [] (print_usage_bug) from [] (mark_lock+0x290/0x698) [   18.014952] exynos5-hsi2c 12ca0000.i2c: tx timeout [   18.016899] [] (mark_lock) from [] (__lock_acquire+0x454/0x1850) [   18.029449] [] (__lock_acquire) from [] (lock_acquire+0xc8/0x2b8) [   18.037272] [] (lock_acquire) from [] (usbnet_skb_return+0x7c/0x1a0) [   18.045356] [] (usbnet_skb_return) from [] (asix_rx_fixup_internal+0x188/0x288) [   18.054420] [] (asix_rx_fixup_internal) from [] (usbnet_bh+0xf8/0x2e4) [   18.062694] [] (usbnet_bh) from [] (tasklet_action+0x8c/0x13c) [   18.070259] [] (tasklet_action) from [] (__do_softirq+0xd4/0x6d4) [   18.078089] [] (__do_softirq) from [] (irq_exit+0x134/0x158) [   18.085480] [] (irq_exit) from [] (__handle_domain_irq+0x70/0xe4) [   18.093314] [] (__handle_domain_irq) from [] (gic_handle_irq+0x54/0xa0) [   18.101670] [] (gic_handle_irq) from [] (__irq_svc+0x70/0xb0) [   18.109163] Exception stack(0xc0f01eb8 to 0xc0f01f00) [   18.114202] 1ea0: 00000001 00000001 [   18.122397] 1ec0: 00000000 c0f0ba80 eef3a540 eef3a540 ee8d2700 c0f088b4 00000402 c09d23e0 [   18.124980] exynos5-hsi2c 12ca0000.i2c: tx timeout [   18.130611] 1ee0: c0f0ba80 c0f01f4c 00000000 c0f01f08 c017ea54 c09d92d4 20000013 ffffffff [   18.135504] cpu cpu0: _set_opp_voltage: failed to set voltage (1250000 1250000 1250000 mV): -110 [   18.143690] [] (__irq_svc) from [] (_raw_spin_unlock_irq+0x28/0x5c) [   18.152671] cpufreq: __target_index: Failed to change cpu frequency: -110 [   18.160683] [] (_raw_spin_unlock_irq) from [] (finish_task_switch+0xb4/0x254) [   18.160696] [] (finish_task_switch) from [] (__schedule+0x290/0xb10) [   18.160704] [] (__schedule) from [] (schedule_idle+0x2c/0x78) [   18.160711] [] (schedule_idle) from [] (cpu_startup_entry+0x18/0x1c) [   18.200726] [] (cpu_startup_entry) from [] (start_kernel+0x394/0x400) Best regards -- Marek Szyprowski, PhD Samsung R&D Institute Poland