Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp10357529pxu; Tue, 29 Dec 2020 23:52:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJwRq279CnkG65+2J44hHbhGXjlgBccGcubzpk4+fnFCncmz+6xMjC395jqnJV4I/AozXLvU X-Received: by 2002:a50:fc96:: with SMTP id f22mr51334350edq.162.1609314719905; Tue, 29 Dec 2020 23:51:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609314719; cv=none; d=google.com; s=arc-20160816; b=Z9yghidssEkaBE+ycuZdx0sLH41yP9m3GJx2ffsi+750YyCDuxR5S1plPMxTSyOX/8 PvIfFWYs+txDFQo9YM0SPM/kjW1sv+miLTa8yM6VooVJAgXlz7wcgq7JGGz5EG4uMCaq DAVOJ/FcK6Tx+BeHoXbzs8ltYX6udepMoBqia7qjuKE9ya2g1UK5WU/t0ZRVmJGjXlnA tmTeR96FmNUvd0omcOFOu0RMNqivLNYWnZWD4VeTbMUUc1UjAXxdz6sDlToEuttfqTk9 Mn1V5OxUIC1yeK8DPoKYlFjI73Rx5zVr9qILv0wn88UJq5UHUFgOPSbj0uEQJctS4dPf +S+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:message-id:references:in-reply-to :subject:cc:to:from:date:content-transfer-encoding:mime-version :sender:dkim-signature; bh=75H8H0z8rDIGmnh6ZXLqAUtDjnVvjFNe+R/xEHbD1r4=; b=w6t2/3ynqAgBpMsHSMpPAeyDxwVK30znpb542hDSdyN7+9TNYyKvtNHQWvLAu3DI8q ythEB9i0ShpDex384nNFe+QiphbIPjfhrnV5D/hXoJWJTOHW2wq8S9otmYf/8OIpo6wW 4DK2a7h/N0RxCqDwLkt24GyH07+JECmTc/6ijUYqf1Nol4D7TMsWPKGu8OLsQTsF4aP1 jBYL+Q8QC/epg4Qh3JRWmVObLOiaShvHnQYcHbi+PsrW++HXfnH4ElHomapieJo26EfY gAmbkK7MKSWvlfj08tj4xVGyYSeY9iFq9rJx1c+5WA+HPogM9Tbb5p1lJTjTjiWUg7LI a+mA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=SRl9Iunw; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h1si23569772edj.73.2020.12.29.23.51.35; Tue, 29 Dec 2020 23:51:59 -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=@mg.codeaurora.org header.s=smtp header.b=SRl9Iunw; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726230AbgL3HuH (ORCPT + 99 others); Wed, 30 Dec 2020 02:50:07 -0500 Received: from so254-31.mailgun.net ([198.61.254.31]:28095 "EHLO so254-31.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726144AbgL3HuG (ORCPT ); Wed, 30 Dec 2020 02:50:06 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1609314581; h=Message-ID: References: In-Reply-To: Subject: Cc: To: From: Date: Content-Transfer-Encoding: Content-Type: MIME-Version: Sender; bh=75H8H0z8rDIGmnh6ZXLqAUtDjnVvjFNe+R/xEHbD1r4=; b=SRl9IunwhtxSSoKvdFws7szp9MvPQfMQxawoUiRNqAcp+D8rZ9612I2iE2+2eaZ8HggixctV 32uR6ZKvcKOSRDVuM8oKTpyBduU+4YhO9dEDWd5/VXcysre4mjFkN7gL4nAGhmBTXaTIZLqe 3gWeh4dYPWiAHqWyFJGwqW/qrE0= X-Mailgun-Sending-Ip: 198.61.254.31 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n09.prod.us-east-1.postgun.com with SMTP id 5fec30f2e61d77c9713db57e (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Wed, 30 Dec 2020 07:49:06 GMT Sender: cang=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 3D51EC43468; Wed, 30 Dec 2020 07:49:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=ALL_TRUSTED,BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: cang) by smtp.codeaurora.org (Postfix) with ESMTPSA id 2DF1CC433CA; Wed, 30 Dec 2020 07:49:04 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 30 Dec 2020 15:49:04 +0800 From: Can Guo To: Avri Altman Cc: asutoshd@codeaurora.org, nguyenb@codeaurora.org, hongwus@codeaurora.org, ziqichen@codeaurora.org, rnayak@codeaurora.org, linux-scsi@vger.kernel.org, kernel-team@android.com, saravanak@google.com, salyzyn@google.com, Alim Akhtar , "James E.J. Bottomley" , "Martin K. Petersen" , Stanley Chu , Bean Huo , Bart Van Assche , open list Subject: Re: [PATCH] scsi: ufs: Correct the lun used in eh_device_reset_handler() callback In-Reply-To: References: <1609157080-26283-1-git-send-email-cang@codeaurora.org> Message-ID: X-Sender: cang@codeaurora.org User-Agent: Roundcube Webmail/1.3.9 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020-12-30 15:20, Avri Altman wrote: >> Users can initiate resets to specific SCSI device/target/host through >> IOCTL. When this happens, the SCSI cmd passed to eh_device/target/host >> _reset_handler() callbacks is initialized with a request whose tag is >> -1. >> So, in this case, it is not right for eh_device_reset_handler() >> callback >> to count on the lun get from hba->lrb[-1]. Fix it by getting lun from >> the >> SCSI device associated with the SCSI cmd. >> >> Signed-off-by: Can Guo > Reviewed-by: Avri Altman > > Btw, am surprised to see that you guys are still using sg_reset > instead of ufs-utils? Hi Avri, We are not using any user layer tools at all. But I am confronted with many customers and tons of test teams inside and outside. I see all kinds of corner cases everyday, so not surprised at all. Thanks, Can Guo > > Thanks, > Avri