projects/linux·commit 2cca775b

Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6

2cca775b · Linus Torvalds <[email protected]> · 2008-04-18 11:25:31 -07:00

* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (137 commits)
  [SCSI] iscsi: bidi support for iscsi_tcp
  [SCSI] iscsi: bidi support at the generic libiscsi level
  [SCSI] iscsi: extended cdb support
  [SCSI] zfcp: Fix error handling for blocked unit for send FCP command
  [SCSI] zfcp: Remove zfcp_erp_wait from slave destory handler to fix deadlock
  [SCSI] zfcp: fix 31 bit compile warnings
  [SCSI] bsg: no need to set BSG_F_BLOCK bit in bsg_complete_all_commands
  [SCSI] bsg: remove minor in struct bsg_device
  [SCSI] bsg: use better helper list functions
  [SCSI] bsg: replace kobject_get with blk_get_queue
  [SCSI] bsg: takes a ref to struct device in fops->open
  [SCSI] qla1280: remove version check
  [SCSI] libsas: fix endianness bug in sas_ata
  [SCSI] zfcp: fix compiler warning caused by poking inside new semaphore (linux-next)
  [SCSI] aacraid: Do not describe check_reset parameter with its value
  [SCSI] aacraid: Fix down_interruptible() to check the return value
  [SCSI] sun3_scsi_vme: add MODULE_LICENSE
  [SCSI] st: rename flush_write_buffer()
  [SCSI] tgt: use KMEM_CACHE macro
  [SCSI] initio: fix big endian problems for auto request sense
  ...
Commit
2cca775baecbfede2fec20c99add709232311fe7
Parents
eddeb0e2 · 94795b61

Merge commit. Changes below are compared with the first parent: eddeb0e2.

Changes

133 files changed · +4953 −4469

