linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Garry <john.garry@huawei.com>
To: <jejb@linux.vnet.ibm.com>, <martin.petersen@oracle.com>
Cc: <linux-scsi@vger.kernel.org>, <linuxarm@huawei.com>,
	<linux-kernel@vger.kernel.org>, <hare@suse.com>,
	<ming.lei@redhat.com>, "John Garry" <john.garry@huawei.com>
Subject: [PATCH 2/6] scsi: hisi_sas: Pass scsi_cmnd pointer to hisi_sas_hw.slot_index_alloc
Date: Thu, 24 Oct 2019 22:21:17 +0800	[thread overview]
Message-ID: <1571926881-75524-3-git-send-email-john.garry@huawei.com> (raw)
In-Reply-To: <1571926881-75524-1-git-send-email-john.garry@huawei.com>

In future we will want to pass both the domain_device and scsi_cmnd
pointers to hisi_sas_hw.slot_index_alloc.

Signed-off-by: John Garry <john.garry@huawei.com>
---
 drivers/scsi/hisi_sas/hisi_sas.h       | 3 ++-
 drivers/scsi/hisi_sas/hisi_sas_main.c  | 4 ++--
 drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 3 ++-
 3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/scsi/hisi_sas/hisi_sas.h b/drivers/scsi/hisi_sas/hisi_sas.h
index fbfaa92765cf..4eb8f1c53f78 100644
--- a/drivers/scsi/hisi_sas/hisi_sas.h
+++ b/drivers/scsi/hisi_sas/hisi_sas.h
@@ -278,7 +278,8 @@ struct hisi_sas_hw {
 	void (*setup_itct)(struct hisi_hba *hisi_hba,
 			   struct hisi_sas_device *device);
 	int (*slot_index_alloc)(struct hisi_hba *hisi_hba,
-				struct domain_device *device);
+				struct domain_device *device,
+				struct scsi_cmnd *scmd);
 	void (*slot_index_free)(struct hisi_hba *hisi_hba, int slot_idx);
 	int (*bitmaps_alloc)(struct hisi_hba *hisi_hba);
 	struct hisi_sas_device *(*alloc_dev)(struct domain_device *device);
diff --git a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c
index f4937da9baf8..53802c1cc1d0 100644
--- a/drivers/scsi/hisi_sas/hisi_sas_main.c
+++ b/drivers/scsi/hisi_sas/hisi_sas_main.c
@@ -438,7 +438,7 @@ static int hisi_sas_task_prep(struct sas_task *task,
 	}
 
 	if (hisi_hba->hw->slot_index_alloc)
-		rc = hisi_hba->hw->slot_index_alloc(hisi_hba, device);
+		rc = hisi_hba->hw->slot_index_alloc(hisi_hba, device, NULL);
 	else {
 		struct scsi_cmnd *scsi_cmnd = NULL;
 
@@ -1929,7 +1929,7 @@ hisi_sas_internal_abort_task_exec(struct hisi_hba *hisi_hba, int device_id,
 
 	/* simply get a slot and send abort command */
 	if (hisi_hba->hw->slot_index_alloc)
-		rc = hisi_hba->hw->slot_index_alloc(hisi_hba, device);
+		rc = hisi_hba->hw->slot_index_alloc(hisi_hba, device, NULL);
 	else
 		rc = hisi_sas_slot_index_alloc(hisi_hba, NULL);
 	if (rc < 0)
diff --git a/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c b/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
index 683e1b99c9ae..b98ae960964b 100644
--- a/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
+++ b/drivers/scsi/hisi_sas/hisi_sas_v2_hw.c
@@ -791,7 +791,8 @@ static int bitmaps_alloc_v2_hw(struct hisi_hba *hisi_hba)
 
 static int
 slot_index_alloc_quirk_v2_hw(struct hisi_hba *hisi_hba,
-			     struct domain_device *device)
+			     struct domain_device *device,
+			     struct scsi_cmnd *scmd)
 {
 	struct sbitmap *slot_index_tags;
 	int sata_dev = dev_is_sata(device);
-- 
2.17.1


  parent reply	other threads:[~2019-10-24 14:25 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-24 14:21 [PATCH 0/6] hisi_sas: Expose multiple hw queues for v3 hw as experimental John Garry
2019-10-24 14:21 ` [PATCH 1/6] scsi: hisi_sas: Use sbitmap for IPTT management John Garry
2019-10-24 14:21 ` John Garry [this message]
2019-10-24 14:21 ` [PATCH 3/6] scsi: hisi_sas: Add bitmaps_alloc_v3_hw() John Garry
2019-10-24 14:21 ` [PATCH 4/6] scsi: hisi_sas: Add slot_index_alloc_v3_hw() and slot_index_free_v3_hw() John Garry
2019-10-24 14:21 ` [PATCH 5/6] scsi: hisi_sas: Split interrupt_init_v3_hw() John Garry
2019-10-24 14:21 ` [PATCH 6/6] scsi: hisi_sas: Expose multiple hw queues for v3 as experimental John Garry
2019-10-27  8:19   ` Ming Lei
2019-11-11 14:02     ` John Garry
2019-11-12 11:10       ` Ming Lei
2019-11-12 13:54         ` John Garry
2019-11-12 14:35           ` John Garry
2019-10-25 16:04 ` [PATCH 0/6] hisi_sas: Expose multiple hw queues for v3 hw " John Garry

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1571926881-75524-3-git-send-email-john.garry@huawei.com \
    --to=john.garry@huawei.com \
    --cc=hare@suse.com \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=martin.petersen@oracle.com \
    --cc=ming.lei@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).