Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp630428ybb; Wed, 25 Mar 2020 06:42:30 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvjqYp67o/X8x0QNM3Wa6yfVsXQUcEjdidgLhvRtOoNa5JOgIIVvGZj/JDa/WGVBX/porfk X-Received: by 2002:a9d:654c:: with SMTP id q12mr2299126otl.305.1585143750235; Wed, 25 Mar 2020 06:42:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585143750; cv=none; d=google.com; s=arc-20160816; b=uA1tAQqaaoCZ6rVdIpkArKXF/1lEEKltNOvSOeJCYW3ebbwUKvfRW96zV5qV8YgxsW CH8pWXDObzERbTMkijkNRRf7876IpKy/cSbFcnL0MeKZeTQQI1iAKXCZJvIXgF+L4erm yXp3Fh7hdjcsHfktmW6HnH9lqO+seagfJFKHm2o5whZXUyl34mjPL8KZ1FxpVE1mQmM0 C0lMjkg1lZl47NXGAEtp7mlesxMC5jAJn6npk1lD+W6fNOZwNZmVex3E29NsrElOMWkE hRKpt1mNKCXWwiX57Z6Gm7Kmg64BSyxF15G8OUKhu4Uv+7qfN5Zayo0CkVklTCEJ+zQO epyQ== 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=fc6W0JXmmadOQ0swBSxFn65817l4LzrYHT49sb98cUg=; b=RIUXvh7hOlEKmDoY1NElNwevi7sqmJQndB1gsTRLy8dVlHipn+DcbqORWHp3sTO7DA CdlG1KTzlvCIC8kDQwWgCQfX6+y8SWGrXxVnecvZRhwXyODfDBnIbBJZ8fbHjNlmOoqy wNixUJ8EsvxG2a0/TBNP2q0W8kXrGgITfl7VcMlkGKTIzwb2QHygMYIOk8C6tgv6FzHE sw4dqbALa74LhC3o82xy3jvU8Am0MobSOxWvU3gV3lKjxDkBPlfWxxsWghr8hd0237p+ KpfUXg/xMTFUilj7c+Y0PBertILiLD07LosM8J8nSpQJnv11Q2Ny8BDbo2DAe+QBqODD bSQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=lLrrU0TN; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o85si1585510ooo.19.2020.03.25.06.42.16; Wed, 25 Mar 2020 06:42:30 -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=pass header.i=@gmail.com header.s=20161025 header.b=lLrrU0TN; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727470AbgCYNlw (ORCPT + 99 others); Wed, 25 Mar 2020 09:41:52 -0400 Received: from mail-pj1-f65.google.com ([209.85.216.65]:50775 "EHLO mail-pj1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727114AbgCYNlw (ORCPT ); Wed, 25 Mar 2020 09:41:52 -0400 Received: by mail-pj1-f65.google.com with SMTP id v13so1056030pjb.0; Wed, 25 Mar 2020 06:41:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=fc6W0JXmmadOQ0swBSxFn65817l4LzrYHT49sb98cUg=; b=lLrrU0TNyaPUwk3xtXB+PN1ftG4z8BLpPfziRfD48kcHiMUF3J1NweM6t0y1tXGKbW 7yu12WqX0ujKEZTuqHZwddEMTlZeZUk9aU4tI2lNDf0VuQO5CS/J+HNXMbVwWUuApj6J TJLrdgsMYwESP7JnVu7NTGAVRyEddFA5AmYQV5NgsOXOO1rMOpAH7yFU5KwZ/G/ws+/7 9rdHERRzrpVec+KaGmrUnacnm07/D3G45wjI+FxKmsV8DcaWaHPudzj8CvC9zYS9REZr 1E4FWR635lqCEnG1tM2SKRLf+VUPwKiPyBMLkOwG7/UicKkhyK3sRLOfmhojH7kodyIe 6hIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=fc6W0JXmmadOQ0swBSxFn65817l4LzrYHT49sb98cUg=; b=Mb/VY0W65sriPC0v+Ze5M76BR6WaxDVBTxx3a7rZV8YXn1r25jr3qQtpKdwh5UP+IT zuAGGmIpd9/SIb79gKsph5qw1BIYMexEh3P7mi9kivHZnu8QK2Jtszd3NKFaf5QnYoQy GxSfBpUeEi4ccntptJYrr91H+GJgR/Lfyr7GlBDPdlQp2hijEKb9SD/J/LIpG7K4MXnr kOyRZgS62hPIS1nAqHp25ebQT82x1z4ngM6qigDH+sb5Y6gUzNEUtyDpI23QPMMRPvZc MS+c5Le5xD3cf2uFgUhEYUu1MjY7aUDIVgee59U7BeOs838xwU3w5vo/XLi2ILkYOHNf VJQA== X-Gm-Message-State: ANhLgQ3931ILiO2KhoB6xuwczDqyiDs8hUH0rFYiUgN3/xaE0ZNEQYgd tlr8smK3tN8b7Rc663jBhU3GMbI1 X-Received: by 2002:a17:90a:1f07:: with SMTP id u7mr3995255pja.24.1585143710497; Wed, 25 Mar 2020 06:41:50 -0700 (PDT) Received: from localhost (c-73-241-114-122.hsd1.ca.comcast.net. [73.241.114.122]) by smtp.gmail.com with ESMTPSA id w9sm18816660pfd.94.2020.03.25.06.41.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Mar 2020 06:41:49 -0700 (PDT) Date: Wed, 25 Mar 2020 06:41:47 -0700 From: Richard Cochran To: "Y.b. Lu" Cc: "linux-kernel@vger.kernel.org" , "netdev@vger.kernel.org" , "David S . Miller" , Vladimir Oltean , Claudiu Manoil , Andrew Lunn , Vivien Didelot , Florian Fainelli , Alexandre Belloni , Microchip Linux Driver Support Subject: Re: [PATCH 6/6] ptp_ocelot: support 4 programmable pins Message-ID: <20200325134147.GB32284@localhost> References: <20200320103726.32559-1-yangbo.lu@nxp.com> <20200320103726.32559-7-yangbo.lu@nxp.com> <20200324130733.GA18149@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 25, 2020 at 03:08:46AM +0000, Y.b. Lu wrote: > The calling should be like this, > ptp_set_pinfunc (hold pincfg_mux) > ---> ptp_disable_pinfunc > ---> .enable > ---> ptp_find_pin (hold pincfg_mux) I see. The call ptp_disable_pinfunc() --> .enable() is really ptp_disable_pinfunc() --> .enable(on=0) or disable. All of the other drivers (except mv88e6xxx which has a bug) avoid the deadlock by only calling ptp_find_pin() when invoked by .enable(on=1); Of course, that is horrible, and I am going to find a way to fix it. For now, maybe you can drop the "programmable pins" feature for your driver? After all, the pins are not programmable. Thanks, Richard