Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp504245rwb; Wed, 28 Sep 2022 05:47:43 -0700 (PDT) X-Google-Smtp-Source: AMsMyM79rDJp21Zd/fmpiLeUibAkNbHv+mcADMW+WNa3p3batX4GrdTO2siTRH/Y1upLie5vpGMt X-Received: by 2002:a17:90b:1652:b0:202:a9b6:a693 with SMTP id il18-20020a17090b165200b00202a9b6a693mr10534768pjb.57.1664369263284; Wed, 28 Sep 2022 05:47:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664369263; cv=none; d=google.com; s=arc-20160816; b=waAaHXvHxxZKfZolQad2YXJRGa2uYortQqwTsXA39V2emg4yQj/6kZ0k+GM0w8IJzp d/sdzphIVZViaC0NZ5iEKhDFKEnUNQFeFtR1fJpv1W+2zDUZZIm0MnZZoyFPl65HmSw3 DkGoyHSkExEji9yBqgC2PmEK78i5O77+jSWB+vyCYVhJgWJy9U6FIfwLU4cC0nDGX4Io 2ilo7Xk4zbq/F24E3mx+eNN/dTWBINMiLEDpfWl7O85/BfscdtwVP70t9VgMG/t00Qbu l4SW06iRbgddltrBNWqeOw2r7qQ29w2OCNE/1mrPnq/AjDCk9CkguxY8uEMK6mqtdNuJ 4cFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=7ptKvxgfKSFqoBsOzjlKLIga1A8YuocFIj73BdCK9NA=; b=NM1aB7EzocFRsMI1VWIHf8qzAaVRUoqD+HDgeb07ujezOo4McL1BN8LQLlkzRsDGgh CF5ibeDFLQzOA2V5UDkkrA6cx5VvXP9gSxvbTcVWatSDbM7cBmKGvN8zKLAstUTJmCRt CBGij6EjzAkjUqLJP5VGgi2064M7rNtcrH5auSVxnn39dH4AzOSnkOP9c/k/VQb5h3eY W4EDC0QlnxLPwdX+8cPZ+lRv2O1IU9Ji3v3uhvjzPHLRrQhqCZWqviUgE7s9FqR2fn8k /E0c70tr2ll4YvjslrTrb2v0NsiubWmhY5ut0cffT4Paq+xBLRI3zBmpLaN+e+3AG56m YI/w== 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 m14-20020a17090a668e00b0020565dfad37si2105738pjj.26.2022.09.28.05.47.31; Wed, 28 Sep 2022 05:47:43 -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 S233952AbiI1Mdx (ORCPT + 99 others); Wed, 28 Sep 2022 08:33:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51094 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233796AbiI1Mdv (ORCPT ); Wed, 28 Sep 2022 08:33:51 -0400 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A4417419AB; Wed, 28 Sep 2022 05:33:49 -0700 (PDT) Received: from fraeml715-chm.china.huawei.com (unknown [172.18.147.206]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4Mcwqh46Hwz6H75C; Wed, 28 Sep 2022 20:32:32 +0800 (CST) Received: from lhrpeml500003.china.huawei.com (7.191.162.67) by fraeml715-chm.china.huawei.com (10.206.15.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Wed, 28 Sep 2022 14:33:46 +0200 Received: from localhost.localdomain (10.69.192.58) by lhrpeml500003.china.huawei.com (7.191.162.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Wed, 28 Sep 2022 13:33:43 +0100 From: John Garry To: , , , CC: , , , , , , , John Garry Subject: [PATCH 0/6] scsi: libsas: Use request tag in more drivers Date: Wed, 28 Sep 2022 20:27:08 +0800 Message-ID: <1664368034-114991-1-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 2.8.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.58] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To lhrpeml500003.china.huawei.com (7.191.162.67) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H2,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 Currently hisi_sas is the only libsas driver which uses the request tag for per-HW IO tag. All other libsas drivers manage the tags internally. Tag management in pm8001 and mvsas is currently using a simple bitmap, so use the request tag when available there. With this change we still need to manage tags for libsas "internal" commands, like SMP commands, and any other private commands so reserve some tags for this: - For pm8001 I went with pre-existing and unused PM8001_RESERVE_SLOT size. The value is 8, which should be enough. It is greater than mvsas, below, but this driver sends a lot of other private commands to HW. - For mvsas I went with 4, which still should be enough. isci and aic9xx have elaborate tag alloc schemes, so I'm not going to bother changing them, especially since I have no HW to test with. Helper sas_task_find_rq() is added to get the request and associated tag per sas_task when it is available. This series looks not to conflict with https://lore.kernel.org/linux-scsi/20220928070130.3657183-1-yanaijie@huawei.com/T/#mefdcb7b63b4e6ebc8b77a689b3923571ab3d33ab Based on https://lore.kernel.org/linux-scsi/1664262298-239952-1-git-send-email-john.garry@huawei.com/T/#t Igor Pylypiv (1): scsi: pm8001: Remove pm8001_tag_init() John Garry (5): scsi: libsas: Add sas_task_find_rq() scsi: hisi_sas: Use sas_task_find_rq() scsi: pm8001: Use sas_task_find_rq() for tagging scsi: mvsas: Delete mvs_tag_init() scsi: mvsas: Use sas_task_find_rq() for tagging drivers/scsi/hisi_sas/hisi_sas_main.c | 26 ++++++++---------------- drivers/scsi/mvsas/mv_defs.h | 1 + drivers/scsi/mvsas/mv_init.c | 6 ++---- drivers/scsi/mvsas/mv_sas.c | 29 ++++++++++++++++----------- drivers/scsi/mvsas/mv_sas.h | 2 -- drivers/scsi/pm8001/pm8001_init.c | 12 ++++------- drivers/scsi/pm8001/pm8001_sas.c | 15 +++++++------- drivers/scsi/pm8001/pm8001_sas.h | 7 +++++-- include/scsi/libsas.h | 22 ++++++++++++++++++++ 9 files changed, 67 insertions(+), 53 deletions(-) -- 2.35.3