SCSI fixes for 2.6.38-rc3
Subsystems (2)
This is a set of misc fixes; mostly in mpt2sas, although there's a SCSI scatterlist compile issue and a fix to the libsas error handler as well.
The patch is available here:
master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6.git
The short change log is:
David Dillow (1):
fix incorrect value of SCSI_MAX_SG_CHAIN_SEGMENTS due to include file ordering
James Bottomley (1):
libsas: fix runaway error handler problem
Kashyap, Desai (6):
mpt2sas: fix Integrated Raid unsynced on shutdown problem
mpt2sas: Kernel Panic during Large Topology discovery
mpt2sas: Fix the race between broadcast asyn event and scsi command completion
mpt2sas: Correct resizing calculation for max_queue_depth
mpt2sas: fix internal device reset for older firmware prior to MPI Rev K
mpt2sas: Fix device removal handshake for zoned devices
NickCheng (1):
arcmsr: Fix the issue of system hangup after commands timeout on ARC-1200
and the diffstat:
drivers/scsi/arcmsr/arcmsr.h | 11 ++- drivers/scsi/arcmsr/arcmsr_attr.c | 2 +- drivers/scsi/arcmsr/arcmsr_hba.c | 114 ++++++++++++---------------------- drivers/scsi/libsas/sas_scsi_host.c | 1 + drivers/scsi/mpt2sas/mpt2sas_base.c | 19 ++++-- drivers/scsi/mpt2sas/mpt2sas_scsih.c | 64 +++++++++++++++---- include/scsi/scsi.h | 1 + 7 files changed, 117 insertions(+), 95 deletions(-)
The full diff is below.
James
---
drivers/scsi/arcmsr/arcmsr.h +7 -4
@@ -2,7 +2,7 @@ ******************************************************************************* ** O.S : Linux ** FILE NAME : arcmsr.h -** BY : Erich Chen +** BY : Nick Cheng ** Description: SCSI RAID Device Driver for ** ARECA RAID Host adapter *******************************************************************************
@@ -46,8 +46,12 @@struct device_attribute ;/*The limit of outstanding scsi command that firmware can handle*/ #define ARCMSR_MAX_OUTSTANDING_CMD 256 -#define ARCMSR_MAX_FREECCB_NUM 320 -#define ARCMSR_DRIVER_VERSION "Driver Version 1.20.00.15 2010/02/02" +#ifdef CONFIG_XEN +#define ARCMSR_MAX_FREECCB_NUM 160 +#else +#define ARCMSR_MAX_FREECCB_NUM 320 +#endif +#define ARCMSR_DRIVER_VERSION "Driver Version 1.20.00.15 2010/08/05"#define ARCMSR_SCSI_INITIATOR_ID 255#define ARCMSR_MAX_XFER_SECTORS 512#define ARCMSR_MAX_XFER_SECTORS_B 4096
@@ -60,7 +64,6 @@ struct device_attribute;#define ARCMSR_MAX_HBB_POSTQUEUE 264#define ARCMSR_MAX_XFER_LEN 0x26000/* 152K */ #define ARCMSR_CDB_SG_PAGE_LENGTH 256 -#define SCSI_CMD_ARECA_SPECIFIC 0xE1#ifndef PCI_DEVICE_ID_ARECA_1880 #define PCI_DEVICE_ID_ARECA_1880 0x1880#endif
drivers/scsi/arcmsr/arcmsr_attr.c +1 -1
@@ -2,7 +2,7 @@ ******************************************************************************* ** O.S : Linux ** FILE NAME : arcmsr_attr.c -** BY : Erich Chen +** BY : Nick Cheng ** Description: attributes exported to sysfs and device host ******************************************************************************* ** Copyright (C) 2002 - 2005, Areca Technology Corporation All rights reserved
drivers/scsi/arcmsr/arcmsr_hba.c +41 -73
253 lines not on this page · raw message
drivers/scsi/libsas/sas_scsi_host.c +1 -0
@@ -646,6 +646,7 @@ void sas_scsi_recover_host(struct Scsi_Host *shost)spin_lock_irqsave (shost->host_lock, flags);list_splice_init (&shost->eh_cmd_q, &eh_work_q); + shost->host_eh_scheduled =0 ;spin_unlock_irqrestore (shost->host_lock, flags);SAS_DPRINTK ("Enter %s\n" , __func__);
drivers/scsi/mpt2sas/mpt2sas_base.c +14 -5
@@ -2176,9 +2176,9 @@ _base_allocate_memory_pools(struct MPT2SAS_ADAPTER *ioc, int sleep_flag)/* adjust hba_queue_depth, reply_free_queue_depth, * and queue_size */ - ioc->hba_queue_depth -= queue_diff; - ioc->reply_free_queue_depth -= queue_diff; - queue_size -= queue_diff; + ioc->hba_queue_depth -= (queue_diff /2 ); + ioc->reply_free_queue_depth -= (queue_diff /2 ); + queue_size = facts->MaxReplyDescriptorPostQueueDepth; } ioc->reply_post_queue_depth = queue_size;
@@ -3941,6 +3941,8 @@ mpt2sas_base_detach(struct MPT2SAS_ADAPTER *ioc)static void _base_reset_handler (struct MPT2SAS_ADAPTER *ioc,int reset_phase) { +mpt2sas_scsih_reset_handler (ioc, reset_phase); +mpt2sas_ctl_reset_handler (ioc, reset_phase);switch (reset_phase) {case MPT2_IOC_PRE_RESET : dtmprintk(ioc, printk(MPT2SAS_INFO_FMT "%s: "
@@ -3971,8 +3973,6 @@ _base_reset_handler(struct MPT2SAS_ADAPTER *ioc, int reset_phase) "MPT2_IOC_DONE_RESET\n", ioc->name, __func__));break ; } -mpt2sas_scsih_reset_handler (ioc, reset_phase); -mpt2sas_ctl_reset_handler (ioc, reset_phase); }/**
@@ -4026,6 +4026,7 @@ mpt2sas_base_hard_reset_handler(struct MPT2SAS_ADAPTER *ioc, int sleep_flag, {int r;unsigned long flags; +u8 pe_complete = ioc->wait_for_port_enable_to_complete;dtmprintk (ioc,printk (MPT2SAS_INFO_FMT "%s: enter\n" , ioc->name, __func__));
@@ -4068,6 +4069,14 @@ mpt2sas_base_hard_reset_handler(struct MPT2SAS_ADAPTER *ioc, int sleep_flag,if (r) goto out;_base_reset_handler (ioc,MPT2_IOC_AFTER_RESET ); + +/* If this hard reset is called while port enable is active, then +* there is no reason to call make_ioc_operational +*/ +if (pe_complete) { + r = -EFAULT ; + goto out; + } r =_base_make_ioc_operational (ioc, sleep_flag);if (!r)_base_reset_handler (ioc,MPT2_IOC_DONE_RESET );
drivers/scsi/mpt2sas/mpt2sas_scsih.c +52 -12
145 lines not on this page · raw message
include/scsi/scsi.h +1 -0
@@ -9,6 +9,7 @@#define _SCSI_SCSI_H#include <linux/types.h> +#include <linux/scatterlist.h> struct scsi_cmnd ;