diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-02-01 13:31:17 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-02-01 13:31:17 -0500 |
| commit | f6cff79f1d122f78a4b35bf4b2f0112afcd89ea4 (patch) | |
| tree | cf3a38576f9adbb3860982c25f72aebed2bb541a /Documentation/driver-api | |
| parent | 47fcc0360cfb3fe82e4daddacad3c1cd80b0b75d (diff) | |
| parent | 9ff6576e124b1227c27c1da43fe5f8ee908263e0 (diff) | |
Merge tag 'char-misc-4.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc
Pull char/misc driver updates from Greg KH:
"Here is the big pull request for char/misc drivers for 4.16-rc1.
There's a lot of stuff in here. Three new driver subsystems were added
for various types of hardware busses:
- siox
- slimbus
- soundwire
as well as a new vboxguest subsystem for the VirtualBox hypervisor
drivers.
There's also big updates from the FPGA subsystem, lots of Android
binder fixes, the usual handful of hyper-v updates, and lots of other
smaller driver updates.
All of these have been in linux-next for a long time, with no reported
issues"
* tag 'char-misc-4.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (155 commits)
char: lp: use true or false for boolean values
android: binder: use VM_ALLOC to get vm area
android: binder: Use true and false for boolean values
lkdtm: fix handle_irq_event symbol for INT_HW_IRQ_EN
EISA: Delete error message for a failed memory allocation in eisa_probe()
EISA: Whitespace cleanup
misc: remove AVR32 dependencies
virt: vbox: Add error mapping for VERR_INVALID_NAME and VERR_NO_MORE_FILES
soundwire: Fix a signedness bug
uio_hv_generic: fix new type mismatch warnings
uio_hv_generic: fix type mismatch warnings
auxdisplay: img-ascii-lcd: add missing MODULE_DESCRIPTION/AUTHOR/LICENSE
uio_hv_generic: add rescind support
uio_hv_generic: check that host supports monitor page
uio_hv_generic: create send and receive buffers
uio: document uio_hv_generic regions
doc: fix documentation about uio_hv_generic
vmbus: add monitor_id and subchannel_id to sysfs per channel
vmbus: fix ABI documentation
uio_hv_generic: use ISR callback method
...
Diffstat (limited to 'Documentation/driver-api')
| -rw-r--r-- | Documentation/driver-api/index.rst | 2 | ||||
| -rw-r--r-- | Documentation/driver-api/slimbus.rst | 127 | ||||
| -rw-r--r-- | Documentation/driver-api/soundwire/index.rst | 15 | ||||
| -rw-r--r-- | Documentation/driver-api/soundwire/summary.rst | 207 | ||||
| -rw-r--r-- | Documentation/driver-api/uio-howto.rst | 26 |
5 files changed, 370 insertions, 7 deletions
diff --git a/Documentation/driver-api/index.rst b/Documentation/driver-api/index.rst index d17a9876b473..e9b41b1634f3 100644 --- a/Documentation/driver-api/index.rst +++ b/Documentation/driver-api/index.rst | |||
| @@ -47,6 +47,8 @@ available subsections can be seen below. | |||
| 47 | gpio | 47 | gpio |
| 48 | misc_devices | 48 | misc_devices |
| 49 | dmaengine/index | 49 | dmaengine/index |
| 50 | slimbus | ||
| 51 | soundwire/index | ||
| 50 | 52 | ||
| 51 | .. only:: subproject and html | 53 | .. only:: subproject and html |
| 52 | 54 | ||
diff --git a/Documentation/driver-api/slimbus.rst b/Documentation/driver-api/slimbus.rst new file mode 100644 index 000000000000..7555ecd538de --- /dev/null +++ b/Documentation/driver-api/slimbus.rst | |||
| @@ -0,0 +1,127 @@ | |||
| 1 | ============================ | ||
| 2 | Linux kernel SLIMbus support | ||
| 3 | ============================ | ||
| 4 | |||
| 5 | Overview | ||
| 6 | ======== | ||
| 7 | |||
| 8 | What is SLIMbus? | ||
| 9 | ---------------- | ||
| 10 | SLIMbus (Serial Low Power Interchip Media Bus) is a specification developed by | ||
| 11 | MIPI (Mobile Industry Processor Interface) alliance. The bus uses master/slave | ||
| 12 | configuration, and is a 2-wire multi-drop implementation (clock, and data). | ||
| 13 | |||
| 14 | Currently, SLIMbus is used to interface between application processors of SoCs | ||
| 15 | (System-on-Chip) and peripheral components (typically codec). SLIMbus uses | ||
| 16 | Time-Division-Multiplexing to accommodate multiple data channels, and | ||
| 17 | a control channel. | ||
| 18 | |||
| 19 | The control channel is used for various control functions such as bus | ||
| 20 | management, configuration and status updates. These messages can be unicast (e.g. | ||
| 21 | reading/writing device specific values), or multicast (e.g. data channel | ||
| 22 | reconfiguration sequence is a broadcast message announced to all devices) | ||
| 23 | |||
| 24 | A data channel is used for data-transfer between 2 SLIMbus devices. Data | ||
| 25 | channel uses dedicated ports on the device. | ||
| 26 | |||
| 27 | Hardware description: | ||
| 28 | --------------------- | ||
| 29 | SLIMbus specification has different types of device classifications based on | ||
| 30 | their capabilities. | ||
| 31 | A manager device is responsible for enumeration, configuration, and dynamic | ||
| 32 | channel allocation. Every bus has 1 active manager. | ||
| 33 | |||
| 34 | A generic device is a device providing application functionality (e.g. codec). | ||
| 35 | |||
| 36 | Framer device is responsible for clocking the bus, and transmitting frame-sync | ||
| 37 | and framing information on the bus. | ||
| 38 | |||
| 39 | Each SLIMbus component has an interface device for monitoring physical layer. | ||
| 40 | |||
| 41 | Typically each SoC contains SLIMbus component having 1 manager, 1 framer device, | ||
| 42 | 1 generic device (for data channel support), and 1 interface device. | ||
| 43 | External peripheral SLIMbus component usually has 1 generic device (for | ||
| 44 | functionality/data channel support), and an associated interface device. | ||
| 45 | The generic device's registers are mapped as 'value elements' so that they can | ||
| 46 | be written/read using SLIMbus control channel exchanging control/status type of | ||
| 47 | information. | ||
| 48 | In case there are multiple framer devices on the same bus, manager device is | ||
| 49 | responsible to select the active-framer for clocking the bus. | ||
| 50 | |||
| 51 | Per specification, SLIMbus uses "clock gears" to do power management based on | ||
| 52 | current frequency and bandwidth requirements. There are 10 clock gears and each | ||
| 53 | gear changes the SLIMbus frequency to be twice its previous gear. | ||
| 54 | |||
| 55 | Each device has a 6-byte enumeration-address and the manager assigns every | ||
| 56 | device with a 1-byte logical address after the devices report presence on the | ||
| 57 | bus. | ||
| 58 | |||
| 59 | Software description: | ||
| 60 | --------------------- | ||
| 61 | There are 2 types of SLIMbus drivers: | ||
| 62 | |||
| 63 | slim_controller represents a 'controller' for SLIMbus. This driver should | ||
| 64 | implement duties needed by the SoC (manager device, associated | ||
| 65 | interface device for monitoring the layers and reporting errors, default | ||
| 66 | framer device). | ||
| 67 | |||
| 68 | slim_device represents the 'generic device/component' for SLIMbus, and a | ||
| 69 | slim_driver should implement driver for that slim_device. | ||
| 70 | |||
| 71 | Device notifications to the driver: | ||
| 72 | ----------------------------------- | ||
| 73 | Since SLIMbus devices have mechanisms for reporting their presence, the | ||
| 74 | framework allows drivers to bind when corresponding devices report their | ||
| 75 | presence on the bus. | ||
| 76 | However, it is possible that the driver needs to be probed | ||
| 77 | first so that it can enable corresponding SLIMbus device (e.g. power it up and/or | ||
| 78 | take it out of reset). To support that behavior, the framework allows drivers | ||
| 79 | to probe first as well (e.g. using standard DeviceTree compatibility field). | ||
| 80 | This creates the necessity for the driver to know when the device is functional | ||
| 81 | (i.e. reported present). device_up callback is used for that reason when the | ||
| 82 | device reports present and is assigned a logical address by the controller. | ||
| 83 | |||
| 84 | Similarly, SLIMbus devices 'report absent' when they go down. A 'device_down' | ||
| 85 | callback notifies the driver when the device reports absent and its logical | ||
| 86 | address assignment is invalidated by the controller. | ||
| 87 | |||
| 88 | Another notification "boot_device" is used to notify the slim_driver when | ||
| 89 | controller resets the bus. This notification allows the driver to take necessary | ||
| 90 | steps to boot the device so that it's functional after the bus has been reset. | ||
| 91 | |||
| 92 | Driver and Controller APIs: | ||
| 93 | -------------------------- | ||
| 94 | .. kernel-doc:: include/linux/slimbus.h | ||
| 95 | :internal: | ||
| 96 | |||
| 97 | .. kernel-doc:: drivers/slimbus/slimbus.h | ||
| 98 | :internal: | ||
| 99 | |||
| 100 | .. kernel-doc:: drivers/slimbus/core.c | ||
| 101 | :export: | ||
| 102 | |||
| 103 | Clock-pause: | ||
| 104 | ------------ | ||
| 105 | SLIMbus mandates that a reconfiguration sequence (known as clock-pause) be | ||
| 106 | broadcast to all active devices on the bus before the bus can enter low-power | ||
| 107 | mode. Controller uses this sequence when it decides to enter low-power mode so | ||
| 108 | that corresponding clocks and/or power-rails can be turned off to save power. | ||
| 109 | Clock-pause is exited by waking up framer device (if controller driver initiates | ||
| 110 | exiting low power mode), or by toggling the data line (if a slave device wants | ||
| 111 | to initiate it). | ||
| 112 | |||
| 113 | Clock-pause APIs: | ||
| 114 | ~~~~~~~~~~~~~~~~~ | ||
| 115 | .. kernel-doc:: drivers/slimbus/sched.c | ||
| 116 | :export: | ||
| 117 | |||
| 118 | Messaging: | ||
| 119 | ---------- | ||
| 120 | The framework supports regmap and read/write apis to exchange control-information | ||
| 121 | with a SLIMbus device. APIs can be synchronous or asynchronous. | ||
| 122 | The header file <linux/slimbus.h> has more documentation about messaging APIs. | ||
| 123 | |||
| 124 | Messaging APIs: | ||
| 125 | ~~~~~~~~~~~~~~~ | ||
| 126 | .. kernel-doc:: drivers/slimbus/messaging.c | ||
| 127 | :export: | ||
diff --git a/Documentation/driver-api/soundwire/index.rst b/Documentation/driver-api/soundwire/index.rst new file mode 100644 index 000000000000..647e94654752 --- /dev/null +++ b/Documentation/driver-api/soundwire/index.rst | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | ======================= | ||
| 2 | SoundWire Documentation | ||
| 3 | ======================= | ||
| 4 | |||
| 5 | .. toctree:: | ||
| 6 | :maxdepth: 1 | ||
| 7 | |||
| 8 | summary | ||
| 9 | |||
| 10 | .. only:: subproject | ||
| 11 | |||
| 12 | Indices | ||
| 13 | ======= | ||
| 14 | |||
| 15 | * :ref:`genindex` | ||
diff --git a/Documentation/driver-api/soundwire/summary.rst b/Documentation/driver-api/soundwire/summary.rst new file mode 100644 index 000000000000..8193125a2bfb --- /dev/null +++ b/Documentation/driver-api/soundwire/summary.rst | |||
| @@ -0,0 +1,207 @@ | |||
| 1 | =========================== | ||
| 2 | SoundWire Subsystem Summary | ||
| 3 | =========================== | ||
| 4 | |||
| 5 | SoundWire is a new interface ratified in 2015 by the MIPI Alliance. | ||
| 6 | SoundWire is used for transporting data typically related to audio | ||
| 7 | functions. SoundWire interface is optimized to integrate audio devices in | ||
| 8 | mobile or mobile inspired systems. | ||
| 9 | |||
| 10 | SoundWire is a 2-pin multi-drop interface with data and clock line. It | ||
| 11 | facilitates development of low cost, efficient, high performance systems. | ||
| 12 | Broad level key features of SoundWire interface include: | ||
| 13 | |||
| 14 | (1) Transporting all of payload data channels, control information, and setup | ||
| 15 | commands over a single two-pin interface. | ||
| 16 | |||
| 17 | (2) Lower clock frequency, and hence lower power consumption, by use of DDR | ||
| 18 | (Dual Data Rate) data transmission. | ||
| 19 | |||
| 20 | (3) Clock scaling and optional multiple data lanes to give wide flexibility | ||
| 21 | in data rate to match system requirements. | ||
| 22 | |||
| 23 | (4) Device status monitoring, including interrupt-style alerts to the Master. | ||
| 24 | |||
| 25 | The SoundWire protocol supports up to eleven Slave interfaces. All the | ||
| 26 | interfaces share the common Bus containing data and clock line. Each of the | ||
| 27 | Slaves can support up to 14 Data Ports. 13 Data Ports are dedicated to audio | ||
| 28 | transport. Data Port0 is dedicated to transport of Bulk control information, | ||
| 29 | each of the audio Data Ports (1..14) can support up to 8 Channels in | ||
| 30 | transmit or receiving mode (typically fixed direction but configurable | ||
| 31 | direction is enabled by the specification). Bandwidth restrictions to | ||
| 32 | ~19.2..24.576Mbits/s don't however allow for 11*13*8 channels to be | ||
| 33 | transmitted simultaneously. | ||
| 34 | |||
| 35 | Below figure shows an example of connectivity between a SoundWire Master and | ||
| 36 | two Slave devices. :: | ||
| 37 | |||
| 38 | +---------------+ +---------------+ | ||
| 39 | | | Clock Signal | | | ||
| 40 | | Master |-------+-------------------------------| Slave | | ||
| 41 | | Interface | | Data Signal | Interface 1 | | ||
| 42 | | |-------|-------+-----------------------| | | ||
| 43 | +---------------+ | | +---------------+ | ||
| 44 | | | | ||
| 45 | | | | ||
| 46 | | | | ||
| 47 | +--+-------+--+ | ||
| 48 | | | | ||
| 49 | | Slave | | ||
| 50 | | Interface 2 | | ||
| 51 | | | | ||
| 52 | +-------------+ | ||
| 53 | |||
| 54 | |||
| 55 | Terminology | ||
| 56 | =========== | ||
| 57 | |||
| 58 | The MIPI SoundWire specification uses the term 'device' to refer to a Master | ||
| 59 | or Slave interface, which of course can be confusing. In this summary and | ||
| 60 | code we use the term interface only to refer to the hardware. We follow the | ||
| 61 | Linux device model by mapping each Slave interface connected on the bus as a | ||
| 62 | device managed by a specific driver. The Linux SoundWire subsystem provides | ||
| 63 | a framework to implement a SoundWire Slave driver with an API allowing | ||
| 64 | 3rd-party vendors to enable implementation-defined functionality while | ||
| 65 | common setup/configuration tasks are handled by the bus. | ||
| 66 | |||
| 67 | Bus: | ||
| 68 | Implements SoundWire Linux Bus which handles the SoundWire protocol. | ||
| 69 | Programs all the MIPI-defined Slave registers. Represents a SoundWire | ||
| 70 | Master. Multiple instances of Bus may be present in a system. | ||
| 71 | |||
| 72 | Slave: | ||
| 73 | Registers as SoundWire Slave device (Linux Device). Multiple Slave devices | ||
| 74 | can register to a Bus instance. | ||
| 75 | |||
| 76 | Slave driver: | ||
| 77 | Driver controlling the Slave device. MIPI-specified registers are controlled | ||
| 78 | directly by the Bus (and transmitted through the Master driver/interface). | ||
| 79 | Any implementation-defined Slave register is controlled by Slave driver. In | ||
| 80 | practice, it is expected that the Slave driver relies on regmap and does not | ||
| 81 | request direct register access. | ||
| 82 | |||
| 83 | Programming interfaces (SoundWire Master interface Driver) | ||
| 84 | ========================================================== | ||
| 85 | |||
| 86 | SoundWire Bus supports programming interfaces for the SoundWire Master | ||
| 87 | implementation and SoundWire Slave devices. All the code uses the "sdw" | ||
| 88 | prefix commonly used by SoC designers and 3rd party vendors. | ||
| 89 | |||
| 90 | Each of the SoundWire Master interfaces needs to be registered to the Bus. | ||
| 91 | Bus implements API to read standard Master MIPI properties and also provides | ||
| 92 | callback in Master ops for Master driver to implement its own functions that | ||
| 93 | provides capabilities information. DT support is not implemented at this | ||
| 94 | time but should be trivial to add since capabilities are enabled with the | ||
| 95 | ``device_property_`` API. | ||
| 96 | |||
| 97 | The Master interface along with the Master interface capabilities are | ||
| 98 | registered based on board file, DT or ACPI. | ||
| 99 | |||
| 100 | Following is the Bus API to register the SoundWire Bus: | ||
| 101 | |||
| 102 | .. code-block:: c | ||
| 103 | |||
| 104 | int sdw_add_bus_master(struct sdw_bus *bus) | ||
| 105 | { | ||
| 106 | if (!bus->dev) | ||
| 107 | return -ENODEV; | ||
| 108 | |||
| 109 | mutex_init(&bus->lock); | ||
| 110 | INIT_LIST_HEAD(&bus->slaves); | ||
| 111 | |||
| 112 | /* Check ACPI for Slave devices */ | ||
| 113 | sdw_acpi_find_slaves(bus); | ||
| 114 | |||
| 115 | /* Check DT for Slave devices */ | ||
| 116 | sdw_of_find_slaves(bus); | ||
| 117 | |||
| 118 | return 0; | ||
| 119 | } | ||
| 120 | |||
| 121 | This will initialize sdw_bus object for Master device. "sdw_master_ops" and | ||
| 122 | "sdw_master_port_ops" callback functions are provided to the Bus. | ||
| 123 | |||
| 124 | "sdw_master_ops" is used by Bus to control the Bus in the hardware specific | ||
| 125 | way. It includes Bus control functions such as sending the SoundWire | ||
| 126 | read/write messages on Bus, setting up clock frequency & Stream | ||
| 127 | Synchronization Point (SSP). The "sdw_master_ops" structure abstracts the | ||
| 128 | hardware details of the Master from the Bus. | ||
| 129 | |||
| 130 | "sdw_master_port_ops" is used by Bus to setup the Port parameters of the | ||
| 131 | Master interface Port. Master interface Port register map is not defined by | ||
| 132 | MIPI specification, so Bus calls the "sdw_master_port_ops" callback | ||
| 133 | function to do Port operations like "Port Prepare", "Port Transport params | ||
| 134 | set", "Port enable and disable". The implementation of the Master driver can | ||
| 135 | then perform hardware-specific configurations. | ||
| 136 | |||
| 137 | Programming interfaces (SoundWire Slave Driver) | ||
| 138 | =============================================== | ||
| 139 | |||
| 140 | The MIPI specification requires each Slave interface to expose a unique | ||
| 141 | 48-bit identifier, stored in 6 read-only dev_id registers. This dev_id | ||
| 142 | identifier contains vendor and part information, as well as a field enabling | ||
| 143 | to differentiate between identical components. An additional class field is | ||
| 144 | currently unused. Slave driver is written for a specific vendor and part | ||
| 145 | identifier, Bus enumerates the Slave device based on these two ids. | ||
| 146 | Slave device and driver match is done based on these two ids . Probe | ||
| 147 | of the Slave driver is called by Bus on successful match between device and | ||
| 148 | driver id. A parent/child relationship is enforced between Master and Slave | ||
| 149 | devices (the logical representation is aligned with the physical | ||
| 150 | connectivity). | ||
| 151 | |||
| 152 | The information on Master/Slave dependencies is stored in platform data, | ||
| 153 | board-file, ACPI or DT. The MIPI Software specification defines additional | ||
| 154 | link_id parameters for controllers that have multiple Master interfaces. The | ||
| 155 | dev_id registers are only unique in the scope of a link, and the link_id | ||
| 156 | unique in the scope of a controller. Both dev_id and link_id are not | ||
| 157 | necessarily unique at the system level but the parent/child information is | ||
| 158 | used to avoid ambiguity. | ||
| 159 | |||
| 160 | .. code-block:: c | ||
| 161 | |||
| 162 | static const struct sdw_device_id slave_id[] = { | ||
| 163 | SDW_SLAVE_ENTRY(0x025d, 0x700, 0), | ||
| 164 | {}, | ||
| 165 | }; | ||
| 166 | MODULE_DEVICE_TABLE(sdw, slave_id); | ||
| 167 | |||
| 168 | static struct sdw_driver slave_sdw_driver = { | ||
| 169 | .driver = { | ||
| 170 | .name = "slave_xxx", | ||
| 171 | .pm = &slave_runtime_pm, | ||
| 172 | }, | ||
| 173 | .probe = slave_sdw_probe, | ||
| 174 | .remove = slave_sdw_remove, | ||
| 175 | .ops = &slave_slave_ops, | ||
| 176 | .id_table = slave_id, | ||
| 177 | }; | ||
| 178 | |||
| 179 | |||
| 180 | For capabilities, Bus implements API to read standard Slave MIPI properties | ||
| 181 | and also provides callback in Slave ops for Slave driver to implement own | ||
| 182 | function that provides capabilities information. Bus needs to know a set of | ||
| 183 | Slave capabilities to program Slave registers and to control the Bus | ||
| 184 | reconfigurations. | ||
| 185 | |||
| 186 | Future enhancements to be done | ||
| 187 | ============================== | ||
| 188 | |||
| 189 | (1) Bulk Register Access (BRA) transfers. | ||
| 190 | |||
| 191 | |||
| 192 | (2) Multiple data lane support. | ||
| 193 | |||
| 194 | Links | ||
| 195 | ===== | ||
| 196 | |||
| 197 | SoundWire MIPI specification 1.1 is available at: | ||
| 198 | https://members.mipi.org/wg/All-Members/document/70290 | ||
| 199 | |||
| 200 | SoundWire MIPI DisCo (Discovery and Configuration) specification is | ||
| 201 | available at: | ||
| 202 | https://www.mipi.org/specifications/mipi-disco-soundwire | ||
| 203 | |||
| 204 | (publicly accessible with registration or directly accessible to MIPI | ||
| 205 | members) | ||
| 206 | |||
| 207 | MIPI Alliance Manufacturer ID Page: mid.mipi.org | ||
diff --git a/Documentation/driver-api/uio-howto.rst b/Documentation/driver-api/uio-howto.rst index f73d660b2956..693e3bd84e79 100644 --- a/Documentation/driver-api/uio-howto.rst +++ b/Documentation/driver-api/uio-howto.rst | |||
| @@ -667,27 +667,28 @@ Making the driver recognize the device | |||
| 667 | Since the driver does not declare any device GUID's, it will not get | 667 | Since the driver does not declare any device GUID's, it will not get |
| 668 | loaded automatically and will not automatically bind to any devices, you | 668 | loaded automatically and will not automatically bind to any devices, you |
| 669 | must load it and allocate id to the driver yourself. For example, to use | 669 | must load it and allocate id to the driver yourself. For example, to use |
| 670 | the network device GUID:: | 670 | the network device class GUID:: |
| 671 | 671 | ||
| 672 | modprobe uio_hv_generic | 672 | modprobe uio_hv_generic |
| 673 | echo "f8615163-df3e-46c5-913f-f2d2f965ed0e" > /sys/bus/vmbus/drivers/uio_hv_generic/new_id | 673 | echo "f8615163-df3e-46c5-913f-f2d2f965ed0e" > /sys/bus/vmbus/drivers/uio_hv_generic/new_id |
| 674 | 674 | ||
| 675 | If there already is a hardware specific kernel driver for the device, | 675 | If there already is a hardware specific kernel driver for the device, |
| 676 | the generic driver still won't bind to it, in this case if you want to | 676 | the generic driver still won't bind to it, in this case if you want to |
| 677 | use the generic driver (why would you?) you'll have to manually unbind | 677 | use the generic driver for a userspace library you'll have to manually unbind |
| 678 | the hardware specific driver and bind the generic driver, like this:: | 678 | the hardware specific driver and bind the generic driver, using the device specific GUID |
| 679 | like this:: | ||
| 679 | 680 | ||
| 680 | echo -n vmbus-ed963694-e847-4b2a-85af-bc9cfc11d6f3 > /sys/bus/vmbus/drivers/hv_netvsc/unbind | 681 | echo -n ed963694-e847-4b2a-85af-bc9cfc11d6f3 > /sys/bus/vmbus/drivers/hv_netvsc/unbind |
| 681 | echo -n vmbus-ed963694-e847-4b2a-85af-bc9cfc11d6f3 > /sys/bus/vmbus/drivers/uio_hv_generic/bind | 682 | echo -n ed963694-e847-4b2a-85af-bc9cfc11d6f3 > /sys/bus/vmbus/drivers/uio_hv_generic/bind |
| 682 | 683 | ||
| 683 | You can verify that the device has been bound to the driver by looking | 684 | You can verify that the device has been bound to the driver by looking |
| 684 | for it in sysfs, for example like the following:: | 685 | for it in sysfs, for example like the following:: |
| 685 | 686 | ||
| 686 | ls -l /sys/bus/vmbus/devices/vmbus-ed963694-e847-4b2a-85af-bc9cfc11d6f3/driver | 687 | ls -l /sys/bus/vmbus/devices/ed963694-e847-4b2a-85af-bc9cfc11d6f3/driver |
| 687 | 688 | ||
| 688 | Which if successful should print:: | 689 | Which if successful should print:: |
| 689 | 690 | ||
| 690 | .../vmbus-ed963694-e847-4b2a-85af-bc9cfc11d6f3/driver -> ../../../bus/vmbus/drivers/uio_hv_generic | 691 | .../ed963694-e847-4b2a-85af-bc9cfc11d6f3/driver -> ../../../bus/vmbus/drivers/uio_hv_generic |
| 691 | 692 | ||
| 692 | Things to know about uio_hv_generic | 693 | Things to know about uio_hv_generic |
| 693 | ----------------------------------- | 694 | ----------------------------------- |
| @@ -697,6 +698,17 @@ prevents the device from generating further interrupts until the bit is | |||
| 697 | cleared. The userspace driver should clear this bit before blocking and | 698 | cleared. The userspace driver should clear this bit before blocking and |
| 698 | waiting for more interrupts. | 699 | waiting for more interrupts. |
| 699 | 700 | ||
| 701 | When host rescinds a device, the interrupt file descriptor is marked down | ||
| 702 | and any reads of the interrupt file descriptor will return -EIO. Similar | ||
| 703 | to a closed socket or disconnected serial device. | ||
| 704 | |||
| 705 | The vmbus device regions are mapped into uio device resources: | ||
| 706 | 0) Channel ring buffers: guest to host and host to guest | ||
| 707 | 1) Guest to host interrupt signalling pages | ||
| 708 | 2) Guest to host monitor page | ||
| 709 | 3) Network receive buffer region | ||
| 710 | 4) Network send buffer region | ||
| 711 | |||
| 700 | Further information | 712 | Further information |
| 701 | =================== | 713 | =================== |
| 702 | 714 | ||
