portdev 177 drivers/char/virtio_console.c struct ports_device *portdev; portdev 261 drivers/char/virtio_console.c static struct port *find_port_by_devt_in_portdev(struct ports_device *portdev, portdev 267 drivers/char/virtio_console.c spin_lock_irqsave(&portdev->ports_lock, flags); portdev 268 drivers/char/virtio_console.c list_for_each_entry(port, &portdev->ports, list) { portdev 276 drivers/char/virtio_console.c spin_unlock_irqrestore(&portdev->ports_lock, flags); portdev 283 drivers/char/virtio_console.c struct ports_device *portdev; portdev 288 drivers/char/virtio_console.c list_for_each_entry(portdev, &pdrvdata.portdevs, list) { portdev 289 drivers/char/virtio_console.c port = find_port_by_devt_in_portdev(portdev, dev); portdev 299 drivers/char/virtio_console.c static struct port *find_port_by_id(struct ports_device *portdev, u32 id) portdev 304 drivers/char/virtio_console.c spin_lock_irqsave(&portdev->ports_lock, flags); portdev 305 drivers/char/virtio_console.c list_for_each_entry(port, &portdev->ports, list) portdev 310 drivers/char/virtio_console.c spin_unlock_irqrestore(&portdev->ports_lock, flags); portdev 315 drivers/char/virtio_console.c static struct port *find_port_by_vq(struct ports_device *portdev, portdev 321 drivers/char/virtio_console.c spin_lock_irqsave(&portdev->ports_lock, flags); portdev 322 drivers/char/virtio_console.c list_for_each_entry(port, &portdev->ports, list) portdev 327 drivers/char/virtio_console.c spin_unlock_irqrestore(&portdev->ports_lock, flags); portdev 343 drivers/char/virtio_console.c static inline bool use_multiport(struct ports_device *portdev) portdev 349 drivers/char/virtio_console.c if (!portdev->vdev) portdev 351 drivers/char/virtio_console.c return __virtio_test_bit(portdev->vdev, VIRTIO_CONSOLE_F_MULTIPORT); portdev 511 drivers/char/virtio_console.c if (!port->portdev) { portdev 547 drivers/char/virtio_console.c static ssize_t __send_control_msg(struct ports_device *portdev, u32 port_id, portdev 554 drivers/char/virtio_console.c if (!use_multiport(portdev)) portdev 557 drivers/char/virtio_console.c vq = portdev->c_ovq; portdev 559 drivers/char/virtio_console.c spin_lock(&portdev->c_ovq_lock); portdev 561 drivers/char/virtio_console.c portdev->cpkt.id = cpu_to_virtio32(portdev->vdev, port_id); portdev 562 drivers/char/virtio_console.c portdev->cpkt.event = cpu_to_virtio16(portdev->vdev, event); portdev 563 drivers/char/virtio_console.c portdev->cpkt.value = cpu_to_virtio16(portdev->vdev, value); portdev 565 drivers/char/virtio_console.c sg_init_one(sg, &portdev->cpkt, sizeof(struct virtio_console_control)); portdev 567 drivers/char/virtio_console.c if (virtqueue_add_outbuf(vq, sg, 1, &portdev->cpkt, GFP_ATOMIC) == 0) { portdev 574 drivers/char/virtio_console.c spin_unlock(&portdev->c_ovq_lock); portdev 582 drivers/char/virtio_console.c if (port->portdev) portdev 583 drivers/char/virtio_console.c return __send_control_msg(port->portdev, port->id, event, value); portdev 594 drivers/char/virtio_console.c if (!port->portdev) { portdev 827 drivers/char/virtio_console.c buf = alloc_buf(port->portdev->vdev, count, 0); portdev 946 drivers/char/virtio_console.c buf = alloc_buf(port->portdev->vdev, 0, pipe->nrbufs); portdev 1175 drivers/char/virtio_console.c vdev = port->portdev->vdev; portdev 1360 drivers/char/virtio_console.c static int add_port(struct ports_device *portdev, u32 id) portdev 1374 drivers/char/virtio_console.c port->portdev = portdev; portdev 1390 drivers/char/virtio_console.c port->in_vq = portdev->in_vqs[port->id]; portdev 1391 drivers/char/virtio_console.c port->out_vq = portdev->out_vqs[port->id]; portdev 1395 drivers/char/virtio_console.c dev_err(&port->portdev->vdev->dev, "Error allocating cdev\n"); portdev 1401 drivers/char/virtio_console.c devt = MKDEV(portdev->chr_major, id); portdev 1404 drivers/char/virtio_console.c dev_err(&port->portdev->vdev->dev, portdev 1408 drivers/char/virtio_console.c port->dev = device_create(pdrvdata.class, &port->portdev->vdev->dev, portdev 1410 drivers/char/virtio_console.c port->portdev->vdev->index, id); portdev 1413 drivers/char/virtio_console.c dev_err(&port->portdev->vdev->dev, portdev 1433 drivers/char/virtio_console.c if (is_rproc_serial(port->portdev->vdev)) portdev 1440 drivers/char/virtio_console.c else if (!use_multiport(port->portdev)) { portdev 1450 drivers/char/virtio_console.c spin_lock_irq(&portdev->ports_lock); portdev 1451 drivers/char/virtio_console.c list_add_tail(&port->list, &port->portdev->ports); portdev 1452 drivers/char/virtio_console.c spin_unlock_irq(&portdev->ports_lock); portdev 1467 drivers/char/virtio_console.c port->portdev->vdev->index, id); portdev 1484 drivers/char/virtio_console.c __send_control_msg(portdev, id, VIRTIO_CONSOLE_PORT_READY, 0); portdev 1517 drivers/char/virtio_console.c spin_lock_irq(&port->portdev->ports_lock); portdev 1519 drivers/char/virtio_console.c spin_unlock_irq(&port->portdev->ports_lock); portdev 1548 drivers/char/virtio_console.c port->portdev = NULL; portdev 1567 drivers/char/virtio_console.c struct ports_device *portdev, portdev 1577 drivers/char/virtio_console.c port = find_port_by_id(portdev, virtio32_to_cpu(vdev, cpkt->id)); portdev 1581 drivers/char/virtio_console.c dev_dbg(&portdev->vdev->dev, portdev 1589 drivers/char/virtio_console.c dev_dbg(&portdev->vdev->dev, portdev 1595 drivers/char/virtio_console.c portdev->max_nr_ports) { portdev 1596 drivers/char/virtio_console.c dev_warn(&portdev->vdev->dev, portdev 1599 drivers/char/virtio_console.c cpkt->id, portdev->max_nr_ports - 1); portdev 1602 drivers/char/virtio_console.c add_port(portdev, virtio32_to_cpu(vdev, cpkt->id)); portdev 1705 drivers/char/virtio_console.c struct ports_device *portdev; portdev 1710 drivers/char/virtio_console.c portdev = container_of(work, struct ports_device, control_work); portdev 1711 drivers/char/virtio_console.c vq = portdev->c_ivq; portdev 1713 drivers/char/virtio_console.c spin_lock(&portdev->c_ivq_lock); portdev 1715 drivers/char/virtio_console.c spin_unlock(&portdev->c_ivq_lock); portdev 1720 drivers/char/virtio_console.c handle_control_message(vq->vdev, portdev, buf); portdev 1722 drivers/char/virtio_console.c spin_lock(&portdev->c_ivq_lock); portdev 1723 drivers/char/virtio_console.c if (add_inbuf(portdev->c_ivq, buf) < 0) { portdev 1724 drivers/char/virtio_console.c dev_warn(&portdev->vdev->dev, portdev 1729 drivers/char/virtio_console.c spin_unlock(&portdev->c_ivq_lock); portdev 1785 drivers/char/virtio_console.c if (!port->guest_connected && !is_rproc_serial(port->portdev->vdev)) portdev 1801 drivers/char/virtio_console.c struct ports_device *portdev; portdev 1803 drivers/char/virtio_console.c portdev = vq->vdev->priv; portdev 1804 drivers/char/virtio_console.c schedule_work(&portdev->control_work); portdev 1809 drivers/char/virtio_console.c struct ports_device *portdev; portdev 1811 drivers/char/virtio_console.c portdev = vdev->priv; portdev 1813 drivers/char/virtio_console.c if (!use_multiport(portdev)) portdev 1814 drivers/char/virtio_console.c schedule_work(&portdev->config_work); portdev 1819 drivers/char/virtio_console.c struct ports_device *portdev; portdev 1821 drivers/char/virtio_console.c portdev = container_of(work, struct ports_device, config_work); portdev 1822 drivers/char/virtio_console.c if (!use_multiport(portdev)) { portdev 1827 drivers/char/virtio_console.c vdev = portdev->vdev; portdev 1831 drivers/char/virtio_console.c port = find_port_by_id(portdev, 0); portdev 1845 drivers/char/virtio_console.c static int init_vqs(struct ports_device *portdev) portdev 1853 drivers/char/virtio_console.c nr_ports = portdev->max_nr_ports; portdev 1854 drivers/char/virtio_console.c nr_queues = use_multiport(portdev) ? (nr_ports + 1) * 2 : 2; portdev 1860 drivers/char/virtio_console.c portdev->in_vqs = kmalloc_array(nr_ports, sizeof(struct virtqueue *), portdev 1862 drivers/char/virtio_console.c portdev->out_vqs = kmalloc_array(nr_ports, sizeof(struct virtqueue *), portdev 1864 drivers/char/virtio_console.c if (!vqs || !io_callbacks || !io_names || !portdev->in_vqs || portdev 1865 drivers/char/virtio_console.c !portdev->out_vqs) { portdev 1882 drivers/char/virtio_console.c if (use_multiport(portdev)) { portdev 1897 drivers/char/virtio_console.c err = virtio_find_vqs(portdev->vdev, nr_queues, vqs, portdev 1904 drivers/char/virtio_console.c portdev->in_vqs[0] = vqs[0]; portdev 1905 drivers/char/virtio_console.c portdev->out_vqs[0] = vqs[1]; portdev 1907 drivers/char/virtio_console.c if (use_multiport(portdev)) { portdev 1908 drivers/char/virtio_console.c portdev->c_ivq = vqs[j]; portdev 1909 drivers/char/virtio_console.c portdev->c_ovq = vqs[j + 1]; portdev 1913 drivers/char/virtio_console.c portdev->in_vqs[i] = vqs[j]; portdev 1914 drivers/char/virtio_console.c portdev->out_vqs[i] = vqs[j + 1]; portdev 1924 drivers/char/virtio_console.c kfree(portdev->out_vqs); portdev 1925 drivers/char/virtio_console.c kfree(portdev->in_vqs); portdev 1937 drivers/char/virtio_console.c static void remove_vqs(struct ports_device *portdev) portdev 1941 drivers/char/virtio_console.c virtio_device_for_each_vq(portdev->vdev, vq) { portdev 1948 drivers/char/virtio_console.c portdev->vdev->config->del_vqs(portdev->vdev); portdev 1949 drivers/char/virtio_console.c kfree(portdev->in_vqs); portdev 1950 drivers/char/virtio_console.c kfree(portdev->out_vqs); portdev 1955 drivers/char/virtio_console.c struct ports_device *portdev; portdev 1958 drivers/char/virtio_console.c portdev = vdev->priv; portdev 1961 drivers/char/virtio_console.c list_del(&portdev->list); portdev 1967 drivers/char/virtio_console.c if (use_multiport(portdev)) portdev 1968 drivers/char/virtio_console.c cancel_work_sync(&portdev->control_work); portdev 1970 drivers/char/virtio_console.c cancel_work_sync(&portdev->config_work); portdev 1972 drivers/char/virtio_console.c list_for_each_entry_safe(port, port2, &portdev->ports, list) portdev 1975 drivers/char/virtio_console.c unregister_chrdev(portdev->chr_major, "virtio-portsdev"); portdev 1985 drivers/char/virtio_console.c remove_vqs(portdev); portdev 1986 drivers/char/virtio_console.c kfree(portdev); portdev 1999 drivers/char/virtio_console.c struct ports_device *portdev; portdev 2016 drivers/char/virtio_console.c portdev = kmalloc(sizeof(*portdev), GFP_KERNEL); portdev 2017 drivers/char/virtio_console.c if (!portdev) { portdev 2023 drivers/char/virtio_console.c portdev->vdev = vdev; portdev 2024 drivers/char/virtio_console.c vdev->priv = portdev; portdev 2026 drivers/char/virtio_console.c portdev->chr_major = register_chrdev(0, "virtio-portsdev", portdev 2028 drivers/char/virtio_console.c if (portdev->chr_major < 0) { portdev 2031 drivers/char/virtio_console.c portdev->chr_major, vdev->index); portdev 2032 drivers/char/virtio_console.c err = portdev->chr_major; portdev 2037 drivers/char/virtio_console.c portdev->max_nr_ports = 1; portdev 2043 drivers/char/virtio_console.c &portdev->max_nr_ports) == 0) { portdev 2047 drivers/char/virtio_console.c err = init_vqs(portdev); portdev 2053 drivers/char/virtio_console.c spin_lock_init(&portdev->ports_lock); portdev 2054 drivers/char/virtio_console.c INIT_LIST_HEAD(&portdev->ports); portdev 2055 drivers/char/virtio_console.c INIT_LIST_HEAD(&portdev->list); portdev 2057 drivers/char/virtio_console.c virtio_device_ready(portdev->vdev); portdev 2059 drivers/char/virtio_console.c INIT_WORK(&portdev->config_work, &config_work_handler); portdev 2060 drivers/char/virtio_console.c INIT_WORK(&portdev->control_work, &control_work_handler); portdev 2063 drivers/char/virtio_console.c spin_lock_init(&portdev->c_ivq_lock); portdev 2064 drivers/char/virtio_console.c spin_lock_init(&portdev->c_ovq_lock); portdev 2066 drivers/char/virtio_console.c err = fill_queue(portdev->c_ivq, &portdev->c_ivq_lock); portdev 2074 drivers/char/virtio_console.c __send_control_msg(portdev, VIRTIO_CONSOLE_BAD_ID, portdev 2085 drivers/char/virtio_console.c add_port(portdev, 0); portdev 2089 drivers/char/virtio_console.c list_add_tail(&portdev->list, &pdrvdata.portdevs); portdev 2092 drivers/char/virtio_console.c __send_control_msg(portdev, VIRTIO_CONSOLE_BAD_ID, portdev 2110 drivers/char/virtio_console.c unregister_chrdev(portdev->chr_major, "virtio-portsdev"); portdev 2112 drivers/char/virtio_console.c kfree(portdev); portdev 2140 drivers/char/virtio_console.c struct ports_device *portdev; portdev 2143 drivers/char/virtio_console.c portdev = vdev->priv; portdev 2147 drivers/char/virtio_console.c if (use_multiport(portdev)) portdev 2148 drivers/char/virtio_console.c virtqueue_disable_cb(portdev->c_ivq); portdev 2149 drivers/char/virtio_console.c cancel_work_sync(&portdev->control_work); portdev 2150 drivers/char/virtio_console.c cancel_work_sync(&portdev->config_work); portdev 2155 drivers/char/virtio_console.c if (use_multiport(portdev)) portdev 2156 drivers/char/virtio_console.c virtqueue_disable_cb(portdev->c_ivq); portdev 2158 drivers/char/virtio_console.c list_for_each_entry(port, &portdev->ports, list) { portdev 2168 drivers/char/virtio_console.c remove_vqs(portdev); portdev 2175 drivers/char/virtio_console.c struct ports_device *portdev; portdev 2179 drivers/char/virtio_console.c portdev = vdev->priv; portdev 2181 drivers/char/virtio_console.c ret = init_vqs(portdev); portdev 2185 drivers/char/virtio_console.c virtio_device_ready(portdev->vdev); portdev 2187 drivers/char/virtio_console.c if (use_multiport(portdev)) portdev 2188 drivers/char/virtio_console.c fill_queue(portdev->c_ivq, &portdev->c_ivq_lock); portdev 2190 drivers/char/virtio_console.c list_for_each_entry(port, &portdev->ports, list) { portdev 2191 drivers/char/virtio_console.c port->in_vq = portdev->in_vqs[port->id]; portdev 2192 drivers/char/virtio_console.c port->out_vq = portdev->out_vqs[port->id]; portdev 563 drivers/ide/ide-probe.c hwif->portdev = device_create(ide_port_class, &hwif->gendev, portdev 565 drivers/ide/ide-probe.c if (IS_ERR(hwif->portdev)) { portdev 566 drivers/ide/ide-probe.c ret = PTR_ERR(hwif->portdev); portdev 1498 drivers/ide/ide-probe.c device_unregister(hwif->portdev); portdev 1610 drivers/ide/ide-probe.c device_unregister(hwif->portdev); portdev 93 drivers/ide/ide-sysfs.c static ssize_t store_delete_devices(struct device *portdev, portdev 97 drivers/ide/ide-sysfs.c ide_hwif_t *hwif = dev_get_drvdata(portdev); portdev 109 drivers/ide/ide-sysfs.c static ssize_t store_scan(struct device *portdev, portdev 113 drivers/ide/ide-sysfs.c ide_hwif_t *hwif = dev_get_drvdata(portdev); portdev 137 drivers/ide/ide-sysfs.c rc = device_create_file(hwif->portdev, ide_port_attrs[i]); portdev 788 include/linux/ide.h struct device *portdev;