New CCINs and several patches for new improvement
Subsystems (2)
cover New CCINs and several patches for new improvement
Hi James,
I re-submitted the following patches for ipr device driver. I have re-tested these patches with our latest adapters.
These patches are:
(1)Remove extended delay bit on GSCSI reads/writes ops. (2)Add new device id to support Z06 LTD new adapter. (3)Handle early EEH.
Above 3 patches were submitted on 1/21.
(4)Get rid of superfluous call to pci_disable_msi/msix() (5)Use pci_enable_msi_range()/pci_enable_msix_range() Above 2 patches were submiited by Alexander Gordeev
(6)Format HACM overlay ID 0x21.
(7)Add new device id to support Grand Canyon adapters. Above patches were submitted on 2/15/2014
Let me know if you have questions about this.
Thanks for your help!
Wendy
PATCH RESEND 1/7 ipr: Remove extended delay bit on GSCSI reads/writes ops
This patch removes extended delay bit on GSCSI reads/writes ops, the performance will be significanly better.
--- drivers/scsi/ipr.c | 6 +++++- drivers/scsi/ipr.h | 1 + 2 files changed, 6 insertions(+), 1 deletion(-)
drivers/scsi/ipr.c +5 -1
@@ -1143,6 +1143,7 @@ static void ipr_init_res_entry(struct ip res->add_to_ml =0 ; res->del_from_ml =0 ; res->resetting_device =0 ; + res->reset_occurred =0 ; res->sdev =NULL ; res->sata_port =NULL ;
@@ -5015,6 +5016,7 @@ static int __ipr_eh_dev_reset(struct scs }else rc =ipr_device_reset (ioa_cfg, res); res->resetting_device =0 ; + res->reset_occurred =1 ;LEAVE ;return rc ?FAILED :SUCCESS ;
@@ -6183,8 +6185,10 @@ static int ipr_queuecommand(struct Scsi_ ioarcb->cmd_pkt.flags_hi |=IPR_FLAGS_HI_NO_ULEN_CHK ; ioarcb->cmd_pkt.flags_hi |=IPR_FLAGS_HI_NO_LINK_DESC ; -if (ipr_is_gscsi (res)) +if (ipr_is_gscsi (res) && res->reset_occurred) { + res->reset_occurred =0 ; ioarcb->cmd_pkt.flags_lo |=IPR_FLAGS_LO_DELAY_AFTER_RST ; + } ioarcb->cmd_pkt.flags_lo |=IPR_FLAGS_LO_ALIGNED_BFR ; ioarcb->cmd_pkt.flags_lo |=ipr_get_task_attributes (scsi_cmd); }
drivers/scsi/ipr.h +1 -0
@@ -1252,6 +1252,7 @@ struct ipr_resource_entry { u8 add_to_ml:1; u8 del_from_ml:1; u8 resetting_device:1; + u8 reset_occurred:1;u32 bus;/* AKA channel */ u32 target;/* AKA id */
Re: [PATCH RESEND 1/7] ipr: Remove extended delay bit on GSCSI reads/writes ops
Ack patches 1-7
Signature · 3 lines
Brian King Power Linux I/O IBM Linux Technology Center
PATCH RESEND 2/7 ipr: Add new CCIN definition for new hardware support
In reply to [email protected]Add the appropriate definition and table entry for new hardware support.
--- drivers/scsi/ipr.c | 2 ++ drivers/scsi/ipr.h | 1 + 2 files changed, 3 insertions(+)
drivers/scsi/ipr.c +2 -0
@@ -9998,6 +9998,8 @@ static struct pci_device_id ipr_pci_tabl {PCI_VENDOR_ID_IBM ,PCI_DEVICE_ID_IBM_CROCODILE , PCI_VENDOR_ID_IBM, IPR_SUBS_DEV_ID_57D9, 0, 0, 0 }, { PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_CROCODILE, + PCI_VENDOR_ID_IBM, IPR_SUBS_DEV_ID_57DA, 0, 0, 0 }, + { PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_CROCODILE, PCI_VENDOR_ID_IBM, IPR_SUBS_DEV_ID_57EB, 0, 0, 0 }, { PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_CROCODILE, PCI_VENDOR_ID_IBM, IPR_SUBS_DEV_ID_57EC, 0, 0, 0 },
drivers/scsi/ipr.h +1 -0
@@ -101,6 +101,7 @@#define IPR_SUBS_DEV_ID_57D7 0x03FF#define IPR_SUBS_DEV_ID_57D8 0x03FE#define IPR_SUBS_DEV_ID_57D9 0x046D +#define IPR_SUBS_DEV_ID_57DA 0x04CA#define IPR_SUBS_DEV_ID_57EB 0x0474#define IPR_SUBS_DEV_ID_57EC 0x0475#define IPR_SUBS_DEV_ID_57ED 0x0499
PATCH RESEND 3/7 ipr: Handle early EEH
In reply to [email protected]From: Brian King <[email protected]>
If, when the ipr driver loads, the adapter is in an EEH error state, it will currently oops and not be able to recover, as it attempts to access memory that has not yet been allocated. We've seen this occur in some kexec scenarios. The following patch fixes the oops and also allows the driver to recover from these probe time EEH errors.
---
drivers/scsi/ipr.c | 265 +++++++++++++++++++++++++++++++++++------------------ drivers/scsi/ipr.h | 3 2 files changed, 179 insertions(+), 89 deletions(-)
drivers/scsi/ipr.h +3 -0
@@ -231,6 +231,7 @@#define IPR_WAIT_FOR_RESET_TIMEOUT (2 * HZ)#define IPR_CHECK_FOR_RESET_TIMEOUT (HZ / 10)#define IPR_WAIT_FOR_BIST_TIMEOUT (2 * HZ) +#define IPR_PCI_ERROR_RECOVERY_TIMEOUT (120 * HZ)#define IPR_PCI_RESET_TIMEOUT (HZ / 2)#define IPR_SIS32_DUMP_TIMEOUT (15 * HZ)#define IPR_SIS64_DUMP_TIMEOUT (40 * HZ)
@@ -1443,6 +1444,7 @@ struct ipr_ioa_cfg { u8 dump_timeout:1; u8 cfg_locked:1; u8 clear_isr:1; + u8 probe_done:1;u8 revid;
@@ -1521,6 +1523,7 @@ struct ipr_ioa_cfg {wait_queue_head_t reset_wait_q;wait_queue_head_t msi_wait_q; +wait_queue_head_t eeh_wait_q;struct ipr_dump *dump;enum ipr_sdt_state sdt_state;
drivers/scsi/ipr.c +176 -89
463 lines not on this page · raw message
PATCH RESEND 4/7 ipr: Get rid of superfluous call to pci_disbale_msi/msix()
In reply to [email protected]From: Alexander Gordeev <[email protected]>
There is no need to call pci_disable_msi() or pci_disable_msix() in case the call to pci_enable_msi() or pci_enable_msix() failed.
--- drivers/scsi/ipr.c | 2 -- 1 file changed, 2 deletions(-)
drivers/scsi/ipr.c +0 -2
@@ -9329,7 +9329,6 @@ static int ipr_enable_msix(struct ipr_ioif (err <0 ) {ipr_wait_for_pci_err_recovery (ioa_cfg); -pci_disable_msix (ioa_cfg->pdev);return err; }
@@ -9353,7 +9352,6 @@ static int ipr_enable_msi(struct ipr_ioaif (err <0 ) {ipr_wait_for_pci_err_recovery (ioa_cfg); -pci_disable_msi (ioa_cfg->pdev);return err; }
James Bottomley
maintainerRe: [PATCH RESEND 4/7] ipr: Get rid of superfluous call to pci_disbale_msi/msix()
Quoted 8 lines · On Wed, 2014-03-12 at 16:08 -0500, [email protected] wrote:
From: Alexander Gordeev <[email protected]>
There is no need to call
pci_disable_msi()orpci_disable_msix()in case the call topci_enable_msi()orpci_enable_msix()failed.Signed-off-by Alexander Gordeev <[email protected]>Acked-by Brian King <[email protected]>---
This needs a Signed-off-by: from you as well, since you transmitted the patch to me. I assume it was just omitted in error and have added it in the git repository.
James
Re: [PATCH RESEND 4/7] ipr: Get rid of superfluous call to pci_disbale_msi/msix()
Quoted 6 lines · James Bottomley
Quoted 5 lines · On Wed, 2014-03-12 at 16:08 -0500, [email protected] wrote:
From: Alexander Gordeev <[email protected]>
There is no need to call
pci_disable_msi()orpci_disable_msix()in case the call topci_enable_msi()orpci_enable_msix()failed.
Quoted 7 lines
Quoted 3 lines
Signed-off-by Alexander Gordeev <[email protected]>Acked-by Brian King <[email protected]>---
This needs a Signed-off-by: from you as well, since you transmitted the patch to me. I assume it was just omitted in error and have added it in the git repository.
Correcting Wendy's email address...
-Brian
Signature · 3 lines
Brian King Power Linux I/O IBM Linux Technology Center
James Bottomley
maintainerRe: [PATCH RESEND 4/7] ipr: Get rid of superfluous call to pci_disbale_msi/msix()
Quoted 11 lines · Brian King
Quoted 10 lines · James Bottomley
Quoted 8 lines · On Wed, 2014-03-12 at 16:08 -0500, [email protected] wrote:
From: Alexander Gordeev <[email protected]>
There is no need to call
pci_disable_msi()orpci_disable_msix()in case the call topci_enable_msi()orpci_enable_msix()failed.Signed-off-by Alexander Gordeev <[email protected]>Acked-by Brian King <[email protected]>---
Quoted 5 lines
Quoted 3 lines
This needs a Signed-off-by: from you as well, since you transmitted the patch to me. I assume it was just omitted in error and have added it in the git repository.
Correcting Wendy's email address...
Humf, that means it's wrong in the Author field of the git commits too ... please fix whatever script is sending the wrong email address.
Thanks,
James
PATCH RESEND 5/7 ipr: Use pci_enable_msi_range() and pci_enable_msix_range()
In reply to [email protected]From: Alexander Gordeev <[email protected]>
As result deprecation of MSI-X/MSI enablement functions pci_enable_msix() and pci_enable_msi_block() all drivers using these two interfaces need to be updated to use the new pci_enable_msi_range() and pci_enable_msix_range() interfaces.
--- drivers/scsi/ipr.c | 47 ++++++++++++++++++----------------------------- 1 file changed, 18 insertions(+), 29 deletions(-)
drivers/scsi/ipr.c +18 -29
@@ -9317,51 +9317,40 @@ static void ipr_wait_for_pci_err_recoverstatic int ipr_enable_msix (struct ipr_ioa_cfg *ioa_cfg) {struct msix_entry entries[IPR_MAX_MSIX_VECTORS ]; -int i, err, vectors; +int i, vectors;for (i =0 ; i <ARRAY_SIZE (entries); ++i) entries[i].entry = i; - vectors = ipr_number_of_msix; - -while ((err =pci_enable_msix (ioa_cfg->pdev, entries, vectors)) >0 ) - vectors = err; - -if (err <0 ) { + vectors =pci_enable_msix_range (ioa_cfg->pdev, + entries,1 , ipr_number_of_msix); +if (vectors <0 ) {ipr_wait_for_pci_err_recovery (ioa_cfg); -return err; +return vectors; } -if (!err) { -for (i =0 ; i < vectors; i++) - ioa_cfg->vectors_info[i].vec = entries[i].vector; - ioa_cfg->nvectors = vectors; - } +for (i =0 ; i < vectors; i++) + ioa_cfg->vectors_info[i].vec = entries[i].vector; + ioa_cfg->nvectors = vectors; -return err; +return 0 ; }static int ipr_enable_msi (struct ipr_ioa_cfg *ioa_cfg) { -int i, err, vectors; +int i, vectors; - vectors = ipr_number_of_msix; - -while ((err =pci_enable_msi_block (ioa_cfg->pdev, vectors)) >0 ) - vectors = err; - -if (err <0 ) { + vectors =pci_enable_msi_range (ioa_cfg->pdev,1 , ipr_number_of_msix); +if (vectors <0 ) {ipr_wait_for_pci_err_recovery (ioa_cfg); -return err; +return vectors; } -if (!err) { -for (i =0 ; i < vectors; i++) - ioa_cfg->vectors_info[i].vec = ioa_cfg->pdev->irq + i; - ioa_cfg->nvectors = vectors; - } +for (i =0 ; i < vectors; i++) + ioa_cfg->vectors_info[i].vec = ioa_cfg->pdev->irq + i; + ioa_cfg->nvectors = vectors; -return err; +return 0 ; }static void name_msi_vectors (struct ipr_ioa_cfg *ioa_cfg)
@@ -9426,7 +9415,7 @@ static irqreturn_t ipr_test_intr(int irq* ipr_test_msi - Test for Message Signaled Interrupt (MSI) support. * @pdev: PCI device struct * -* Description: The return value from pci_enable_msi() can not always be +* Description: The return value from pci_enable_msi_range() can not always be * trusted. This routine sets up and initiates a test interrupt to determine * if the interrupt is received via the ipr_test_intr() service routine. * If the tests fails, the driver will fall back to LSI.
PATCH RESEND 6/7 ipr: Format HCAM overlay ID 0x21
In reply to [email protected]This patch adds formatting error overlay 0x21 to improve debug capabilities.
--- drivers/scsi/ipr.c | 39 +++++++++++++++++++++++++++++++++++++++ drivers/scsi/ipr.h | 14 ++++++++++++++ 2 files changed, 53 insertions(+)
drivers/scsi/ipr.c +39 -0
@@ -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 icase 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 ;
drivers/scsi/ipr.h +14 -0
@@ -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
PATCH RESEND 7/7 ipr: Add new CCIN definition for Grand Canyon support
In reply to [email protected]Add the appropriate definition and table entry for new hardware support.
--- drivers/scsi/ipr.c | 6 ++++++ drivers/scsi/ipr.h | 3 +++ 2 files changed, 9 insertions(+)
drivers/scsi/ipr.c +6 -0
@@ -10123,6 +10123,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);
drivers/scsi/ipr.h +3 -0
@@ -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"/*