aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/message
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/message')
-rw-r--r--drivers/message/fusion/mptbase.c11
-rw-r--r--drivers/message/fusion/mptctl.c6
-rw-r--r--drivers/message/fusion/mptspi.c9
-rw-r--r--drivers/message/i2o/i2o_config.c12
4 files changed, 28 insertions, 10 deletions
diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c
index db3c892f87fb..d40d6d15ae20 100644
--- a/drivers/message/fusion/mptbase.c
+++ b/drivers/message/fusion/mptbase.c
@@ -1686,9 +1686,14 @@ mpt_attach(struct pci_dev *pdev, const struct pci_device_id *id)
1686 ioc->bus_type = SAS; 1686 ioc->bus_type = SAS;
1687 } 1687 }
1688 1688
1689 if (ioc->bus_type == SAS && mpt_msi_enable == -1) 1689 if (mpt_msi_enable == -1) {
1690 ioc->msi_enable = 1; 1690 /* Enable on SAS, disable on FC and SPI */
1691 else 1691 if (ioc->bus_type == SAS)
1692 ioc->msi_enable = 1;
1693 else
1694 ioc->msi_enable = 0;
1695 } else
1696 /* follow flag: 0 - disable; 1 - enable */
1692 ioc->msi_enable = mpt_msi_enable; 1697 ioc->msi_enable = mpt_msi_enable;
1693 1698
1694 if (ioc->errata_flag_1064) 1699 if (ioc->errata_flag_1064)
diff --git a/drivers/message/fusion/mptctl.c b/drivers/message/fusion/mptctl.c
index e630b50966ec..c5946560c4e2 100644
--- a/drivers/message/fusion/mptctl.c
+++ b/drivers/message/fusion/mptctl.c
@@ -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/mptspi.c b/drivers/message/fusion/mptspi.c
index 25bcfcf36f2e..1effca4e40e1 100644
--- a/drivers/message/fusion/mptspi.c
+++ b/drivers/message/fusion/mptspi.c
@@ -1266,13 +1266,18 @@ mptspi_dv_renegotiate(struct _MPT_SCSI_HOST *hd)
1266static int 1266static int
1267mptspi_ioc_reset(MPT_ADAPTER *ioc, int reset_phase) 1267mptspi_ioc_reset(MPT_ADAPTER *ioc, int reset_phase)
1268{ 1268{
1269 struct _MPT_SCSI_HOST *hd = shost_priv(ioc->sh);
1270 int rc; 1269 int rc;
1271 1270
1272 rc = mptscsih_ioc_reset(ioc, reset_phase); 1271 rc = mptscsih_ioc_reset(ioc, reset_phase);
1273 1272
1274 if (reset_phase == MPT_IOC_POST_RESET) 1273 /* only try to do a renegotiation if we're properly set up
1274 * if we get an ioc fault on bringup, ioc->sh will be NULL */
1275 if (reset_phase == MPT_IOC_POST_RESET &&
1276 ioc->sh) {
1277 struct _MPT_SCSI_HOST *hd = shost_priv(ioc->sh);
1278
1275 mptspi_dv_renegotiate(hd); 1279 mptspi_dv_renegotiate(hd);
1280 }
1276 1281
1277 return rc; 1282 return rc;
1278} 1283}
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)