2 * Virtio SCSI HBA driver
4 * Copyright IBM Corp. 2010
5 * Copyright Red Hat, Inc. 2011
8 * Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
9 * Paolo Bonzini <pbonzini@redhat.com>
11 * This work is licensed under the terms of the GNU GPL, version 2 or later.
12 * See the COPYING file in the top-level directory.
16 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
18 #include <linux/module.h>
19 #include <linux/slab.h>
20 #include <linux/mempool.h>
21 #include <linux/virtio.h>
22 #include <linux/virtio_ids.h>
23 #include <linux/virtio_config.h>
24 #include <linux/virtio_scsi.h>
25 #include <scsi/scsi_host.h>
26 #include <scsi/scsi_device.h>
27 #include <scsi/scsi_cmnd.h>
29 #define VIRTIO_SCSI_MEMPOOL_SZ 64
30 #define VIRTIO_SCSI_EVENT_LEN 8
32 /* Command queue element */
33 struct virtio_scsi_cmd {
35 struct completion *comp;
37 struct virtio_scsi_cmd_req cmd;
38 struct virtio_scsi_ctrl_tmf_req tmf;
39 struct virtio_scsi_ctrl_an_req an;
42 struct virtio_scsi_cmd_resp cmd;
43 struct virtio_scsi_ctrl_tmf_resp tmf;
44 struct virtio_scsi_ctrl_an_resp an;
45 struct virtio_scsi_event evt;
47 } ____cacheline_aligned_in_smp;
49 struct virtio_scsi_event_node {
50 struct virtio_scsi *vscsi;
51 struct virtio_scsi_event event;
52 struct work_struct work;
55 struct virtio_scsi_vq {
62 /* Per-target queue state */
63 struct virtio_scsi_target_state {
64 /* Never held at the same time as vq_lock. */
68 /* Driver instance state */
70 struct virtio_device *vdev;
72 struct virtio_scsi_vq ctrl_vq;
73 struct virtio_scsi_vq event_vq;
74 struct virtio_scsi_vq req_vq;
76 /* Get some buffers ready for event vq */
77 struct virtio_scsi_event_node event_list[VIRTIO_SCSI_EVENT_LEN];
80 static struct kmem_cache *virtscsi_cmd_cache;
81 static mempool_t *virtscsi_cmd_pool;
83 static inline struct Scsi_Host *virtio_scsi_host(struct virtio_device *vdev)
88 static void virtscsi_compute_resid(struct scsi_cmnd *sc, u32 resid)
93 if (!scsi_bidi_cmnd(sc)) {
94 scsi_set_resid(sc, resid);
98 scsi_in(sc)->resid = min(resid, scsi_in(sc)->length);
99 scsi_out(sc)->resid = resid - scsi_in(sc)->resid;
103 * virtscsi_complete_cmd - finish a scsi_cmd and invoke scsi_done
105 * Called with vq_lock held.
107 static void virtscsi_complete_cmd(struct virtio_scsi *vscsi, void *buf)
109 struct virtio_scsi_cmd *cmd = buf;
110 struct scsi_cmnd *sc = cmd->sc;
111 struct virtio_scsi_cmd_resp *resp = &cmd->resp.cmd;
113 dev_dbg(&sc->device->sdev_gendev,
114 "cmd %p response %u status %#02x sense_len %u\n",
115 sc, resp->response, resp->status, resp->sense_len);
117 sc->result = resp->status;
118 virtscsi_compute_resid(sc, resp->resid);
119 switch (resp->response) {
120 case VIRTIO_SCSI_S_OK:
121 set_host_byte(sc, DID_OK);
123 case VIRTIO_SCSI_S_OVERRUN:
124 set_host_byte(sc, DID_ERROR);
126 case VIRTIO_SCSI_S_ABORTED:
127 set_host_byte(sc, DID_ABORT);
129 case VIRTIO_SCSI_S_BAD_TARGET:
130 set_host_byte(sc, DID_BAD_TARGET);
132 case VIRTIO_SCSI_S_RESET:
133 set_host_byte(sc, DID_RESET);
135 case VIRTIO_SCSI_S_BUSY:
136 set_host_byte(sc, DID_BUS_BUSY);
138 case VIRTIO_SCSI_S_TRANSPORT_FAILURE:
139 set_host_byte(sc, DID_TRANSPORT_DISRUPTED);
141 case VIRTIO_SCSI_S_TARGET_FAILURE:
142 set_host_byte(sc, DID_TARGET_FAILURE);
144 case VIRTIO_SCSI_S_NEXUS_FAILURE:
145 set_host_byte(sc, DID_NEXUS_FAILURE);
148 scmd_printk(KERN_WARNING, sc, "Unknown response %d",
151 case VIRTIO_SCSI_S_FAILURE:
152 set_host_byte(sc, DID_ERROR);
156 WARN_ON(resp->sense_len > VIRTIO_SCSI_SENSE_SIZE);
157 if (sc->sense_buffer) {
158 memcpy(sc->sense_buffer, resp->sense,
159 min_t(u32, resp->sense_len, VIRTIO_SCSI_SENSE_SIZE));
161 set_driver_byte(sc, DRIVER_SENSE);
164 mempool_free(cmd, virtscsi_cmd_pool);
168 static void virtscsi_vq_done(struct virtio_scsi *vscsi,
169 struct virtio_scsi_vq *virtscsi_vq,
170 void (*fn)(struct virtio_scsi *vscsi, void *buf))
175 struct virtqueue *vq = virtscsi_vq->vq;
177 spin_lock_irqsave(&virtscsi_vq->vq_lock, flags);
179 virtqueue_disable_cb(vq);
180 while ((buf = virtqueue_get_buf(vq, &len)) != NULL)
182 } while (!virtqueue_enable_cb(vq));
183 spin_unlock_irqrestore(&virtscsi_vq->vq_lock, flags);
186 static void virtscsi_req_done(struct virtqueue *vq)
188 struct Scsi_Host *sh = virtio_scsi_host(vq->vdev);
189 struct virtio_scsi *vscsi = shost_priv(sh);
191 virtscsi_vq_done(vscsi, &vscsi->req_vq, virtscsi_complete_cmd);
194 static void virtscsi_complete_free(struct virtio_scsi *vscsi, void *buf)
196 struct virtio_scsi_cmd *cmd = buf;
199 complete_all(cmd->comp);
201 mempool_free(cmd, virtscsi_cmd_pool);
204 static void virtscsi_ctrl_done(struct virtqueue *vq)
206 struct Scsi_Host *sh = virtio_scsi_host(vq->vdev);
207 struct virtio_scsi *vscsi = shost_priv(sh);
209 virtscsi_vq_done(vscsi, &vscsi->ctrl_vq, virtscsi_complete_free);
212 static int virtscsi_kick_event(struct virtio_scsi *vscsi,
213 struct virtio_scsi_event_node *event_node)
216 struct scatterlist sg;
219 sg_init_one(&sg, &event_node->event, sizeof(struct virtio_scsi_event));
221 spin_lock_irqsave(&vscsi->event_vq.vq_lock, flags);
223 err = virtqueue_add_inbuf(vscsi->event_vq.vq, &sg, 1, event_node,
226 virtqueue_kick(vscsi->event_vq.vq);
228 spin_unlock_irqrestore(&vscsi->event_vq.vq_lock, flags);
233 static int virtscsi_kick_event_all(struct virtio_scsi *vscsi)
237 for (i = 0; i < VIRTIO_SCSI_EVENT_LEN; i++) {
238 vscsi->event_list[i].vscsi = vscsi;
239 virtscsi_kick_event(vscsi, &vscsi->event_list[i]);
245 static void virtscsi_cancel_event_work(struct virtio_scsi *vscsi)
249 for (i = 0; i < VIRTIO_SCSI_EVENT_LEN; i++)
250 cancel_work_sync(&vscsi->event_list[i].work);
253 static void virtscsi_handle_transport_reset(struct virtio_scsi *vscsi,
254 struct virtio_scsi_event *event)
256 struct scsi_device *sdev;
257 struct Scsi_Host *shost = virtio_scsi_host(vscsi->vdev);
258 unsigned int target = event->lun[1];
259 unsigned int lun = (event->lun[2] << 8) | event->lun[3];
261 switch (event->reason) {
262 case VIRTIO_SCSI_EVT_RESET_RESCAN:
263 scsi_add_device(shost, 0, target, lun);
265 case VIRTIO_SCSI_EVT_RESET_REMOVED:
266 sdev = scsi_device_lookup(shost, 0, target, lun);
268 scsi_remove_device(sdev);
269 scsi_device_put(sdev);
271 pr_err("SCSI device %d 0 %d %d not found\n",
272 shost->host_no, target, lun);
276 pr_info("Unsupport virtio scsi event reason %x\n", event->reason);
280 static void virtscsi_handle_param_change(struct virtio_scsi *vscsi,
281 struct virtio_scsi_event *event)
283 struct scsi_device *sdev;
284 struct Scsi_Host *shost = virtio_scsi_host(vscsi->vdev);
285 unsigned int target = event->lun[1];
286 unsigned int lun = (event->lun[2] << 8) | event->lun[3];
287 u8 asc = event->reason & 255;
288 u8 ascq = event->reason >> 8;
290 sdev = scsi_device_lookup(shost, 0, target, lun);
292 pr_err("SCSI device %d 0 %d %d not found\n",
293 shost->host_no, target, lun);
297 /* Handle "Parameters changed", "Mode parameters changed", and
298 "Capacity data has changed". */
299 if (asc == 0x2a && (ascq == 0x00 || ascq == 0x01 || ascq == 0x09))
300 scsi_rescan_device(&sdev->sdev_gendev);
302 scsi_device_put(sdev);
305 static void virtscsi_handle_event(struct work_struct *work)
307 struct virtio_scsi_event_node *event_node =
308 container_of(work, struct virtio_scsi_event_node, work);
309 struct virtio_scsi *vscsi = event_node->vscsi;
310 struct virtio_scsi_event *event = &event_node->event;
312 if (event->event & VIRTIO_SCSI_T_EVENTS_MISSED) {
313 event->event &= ~VIRTIO_SCSI_T_EVENTS_MISSED;
314 scsi_scan_host(virtio_scsi_host(vscsi->vdev));
317 switch (event->event) {
318 case VIRTIO_SCSI_T_NO_EVENT:
320 case VIRTIO_SCSI_T_TRANSPORT_RESET:
321 virtscsi_handle_transport_reset(vscsi, event);
323 case VIRTIO_SCSI_T_PARAM_CHANGE:
324 virtscsi_handle_param_change(vscsi, event);
327 pr_err("Unsupport virtio scsi event %x\n", event->event);
329 virtscsi_kick_event(vscsi, event_node);
332 static void virtscsi_complete_event(struct virtio_scsi *vscsi, void *buf)
334 struct virtio_scsi_event_node *event_node = buf;
336 INIT_WORK(&event_node->work, virtscsi_handle_event);
337 schedule_work(&event_node->work);
340 static void virtscsi_event_done(struct virtqueue *vq)
342 struct Scsi_Host *sh = virtio_scsi_host(vq->vdev);
343 struct virtio_scsi *vscsi = shost_priv(sh);
345 virtscsi_vq_done(vscsi, &vscsi->event_vq, virtscsi_complete_event);
349 * virtscsi_add_cmd - add a virtio_scsi_cmd to a virtqueue
350 * @vq : the struct virtqueue we're talking about
351 * @cmd : command structure
352 * @req_size : size of the request buffer
353 * @resp_size : size of the response buffer
354 * @gfp : flags to use for memory allocations
356 static int virtscsi_add_cmd(struct virtqueue *vq,
357 struct virtio_scsi_cmd *cmd,
358 size_t req_size, size_t resp_size, gfp_t gfp)
360 struct scsi_cmnd *sc = cmd->sc;
361 struct scatterlist *sgs[4], req, resp;
362 struct sg_table *out, *in;
363 unsigned out_num = 0, in_num = 0;
367 if (sc && sc->sc_data_direction != DMA_NONE) {
368 if (sc->sc_data_direction != DMA_FROM_DEVICE)
369 out = &scsi_out(sc)->table;
370 if (sc->sc_data_direction != DMA_TO_DEVICE)
371 in = &scsi_in(sc)->table;
374 /* Request header. */
375 sg_init_one(&req, &cmd->req, req_size);
376 sgs[out_num++] = &req;
378 /* Data-out buffer. */
380 sgs[out_num++] = out->sgl;
382 /* Response header. */
383 sg_init_one(&resp, &cmd->resp, resp_size);
384 sgs[out_num + in_num++] = &resp;
388 sgs[out_num + in_num++] = in->sgl;
390 return virtqueue_add_sgs(vq, sgs, out_num, in_num, cmd, gfp);
393 static int virtscsi_kick_cmd(struct virtio_scsi_vq *vq,
394 struct virtio_scsi_cmd *cmd,
395 size_t req_size, size_t resp_size, gfp_t gfp)
399 bool needs_kick = false;
401 spin_lock_irqsave(&vq->vq_lock, flags);
402 err = virtscsi_add_cmd(vq->vq, cmd, req_size, resp_size, gfp);
404 needs_kick = virtqueue_kick_prepare(vq->vq);
406 spin_unlock_irqrestore(&vq->vq_lock, flags);
409 virtqueue_notify(vq->vq);
413 static int virtscsi_queuecommand(struct Scsi_Host *sh, struct scsi_cmnd *sc)
415 struct virtio_scsi *vscsi = shost_priv(sh);
416 struct virtio_scsi_cmd *cmd;
419 struct Scsi_Host *shost = virtio_scsi_host(vscsi->vdev);
420 BUG_ON(scsi_sg_count(sc) > shost->sg_tablesize);
422 /* TODO: check feature bit and fail if unsupported? */
423 BUG_ON(sc->sc_data_direction == DMA_BIDIRECTIONAL);
425 dev_dbg(&sc->device->sdev_gendev,
426 "cmd %p CDB: %#02x\n", sc, sc->cmnd[0]);
428 ret = SCSI_MLQUEUE_HOST_BUSY;
429 cmd = mempool_alloc(virtscsi_cmd_pool, GFP_ATOMIC);
433 memset(cmd, 0, sizeof(*cmd));
435 cmd->req.cmd = (struct virtio_scsi_cmd_req){
437 .lun[1] = sc->device->id,
438 .lun[2] = (sc->device->lun >> 8) | 0x40,
439 .lun[3] = sc->device->lun & 0xff,
440 .tag = (unsigned long)sc,
441 .task_attr = VIRTIO_SCSI_S_SIMPLE,
446 BUG_ON(sc->cmd_len > VIRTIO_SCSI_CDB_SIZE);
447 memcpy(cmd->req.cmd.cdb, sc->cmnd, sc->cmd_len);
449 if (virtscsi_kick_cmd(&vscsi->req_vq, cmd,
450 sizeof cmd->req.cmd, sizeof cmd->resp.cmd,
454 mempool_free(cmd, virtscsi_cmd_pool);
460 static int virtscsi_tmf(struct virtio_scsi *vscsi, struct virtio_scsi_cmd *cmd)
462 DECLARE_COMPLETION_ONSTACK(comp);
466 if (virtscsi_kick_cmd(&vscsi->ctrl_vq, cmd,
467 sizeof cmd->req.tmf, sizeof cmd->resp.tmf,
471 wait_for_completion(&comp);
472 if (cmd->resp.tmf.response == VIRTIO_SCSI_S_OK ||
473 cmd->resp.tmf.response == VIRTIO_SCSI_S_FUNCTION_SUCCEEDED)
477 mempool_free(cmd, virtscsi_cmd_pool);
481 static int virtscsi_device_reset(struct scsi_cmnd *sc)
483 struct virtio_scsi *vscsi = shost_priv(sc->device->host);
484 struct virtio_scsi_cmd *cmd;
486 sdev_printk(KERN_INFO, sc->device, "device reset\n");
487 cmd = mempool_alloc(virtscsi_cmd_pool, GFP_NOIO);
491 memset(cmd, 0, sizeof(*cmd));
493 cmd->req.tmf = (struct virtio_scsi_ctrl_tmf_req){
494 .type = VIRTIO_SCSI_T_TMF,
495 .subtype = VIRTIO_SCSI_T_TMF_LOGICAL_UNIT_RESET,
497 .lun[1] = sc->device->id,
498 .lun[2] = (sc->device->lun >> 8) | 0x40,
499 .lun[3] = sc->device->lun & 0xff,
501 return virtscsi_tmf(vscsi, cmd);
504 static int virtscsi_abort(struct scsi_cmnd *sc)
506 struct virtio_scsi *vscsi = shost_priv(sc->device->host);
507 struct virtio_scsi_cmd *cmd;
509 scmd_printk(KERN_INFO, sc, "abort\n");
510 cmd = mempool_alloc(virtscsi_cmd_pool, GFP_NOIO);
514 memset(cmd, 0, sizeof(*cmd));
516 cmd->req.tmf = (struct virtio_scsi_ctrl_tmf_req){
517 .type = VIRTIO_SCSI_T_TMF,
518 .subtype = VIRTIO_SCSI_T_TMF_ABORT_TASK,
520 .lun[1] = sc->device->id,
521 .lun[2] = (sc->device->lun >> 8) | 0x40,
522 .lun[3] = sc->device->lun & 0xff,
523 .tag = (unsigned long)sc,
525 return virtscsi_tmf(vscsi, cmd);
528 static int virtscsi_target_alloc(struct scsi_target *starget)
530 struct virtio_scsi_target_state *tgt =
531 kmalloc(sizeof(*tgt), GFP_KERNEL);
535 spin_lock_init(&tgt->tgt_lock);
537 starget->hostdata = tgt;
541 static void virtscsi_target_destroy(struct scsi_target *starget)
543 struct virtio_scsi_target_state *tgt = starget->hostdata;
547 static struct scsi_host_template virtscsi_host_template = {
548 .module = THIS_MODULE,
549 .name = "Virtio SCSI HBA",
550 .proc_name = "virtio_scsi",
551 .queuecommand = virtscsi_queuecommand,
553 .eh_abort_handler = virtscsi_abort,
554 .eh_device_reset_handler = virtscsi_device_reset,
557 .dma_boundary = UINT_MAX,
558 .use_clustering = ENABLE_CLUSTERING,
559 .target_alloc = virtscsi_target_alloc,
560 .target_destroy = virtscsi_target_destroy,
563 #define virtscsi_config_get(vdev, fld) \
565 typeof(((struct virtio_scsi_config *)0)->fld) __val; \
566 vdev->config->get(vdev, \
567 offsetof(struct virtio_scsi_config, fld), \
568 &__val, sizeof(__val)); \
572 #define virtscsi_config_set(vdev, fld, val) \
574 typeof(((struct virtio_scsi_config *)0)->fld) __val = (val); \
575 vdev->config->set(vdev, \
576 offsetof(struct virtio_scsi_config, fld), \
577 &__val, sizeof(__val)); \
580 static void virtscsi_init_vq(struct virtio_scsi_vq *virtscsi_vq,
581 struct virtqueue *vq)
583 spin_lock_init(&virtscsi_vq->vq_lock);
584 virtscsi_vq->vq = vq;
587 static void virtscsi_scan(struct virtio_device *vdev)
589 struct Scsi_Host *shost = (struct Scsi_Host *)vdev->priv;
591 scsi_scan_host(shost);
594 static void virtscsi_remove_vqs(struct virtio_device *vdev)
596 /* Stop all the virtqueues. */
597 vdev->config->reset(vdev);
599 vdev->config->del_vqs(vdev);
602 static int virtscsi_init(struct virtio_device *vdev,
603 struct virtio_scsi *vscsi)
606 struct virtqueue *vqs[3];
608 vq_callback_t *callbacks[] = {
613 const char *names[] = {
619 /* Discover virtqueues and write information to configuration. */
620 err = vdev->config->find_vqs(vdev, 3, vqs, callbacks, names);
624 virtscsi_init_vq(&vscsi->ctrl_vq, vqs[0]);
625 virtscsi_init_vq(&vscsi->event_vq, vqs[1]);
626 virtscsi_init_vq(&vscsi->req_vq, vqs[2]);
628 virtscsi_config_set(vdev, cdb_size, VIRTIO_SCSI_CDB_SIZE);
629 virtscsi_config_set(vdev, sense_size, VIRTIO_SCSI_SENSE_SIZE);
631 if (virtio_has_feature(vdev, VIRTIO_SCSI_F_HOTPLUG))
632 virtscsi_kick_event_all(vscsi);
637 static int virtscsi_probe(struct virtio_device *vdev)
639 struct Scsi_Host *shost;
640 struct virtio_scsi *vscsi;
642 u32 sg_elems, num_targets;
645 num_targets = virtscsi_config_get(vdev, max_target) + 1;
647 shost = scsi_host_alloc(&virtscsi_host_template, sizeof(*vscsi));
651 sg_elems = virtscsi_config_get(vdev, seg_max) ?: 1;
652 shost->sg_tablesize = sg_elems;
653 vscsi = shost_priv(shost);
657 err = virtscsi_init(vdev, vscsi);
659 goto virtscsi_init_failed;
661 cmd_per_lun = virtscsi_config_get(vdev, cmd_per_lun) ?: 1;
662 shost->cmd_per_lun = min_t(u32, cmd_per_lun, shost->can_queue);
663 shost->max_sectors = virtscsi_config_get(vdev, max_sectors) ?: 0xFFFF;
665 /* LUNs > 256 are reported with format 1, so they go in the range
668 shost->max_lun = virtscsi_config_get(vdev, max_lun) + 1 + 0x4000;
669 shost->max_id = num_targets;
670 shost->max_channel = 0;
671 shost->max_cmd_len = VIRTIO_SCSI_CDB_SIZE;
672 err = scsi_add_host(shost, &vdev->dev);
674 goto scsi_add_host_failed;
676 * scsi_scan_host() happens in virtscsi_scan() via virtio_driver->scan()
677 * after VIRTIO_CONFIG_S_DRIVER_OK has been set..
681 scsi_add_host_failed:
682 vdev->config->del_vqs(vdev);
683 virtscsi_init_failed:
684 scsi_host_put(shost);
688 static void virtscsi_remove(struct virtio_device *vdev)
690 struct Scsi_Host *shost = virtio_scsi_host(vdev);
691 struct virtio_scsi *vscsi = shost_priv(shost);
693 if (virtio_has_feature(vdev, VIRTIO_SCSI_F_HOTPLUG))
694 virtscsi_cancel_event_work(vscsi);
696 scsi_remove_host(shost);
698 virtscsi_remove_vqs(vdev);
699 scsi_host_put(shost);
703 static int virtscsi_freeze(struct virtio_device *vdev)
705 virtscsi_remove_vqs(vdev);
709 static int virtscsi_restore(struct virtio_device *vdev)
711 struct Scsi_Host *sh = virtio_scsi_host(vdev);
712 struct virtio_scsi *vscsi = shost_priv(sh);
714 return virtscsi_init(vdev, vscsi);
718 static struct virtio_device_id id_table[] = {
719 { VIRTIO_ID_SCSI, VIRTIO_DEV_ANY_ID },
723 static unsigned int features[] = {
724 VIRTIO_SCSI_F_HOTPLUG,
725 VIRTIO_SCSI_F_CHANGE,
728 static struct virtio_driver virtio_scsi_driver = {
729 .feature_table = features,
730 .feature_table_size = ARRAY_SIZE(features),
731 .driver.name = KBUILD_MODNAME,
732 .driver.owner = THIS_MODULE,
733 .id_table = id_table,
734 .probe = virtscsi_probe,
735 .scan = virtscsi_scan,
737 .freeze = virtscsi_freeze,
738 .restore = virtscsi_restore,
740 .remove = virtscsi_remove,
743 static int __init init(void)
747 virtscsi_cmd_cache = KMEM_CACHE(virtio_scsi_cmd, 0);
748 if (!virtscsi_cmd_cache) {
749 pr_err("kmem_cache_create() for virtscsi_cmd_cache failed\n");
755 mempool_create_slab_pool(VIRTIO_SCSI_MEMPOOL_SZ,
757 if (!virtscsi_cmd_pool) {
758 pr_err("mempool_create() for virtscsi_cmd_pool failed\n");
761 ret = register_virtio_driver(&virtio_scsi_driver);
768 if (virtscsi_cmd_pool) {
769 mempool_destroy(virtscsi_cmd_pool);
770 virtscsi_cmd_pool = NULL;
772 if (virtscsi_cmd_cache) {
773 kmem_cache_destroy(virtscsi_cmd_cache);
774 virtscsi_cmd_cache = NULL;
779 static void __exit fini(void)
781 unregister_virtio_driver(&virtio_scsi_driver);
782 mempool_destroy(virtscsi_cmd_pool);
783 kmem_cache_destroy(virtscsi_cmd_cache);
788 MODULE_DEVICE_TABLE(virtio, id_table);
789 MODULE_DESCRIPTION("Virtio SCSI HBA driver");
790 MODULE_LICENSE("GPL");