aboutsummaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)AuthorFilesLines
2016-10-17Do not link libnet to net-snk anymore, and remove net-snk from board-qemuThomas Huth2-3/+2
Since libnet is now linked to Paflof directly, we do not have to link it into net-snk anymore. So for board-qemu, we can now even exclude net-snk completely from the build (for board-js2x, it is still required for the biosemu, so we can not erase the net-snk folder completely yet). Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-10-17Add a Forth-to-C wrapper for the ping command, tooThomas Huth2-0/+18
Now that we link libnet to Paflof, we can call the ping function there directly instead of using the one from net-snk. We add a similar Forth-to-C wrapper like it has already been done for netboot() - simplification and clean-up will be done in a later patch once we do not link against net-snk anymore. Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-10-17Link libnet code to Paflof and add a wrapper for netboot()Thomas Huth2-0/+21
Now that all necessary functions are provided by Paflof, too, we can finally link the libnet code to this binary. To be able to call the netboot() function from the Forth code now, we also add a wrapper that takes the parameter string from the obp-tftp package and converts it to an argv array that is expected by the netboot() function. Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-10-13Add virtio-serial device supportNikunj A Dadhania5-1/+269
Add support for virtio serial device to be used as a console device. Currently, SLOF only supports spapr-vty device. With this addition virtio console can be used during boot. Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-10-10libnet: Make netapps.h includable from .code filesThomas Huth3-9/+12
Unfortunately netapps.h currently can't be included from .code Forth-to-C wrapper files - it includes tftp.h which in turn includes ipv6.h, and that header contains some constructs which can't be used in .code files. So let's make netapps.h independent from tftp.h and add some "extern" keywords like it is done with the other header files already that are included from .code files. Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-10-10libnet: Remove unused prototypes from netapps.hThomas Huth1-3/+0
These functions do not exist anymore, thus their prototypes can be removed nowadays. Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-10-10libnet: Fix the printout of the ping commandThomas Huth1-3/+1
Commit 7e31382cca5fb988b ("Improve printed text when booting via network") moved the "Requesting information via DHCP..." printf statement from the netboot() function into the dhcp() function. However, it did not take into account that the ping() function should be changed in the same way, so with ping, the message is currently printed out twice. So let's re-arrange the printout of ping() now accordingly. Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-10-10libnet: Make sure to close sockets when we're doneThomas Huth2-0/+10
If libnet is linked to the net-snk, it does not matter since the whole stack is completely reloaded each time. But if we are linking libnet to Paflof, we've got to make sure to properly release the resources that we've allocated before, since the code and data stays in memory. Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-09-14paflof: Add socket(), send() and recv() functions to paflofThomas Huth1-0/+53
Code is slightly based on the implementation from net-snk, but has been adapted to use the forth_eval() and forth_push/pop() macros instead. Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-09-14paflof: Provide get_timer() and set_timer() helper functionsThomas Huth1-0/+6
They are needed for libnet, too. This implementation uses SLOF_GetTimer() instead of using the decrementer like it is done in the net-snk functions. Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-08-16libnet: Re-initialize global variables at the beginning of tftp()Thomas Huth1-15/+23
When we will link the TFTP code to paflof instead of net-snk later, the executable won't be reloaded each time we want to do an TFTP transfer, so we got to make sure to initialize global variables properly instead of relying on the ELF loader to do this job. Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-08-03usb: Set XHCI slot speed according to port statusThomas Huth3-7/+22
So far, the code was always assuming SuperSpeed for all devices, which seemed to work OK with QEMU ... but let's better play safe instead and use the speed from the port status instead. Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-08-03usb: Build correct route string for USB3 devices behind a hubThomas Huth1-4/+10
To support USB3 devices attached to a hub, we've got to set the so-called "route string" in the slot context, which is a concatenation of the hub port numbers that need to be traversed between the root hub port and the destination device. Signed-off-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-08-03usb: Initialize USB3 devices on a hub and keep track of hub topologyThomas Huth4-11/+39
USB3 devices need to be initialized with usb3_dev_init(), so that they get assigned a proper slot ID. And for USB3 devices that are attached to a (non-root) hub, we also need to keep track of the hub topology, so a new field called "hub" is added to the struct usb_dev which references the hub devices where the current USB devices is attached to. The hub topology will be used later to build the so-called "route string" for the USB3 devices. Signed-off-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-08-03usb: Increase amount of maximum slot IDs and add a sanity checkThomas Huth2-1/+7
SLOF should be able to support more than just four devices on the four root hub ports. So we've got to increase the amount of possible slot IDs. Since QEMU supports up to 44 devices (four devices at the root ports + 5 tiers of hubs with 8 ports each), this seems to be a good new value instead. And to make sure that we do not accidentially get a buffer overflow when accessing the xhcd->xdevs[slot_id] array, this patch also add a sanity check at the beginning of the xhci_alloc_dev() function here. Signed-off-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-08-03usb: Move XHCI port state arrays from header to .c fileThomas Huth2-18/+17
Arrays should not be declared in a header (to avoid that it gets declared multiple times when the header is included more than once), so the ps_array_usbX settings should reside in the .c file instead. Signed-off-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-07-25usb-hid: Fix non-working comma keyThomas Huth1-7/+0
Commit c8bd0cdce2bd ("Caps is not always shift") introduced a global "ctrl" variable and two new cases to handle the shift key in check_key_code() in usb-hid.c. However, one of these cases uses the key code for the "," key and thus prevents that key from working in the VGA console. The global ctrl variable that is set by these two cases is never read again, so this is apparently completely useless code, likely just an accidential leftover from debugging the original issue. So let's simply remove that bad code to get the comma key working again. Fixes: c8bd0cdce2bd7c4498d61079553c89747656614d Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-06-27virtio-net: fix ring handling in receiveNikunj A Dadhania1-2/+4
A bug crept in while doing the virtio 1.0 enablement in commit 6e4d62c2 (virtio-net: enable virtio 1.0) + idx = virtio_modern16_to_cpu(&virtiodev, vq_rx.used->idx); [...] - vq_rx.avail->ring[vq_rx.avail->idx % vq_rx.size] = id - 1; + vq_rx.avail->ring[idx % vq_rx.size] = virtio_cpu_to_modern16(&virtiodev, id - 1); sync(); - vq_rx.avail->idx += 1; + vq_rx.avail->idx = virtio_cpu_to_modern16(&virtiodev, idx + 1); Should be using avail->idx in place of used->idx. Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-06-27net: Remove remainders of the MTFTP codeThomas Huth3-49/+1
The separate mtftp.h and mtftp.c files (for doing multicast TFTP) never really got included into the SLOF repository, so it does not make sense to keep the "#ifdef USE_MTFTP" code snippets around. Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-06-27net: Move also files from clients/net-snk/app/netapps/ to lib/libnet/Thomas Huth6-1/+1305
These files should go into libnet, too, so we can later link them to paflof instead of net-snk. Note: A "make distclean" is required after applying this patch to make sure that the dependencies for the moved files are properly re-generated. Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-06-27net: Move files from clients/net-snk/app/netlib/ to lib/libnet/Thomas Huth25-1/+6131
When we want to link the network stack to other parts of the firmware later (paflof), we've got to turn it into a proper library first. Note: Make sure to run "make distclean" after this patch, so that the dependencies for the moved files get rebuilt properly. Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-06-07usb-xhci: assign field4 before conditionalNikunj A Dadhania1-5/+4
Static analysis tool reported: file lib/libusb/usb-xhci.c line 1022 uninitialized `field4' file lib/libusb/usb-xhci.c line 1036 uninitialized `field4' Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Reviewed-by: Laurent Vivier <lvivier@redhat.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-05-19rtas-nvram: optimize eraseNikunj A Dadhania1-0/+11
As this was done at byte granularity, erasing complete nvram(64K default) took a lot of time. To reduce the number of rtas call per byte write which is expensive, the erase is done at one shot using the nvram_buffer that is initiated during the nvram_init call for RTAS_NVRAM. After this patch there is ~450msec improvement during boot. Default qemu booting does not provide file backed nvram, so every boot there would be full erase of 64K. Before this patch: real 0m2.214s user 0m0.015s sys 0m0.006s real 0m2.222s user 0m0.014s sys 0m0.005s real 0m2.201s user 0m0.010s sys 0m0.005s After this patch: real 0m1.762s user 0m0.014s sys 0m0.006s real 0m1.773s user 0m0.011s sys 0m0.004s real 0m1.754s user 0m0.013s sys 0m0.005s Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-05-02xhci: fix missing keys from keyboardNikunj A Dadhania2-12/+41
Current handling of the keyboard polling was very slow and keys were getting dropped. Done following for fixing this: * Use multiple buffers per TRB * Allocate buffers in xhci according to the number of TRBS. This reduces the delay of key? processing by getting rid of wait in the polling routine. Reported-by: Dinar Valeev <k0da@opensuse.org> Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Tested-by: Dinar Valeev <k0da@opensuse.org> Tested-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-05-02xhci: add memory barrier after filling the trbNikunj A Dadhania1-0/+1
A memory barrier was missing after updating the trb details. Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-05-02virtio: White space cleanup in virtio-9p.cThomas Huth1-6/+6
Simple cosmetical fix - some lines were indented with spaces instead of tabs. Change it to be in line with the coding conventions. Signed-off-by: Thomas Huth <thuth@redhat.com> Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-05-02virtio: Add modern version 1.0 support to 9p driverThomas Huth1-18/+19
Allow the new little-endian ring format for the 9p driver, too, just like it has already been done for the other virtio devices. Signed-off-by: Thomas Huth <thuth@redhat.com> Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-02-24libbootmsg: Do not use '\b' characters when printing checkpointsThomas Huth1-4/+2
Using backspaces after printing out the checkpoint numbers is fine when printing to terminals. But if the output of SLOF is placed into a log file instead, this can confuse certain readers like Firefox to interpret the log file as a binary file instead of text. To avoid this problem, we can also use '\r' to move the cursor back to the beginning - this should be fine since the checkpoints are always printed at the beginning of a line anyway. And '\r' is then interpreted as normal text, not as a potential binary file byte. Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-02-11virtio-scsi: enable virtio 1.0Nikunj A Dadhania1-15/+24
Also add a device file for non-transitional pci device id: 0x1048 Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-02-11virtio-scsi: use virtio_fill desc apiNikunj A Dadhania1-19/+15
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-02-11virtio-scsi: use idx during initializationNikunj A Dadhania1-1/+1
Fix the initialization of the virtqueues. It was always initializing the first virtqueue, while the objective is to init all the virtqueues. Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-02-08virtio-net: enable virtio 1.0Nikunj A Dadhania2-33/+64
Also add a device file for non-transitional pci device id: 0x1041 Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-02-08virtio-blk: enable virtio 1.0Nikunj A Dadhania1-19/+31
Also add a device file for non-transitional pci device id: 0x1042 Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-02-08virtio: 1.0 helper to read 16/32/64 bit valueNikunj A Dadhania1-0/+48
To avoid cluttering the driver code with modern/legacy code introduce virtio_cpu_to_modern{16,32,64} and virtio_modern{16,32,64}_to_cpu in a separate header file virtio-internal.h. Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Suggested-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-02-08virtio: add and enable 1.0 device setupNikunj A Dadhania8-18/+151
Introduce parsing routines for virtio capabilities. This would also determine whether we need to function in legacy mode or virtio 1.0. Update routine to start using the base address from the updated legacy structure. With the removal for base address setting in the Forth code and most of the device setup happening in C code, code in virtio.fs is redundant. Remove virtio.fs and move the allocation of the virtio_device structure to the C code instead of the Forth code in individual files. Also, drop the packed attribute for the virtio_{device,cap} structure. The structure is not shared anymore. Drivers need to negotiate the 1.0 feature capability before starting to use 1.0. Disable it in all the drivers until 1.0 is enabled. Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-02-08virtio: 1.0 guest features negotiationNikunj A Dadhania2-0/+44
With virtio 1.0, there feature negotiation step needs to be completed before starting to notify the device. This includes following steps: * Read host supported features * Check if virtio 1.0 is supported * Set guest supported features * Read host features and compare with the guest features. * Write FEATURES_OK and check it back to confirm. Add virtio_get_status supporting routine. Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-02-08virtio: update features set/get register accessorNikunj A Dadhania3-7/+41
The new specification has a 64-bit feature register, change the signature and update the routine to handle them. Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-02-08virtio: make all virtio apis 1.0 awareNikunj A Dadhania2-33/+118
Convert the following routines: virtio_get_qsize virtio_vring_desc virtio_get_vring_avail virtio_get_vring_used virtio_set_status: also use it in device reset. virtio_queue_notify virtio_set_qaddr virtio_{get,read}_config virtio_fill_desc Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-02-08virtio: add 64-bit virtio helpers for 1.0Nikunj A Dadhania1-0/+25
64-bit fields are to be treated as two 32-bit fields, with low 32 bit part followed by the high 32 bit part. Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-02-08virtio: add virtio 1.0 related struct and definesNikunj A Dadhania2-1/+46
Traditionally, struct virtio_device is shared between SLOF and C code. This still remains shared with the addition of virtio_cap structure as well. Now both virtio_device and virtio_cap structures are shared. Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-02-08virtio: get rid of type variable in virtio_deviceNikunj A Dadhania3-46/+21
virtio device structure carries a type variable indicating whether virtio is over PCI or VIO. While VIO is not there and no plan to introduce other transport, there is no purpose of having this variable around and checking for PCI. Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-02-08virtio-net: move setup-mac to the open routineNikunj A Dadhania3-9/+8
MAC reading should be done after the initialization of the device after the features negotiation. Adjust the open routine accordingly. There is no point in sending the mac address to the virtionet_open. Change the signature. Also read the mac address directly from the config space to remove the dependency of getting the mac address from the open routine. Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-02-08virtio-net: make net_hdr_size a variableNikunj A Dadhania1-9/+12
Size of the net_hdr_size is different in legacy and modern devices. This helps in conversion of the driver to 1.0. Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-02-08virtio-net: replace vq array with vq_{tx,rx}Nikunj A Dadhania1-29/+30
Using an array here is not necassary, simplifies the code for readability. Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-02-08virtio-net: use virtio_fill_descNikunj A Dadhania1-24/+11
Simplifies the driver code and is helpful for migration to virtio 1.0 enablement. Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-02-08virtio-{net,blk,scsi,9p}: use status variableNikunj A Dadhania4-28/+43
The virtio_set_status lines were getting too long because of OR'ing the status on the same line of the call. Moreover, going forward we need to add FEATURES_OK status as well. The state progress is quite straight forward, so use status variable instead. Code looks cleaner and can easily make out the change in the state. Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-02-08virtio-blk: add helpers for filling descriptorsNikunj A Dadhania3-15/+44
Enable virtio_fill_desc/fill_blk_hdr with legacy and modern mode for further use Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-02-08virtio-{blk,9p}: enable resetting the deviceNikunj A Dadhania2-9/+2
With the lack of the virtio_queue_init_vq routine, driver like virtio-blk and virtio-9p had disabled device reset in the initialization code. This helper will fix that problem, as the initialization can be done after the device reset. Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-02-08virtio: introduce helper for initializing virt queueNikunj A Dadhania6-51/+53
The routine takes care to allocate and set the queue address in the device. Add these calls in virtio-net, virtio-blk and virtio-9p. With the lack of this routine, devices like virtio-blk and virtio-9p did not do a device reset in the driver initialization code. This helper will fix that problem Change the signature of virtio_set_qaddr, accepting queue address as unsigned long argument. Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
2016-02-08virtio: fix code style/design issues.Nikunj A Dadhania5-123/+117
The patch does not make any functional changes. Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>