search for: portdev

Displaying 20 results from an estimated 298 matches for "portdev".

2013 Mar 29
3
[PATCH v2 0/2] virtio: console: add locking around control out-vq
The in-vq operations were protected by a lock, but the out-vq operations were not. This caused panics / errors as described in patch 2. Fix that. The first patch renames the existing cvq_lock to c_ivq_lock to match c_ivq. The second patch introduces the c_ovq_lock for the c_ovq. Please apply. I also believe this is a candidate for stable. v2: * Use spin_lock instead of spin_lock_irq.
2013 Mar 29
3
[PATCH v2 0/2] virtio: console: add locking around control out-vq
The in-vq operations were protected by a lock, but the out-vq operations were not. This caused panics / errors as described in patch 2. Fix that. The first patch renames the existing cvq_lock to c_ivq_lock to match c_ivq. The second patch introduces the c_ovq_lock for the c_ovq. Please apply. I also believe this is a candidate for stable. v2: * Use spin_lock instead of spin_lock_irq.
2010 Mar 30
3
[PATCH 4/4] virtio: disable multiport console support.
...drivers/char/virtio_console.c b/drivers/char/virtio_console.c --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c @@ -252,15 +252,10 @@ static bool is_console_port(struct port return false; } +/* This is incomplete. */ static inline bool use_multiport(struct ports_device *portdev) { - /* - * This condition can be true when put_chars is called from - * early_init - */ - if (!portdev->vdev) - return 0; - return portdev->vdev->features[0] & (1 << VIRTIO_CONSOLE_F_MULTIPORT); + return false; } static void free_buf(struct port_buffer *buf) @@ -373,31...
2010 Mar 30
3
[PATCH 4/4] virtio: disable multiport console support.
...drivers/char/virtio_console.c b/drivers/char/virtio_console.c --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c @@ -252,15 +252,10 @@ static bool is_console_port(struct port return false; } +/* This is incomplete. */ static inline bool use_multiport(struct ports_device *portdev) { - /* - * This condition can be true when put_chars is called from - * early_init - */ - if (!portdev->vdev) - return 0; - return portdev->vdev->features[0] & (1 << VIRTIO_CONSOLE_F_MULTIPORT); + return false; } static void free_buf(struct port_buffer *buf) @@ -373,31...
2010 Jan 29
3
virtio: console: Return -EFAULT on copy_xx_user errors, allow larger writes
...count); } /* @@ -874,7 +866,6 @@ static int remove_port(struct port *port) cdev_del(&port->cdev); discard_port_data(port); - free_buf(port->outbuf); kfree(port->name); debugfs_remove(port->debugfs_file); @@ -1143,11 +1134,6 @@ static int add_port(struct ports_device *portdev, u32 id) err = -ENOMEM; goto free_device; } - port->outbuf = alloc_buf(PAGE_SIZE); - if (!port->outbuf) { - err = -ENOMEM; - goto free_inbuf; - } /* Register the input buffer the first time. */ add_inbuf(port->in_vq, inbuf); @@ -1158,7 +1144,7 @@ static int add_port(struct...
2010 Jan 29
3
virtio: console: Return -EFAULT on copy_xx_user errors, allow larger writes
...count); } /* @@ -874,7 +866,6 @@ static int remove_port(struct port *port) cdev_del(&port->cdev); discard_port_data(port); - free_buf(port->outbuf); kfree(port->name); debugfs_remove(port->debugfs_file); @@ -1143,11 +1134,6 @@ static int add_port(struct ports_device *portdev, u32 id) err = -ENOMEM; goto free_device; } - port->outbuf = alloc_buf(PAGE_SIZE); - if (!port->outbuf) { - err = -ENOMEM; - goto free_inbuf; - } /* Register the input buffer the first time. */ add_inbuf(port->in_vq, inbuf); @@ -1158,7 +1144,7 @@ static int add_port(struct...
2012 Feb 01
1
[PATCH 2/2] virtio-serial: setup_port_vq when adding port
...+1132,55 @@ static void send_sigio_to_port(struct port *port) > kill_fasync(&port->async_queue, SIGIO, POLL_OUT); > } > > +static void in_intr(struct virtqueue *vq); > +static void out_intr(struct virtqueue *vq); > + > +static int setup_port_vq(struct ports_device *portdev, u32 id) > +{ > + int err, vq_num; > + vq_callback_t **io_callbacks; > + char **io_names; > + struct virtqueue **vqs; > + u32 i,j,nr_ports,nr_queues; > + > + err = 0; > + vq_num = (id + 1) * 2; > + nr_ports = portdev->config.max_nr_ports; > + nr_queues = use_mul...
2012 Feb 01
1
[PATCH 2/2] virtio-serial: setup_port_vq when adding port
...+1132,55 @@ static void send_sigio_to_port(struct port *port) > kill_fasync(&port->async_queue, SIGIO, POLL_OUT); > } > > +static void in_intr(struct virtqueue *vq); > +static void out_intr(struct virtqueue *vq); > + > +static int setup_port_vq(struct ports_device *portdev, u32 id) > +{ > + int err, vq_num; > + vq_callback_t **io_callbacks; > + char **io_names; > + struct virtqueue **vqs; > + u32 i,j,nr_ports,nr_queues; > + > + err = 0; > + vq_num = (id + 1) * 2; > + nr_ports = portdev->config.max_nr_ports; > + nr_queues = use_mul...
2013 Mar 28
5
[PATCH 0/2] virtio: console: add locking around control out-vq
The in-vq operations were protected by a lock, but the out-vq operations were not. This caused panics / errors as described in patch 2. Fix that. The first patch renames the existing cvq_lock to c_ivq_lock to match c_ivq. The second patch introduces the c_ovq_lock for the c_ovq. Please apply. I also believe this is a candidate for stable. Amit Shah (2): virtio: console: rename cvq_lock
2013 Mar 28
5
[PATCH 0/2] virtio: console: add locking around control out-vq
The in-vq operations were protected by a lock, but the out-vq operations were not. This caused panics / errors as described in patch 2. Fix that. The first patch renames the existing cvq_lock to c_ivq_lock to match c_ivq. The second patch introduces the c_ovq_lock for the c_ovq. Please apply. I also believe this is a candidate for stable. Amit Shah (2): virtio: console: rename cvq_lock
2013 Jan 17
4
[PATCH] virtio_console: Use virtio device index to generate port name
...ons(-) diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c index c17b053..031be0b 100644 --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c @@ -61,9 +61,6 @@ struct ports_driver_data { /* List of all the devices we're handling */ struct list_head portdevs; - /* Number of devices this driver is handling */ - unsigned int index; - /* * This is used to keep track of the number of hvc consoles * spawned by this driver. This number is given as the first @@ -169,9 +166,6 @@ struct ports_device { /* Array of per-port IO virtqueues */ struct...
2013 Jan 17
4
[PATCH] virtio_console: Use virtio device index to generate port name
...ons(-) diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c index c17b053..031be0b 100644 --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c @@ -61,9 +61,6 @@ struct ports_driver_data { /* List of all the devices we're handling */ struct list_head portdevs; - /* Number of devices this driver is handling */ - unsigned int index; - /* * This is used to keep track of the number of hvc consoles * spawned by this driver. This number is given as the first @@ -169,9 +166,6 @@ struct ports_device { /* Array of per-port IO virtqueues */ struct...
2010 Sep 02
14
[PATCH 00/14] virtio: console: Hot-unplug fixes
...Ideally this patchset would be applicable for 2.6.36 as well as 2.6.35, but I'll let you decide as it's quite big. Amit Shah (14): virtio: console: Reset vdev before removing device virtio: console: Remove control vq data only if using multiport support virtio: console: Check if portdev is valid in send_control_msg() virtio: console: Unblock reads on chardev close virtio: console: Unblock poll on port hot-unplug virtio: console: Make read() return -ENODEV on hot-unplug virtio: console: Make write() return -ENODEV on hot-unplug virtio: console: remove_port() should return...
2010 Sep 02
14
[PATCH 00/14] virtio: console: Hot-unplug fixes
...Ideally this patchset would be applicable for 2.6.36 as well as 2.6.35, but I'll let you decide as it's quite big. Amit Shah (14): virtio: console: Reset vdev before removing device virtio: console: Remove control vq data only if using multiport support virtio: console: Check if portdev is valid in send_control_msg() virtio: console: Unblock reads on chardev close virtio: console: Unblock poll on port hot-unplug virtio: console: Make read() return -ENODEV on hot-unplug virtio: console: Make write() return -ENODEV on hot-unplug virtio: console: remove_port() should return...
2014 Dec 01
0
[PATCH v8 47/50] virtio_console: virtio 1.0 support
.../ }; /* Some events for control messages */ diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c index 8d00aa7..775c898 100644 --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c @@ -566,9 +566,9 @@ static ssize_t __send_control_msg(struct ports_device *portdev, u32 port_id, if (!use_multiport(portdev)) return 0; - cpkt.id = port_id; - cpkt.event = event; - cpkt.value = value; + cpkt.id = cpu_to_virtio32(portdev->vdev, port_id); + cpkt.event = cpu_to_virtio16(portdev->vdev, event); + cpkt.value = cpu_to_virtio16(portdev->vdev, value);...
2014 Dec 01
0
[PATCH v8 47/50] virtio_console: virtio 1.0 support
.../ }; /* Some events for control messages */ diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c index 8d00aa7..775c898 100644 --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c @@ -566,9 +566,9 @@ static ssize_t __send_control_msg(struct ports_device *portdev, u32 port_id, if (!use_multiport(portdev)) return 0; - cpkt.id = port_id; - cpkt.event = event; - cpkt.value = value; + cpkt.id = cpu_to_virtio32(portdev->vdev, port_id); + cpkt.event = cpu_to_virtio16(portdev->vdev, event); + cpkt.value = cpu_to_virtio16(portdev->vdev, value);...
2012 Sep 19
2
[PATCHv2] virtio_console: Add support for remoteproc serial
...dev; + dma_addr_t dma_handle = virt_to_bus(cpu_addr); + dev = dev->parent ? dev->parent : dev; + dev = dev->parent ? dev->parent : dev; + dma_free_coherent(dev, size, cpu_addr, dma_handle); + return; + } + kfree(cpu_addr); +} + static inline bool use_multiport(struct ports_device *portdev) { /* @@ -334,20 +382,22 @@ static inline bool use_multiport(struct ports_device *portdev) return portdev->vdev->features[0] & (1 << VIRTIO_CONSOLE_F_MULTIPORT); } -static void free_buf(struct port_buffer *buf) +static void +free_buf(struct virtqueue *vq, struct port_buffer...
2012 Sep 19
2
[PATCHv2] virtio_console: Add support for remoteproc serial
...dev; + dma_addr_t dma_handle = virt_to_bus(cpu_addr); + dev = dev->parent ? dev->parent : dev; + dev = dev->parent ? dev->parent : dev; + dma_free_coherent(dev, size, cpu_addr, dma_handle); + return; + } + kfree(cpu_addr); +} + static inline bool use_multiport(struct ports_device *portdev) { /* @@ -334,20 +382,22 @@ static inline bool use_multiport(struct ports_device *portdev) return portdev->vdev->features[0] & (1 << VIRTIO_CONSOLE_F_MULTIPORT); } -static void free_buf(struct port_buffer *buf) +static void +free_buf(struct virtqueue *vq, struct port_buffer...
2018 Apr 20
13
[PATCH 0/6] virtio-console: spec compliance fixes
Turns out virtio console tries to take a buffer out of an active vq. Works by sheer luck, and is explicitly forbidden by spec. And while going over it I saw that error handling is also broken - failure is easy to trigger if I force allocations to fail. Lightly tested. Michael S. Tsirkin (6): virtio_console: don't tie bufs to a vq virtio: add ability to iterate over vqs virtio_console:
2018 Apr 20
13
[PATCH 0/6] virtio-console: spec compliance fixes
Turns out virtio console tries to take a buffer out of an active vq. Works by sheer luck, and is explicitly forbidden by spec. And while going over it I saw that error handling is also broken - failure is easy to trigger if I force allocations to fail. Lightly tested. Michael S. Tsirkin (6): virtio_console: don't tie bufs to a vq virtio: add ability to iterate over vqs virtio_console: