diff options
Diffstat (limited to 'drivers/scsi/mpt2sas')
-rw-r--r-- | drivers/scsi/mpt2sas/mpt2sas_base.c | 2 | ||||
-rw-r--r-- | drivers/scsi/mpt2sas/mpt2sas_ctl.c | 12 | ||||
-rw-r--r-- | drivers/scsi/mpt2sas/mpt2sas_scsih.c | 4 |
3 files changed, 11 insertions, 7 deletions
diff --git a/drivers/scsi/mpt2sas/mpt2sas_base.c b/drivers/scsi/mpt2sas/mpt2sas_base.c index 57bcd5c9dcff..12faf64f91b0 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_base.c +++ b/drivers/scsi/mpt2sas/mpt2sas_base.c | |||
@@ -534,7 +534,7 @@ _base_display_event_data(struct MPT2SAS_ADAPTER *ioc, | |||
534 | if (event_data->DiscoveryStatus) | 534 | if (event_data->DiscoveryStatus) |
535 | printk("discovery_status(0x%08x)", | 535 | printk("discovery_status(0x%08x)", |
536 | le32_to_cpu(event_data->DiscoveryStatus)); | 536 | le32_to_cpu(event_data->DiscoveryStatus)); |
537 | printk("\n"); | 537 | printk("\n"); |
538 | return; | 538 | return; |
539 | } | 539 | } |
540 | case MPI2_EVENT_SAS_BROADCAST_PRIMITIVE: | 540 | case MPI2_EVENT_SAS_BROADCAST_PRIMITIVE: |
diff --git a/drivers/scsi/mpt2sas/mpt2sas_ctl.c b/drivers/scsi/mpt2sas/mpt2sas_ctl.c index b774973f0765..40cb8aeb21b1 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_ctl.c +++ b/drivers/scsi/mpt2sas/mpt2sas_ctl.c | |||
@@ -51,7 +51,7 @@ | |||
51 | #include <linux/types.h> | 51 | #include <linux/types.h> |
52 | #include <linux/pci.h> | 52 | #include <linux/pci.h> |
53 | #include <linux/delay.h> | 53 | #include <linux/delay.h> |
54 | #include <linux/smp_lock.h> | 54 | #include <linux/mutex.h> |
55 | #include <linux/compat.h> | 55 | #include <linux/compat.h> |
56 | #include <linux/poll.h> | 56 | #include <linux/poll.h> |
57 | 57 | ||
@@ -61,6 +61,7 @@ | |||
61 | #include "mpt2sas_base.h" | 61 | #include "mpt2sas_base.h" |
62 | #include "mpt2sas_ctl.h" | 62 | #include "mpt2sas_ctl.h" |
63 | 63 | ||
64 | static DEFINE_MUTEX(_ctl_mutex); | ||
64 | static struct fasync_struct *async_queue; | 65 | static struct fasync_struct *async_queue; |
65 | static DECLARE_WAIT_QUEUE_HEAD(ctl_poll_wait); | 66 | static DECLARE_WAIT_QUEUE_HEAD(ctl_poll_wait); |
66 | 67 | ||
@@ -2238,9 +2239,9 @@ _ctl_ioctl(struct file *file, unsigned int cmd, unsigned long arg) | |||
2238 | { | 2239 | { |
2239 | long ret; | 2240 | long ret; |
2240 | 2241 | ||
2241 | lock_kernel(); | 2242 | mutex_lock(&_ctl_mutex); |
2242 | ret = _ctl_ioctl_main(file, cmd, (void __user *)arg); | 2243 | ret = _ctl_ioctl_main(file, cmd, (void __user *)arg); |
2243 | unlock_kernel(); | 2244 | mutex_unlock(&_ctl_mutex); |
2244 | return ret; | 2245 | return ret; |
2245 | } | 2246 | } |
2246 | 2247 | ||
@@ -2309,12 +2310,12 @@ _ctl_ioctl_compat(struct file *file, unsigned cmd, unsigned long arg) | |||
2309 | { | 2310 | { |
2310 | long ret; | 2311 | long ret; |
2311 | 2312 | ||
2312 | lock_kernel(); | 2313 | mutex_lock(&_ctl_mutex); |
2313 | if (cmd == MPT2COMMAND32) | 2314 | if (cmd == MPT2COMMAND32) |
2314 | ret = _ctl_compat_mpt_command(file, cmd, arg); | 2315 | ret = _ctl_compat_mpt_command(file, cmd, arg); |
2315 | else | 2316 | else |
2316 | ret = _ctl_ioctl_main(file, cmd, (void __user *)arg); | 2317 | ret = _ctl_ioctl_main(file, cmd, (void __user *)arg); |
2317 | unlock_kernel(); | 2318 | mutex_unlock(&_ctl_mutex); |
2318 | return ret; | 2319 | return ret; |
2319 | } | 2320 | } |
2320 | #endif | 2321 | #endif |
@@ -2952,6 +2953,7 @@ static const struct file_operations ctl_fops = { | |||
2952 | #ifdef CONFIG_COMPAT | 2953 | #ifdef CONFIG_COMPAT |
2953 | .compat_ioctl = _ctl_ioctl_compat, | 2954 | .compat_ioctl = _ctl_ioctl_compat, |
2954 | #endif | 2955 | #endif |
2956 | .llseek = noop_llseek, | ||
2955 | }; | 2957 | }; |
2956 | 2958 | ||
2957 | static struct miscdevice ctl_dev = { | 2959 | static struct miscdevice ctl_dev = { |
diff --git a/drivers/scsi/mpt2sas/mpt2sas_scsih.c b/drivers/scsi/mpt2sas/mpt2sas_scsih.c index 16e99b686354..1a96a00418a4 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_scsih.c +++ b/drivers/scsi/mpt2sas/mpt2sas_scsih.c | |||
@@ -3315,7 +3315,7 @@ _scsih_eedp_error_handling(struct scsi_cmnd *scmd, u16 ioc_status) | |||
3315 | * SCSI_MLQUEUE_HOST_BUSY if the entire host queue is full | 3315 | * SCSI_MLQUEUE_HOST_BUSY if the entire host queue is full |
3316 | */ | 3316 | */ |
3317 | static int | 3317 | static int |
3318 | _scsih_qcmd(struct scsi_cmnd *scmd, void (*done)(struct scsi_cmnd *)) | 3318 | _scsih_qcmd_lck(struct scsi_cmnd *scmd, void (*done)(struct scsi_cmnd *)) |
3319 | { | 3319 | { |
3320 | struct MPT2SAS_ADAPTER *ioc = shost_priv(scmd->device->host); | 3320 | struct MPT2SAS_ADAPTER *ioc = shost_priv(scmd->device->host); |
3321 | struct MPT2SAS_DEVICE *sas_device_priv_data; | 3321 | struct MPT2SAS_DEVICE *sas_device_priv_data; |
@@ -3441,6 +3441,8 @@ _scsih_qcmd(struct scsi_cmnd *scmd, void (*done)(struct scsi_cmnd *)) | |||
3441 | return SCSI_MLQUEUE_HOST_BUSY; | 3441 | return SCSI_MLQUEUE_HOST_BUSY; |
3442 | } | 3442 | } |
3443 | 3443 | ||
3444 | static DEF_SCSI_QCMD(_scsih_qcmd) | ||
3445 | |||
3444 | /** | 3446 | /** |
3445 | * _scsih_normalize_sense - normalize descriptor and fixed format sense data | 3447 | * _scsih_normalize_sense - normalize descriptor and fixed format sense data |
3446 | * @sense_buffer: sense data returned by target | 3448 | * @sense_buffer: sense data returned by target |