Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp823112pxb; Tue, 3 Nov 2020 13:33:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJzs2SNS3xtGOkhrx2lG1F+oV/ZZnORcGsnuXBajXwpd6kzjTeX/AqBVpDtVKKHHSMvMlGdX X-Received: by 2002:a05:6402:16d5:: with SMTP id r21mr13989387edx.358.1604439204344; Tue, 03 Nov 2020 13:33:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604439204; cv=none; d=google.com; s=arc-20160816; b=IeHqNvxCvU+o8XCtIEOHPvjBv2HO8paXqbqbNfYKWgF0smSwIzVTn8UEH55NJr40/n NHBS0SimWkBAqqCXJZeLSqt1N4uvN9pAIqXFIAMpRy6+0Rmp5Inb8y5Fc3+jW5um5UNl ICqyWKmzeswlHvbI3mRAGfd4qDa/YRhpaNJXgF/Bvnfi69rWfMneuz5fFfxZAuh/BOPX 6NeSnf96F0rfkgzt8XO4R8BrtpLygmbW6EnS54lMfqKmqA4TlU/sCuJgSPz+6NyxEL8s SBLyQbWHyyDW6Kuy82auqJb9qYg8twb9NGEvlMaEZSpHXUIVqslXlSBnePjnFG+R/qbp uFyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=sW1zvRr4WjHS6bkWMoqWaEl/M0Kxr695ltOJtwPYk2M=; b=HLzjtL9GKr1VjiYpZg0Dk/xPqwQH55JRBjpiR99xscsGxjqGP98VDNoZj7+9G/JL80 rKEOt64j3MeMZHVhw0Wz+S0yEdlCMyHN9M8bDSspJDkODvDSQLFJ3pwdH95pHVfJghrK 87YMAFC9qHcrr1GddFs7zCA6tIkEUZ/HZDrjpRQwD8Nj9KInztQmFBjdJMawVOfYx7Ao EgT9oQJS1Cfsqqy2hQESK4JnXeXpTHtc1VXtaw53nXKR7bo6xAavShj9huuQTtBcuLgI YeNNk725H321hJhWEuTYGtxyOIhw7LLFaPh+MEHBXKZJq8F68eTVV8/nK5Wv94//a5jF UMEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Cwa02dHa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id yd28si37877ejb.606.2020.11.03.13.33.00; Tue, 03 Nov 2020 13:33:24 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Cwa02dHa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387737AbgKCV2d (ORCPT + 99 others); Tue, 3 Nov 2020 16:28:33 -0500 Received: from mail.kernel.org ([198.145.29.99]:34958 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729585AbgKCU7l (ORCPT ); Tue, 3 Nov 2020 15:59:41 -0500 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (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 DB0952053B; Tue, 3 Nov 2020 20:59:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604437181; bh=L5ms5j8ReJco365fFQYVbJCEw0Wt1/KFNY135X55fwo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Cwa02dHa+gg7ZDHdubLApG1gj3Tf1XOmoJgqD9MSFOiti19DUP3M7MMlkQo2X5H8x jEtW2tk2Tv2L6M567Kh8JtWCUuS03RmNft4iMqHpgfOlKPndvtmF6JD6mfYazhD9vA A4+szNqQx2nBIIl84GAIAJhoyU8bPZGeAUW3wn4g= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Evan Quan , Alex Deucher , Jane Jian Subject: [PATCH 5.4 181/214] drm/amdgpu: correct the gpu reset handling for job != NULL case Date: Tue, 3 Nov 2020 21:37:09 +0100 Message-Id: <20201103203307.677176739@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201103203249.448706377@linuxfoundation.org> References: <20201103203249.448706377@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Evan Quan commit 207ac684792560acdb9e06f9d707ebf63c84b0e0 upstream. Current code wrongly treat all cases as job == NULL. Signed-off-by: Evan Quan Reviewed-and-tested-by: Jane Jian Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -3890,7 +3890,7 @@ retry: /* Rest of adevs pre asic reset f amdgpu_device_lock_adev(tmp_adev, false); r = amdgpu_device_pre_asic_reset(tmp_adev, - NULL, + (tmp_adev == adev) ? job : NULL, &need_full_reset); /*TODO Should we stop ?*/ if (r) {