Received: by 2002:a05:6a10:5594:0:0:0:0 with SMTP id ee20csp276432pxb; Mon, 25 Apr 2022 09:48:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxfeHSQHJBEfsiJRq5G6IdKf9WmD6Y390OlP1GtS0w5UQwVZMlGLN5sf+uRvC+oi/IlFfP+ X-Received: by 2002:a05:6402:50cc:b0:425:e744:53cd with SMTP id h12-20020a05640250cc00b00425e74453cdmr6386752edb.390.1650905294197; Mon, 25 Apr 2022 09:48:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650905294; cv=none; d=google.com; s=arc-20160816; b=vY5co3CyGXkkHxWi1IWYRfNNTSBKaM7KQsRYzsIJw6rp0ElVqlzSCKnq3rPxd5bDiJ 9swTvkmdGV93cvYa/743J/7fKEpsO1gQAmdbd4BVHVvBqdhwnK/0YvxD/MGnYMwZNIUY c3f+tLlNTo1/tvBvG+OgzNvlyvl4VOhdX8ZG9AreXg/7eYhSKKHXqCz+3oqa/S0gy6HC DsR5b/KPdJkBnIHx+/wUuqTnq6ntCe3xIS8IWYVtQFgvwW/QxdbenGVe4quuOAOYhW8b pDmd884qGo+rIqV90m/BHJYCtsN90QfH3c3Ld5rpGEADNbf3xHxtK2lxEILwsBZKyebf tQeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:subject:user-agent:mime-version:date:message-id; bh=vGjPdnjOAQwotheXhYgKXkjZxTm3oIs6wjBAxHdl3do=; b=ePpvEowdRr4nz0ZZ7vwn7a4KcMNGS5vq/aY8u3kiOUsrmWs2czWUODqYpOOgl5peQX rbXhtVsxLI5ffusd+VH1mWMmCGfYtqAUehQM4lqJX+aKazd0ROPRju+lwVGurZ0zccIv Pmx/VRLw2brBLG9H+gUdlqnmufdE0V+TUuBjxjJ1aS4fQgJbuinEradQEu7PmjHItfku Pp4uLf/XktSVNn4ZXgK0/f1mMIFw32bUTbHH5/I9EO3/j50NkBGjeloYJ8nLxQlfinDW SDvA4/RQ5FdjsNezE+DKdwJXNfgF3gmmCFtmlNnTYhChxjxgx/RD4x2mH4a2py1cw/T4 dEkQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s15-20020a170906284f00b006ec0ad1e7d2si12841316ejc.286.2022.04.25.09.47.49; Mon, 25 Apr 2022 09:48:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232042AbiDYIbP (ORCPT + 99 others); Mon, 25 Apr 2022 04:31:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40354 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232784AbiDYIbB (ORCPT ); Mon, 25 Apr 2022 04:31:01 -0400 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7ABA6186F3; Mon, 25 Apr 2022 01:27:56 -0700 (PDT) Received: from fraeml742-chm.china.huawei.com (unknown [172.18.147.201]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4KmykX5Mhzz67y8F; Mon, 25 Apr 2022 16:25:24 +0800 (CST) Received: from lhreml724-chm.china.huawei.com (10.201.108.75) by fraeml742-chm.china.huawei.com (10.206.15.223) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Mon, 25 Apr 2022 10:27:54 +0200 Received: from [10.47.92.213] (10.47.92.213) by lhreml724-chm.china.huawei.com (10.201.108.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2375.24; Mon, 25 Apr 2022 09:27:53 +0100 Message-ID: <83328d95-5d5e-f311-952c-ce627cb035ea@huawei.com> Date: Mon, 25 Apr 2022 09:27:54 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: Re: [PATCH 1/4] scsi: libsas: Add sas_execute_internal_abort_single() To: Hannes Reinecke , , , , CC: , , , , , , , References: <1646309930-138960-1-git-send-email-john.garry@huawei.com> <1646309930-138960-2-git-send-email-john.garry@huawei.com> <929aede0-9e58-9c3d-5951-6151a3281edd@suse.de> From: John Garry In-Reply-To: <929aede0-9e58-9c3d-5951-6151a3281edd@suse.de> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.47.92.213] X-ClientProxiedBy: lhreml702-chm.china.huawei.com (10.201.108.51) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 20/04/2022 13:21, Hannes Reinecke wrote: >>   int sas_execute_tmf(struct domain_device *device, void *parameter, >>               int para_len, int force_phy_id, >>               struct sas_tmf_task *tmf) >> diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h >> index df2c8fc43429..2d30d57916e5 100644 >> --- a/include/scsi/libsas.h >> +++ b/include/scsi/libsas.h >> @@ -557,6 +557,16 @@ struct sas_ata_task { >>       int    force_phy_id; >>   }; >> +/* LLDDs rely on these values */ >> +enum sas_internal_abort { >> +    SAS_INTERNAL_ABORT_SINGLE    = 0, >> +}; >> + > > Why don't you use the existing TMF_XXX values here? > Your 'single' method pretty much _is_ a TMF_ABORT_TASK, and the 'device' > method _is_ a TMF_ABORT_TASK_SET, no? Sure, they are doing the same as TMFs and there is equivalence in the 'single' and 'device' methods, as you say. However, as mentioned in the comment, the LLDDs rely on the values in enum sas_internal_abort, which do not match the values in TMF_ABORT{_TASK, _TASK_SET}. Thanks, John