public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Formatting overlay 0x21 and new CCINs
@ 2014-02-25  1:17 wenxiong
  2014-02-25  1:17 ` [PATCH 1/2] ipr: Format HCAM overlay ID 0x21 wenxiong
  2014-02-25  1:18 ` [PATCH 2/2] ipr: Add new CCIN definition for new hardware support wenxiong
  0 siblings, 2 replies; 5+ messages in thread
From: wenxiong @ 2014-02-25  1:17 UTC (permalink / raw)
  To: James.Bottomley; +Cc: linux-scsi, bjking1

This patch series included formatting overlay 0x21 and adding three more new 
CCINs for new hardware.

Thanks,
Wendy
-- 

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

* [PATCH 1/2] ipr: Format HCAM overlay ID 0x21
  2014-02-25  1:17 [PATCH 0/2] Formatting overlay 0x21 and new CCINs wenxiong
@ 2014-02-25  1:17 ` wenxiong
  2014-02-26 14:59   ` Brian King
  2014-02-25  1:18 ` [PATCH 2/2] ipr: Add new CCIN definition for new hardware support wenxiong
  1 sibling, 1 reply; 5+ messages in thread
From: wenxiong @ 2014-02-25  1:17 UTC (permalink / raw)
  To: James.Bottomley; +Cc: linux-scsi, bjking1, Wen Xiong

[-- Attachment #1: overlay_21 --]
[-- Type: text/plain, Size: 3897 bytes --]

This patch adds formatting error overlay 0x21 to improve debug capabilities.

Signed-off-by: Wen Xiong <wenxiong@linux.vnet.ibm.com>

---
 drivers/scsi/ipr.c |   39 +++++++++++++++++++++++++++++++++++++++
 drivers/scsi/ipr.h |   14 ++++++++++++++
 2 files changed, 53 insertions(+)

Index: b/drivers/scsi/ipr.c
===================================================================
--- a/drivers/scsi/ipr.c	2014-02-24 18:03:37.067766338 -0600
+++ b/drivers/scsi/ipr.c	2014-02-24 18:12:49.618706961 -0600
@@ -2368,6 +2368,42 @@ static void ipr_log_generic_error(struct
 }
 
 /**
+ * ipr_log_sis64_device_error - Log a cache error.
+ * @ioa_cfg:	ioa config struct
+ * @hostrcb:	hostrcb struct
+ *
+ * Return value:
+ * 	none
+ **/
+static void ipr_log_sis64_device_error(struct ipr_ioa_cfg *ioa_cfg,
+					 struct ipr_hostrcb *hostrcb)
+{
+	struct ipr_hostrcb_type_21_error *error;
+	char buffer[IPR_MAX_RES_PATH_LENGTH];
+
+	error = &hostrcb->hcam.u.error64.u.type_21_error;
+
+	ipr_err("-----Failing Device Information-----\n");
+	ipr_err("World Wide Unique ID: %08X%08X%08X%08X\n",
+		be32_to_cpu(error->wwn[0]), be32_to_cpu(error->wwn[1]),
+		 be32_to_cpu(error->wwn[2]), be32_to_cpu(error->wwn[3]));
+	ipr_err("Device Resource Path: %s\n",
+		__ipr_format_res_path(error->res_path,
+				      buffer, sizeof(buffer)));
+	error->primary_problem_desc[sizeof(error->primary_problem_desc) - 1] = '\0';
+	error->second_problem_desc[sizeof(error->second_problem_desc) - 1] = '\0';
+	ipr_err("Primary Problem Description: %s\n", error->primary_problem_desc);
+	ipr_err("Secondary Problem Description:  %s\n", error->second_problem_desc);
+	ipr_err("SCSI Sense Data: \n");
+	ipr_log_hex_data(ioa_cfg, error->sense_data, sizeof(error->sense_data));
+	ipr_err("SCSI Command Descriptor Block: \n");
+	ipr_log_hex_data(ioa_cfg, error->cdb, sizeof(error->cdb));
+
+	ipr_err("Additional IOA Data: \n");
+	ipr_log_hex_data(ioa_cfg, error->ioa_data, be32_to_cpu(error->length_of_error));
+}
+
+/**
  * ipr_get_error - Find the specfied IOASC in the ipr_error_table.
  * @ioasc:	IOASC
  *
@@ -2468,6 +2504,9 @@ static void ipr_handle_log_data(struct i
 	case IPR_HOST_RCB_OVERLAY_ID_20:
 		ipr_log_fabric_error(ioa_cfg, hostrcb);
 		break;
+	case IPR_HOST_RCB_OVERLAY_ID_21:
+		ipr_log_sis64_device_error(ioa_cfg, hostrcb);
+		break;
 	case IPR_HOST_RCB_OVERLAY_ID_23:
 		ipr_log_sis64_config_error(ioa_cfg, hostrcb);
 		break;
Index: b/drivers/scsi/ipr.h
===================================================================
--- a/drivers/scsi/ipr.h	2014-02-24 18:03:41.047453018 -0600
+++ b/drivers/scsi/ipr.h	2014-02-24 18:12:49.618706961 -0600
@@ -899,6 +899,18 @@ struct ipr_hostrcb_type_01_error {
 	__be32 ioa_data[236];
 }__attribute__((packed, aligned (4)));
 
+struct ipr_hostrcb_type_21_error {
+	__be32 wwn[4];
+	u8 res_path[8];
+	u8 primary_problem_desc[32];
+	u8 second_problem_desc[32];
+	__be32 sense_data[8];
+	__be32 cdb[4];
+	__be32 residual_trans_length;
+	__be32 length_of_error;
+	__be32 ioa_data[236];
+}__attribute__((packed, aligned (4)));
+
 struct ipr_hostrcb_type_02_error {
 	struct ipr_vpd ioa_vpd;
 	struct ipr_vpd cfc_vpd;
@@ -1128,6 +1140,7 @@ struct ipr_hostrcb64_error {
 		struct ipr_hostrcb_type_ff_error type_ff_error;
 		struct ipr_hostrcb_type_12_error type_12_error;
 		struct ipr_hostrcb_type_17_error type_17_error;
+		struct ipr_hostrcb_type_21_error type_21_error;
 		struct ipr_hostrcb_type_23_error type_23_error;
 		struct ipr_hostrcb_type_24_error type_24_error;
 		struct ipr_hostrcb_type_30_error type_30_error;
@@ -1171,6 +1184,7 @@ struct ipr_hcam {
 #define IPR_HOST_RCB_OVERLAY_ID_16				0x16
 #define IPR_HOST_RCB_OVERLAY_ID_17				0x17
 #define IPR_HOST_RCB_OVERLAY_ID_20				0x20
+#define IPR_HOST_RCB_OVERLAY_ID_21				0x21
 #define IPR_HOST_RCB_OVERLAY_ID_23				0x23
 #define IPR_HOST_RCB_OVERLAY_ID_24				0x24
 #define IPR_HOST_RCB_OVERLAY_ID_26				0x26

-- 

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

* [PATCH 2/2] ipr: Add new CCIN definition for new hardware support
  2014-02-25  1:17 [PATCH 0/2] Formatting overlay 0x21 and new CCINs wenxiong
  2014-02-25  1:17 ` [PATCH 1/2] ipr: Format HCAM overlay ID 0x21 wenxiong
