]>
git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blob - arch/sparc/kernel/viohs.c
1 /* viohs.c: LDOM Virtual I/O handshake helper layer.
3 * Copyright (C) 2007 David S. Miller <davem@davemloft.net>
6 #include <linux/kernel.h>
7 #include <linux/export.h>
8 #include <linux/string.h>
9 #include <linux/delay.h>
10 #include <linux/sched.h>
11 #include <linux/sched/clock.h>
12 #include <linux/slab.h>
17 int vio_ldc_send(struct vio_driver_state
*vio
, void *data
, int len
)
19 int err
, limit
= 1000;
23 err
= ldc_write(vio
->lp
, data
, len
);
24 if (!err
|| (err
!= -EAGAIN
))
31 EXPORT_SYMBOL(vio_ldc_send
);
33 static int send_ctrl(struct vio_driver_state
*vio
,
34 struct vio_msg_tag
*tag
, int len
)
36 tag
->sid
= vio_send_sid(vio
);
37 return vio_ldc_send(vio
, tag
, len
);
40 static void init_tag(struct vio_msg_tag
*tag
, u8 type
, u8 stype
, u16 stype_env
)
44 tag
->stype_env
= stype_env
;
47 static int send_version(struct vio_driver_state
*vio
, u16 major
, u16 minor
)
49 struct vio_ver_info pkt
;
51 vio
->_local_sid
= (u32
) sched_clock();
53 memset(&pkt
, 0, sizeof(pkt
));
54 init_tag(&pkt
.tag
, VIO_TYPE_CTRL
, VIO_SUBTYPE_INFO
, VIO_VER_INFO
);
57 pkt
.dev_class
= vio
->dev_class
;
59 viodbg(HS
, "SEND VERSION INFO maj[%u] min[%u] devclass[%u]\n",
60 major
, minor
, vio
->dev_class
);
62 return send_ctrl(vio
, &pkt
.tag
, sizeof(pkt
));
65 static int start_handshake(struct vio_driver_state
*vio
)
69 viodbg(HS
, "START HANDSHAKE\n");
71 vio
->hs_state
= VIO_HS_INVALID
;
73 err
= send_version(vio
,
74 vio
->ver_table
[0].major
,
75 vio
->ver_table
[0].minor
);
82 static void flush_rx_dring(struct vio_driver_state
*vio
)
84 struct vio_dring_state
*dr
;
87 BUG_ON(!(vio
->dr_state
& VIO_DR_STATE_RXREG
));
89 dr
= &vio
->drings
[VIO_DRIVER_RX_RING
];
92 BUG_ON(!vio
->desc_buf
);
96 memset(dr
, 0, sizeof(*dr
));
100 void vio_link_state_change(struct vio_driver_state
*vio
, int event
)
102 if (event
== LDC_EVENT_UP
) {
103 vio
->hs_state
= VIO_HS_INVALID
;
105 switch (vio
->dev_class
) {
107 case VDEV_NETWORK_SWITCH
:
108 vio
->dr_state
= (VIO_DR_STATE_TXREQ
|
113 vio
->dr_state
= VIO_DR_STATE_TXREQ
;
115 case VDEV_DISK_SERVER
:
116 vio
->dr_state
= VIO_DR_STATE_RXREQ
;
119 start_handshake(vio
);
120 } else if (event
== LDC_EVENT_RESET
) {
121 vio
->hs_state
= VIO_HS_INVALID
;
123 if (vio
->dr_state
& VIO_DR_STATE_RXREG
)
126 vio
->dr_state
= 0x00;
127 memset(&vio
->ver
, 0, sizeof(vio
->ver
));
129 ldc_disconnect(vio
->lp
);
132 EXPORT_SYMBOL(vio_link_state_change
);
134 static int handshake_failure(struct vio_driver_state
*vio
)
136 struct vio_dring_state
*dr
;
138 /* XXX Put policy here... Perhaps start a timer to fire
139 * XXX in 100 ms, which will bring the link up and retry
143 viodbg(HS
, "HANDSHAKE FAILURE\n");
145 vio
->dr_state
&= ~(VIO_DR_STATE_TXREG
|
148 dr
= &vio
->drings
[VIO_DRIVER_RX_RING
];
149 memset(dr
, 0, sizeof(*dr
));
151 kfree(vio
->desc_buf
);
152 vio
->desc_buf
= NULL
;
153 vio
->desc_buf_len
= 0;
155 vio
->hs_state
= VIO_HS_INVALID
;
160 static int process_unknown(struct vio_driver_state
*vio
, void *arg
)
162 struct vio_msg_tag
*pkt
= arg
;
164 viodbg(HS
, "UNKNOWN CONTROL [%02x:%02x:%04x:%08x]\n",
165 pkt
->type
, pkt
->stype
, pkt
->stype_env
, pkt
->sid
);
167 printk(KERN_ERR
"vio: ID[%lu] Resetting connection.\n",
168 vio
->vdev
->channel_id
);
170 ldc_disconnect(vio
->lp
);
175 static int send_dreg(struct vio_driver_state
*vio
)
177 struct vio_dring_state
*dr
= &vio
->drings
[VIO_DRIVER_TX_RING
];
179 struct vio_dring_register pkt
;
180 char all
[sizeof(struct vio_dring_register
) +
181 (sizeof(struct ldc_trans_cookie
) *
186 memset(&u
, 0, sizeof(u
));
187 init_tag(&u
.pkt
.tag
, VIO_TYPE_CTRL
, VIO_SUBTYPE_INFO
, VIO_DRING_REG
);
188 u
.pkt
.dring_ident
= 0;
189 u
.pkt
.num_descr
= dr
->num_entries
;
190 u
.pkt
.descr_size
= dr
->entry_size
;
191 u
.pkt
.options
= VIO_TX_DRING
;
192 u
.pkt
.num_cookies
= dr
->ncookies
;
194 viodbg(HS
, "SEND DRING_REG INFO ndesc[%u] dsz[%u] opt[0x%x] "
196 u
.pkt
.num_descr
, u
.pkt
.descr_size
, u
.pkt
.options
,
199 for (i
= 0; i
< dr
->ncookies
; i
++) {
200 u
.pkt
.cookies
[i
] = dr
->cookies
[i
];
202 viodbg(HS
, "DRING COOKIE(%d) [%016llx:%016llx]\n",
204 (unsigned long long) u
.pkt
.cookies
[i
].cookie_addr
,
205 (unsigned long long) u
.pkt
.cookies
[i
].cookie_size
);
208 return send_ctrl(vio
, &u
.pkt
.tag
, sizeof(u
));
211 static int send_rdx(struct vio_driver_state
*vio
)
215 memset(&pkt
, 0, sizeof(pkt
));
217 init_tag(&pkt
.tag
, VIO_TYPE_CTRL
, VIO_SUBTYPE_INFO
, VIO_RDX
);
219 viodbg(HS
, "SEND RDX INFO\n");
221 return send_ctrl(vio
, &pkt
.tag
, sizeof(pkt
));
224 static int send_attr(struct vio_driver_state
*vio
)
226 return vio
->ops
->send_attr(vio
);
229 static struct vio_version
*find_by_major(struct vio_driver_state
*vio
,
232 struct vio_version
*ret
= NULL
;
235 for (i
= 0; i
< vio
->ver_table_entries
; i
++) {
236 struct vio_version
*v
= &vio
->ver_table
[i
];
237 if (v
->major
<= major
) {
245 static int process_ver_info(struct vio_driver_state
*vio
,
246 struct vio_ver_info
*pkt
)
248 struct vio_version
*vap
;
251 viodbg(HS
, "GOT VERSION INFO maj[%u] min[%u] devclass[%u]\n",
252 pkt
->major
, pkt
->minor
, pkt
->dev_class
);
254 if (vio
->hs_state
!= VIO_HS_INVALID
) {
255 /* XXX Perhaps invoke start_handshake? XXX */
256 memset(&vio
->ver
, 0, sizeof(vio
->ver
));
257 vio
->hs_state
= VIO_HS_INVALID
;
260 vap
= find_by_major(vio
, pkt
->major
);
262 vio
->_peer_sid
= pkt
->tag
.sid
;
265 pkt
->tag
.stype
= VIO_SUBTYPE_NACK
;
268 viodbg(HS
, "SEND VERSION NACK maj[0] min[0]\n");
269 err
= send_ctrl(vio
, &pkt
->tag
, sizeof(*pkt
));
270 } else if (vap
->major
!= pkt
->major
) {
271 pkt
->tag
.stype
= VIO_SUBTYPE_NACK
;
272 pkt
->major
= vap
->major
;
273 pkt
->minor
= vap
->minor
;
274 viodbg(HS
, "SEND VERSION NACK maj[%u] min[%u]\n",
275 pkt
->major
, pkt
->minor
);
276 err
= send_ctrl(vio
, &pkt
->tag
, sizeof(*pkt
));
278 struct vio_version ver
= {
282 if (ver
.minor
> vap
->minor
)
283 ver
.minor
= vap
->minor
;
284 pkt
->minor
= ver
.minor
;
285 pkt
->tag
.stype
= VIO_SUBTYPE_ACK
;
286 viodbg(HS
, "SEND VERSION ACK maj[%u] min[%u]\n",
287 pkt
->major
, pkt
->minor
);
288 err
= send_ctrl(vio
, &pkt
->tag
, sizeof(*pkt
));
291 vio
->hs_state
= VIO_HS_GOTVERS
;
295 return handshake_failure(vio
);
300 static int process_ver_ack(struct vio_driver_state
*vio
,
301 struct vio_ver_info
*pkt
)
303 viodbg(HS
, "GOT VERSION ACK maj[%u] min[%u] devclass[%u]\n",
304 pkt
->major
, pkt
->minor
, pkt
->dev_class
);
306 if (vio
->hs_state
& VIO_HS_GOTVERS
) {
307 if (vio
->ver
.major
!= pkt
->major
||
308 vio
->ver
.minor
!= pkt
->minor
) {
309 pkt
->tag
.stype
= VIO_SUBTYPE_NACK
;
310 (void) send_ctrl(vio
, &pkt
->tag
, sizeof(*pkt
));
311 return handshake_failure(vio
);
314 vio
->ver
.major
= pkt
->major
;
315 vio
->ver
.minor
= pkt
->minor
;
316 vio
->hs_state
= VIO_HS_GOTVERS
;
319 switch (vio
->dev_class
) {
322 if (send_attr(vio
) < 0)
323 return handshake_failure(vio
);
333 static int process_ver_nack(struct vio_driver_state
*vio
,
334 struct vio_ver_info
*pkt
)
336 struct vio_version
*nver
;
338 viodbg(HS
, "GOT VERSION NACK maj[%u] min[%u] devclass[%u]\n",
339 pkt
->major
, pkt
->minor
, pkt
->dev_class
);
341 if (pkt
->major
== 0 && pkt
->minor
== 0)
342 return handshake_failure(vio
);
343 nver
= find_by_major(vio
, pkt
->major
);
345 return handshake_failure(vio
);
347 if (send_version(vio
, nver
->major
, nver
->minor
) < 0)
348 return handshake_failure(vio
);
353 static int process_ver(struct vio_driver_state
*vio
, struct vio_ver_info
*pkt
)
355 switch (pkt
->tag
.stype
) {
356 case VIO_SUBTYPE_INFO
:
357 return process_ver_info(vio
, pkt
);
359 case VIO_SUBTYPE_ACK
:
360 return process_ver_ack(vio
, pkt
);
362 case VIO_SUBTYPE_NACK
:
363 return process_ver_nack(vio
, pkt
);
366 return handshake_failure(vio
);
370 static int process_attr(struct vio_driver_state
*vio
, void *pkt
)
374 if (!(vio
->hs_state
& VIO_HS_GOTVERS
))
375 return handshake_failure(vio
);
377 err
= vio
->ops
->handle_attr(vio
, pkt
);
379 return handshake_failure(vio
);
381 vio
->hs_state
|= VIO_HS_GOT_ATTR
;
383 if ((vio
->dr_state
& VIO_DR_STATE_TXREQ
) &&
384 !(vio
->hs_state
& VIO_HS_SENT_DREG
)) {
385 if (send_dreg(vio
) < 0)
386 return handshake_failure(vio
);
388 vio
->hs_state
|= VIO_HS_SENT_DREG
;
394 static int all_drings_registered(struct vio_driver_state
*vio
)
396 int need_rx
, need_tx
;
398 need_rx
= (vio
->dr_state
& VIO_DR_STATE_RXREQ
);
399 need_tx
= (vio
->dr_state
& VIO_DR_STATE_TXREQ
);
402 !(vio
->dr_state
& VIO_DR_STATE_RXREG
))
406 !(vio
->dr_state
& VIO_DR_STATE_TXREG
))
412 static int process_dreg_info(struct vio_driver_state
*vio
,
413 struct vio_dring_register
*pkt
)
415 struct vio_dring_state
*dr
;
418 viodbg(HS
, "GOT DRING_REG INFO ident[%llx] "
419 "ndesc[%u] dsz[%u] opt[0x%x] ncookies[%u]\n",
420 (unsigned long long) pkt
->dring_ident
,
421 pkt
->num_descr
, pkt
->descr_size
, pkt
->options
,
424 if (!(vio
->dr_state
& VIO_DR_STATE_RXREQ
))
427 if (vio
->dr_state
& VIO_DR_STATE_RXREG
)
430 /* v1.6 and higher, ACK with desired, supported mode, or NACK */
431 if (vio_version_after_eq(vio
, 1, 6)) {
432 if (!(pkt
->options
& VIO_TX_DRING
))
434 pkt
->options
= VIO_TX_DRING
;
437 BUG_ON(vio
->desc_buf
);
439 vio
->desc_buf
= kzalloc(pkt
->descr_size
, GFP_ATOMIC
);
443 vio
->desc_buf_len
= pkt
->descr_size
;
445 dr
= &vio
->drings
[VIO_DRIVER_RX_RING
];
447 dr
->num_entries
= pkt
->num_descr
;
448 dr
->entry_size
= pkt
->descr_size
;
449 dr
->ncookies
= pkt
->num_cookies
;
450 for (i
= 0; i
< dr
->ncookies
; i
++) {
451 dr
->cookies
[i
] = pkt
->cookies
[i
];
453 viodbg(HS
, "DRING COOKIE(%d) [%016llx:%016llx]\n",
456 pkt
->cookies
[i
].cookie_addr
,
458 pkt
->cookies
[i
].cookie_size
);
461 pkt
->tag
.stype
= VIO_SUBTYPE_ACK
;
462 pkt
->dring_ident
= ++dr
->ident
;
464 viodbg(HS
, "SEND DRING_REG ACK ident[%llx] "
465 "ndesc[%u] dsz[%u] opt[0x%x] ncookies[%u]\n",
466 (unsigned long long) pkt
->dring_ident
,
467 pkt
->num_descr
, pkt
->descr_size
, pkt
->options
,
470 len
= (sizeof(*pkt
) +
471 (dr
->ncookies
* sizeof(struct ldc_trans_cookie
)));
472 if (send_ctrl(vio
, &pkt
->tag
, len
) < 0)
475 vio
->dr_state
|= VIO_DR_STATE_RXREG
;
480 pkt
->tag
.stype
= VIO_SUBTYPE_NACK
;
481 viodbg(HS
, "SEND DRING_REG NACK\n");
482 (void) send_ctrl(vio
, &pkt
->tag
, sizeof(*pkt
));
484 return handshake_failure(vio
);
487 static int process_dreg_ack(struct vio_driver_state
*vio
,
488 struct vio_dring_register
*pkt
)
490 struct vio_dring_state
*dr
;
492 viodbg(HS
, "GOT DRING_REG ACK ident[%llx] "
493 "ndesc[%u] dsz[%u] opt[0x%x] ncookies[%u]\n",
494 (unsigned long long) pkt
->dring_ident
,
495 pkt
->num_descr
, pkt
->descr_size
, pkt
->options
,
498 dr
= &vio
->drings
[VIO_DRIVER_TX_RING
];
500 if (!(vio
->dr_state
& VIO_DR_STATE_TXREQ
))
501 return handshake_failure(vio
);
503 dr
->ident
= pkt
->dring_ident
;
504 vio
->dr_state
|= VIO_DR_STATE_TXREG
;
506 if (all_drings_registered(vio
)) {
507 if (send_rdx(vio
) < 0)
508 return handshake_failure(vio
);
509 vio
->hs_state
= VIO_HS_SENT_RDX
;
514 static int process_dreg_nack(struct vio_driver_state
*vio
,
515 struct vio_dring_register
*pkt
)
517 viodbg(HS
, "GOT DRING_REG NACK ident[%llx] "
518 "ndesc[%u] dsz[%u] opt[0x%x] ncookies[%u]\n",
519 (unsigned long long) pkt
->dring_ident
,
520 pkt
->num_descr
, pkt
->descr_size
, pkt
->options
,
523 return handshake_failure(vio
);
526 static int process_dreg(struct vio_driver_state
*vio
,
527 struct vio_dring_register
*pkt
)
529 if (!(vio
->hs_state
& VIO_HS_GOTVERS
))
530 return handshake_failure(vio
);
532 switch (pkt
->tag
.stype
) {
533 case VIO_SUBTYPE_INFO
:
534 return process_dreg_info(vio
, pkt
);
536 case VIO_SUBTYPE_ACK
:
537 return process_dreg_ack(vio
, pkt
);
539 case VIO_SUBTYPE_NACK
:
540 return process_dreg_nack(vio
, pkt
);
543 return handshake_failure(vio
);
547 static int process_dunreg(struct vio_driver_state
*vio
,
548 struct vio_dring_unregister
*pkt
)
550 struct vio_dring_state
*dr
= &vio
->drings
[VIO_DRIVER_RX_RING
];
552 viodbg(HS
, "GOT DRING_UNREG\n");
554 if (pkt
->dring_ident
!= dr
->ident
)
557 vio
->dr_state
&= ~VIO_DR_STATE_RXREG
;
559 memset(dr
, 0, sizeof(*dr
));
561 kfree(vio
->desc_buf
);
562 vio
->desc_buf
= NULL
;
563 vio
->desc_buf_len
= 0;
568 static int process_rdx_info(struct vio_driver_state
*vio
, struct vio_rdx
*pkt
)
570 viodbg(HS
, "GOT RDX INFO\n");
572 pkt
->tag
.stype
= VIO_SUBTYPE_ACK
;
573 viodbg(HS
, "SEND RDX ACK\n");
574 if (send_ctrl(vio
, &pkt
->tag
, sizeof(*pkt
)) < 0)
575 return handshake_failure(vio
);
577 vio
->hs_state
|= VIO_HS_SENT_RDX_ACK
;
581 static int process_rdx_ack(struct vio_driver_state
*vio
, struct vio_rdx
*pkt
)
583 viodbg(HS
, "GOT RDX ACK\n");
585 if (!(vio
->hs_state
& VIO_HS_SENT_RDX
))
586 return handshake_failure(vio
);
588 vio
->hs_state
|= VIO_HS_GOT_RDX_ACK
;
592 static int process_rdx_nack(struct vio_driver_state
*vio
, struct vio_rdx
*pkt
)
594 viodbg(HS
, "GOT RDX NACK\n");
596 return handshake_failure(vio
);
599 static int process_rdx(struct vio_driver_state
*vio
, struct vio_rdx
*pkt
)
601 if (!all_drings_registered(vio
))
602 handshake_failure(vio
);
604 switch (pkt
->tag
.stype
) {
605 case VIO_SUBTYPE_INFO
:
606 return process_rdx_info(vio
, pkt
);
608 case VIO_SUBTYPE_ACK
:
609 return process_rdx_ack(vio
, pkt
);
611 case VIO_SUBTYPE_NACK
:
612 return process_rdx_nack(vio
, pkt
);
615 return handshake_failure(vio
);
619 int vio_control_pkt_engine(struct vio_driver_state
*vio
, void *pkt
)
621 struct vio_msg_tag
*tag
= pkt
;
622 u8 prev_state
= vio
->hs_state
;
625 switch (tag
->stype_env
) {
627 err
= process_ver(vio
, pkt
);
631 err
= process_attr(vio
, pkt
);
635 err
= process_dreg(vio
, pkt
);
638 case VIO_DRING_UNREG
:
639 err
= process_dunreg(vio
, pkt
);
643 err
= process_rdx(vio
, pkt
);
647 err
= process_unknown(vio
, pkt
);
651 vio
->hs_state
!= prev_state
&&
652 (vio
->hs_state
& VIO_HS_COMPLETE
))
653 vio
->ops
->handshake_complete(vio
);
657 EXPORT_SYMBOL(vio_control_pkt_engine
);
659 void vio_conn_reset(struct vio_driver_state
*vio
)
662 EXPORT_SYMBOL(vio_conn_reset
);
664 /* The issue is that the Solaris virtual disk server just mirrors the
665 * SID values it gets from the client peer. So we work around that
666 * here in vio_{validate,send}_sid() so that the drivers don't need
667 * to be aware of this crap.
669 int vio_validate_sid(struct vio_driver_state
*vio
, struct vio_msg_tag
*tp
)
673 /* Always let VERSION+INFO packets through unchecked, they
674 * define the new SID.
676 if (tp
->type
== VIO_TYPE_CTRL
&&
677 tp
->stype
== VIO_SUBTYPE_INFO
&&
678 tp
->stype_env
== VIO_VER_INFO
)
681 /* Ok, now figure out which SID to use. */
682 switch (vio
->dev_class
) {
684 case VDEV_NETWORK_SWITCH
:
685 case VDEV_DISK_SERVER
:
687 sid
= vio
->_peer_sid
;
691 sid
= vio
->_local_sid
;
697 viodbg(DATA
, "BAD SID tag->sid[%08x] peer_sid[%08x] local_sid[%08x]\n",
698 tp
->sid
, vio
->_peer_sid
, vio
->_local_sid
);
701 EXPORT_SYMBOL(vio_validate_sid
);
703 u32
vio_send_sid(struct vio_driver_state
*vio
)
705 switch (vio
->dev_class
) {
707 case VDEV_NETWORK_SWITCH
:
710 return vio
->_local_sid
;
712 case VDEV_DISK_SERVER
:
713 return vio
->_peer_sid
;
716 EXPORT_SYMBOL(vio_send_sid
);
718 int vio_ldc_alloc(struct vio_driver_state
*vio
,
719 struct ldc_channel_config
*base_cfg
,
722 struct ldc_channel_config cfg
= *base_cfg
;
723 struct ldc_channel
*lp
;
725 cfg
.tx_irq
= vio
->vdev
->tx_irq
;
726 cfg
.rx_irq
= vio
->vdev
->rx_irq
;
728 lp
= ldc_alloc(vio
->vdev
->channel_id
, &cfg
, event_arg
, vio
->name
);
736 EXPORT_SYMBOL(vio_ldc_alloc
);
738 void vio_ldc_free(struct vio_driver_state
*vio
)
743 kfree(vio
->desc_buf
);
744 vio
->desc_buf
= NULL
;
745 vio
->desc_buf_len
= 0;
747 EXPORT_SYMBOL(vio_ldc_free
);
749 void vio_port_up(struct vio_driver_state
*vio
)
754 spin_lock_irqsave(&vio
->lock
, flags
);
756 state
= ldc_state(vio
->lp
);
759 if (state
== LDC_STATE_INIT
) {
760 err
= ldc_bind(vio
->lp
);
762 printk(KERN_WARNING
"%s: Port %lu bind failed, "
764 vio
->name
, vio
->vdev
->channel_id
, err
);
768 err
= ldc_connect(vio
->lp
);
770 printk(KERN_WARNING
"%s: Port %lu connect failed, "
772 vio
->name
, vio
->vdev
->channel_id
, err
);
775 unsigned long expires
= jiffies
+ HZ
;
777 expires
= round_jiffies(expires
);
778 mod_timer(&vio
->timer
, expires
);
781 spin_unlock_irqrestore(&vio
->lock
, flags
);
783 EXPORT_SYMBOL(vio_port_up
);
785 static void vio_port_timer(unsigned long _arg
)
787 struct vio_driver_state
*vio
= (struct vio_driver_state
*) _arg
;
792 int vio_driver_init(struct vio_driver_state
*vio
, struct vio_dev
*vdev
,
793 u8 dev_class
, struct vio_version
*ver_table
,
794 int ver_table_size
, struct vio_driver_ops
*ops
,
799 case VDEV_NETWORK_SWITCH
:
801 case VDEV_DISK_SERVER
:
808 if (!ops
->send_attr
||
810 !ops
->handshake_complete
)
813 if (!ver_table
|| ver_table_size
< 0)
819 spin_lock_init(&vio
->lock
);
823 vio
->dev_class
= dev_class
;
826 vio
->ver_table
= ver_table
;
827 vio
->ver_table_entries
= ver_table_size
;
831 setup_timer(&vio
->timer
, vio_port_timer
, (unsigned long) vio
);
835 EXPORT_SYMBOL(vio_driver_init
);