Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1708762

[PATCH 06/19] scsi: hisi_sas: remove repeated device config in v2 hw

From John Garry <john.garry@huawei.com>
Newsgroups linux.kernel
Subject [PATCH 06/19] scsi: hisi_sas: remove repeated device config in v2 hw
Date 2017-08-10 17:50 +0200
Message-ID <ucXSH-7AZ-47@gated-at.bofh.it> (permalink)
References <ucXSF-7AZ-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Xiang Chen <chenxiang66@hisilicon.com>

This patch removes some repeated configurations:
(1) The device id of the device is already set in the
alloc function, so we don't need to modify in free
device function.
(2) Field dev_type and dev_status are configured in
hisi_sas_dev_gone(), so there is no need for repeated
config in free_device_v3_hw.

Signed-off-by: Xiang Chen <chenxiang66@hisilicon.com>
Signed-off-by: John Garry <john.garry@huawei.com>
---
 drivers/scsi/hisi_sas/hisi_sas_main.c  | 3 ---
 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c | 2 --
 2 files changed, 5 deletions(-)

diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c
index aaa7296..81ad6cd 100644
--- a/drivers/scsi/hisi_sas/hisi_sas_main.c
+++ b/drivers/scsi/hisi_sas/hisi_sas_main.c
@@ -716,7 +716,6 @@ static void hisi_sas_dev_gone(struct domain_device *device)
 	struct hisi_sas_device *sas_dev = device->lldd_dev;
 	struct hisi_hba *hisi_hba = dev_to_hisi_hba(device);
 	struct device *dev = hisi_hba->dev;
-	int dev_id = sas_dev->device_id;
 
 	dev_info(dev, "found dev[%d:%x] is gone\n",
 		 sas_dev->device_id, sas_dev->dev_type);
@@ -729,9 +728,7 @@ static void hisi_sas_dev_gone(struct domain_device *device)
 	hisi_hba->hw->free_device(hisi_hba, sas_dev);
 	device->lldd_dev = NULL;
 	memset(sas_dev, 0, sizeof(*sas_dev));
-	sas_dev->device_id = dev_id;
 	sas_dev->dev_type = SAS_PHY_UNUSED;
-	sas_dev->dev_status = HISI_SAS_DEV_NORMAL;
 }
 
 static int hisi_sas_queue_command(struct sas_task *task, gfp_t gfp_flags)
diff --git a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
index 83d2dca..dc5c551 100644
--- a/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
+++ b/drivers/scsi/hisi_sas/hisi_sas_v3_hw.c
@@ -578,8 +578,6 @@ static void free_device_v3_hw(struct hisi_hba *hisi_hba,
 		memset(itct, 0, sizeof(struct hisi_sas_itct));
 		hisi_sas_write32(hisi_hba, ENT_INT_SRC3,
 				 ENT_INT_SRC3_ITC_INT_MSK);
-		hisi_hba->devices[dev_id].dev_type = SAS_PHY_UNUSED;
-		hisi_hba->devices[dev_id].dev_status = HISI_SAS_DEV_NORMAL;
 
 		/* clear the itct */
 		hisi_sas_write32(hisi_hba, ITCT_CLR, 0);
-- 
1.9.1

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 00/19] hisi_sas: misc fixes, improvements, and new features John Garry <john.garry@huawei.com> - 2017-08-10 17:50 +0200
  [PATCH 06/19] scsi: hisi_sas: remove repeated device config in v2 hw John Garry <john.garry@huawei.com> - 2017-08-10 17:50 +0200
  [PATCH 03/19] scsi: hisi_sas: fix v2 hw underflow residual value John Garry <john.garry@huawei.com> - 2017-08-10 17:50 +0200
  [PATCH 12/19] scsi: hisi_sas: fix v3 hw channel interrupt processing John Garry <john.garry@huawei.com> - 2017-08-10 17:50 +0200
  [PATCH 17/19] scsi: hisi_sas: remove phy_down_v3_hw() res variable John Garry <john.garry@huawei.com> - 2017-08-10 17:50 +0200
  [PATCH 09/19] scsi: hisi_sas: support zone management commands John Garry <john.garry@huawei.com> - 2017-08-10 17:50 +0200
  [PATCH 05/19] scsi: hisi_sas: use array for v2 hw ECC errors John Garry <john.garry@huawei.com> - 2017-08-10 17:50 +0200
  [PATCH 19/19] scsi: hisi_sas: remove driver versioning John Garry <john.garry@huawei.com> - 2017-08-10 17:50 +0200
  [PATCH 15/19] scsi: hisi_sas: add reset handler for v3 hw John Garry <john.garry@huawei.com> - 2017-08-10 17:50 +0200
  [PATCH 01/19] scsi: hisi_sas: fix reset and port ID refresh issues John Garry <john.garry@huawei.com> - 2017-08-10 18:00 +0200
  Re: [PATCH 00/19] hisi_sas: misc fixes, improvements, and new features "Martin K. Petersen" <martin.petersen@oracle.com> - 2017-08-11 02:20 +0200

csiph-web