Received: by 10.213.65.68 with SMTP id h4csp85527imn; Mon, 12 Mar 2018 07:31:14 -0700 (PDT) X-Google-Smtp-Source: AG47ELufiwyJ+MHawPy67/XSlLToMkFSIYl+ODMuiSo1vCPoR/xUz7+tfPbPq7YT8PrfkUPKIhAL X-Received: by 10.98.137.147 with SMTP id n19mr8283041pfk.193.1520865074440; Mon, 12 Mar 2018 07:31:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520865074; cv=none; d=google.com; s=arc-20160816; b=IASnh92fP5QCYovgVhAOfKE0eAhesyde9qv+rV2DhKurL4pDydu73BNIHmdaH3JheH flFDrkKVK/hRTQ1WvgqEdHt/Kg1abXW7Xfyctulbuscon4ixik6hqoplhfV5jLwvhBvf FEqKMKYv5Y+VAqRMjKEabZPBtb9q9jy+dKsOpWbf840y8LDdnfpAKRf5AseqF5yNAMgi eOiLmoknp8Yl9kBWGzCeAnw0ymBUZKESnW7hBBa75aliJK53tFhqfjsKhZpoa72yM3tM BOPNZ+CrbYx64fyK7m4kPqAZHFzSubpqkowlxoQ/6oTagcCWPYoYfi75EPHX2/iG7dkP MoCA== 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:arc-authentication-results; bh=Ej7pHe4K4ESosfoZ/fiv4gbAM6jhOWx9u/mJqxmh1Mo=; b=KK+otvd2Ybc9jGV6JzS5Bz2TZcaUg7Vx4dr6dVonpiuSbViKS7aaWejWw2sgzrRhxI clZJ7NS8iuOTBVpVjaU4Dz43L6kwT5bplOVapEMeYs6OG4y2oCowd9SAdbwp2q5hS6nM HrZ1e1/lHqy91nMFfCUdVA1NpLExwp769zIqnzjtzFVXlTW86QAAZ6MCbuI3trOefIx9 1m2V1uhJdgJihgu872q4LJy81PJw9PdkNDOaxCihlN9+LQd4QqUwDQ/ev/mugdfqBaih 4xEw1XNrIdCW0twRIYiYpvCoPOGE2oBV2HF1Tt5EDKLX/GpYUQ6gIiGDF6bt3P8a/X21 NZMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=Gxbo9owT; 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 b65si5844575pfk.283.2018.03.12.07.30.59; Mon, 12 Mar 2018 07:31:14 -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=@lunn.ch header.s=20171124 header.b=Gxbo9owT; 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 S932197AbeCLO3u (ORCPT + 99 others); Mon, 12 Mar 2018 10:29:50 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:55320 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751802AbeCLO3s (ORCPT ); Mon, 12 Mar 2018 10:29:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=Ej7pHe4K4ESosfoZ/fiv4gbAM6jhOWx9u/mJqxmh1Mo=; b=Gxbo9owTBocRIjLufCyzJwHjh41G9T2JtABEs5fA6vI6kwetPckGgojB6RafO3C66xqalLFNZNy4crdd9AOsq7ftGR/rWazPyjt4Eme4eqHorticRjYfL2GMYlpkKPFjynXlNOCMZjYvHBviLhftGI2UadpK25pnmWRVbFVFboE=; Received: from andrew by vps0.lunn.ch with local (Exim 4.84_2) (envelope-from ) id 1evOSK-0005v5-Mp; Mon, 12 Mar 2018 15:29:40 +0100 Date: Mon, 12 Mar 2018 15:29:40 +0100 From: Andrew Lunn To: Razvan Stefanescu Cc: gregkh@linuxfoundation.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, agraf@suse.de, arnd@arndb.de, alexandru.marginean@nxp.com, ruxandra.radulescu@nxp.com, ioana.ciornei@nxp.com, laurentiu.tudor@nxp.com, stuyoder@gmail.com Subject: Re: [PATCH v4 2/6] staging: fsl-dpaa2/ethsw: Add Freescale DPAA2 Ethernet Switch driver Message-ID: <20180312142940.GA21068@lunn.ch> References: <20180312084955.12686-1-razvan.stefanescu@nxp.com> <20180312084955.12686-3-razvan.stefanescu@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180312084955.12686-3-razvan.stefanescu@nxp.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 12, 2018 at 03:49:51AM -0500, Razvan Stefanescu wrote: > +static irqreturn_t ethsw_irq0_handler(int irq_num, void *arg) > +{ > + return IRQ_WAKE_THREAD; > +} > + > +static int ethsw_setup_irqs(struct fsl_mc_device *sw_dev) > +{ > + struct device *dev = &sw_dev->dev; > + struct ethsw_core *ethsw = dev_get_drvdata(dev); > + u32 mask = DPSW_IRQ_EVENT_LINK_CHANGED; > + struct fsl_mc_device_irq *irq; > + int err; > + > + err = fsl_mc_allocate_irqs(sw_dev); > + if (err) { > + dev_err(dev, "MC irqs allocation failed\n"); > + return err; > + } > + > + if (WARN_ON(sw_dev->obj_desc.irq_count != DPSW_IRQ_NUM)) { > + err = -EINVAL; > + goto free_irq; > + } > + > + err = dpsw_set_irq_enable(ethsw->mc_io, 0, ethsw->dpsw_handle, > + DPSW_IRQ_INDEX_IF, 0); > + if (err) { > + dev_err(dev, "dpsw_set_irq_enable err %d\n", err); > + goto free_irq; > + } > + > + irq = sw_dev->irqs[DPSW_IRQ_INDEX_IF]; > + > + err = devm_request_threaded_irq(dev, irq->msi_desc->irq, > + ethsw_irq0_handler, > + ethsw_irq0_handler_thread, > + IRQF_NO_SUSPEND | IRQF_ONESHOT, > + dev_name(dev), dev); Hi Razvan You can pass NULL instead of ethsw_irq0_handler. Andrew