@ 2014-02-25  1:18 ` wenxiong
  2014-02-26 15:00   ` Brian King
  1 sibling, 1 reply; 5+ messages in thread
From: wenxiong @ 2014-02-25  1:18 UTC (permalink / raw)
  To: James.Bottomley; +Cc: linux-scsi, bjking1, Wen Xiong

[-- Attachment #1: grand_canyon_id --]
[-- Type: text/plain, Size: 1560 bytes --]

Add the appropriate definition and table entry for new hardware support.

Signed-off-by: Wen Xiong <wenxiong@linux.vnet.ibm.com>

---
 drivers/scsi/ipr.c |    6 ++++++
 drivers/scsi/ipr.h |    3 +++
 2 files changed, 9 insertions(+)

Index: b/drivers/scsi/ipr.c
===================================================================
--- a/drivers/scsi/ipr.c	2014-02-24 18:12:49.618706961 -0600
+++ b/drivers/scsi/ipr.c	2014-02-24 18:14:04.059956190 -0600
@@ -10136,6 +10136,12 @@ static struct pci_device_id ipr_pci_tabl
 		PCI_VENDOR_ID_IBM, IPR_SUBS_DEV_ID_57EF, 0, 0, 0 },
 	{ PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_CROCODILE,
 		PCI_VENDOR_ID_IBM, IPR_SUBS_DEV_ID_57F0, 0, 0, 0 },
