aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/message
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/message')
-rw-r--r--drivers/message/fusion/lsi/mpi.h2
-rw-r--r--drivers/message/fusion/lsi/mpi_cnfg.h2
-rw-r--r--drivers/message/fusion/mptbase.c102
-rw-r--r--drivers/message/fusion/mptbase.h17
-rw-r--r--drivers/message/fusion/mptctl.c10
-rw-r--r--drivers/message/fusion/mptctl.h2
-rw-r--r--drivers/message/fusion/mptdebug.h2
-rw-r--r--drivers/message/fusion/mptfc.c2
-rw-r--r--drivers/message/fusion/mptlan.c2
-rw-r--r--drivers/message/fusion/mptlan.h2
-rw-r--r--drivers/message/fusion/mptsas.c2
-rw-r--r--drivers/message/fusion/mptsas.h2
-rw-r--r--drivers/message/fusion/mptscsih.c2
-rw-r--r--drivers/message/fusion/mptscsih.h2
-rw-r--r--drivers/message/fusion/mptspi.c12
-rw-r--r--drivers/message/i2o/i2o_config.c12
16 files changed, 143 insertions, 32 deletions
diff --git a/drivers/message/fusion/lsi/mpi.h b/drivers/message/fusion/lsi/mpi.h
index 1acbdd61b670..10b6ef758725 100644
--- a/drivers/message/fusion/lsi/mpi.h
+++ b/drivers/message/fusion/lsi/mpi.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2000-2007 LSI Corporation. 2 * Copyright (c) 2000-2008 LSI Corporation.
3 * 3 *
4 * 4 *
5 * Name: mpi.h 5 * Name: mpi.h
diff --git a/drivers/message/fusion/lsi/mpi_cnfg.h b/drivers/message/fusion/lsi/mpi_cnfg.h
index 2bd8adae0f00..b2db3330c591 100644
--- a/drivers/message/fusion/lsi/mpi_cnfg.h
+++ b/drivers/message/fusion/lsi/mpi_cnfg.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2000-2007 LSI Corporation. 2 * Copyright (c) 2000-2008 LSI Corporation.
3 * 3 *
4 * 4 *
5 * Name: mpi_cnfg.h 5 * Name: mpi_cnfg.h
diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c
index db3c892f87fb..75e599b85b64 100644
--- a/drivers/message/fusion/mptbase.c
+++ b/drivers/message/fusion/mptbase.c
@@ -5,7 +5,7 @@
5 * For use with LSI PCI chip/adapter(s) 5 * For use with LSI PCI chip/adapter(s)
6 * running LSI Fusion MPT (Message Passing Technology) firmware. 6 * running LSI Fusion MPT (Message Passing Technology) firmware.
7 * 7 *
8 * Copyright (c) 1999-2007 LSI Corporation 8 * Copyright (c) 1999-2008 LSI Corporation
9 * (mailto:DL-MPTFusionLinux@lsi.com) 9 * (mailto:DL-MPTFusionLinux@lsi.com)
10 * 10 *
11 */ 11 */
@@ -103,7 +103,7 @@ static int mfcounter = 0;
103 * Public data... 103 * Public data...
104 */ 104 */
105 105
106struct proc_dir_entry *mpt_proc_root_dir; 106static struct proc_dir_entry *mpt_proc_root_dir;
107 107
108#define WHOINIT_UNKNOWN 0xAA 108#define WHOINIT_UNKNOWN 0xAA
109 109
@@ -253,6 +253,55 @@ mpt_get_cb_idx(MPT_DRIVER_CLASS dclass)
253 return 0; 253 return 0;
254} 254}
255 255
256/**
257 * mpt_fault_reset_work - work performed on workq after ioc fault
258 * @work: input argument, used to derive ioc
259 *
260**/
261static void
262mpt_fault_reset_work(struct work_struct *work)
263{
264 MPT_ADAPTER *ioc =
265 container_of(work, MPT_ADAPTER, fault_reset_work.work);
266 u32 ioc_raw_state;
267 int rc;
268 unsigned long flags;
269
270 if (ioc->diagPending || !ioc->active)
271 goto out;
272
273 ioc_raw_state = mpt_GetIocState(ioc, 0);
274 if ((ioc_raw_state & MPI_IOC_STATE_MASK) == MPI_IOC_STATE_FAULT) {
275 printk(MYIOC_s_WARN_FMT "IOC is in FAULT state (%04xh)!!!\n",
276 ioc->name, ioc_raw_state & MPI_DOORBELL_DATA_MASK);
277 printk(MYIOC_s_WARN_FMT "Issuing HardReset from %s!!\n",
278 ioc->name, __FUNCTION__);
279 rc = mpt_HardResetHandler(ioc, CAN_SLEEP);
280 printk(MYIOC_s_WARN_FMT "%s: HardReset: %s\n", ioc->name,
281 __FUNCTION__, (rc == 0) ? "success" : "failed");
282 ioc_raw_state = mpt_GetIocState(ioc, 0);
283 if ((ioc_raw_state & MPI_IOC_STATE_MASK) == MPI_IOC_STATE_FAULT)
284 printk(MYIOC_s_WARN_FMT "IOC is in FAULT state after "
285 "reset (%04xh)\n", ioc->name, ioc_raw_state &
286 MPI_DOORBELL_DATA_MASK);
287 }
288
289 out:
290 /*
291 * Take turns polling alternate controller
292 */
293 if (ioc->alt_ioc)
294 ioc = ioc->alt_ioc;
295
296 /* rearm the timer */
297 spin_lock_irqsave(&ioc->fault_reset_work_lock, flags);
298 if (ioc->reset_work_q)
299 queue_delayed_work(ioc->reset_work_q, &ioc->fault_reset_work,
300 msecs_to_jiffies(MPT_POLLING_INTERVAL));
301 spin_unlock_irqrestore(&ioc->fault_reset_work_lock, flags);
302}
303
304
256/* 305/*
257 * Process turbo (context) reply... 306 * Process turbo (context) reply...
258 */ 307 */
@@ -1616,6 +1665,22 @@ mpt_attach(struct pci_dev *pdev, const struct pci_device_id *id)
1616 /* Find lookup slot. */ 1665 /* Find lookup slot. */
1617 INIT_LIST_HEAD(&ioc->list); 1666 INIT_LIST_HEAD(&ioc->list);
1618 1667
1668
1669 /* Initialize workqueue */
1670 INIT_DELAYED_WORK(&ioc->fault_reset_work, mpt_fault_reset_work);
1671 spin_lock_init(&ioc->fault_reset_work_lock);
1672
1673 snprintf(ioc->reset_work_q_name, KOBJ_NAME_LEN, "mpt_poll_%d", ioc->id);
1674 ioc->reset_work_q =
1675 create_singlethread_workqueue(ioc->reset_work_q_name);
1676 if (!ioc->reset_work_q) {
1677 printk(MYIOC_s_ERR_FMT "Insufficient memory to add adapter!\n",
1678 ioc->name);
1679 pci_release_selected_regions(pdev, ioc->bars);
1680 kfree(ioc);
1681 return -ENOMEM;
1682 }
1683
1619 dinitprintk(ioc, printk(MYIOC_s_INFO_FMT "facts @ %p, pfacts[0] @ %p\n", 1684 dinitprintk(ioc, printk(MYIOC_s_INFO_FMT "facts @ %p, pfacts[0] @ %p\n",
1620 ioc->name, &ioc->facts, &ioc->pfacts[0])); 1685 ioc->name, &ioc->facts, &ioc->pfacts[0]));
1621 1686
@@ -1686,9 +1751,14 @@ mpt_attach(struct pci_dev *pdev, const struct pci_device_id *id)
1686 ioc->bus_type = SAS; 1751 ioc->bus_type = SAS;
1687 } 1752 }
1688 1753
1689 if (ioc->bus_type == SAS && mpt_msi_enable == -1) 1754 if (mpt_msi_enable == -1) {
1690 ioc->msi_enable = 1; 1755 /* Enable on SAS, disable on FC and SPI */
1691 else 1756 if (ioc->bus_type == SAS)
1757 ioc->msi_enable = 1;
1758 else
1759 ioc->msi_enable = 0;
1760 } else
1761 /* follow flag: 0 - disable; 1 - enable */
1692 ioc->msi_enable = mpt_msi_enable; 1762 ioc->msi_enable = mpt_msi_enable;
1693 1763
1694 if (ioc->errata_flag_1064) 1764 if (ioc->errata_flag_1064)
@@ -1722,6 +1792,10 @@ mpt_attach(struct pci_dev *pdev, const struct pci_device_id *id)
1722 iounmap(ioc->memmap); 1792 iounmap(ioc->memmap);
1723 if (r != -5) 1793 if (r != -5)
1724 pci_release_selected_regions(pdev, ioc->bars); 1794 pci_release_selected_regions(pdev, ioc->bars);
1795
1796 destroy_workqueue(ioc->reset_work_q);
1797 ioc->reset_work_q = NULL;
1798
1725 kfree(ioc); 1799 kfree(ioc);
1726 pci_set_drvdata(pdev, NULL); 1800 pci_set_drvdata(pdev, NULL);
1727 return r; 1801 return r;
@@ -1754,6 +1828,10 @@ mpt_attach(struct pci_dev *pdev, const struct pci_device_id *id)
1754 } 1828 }
1755#endif 1829#endif
1756 1830
1831 if (!ioc->alt_ioc)
1832 queue_delayed_work(ioc->reset_work_q, &ioc->fault_reset_work,
1833 msecs_to_jiffies(MPT_POLLING_INTERVAL));
1834
1757 return 0; 1835 return 0;
1758} 1836}
1759 1837
@@ -1769,6 +1847,19 @@ mpt_detach(struct pci_dev *pdev)
1769 MPT_ADAPTER *ioc = pci_get_drvdata(pdev); 1847 MPT_ADAPTER *ioc = pci_get_drvdata(pdev);
1770 char pname[32]; 1848 char pname[32];
1771 u8 cb_idx; 1849 u8 cb_idx;
1850 unsigned long flags;
1851 struct workqueue_struct *wq;
1852
1853 /*
1854 * Stop polling ioc for fault condition
1855 */
1856 spin_lock_irqsave(&ioc->fault_reset_work_lock, flags);
1857 wq = ioc->reset_work_q;
1858 ioc->reset_work_q = NULL;
1859 spin_unlock_irqrestore(&ioc->fault_reset_work_lock, flags);
1860 cancel_delayed_work(&ioc->fault_reset_work);
1861 destroy_workqueue(wq);
1862
1772 1863
1773 sprintf(pname, MPT_PROCFS_MPTBASEDIR "/%s/summary", ioc->name); 1864 sprintf(pname, MPT_PROCFS_MPTBASEDIR "/%s/summary", ioc->name);
1774 remove_proc_entry(pname, NULL); 1865 remove_proc_entry(pname, NULL);
@@ -7451,7 +7542,6 @@ EXPORT_SYMBOL(mpt_resume);
7451EXPORT_SYMBOL(mpt_suspend); 7542EXPORT_SYMBOL(mpt_suspend);
7452#endif 7543#endif
7453EXPORT_SYMBOL(ioc_list); 7544EXPORT_SYMBOL(ioc_list);
7454EXPORT_SYMBOL(mpt_proc_root_dir);
7455EXPORT_SYMBOL(mpt_register); 7545EXPORT_SYMBOL(mpt_register);
7456EXPORT_SYMBOL(mpt_deregister); 7546EXPORT_SYMBOL(mpt_deregister);
7457EXPORT_SYMBOL(mpt_event_register); 7547EXPORT_SYMBOL(mpt_event_register);
diff --git a/drivers/message/fusion/mptbase.h b/drivers/message/fusion/mptbase.h
index a8f617447d22..6adab648dbb9 100644
--- a/drivers/message/fusion/mptbase.h
+++ b/drivers/message/fusion/mptbase.h
@@ -5,7 +5,7 @@
5 * LSIFC9xx/LSI409xx Fibre Channel 5 * LSIFC9xx/LSI409xx Fibre Channel
6 * running LSI Fusion MPT (Message Passing Technology) firmware. 6 * running LSI Fusion MPT (Message Passing Technology) firmware.
7 * 7 *
8 * Copyright (c) 1999-2007 LSI Corporation 8 * Copyright (c) 1999-2008 LSI Corporation
9 * (mailto:DL-MPTFusionLinux@lsi.com) 9 * (mailto:DL-MPTFusionLinux@lsi.com)
10 * 10 *
11 */ 11 */
@@ -73,11 +73,11 @@
73#endif 73#endif
74 74
75#ifndef COPYRIGHT 75#ifndef COPYRIGHT
76#define COPYRIGHT "Copyright (c) 1999-2007 " MODULEAUTHOR 76#define COPYRIGHT "Copyright (c) 1999-2008 " MODULEAUTHOR
77#endif 77#endif
78 78
79#define MPT_LINUX_VERSION_COMMON "3.04.06" 79#define MPT_LINUX_VERSION_COMMON "3.04.07"
80#define MPT_LINUX_PACKAGE_NAME "@(#)mptlinux-3.04.06" 80#define MPT_LINUX_PACKAGE_NAME "@(#)mptlinux-3.04.07"
81#define WHAT_MAGIC_STRING "@" "(" "#" ")" 81#define WHAT_MAGIC_STRING "@" "(" "#" ")"
82 82
83#define show_mptmod_ver(s,ver) \ 83#define show_mptmod_ver(s,ver) \
@@ -176,6 +176,8 @@
176/* debug print string length used for events and iocstatus */ 176/* debug print string length used for events and iocstatus */
177# define EVENT_DESCR_STR_SZ 100 177# define EVENT_DESCR_STR_SZ 100
178 178
179#define MPT_POLLING_INTERVAL 1000 /* in milliseconds */
180
179#ifdef __KERNEL__ /* { */ 181#ifdef __KERNEL__ /* { */
180/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ 182/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
181 183
@@ -709,6 +711,12 @@ typedef struct _MPT_ADAPTER
709 struct workqueue_struct *fc_rescan_work_q; 711 struct workqueue_struct *fc_rescan_work_q;
710 struct scsi_cmnd **ScsiLookup; 712 struct scsi_cmnd **ScsiLookup;
711 spinlock_t scsi_lookup_lock; 713 spinlock_t scsi_lookup_lock;
714
715 char reset_work_q_name[KOBJ_NAME_LEN];
716 struct workqueue_struct *reset_work_q;
717 struct delayed_work fault_reset_work;
718 spinlock_t fault_reset_work_lock;
719
712} MPT_ADAPTER; 720} MPT_ADAPTER;
713 721
714/* 722/*
@@ -919,7 +927,6 @@ extern int mpt_raid_phys_disk_pg0(MPT_ADAPTER *ioc, u8 phys_disk_num, pRaidPhys
919 * Public data decl's... 927 * Public data decl's...
920 */ 928 */
921extern struct list_head ioc_list; 929extern struct list_head ioc_list;
922extern struct proc_dir_entry *mpt_proc_root_dir;
923 930
924/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ 931/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
925#endif /* } __KERNEL__ */ 932#endif /* } __KERNEL__ */
diff --git a/drivers/message/fusion/mptctl.c b/drivers/message/fusion/mptctl.c
index e630b50966ec..a5920423e2b2 100644
--- a/drivers/message/fusion/mptctl.c
+++ b/drivers/message/fusion/mptctl.c
@@ -4,7 +4,7 @@
4 * For use with LSI PCI chip/adapters 4 * For use with LSI PCI chip/adapters
5 * running LSI Fusion MPT (Message Passing Technology) firmware. 5 * running LSI Fusion MPT (Message Passing Technology) firmware.
6 * 6 *
7 * Copyright (c) 1999-2007 LSI Corporation 7 * Copyright (c) 1999-2008 LSI Corporation
8 * (mailto:DL-MPTFusionLinux@lsi.com) 8 * (mailto:DL-MPTFusionLinux@lsi.com)
9 * 9 *
10 */ 10 */
@@ -66,7 +66,7 @@
66#include <scsi/scsi_host.h> 66#include <scsi/scsi_host.h>
67#include <scsi/scsi_tcq.h> 67#include <scsi/scsi_tcq.h>
68 68
69#define COPYRIGHT "Copyright (c) 1999-2007 LSI Corporation" 69#define COPYRIGHT "Copyright (c) 1999-2008 LSI Corporation"
70#define MODULEAUTHOR "LSI Corporation" 70#define MODULEAUTHOR "LSI Corporation"
71#include "mptbase.h" 71#include "mptbase.h"
72#include "mptctl.h" 72#include "mptctl.h"
@@ -548,11 +548,15 @@ static int
548mptctl_fasync(int fd, struct file *filep, int mode) 548mptctl_fasync(int fd, struct file *filep, int mode)
549{ 549{
550 MPT_ADAPTER *ioc; 550 MPT_ADAPTER *ioc;
551 int ret;
551 552
553 lock_kernel();
552 list_for_each_entry(ioc, &ioc_list, list) 554 list_for_each_entry(ioc, &ioc_list, list)
553 ioc->aen_event_read_flag=0; 555 ioc->aen_event_read_flag=0;
554 556
555 return fasync_helper(fd, filep, mode, &async_queue); 557 ret = fasync_helper(fd, filep, mode, &async_queue);
558 unlock_kernel();
559 return ret;
556} 560}
557 561
558static int 562static int
diff --git a/drivers/message/fusion/mptctl.h b/drivers/message/fusion/mptctl.h
index 2c1890127e15..d564cc9ada6a 100644
--- a/drivers/message/fusion/mptctl.h
+++ b/drivers/message/fusion/mptctl.h
@@ -5,7 +5,7 @@
5 * LSIFC9xx/LSI409xx Fibre Channel 5 * LSIFC9xx/LSI409xx Fibre Channel
6 * running LSI Fusion MPT (Message Passing Technology) firmware. 6 * running LSI Fusion MPT (Message Passing Technology) firmware.
7 * 7 *
8 * Copyright (c) 1999-2007 LSI Corporation 8 * Copyright (c) 1999-2008 LSI Corporation
9 * (mailto:DL-MPTFusionLinux@lsi.com) 9 * (mailto:DL-MPTFusionLinux@lsi.com)
10 * 10 *
11 */ 11 */
diff --git a/drivers/message/fusion/mptdebug.h b/drivers/message/fusion/mptdebug.h
index ffdb0a6191b4..510b9f492093 100644
--- a/drivers/message/fusion/mptdebug.h
+++ b/drivers/message/fusion/mptdebug.h
@@ -3,7 +3,7 @@
3 * For use with LSI PCI chip/adapter(s) 3 * For use with LSI PCI chip/adapter(s)
4 * running LSI Fusion MPT (Message Passing Technology) firmware. 4 * running LSI Fusion MPT (Message Passing Technology) firmware.
5 * 5 *
6 * Copyright (c) 1999-2007 LSI Corporation 6 * Copyright (c) 1999-2008 LSI Corporation
7 * (mailto:DL-MPTFusionLinux@lsi.com) 7 * (mailto:DL-MPTFusionLinux@lsi.com)
8 * 8 *
9 */ 9 */
diff --git a/drivers/message/fusion/mptfc.c b/drivers/message/fusion/mptfc.c
index 1e24ab4ac38c..fc31ca6829d8 100644
--- a/drivers/message/fusion/mptfc.c
+++ b/drivers/message/fusion/mptfc.c
@@ -3,7 +3,7 @@
3 * For use with LSI PCI chip/adapter(s) 3 * For use with LSI PCI chip/adapter(s)
4 * running LSI Fusion MPT (Message Passing Technology) firmware. 4 * running LSI Fusion MPT (Message Passing Technology) firmware.
5 * 5 *
6 * Copyright (c) 1999-2007 LSI Corporation 6 * Copyright (c) 1999-2008 LSI Corporation
7 * (mailto:DL-MPTFusionLinux@lsi.com) 7 * (mailto:DL-MPTFusionLinux@lsi.com)
8 * 8 *
9 */ 9 */
diff --git a/drivers/message/fusion/mptlan.c b/drivers/message/fusion/mptlan.c
index 7950fc678ed1..d709d92b7b30 100644
--- a/drivers/message/fusion/mptlan.c
+++ b/drivers/message/fusion/mptlan.c
@@ -4,7 +4,7 @@
4 * For use with LSI Fibre Channel PCI chip/adapters 4 * For use with LSI Fibre Channel PCI chip/adapters
5 * running LSI Fusion MPT (Message Passing Technology) firmware. 5 * running LSI Fusion MPT (Message Passing Technology) firmware.
6 * 6 *
7 * Copyright (c) 2000-2007 LSI Corporation 7 * Copyright (c) 2000-2008 LSI Corporation
8 * (mailto:DL-MPTFusionLinux@lsi.com) 8 * (mailto:DL-MPTFusionLinux@lsi.com)
9 * 9 *
10 */ 10 */
diff --git a/drivers/message/fusion/mptlan.h b/drivers/message/fusion/mptlan.h
index bafb67fc8181..33927ee7dc3b 100644
--- a/drivers/message/fusion/mptlan.h
+++ b/drivers/message/fusion/mptlan.h
@@ -4,7 +4,7 @@
4 * For use with LSI Fibre Channel PCI chip/adapters 4 * For use with LSI Fibre Channel PCI chip/adapters
5 * running LSI Fusion MPT (Message Passing Technology) firmware. 5 * running LSI Fusion MPT (Message Passing Technology) firmware.
6 * 6 *
7 * Copyright (c) 2000-2007 LSI Corporation 7 * Copyright (c) 2000-2008 LSI Corporation
8 * (mailto:DL-MPTFusionLinux@lsi.com) 8 * (mailto:DL-MPTFusionLinux@lsi.com)
9 * 9 *
10 */ 10 */
diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c
index 4d492ba232b0..b1147aa7afde 100644
--- a/drivers/message/fusion/mptsas.c
+++ b/drivers/message/fusion/mptsas.c
@@ -3,7 +3,7 @@
3 * For use with LSI PCI chip/adapter(s) 3 * For use with LSI PCI chip/adapter(s)
4 * running LSI Fusion MPT (Message Passing Technology) firmware. 4 * running LSI Fusion MPT (Message Passing Technology) firmware.
5 * 5 *
6 * Copyright (c) 1999-2007 LSI Corporation 6 * Copyright (c) 1999-2008 LSI Corporation
7 * (mailto:DL-MPTFusionLinux@lsi.com) 7 * (mailto:DL-MPTFusionLinux@lsi.com)
8 */ 8 */
9/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ 9/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
diff --git a/drivers/message/fusion/mptsas.h b/drivers/message/fusion/mptsas.h
index 7c150f50629a..2b544e0877e6 100644
--- a/drivers/message/fusion/mptsas.h
+++ b/drivers/message/fusion/mptsas.h
@@ -5,7 +5,7 @@
5 * LSIFC9xx/LSI409xx Fibre Channel 5 * LSIFC9xx/LSI409xx Fibre Channel
6 * running LSI MPT (Message Passing Technology) firmware. 6 * running LSI MPT (Message Passing Technology) firmware.
7 * 7 *
8 * Copyright (c) 1999-2007 LSI Corporation 8 * Copyright (c) 1999-2008 LSI Corporation
9 * (mailto:DL-MPTFusionLinux@lsi.com) 9 * (mailto:DL-MPTFusionLinux@lsi.com)
10 * 10 *
11 */ 11 */
diff --git a/drivers/message/fusion/mptscsih.c b/drivers/message/fusion/mptscsih.c
index c68ef00c2f92..d142b6b4b976 100644
--- a/drivers/message/fusion/mptscsih.c
+++ b/drivers/message/fusion/mptscsih.c
@@ -3,7 +3,7 @@
3 * For use with LSI PCI chip/adapter(s) 3 * For use with LSI PCI chip/adapter(s)
4 * running LSI Fusion MPT (Message Passing Technology) firmware. 4 * running LSI Fusion MPT (Message Passing Technology) firmware.
5 * 5 *
6 * Copyright (c) 1999-2007 LSI Corporation 6 * Copyright (c) 1999-2008 LSI Corporation
7 * (mailto:DL-MPTFusionLinux@lsi.com) 7 * (mailto:DL-MPTFusionLinux@lsi.com)
8 * 8 *
9 */ 9 */
diff --git a/drivers/message/fusion/mptscsih.h b/drivers/message/fusion/mptscsih.h
index 7ea7da0e090c..319aa3033371 100644
--- a/drivers/message/fusion/mptscsih.h
+++ b/drivers/message/fusion/mptscsih.h
@@ -5,7 +5,7 @@
5 * LSIFC9xx/LSI409xx Fibre Channel 5 * LSIFC9xx/LSI409xx Fibre Channel
6 * running LSI Fusion MPT (Message Passing Technology) firmware. 6 * running LSI Fusion MPT (Message Passing Technology) firmware.
7 * 7 *
8 * Copyright (c) 1999-2007 LSI Corporation 8 * Copyright (c) 1999-2008 LSI Corporation
9 * (mailto:DL-MPTFusionLinux@lsi.com) 9 * (mailto:DL-MPTFusionLinux@lsi.com)
10 * 10 *
11 */ 11 */
diff --git a/drivers/message/fusion/mptspi.c b/drivers/message/fusion/mptspi.c
index 25bcfcf36f2e..61620144e49c 100644
--- a/drivers/message/fusion/mptspi.c
+++ b/drivers/message/fusion/mptspi.c
@@ -3,7 +3,7 @@
3 * For use with LSI PCI chip/adapter(s) 3 * For use with LSI PCI chip/adapter(s)
4 * running LSI Fusion MPT (Message Passing Technology) firmware. 4 * running LSI Fusion MPT (Message Passing Technology) firmware.
5 * 5 *
6 * Copyright (c) 1999-2007 LSI Corporation 6 * Copyright (c) 1999-2008 LSI Corporation
7 * (mailto:DL-MPTFusionLinux@lsi.com) 7 * (mailto:DL-MPTFusionLinux@lsi.com)
8 * 8 *
9 */ 9 */
@@ -447,6 +447,7 @@ static int mptspi_target_alloc(struct scsi_target *starget)
447 spi_max_offset(starget) = ioc->spi_data.maxSyncOffset; 447 spi_max_offset(starget) = ioc->spi_data.maxSyncOffset;
448 448
449 spi_offset(starget) = 0; 449 spi_offset(starget) = 0;
450 spi_period(starget) = 0xFF;
450 mptspi_write_width(starget, 0); 451 mptspi_write_width(starget, 0);
451 452
452 return 0; 453 return 0;
@@ -1266,13 +1267,18 @@ mptspi_dv_renegotiate(struct _MPT_SCSI_HOST *hd)
1266static int 1267static int
1267mptspi_ioc_reset(MPT_ADAPTER *ioc, int reset_phase) 1268mptspi_ioc_reset(MPT_ADAPTER *ioc, int reset_phase)
1268{ 1269{
1269 struct _MPT_SCSI_HOST *hd = shost_priv(ioc->sh);
1270 int rc; 1270 int rc;
1271 1271
1272 rc = mptscsih_ioc_reset(ioc, reset_phase); 1272 rc = mptscsih_ioc_reset(ioc, reset_phase);
1273 1273
1274 if (reset_phase == MPT_IOC_POST_RESET) 1274 /* only try to do a renegotiation if we're properly set up
1275 * if we get an ioc fault on bringup, ioc->sh will be NULL */
1276 if (reset_phase == MPT_IOC_POST_RESET &&
1277 ioc->sh) {
1278 struct _MPT_SCSI_HOST *hd = shost_priv(ioc->sh);
1279
1275 mptspi_dv_renegotiate(hd); 1280 mptspi_dv_renegotiate(hd);
1281 }
1276 1282
1277 return rc; 1283 return rc;
1278} 1284}
diff --git a/drivers/message/i2o/i2o_config.c b/drivers/message/i2o/i2o_config.c
index c0fb77dc19bb..4238de98d4a6 100644
--- a/drivers/message/i2o/i2o_config.c
+++ b/drivers/message/i2o/i2o_config.c
@@ -1061,6 +1061,7 @@ static int cfg_open(struct inode *inode, struct file *file)
1061 if (!tmp) 1061 if (!tmp)
1062 return -ENOMEM; 1062 return -ENOMEM;
1063 1063
1064 lock_kernel();
1064 file->private_data = (void *)(i2o_cfg_info_id++); 1065 file->private_data = (void *)(i2o_cfg_info_id++);
1065 tmp->fp = file; 1066 tmp->fp = file;
1066 tmp->fasync = NULL; 1067 tmp->fasync = NULL;
@@ -1074,6 +1075,7 @@ static int cfg_open(struct inode *inode, struct file *file)
1074 spin_lock_irqsave(&i2o_config_lock, flags); 1075 spin_lock_irqsave(&i2o_config_lock, flags);
1075 open_files = tmp; 1076 open_files = tmp;
1076 spin_unlock_irqrestore(&i2o_config_lock, flags); 1077 spin_unlock_irqrestore(&i2o_config_lock, flags);
1078 unlock_kernel();
1077 1079
1078 return 0; 1080 return 0;
1079} 1081}
@@ -1082,15 +1084,17 @@ static int cfg_fasync(int fd, struct file *fp, int on)
1082{ 1084{
1083 ulong id = (ulong) fp->private_data; 1085 ulong id = (ulong) fp->private_data;
1084 struct i2o_cfg_info *p; 1086 struct i2o_cfg_info *p;
1087 int ret = -EBADF;
1085 1088
1089 lock_kernel();
1086 for (p = open_files; p; p = p->next) 1090 for (p = open_files; p; p = p->next)
1087 if (p->q_id == id) 1091 if (p->q_id == id)
1088 break; 1092 break;
1089 1093
1090 if (!p) 1094 if (p)
1091 return -EBADF; 1095 ret = fasync_helper(fd, fp, on, &p->fasync);
1092 1096 unlock_kernel();
1093 return fasync_helper(fd, fp, on, &p->fasync); 1097 return ret;
1094} 1098}
1095 1099
1096static int cfg_release(struct inode *inode, struct file *file) 1100static int cfg_release(struct inode *inode, struct file *file)