FileStatusAddDelContent
Documentation/scsi/st.txtmodified+11−1View file
arch/ia64/hp/sim/simscsi.cmodified+4−19View file
block/bsg.cmodified+29−23View file
drivers/ata/libata-scsi.cmodified+1−5View file
drivers/base/transport_class.cmodified+2−1View file
drivers/message/fusion/mptbase.cmodified+18−11View file
drivers/message/fusion/mptbase.hmodified+3−2View file
drivers/message/fusion/mptsas.cmodified+17−5View file
drivers/message/fusion/mptscsih.cmodified+4−4View file
drivers/s390/scsi/zfcp_aux.cmodified+17−16View file
drivers/s390/scsi/zfcp_ccw.cmodified+11−13View file
drivers/s390/scsi/zfcp_dbf.cmodified+801−480View file
drivers/s390/scsi/zfcp_dbf.hadded+228−0View file
drivers/s390/scsi/zfcp_def.hmodified+4−165View file
drivers/s390/scsi/zfcp_erp.cmodified+222−466View file
drivers/s390/scsi/zfcp_ext.hmodified+36−23View file
drivers/s390/scsi/zfcp_fsf.cmodified+90−307View file
drivers/s390/scsi/zfcp_qdio.cmodified+3−4View file
drivers/s390/scsi/zfcp_scsi.cmodified+22−47View file
drivers/s390/scsi/zfcp_sysfs_adapter.cmodified+6−5View file
drivers/s390/scsi/zfcp_sysfs_port.cmodified+5−4View file
drivers/s390/scsi/zfcp_sysfs_unit.cmodified+3−2View file
drivers/scsi/3w-9xxx.cmodified+9−14View file
drivers/scsi/3w-xxxx.cmodified+2−12View file
drivers/scsi/BusLogic.cmodified+4−1View file
drivers/scsi/BusLogic.hmodified+2−19View file
drivers/scsi/FlashPoint.cmodified+3−3View file
drivers/scsi/Kconfigmodified+8−6View file
drivers/scsi/a2091.cmodified+3−0View file
drivers/scsi/a3000.cmodified+3−0View file
drivers/scsi/aacraid/aachba.cmodified+27−42View file
drivers/scsi/aacraid/commsup.cmodified+6−4View file
drivers/scsi/aic7xxx/aic79xx_osm.cmodified+5−2View file
drivers/scsi/aic7xxx/aic7xxx_osm.cmodified+7−3View file
drivers/scsi/aic7xxx/aicasm/aicasm_gram.ymodified+1−1View file
drivers/scsi/aic94xx/aic94xx.hmodified+0−16View file
drivers/scsi/aic94xx/aic94xx_dev.cmodified+4−4View file
drivers/scsi/aic94xx/aic94xx_dump.cmodified+9−1View file
drivers/scsi/aic94xx/aic94xx_dump.hmodified+0−9View file
drivers/scsi/aic94xx/aic94xx_hwi.cmodified+21−23View file
drivers/scsi/aic94xx/aic94xx_hwi.hmodified+0−2View file
drivers/scsi/aic94xx/aic94xx_init.cmodified+4−6View file
drivers/scsi/aic94xx/aic94xx_reg.cmodified+26−27View file
drivers/scsi/aic94xx/aic94xx_scb.cmodified+18−15View file
drivers/scsi/aic94xx/aic94xx_sds.cmodified+2−2View file
drivers/scsi/aic94xx/aic94xx_seq.cmodified+5−26View file
drivers/scsi/aic94xx/aic94xx_seq.hmodified+0−4View file
drivers/scsi/aic94xx/aic94xx_task.cmodified+6−6View file
drivers/scsi/aic94xx/aic94xx_tmf.cmodified+1−1View file
drivers/scsi/arm/acornscsi.cmodified+0−1View file
drivers/scsi/arm/cumana_1.cmodified+0−1View file
drivers/scsi/ch.cmodified+17−16View file
drivers/scsi/dc395x.cmodified+0−1View file
drivers/scsi/eata_pio.cmodified+0−2View file
drivers/scsi/gdth.cmodified+132−188View file
drivers/scsi/gdth.hmodified+0−2View file
drivers/scsi/gvp11.cmodified+3−0View file
drivers/scsi/hosts.cmodified+0−1View file
drivers/scsi/hptiop.cmodified+4−3View file
drivers/scsi/initio.cmodified+5−4View file
drivers/scsi/ips.cmodified+26−63View file
drivers/scsi/iscsi_tcp.cmodified+17−14View file
drivers/scsi/libiscsi.cmodified+120−20View file
drivers/scsi/libsas/sas_ata.cmodified+1−1View file
drivers/scsi/libsas/sas_scsi_host.cmodified+41−0View file
drivers/scsi/lpfc/lpfc.hmodified+1−4View file
drivers/scsi/lpfc/lpfc_attr.cmodified+8−2View file
drivers/scsi/lpfc/lpfc_ct.cmodified+16−32View file
drivers/scsi/lpfc/lpfc_debugfs.cmodified+2−0View file
drivers/scsi/lpfc/lpfc_els.cmodified+54−67View file
drivers/scsi/lpfc/lpfc_hbadisc.cmodified+21−52View file
drivers/scsi/lpfc/lpfc_init.cmodified+43−55View file
drivers/scsi/lpfc/lpfc_nportdisc.cmodified+23−17View file
drivers/scsi/lpfc/lpfc_scsi.cmodified+21−13View file
drivers/scsi/lpfc/lpfc_sli.cmodified+68−44View file
drivers/scsi/lpfc/lpfc_version.hmodified+1−1View file
drivers/scsi/lpfc/lpfc_vport.cmodified+2−1View file
drivers/scsi/mac_scsi.cmodified+0−1View file
drivers/scsi/megaraid/megaraid_sas.cmodified+31−18View file
drivers/scsi/megaraid/megaraid_sas.hmodified+5−0View file
drivers/scsi/mvme147.cmodified+3−0View file
drivers/scsi/ps3rom.cmodified+12−89View file
drivers/scsi/qla1280.cmodified+0−5View file
drivers/scsi/qla2xxx/Kconfigmodified+2−1View file
drivers/scsi/qla2xxx/qla_attr.cmodified+27−9View file
drivers/scsi/qla2xxx/qla_dbg.cmodified+1−123View file
drivers/scsi/qla2xxx/qla_dbg.hmodified+9−14View file
drivers/scsi/qla2xxx/qla_def.hmodified+68−10View file
drivers/scsi/qla2xxx/qla_dfs.cmodified+1−1View file
drivers/scsi/qla2xxx/qla_fw.hmodified+170−3View file
drivers/scsi/qla2xxx/qla_gbl.hmodified+24−9View file
drivers/scsi/qla2xxx/qla_gs.cmodified+6−10View file
drivers/scsi/qla2xxx/qla_init.cmodified+132−60View file
drivers/scsi/qla2xxx/qla_inline.hmodified+1−86View file
drivers/scsi/qla2xxx/qla_iocb.cmodified+1−4View file
drivers/scsi/qla2xxx/qla_isr.cmodified+102−121View file
drivers/scsi/qla2xxx/qla_mbx.cmodified+238−80View file
drivers/scsi/qla2xxx/qla_mid.cmodified+12−18View file
drivers/scsi/qla2xxx/qla_os.cmodified+217−226View file
drivers/scsi/qla2xxx/qla_settings.hmodified+1−15View file
drivers/scsi/qla2xxx/qla_sup.cmodified+251−64View file
drivers/scsi/qla2xxx/qla_version.hmodified+3−3View file
drivers/scsi/qla4xxx/ql4_fw.hmodified+3−1View file
drivers/scsi/qla4xxx/ql4_glbl.hmodified+4−0View file
drivers/scsi/qla4xxx/ql4_iocb.cmodified+3−11View file
drivers/scsi/qla4xxx/ql4_isr.cmodified+5−35View file
drivers/scsi/qla4xxx/ql4_mbx.cmodified+39−0View file
drivers/scsi/qla4xxx/ql4_os.cmodified+74−22View file
drivers/scsi/raid_class.cmodified+1−1View file
drivers/scsi/scsi.cmodified+161−68View file
drivers/scsi/scsi_debug.cmodified+617−762View file
drivers/scsi/scsi_debug.hdeleted+0−24View before deletion
drivers/scsi/scsi_error.cmodified+132−18View file
drivers/scsi/scsi_lib.cmodified+5−7View file
drivers/scsi/scsi_tgt_lib.cmodified+1−3View file
drivers/scsi/sgiwd93.cmodified+4−3View file
drivers/scsi/st.cmodified+82−7View file
drivers/scsi/st.hmodified+3−0View file
drivers/scsi/st_options.hmodified+5−1View file
drivers/scsi/stex.cmodified+15−68View file
drivers/scsi/sun3_scsi_vme.cmodified+1−0View file
drivers/scsi/wd33c93.cmodified+0−3View file
include/linux/attribute_container.hmodified+1−1View file
include/linux/mtio.hmodified+1−0View file
include/linux/scatterlist.hmodified+5−0View file
include/linux/transport_class.hmodified+3−2View file
include/scsi/iscsi_proto.hmodified+4−2View file
include/scsi/libsas.hmodified+2−0View file
include/scsi/sas_ata.hmodified+2−2View file
include/scsi/scsi_cmnd.hmodified+17−0View file
include/scsi/scsi_eh.hmodified+4−1View file
include/scsi/scsi_host.hmodified+1−0View file
lib/scatterlist.cmodified+102−0View file

