From patchwork Wed Mar 7 12:25:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 130878 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp5122247lja; Wed, 7 Mar 2018 04:29:06 -0800 (PST) X-Google-Smtp-Source: AG47ELv/aNOQrQG2dGb0mDBea1Qd95TFhuTEeCVFp0UC2OkrH9DWAnMZYSkEgwXI9jarJ8SSGPqz X-Received: by 2002:a17:902:864b:: with SMTP id y11-v6mr20118213plt.380.1520425745922; Wed, 07 Mar 2018 04:29:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520425745; cv=none; d=google.com; s=arc-20160816; b=pkvkTxjro5fC6lGSmDbFo9c5+uBRrl/6zwFrrFB9s7V3bPnPczI+AkrkLOfBPZNUt1 eCIQQsrL9eVB0UcqNqfTUFI3uAAjXv23eWx6PW6Jk1ky2k6G3Q2utKz6dlq+q0mQBFLQ 1iEUWzbfOVSZnYBYag0PNJDpgUym8/IGF3r2Bzlk2TAkEZ23k8qrjOv7VzS9EZabjC+t 9ex3sZTRzOJnM4pZI0DKAHueGHsF6xgdzyUx0fcoyauWUxP8PqnK+AdbQ6mqREeK7T8q pVa/IuS+gTk3xWpIrxVUI/Kpswm5ceYWgQNpEJCBL2Ry7XHfBeMV7deCL1bjo4b5Sf3I GRJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:arc-authentication-results; bh=83gD57nLadlNcDblS5QYs8FjsfmM0Q6uDUNBQ3+UKis=; b=S66MNyK91Kym5hMU19X/smNJuMmXcOJuJ35eliAn88R1D3B51ZhuYQbRrrJ+OEeTzH W9baPGnoSEjIkF/pVCTa2756QmHOMt4eW/dd0Ph3H+HsGAVwc4Y0b9F13HB53isqTVvY Jznwl0pG5NdqLvWAh6OlXJMuxbOs9sh+b8QYT5JuyJQQMYVtBLjbsW3ekRwq1xktOiNH MmOINZSxXSfSmOVL8/TQf8jEqoFit5+tr9O7CHtyZzg5lmcVBLczJ5ajUxDUz8THezrx mYQ54YBTFhOZcRK4LmH9+6EF2caQt+ohrIfp0soZEyjbNFOaEgAncHlW4iyuS6yYnLsu L/8g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n128si4337111pgn.827.2018.03.07.04.29.05; Wed, 07 Mar 2018 04:29:05 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754429AbeCGM3E (ORCPT + 6 others); Wed, 7 Mar 2018 07:29:04 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:6166 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751067AbeCGMZ6 (ORCPT ); Wed, 7 Mar 2018 07:25:58 -0500 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id ABAD9885142ED; Wed, 7 Mar 2018 20:25:42 +0800 (CST) Received: from localhost.localdomain (10.67.212.75) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.361.1; Wed, 7 Mar 2018 20:25:35 +0800 From: John Garry To: , , , , CC: , , , , Xiang Chen , John Garry Subject: [PATCH v4 06/10] scsi: hisi_sas: remove unused variable hisi_sas_devices.running_req Date: Wed, 7 Mar 2018 20:25:10 +0800 Message-ID: <1520425514-205565-7-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1520425514-205565-1-git-send-email-john.garry@huawei.com> References: <1520425514-205565-1-git-send-email-john.garry@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.67.212.75] X-CFilter-Loop: Reflected Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Xiang Chen The structure element hisi_sas_devices.running_req to count how many commands are active is in effect only ever written in the code, so remove it. Signed-off-by: Xiang Chen Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas.h | 1 - drivers/scsi/hisi_sas/hisi_sas_main.c | 9 --------- drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 3 --- 3 files changed, 13 deletions(-) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/scsi/hisi_sas/hisi_sas.h b/drivers/scsi/hisi_sas/hisi_sas.h index e7fd287..d1153e8 100644 --- a/drivers/scsi/hisi_sas/hisi_sas.h +++ b/drivers/scsi/hisi_sas/hisi_sas.h @@ -175,7 +175,6 @@ struct hisi_sas_device { struct hisi_sas_dq *dq; struct list_head list; u64 attached_phy; - atomic64_t running_req; enum sas_device_type dev_type; int device_id; int sata_idx; diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c index 9ff8790..88ad8d4 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_main.c +++ b/drivers/scsi/hisi_sas/hisi_sas_main.c @@ -200,8 +200,6 @@ void hisi_sas_slot_task_free(struct hisi_hba *hisi_hba, struct sas_task *task, if (task) { struct device *dev = hisi_hba->dev; - struct domain_device *device = task->dev; - struct hisi_sas_device *sas_dev = device->lldd_dev; if (!task->lldd_task) return; @@ -213,9 +211,6 @@ void hisi_sas_slot_task_free(struct hisi_hba *hisi_hba, struct sas_task *task, dma_unmap_sg(dev, task->scatter, task->num_scatter, task->data_dir); - - if (sas_dev) - atomic64_dec(&sas_dev->running_req); } if (slot->buf) @@ -431,8 +426,6 @@ static int hisi_sas_task_prep(struct sas_task *task, struct hisi_sas_dq spin_unlock_irqrestore(&task->task_state_lock, flags); dq->slot_prep = slot; - - atomic64_inc(&sas_dev->running_req); ++(*pass); return 0; @@ -1517,8 +1510,6 @@ static int hisi_sas_query_task(struct sas_task *task) dq->slot_prep = slot; - atomic64_inc(&sas_dev->running_req); - /* send abort command to the chip */ hisi_hba->hw->start_delivery(dq); spin_unlock_irqrestore(&dq->lock, flags_dq); diff --git a/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c index 2eb8980..8dd0e6a6 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c +++ b/drivers/scsi/hisi_sas/hisi_sas_v1_hw.c @@ -1407,9 +1407,6 @@ static int slot_complete_v1_hw(struct hisi_hba *hisi_hba, } out: - if (sas_dev) - atomic64_dec(&sas_dev->running_req); - hisi_sas_slot_task_free(hisi_hba, task, slot); sts = ts->stat; From patchwork Wed Mar 7 12:25:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Garry X-Patchwork-Id: 130872 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp5120628lja; Wed, 7 Mar 2018 04:27:18 -0800 (PST) X-Google-Smtp-Source: AG47ELsj7AbuGHbJxST3yDR6VI/lq6ct9lbWGaeOQnZQi4rL7dduS0SE/bybPCv78TYKeahAJx0w X-Received: by 10.98.35.195 with SMTP id q64mr22192689pfj.161.1520425637872; Wed, 07 Mar 2018 04:27:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520425637; cv=none; d=google.com; s=arc-20160816; b=X9HKDCEpJdA9qwmCc/yWP8QN0acWjf/PtB9o7sga9v6Cl7i5qfr9/S1dpHBkLBz59S EeeDUwIphpKEAhDROp2FR7/BjePPyqvx0xPQncCIFnGRH+a8/Cqxfevm2HxAg+IhAHAI iL9YXZ08gmH5+bTThft2WE1NHfhP+DiqLd3Yy6K27y7XM6Qi8GTCq6jffCAH6k58pYzb 4yEdt2bLLZwStuU1eZdXGd+pRD85tHYxQ7DopUJ5R0E33oxUCOJtI5YJQHyw9sH3sN06 uqO59hcExFAZWa8ucgn0JqgRBGp8F5tSKNgxoJ3Xn0qLa4MSJL5pcBkuDJF34Li7NCBX M2+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:arc-authentication-results; bh=zR9XVZb/xG/2BSPbEEcS0raHYShRKwGGpS4OIDJijYE=; b=erbyaSOCsfs/XY7+Vw9c5AHvrpxQ3P/rjlUttoGTZTv4MWFwFnExboGGYOT2twWAyv vZyzDpqENWbxGemYNFQLtkQYQ2tZ7YAdN0sk1SOzznWTd64VBztAyUEDaLUoWfB4hDcp KsVZxWZeqRrDdqGSJEgqROcrwV6EbvC1t1iMsC1E+Z9Co+T+xCVOMcD++G9WjW5k81qP gyEq9Af128jJNEBUPVQPtBJvPbRqKvQnp1nqLnpvLg8RUhDOITLOWBt4EnpLHYvesD5E 12ZNzYWwQ46uc18+oZ6HiWm9zsmqao8tCPMO8obaCi8IAo4Ytsno14iK/udXIJMeUrHP 40Jw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f63si10615531pfb.325.2018.03.07.04.27.17; Wed, 07 Mar 2018 04:27:17 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754471AbeCGM1O (ORCPT + 6 others); Wed, 7 Mar 2018 07:27:14 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:6173 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754189AbeCGM0C (ORCPT ); Wed, 7 Mar 2018 07:26:02 -0500 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 2341575FE5AE3; Wed, 7 Mar 2018 20:25:43 +0800 (CST) Received: from localhost.localdomain (10.67.212.75) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.361.1; Wed, 7 Mar 2018 20:25:36 +0800 From: John Garry To: , , , , CC: , , , , Xiang Chen , John Garry Subject: [PATCH v4 10/10] scsi: hisi_sas: add v3 hw MODULE_DEVICE_TABLE() Date: Wed, 7 Mar 2018 20:25:14 +0800 Message-ID: <1520425514-205565-11-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1520425514-205565-1-git-send-email-john.garry@huawei.com> References: <1520425514-205565-1-git-send-email-john.garry@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.67.212.75] X-CFilter-Loop: Reflected Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Xiang Chen Export device table of v3 hw to userspace, or auto probe will fail for v3 hw. Also change the module alias to include "pci", instead of "platform". Signed-off-by: Xiang Chen Signed-off-by: John Garry --- drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c index 5ce5ef2c..6f3e5ba 100644 --- a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c +++ b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c @@ -2394,6 +2394,7 @@ static int hisi_sas_v3_resume(struct pci_dev *pdev) { PCI_VDEVICE(HUAWEI, 0xa230), hip08 }, {} }; +MODULE_DEVICE_TABLE(pci, sas_v3_pci_table); static const struct pci_error_handlers hisi_sas_err_handler = { .error_detected = hisi_sas_error_detected_v3_hw, @@ -2416,4 +2417,4 @@ static int hisi_sas_v3_resume(struct pci_dev *pdev) MODULE_LICENSE("GPL"); MODULE_AUTHOR("John Garry "); MODULE_DESCRIPTION("HISILICON SAS controller v3 hw driver based on pci device"); -MODULE_ALIAS("platform:" DRV_NAME); +MODULE_ALIAS("pci:" DRV_NAME);