aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-12-08 21:47:25 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-12-08 21:47:25 -0500
commitf64001ef16312e94deb28297f5ffd4ada3e32ae9 (patch)
tree9b00f1efc3f593e9df7c7630ae29fd28d15df0a1 /Documentation
parentb19d69c72d4e3da67f0feb2ecf45d6e60c82baf1 (diff)
parent76a9635979e543f04a5885198e68ff28e3311b67 (diff)
Merge tag 'char-misc-3.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc
Pull char/misc driver fixes from Greg KH: "Nothing huge, just a few small bugfixes for problems reported, and a device id update" * tag 'char-misc-3.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: mei: add 9 series PCH mei device ids drivers/char/i8k.c: add Dell XPLS L421X MAINTAINERS: add HSI subsystem misc: mic: Suppress memory space sparse warnings misc: mic: Fix endianness issues. misc: mic: Fix user space namespace pollution from mic_common.h. misc: mic: Bug fix for sysfs poll usage. misc: mic: Minor bug fix in 'retry' loops. misc: mic: Change mic_notify(...) to return true. extcon: remove freed groups caused the panic or warning in unregister flow extcon: arizona: Get pdata from arizona structure not device
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/mic/mpssd/mpssd.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/Documentation/mic/mpssd/mpssd.c b/Documentation/mic/mpssd/mpssd.c
index 0c980ad40b17..4d17487d5ad9 100644
--- a/Documentation/mic/mpssd/mpssd.c
+++ b/Documentation/mic/mpssd/mpssd.c
@@ -313,7 +313,7 @@ static struct mic_device_desc *get_device_desc(struct mic_info *mic, int type)
313 int i; 313 int i;
314 void *dp = get_dp(mic, type); 314 void *dp = get_dp(mic, type);
315 315
316 for (i = mic_aligned_size(struct mic_bootparam); i < PAGE_SIZE; 316 for (i = sizeof(struct mic_bootparam); i < PAGE_SIZE;
317 i += mic_total_desc_size(d)) { 317 i += mic_total_desc_size(d)) {
318 d = dp + i; 318 d = dp + i;
319 319
@@ -445,8 +445,8 @@ init_vr(struct mic_info *mic, int fd, int type,
445 __func__, mic->name, vr0->va, vr0->info, vr_size, 445 __func__, mic->name, vr0->va, vr0->info, vr_size,
446 vring_size(MIC_VRING_ENTRIES, MIC_VIRTIO_RING_ALIGN)); 446 vring_size(MIC_VRING_ENTRIES, MIC_VIRTIO_RING_ALIGN));
447 mpsslog("magic 0x%x expected 0x%x\n", 447 mpsslog("magic 0x%x expected 0x%x\n",
448 vr0->info->magic, MIC_MAGIC + type); 448 le32toh(vr0->info->magic), MIC_MAGIC + type);
449 assert(vr0->info->magic == MIC_MAGIC + type); 449 assert(le32toh(vr0->info->magic) == MIC_MAGIC + type);
450 if (vr1) { 450 if (vr1) {
451 vr1->va = (struct mic_vring *) 451 vr1->va = (struct mic_vring *)
452 &va[MIC_DEVICE_PAGE_END + vr_size]; 452 &va[MIC_DEVICE_PAGE_END + vr_size];
@@ -458,8 +458,8 @@ init_vr(struct mic_info *mic, int fd, int type,
458 __func__, mic->name, vr1->va, vr1->info, vr_size, 458 __func__, mic->name, vr1->va, vr1->info, vr_size,
459 vring_size(MIC_VRING_ENTRIES, MIC_VIRTIO_RING_ALIGN)); 459 vring_size(MIC_VRING_ENTRIES, MIC_VIRTIO_RING_ALIGN));
460 mpsslog("magic 0x%x expected 0x%x\n", 460 mpsslog("magic 0x%x expected 0x%x\n",
461 vr1->info->magic, MIC_MAGIC + type + 1); 461 le32toh(vr1->info->magic), MIC_MAGIC + type + 1);
462 assert(vr1->info->magic == MIC_MAGIC + type + 1); 462 assert(le32toh(vr1->info->magic) == MIC_MAGIC + type + 1);
463 } 463 }
464done: 464done:
465 return va; 465 return va;
@@ -520,7 +520,7 @@ static void *
520virtio_net(void *arg) 520virtio_net(void *arg)
521{ 521{
522 static __u8 vnet_hdr[2][sizeof(struct virtio_net_hdr)]; 522 static __u8 vnet_hdr[2][sizeof(struct virtio_net_hdr)];
523 static __u8 vnet_buf[2][MAX_NET_PKT_SIZE] __aligned(64); 523 static __u8 vnet_buf[2][MAX_NET_PKT_SIZE] __attribute__ ((aligned(64)));
524 struct iovec vnet_iov[2][2] = { 524 struct iovec vnet_iov[2][2] = {
525 { { .iov_base = vnet_hdr[0], .iov_len = sizeof(vnet_hdr[0]) }, 525 { { .iov_base = vnet_hdr[0], .iov_len = sizeof(vnet_hdr[0]) },
526 { .iov_base = vnet_buf[0], .iov_len = sizeof(vnet_buf[0]) } }, 526 { .iov_base = vnet_buf[0], .iov_len = sizeof(vnet_buf[0]) } },
@@ -1412,6 +1412,12 @@ mic_config(void *arg)
1412 } 1412 }
1413 1413
1414 do { 1414 do {
1415 ret = lseek(fd, 0, SEEK_SET);
1416 if (ret < 0) {
1417 mpsslog("%s: Failed to seek to file start '%s': %s\n",
1418 mic->name, pathname, strerror(errno));
1419 goto close_error1;
1420 }
1415 ret = read(fd, value, sizeof(value)); 1421 ret = read(fd, value, sizeof(value));
1416 if (ret < 0) { 1422 if (ret < 0) {
1417 mpsslog("%s: Failed to read sysfs entry '%s': %s\n", 1423 mpsslog("%s: Failed to read sysfs entry '%s': %s\n",