+	{ PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_CROCODILE,
+		PCI_VENDOR_ID_IBM, IPR_SUBS_DEV_ID_2CCA, 0, 0, 0 },
+	{ PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_CROCODILE,
+		PCI_VENDOR_ID_IBM, IPR_SUBS_DEV_ID_2CD2, 0, 0, 0 },
+	{ PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_CROCODILE,
+		PCI_VENDOR_ID_IBM, IPR_SUBS_DEV_ID_2CCD, 0, 0, 0 },
 	{ }
 };
 MODULE_DEVICE_TABLE(pci, ipr_pci_table);
Index: b/drivers/scsi/ipr.h
===================================================================
--- a/drivers/scsi/ipr.h	2014-02-24 18:12:49.618706961 -0600
+++ b/drivers/scsi/ipr.h	2014-02-24 18:14:04.059956190 -0600
@@ -108,6 +108,9 @@
 #define IPR_SUBS_DEV_ID_57EE    0x049A
 #define IPR_SUBS_DEV_ID_57EF    0x049B
 #define IPR_SUBS_DEV_ID_57F0    0x049C
+#define IPR_SUBS_DEV_ID_2CCA	0x04C7
+#define IPR_SUBS_DEV_ID_2CD2	0x04C8
+#define IPR_SUBS_DEV_ID_2CCD	0x04C9
 #define IPR_NAME				"ipr"
 
 /*

-- 

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

* Re: [PATCH 1/2] ipr: Format HCAM overlay ID 0x21
  2014-02-25  1:17 ` [PATCH 1/2] ipr: Format HCAM overlay ID 0x21 wenxiong
@ 2014-02-26 14:59   ` Brian King
  0 siblings, 0 replies; 5+ messages in thread
From: Brian King @ 2014-02-26 14:59 UTC (permalink / raw)
  To: Wen Xiong; +Cc: James.Bottomley, linux-scsi

Acked-by: Brian King <brking@linux.vnet.ibm.com>

-- 
Brian King
Power Linux I/O
IBM Linux Technology Center



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

* Re: [PATCH 2/2] ipr: Add new CCIN definition for new hardware support
  2014-02-25  1:18 ` [PATCH 2/2] ipr: Add new CCIN definition for new hardware support wenxiong
@ 2014-02-26 15:00   ` Brian King
  0 siblings, 0 replies; 5+ messages in thread
From: Brian King @ 2014-02-26 15:00 UTC (permalink / raw)
  To: Wen Xiong; +Cc: James.Bottomley, linux-scsi

Acked-by: Brian King <brking@linux.vnet.ibm.com>

-- 
Brian King
Power Linux I/O
IBM Linux Technology Center



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

end of thread, other threads:[~2014-02-26 15:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-25  1:17 [PATCH 0/2] Formatting overlay 0x21 and new CCINs wenxiong
2014-02-25  1:17 ` [PATCH 1/2] ipr: Format HCAM overlay ID 0x21 wenxiong
2014-02-26 14:59   ` Brian King
2014-02-25  1:18 ` [PATCH 2/2] ipr: Add new CCIN definition for new hardware support wenxiong
2014-02-26 15:00   ` Brian King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox