Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1036836pxb; Wed, 6 Apr 2022 07:14:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyQOuRktmdmKTgwb8ds02ELjhErUrKuoqHGDijtJfIC9Y9DFAWAJHoXw3TNBoliV+ZxTnTo X-Received: by 2002:a05:6a00:10c7:b0:4fd:9ee6:4130 with SMTP id d7-20020a056a0010c700b004fd9ee64130mr9360141pfu.84.1649254490902; Wed, 06 Apr 2022 07:14:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649254490; cv=none; d=google.com; s=arc-20160816; b=wDs7HnkPbtuP/X2n1PlIOBNJDzk0T9E59cAYGq2SLVh1eauJQh+6O0rd/CS87RzvOj Y3esA1460/68HXXK0ZGlpClaFseMNV7mCPMp+GvjYXzOfzjy5NaexFuLckoQ2s0/iiWL 7o0QJFZyoeQ3MbPaudi6elPBMhWA7VIOLPKawmn9FBExu1Oyj2Gtk7ApOw7heCQpVLy/ tYmTPGisb7tl5zRExtE3647r8390mW0kP7/Yw/82dzGyZRDtDZU2B6jbpDKH+ZE99PZz 1N3Vf3rfx/0chMSOYkiC3bc8JGwE8wVA+ZUQon9ApCuznfheLuGcIIoeI7R9MeRy+gIb x5Dg== 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=J7LFWLaRmEwkpTpPPbthkV+t+P1RbhPVE83hR7KVL9c=; b=ZgGPEMzxAzVcfp0oCHI1BiqdQOZZEgxs+SEDqW3gTDeVtDStmoFa6gqMsE3sSBIxce ys6WTyWrQs1xujkNT79ZxekwPk7pgkCm4tb88fRiq0vrwvEAr8IObCbY3tWBGiRtqeDR firdx51yGn/sCBVsEpDYX6DnBwBkU0c0PW1xgmW3lrrMhZg9pRp4Abzya3RwQ134vaEs CPncA+vRaSaffOjGY1tOlKvPr9fIp2xdCljoGvK7OGEep+HvUj8ukv0joTC0M/RYbNd1 dVVYTmtXFe8d4EfHJcS4u5OCB/AGC9R5KsnSMer8w9DP7nN/VcRvBIXmycVH0E07OryQ iZBQ== 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:18 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id t2-20020a17090a448200b001caa0f5202asi4925503pjg.44.2022.04.06.07.14.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 07:14:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C80874BCE2E; Wed, 6 Apr 2022 05:00:32 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237104AbiDFKuA (ORCPT + 99 others); Wed, 6 Apr 2022 06:50:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40222 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1359019AbiDFKsX (ORCPT ); Wed, 6 Apr 2022 06:48:23 -0400 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4FF07505E5F; Wed, 6 Apr 2022 00:12:13 -0700 (PDT) Received: from fraeml744-chm.china.huawei.com (unknown [172.18.147.206]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4KYFym3T3lz683hj; Wed, 6 Apr 2022 15:10:24 +0800 (CST) Received: from lhreml724-chm.china.huawei.com (10.201.108.75) by fraeml744-chm.china.huawei.com (10.206.15.225) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Wed, 6 Apr 2022 09:12:10 +0200 Received: from [10.47.80.129] (10.47.80.129) by lhreml724-chm.china.huawei.com (10.201.108.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Wed, 6 Apr 2022 08:12:09 +0100 Message-ID: Date: Wed, 6 Apr 2022 08:12:08 +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 v2 1/2] libata: Use scsi cmnd budget token for qc tag for SAS host To: Damien Le Moal , CC: , , , References: <1649083990-207133-1-git-send-email-john.garry@huawei.com> <1649083990-207133-2-git-send-email-john.garry@huawei.com> From: John Garry In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.47.80.129] X-ClientProxiedBy: lhreml728-chm.china.huawei.com (10.201.108.79) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 06/04/2022 02:39, Damien Le Moal wrote: > On 4/4/22 23:53, John Garry wrote: >> For attaining a qc tag for a SAS host we need to allocate a bit in >> ata_port.sas_tag_allocated bitmap. >> >> However we already have a unique tag per device in range >> [0, ATA_MAX_QUEUE) in the scsi cmnd budget token, so just use that >> instead. > > The valid range is [0, ATA_MAX_QUEUE - 1]. Tag ATA_MAX_QUEUE is > ATA_TAG_INTERNAL which is never allocated as a valid device tag but used > directly in ata_exec_internal(). But that is what I have in [0, ATA_MAX_QUEUE), which is same as [0, ATA_MAX_QUEUE - 1]. Thanks, john