Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp6023514ybc; Wed, 27 Nov 2019 13:35:00 -0800 (PST) X-Google-Smtp-Source: APXvYqzyLjy3KItto3kGjziuYJJYiToQIuVBptwEw1yeam/97smbOcxKQTjMCa/AGm+iv65cFTn0 X-Received: by 2002:a50:ef08:: with SMTP id m8mr35132875eds.14.1574890499819; Wed, 27 Nov 2019 13:34:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574890499; cv=none; d=google.com; s=arc-20160816; b=t2xYRhgUFMcbpfKBJi9Qbbi+GldBiWOeQid4aqwfscwxXbwYkanL22FXbAotU0epKW tNvd1ls7HNOoQE2NSyiYqEL8YJqErhVNRvgGkwVFMFGldAcYZ+qFAG39vwSz5zV3J8PM OSQnirikfBL2XZd96r5FpbNhP84byRws+2c3T+wOLiu0wF0ArGJM8N/N7RecWsglq1sG 8oKRYQCoOpkc5tgOOt9ASnwWtGs9h5jSZczFcZCqvA0FqxHJ8LERlEWGyTy5xUg9kB4B Y1cMV02lBgtCjw/reA8T+YDJmI+8v2fWOC9x6COjqCYTPEkfJ0A0uvPJTMFP6ft1DFpq oVcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=qieZsDIqFIpKTLMofW8QCBH3aJw+ViqlCgDWy8ruTqk=; b=HF6bax7ryH9KGkG4CjhEeqguKChk53Pnc22aMJrKXI+pZaFFDCe1NDASsk5Nbw9+qh gCAvSo4aLftYDncqrScFYVRcR82JxApsMWrHTmkvLbyER530oTp0oqArp+Yo1J/rhuDe 8Xjd+uucNMHcnX5C7k8q7GFmInueDpdgDavkqdMl+pX0bxS9lrDwfxf8FBMpz0AVDqc6 LhlLOvX1fDCpUveHogxVlH+bWA5hR+o75iVgnrJ+iEtp9i1MXOFTxVzPajXpqSfN4QzF CQ7tXYst5Mb21uIfxVaf5d1x5/Nwn0Nm0FVcxRemr3piWQovE/WYrFUzkXBdUYiGjMYc gAew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=jp+LgdDr; 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 n19si10476004ejh.172.2019.11.27.13.34.36; Wed, 27 Nov 2019 13:34:59 -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=@kernel.org header.s=default header.b=jp+LgdDr; 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 S1730001AbfK0Uz4 (ORCPT + 99 others); Wed, 27 Nov 2019 15:55:56 -0500 Received: from mail.kernel.org ([198.145.29.99]:46498 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730695AbfK0Uzw (ORCPT ); Wed, 27 Nov 2019 15:55:52 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 839ED2084D; Wed, 27 Nov 2019 20:55:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574888152; bh=J18Pe9VFIeVy6toRgZji6+yo9zsWN92N2vTn+xCSzP4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jp+LgdDriKYoHl1m3OrNona6zEMI/oMXcJnweJ2q7jrKhlqiGs9emnZpmY1ODZjgn icjwKiMG5O67vqHpck1uT26ewezPEKDOZwW0y4QHAQngKGw8u9GlakR/8ACbho4J1W IhmbXQKyg2gZVaWi1r4DadpHuwTpZoZR+x7G0HTI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Martin Habets , "David S. Miller" Subject: [PATCH 4.19 007/306] sfc: Only cancel the PPS workqueue if it exists Date: Wed, 27 Nov 2019 21:27:37 +0100 Message-Id: <20191127203115.279517181@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191127203114.766709977@linuxfoundation.org> References: <20191127203114.766709977@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Martin Habets [ Upstream commit 723eb53690041740a13ac78efeaf6804f5d684c9 ] The workqueue only exists for the primary PF. For other functions we hit a WARN_ON in kernel/workqueue.c. Fixes: 7c236c43b838 ("sfc: Add support for IEEE-1588 PTP") Signed-off-by: Martin Habets Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/sfc/ptp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/net/ethernet/sfc/ptp.c +++ b/drivers/net/ethernet/sfc/ptp.c @@ -1534,7 +1534,8 @@ void efx_ptp_remove(struct efx_nic *efx) (void)efx_ptp_disable(efx); cancel_work_sync(&efx->ptp_data->work); - cancel_work_sync(&efx->ptp_data->pps_work); + if (efx->ptp_data->pps_workwq) + cancel_work_sync(&efx->ptp_data->pps_work); skb_queue_purge(&efx->ptp_data->rxq); skb_queue_purge(&efx->ptp_data->txq);