linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] ibmvscsi: add vscsi hosts to global list_head
@ 2016-12-07 22:04 Tyrel Datwyler
  2016-12-07 22:04 ` [PATCH 2/2] ibmvscsi: log bad SRP response opcode in hex format Tyrel Datwyler
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Tyrel Datwyler @ 2016-12-07 22:04 UTC (permalink / raw)
  To: james.bottomley
  Cc: martin.petersen, linux-scsi, linuxppc-dev, brking, nfont,
	Tyrel Datwyler

Add each vscsi host adatper to a new global list_head named
ibmvscsi_head. There is no functional change. This is meant primarily
as a convience for locating adatpers from within the debugger or crash
utility.

Signed-off-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
---
 drivers/scsi/ibmvscsi/ibmvscsi.c | 3 +++
 drivers/scsi/ibmvscsi/ibmvscsi.h | 1 +
 2 files changed, 4 insertions(+)

diff --git a/drivers/scsi/ibmvscsi/ibmvscsi.c b/drivers/scsi/ibmvscsi/ibmvscsi.c
index d9534ee..a0ee16f 100644
--- a/drivers/scsi/ibmvscsi/ibmvscsi.c
+++ b/drivers/scsi/ibmvscsi/ibmvscsi.c
@@ -95,6 +95,7 @@ static int fast_fail = 1;
 static int client_reserve = 1;
 static char partition_name[97] = "UNKNOWN";
 static unsigned int partition_number = -1;
+static LIST_HEAD(ibmvscsi_head);
 
 static struct scsi_transport_template *ibmvscsi_transport_template;
 
@@ -2270,6 +2271,7 @@ static int ibmvscsi_probe(struct vio_dev *vdev, const struct vio_device_id *id)
 	}
 
 	dev_set_drvdata(&vdev->dev, hostdata);
+	list_add_tail(&hostdata->host_list, &ibmvscsi_head);
 	return 0;
 
       add_srp_port_failed:
@@ -2291,6 +2293,7 @@ static int ibmvscsi_probe(struct vio_dev *vdev, const struct vio_device_id *id)
 static int ibmvscsi_remove(struct vio_dev *vdev)
 {
 	struct ibmvscsi_host_data *hostdata = dev_get_drvdata(&vdev->dev);
+	list_del(&hostdata->host_list);
 	unmap_persist_bufs(hostdata);
 	release_event_pool(&hostdata->pool, hostdata);
 	ibmvscsi_release_crq_queue(&hostdata->queue, hostdata,
diff --git a/drivers/scsi/ibmvscsi/ibmvscsi.h b/drivers/scsi/ibmvscsi/ibmvscsi.h
index e0f6c3a..3a78755 100644
--- a/drivers/scsi/ibmvscsi/ibmvscsi.h
+++ b/drivers/scsi/ibmvscsi/ibmvscsi.h
@@ -90,6 +90,7 @@ struct event_pool {
 
 /* all driver data associated with a host adapter */
 struct ibmvscsi_host_data {
+	struct list_head host_list;
 	atomic_t request_limit;
 	int client_migrated;
 	int reset_crq;
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] ibmvscsi: log bad SRP response opcode in hex format
  2016-12-07 22:04 [PATCH 1/2] ibmvscsi: add vscsi hosts to global list_head Tyrel Datwyler
@ 2016-12-07 22:04 ` Tyrel Datwyler
  2016-12-08  9:04   ` Johannes Thumshirn
  2016-12-08  9:04 ` [PATCH 1/2] ibmvscsi: add vscsi hosts to global list_head Johannes Thumshirn
  2016-12-08 22:03 ` Martin K. Petersen
  2 siblings, 1 reply; 5+ messages in thread
From: Tyrel Datwyler @ 2016-12-07 22:04 UTC (permalink / raw)
  To: james.bottomley
  Cc: martin.petersen, linux-scsi, linuxppc-dev, brking, nfont,
	Tyrel Datwyler

An unrecogonized or unsupported SRP response has its opcode currently
logged in decimal format. Log it in hex format instead so it can easily
be validated against the SRP specs values which are in hex.

Signed-off-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
---
 drivers/scsi/ibmvscsi/ibmvscsi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/ibmvscsi/ibmvscsi.c b/drivers/scsi/ibmvscsi/ibmvscsi.c
index a0ee16f..7752656 100644
--- a/drivers/scsi/ibmvscsi/ibmvscsi.c
+++ b/drivers/scsi/ibmvscsi/ibmvscsi.c
@@ -993,7 +993,7 @@ static void handle_cmd_rsp(struct srp_event_struct *evt_struct)
 	if (unlikely(rsp->opcode != SRP_RSP)) {
 		if (printk_ratelimit())
 			dev_warn(evt_struct->hostdata->dev,
-				 "bad SRP RSP type %d\n", rsp->opcode);
+				 "bad SRP RSP type %#02x\n", rsp->opcode);
 	}
 	
 	if (cmnd) {
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] ibmvscsi: add vscsi hosts to global list_head
  2016-12-07 22:04 [PATCH 1/2] ibmvscsi: add vscsi hosts to global list_head Tyrel Datwyler
  2016-12-07 22:04 ` [PATCH 2/2] ibmvscsi: log bad SRP response opcode in hex format Tyrel Datwyler