Only the first 600 diff lines are shown. Download the complete patch.

Documentation/scsi/st.txt

View file
diff --git a/Documentation/scsi/st.txt b/Documentation/scsi/st.txt
index b7be95b..4075260 100644
--- a/Documentation/scsi/st.txt
+++ b/Documentation/scsi/st.txt
@@ -2,7 +2,7 @@ This file contains brief information about the SCSI tape driver.
The driver is currently maintained by Kai Mäkisara (email
-Last modified: Mon Mar 7 21:14:44 2005 by kai.makisara
+Last modified: Sun Feb 24 21:59:07 2008 by kai.makisara
BASICS
@@ -133,6 +133,11 @@ the defaults set by the user. The value -1 means the default is not set. The
file 'dev' contains the device numbers corresponding to this device. The links
'device' and 'driver' point to the SCSI device and driver entries.
+Each directory also contains the entry 'options' which shows the currently
+enabled driver and mode options. The value in the file is a bit mask where the
+bit definitions are the same as those used with MTSETDRVBUFFER in setting the
+options.
+
A link named 'tape' is made from the SCSI device directory to the class
directory corresponding to the mode 0 auto-rewind device (e.g., st0).
@@ -372,6 +377,11 @@ MTSETDRVBUFFER
MT_ST_SYSV sets the SYSV semantics (mode)
MT_ST_NOWAIT enables immediate mode (i.e., don't wait for
the command to finish) for some commands (e.g., rewind)
+ MT_ST_SILI enables setting the SILI bit in SCSI commands when
+ reading in variable block mode to enhance performance when
+ reading blocks shorter than the byte count; set this only
+ if you are sure that the drive supports SILI and the HBA
+ correctly returns transfer residuals
MT_ST_DEBUGGING debugging (global; debugging must be
compiled into the driver)
MT_ST_SETBOOLEANS

arch/ia64/hp/sim/simscsi.c

View file
diff --git a/arch/ia64/hp/sim/simscsi.c b/arch/ia64/hp/sim/simscsi.c
index 7661bb0..3a078ad 100644
--- a/arch/ia64/hp/sim/simscsi.c
+++ b/arch/ia64/hp/sim/simscsi.c
@@ -201,22 +201,6 @@ simscsi_readwrite10 (struct scsi_cmnd *sc, int mode)
simscsi_sg_readwrite(sc, mode, offset);
}
-static void simscsi_fillresult(struct scsi_cmnd *sc, char *buf, unsigned len)
-{
-
- int i;
- unsigned thislen;
- struct scatterlist *slp;
-
- scsi_for_each_sg(sc, slp, scsi_sg_count(sc), i) {
- if (!len)
- break;
- thislen = min(len, slp->length);
- memcpy(sg_virt(slp), buf, thislen);
- len -= thislen;
- }
-}
-
static int
simscsi_queuecommand (struct scsi_cmnd *sc, void (*done)(struct scsi_cmnd *))
{
@@ -258,7 +242,7 @@ simscsi_queuecommand (struct scsi_cmnd *sc, void (*done)(struct scsi_cmnd *))
buf[6] = 0; /* reserved */
buf[7] = 0; /* various flags */
memcpy(buf + 8, "HP SIMULATED DISK 0.00", 28);
- simscsi_fillresult(sc, buf, 36);
+ scsi_sg_copy_from_buffer(sc, buf, 36);
sc->result = GOOD;
break;
@@ -306,14 +290,15 @@ simscsi_queuecommand (struct scsi_cmnd *sc, void (*done)(struct scsi_cmnd *))
buf[5] = 0;
buf[6] = 2;
buf[7] = 0;
- simscsi_fillresult(sc, buf, 8);
+ scsi_sg_copy_from_buffer(sc, buf, 8);
sc->result = GOOD;
break;
case MODE_SENSE:
case MODE_SENSE_10:
/* sd.c uses this to determine whether disk does write-caching. */
- simscsi_fillresult(sc, (char *)empty_zero_page, scsi_bufflen(sc));
+ scsi_sg_copy_from_buffer(sc, (char *)empty_zero_page,
+ PAGE_SIZE);
sc->result = GOOD;
break;

block/bsg.c

View file
diff --git a/block/bsg.c b/block/bsg.c
index 8917c51..302ac1f 100644
--- a/block/bsg.c
+++ b/block/bsg.c
@@ -37,7 +37,6 @@ struct bsg_device {
struct list_head done_list;
struct hlist_node dev_list;
atomic_t ref_count;
- int minor;
int queued_cmds;
int done_cmds;
wait_queue_head_t wq_done;
@@ -368,7 +367,7 @@ static struct bsg_command *bsg_next_done_cmd(struct bsg_device *bd)
spin_lock_irq(&bd->lock);
if (bd->done_cmds) {
- bc = list_entry(bd->done_list.next, struct bsg_command, list);
+ bc = list_first_entry(&bd->done_list, struct bsg_command, list);
list_del(&bc->list);
bd->done_cmds--;
}
@@ -468,8 +467,6 @@ static int bsg_complete_all_commands(struct bsg_device *bd)
dprintk("%s: entered\n", bd->name);
- set_bit(BSG_F_BLOCK, &bd->flags);
-
/*
* wait for all commands to complete
*/
@@ -705,6 +702,7 @@ static struct bsg_device *bsg_alloc_device(void)
static int bsg_put_device(struct bsg_device *bd)
{
int ret = 0;
+ struct device *dev = bd->queue->bsg_dev.dev;
mutex_lock(&bsg_mutex);
@@ -730,6 +728,7 @@ static int bsg_put_device(struct bsg_device *bd)
kfree(bd);
out:
mutex_unlock(&bsg_mutex);
+ put_device(dev);
return ret;
}
@@ -738,22 +737,26 @@ static struct bsg_device *bsg_add_device(struct inode *inode,
struct file *file)
{
struct bsg_device *bd;
+ int ret;
#ifdef BSG_DEBUG
unsigned char buf[32];
#endif
+ ret = blk_get_queue(rq);
+ if (ret)
+ return ERR_PTR(-ENXIO);
bd = bsg_alloc_device();
- if (!bd)
+ if (!bd) {
+ blk_put_queue(rq);
return ERR_PTR(-ENOMEM);
+ }
bd->queue = rq;
- kobject_get(&rq->kobj);
bsg_set_block(bd, file);
atomic_set(&bd->ref_count, 1);
- bd->minor = iminor(inode);
mutex_lock(&bsg_mutex);
- hlist_add_head(&bd->dev_list, bsg_dev_idx_hash(bd->minor));
+ hlist_add_head(&bd->dev_list, bsg_dev_idx_hash(iminor(inode)));
strncpy(bd->name, rq->bsg_dev.class_dev->class_id, sizeof(bd->name) - 1);
dprintk("bound to <%s>, max queue %d\n",
@@ -763,23 +766,21 @@ static struct bsg_device *bsg_add_device(struct inode *inode,
return bd;
}
-static struct bsg_device *__bsg_get_device(int minor)
+static struct bsg_device *__bsg_get_device(int minor, struct request_queue *q)
{
- struct bsg_device *bd = NULL;
+ struct bsg_device *bd;
struct hlist_node *entry;
mutex_lock(&bsg_mutex);
- hlist_for_each(entry, bsg_dev_idx_hash(minor)) {
- bd = hlist_entry(entry, struct bsg_device, dev_list);
- if (bd->minor == minor) {
+ hlist_for_each_entry(bd, entry, bsg_dev_idx_hash(minor), dev_list) {
+ if (bd->queue == q) {
atomic_inc(&bd->ref_count);
- break;
+ goto found;
}
-
- bd = NULL;
}
-
+ bd = NULL;
+found:
mutex_unlock(&bsg_mutex);
return bd;
}
@@ -789,21 +790,27 @@ static struct bsg_device *bsg_get_device(struct inode *inode, struct file *file)
struct bsg_device *bd;
struct bsg_class_device *bcd;
- bd = __bsg_get_device(iminor(inode));
- if (bd)
- return bd;
-
/*
* find the class device
*/
mutex_lock(&bsg_mutex);
bcd = idr_find(&bsg_minor_idr, iminor(inode));
+ if (bcd)
+ get_device(bcd->dev);
mutex_unlock(&bsg_mutex);
if (!bcd)
return ERR_PTR(-ENODEV);
- return bsg_add_device(inode, bcd->queue, file);
+ bd = __bsg_get_device(iminor(inode), bcd->queue);
+ if (bd)
+ return bd;
+
+ bd = bsg_add_device(inode, bcd->queue, file);
+ if (IS_ERR(bd))
+ put_device(bcd->dev);
+
+ return bd;
}
static int bsg_open(struct inode *inode, struct file *file)
@@ -942,7 +949,6 @@ void bsg_unregister_queue(struct request_queue *q)
class_device_unregister(bcd->class_dev);
put_device(bcd->dev);
bcd->class_dev = NULL;
- bcd->dev = NULL;
mutex_unlock(&bsg_mutex);
}
EXPORT_SYMBOL_GPL(bsg_unregister_queue);

drivers/ata/libata-scsi.c

View file
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index c16e3ce..f3c69a8 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -2332,11 +2332,7 @@ void ata_scsi_set_sense(struct scsi_cmnd *cmd, u8 sk, u8 asc, u8 ascq)
{
cmd->result = (DRIVER_SENSE << 24) | SAM_STAT_CHECK_CONDITION;
- cmd->sense_buffer[0] = 0x70; /* fixed format, current */
- cmd->sense_buffer[2] = sk;
- cmd->sense_buffer[7] = 18 - 8; /* additional sense length */
- cmd->sense_buffer[12] = asc;
- cmd->sense_buffer[13] = ascq;
+ scsi_build_sense_buffer(0, cmd->sense_buffer, sk, asc, ascq);
}
/**

drivers/base/transport_class.c

View file
diff --git a/drivers/base/transport_class.c b/drivers/base/transport_class.c
index 40bca48..cabd0ed 100644
--- a/drivers/base/transport_class.c
+++ b/drivers/base/transport_class.c
@@ -108,7 +108,8 @@ EXPORT_SYMBOL_GPL(anon_transport_class_register);
*/
void anon_transport_class_unregister(struct anon_transport_class *atc)
{
- attribute_container_unregister(&atc->container);
+ if (unlikely(attribute_container_unregister(&atc->container)))
+ BUG();
}
EXPORT_SYMBOL_GPL(anon_transport_class_unregister);

drivers/message/fusion/mptbase.c

View file
diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c
index c6be6eb..db3c892 100644
--- a/drivers/message/fusion/mptbase.c
+++ b/drivers/message/fusion/mptbase.c
@@ -79,7 +79,7 @@ MODULE_VERSION(my_VERSION);
/*
* cmd line parameters
*/
-static int mpt_msi_enable;
+static int mpt_msi_enable = -1;
module_param(mpt_msi_enable, int, 0);
MODULE_PARM_DESC(mpt_msi_enable, " MSI Support Enable (default=0)");
@@ -1686,6 +1686,11 @@ mpt_attach(struct pci_dev *pdev, const struct pci_device_id *id)
ioc->bus_type = SAS;
}
+ if (ioc->bus_type == SAS && mpt_msi_enable == -1)
+ ioc->msi_enable = 1;
+ else
+ ioc->msi_enable = mpt_msi_enable;
+
if (ioc->errata_flag_1064)
pci_disable_io_access(pdev);
@@ -1831,7 +1836,7 @@ mpt_suspend(struct pci_dev *pdev, pm_message_t state)
CHIPREG_WRITE32(&ioc->chip->IntStatus, 0);
free_irq(ioc->pci_irq, ioc);
- if (mpt_msi_enable)
+ if (ioc->msi_enable)
pci_disable_msi(ioc->pcidev);
ioc->pci_irq = -1;
pci_save_state(pdev);
@@ -2057,15 +2062,17 @@ mpt_do_ioc_recovery(MPT_ADAPTER *ioc, u32 reason, int sleepFlag)
if ((ret == 0) && (reason == MPT_HOSTEVENT_IOC_BRINGUP)) {
ioc->pci_irq = -1;
if (ioc->pcidev->irq) {
- if (mpt_msi_enable && !pci_enable_msi(ioc->pcidev))
+ if (ioc->msi_enable && !pci_enable_msi(ioc->pcidev))
printk(MYIOC_s_INFO_FMT "PCI-MSI enabled\n",
ioc->name);
+ else
+ ioc->msi_enable = 0;
rc = request_irq(ioc->pcidev->irq, mpt_interrupt,
IRQF_SHARED, ioc->name, ioc);
if (rc < 0) {
printk(MYIOC_s_ERR_FMT "Unable to allocate "
"interrupt %d!\n", ioc->name, ioc->pcidev->irq);
- if (mpt_msi_enable)
+ if (ioc->msi_enable)
pci_disable_msi(ioc->pcidev);
return -EBUSY;
}
@@ -2173,7 +2180,7 @@ mpt_do_ioc_recovery(MPT_ADAPTER *ioc, u32 reason, int sleepFlag)
/*
* Initalize link list for inactive raid volumes.
*/
- init_MUTEX(&ioc->raid_data.inactive_list_mutex);
+ mutex_init(&ioc->raid_data.inactive_list_mutex);
INIT_LIST_HEAD(&ioc->raid_data.inactive_list);
if (ioc->bus_type == SAS) {
@@ -2261,7 +2268,7 @@ mpt_do_ioc_recovery(MPT_ADAPTER *ioc, u32 reason, int sleepFlag)
out:
if ((ret != 0) && irq_allocated) {
free_irq(ioc->pci_irq, ioc);
- if (mpt_msi_enable)
+ if (ioc->msi_enable)
pci_disable_msi(ioc->pcidev);
}
return ret;
@@ -2443,7 +2450,7 @@ mpt_adapter_dispose(MPT_ADAPTER *ioc)
if (ioc->pci_irq != -1) {
free_irq(ioc->pci_irq, ioc);
- if (mpt_msi_enable)
+ if (ioc->msi_enable)
pci_disable_msi(ioc->pcidev);
ioc->pci_irq = -1;
}
@@ -5159,13 +5166,13 @@ mpt_inactive_raid_list_free(MPT_ADAPTER *ioc)
if (list_empty(&ioc->raid_data.inactive_list))
return;
- down(&ioc->raid_data.inactive_list_mutex);
+ mutex_lock(&ioc->raid_data.inactive_list_mutex);
list_for_each_entry_safe(component_info, pNext,
&ioc->raid_data.inactive_list, list) {
list_del(&component_info->list);
kfree(component_info);
}
- up(&ioc->raid_data.inactive_list_mutex);
+ mutex_unlock(&ioc->raid_data.inactive_list_mutex);
}
/**
@@ -5224,7 +5231,7 @@ mpt_inactive_raid_volumes(MPT_ADAPTER *ioc, u8 channel, u8 id)
if (!handle_inactive_volumes)
goto out;
- down(&ioc->raid_data.inactive_list_mutex);
+ mutex_lock(&ioc->raid_data.inactive_list_mutex);
for (i = 0; i < buffer->NumPhysDisks; i++) {
if(mpt_raid_phys_disk_pg0(ioc,
buffer->PhysDisk[i].PhysDiskNum, &phys_disk) != 0)
@@ -5244,7 +5251,7 @@ mpt_inactive_raid_volumes(MPT_ADAPTER *ioc, u8 channel, u8 id)
list_add_tail(&component_info->list,
&ioc->raid_data.inactive_list);
}
- up(&ioc->raid_data.inactive_list_mutex);
+ mutex_unlock(&ioc->raid_data.inactive_list_mutex);
out:
if (buffer)

drivers/message/fusion/mptbase.h

View file
diff --git a/drivers/message/fusion/mptbase.h b/drivers/message/fusion/mptbase.h
index caadc68..a8f6174 100644
--- a/drivers/message/fusion/mptbase.h
+++ b/drivers/message/fusion/mptbase.h
@@ -51,6 +51,7 @@
#include <linux/kernel.h>
#include <linux/pci.h>
+#include <linux/mutex.h>
#include "lsi/mpi_type.h"
#include "lsi/mpi.h" /* Fusion MPI(nterface) basic defs */
@@ -531,7 +532,7 @@ struct inactive_raid_component_info {
typedef struct _RaidCfgData {
IOCPage2_t *pIocPg2; /* table of Raid Volumes */
IOCPage3_t *pIocPg3; /* table of physical disks */
- struct semaphore inactive_list_mutex;
+ struct mutex inactive_list_mutex;
struct list_head inactive_list; /* link list for physical
disk that belong in
inactive volumes */
@@ -630,6 +631,7 @@ typedef struct _MPT_ADAPTER
int mtrr_reg;
struct pci_dev *pcidev; /* struct pci_dev pointer */
int bars; /* bitmask of BAR's that must be configured */
+ int msi_enable;
u8 __iomem *memmap; /* mmap address */
struct Scsi_Host *sh; /* Scsi Host pointer */
SpiCfgData spi_data; /* Scsi config. data */
@@ -693,7 +695,6 @@ typedef struct _MPT_ADAPTER
struct mutex sas_discovery_mutex;
u8 sas_discovery_runtime;
u8 sas_discovery_ignore_events;
- u16 handle;
int sas_index; /* index refrencing */
MPT_SAS_MGMT sas_mgmt;
struct work_struct sas_persist_task;

drivers/message/fusion/mptsas.c

View file
diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c
index 78734e2..4684807 100644
--- a/drivers/message/fusion/mptsas.c
+++ b/drivers/message/fusion/mptsas.c
@@ -230,6 +230,20 @@ static inline MPT_ADAPTER *rphy_to_ioc(struct sas_rphy *rphy)
return ((MPT_SCSI_HOST *)shost->hostdata)->ioc;
}
+static struct mptsas_portinfo *
+mptsas_get_hba_portinfo(MPT_ADAPTER *ioc)
+{
+ struct list_head *head = &ioc->sas_topology;
+ struct mptsas_portinfo *pi = NULL;
+
+ /* always the first entry on sas_topology list */
+
+ if (!list_empty(head))
+ pi = list_entry(head->next, struct mptsas_portinfo, list);
+
+ return pi;
+}
+
/*
* mptsas_find_portinfo_by_handle
*
@@ -1290,7 +1304,7 @@ static int mptsas_smp_handler(struct Scsi_Host *shost, struct sas_rphy *rphy,
struct mptsas_portinfo *port_info;
mutex_lock(&ioc->sas_topology_mutex);
- port_info = mptsas_find_portinfo_by_handle(ioc, ioc->handle);
+ port_info = mptsas_get_hba_portinfo(ioc);
if (port_info && port_info->phy_info)
sas_address =
port_info->phy_info[0].phy->identify.sas_address;
@@ -2028,8 +2042,7 @@ static int mptsas_probe_one_phy(struct device *dev,
int i;
mutex_lock(&ioc->sas_topology_mutex);
- port_info = mptsas_find_portinfo_by_handle(ioc,
- ioc->handle);
+ port_info = mptsas_get_hba_portinfo(ioc);
mutex_unlock(&ioc->sas_topology_mutex);
for (i = 0; i < port_info->num_phys; i++)
@@ -2099,8 +2112,7 @@ mptsas_probe_hba_phys(MPT_ADAPTER *ioc)
mptsas_sas_io_unit_pg1(ioc);
mutex_lock(&ioc->sas_topology_mutex);
- ioc->handle = hba->phy_info[0].handle;
- port_info = mptsas_find_portinfo_by_handle(ioc, ioc->handle);
+ port_info = mptsas_get_hba_portinfo(ioc);
if (!port_info) {
port_info = hba;
list_add_tail(&port_info->list, &ioc->sas_topology);

drivers/message/fusion/mptscsih.c

View file
diff --git a/drivers/message/fusion/mptscsih.c b/drivers/message/fusion/mptscsih.c
index c207bda..89c6314 100644
--- a/drivers/message/fusion/mptscsih.c
+++ b/drivers/message/fusion/mptscsih.c
@@ -2304,14 +2304,14 @@ mptscsih_is_phys_disk(MPT_ADAPTER *ioc, u8 channel, u8 id)
if (list_empty(&ioc->raid_data.inactive_list))
goto out;
- down(&ioc->raid_data.inactive_list_mutex);
+ mutex_lock(&ioc->raid_data.inactive_list_mutex);
list_for_each_entry(component_info, &ioc->raid_data.inactive_list,
list) {
if ((component_info->d.PhysDiskID == id) &&
(component_info->d.PhysDiskBus == channel))
rc = 1;
}
- up(&ioc->raid_data.inactive_list_mutex);
+ mutex_unlock(&ioc->raid_data.inactive_list_mutex);
out:
return rc;
@@ -2341,14 +2341,14 @@ mptscsih_raid_id_to_num(MPT_ADAPTER *ioc, u8 channel, u8 id)
if (list_empty(&ioc->raid_data.inactive_list))
goto out;
- down(&ioc->raid_data.inactive_list_mutex);
+ mutex_lock(&ioc->raid_data.inactive_list_mutex);
list_for_each_entry(component_info, &ioc->raid_data.inactive_list,
list) {
if ((component_info->d.PhysDiskID == id) &&
(component_info->d.PhysDiskBus == channel))
rc = component_info->d.PhysDiskNum;
}
- up(&ioc->raid_data.inactive_list_mutex);
+ mutex_unlock(&ioc->raid_data.inactive_list_mutex);
out:
return rc;

drivers/s390/scsi/zfcp_aux.c

View file
diff --git a/drivers/s390/scsi/zfcp_aux.c b/drivers/s390/scsi/zfcp_aux.c
index 874b55e..8c7e2b7 100644
--- a/drivers/s390/scsi/zfcp_aux.c
+++ b/drivers/s390/scsi/zfcp_aux.c
@@ -1030,10 +1030,10 @@ zfcp_adapter_enqueue(struct ccw_device *ccw_device)
/* initialize debug locks */
- spin_lock_init(&adapter->erp_dbf_lock);
spin_lock_init(&adapter->hba_dbf_lock);
spin_lock_init(&adapter->san_dbf_lock);
spin_lock_init(&adapter->scsi_dbf_lock);
+ spin_lock_init(&adapter->rec_dbf_lock);
retval = zfcp_adapter_debug_register(adapter);
if (retval)
@@ -1325,10 +1325,10 @@ zfcp_nameserver_enqueue(struct zfcp_adapter *adapter)
#define ZFCP_LOG_AREA ZFCP_LOG_AREA_FC
-static void
-zfcp_fsf_incoming_els_rscn(struct zfcp_adapter *adapter,
- struct fsf_status_read_buffer *status_buffer)
+static void zfcp_fsf_incoming_els_rscn(struct zfcp_fsf_req *fsf_req)
{
+ struct fsf_status_read_buffer *status_buffer = (void*)fsf_req->data;
+ struct zfcp_adapter *adapter = fsf_req->adapter;
struct fcp_rscn_head *fcp_rscn_head;
struct fcp_rscn_element *fcp_rscn_element;
struct zfcp_port *port;
@@ -1375,7 +1375,8 @@ zfcp_fsf_incoming_els_rscn(struct zfcp_adapter *adapter,
ZFCP_LOG_INFO("incoming RSCN, trying to open "
"port 0x%016Lx\n", port->wwpn);
zfcp_erp_port_reopen(port,
- ZFCP_STATUS_COMMON_ERP_FAILED);
+ ZFCP_STATUS_COMMON_ERP_FAILED,
+ 82, fsf_req);
continue;
}
@@ -1406,10 +1407,10 @@ zfcp_fsf_incoming_els_rscn(struct zfcp_adapter *adapter,
}
}
-static void
-zfcp_fsf_incoming_els_plogi(struct zfcp_adapter *adapter,
- struct fsf_status_read_buffer *status_buffer)
+static void zfcp_fsf_incoming_els_plogi(struct zfcp_fsf_req *fsf_req)
{
+ struct fsf_status_read_buffer *status_buffer = (void*)fsf_req->data;
+ struct zfcp_adapter *adapter = fsf_req->adapter;
struct fsf_plogi *els_plogi;
struct zfcp_port *port;
unsigned long flags;
@@ -1428,14 +1429,14 @@ zfcp_fsf_incoming_els_plogi(struct zfcp_adapter *adapter,
status_buffer->d_id,
zfcp_get_busid_by_adapter(adapter));
} else {
- zfcp_erp_port_forced_reopen(port, 0);
+ zfcp_erp_port_forced_reopen(port, 0, 83, fsf_req);
}
}
-static void
-zfcp_fsf_incoming_els_logo(struct zfcp_adapter *adapter,
- struct fsf_status_read_buffer *status_buffer)
+static void zfcp_fsf_incoming_els_logo(struct zfcp_fsf_req *fsf_req)
{
+ struct fsf_status_read_buffer *status_buffer = (void*)fsf_req->data;
+ struct zfcp_adapter *adapter = fsf_req->adapter;
struct fcp_logo *els_logo = (struct fcp_logo *) status_buffer->payload;
struct zfcp_port *port;
unsigned long flags;
@@ -1453,7 +1454,7 @@ zfcp_fsf_incoming_els_logo(struct zfcp_adapter *adapter,
status_buffer->d_id,
zfcp_get_busid_by_adapter(adapter));
} else {
- zfcp_erp_port_forced_reopen(port, 0);
+ zfcp_erp_port_forced_reopen(port, 0, 84, fsf_req);
}
}
@@ -1480,12 +1481,12 @@ zfcp_fsf_incoming_els(struct zfcp_fsf_req *fsf_req)
zfcp_san_dbf_event_incoming_els(fsf_req);

This diff is incomplete. Download the complete patch.

drivers/s390/scsi/zfcp_ccw.c

View file

This diff is incomplete. Download the complete patch.

drivers/s390/scsi/zfcp_dbf.c

View file

This diff is incomplete. Download the complete patch.

drivers/s390/scsi/zfcp_dbf.h

View file

This diff is incomplete. Download the complete patch.

drivers/s390/scsi/zfcp_def.h

View file

This diff is incomplete. Download the complete patch.

drivers/s390/scsi/zfcp_erp.c

View file

This diff is incomplete. Download the complete patch.

drivers/s390/scsi/zfcp_ext.h

View file

This diff is incomplete. Download the complete patch.

drivers/s390/scsi/zfcp_fsf.c

View file

This diff is incomplete. Download the complete patch.

drivers/s390/scsi/zfcp_qdio.c

View file

This diff is incomplete. Download the complete patch.

drivers/s390/scsi/zfcp_scsi.c

View file

This diff is incomplete. Download the complete patch.

drivers/s390/scsi/zfcp_sysfs_adapter.c

View file

This diff is incomplete. Download the complete patch.

drivers/s390/scsi/zfcp_sysfs_port.c

View file

This diff is incomplete. Download the complete patch.

drivers/s390/scsi/zfcp_sysfs_unit.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/3w-9xxx.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/3w-xxxx.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/BusLogic.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/BusLogic.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/FlashPoint.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/Kconfig

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/a2091.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/a3000.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/aacraid/aachba.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/aacraid/commsup.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/aic7xxx/aic79xx_osm.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/aic7xxx/aic7xxx_osm.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/aic7xxx/aicasm/aicasm_gram.y

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/aic94xx/aic94xx.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/aic94xx/aic94xx_dev.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/aic94xx/aic94xx_dump.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/aic94xx/aic94xx_dump.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/aic94xx/aic94xx_hwi.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/aic94xx/aic94xx_hwi.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/aic94xx/aic94xx_init.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/aic94xx/aic94xx_reg.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/aic94xx/aic94xx_scb.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/aic94xx/aic94xx_sds.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/aic94xx/aic94xx_seq.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/aic94xx/aic94xx_seq.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/aic94xx/aic94xx_task.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/aic94xx/aic94xx_tmf.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/arm/acornscsi.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/arm/cumana_1.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/ch.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/dc395x.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/eata_pio.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/gdth.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/gdth.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/gvp11.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/hosts.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/hptiop.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/initio.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/ips.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/iscsi_tcp.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/libiscsi.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/libsas/sas_ata.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/libsas/sas_scsi_host.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/lpfc/lpfc.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/lpfc/lpfc_attr.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/lpfc/lpfc_ct.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/lpfc/lpfc_debugfs.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/lpfc/lpfc_els.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/lpfc/lpfc_hbadisc.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/lpfc/lpfc_init.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/lpfc/lpfc_nportdisc.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/lpfc/lpfc_scsi.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/lpfc/lpfc_sli.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/lpfc/lpfc_version.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/lpfc/lpfc_vport.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/mac_scsi.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/megaraid/megaraid_sas.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/megaraid/megaraid_sas.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/mvme147.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/ps3rom.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/qla1280.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/qla2xxx/Kconfig

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/qla2xxx/qla_attr.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/qla2xxx/qla_dbg.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/qla2xxx/qla_dbg.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/qla2xxx/qla_def.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/qla2xxx/qla_dfs.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/qla2xxx/qla_fw.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/qla2xxx/qla_gbl.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/qla2xxx/qla_gs.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/qla2xxx/qla_init.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/qla2xxx/qla_inline.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/qla2xxx/qla_iocb.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/qla2xxx/qla_isr.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/qla2xxx/qla_mbx.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/qla2xxx/qla_mid.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/qla2xxx/qla_os.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/qla2xxx/qla_settings.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/qla2xxx/qla_sup.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/qla2xxx/qla_version.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/qla4xxx/ql4_fw.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/qla4xxx/ql4_glbl.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/qla4xxx/ql4_iocb.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/qla4xxx/ql4_isr.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/qla4xxx/ql4_mbx.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/qla4xxx/ql4_os.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/raid_class.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/scsi.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/scsi_debug.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/scsi_debug.h

View before deletion

This diff is incomplete. Download the complete patch.

drivers/scsi/scsi_error.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/scsi_lib.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/scsi_tgt_lib.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/sgiwd93.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/st.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/st.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/st_options.h

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/stex.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/sun3_scsi_vme.c

View file

This diff is incomplete. Download the complete patch.

drivers/scsi/wd33c93.c

View file

This diff is incomplete. Download the complete patch.

include/linux/attribute_container.h

View file

This diff is incomplete. Download the complete patch.

include/linux/mtio.h

View file

This diff is incomplete. Download the complete patch.

include/linux/scatterlist.h

View file

This diff is incomplete. Download the complete patch.

include/linux/transport_class.h

View file

This diff is incomplete. Download the complete patch.

include/scsi/iscsi_proto.h

View file

This diff is incomplete. Download the complete patch.

include/scsi/libsas.h

View file

This diff is incomplete. Download the complete patch.

include/scsi/sas_ata.h

View file

This diff is incomplete. Download the complete patch.

include/scsi/scsi_cmnd.h

View file

This diff is incomplete. Download the complete patch.

include/scsi/scsi_eh.h

View file

This diff is incomplete. Download the complete patch.

include/scsi/scsi_host.h

View file

This diff is incomplete. Download the complete patch.

lib/scatterlist.c

View file

This diff is incomplete. Download the complete patch.