ipr: Remove ipr_scsi_timed_out
Subsystems (2)
A message that is not in the archive (sent off-list or not yet received): 11641264771784-patch-mail.ibm.com
Brian King
maintainerPATCH 2/10 ipr: Stop issuing cancel all to disk arrays
The ipr disk array devices do not support a cancel all requests primitive, so change the ipr driver to never send it.
---
linux-2.6-bjking1/drivers/scsi/ipr.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/ipr.c renamed from drivers/scsi/ipr.c~ipr_vset_no_cancel +1 -1
@@ -3776,7 +3776,7 @@ static int ipr_cancel_op(struct scsi_cmn*/ if (ioa_cfg->in_reset_reload || ioa_cfg->ioa_is_dead)return FAILED ; -if (!res || (!ipr_is_gscsi (res) && !ipr_is_vset_device (res))) +if (!res || !ipr_is_gscsi (res))return FAILED ;list_for_each_entry (ipr_cmd, &ioa_cfg->pending_q, queue) {
_
Brian King
maintainerPATCH 3/10 ipr: PCI IDs for new SAS adapters
In reply to a message not in the archiveAdds PCI IDs for some new ipr SAS adapters.
---
linux-2.6-bjking1/drivers/scsi/ipr.c | 18 +++++++++++++++++- linux-2.6-bjking1/drivers/scsi/ipr.h | 6 ++++++ 2 files changed, 23 insertions(+), 1 deletion(-)
drivers/scsi/ipr.h renamed from drivers/scsi/ipr.h~ipr_aux_cache_pci_ids +6 -0
@@ -54,6 +54,8 @@*/ #define IPR_NUM_BASE_CMD_BLKS 100 +#define PCI_DEVICE_ID_IBM_OBSIDIAN_E 0x0339 +#define IPR_SUBS_DEV_ID_2780 0x0264#define IPR_SUBS_DEV_ID_5702 0x0266#define IPR_SUBS_DEV_ID_5703 0x0278
@@ -66,7 +68,11 @@#define IPR_SUBS_DEV_ID_571F 0x02D5#define IPR_SUBS_DEV_ID_572A 0x02C1#define IPR_SUBS_DEV_ID_572B 0x02C2 +#define IPR_SUBS_DEV_ID_572F 0x02C3#define IPR_SUBS_DEV_ID_575B 0x030D +#define IPR_SUBS_DEV_ID_575C 0x0338 +#define IPR_SUBS_DEV_ID_57B7 0x0360 +#define IPR_SUBS_DEV_ID_57B8 0x02C2#define IPR_NAME "ipr"
drivers/scsi/ipr.c renamed from drivers/scsi/ipr.c~ipr_aux_cache_pci_ids +17 -1
@@ -98,7 +98,7 @@ static DEFINE_SPINLOCK(ipr_driver_lock);/* This table describes the differences between DMA controller chips */ static const struct ipr_chip_cfg_t ipr_chip_cfg[] = { - {/* Gemstone, Citrine, and Obsidian */ + {/* Gemstone, Citrine, Obsidian, and Obsidian-E */ .mailbox =0x0042C , .cache_line_size =0x20 , {
@@ -135,6 +135,7 @@ static const struct ipr_chip_t ipr_chip[ { PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_CITRINE, &ipr_chip_cfg[0] }, { PCI_VENDOR_ID_ADAPTEC2, PCI_DEVICE_ID_ADAPTEC2_OBSIDIAN, &ipr_chip_cfg[0] }, { PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_OBSIDIAN, &ipr_chip_cfg[0] }, + { PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_OBSIDIAN_E, &ipr_chip_cfg[0] }, { PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_SNIPE, &ipr_chip_cfg[1] }, { PCI_VENDOR_ID_ADAPTEC2, PCI_DEVICE_ID_ADAPTEC2_SCAMP, &ipr_chip_cfg[1] } };
@@ -7363,12 +7364,24 @@ static struct pci_device_id ipr_pci_tabl {PCI_VENDOR_ID_ADAPTEC2 ,PCI_DEVICE_ID_ADAPTEC2_OBSIDIAN ,PCI_VENDOR_ID_IBM ,IPR_SUBS_DEV_ID_572B , 0, 0, (kernel_ulong_t)&ipr_chip_cfg[0] }, + { PCI_VENDOR_ID_ADAPTEC2, PCI_DEVICE_ID_ADAPTEC2_OBSIDIAN, +PCI_VENDOR_ID_IBM ,IPR_SUBS_DEV_ID_575C , + 0, 0, (kernel_ulong_t)&ipr_chip_cfg[0] }, { PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_OBSIDIAN,PCI_VENDOR_ID_IBM ,IPR_SUBS_DEV_ID_572A , 0, 0, (kernel_ulong_t)&ipr_chip_cfg[0] }, { PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_OBSIDIAN,PCI_VENDOR_ID_IBM ,IPR_SUBS_DEV_ID_572B , 0, 0, (kernel_ulong_t)&ipr_chip_cfg[0] }, + { PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_OBSIDIAN, +PCI_VENDOR_ID_IBM ,IPR_SUBS_DEV_ID_575C , + 0, 0, (kernel_ulong_t)&ipr_chip_cfg[0] }, + { PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_OBSIDIAN, +PCI_VENDOR_ID_IBM ,IPR_SUBS_DEV_ID_57B8 , + 0, 0, (kernel_ulong_t)&ipr_chip_cfg[0] }, + { PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_OBSIDIAN_E, +PCI_VENDOR_ID_IBM ,IPR_SUBS_DEV_ID_57B7 , + 0, 0, (kernel_ulong_t)&ipr_chip_cfg[0] }, { PCI_VENDOR_ID_IBM, PCI_DEVICE_ID_IBM_SNIPE,PCI_VENDOR_ID_IBM ,IPR_SUBS_DEV_ID_2780 , 0, 0, (kernel_ulong_t)&ipr_chip_cfg[1] },
@@ -7378,6 +7391,9 @@ static struct pci_device_id ipr_pci_tabl {PCI_VENDOR_ID_ADAPTEC2 ,PCI_DEVICE_ID_ADAPTEC2_SCAMP ,PCI_VENDOR_ID_IBM ,IPR_SUBS_DEV_ID_571F , 0, 0, (kernel_ulong_t)&ipr_chip_cfg[1] }, + { PCI_VENDOR_ID_ADAPTEC2, PCI_DEVICE_ID_ADAPTEC2_SCAMP, +PCI_VENDOR_ID_IBM ,IPR_SUBS_DEV_ID_572F , + 0, 0, (kernel_ulong_t)&ipr_chip_cfg[1] }, { } };MODULE_DEVICE_TABLE (pci, ipr_pci_table);
_
Brian King
maintainerPATCH 4/10 ipr: Set default ipr Kconfig values
In reply to a message not in the archiveBoth SCSI_IPR_TRACE and SCSI_IPR_DUMP should be defaulted to yes when SCSI_IPR is enabled.
---
linux-2.6-bjking1/drivers/scsi/Kconfig | 2 ++ 1 files changed, 2 insertions(+)
drivers/scsi/Kconfig renamed from drivers/scsi/Kconfig~ipr_kconfig_defaults +2 -0
@@ -1026,6 +1026,7 @@ config SCSI_IPR config SCSI_IPR_TRACE bool "enable driver internal trace" depends on SCSI_IPR + default y help If you say Y here, the driver will trace all commands issued to the adapter. Performance impact is minimal. Trace can be
@@ -1034,6 +1035,7 @@ config SCSI_IPR_TRACE config SCSI_IPR_DUMP bool "enable adapter dump support" depends on SCSI_IPR + default y help If you say Y here, the driver will support adapter crash dump. If you enable this support, the iprdump daemon can be used
_
Brian King
maintainerPATCH 5/10 ipr: Remove ipr_scsi_timed_out
In reply to a message not in the archiveRemove ipr's usage of the scsi transport eh_timed_out for handling SATA timeouts. This was only needed in order to set some flags on the qc prior to calling ata_do_eh.
---
linux-2.6-bjking1/drivers/scsi/ipr.c | 40 +++-------------------------------- 1 files changed, 4 insertions(+), 36 deletions(-)
drivers/scsi/ipr.c renamed from drivers/scsi/ipr.c~ipr_sata_no_timed_out +4 -36
@@ -79,7 +79,6 @@#include <scsi/scsi_tcq.h> #include <scsi/scsi_eh.h> #include <scsi/scsi_cmnd.h> -#include <scsi/scsi_transport.h> #include "ipr.h" /*
@@ -3643,6 +3642,10 @@ static int __ipr_eh_dev_reset(struct scsif (ipr_cmd->ioarcb.res_handle == res->cfgte.res_handle) {if (ipr_cmd->scsi_cmd) ipr_cmd->done = ipr_scsi_eh_done; +if (ipr_cmd->qc && !(ipr_cmd->qc->flags &ATA_QCFLAG_FAILED )) { + ipr_cmd->qc->err_mask |=AC_ERR_TIMEOUT ; + ipr_cmd->qc->flags |=ATA_QCFLAG_FAILED ; + } } }
@@ -4655,40 +4658,6 @@ static const char * ipr_ioa_info(structreturn buffer; } -/** -* ipr_scsi_timed_out - Handle scsi command timeout -* @scsi_cmd: scsi command struct -* -* Return value: -* EH_NOT_HANDLED -**/ -enum scsi_eh_timer_return ipr_scsi_timed_out (struct scsi_cmnd *scsi_cmd) -{ -struct ipr_ioa_cfg *ioa_cfg; -struct ipr_cmnd *ipr_cmd; -unsigned long flags; - -ENTER ; -spin_lock_irqsave (scsi_cmd->device->host->host_lock, flags); - ioa_cfg = (struct ipr_ioa_cfg *)scsi_cmd->device->host->hostdata; - -list_for_each_entry (ipr_cmd, &ioa_cfg->pending_q, queue) { -if (ipr_cmd->qc && ipr_cmd->qc->scsicmd == scsi_cmd) { - ipr_cmd->qc->err_mask |=AC_ERR_TIMEOUT ; - ipr_cmd->qc->flags |=ATA_QCFLAG_FAILED ; -break ; - } - } - -spin_unlock_irqrestore (scsi_cmd->device->host->host_lock, flags); -LEAVE ; -return EH_NOT_HANDLED ; -} - -static struct scsi_transport_template ipr_transport_template = { - .eh_timed_out = ipr_scsi_timed_out -}; -static struct scsi_host_template driver_template = { .module =THIS_MODULE , .name ="IPR" ,
@@ -7030,7 +6999,6 @@ static int __devinit ipr_probe_ioa(struc ioa_cfg = (struct ipr_ioa_cfg *)host->hostdata;memset (ioa_cfg,0 ,sizeof (struct ipr_ioa_cfg )); - host->transportt = &ipr_transport_template;ata_host_init (&ioa_cfg->ata_host, &pdev->dev, sata_port_info.flags, &ipr_sata_ops);
_
Brian King
maintainerPATCH 6/10 ipr: Remove debug trace points from dump code
In reply to a message not in the archiveRemove some debug trace points that clutter up the log when ipr debugging is turned on.
---
linux-2.6-bjking1/drivers/scsi/ipr.c | 2 -- 1 files changed, 2 deletions(-)
drivers/scsi/ipr.c renamed from drivers/scsi/ipr.c~ipr_dump_trace +0 -2
@@ -2969,7 +2969,6 @@ static int ipr_alloc_dump(struct ipr_ioastruct ipr_dump *dump;unsigned long lock_flags =0 ; -ENTER ; dump =kzalloc (sizeof (struct ipr_dump ),GFP_KERNEL );if (!dump) {
@@ -2996,7 +2995,6 @@ static int ipr_alloc_dump(struct ipr_ioa }spin_unlock_irqrestore (ioa_cfg->host->host_lock, lock_flags); -LEAVE ;return 0 ; }
_
Brian King
maintainerPATCH 7/10 ipr: Add support for logging SAS fabric errors
In reply to a message not in the archiveAdds support for logging SAS fabric errors logged by the ipr firmware.
---
linux-2.6-bjking1/drivers/scsi/ipr.c | 225 +++++++++++++++++++++++++++++++++-- linux-2.6-bjking1/drivers/scsi/ipr.h | 72 +++++++++++ 2 files changed, 290 insertions(+), 7 deletions(-)
drivers/scsi/ipr.h renamed from drivers/scsi/ipr.h~ipr_sas_fabric_errors +72 -0
@@ -737,6 +737,64 @@ struct ipr_hostrcb_type_17_error {u32 data[476 ]; }__attribute__((packed, aligned (4))); +struct ipr_hostrcb_config_element { +u8 type_status; +#define IPR_PATH_CFG_TYPE_MASK 0xF0 +#define IPR_PATH_CFG_NOT_EXIST 0x00 +#define IPR_PATH_CFG_IOA_PORT 0x10 +#define IPR_PATH_CFG_EXP_PORT 0x20 +#define IPR_PATH_CFG_DEVICE_PORT 0x30 +#define IPR_PATH_CFG_DEVICE_LUN 0x40 + +#define IPR_PATH_CFG_STATUS_MASK 0x0F +#define IPR_PATH_CFG_NO_PROB 0x00 +#define IPR_PATH_CFG_DEGRADED 0x01 +#define IPR_PATH_CFG_FAILED 0x02 +#define IPR_PATH_CFG_SUSPECT 0x03 +#define IPR_PATH_NOT_DETECTED 0x04 +#define IPR_PATH_INCORRECT_CONN 0x05 + +u8 cascaded_expander; +u8 phy; +u8 link_rate; +#define IPR_PHY_LINK_RATE_MASK 0x0F + +__be32 wwid[2 ]; +}__attribute__((packed,aligned (4 ))); + +struct ipr_hostrcb_fabric_desc { +__be16 length; +u8 ioa_port; +u8 cascaded_expander; +u8 phy; +u8 path_state; +#define IPR_PATH_ACTIVE_MASK 0xC0 +#define IPR_PATH_NO_INFO 0x00 +#define IPR_PATH_ACTIVE 0x40 +#define IPR_PATH_NOT_ACTIVE 0x80 + +#define IPR_PATH_STATE_MASK 0x0F +#define IPR_PATH_STATE_NO_INFO 0x00 +#define IPR_PATH_HEALTHY 0x01 +#define IPR_PATH_DEGRADED 0x02 +#define IPR_PATH_FAILED 0x03 + +__be16 num_entries; +struct ipr_hostrcb_config_element elem[1 ]; +}__attribute__((packed,aligned (4 ))); + +#define for_each_fabric_cfg (fabric, cfg) \ + for (cfg = (fabric)->elem; \ + cfg < ((fabric)->elem + be16_to_cpu((fabric)->num_entries)); \ + cfg++) + +struct ipr_hostrcb_type_20_error { +u8 failure_reason[64 ]; +u8 reserved[3 ]; +u8 num_entries; +struct ipr_hostrcb_fabric_desc desc[1 ]; +}__attribute__((packed,aligned (4 ))); +struct ipr_hostrcb_error {__be32 failing_dev_ioasc;struct ipr_res_addr failing_dev_res_addr;
@@ -753,6 +811,7 @@ struct ipr_hostrcb_error {struct ipr_hostrcb_type_13_error type_13_error;struct ipr_hostrcb_type_14_error type_14_error;struct ipr_hostrcb_type_17_error type_17_error; +struct ipr_hostrcb_type_20_error type_20_error; } u; }__attribute__((packed, aligned (4)));
@@ -792,6 +851,7 @@ struct ipr_hcam {#define IPR_HOST_RCB_OVERLAY_ID_14 0x14#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_DEFAULT 0xFFu8 reserved1[3 ];
@@ -811,6 +871,7 @@ struct ipr_hostrcb {struct ipr_hcam hcam;dma_addr_t hostrcb_dma;struct list_head queue; +struct ipr_ioa_cfg *ioa_cfg; };/* IPR smart dump table structures */
@@ -1289,6 +1350,17 @@ struct ipr_ucode_image_header { } \ } +#define ipr_hcam_err (hostrcb, fmt, ...) \ +{ \ + if (ipr_is_device(&(hostrcb)->hcam.u.error.failing_dev_res_addr)) { \ + ipr_ra_err((hostrcb)->ioa_cfg, \ + (hostrcb)->hcam.u.error.failing_dev_res_addr, \ + fmt, ##__VA_ARGS__); \ + } else { \ + dev_err(&(hostrcb)->ioa_cfg->pdev->dev, fmt, ##__VA_ARGS__); \ + } \ +} +#define ipr_trace ipr_dbg("%s: %s: Line: %d\n",\ __FILE__, __FUNCTION__, __LINE__)
drivers/scsi/ipr.c renamed from drivers/scsi/ipr.c~ipr_sas_fabric_errors +218 -7
249 lines not on this page · raw message
_
Brian King
maintainerPATCH 8/10 ipr: Reduce default error log size
In reply to a message not in the archiveSince the default error log size has increased on SAS adapters, prevent ipr from logging this additional data unless requested to do so by the user set log level in order to prevent flooding the logs.
---
linux-2.6-bjking1/drivers/scsi/ipr.c | 14 +++++++++----- linux-2.6-bjking1/drivers/scsi/ipr.h | 1 + 2 files changed, 10 insertions(+), 5 deletions(-)
drivers/scsi/ipr.c renamed from drivers/scsi/ipr.c~ipr_reduce_error_log_size +9 -5
@@ -1249,19 +1249,23 @@ static void ipr_log_array_error(struct i/** * ipr_log_hex_data - Log additional hex IOA error data. +* @ioa_cfg: ioa config struct * @data: IOA error data * @len: data length * * Return value: * none **/ -static void ipr_log_hex_data (u32 *data,int len) +static void ipr_log_hex_data (struct ipr_ioa_cfg *ioa_cfg,u32 *data,int len) {int i;if (len ==0 )return ; +if (ioa_cfg->log_level <=IPR_DEFAULT_LOG_LEVEL ) + len =min_t (int, len,IPR_DEFAULT_MAX_ERROR_DUMP ); +for (i =0 ; i < len /4 ; i +=4 ) { ipr_err("%08X: %08X %08X %08X %08X\n", i*4, be32_to_cpu(data[i]),
@@ -1290,7 +1294,7 @@ static void ipr_log_enhanced_dual_ioa_eripr_err ("%s\n" , error->failure_reason);ipr_err ("Remote Adapter VPD:\n" );ipr_log_ext_vpd (&error->vpd); -ipr_log_hex_data (error->data, +ipr_log_hex_data (ioa_cfg, error->data,be32_to_cpu (hostrcb->hcam.length) - (offsetof(struct ipr_hostrcb_error , u) + offsetof(struct ipr_hostrcb_type_17_error , data)));
@@ -1315,7 +1319,7 @@ static void ipr_log_dual_ioa_error(strucipr_err ("%s\n" , error->failure_reason);ipr_err ("Remote Adapter VPD:\n" );ipr_log_vpd (&error->vpd); -ipr_log_hex_data (error->data, +ipr_log_hex_data (ioa_cfg, error->data,be32_to_cpu (hostrcb->hcam.length) - (offsetof(struct ipr_hostrcb_error , u) + offsetof(struct ipr_hostrcb_type_07_error , data)));
@@ -1531,7 +1535,7 @@ static void ipr_log_fabric_error(struct ((unsigned long )fabric +be16_to_cpu (fabric->length)); } -ipr_log_hex_data ((u32 *)fabric, add_len); +ipr_log_hex_data (ioa_cfg, (u32 *)fabric, add_len); }/**
@@ -1545,7 +1549,7 @@ static void ipr_log_fabric_error(structstatic void ipr_log_generic_error (struct ipr_ioa_cfg *ioa_cfg,struct ipr_hostrcb *hostrcb) { -ipr_log_hex_data (hostrcb->hcam.u.raw.data, +ipr_log_hex_data (ioa_cfg, hostrcb->hcam.u.raw.data,be32_to_cpu (hostrcb->hcam.length)); }
drivers/scsi/ipr.h renamed from drivers/scsi/ipr.h~ipr_reduce_error_log_size +1 -0
@@ -104,6 +104,7 @@#define IPR_IOASC_IOA_WAS_RESET 0x10000001#define IPR_IOASC_PCI_ACCESS_ERROR 0x10000002 +#define IPR_DEFAULT_MAX_ERROR_DUMP 984#define IPR_NUM_LOG_HCAMS 2#define IPR_NUM_CFG_CHG_HCAMS 2#define IPR_NUM_HCAMS (IPR_NUM_LOG_HCAMS + IPR_NUM_CFG_CHG_HCAMS)
_
Brian King
maintainerPATCH 9/10 ipr: Make ipr_ioctl static
In reply to a message not in the archiveFrom: Adrian Bunk <[email protected]>
This patch makes ipr_ioctl static.
---
linux-2.6-bjking1/drivers/scsi/ipr.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/ipr.c renamed from drivers/scsi/ipr.c~ipr_static_ioctl +1 -1
@@ -4837,7 +4837,7 @@ static int ipr_queuecommand(struct scsi_* Return value: * 0 on success / other on failure **/ -int ipr_ioctl (struct scsi_device *sdev,int cmd,void __user *arg) +static int ipr_ioctl (struct scsi_device *sdev,int cmd,void __user *arg) {struct ipr_resource_entry *res;
_
Brian King
maintainerPATCH 10/10 ipr: Driver version 2.3.0
In reply to a message not in the archiveBump driver version.
---
linux-2.6-bjking1/drivers/scsi/ipr.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/scsi/ipr.h renamed from drivers/scsi/ipr.h~ipr_driver_version_2_3_0 +2 -2
@@ -37,8 +37,8 @@/* * Literals */ -#define IPR_DRIVER_VERSION "2.2.0" -#define IPR_DRIVER_DATE "(September 25, 2006)" +#define IPR_DRIVER_VERSION "2.3.0" +#define IPR_DRIVER_DATE "(November 8, 2006)"/* * IPR_MAX_CMD_PER_LUN: This defines the maximum number of outstanding
_