search for: mic_device_ctrl

Displaying 20 results from an estimated 42 matches for "mic_device_ctrl".

2013 Nov 26
0
[PATCH char-misc-linus 5/5] misc: mic: Fix user space namespace pollution from mic_common.h.
...p;desc->feature_len) * 2 + ioread8(&desc->config_len); } @@ -67,8 +67,7 @@ mic_vq_configspace(struct mic_device_desc __iomem *desc) } static inline unsigned mic_total_desc_size(struct mic_device_desc __iomem *desc) { - return mic_aligned_desc_size(desc) + - mic_aligned_size(struct mic_device_ctrl); + return mic_aligned_desc_size(desc) + sizeof(struct mic_device_ctrl); } int mic_devices_init(struct mic_driver *mdrv); diff --git a/drivers/misc/mic/host/mic_virtio.c b/drivers/misc/mic/host/mic_virtio.c index 074e736..e04bb4f 100644 --- a/drivers/misc/mic/host/mic_virtio.c +++ b/drivers/mis...
2013 Nov 26
0
[PATCH char-misc-linus v2 5/5] misc: mic: Fix user space namespace pollution from mic_common.h.
...p;desc->feature_len) * 2 + ioread8(&desc->config_len); } @@ -67,8 +67,7 @@ mic_vq_configspace(struct mic_device_desc __iomem *desc) } static inline unsigned mic_total_desc_size(struct mic_device_desc __iomem *desc) { - return mic_aligned_desc_size(desc) + - mic_aligned_size(struct mic_device_ctrl); + return mic_aligned_desc_size(desc) + sizeof(struct mic_device_ctrl); } int mic_devices_init(struct mic_driver *mdrv); diff --git a/drivers/misc/mic/host/mic_virtio.c b/drivers/misc/mic/host/mic_virtio.c index 074e736..e04bb4f 100644 --- a/drivers/misc/mic/host/mic_virtio.c +++ b/drivers/mis...
2013 Nov 26
0
[PATCH char-misc-linus v2 5/5] misc: mic: Fix user space namespace pollution from mic_common.h.
...p;desc->feature_len) * 2 + ioread8(&desc->config_len); } @@ -67,8 +67,7 @@ mic_vq_configspace(struct mic_device_desc __iomem *desc) } static inline unsigned mic_total_desc_size(struct mic_device_desc __iomem *desc) { - return mic_aligned_desc_size(desc) + - mic_aligned_size(struct mic_device_ctrl); + return mic_aligned_desc_size(desc) + sizeof(struct mic_device_ctrl); } int mic_devices_init(struct mic_driver *mdrv); diff --git a/drivers/misc/mic/host/mic_virtio.c b/drivers/misc/mic/host/mic_virtio.c index 074e736..e04bb4f 100644 --- a/drivers/misc/mic/host/mic_virtio.c +++ b/drivers/mis...
2013 Nov 27
7
[PATCH char-misc-linus v3 0/6] misc: mic: Fixes for 3.13-final
These patches fix various issues which were reported or found with the MIC driver. Changelog ========= v2 => v3: * Reorder patch 5 in v2 to patch 4 in v3. * Split patch 4 in v2 into patches 5 and 6 in v3. v1 => v2: @ https://lkml.org/lkml/2013/11/26/376 * Address review comments @ https://lkml.org/lkml/2013/11/26/443 in patch 5. v1: Initial post @ https://lkml.org/lkml/2013/11/26/321
2013 Nov 27
7
[PATCH char-misc-linus v3 0/6] misc: mic: Fixes for 3.13-final
These patches fix various issues which were reported or found with the MIC driver. Changelog ========= v2 => v3: * Reorder patch 5 in v2 to patch 4 in v3. * Split patch 4 in v2 into patches 5 and 6 in v3. v1 => v2: @ https://lkml.org/lkml/2013/11/26/376 * Address review comments @ https://lkml.org/lkml/2013/11/26/443 in patch 5. v1: Initial post @ https://lkml.org/lkml/2013/11/26/321
2013 Nov 26
7
[PATCH char-misc-linus 0/5] misc: mic: Fixes for 3.13-rc2
These patches fix various issues which were reported or found with the MIC driver. Ashutosh Dixit (3): misc: mic: Bug fix for sysfs poll usage. misc: mic: Fix sparse warnings and other endianness issues. misc: mic: Fix user space namespace pollution from mic_common.h. Sudeep Dutt (2): misc: mic: Change mic_notify(...) to return true. misc: mic: Minor bug fix in 'retry' loops.
2013 Nov 26
7
[PATCH char-misc-linus 0/5] misc: mic: Fixes for 3.13-rc2
These patches fix various issues which were reported or found with the MIC driver. Ashutosh Dixit (3): misc: mic: Bug fix for sysfs poll usage. misc: mic: Fix sparse warnings and other endianness issues. misc: mic: Fix user space namespace pollution from mic_common.h. Sudeep Dutt (2): misc: mic: Change mic_notify(...) to return true. misc: mic: Minor bug fix in 'retry' loops.
2013 Jul 25
1
[PATCH 4/5] Intel MIC Card Driver Changes for Virtio Devices.
...e <linux/wait.h> +#include <linux/io.h> +#include "mic_common.h" +#include "mic_virtio.h" + +#define VIRTIO_SUBCODE_64 0x0D00 + +#define MIC_MAX_VRINGS 4 + +struct mic_vdev { + struct virtio_device vdev; + struct mic_device_desc __iomem *desc; + struct mic_device_ctrl __iomem *dc; + struct mic_device *mdev; + void __iomem *vr[MIC_MAX_VRINGS]; + int used_size[MIC_MAX_VRINGS]; + struct completion reset_done; + struct mic_irq *virtio_cookie; + int c2h_vdev_db; +}; + +static struct mic_irq *virtio_config_cookie; +#define to_micvdev(vd) container_of(vd, struct mic_vd...
2013 Jul 25
1
[PATCH 4/5] Intel MIC Card Driver Changes for Virtio Devices.
...e <linux/wait.h> +#include <linux/io.h> +#include "mic_common.h" +#include "mic_virtio.h" + +#define VIRTIO_SUBCODE_64 0x0D00 + +#define MIC_MAX_VRINGS 4 + +struct mic_vdev { + struct virtio_device vdev; + struct mic_device_desc __iomem *desc; + struct mic_device_ctrl __iomem *dc; + struct mic_device *mdev; + void __iomem *vr[MIC_MAX_VRINGS]; + int used_size[MIC_MAX_VRINGS]; + struct completion reset_done; + struct mic_irq *virtio_cookie; + int c2h_vdev_db; +}; + +static struct mic_irq *virtio_config_cookie; +#define to_micvdev(vd) container_of(vd, struct mic_vd...
2013 Nov 27
0
[PATCH char-misc-linus v3 2/6] misc: mic: Minor bug fix in 'retry' loops.
..._virtio.c b/drivers/misc/mic/card/mic_virtio.c index 1ebc51c..4dce912 100644 --- a/drivers/misc/mic/card/mic_virtio.c +++ b/drivers/misc/mic/card/mic_virtio.c @@ -154,14 +154,14 @@ static void mic_reset_inform_host(struct virtio_device *vdev) { struct mic_vdev *mvdev = to_micvdev(vdev); struct mic_device_ctrl __iomem *dc = mvdev->dc; - int retry = 100, i; + int retry; iowrite8(0, &dc->host_ack); iowrite8(1, &dc->vdev_reset); mic_send_intr(mvdev->mdev, mvdev->c2h_vdev_db); /* Wait till host completes all card accesses and acks the reset */ - for (i = retry; i--;) { + fo...
2014 Sep 22
1
[PATCH] virtio: unify config_changed handling
...diff --git a/drivers/misc/mic/card/mic_virtio.c b/drivers/misc/mic/card/mic_virtio.c index f14b600..e647947 100644 --- a/drivers/misc/mic/card/mic_virtio.c +++ b/drivers/misc/mic/card/mic_virtio.c @@ -462,16 +462,12 @@ static void mic_handle_config_change(struct mic_device_desc __iomem *d, struct mic_device_ctrl __iomem *dc = (void __iomem *)d + mic_aligned_desc_size(d); struct mic_vdev *mvdev = (struct mic_vdev *)ioread64(&dc->vdev); - struct virtio_driver *drv; if (ioread8(&dc->config_change) != MIC_VIRTIO_PARAM_CONFIG_CHANGED) return; dev_dbg(mdrv->dev, "%s %d\n&quo...
2014 Sep 22
1
[PATCH] virtio: unify config_changed handling
...diff --git a/drivers/misc/mic/card/mic_virtio.c b/drivers/misc/mic/card/mic_virtio.c index f14b600..e647947 100644 --- a/drivers/misc/mic/card/mic_virtio.c +++ b/drivers/misc/mic/card/mic_virtio.c @@ -462,16 +462,12 @@ static void mic_handle_config_change(struct mic_device_desc __iomem *d, struct mic_device_ctrl __iomem *dc = (void __iomem *)d + mic_aligned_desc_size(d); struct mic_vdev *mvdev = (struct mic_vdev *)ioread64(&dc->vdev); - struct virtio_driver *drv; if (ioread8(&dc->config_change) != MIC_VIRTIO_PARAM_CONFIG_CHANGED) return; dev_dbg(mdrv->dev, "%s %d\n&quo...
2013 Nov 26
1
[PATCH char-misc-linus 4/5] misc: mic: Fix sparse warnings and other endianness issues.
...ic_common.h @@ -48,7 +48,7 @@ struct mic_device_desc { __u8 feature_len; __u8 config_len; __u8 status; - __u64 config[0]; + __le64 config[0]; } __aligned(8); /** @@ -66,7 +66,7 @@ struct mic_device_desc { * @h2c_vdev_db: The doorbell number to be used by host. Set by guest. */ struct mic_device_ctrl { - __u64 vdev; + __le64 vdev; __u8 config_change; __u8 vdev_reset; __u8 guest_ack; @@ -87,7 +87,7 @@ struct mic_device_ctrl { * @shutdown_card: Set to 1 by the host when a card shutdown is initiated */ struct mic_bootparam { - __u32 magic; + __le32 magic; __s8 c2h_shutdown_db; __s8...
2013 Nov 26
1
[PATCH char-misc-linus 4/5] misc: mic: Fix sparse warnings and other endianness issues.
...ic_common.h @@ -48,7 +48,7 @@ struct mic_device_desc { __u8 feature_len; __u8 config_len; __u8 status; - __u64 config[0]; + __le64 config[0]; } __aligned(8); /** @@ -66,7 +66,7 @@ struct mic_device_desc { * @h2c_vdev_db: The doorbell number to be used by host. Set by guest. */ struct mic_device_ctrl { - __u64 vdev; + __le64 vdev; __u8 config_change; __u8 vdev_reset; __u8 guest_ack; @@ -87,7 +87,7 @@ struct mic_device_ctrl { * @shutdown_card: Set to 1 by the host when a card shutdown is initiated */ struct mic_bootparam { - __u32 magic; + __le32 magic; __s8 c2h_shutdown_db; __s8...
2013 Jul 29
0
[PATCH 3/5] Intel MIC Host Driver Changes for Virtio Devices.
...ugfs parent dir */ > static struct dentry *mic_dbg; > @@ -207,7 +208,13 @@ static const struct file_operations post_code_ops = { > static int dp_seq_show(struct seq_file *s, void *pos) > { > struct mic_device *mdev = s->private; > + struct mic_device_desc *d; > + struct mic_device_ctrl *dc; > + struct mic_vqconfig *vqconfig; > + __u32 *features; > + __u8 *config; > struct mic_bootparam *bootparam = mdev->dp; > + int i, j; > > seq_printf(s, "Bootparam: magic 0x%x\n", > bootparam->magic); > @@ -222,6 +229,53 @@ static int dp_seq_s...
2018 Dec 28
0
[PATCH v1 2/2] virtio: don't allocate vqs when names[i] = NULL
..._main.c index 6b212c8..2bfa3a9 100644 --- a/drivers/misc/mic/vop/vop_main.c +++ b/drivers/misc/mic/vop/vop_main.c @@ -394,16 +394,21 @@ static int vop_find_vqs(struct virtio_device *dev, unsigned nvqs, struct _vop_vdev *vdev = to_vopvdev(dev); struct vop_device *vpdev = vdev->vpdev; struct mic_device_ctrl __iomem *dc = vdev->dc; - int i, err, retry; + int i, err, retry, queue_idx = 0; /* We must have this many virtqueues. */ if (nvqs > ioread8(&vdev->desc->num_vq)) return -ENOENT; for (i = 0; i < nvqs; ++i) { + if (!names[i]) { + vqs[i] = NULL; + continue; + } +...
2013 Jul 25
1
[PATCH 3/5] Intel MIC Host Driver Changes for Virtio Devices.
..."mic_virtio.h" /* Debugfs parent dir */ static struct dentry *mic_dbg; @@ -207,7 +208,13 @@ static const struct file_operations post_code_ops = { static int dp_seq_show(struct seq_file *s, void *pos) { struct mic_device *mdev = s->private; + struct mic_device_desc *d; + struct mic_device_ctrl *dc; + struct mic_vqconfig *vqconfig; + __u32 *features; + __u8 *config; struct mic_bootparam *bootparam = mdev->dp; + int i, j; seq_printf(s, "Bootparam: magic 0x%x\n", bootparam->magic); @@ -222,6 +229,53 @@ static int dp_seq_show(struct seq_file *s, void *pos) seq_prin...
2013 Jul 25
1
[PATCH 3/5] Intel MIC Host Driver Changes for Virtio Devices.
..."mic_virtio.h" /* Debugfs parent dir */ static struct dentry *mic_dbg; @@ -207,7 +208,13 @@ static const struct file_operations post_code_ops = { static int dp_seq_show(struct seq_file *s, void *pos) { struct mic_device *mdev = s->private; + struct mic_device_desc *d; + struct mic_device_ctrl *dc; + struct mic_vqconfig *vqconfig; + __u32 *features; + __u8 *config; struct mic_bootparam *bootparam = mdev->dp; + int i, j; seq_printf(s, "Bootparam: magic 0x%x\n", bootparam->magic); @@ -222,6 +229,53 @@ static int dp_seq_show(struct seq_file *s, void *pos) seq_prin...
2015 Dec 17
1
[PATCH] virtio: make find_vqs() checkpatch.pl-friendly
...rs/misc/mic/card/mic_virtio.c @@ -311,7 +311,7 @@ unmap: static int mic_find_vqs(struct virtio_device *vdev, unsigned nvqs, struct virtqueue *vqs[], vq_callback_t *callbacks[], - const char *names[]) + const char * const names[]) { struct mic_vdev *mvdev = to_micvdev(vdev); struct mic_device_ctrl __iomem *dc = mvdev->dc; diff --git a/drivers/remoteproc/remoteproc_virtio.c b/drivers/remoteproc/remoteproc_virtio.c index e1a1023..e44872f 100644 --- a/drivers/remoteproc/remoteproc_virtio.c +++ b/drivers/remoteproc/remoteproc_virtio.c @@ -147,7 +147,7 @@ static void rproc_virtio_del_vqs(struc...
2015 Dec 17
1
[PATCH] virtio: make find_vqs() checkpatch.pl-friendly
...rs/misc/mic/card/mic_virtio.c @@ -311,7 +311,7 @@ unmap: static int mic_find_vqs(struct virtio_device *vdev, unsigned nvqs, struct virtqueue *vqs[], vq_callback_t *callbacks[], - const char *names[]) + const char * const names[]) { struct mic_vdev *mvdev = to_micvdev(vdev); struct mic_device_ctrl __iomem *dc = mvdev->dc; diff --git a/drivers/remoteproc/remoteproc_virtio.c b/drivers/remoteproc/remoteproc_virtio.c index e1a1023..e44872f 100644 --- a/drivers/remoteproc/remoteproc_virtio.c +++ b/drivers/remoteproc/remoteproc_virtio.c @@ -147,7 +147,7 @@ static void rproc_virtio_del_vqs(struc...