diff options
Diffstat (limited to 'drivers/message')
-rw-r--r-- | drivers/message/fusion/mptbase.c | 11 | ||||
-rw-r--r-- | drivers/message/fusion/mptctl.c | 6 | ||||
-rw-r--r-- | drivers/message/fusion/mptspi.c | 9 | ||||
-rw-r--r-- | drivers/message/i2o/i2o_config.c | 12 |
4 files changed, 28 insertions, 10 deletions
diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c index 9bc35617b871..75e599b85b64 100644 --- a/drivers/message/fusion/mptbase.c +++ b/drivers/message/fusion/mptbase.c | |||
@@ -1751,9 +1751,14 @@ mpt_attach(struct pci_dev *pdev, const struct pci_device_id *id) | |||
1751 | ioc->bus_type = SAS; | 1751 | ioc->bus_type = SAS; |
1752 | } | 1752 | } |
1753 | 1753 | ||
1754 | if (ioc->bus_type == SAS && mpt_msi_enable == -1) | 1754 | if (mpt_msi_enable == -1) { |
1755 | ioc->msi_enable = 1; | 1755 | /* Enable on SAS, disable on FC and SPI */ |
1756 | 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 */ | ||
1757 | ioc->msi_enable = mpt_msi_enable; | 1762 | ioc->msi_enable = mpt_msi_enable; |
1758 | 1763 | ||
1759 | if (ioc->errata_flag_1064) | 1764 | if (ioc->errata_flag_1064) |
diff --git a/drivers/message/fusion/mptctl.c b/drivers/message/fusion/mptctl.c index 68c844b2859d..a5920423e2b2 100644 --- a/drivers/message/fusion/mptctl.c +++ b/drivers/message/fusion/mptctl.c | |||
@@ -548,11 +548,15 @@ static int | |||
548 | mptctl_fasync(int fd, struct file *filep, int mode) | 548 | mptctl_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 | ||
558 | static int | 562 | static int |
diff --git a/drivers/message/fusion/mptspi.c b/drivers/message/fusion/mptspi.c index 9b49516cf5a0..61620144e49c 100644 --- a/drivers/message/fusion/mptspi.c +++ b/drivers/message/fusion/mptspi.c | |||
@@ -1267,13 +1267,18 @@ mptspi_dv_renegotiate(struct _MPT_SCSI_HOST *hd) | |||
1267 | static int | 1267 | static int |
1268 | mptspi_ioc_reset(MPT_ADAPTER *ioc, int reset_phase) | 1268 | mptspi_ioc_reset(MPT_ADAPTER *ioc, int reset_phase) |
1269 | { | 1269 | { |
1270 | struct _MPT_SCSI_HOST *hd = shost_priv(ioc->sh); | ||
1271 | int rc; | 1270 | int rc; |
1272 | 1271 | ||
1273 | rc = mptscsih_ioc_reset(ioc, reset_phase); | 1272 | rc = mptscsih_ioc_reset(ioc, reset_phase); |
1274 | 1273 | ||
1275 | 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 | |||
1276 | mptspi_dv_renegotiate(hd); | 1280 | mptspi_dv_renegotiate(hd); |
1281 | } | ||
1277 | 1282 | ||
1278 | return rc; | 1283 | return rc; |
1279 | } | 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 | ||
1096 | static int cfg_release(struct inode *inode, struct file *file) | 1100 | static int cfg_release(struct inode *inode, struct file *file) |