diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/char/Kconfig | 1 | ||||
-rw-r--r-- | drivers/char/raw.c | 2 | ||||
-rw-r--r-- | drivers/hv/connection.c | 13 | ||||
-rw-r--r-- | drivers/misc/genwqe/card_dev.c | 1 | ||||
-rw-r--r-- | drivers/misc/mei/client.c | 11 | ||||
-rw-r--r-- | drivers/misc/mic/host/mic_virtio.c | 3 | ||||
-rw-r--r-- | drivers/vme/bridges/vme_ca91cx42.c | 4 | ||||
-rw-r--r-- | drivers/vme/bridges/vme_tsi148.c | 4 |
8 files changed, 21 insertions, 18 deletions
diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig index fa3243d71c76..1386749b48ff 100644 --- a/drivers/char/Kconfig +++ b/drivers/char/Kconfig | |||
@@ -499,6 +499,7 @@ config RAW_DRIVER | |||
499 | config MAX_RAW_DEVS | 499 | config MAX_RAW_DEVS |
500 | int "Maximum number of RAW devices to support (1-65536)" | 500 | int "Maximum number of RAW devices to support (1-65536)" |
501 | depends on RAW_DRIVER | 501 | depends on RAW_DRIVER |
502 | range 1 65536 | ||
502 | default "256" | 503 | default "256" |
503 | help | 504 | help |
504 | The maximum number of RAW devices that are supported. | 505 | The maximum number of RAW devices that are supported. |
diff --git a/drivers/char/raw.c b/drivers/char/raw.c index f3223aac4df1..6e8d65e9b1d3 100644 --- a/drivers/char/raw.c +++ b/drivers/char/raw.c | |||
@@ -190,7 +190,7 @@ static int bind_get(int number, dev_t *dev) | |||
190 | struct raw_device_data *rawdev; | 190 | struct raw_device_data *rawdev; |
191 | struct block_device *bdev; | 191 | struct block_device *bdev; |
192 | 192 | ||
193 | if (number <= 0 || number >= MAX_RAW_MINORS) | 193 | if (number <= 0 || number >= max_raw_minors) |
194 | return -EINVAL; | 194 | return -EINVAL; |
195 | 195 | ||
196 | rawdev = &raw_devices[number]; | 196 | rawdev = &raw_devices[number]; |
diff --git a/drivers/hv/connection.c b/drivers/hv/connection.c index af6edf9b1936..f2d7bf90c9fe 100644 --- a/drivers/hv/connection.c +++ b/drivers/hv/connection.c | |||
@@ -67,7 +67,6 @@ static int vmbus_negotiate_version(struct vmbus_channel_msginfo *msginfo, | |||
67 | int ret = 0; | 67 | int ret = 0; |
68 | struct vmbus_channel_initiate_contact *msg; | 68 | struct vmbus_channel_initiate_contact *msg; |
69 | unsigned long flags; | 69 | unsigned long flags; |
70 | int t; | ||
71 | 70 | ||
72 | init_completion(&msginfo->waitevent); | 71 | init_completion(&msginfo->waitevent); |
73 | 72 | ||
@@ -78,6 +77,8 @@ static int vmbus_negotiate_version(struct vmbus_channel_msginfo *msginfo, | |||
78 | msg->interrupt_page = virt_to_phys(vmbus_connection.int_page); | 77 | msg->interrupt_page = virt_to_phys(vmbus_connection.int_page); |
79 | msg->monitor_page1 = virt_to_phys(vmbus_connection.monitor_pages[0]); | 78 | msg->monitor_page1 = virt_to_phys(vmbus_connection.monitor_pages[0]); |
80 | msg->monitor_page2 = virt_to_phys(vmbus_connection.monitor_pages[1]); | 79 | msg->monitor_page2 = virt_to_phys(vmbus_connection.monitor_pages[1]); |
80 | if (version == VERSION_WIN8) | ||
81 | msg->target_vcpu = hv_context.vp_index[smp_processor_id()]; | ||
81 | 82 | ||
82 | /* | 83 | /* |
83 | * Add to list before we send the request since we may | 84 | * Add to list before we send the request since we may |
@@ -100,15 +101,7 @@ static int vmbus_negotiate_version(struct vmbus_channel_msginfo *msginfo, | |||
100 | } | 101 | } |
101 | 102 | ||
102 | /* Wait for the connection response */ | 103 | /* Wait for the connection response */ |
103 | t = wait_for_completion_timeout(&msginfo->waitevent, 5*HZ); | 104 | wait_for_completion(&msginfo->waitevent); |
104 | if (t == 0) { | ||
105 | spin_lock_irqsave(&vmbus_connection.channelmsg_lock, | ||
106 | flags); | ||
107 | list_del(&msginfo->msglistentry); | ||
108 | spin_unlock_irqrestore(&vmbus_connection.channelmsg_lock, | ||
109 | flags); | ||
110 | return -ETIMEDOUT; | ||
111 | } | ||
112 | 105 | ||
113 | spin_lock_irqsave(&vmbus_connection.channelmsg_lock, flags); | 106 | spin_lock_irqsave(&vmbus_connection.channelmsg_lock, flags); |
114 | list_del(&msginfo->msglistentry); | 107 | list_del(&msginfo->msglistentry); |
diff --git a/drivers/misc/genwqe/card_dev.c b/drivers/misc/genwqe/card_dev.c index 8f8a6b327cdb..2c2c9cc75231 100644 --- a/drivers/misc/genwqe/card_dev.c +++ b/drivers/misc/genwqe/card_dev.c | |||
@@ -787,6 +787,7 @@ static int genwqe_pin_mem(struct genwqe_file *cfile, struct genwqe_mem *m) | |||
787 | if (rc != 0) { | 787 | if (rc != 0) { |
788 | dev_err(&pci_dev->dev, | 788 | dev_err(&pci_dev->dev, |
789 | "[%s] genwqe_user_vmap rc=%d\n", __func__, rc); | 789 | "[%s] genwqe_user_vmap rc=%d\n", __func__, rc); |
790 | kfree(dma_map); | ||
790 | return rc; | 791 | return rc; |
791 | } | 792 | } |
792 | 793 | ||
diff --git a/drivers/misc/mei/client.c b/drivers/misc/mei/client.c index 1ee2b9492a82..9b809cfc2899 100644 --- a/drivers/misc/mei/client.c +++ b/drivers/misc/mei/client.c | |||
@@ -908,7 +908,6 @@ void mei_cl_all_disconnect(struct mei_device *dev) | |||
908 | list_for_each_entry_safe(cl, next, &dev->file_list, link) { | 908 | list_for_each_entry_safe(cl, next, &dev->file_list, link) { |
909 | cl->state = MEI_FILE_DISCONNECTED; | 909 | cl->state = MEI_FILE_DISCONNECTED; |
910 | cl->mei_flow_ctrl_creds = 0; | 910 | cl->mei_flow_ctrl_creds = 0; |
911 | cl->read_cb = NULL; | ||
912 | cl->timer_count = 0; | 911 | cl->timer_count = 0; |
913 | } | 912 | } |
914 | } | 913 | } |
@@ -942,8 +941,16 @@ void mei_cl_all_wakeup(struct mei_device *dev) | |||
942 | void mei_cl_all_write_clear(struct mei_device *dev) | 941 | void mei_cl_all_write_clear(struct mei_device *dev) |
943 | { | 942 | { |
944 | struct mei_cl_cb *cb, *next; | 943 | struct mei_cl_cb *cb, *next; |
944 | struct list_head *list; | ||
945 | 945 | ||
946 | list_for_each_entry_safe(cb, next, &dev->write_list.list, list) { | 946 | list = &dev->write_list.list; |
947 | list_for_each_entry_safe(cb, next, list, list) { | ||
948 | list_del(&cb->list); | ||
949 | mei_io_cb_free(cb); | ||
950 | } | ||
951 | |||
952 | list = &dev->write_waiting_list.list; | ||
953 | list_for_each_entry_safe(cb, next, list, list) { | ||
947 | list_del(&cb->list); | 954 | list_del(&cb->list); |
948 | mei_io_cb_free(cb); | 955 | mei_io_cb_free(cb); |
949 | } | 956 | } |
diff --git a/drivers/misc/mic/host/mic_virtio.c b/drivers/misc/mic/host/mic_virtio.c index 752ff873f891..7e1ef0ebbb80 100644 --- a/drivers/misc/mic/host/mic_virtio.c +++ b/drivers/misc/mic/host/mic_virtio.c | |||
@@ -156,7 +156,8 @@ static int mic_vringh_copy(struct mic_vdev *mvdev, struct vringh_kiov *iov, | |||
156 | static int _mic_virtio_copy(struct mic_vdev *mvdev, | 156 | static int _mic_virtio_copy(struct mic_vdev *mvdev, |
157 | struct mic_copy_desc *copy) | 157 | struct mic_copy_desc *copy) |
158 | { | 158 | { |
159 | int ret = 0, iovcnt = copy->iovcnt; | 159 | int ret = 0; |
160 | u32 iovcnt = copy->iovcnt; | ||
160 | struct iovec iov; | 161 | struct iovec iov; |
161 | struct iovec __user *u_iov = copy->iov; | 162 | struct iovec __user *u_iov = copy->iov; |
162 | void __user *ubuf = NULL; | 163 | void __user *ubuf = NULL; |
diff --git a/drivers/vme/bridges/vme_ca91cx42.c b/drivers/vme/bridges/vme_ca91cx42.c index a06edbfa95ca..1b5d48c578e1 100644 --- a/drivers/vme/bridges/vme_ca91cx42.c +++ b/drivers/vme/bridges/vme_ca91cx42.c | |||
@@ -884,7 +884,7 @@ static ssize_t ca91cx42_master_read(struct vme_master_resource *image, | |||
884 | if (done == count) | 884 | if (done == count) |
885 | goto out; | 885 | goto out; |
886 | } | 886 | } |
887 | if ((uintptr_t)addr & 0x2) { | 887 | if ((uintptr_t)(addr + done) & 0x2) { |
888 | if ((count - done) < 2) { | 888 | if ((count - done) < 2) { |
889 | *(u8 *)(buf + done) = ioread8(addr + done); | 889 | *(u8 *)(buf + done) = ioread8(addr + done); |
890 | done += 1; | 890 | done += 1; |
@@ -938,7 +938,7 @@ static ssize_t ca91cx42_master_write(struct vme_master_resource *image, | |||
938 | if (done == count) | 938 | if (done == count) |
939 | goto out; | 939 | goto out; |
940 | } | 940 | } |
941 | if ((uintptr_t)addr & 0x2) { | 941 | if ((uintptr_t)(addr + done) & 0x2) { |
942 | if ((count - done) < 2) { | 942 | if ((count - done) < 2) { |
943 | iowrite8(*(u8 *)(buf + done), addr + done); | 943 | iowrite8(*(u8 *)(buf + done), addr + done); |
944 | done += 1; | 944 | done += 1; |
diff --git a/drivers/vme/bridges/vme_tsi148.c b/drivers/vme/bridges/vme_tsi148.c index 16830d8b777c..9911cd5fddb5 100644 --- a/drivers/vme/bridges/vme_tsi148.c +++ b/drivers/vme/bridges/vme_tsi148.c | |||
@@ -1289,7 +1289,7 @@ static ssize_t tsi148_master_read(struct vme_master_resource *image, void *buf, | |||
1289 | if (done == count) | 1289 | if (done == count) |
1290 | goto out; | 1290 | goto out; |
1291 | } | 1291 | } |
1292 | if ((uintptr_t)addr & 0x2) { | 1292 | if ((uintptr_t)(addr + done) & 0x2) { |
1293 | if ((count - done) < 2) { | 1293 | if ((count - done) < 2) { |
1294 | *(u8 *)(buf + done) = ioread8(addr + done); | 1294 | *(u8 *)(buf + done) = ioread8(addr + done); |
1295 | done += 1; | 1295 | done += 1; |
@@ -1371,7 +1371,7 @@ static ssize_t tsi148_master_write(struct vme_master_resource *image, void *buf, | |||
1371 | if (done == count) | 1371 | if (done == count) |
1372 | goto out; | 1372 | goto out; |
1373 | } | 1373 | } |
1374 | if ((uintptr_t)addr & 0x2) { | 1374 | if ((uintptr_t)(addr + done) & 0x2) { |
1375 | if ((count - done) < 2) { | 1375 | if ((count - done) < 2) { |
1376 | iowrite8(*(u8 *)(buf + done), addr + done); | 1376 | iowrite8(*(u8 *)(buf + done), addr + done); |
1377 | done += 1; | 1377 | done += 1; |