@ 2016-12-08  9:04 ` Johannes Thumshirn
  2016-12-08 22:03 ` Martin K. Petersen
  2 siblings, 0 replies; 5+ messages in thread
From: Johannes Thumshirn @ 2016-12-08  9:04 UTC (permalink / raw)
  To: Tyrel Datwyler
  Cc: james.bottomley, martin.petersen, linux-scsi, linuxppc-dev,
	brking, nfont

On Wed, Dec 07, 2016 at 04:04:35PM -0600, Tyrel Datwyler wrote:
> Add each vscsi host adatper to a new global list_head named
> ibmvscsi_head. There is no functional change. This is meant primarily
> as a convience for locating adatpers from within the debugger or crash
> utility.
> 
> Signed-off-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
> ---

Looks good,
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>

-- 
Johannes Thumshirn                                          Storage
jthumshirn@suse.de                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/2] ibmvscsi: log bad SRP response opcode in hex format
  2016-12-07 22:04 ` [PATCH 2/2] ibmvscsi: log bad SRP response opcode in hex format Tyrel Datwyler
@ 2016-12-08  9:04   ` Johannes Thumshirn
  0 siblings, 0 replies; 5+ messages in thread
From: Johannes Thumshirn @ 2016-12-08  9:04 UTC (permalink / raw)
  To: Tyrel Datwyler
  Cc: james.bottomley, martin.petersen, linux-scsi, linuxppc-dev,
	brking, nfont

On Wed, Dec 07, 2016 at 04:04:36PM -0600, Tyrel Datwyler wrote:
> An unrecogonized or unsupported SRP response has its opcode currently
> logged in decimal format. Log it in hex format instead so it can easily
> be validated against the SRP specs values which are in hex.
> 
> Signed-off-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
> ---

Looks good,
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>

-- 
Johannes Thumshirn                                          Storage
jthumshirn@suse.de                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] ibmvscsi: add vscsi hosts to global list_head
  2016-12-07 22:04 [PATCH 1/2] ibmvscsi: add vscsi hosts to global list_head Tyrel Datwyler
  2016-12-07 22:04 ` [PATCH 2/2] ibmvscsi: log bad SRP response opcode in hex format Tyrel Datwyler
  2016-12-08  9:04 ` [PATCH 1/2] ibmvscsi: add vscsi hosts to global list_head Johannes Thumshirn
@ 2016-12-08 22:03 ` Martin K. Petersen
  2 siblings, 0 replies; 5+ messages in thread
From: Martin K. Petersen @ 2016-12-08 22:03 UTC (permalink / raw)
  To: Tyrel Datwyler
  Cc: james.bottomley, martin.petersen, linux-scsi, linuxppc-dev,
	brking, nfont

>>>>> "Tyrel" == Tyrel Datwyler <tyreld@linux.vnet.ibm.com> writes:

Tyrel> Add each vscsi host adatper to a new global list_head named
Tyrel> ibmvscsi_head. There is no functional change. This is meant
Tyrel> primarily as a convience for locating adatpers from within the
Tyrel> debugger or crash utility.

Applied 1+2 to 4.10/scsi-queue.

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-12-08 22:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-07 22:04 [PATCH 1/2] ibmvscsi: add vscsi hosts to global list_head Tyrel Datwyler
2016-12-07 22:04 ` [PATCH 2/2] ibmvscsi: log bad SRP response opcode in hex format Tyrel Datwyler
2016-12-08  9:04   ` Johannes Thumshirn
2016-12-08  9:04 ` [PATCH 1/2] ibmvscsi: add vscsi hosts to global list_head Johannes Thumshirn
2016-12-08 22:03 ` Martin K. Petersen

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).