3 * Authors: Dave Boutcher <boutcher@us.ibm.com>
4 * Ryan Arnold <ryanarn@us.ibm.com>
5 * Colin Devilbiss <devilbis@us.ibm.com>
6 * Stephen Rothwell <sfr@au1.ibm.com>
8 * (C) Copyright 2000-2004 IBM Corporation
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License as
12 * published by the Free Software Foundation; either version 2 of the
13 * License, or (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 * This routine provides access to disk space (termed "DASD" in historical
25 * IBM terms) owned and managed by an OS/400 partition running on the
26 * same box as this Linux partition.
28 * All disk operations are performed by sending messages back and forth to
29 * the OS/400 partition.
31 #include <linux/major.h>
33 #include <linux/module.h>
34 #include <linux/kernel.h>
35 #include <linux/blkdev.h>
36 #include <linux/genhd.h>
37 #include <linux/hdreg.h>
38 #include <linux/errno.h>
39 #include <linux/init.h>
40 #include <linux/string.h>
41 #include <linux/dma-mapping.h>
42 #include <linux/completion.h>
43 #include <linux/device.h>
44 #include <linux/kernel.h>
46 #include <asm/uaccess.h>
48 #include <asm/iSeries/HvTypes.h>
49 #include <asm/iSeries/HvLpEvent.h>
50 #include <asm/iSeries/HvLpConfig.h>
51 #include <asm/iSeries/vio.h>
53 MODULE_DESCRIPTION("iSeries Virtual DASD");
54 MODULE_AUTHOR("Dave Boutcher");
55 MODULE_LICENSE("GPL");
58 * We only support 7 partitions per physical disk....so with minor
59 * numbers 0-255 we get a maximum of 32 disks.
61 #define VIOD_GENHD_NAME "iseries/vd"
62 #define VIOD_GENHD_DEVFS_NAME "iseries/disc"
64 #define VIOD_VERS "1.64"
66 #define VIOD_KERN_WARNING KERN_WARNING "viod: "
67 #define VIOD_KERN_INFO KERN_INFO "viod: "
71 MAX_DISKNO = HVMAXARCHITECTEDVIRTUALDISKS,
72 MAX_DISK_NAME = sizeof(((struct gendisk *)0)->disk_name)
75 static DEFINE_SPINLOCK(viodasd_spinlock);
78 #define VIOMAXBLOCKDMA 12
80 #define DEVICE_NO(cell) ((struct viodasd_device *)(cell) - &viodasd_devices[0])
97 } dma_info[VIOMAXBLOCKDMA];
100 struct vioblocklpevent {
101 struct HvLpEvent event;
108 struct open_data open_data;
109 struct rw_data rw_data;
114 #define vioblockflags_ro 0x0001
116 enum vioblocksubtype {
117 vioblockopen = 0x0001,
118 vioblockclose = 0x0002,
119 vioblockread = 0x0003,
120 vioblockwrite = 0x0004,
121 vioblockflush = 0x0005,
122 vioblockcheck = 0x0007
125 struct viodasd_waitevent {
126 struct completion com;
129 int max_disk; /* open */
132 static const struct vio_error_entry viodasd_err_table[] = {
133 { 0x0201, EINVAL, "Invalid Range" },
134 { 0x0202, EINVAL, "Invalid Token" },
135 { 0x0203, EIO, "DMA Error" },
136 { 0x0204, EIO, "Use Error" },
137 { 0x0205, EIO, "Release Error" },
138 { 0x0206, EINVAL, "Invalid Disk" },
139 { 0x0207, EBUSY, "Cant Lock" },
140 { 0x0208, EIO, "Already Locked" },
141 { 0x0209, EIO, "Already Unlocked" },
142 { 0x020A, EIO, "Invalid Arg" },
143 { 0x020B, EIO, "Bad IFS File" },
144 { 0x020C, EROFS, "Read Only Device" },
145 { 0x02FF, EIO, "Internal Error" },
150 * Figure out the biggest I/O request (in sectors) we can accept
152 #define VIODASD_MAXSECTORS (4096 / 512 * VIOMAXBLOCKDMA)
155 * Number of disk I/O requests we've sent to OS/400
157 static int num_req_outstanding;
160 * This is our internal structure for keeping track of disk devices
162 struct viodasd_device {
166 u16 bytes_per_sector;
170 struct gendisk *disk;
172 } viodasd_devices[MAX_DISKNO];
175 * External open entry point.
177 static int viodasd_open(struct inode *ino, struct file *fil)
179 struct viodasd_device *d = ino->i_bdev->bd_disk->private_data;
181 struct viodasd_waitevent we;
185 if ((fil != NULL) && (fil->f_mode & FMODE_WRITE))
187 flags = vioblockflags_ro;
190 init_completion(&we.com);
192 /* Send the open event to OS/400 */
193 hvrc = HvCallEvent_signalLpEventFast(viopath_hostLp,
194 HvLpEvent_Type_VirtualIo,
195 viomajorsubtype_blockio | vioblockopen,
196 HvLpEvent_AckInd_DoAck, HvLpEvent_AckType_ImmediateAck,
197 viopath_sourceinst(viopath_hostLp),
198 viopath_targetinst(viopath_hostLp),
199 (u64)(unsigned long)&we, VIOVERSION << 16,
200 ((u64)DEVICE_NO(d) << 48) | ((u64)flags << 32),
203 printk(VIOD_KERN_WARNING "HV open failed %d\n", (int)hvrc);
207 wait_for_completion(&we.com);
209 /* Check the return code */
211 const struct vio_error_entry *err =
212 vio_lookup_rc(viodasd_err_table, we.sub_result);
214 printk(VIOD_KERN_WARNING
215 "bad rc opening disk: %d:0x%04x (%s)\n",
216 (int)we.rc, we.sub_result, err->msg);
224 * External release entry point.
226 static int viodasd_release(struct inode *ino, struct file *fil)
228 struct viodasd_device *d = ino->i_bdev->bd_disk->private_data;
231 /* Send the event to OS/400. We DON'T expect a response */
232 hvrc = HvCallEvent_signalLpEventFast(viopath_hostLp,
233 HvLpEvent_Type_VirtualIo,
234 viomajorsubtype_blockio | vioblockclose,
235 HvLpEvent_AckInd_NoAck, HvLpEvent_AckType_ImmediateAck,
236 viopath_sourceinst(viopath_hostLp),
237 viopath_targetinst(viopath_hostLp),
239 ((u64)DEVICE_NO(d) << 48) /* | ((u64)flags << 32) */,
242 printk(VIOD_KERN_WARNING "HV close call failed %d\n",
248 /* External ioctl entry point.
250 static int viodasd_ioctl(struct inode *ino, struct file *fil,
251 unsigned int cmd, unsigned long arg)
254 unsigned char sectors;
256 unsigned short cylinders;
257 struct hd_geometry *geo;
258 struct gendisk *gendisk;
259 struct viodasd_device *d;
263 geo = (struct hd_geometry *)arg;
266 err = verify_area(VERIFY_WRITE, geo, sizeof(*geo));
269 gendisk = ino->i_bdev->bd_disk;
270 d = gendisk->private_data;
271 sectors = d->sectors;
277 cylinders = d->cylinders;
279 cylinders = get_capacity(gendisk) / (sectors * heads);
280 if (__put_user(sectors, &geo->sectors) ||
281 __put_user(heads, &geo->heads) ||
282 __put_user(cylinders, &geo->cylinders) ||
283 __put_user(get_start_sect(ino->i_bdev), &geo->start))
292 * Our file operations table
294 static struct block_device_operations viodasd_fops = {
295 .owner = THIS_MODULE,
296 .open = viodasd_open,
297 .release = viodasd_release,
298 .ioctl = viodasd_ioctl,
304 static void viodasd_end_request(struct request *req, int uptodate,
307 if (end_that_request_first(req, uptodate, num_sectors))
309 add_disk_randomness(req->rq_disk);
310 end_that_request_last(req);
314 * Send an actual I/O request to OS/400
316 static int send_request(struct request *req)
323 struct vioblocklpevent *bevent;
324 struct scatterlist sg[VIOMAXBLOCKDMA];
327 struct viodasd_device *d;
330 start = (u64)req->sector << 9;
332 if (rq_data_dir(req) == READ) {
333 direction = DMA_FROM_DEVICE;
334 viocmd = viomajorsubtype_blockio | vioblockread;
337 direction = DMA_TO_DEVICE;
338 viocmd = viomajorsubtype_blockio | vioblockwrite;
342 d = req->rq_disk->private_data;
344 /* Now build the scatter-gather list */
345 nsg = blk_rq_map_sg(req->q, req, sg);
346 nsg = dma_map_sg(d->dev, sg, nsg, direction);
348 spin_lock_irqsave(&viodasd_spinlock, flags);
349 num_req_outstanding++;
351 /* This optimization handles a single DMA block */
353 hvrc = HvCallEvent_signalLpEventFast(viopath_hostLp,
354 HvLpEvent_Type_VirtualIo, viocmd,
355 HvLpEvent_AckInd_DoAck,
356 HvLpEvent_AckType_ImmediateAck,
357 viopath_sourceinst(viopath_hostLp),
358 viopath_targetinst(viopath_hostLp),
359 (u64)(unsigned long)req, VIOVERSION << 16,
360 ((u64)DEVICE_NO(d) << 48), start,
361 ((u64)sg_dma_address(&sg[0])) << 32,
364 bevent = (struct vioblocklpevent *)
365 vio_get_event_buffer(viomajorsubtype_blockio);
366 if (bevent == NULL) {
367 printk(VIOD_KERN_WARNING
368 "error allocating disk event buffer\n");
373 * Now build up the actual request. Note that we store
374 * the pointer to the request in the correlation
375 * token so we can match the response up later
377 memset(bevent, 0, sizeof(struct vioblocklpevent));
378 bevent->event.xFlags.xValid = 1;
379 bevent->event.xFlags.xFunction = HvLpEvent_Function_Int;
380 bevent->event.xFlags.xAckInd = HvLpEvent_AckInd_DoAck;
381 bevent->event.xFlags.xAckType = HvLpEvent_AckType_ImmediateAck;
382 bevent->event.xType = HvLpEvent_Type_VirtualIo;
383 bevent->event.xSubtype = viocmd;
384 bevent->event.xSourceLp = HvLpConfig_getLpIndex();
385 bevent->event.xTargetLp = viopath_hostLp;
386 bevent->event.xSizeMinus1 =
387 offsetof(struct vioblocklpevent, u.rw_data.dma_info) +
388 (sizeof(bevent->u.rw_data.dma_info[0]) * nsg) - 1;
389 bevent->event.xSourceInstanceId =
390 viopath_sourceinst(viopath_hostLp);
391 bevent->event.xTargetInstanceId =
392 viopath_targetinst(viopath_hostLp);
393 bevent->event.xCorrelationToken = (u64)req;
394 bevent->version = VIOVERSION;
395 bevent->disk = DEVICE_NO(d);
396 bevent->u.rw_data.offset = start;
399 * Copy just the dma information from the sg list
402 for (sgindex = 0; sgindex < nsg; sgindex++) {
403 bevent->u.rw_data.dma_info[sgindex].token =
404 sg_dma_address(&sg[sgindex]);
405 bevent->u.rw_data.dma_info[sgindex].len =
406 sg_dma_len(&sg[sgindex]);
409 /* Send the request */
410 hvrc = HvCallEvent_signalLpEvent(&bevent->event);
411 vio_free_event_buffer(viomajorsubtype_blockio, bevent);
414 if (hvrc != HvLpEvent_Rc_Good) {
415 printk(VIOD_KERN_WARNING
416 "error sending disk event to OS/400 (rc %d)\n",
420 spin_unlock_irqrestore(&viodasd_spinlock, flags);
424 num_req_outstanding--;
425 spin_unlock_irqrestore(&viodasd_spinlock, flags);
426 dma_unmap_sg(d->dev, sg, nsg, direction);
431 * This is the external request processing routine
433 static void do_viodasd_request(request_queue_t *q)
438 * If we already have the maximum number of requests
439 * outstanding to OS/400 just bail out. We'll come
442 while (num_req_outstanding < VIOMAXREQ) {
443 req = elv_next_request(q);
446 /* dequeue the current request from the queue */
447 blkdev_dequeue_request(req);
448 /* check that request contains a valid command */
449 if (!blk_fs_request(req)) {
450 viodasd_end_request(req, 0, req->hard_nr_sectors);
453 /* Try sending the request */
454 if (send_request(req) != 0)
455 viodasd_end_request(req, 0, req->hard_nr_sectors);
460 * Probe a single disk and fill in the viodasd_device structure
463 static void probe_disk(struct viodasd_device *d)
466 struct viodasd_waitevent we;
467 int dev_no = DEVICE_NO(d);
469 struct request_queue *q;
473 init_completion(&we.com);
475 /* Send the open event to OS/400 */
476 hvrc = HvCallEvent_signalLpEventFast(viopath_hostLp,
477 HvLpEvent_Type_VirtualIo,
478 viomajorsubtype_blockio | vioblockopen,
479 HvLpEvent_AckInd_DoAck, HvLpEvent_AckType_ImmediateAck,
480 viopath_sourceinst(viopath_hostLp),
481 viopath_targetinst(viopath_hostLp),
482 (u64)(unsigned long)&we, VIOVERSION << 16,
483 ((u64)dev_no << 48) | ((u64)flags<< 32),
486 printk(VIOD_KERN_WARNING "bad rc on HV open %d\n", (int)hvrc);
490 wait_for_completion(&we.com);
495 /* try again with read only flag set */
496 flags = vioblockflags_ro;
499 if (we.max_disk > (MAX_DISKNO - 1)) {
504 printk(VIOD_KERN_INFO
505 "Only examining the first %d "
506 "of %d disks connected\n",
507 MAX_DISKNO, we.max_disk + 1);
511 /* Send the close event to OS/400. We DON'T expect a response */
512 hvrc = HvCallEvent_signalLpEventFast(viopath_hostLp,
513 HvLpEvent_Type_VirtualIo,
514 viomajorsubtype_blockio | vioblockclose,
515 HvLpEvent_AckInd_NoAck, HvLpEvent_AckType_ImmediateAck,
516 viopath_sourceinst(viopath_hostLp),
517 viopath_targetinst(viopath_hostLp),
519 ((u64)dev_no << 48) | ((u64)flags << 32),
522 printk(VIOD_KERN_WARNING
523 "bad rc sending event to OS/400 %d\n", (int)hvrc);
526 /* create the request queue for the disk */
527 spin_lock_init(&d->q_lock);
528 q = blk_init_queue(do_viodasd_request, &d->q_lock);
530 printk(VIOD_KERN_WARNING "cannot allocate queue for disk %d\n",
534 g = alloc_disk(1 << PARTITION_SHIFT);
536 printk(VIOD_KERN_WARNING
537 "cannot allocate disk structure for disk %d\n",
539 blk_cleanup_queue(q);
544 blk_queue_max_hw_segments(q, VIOMAXBLOCKDMA);
545 blk_queue_max_phys_segments(q, VIOMAXBLOCKDMA);
546 blk_queue_max_sectors(q, VIODASD_MAXSECTORS);
547 g->major = VIODASD_MAJOR;
548 g->first_minor = dev_no << PARTITION_SHIFT;
550 snprintf(g->disk_name, sizeof(g->disk_name),
551 VIOD_GENHD_NAME "%c%c",
552 'a' + (dev_no / 26) - 1, 'a' + (dev_no % 26));
554 snprintf(g->disk_name, sizeof(g->disk_name),
555 VIOD_GENHD_NAME "%c", 'a' + (dev_no % 26));
556 snprintf(g->devfs_name, sizeof(g->devfs_name),
557 "%s%d", VIOD_GENHD_DEVFS_NAME, dev_no);
558 g->fops = &viodasd_fops;
561 g->driverfs_dev = d->dev;
562 set_capacity(g, d->size >> 9);
564 printk(VIOD_KERN_INFO "disk %d: %lu sectors (%lu MB) "
565 "CHS=%d/%d/%d sector size %d%s\n",
566 dev_no, (unsigned long)(d->size >> 9),
567 (unsigned long)(d->size >> 20),
568 (int)d->cylinders, (int)d->tracks,
569 (int)d->sectors, (int)d->bytes_per_sector,
570 d->read_only ? " (RO)" : "");
572 /* register us in the global list */
576 /* returns the total number of scatterlist elements converted */
577 static int block_event_to_scatterlist(const struct vioblocklpevent *bevent,
578 struct scatterlist *sg, int *total_len)
581 const struct rw_data *rw_data = &bevent->u.rw_data;
582 static const int offset =
583 offsetof(struct vioblocklpevent, u.rw_data.dma_info);
584 static const int element_size = sizeof(rw_data->dma_info[0]);
586 numsg = ((bevent->event.xSizeMinus1 + 1) - offset) / element_size;
587 if (numsg > VIOMAXBLOCKDMA)
588 numsg = VIOMAXBLOCKDMA;
591 memset(sg, 0, sizeof(sg[0]) * VIOMAXBLOCKDMA);
593 for (i = 0; (i < numsg) && (rw_data->dma_info[i].len > 0); ++i) {
594 sg_dma_address(&sg[i]) = rw_data->dma_info[i].token;
595 sg_dma_len(&sg[i]) = rw_data->dma_info[i].len;
596 *total_len += rw_data->dma_info[i].len;
602 * Restart all queues, starting with the one _after_ the disk given,
603 * thus reducing the chance of starvation of higher numbered disks.
605 static void viodasd_restart_all_queues_starting_from(int first_index)
609 for (i = first_index + 1; i < MAX_DISKNO; ++i)
610 if (viodasd_devices[i].disk)
611 blk_run_queue(viodasd_devices[i].disk->queue);
612 for (i = 0; i <= first_index; ++i)
613 if (viodasd_devices[i].disk)
614 blk_run_queue(viodasd_devices[i].disk->queue);
618 * For read and write requests, decrement the number of outstanding requests,
619 * Free the DMA buffers we allocated.
621 static int viodasd_handle_read_write(struct vioblocklpevent *bevent)
623 int num_sg, num_sect, pci_direction, total_len;
625 struct scatterlist sg[VIOMAXBLOCKDMA];
626 struct HvLpEvent *event = &bevent->event;
627 unsigned long irq_flags;
628 struct viodasd_device *d;
632 num_sg = block_event_to_scatterlist(bevent, sg, &total_len);
633 num_sect = total_len >> 9;
634 if (event->xSubtype == (viomajorsubtype_blockio | vioblockread))
635 pci_direction = DMA_FROM_DEVICE;
637 pci_direction = DMA_TO_DEVICE;
638 req = (struct request *)bevent->event.xCorrelationToken;
639 d = req->rq_disk->private_data;
641 dma_unmap_sg(d->dev, sg, num_sg, pci_direction);
644 * Since this is running in interrupt mode, we need to make sure
645 * we're not stepping on any global I/O operations
647 spin_lock_irqsave(&viodasd_spinlock, irq_flags);
648 num_req_outstanding--;
649 spin_unlock_irqrestore(&viodasd_spinlock, irq_flags);
651 error = event->xRc != HvLpEvent_Rc_Good;
653 const struct vio_error_entry *err;
654 err = vio_lookup_rc(viodasd_err_table, bevent->sub_result);
655 printk(VIOD_KERN_WARNING "read/write error %d:0x%04x (%s)\n",
656 event->xRc, bevent->sub_result, err->msg);
657 num_sect = req->hard_nr_sectors;
659 qlock = req->q->queue_lock;
660 spin_lock_irqsave(qlock, irq_flags);
661 viodasd_end_request(req, !error, num_sect);
662 spin_unlock_irqrestore(qlock, irq_flags);
664 /* Finally, try to get more requests off of this device's queue */
665 viodasd_restart_all_queues_starting_from(DEVICE_NO(d));
670 /* This routine handles incoming block LP events */
671 static void handle_block_event(struct HvLpEvent *event)
673 struct vioblocklpevent *bevent = (struct vioblocklpevent *)event;
674 struct viodasd_waitevent *pwe;
677 /* Notification that a partition went away! */
679 /* First, we should NEVER get an int here...only acks */
680 if (event->xFlags.xFunction == HvLpEvent_Function_Int) {
681 printk(VIOD_KERN_WARNING
682 "Yikes! got an int in viodasd event handler!\n");
683 if (event->xFlags.xAckInd == HvLpEvent_AckInd_DoAck) {
684 event->xRc = HvLpEvent_Rc_InvalidSubtype;
685 HvCallEvent_ackLpEvent(event);
689 switch (event->xSubtype & VIOMINOR_SUBTYPE_MASK) {
692 * Handle a response to an open request. We get all the
693 * disk information in the response, so update it. The
694 * correlation token contains a pointer to a waitevent
695 * structure that has a completion in it. update the
696 * return code in the waitevent structure and post the
697 * completion to wake up the guy who sent the request
699 pwe = (struct viodasd_waitevent *)event->xCorrelationToken;
700 pwe->rc = event->xRc;
701 pwe->sub_result = bevent->sub_result;
702 if (event->xRc == HvLpEvent_Rc_Good) {
703 const struct open_data *data = &bevent->u.open_data;
704 struct viodasd_device *device =
705 &viodasd_devices[bevent->disk];
707 bevent->flags & vioblockflags_ro;
708 device->size = data->disk_size;
709 device->cylinders = data->cylinders;
710 device->tracks = data->tracks;
711 device->sectors = data->sectors;
712 device->bytes_per_sector = data->bytes_per_sector;
713 pwe->max_disk = data->max_disk;
721 viodasd_handle_read_write(bevent);
725 printk(VIOD_KERN_WARNING "invalid subtype!");
726 if (event->xFlags.xAckInd == HvLpEvent_AckInd_DoAck) {
727 event->xRc = HvLpEvent_Rc_InvalidSubtype;
728 HvCallEvent_ackLpEvent(event);
734 * Get the driver to reprobe for more disks.
736 static ssize_t probe_disks(struct device_driver *drv, const char *buf,
739 struct viodasd_device *d;
741 for (d = viodasd_devices; d < &viodasd_devices[MAX_DISKNO]; d++) {
747 static DRIVER_ATTR(probe, S_IWUSR, NULL, probe_disks);
749 static int viodasd_probe(struct vio_dev *vdev, const struct vio_device_id *id)
751 struct viodasd_device *d = &viodasd_devices[vdev->unit_address];
760 static int viodasd_remove(struct vio_dev *vdev)
762 struct viodasd_device *d;
764 d = &viodasd_devices[vdev->unit_address];
766 del_gendisk(d->disk);
767 blk_cleanup_queue(d->disk->queue);
776 * viodasd_device_table: Used by vio.c to match devices that we
779 static struct vio_device_id viodasd_device_table[] __devinitdata = {
784 MODULE_DEVICE_TABLE(vio, viodasd_device_table);
785 static struct vio_driver viodasd_driver = {
787 .id_table = viodasd_device_table,
788 .probe = viodasd_probe,
789 .remove = viodasd_remove
793 * Initialize the whole device driver. Handle module and non-module
796 static int __init viodasd_init(void)
800 /* Try to open to our host lp */
801 if (viopath_hostLp == HvLpIndexInvalid)
804 if (viopath_hostLp == HvLpIndexInvalid) {
805 printk(VIOD_KERN_WARNING "invalid hosting partition\n");
809 printk(VIOD_KERN_INFO "vers " VIOD_VERS ", hosting partition %d\n",
812 /* register the block device */
813 if (register_blkdev(VIODASD_MAJOR, VIOD_GENHD_NAME)) {
814 printk(VIOD_KERN_WARNING
815 "Unable to get major number %d for %s\n",
816 VIODASD_MAJOR, VIOD_GENHD_NAME);
819 /* Actually open the path to the hosting partition */
820 if (viopath_open(viopath_hostLp, viomajorsubtype_blockio,
822 printk(VIOD_KERN_WARNING
823 "error opening path to host partition %d\n",
825 unregister_blkdev(VIODASD_MAJOR, VIOD_GENHD_NAME);
829 /* Initialize our request handler */
830 vio_setHandler(viomajorsubtype_blockio, handle_block_event);
832 rc = vio_register_driver(&viodasd_driver);
834 driver_create_file(&viodasd_driver.driver, &driver_attr_probe);
837 module_init(viodasd_init);
839 void viodasd_exit(void)
841 driver_remove_file(&viodasd_driver.driver, &driver_attr_probe);
842 vio_unregister_driver(&viodasd_driver);
843 vio_clearHandler(viomajorsubtype_blockio);
844 unregister_blkdev(VIODASD_MAJOR, VIOD_GENHD_NAME);
845 viopath_close(viopath_hostLp, viomajorsubtype_blockio, VIOMAXREQ + 2);
848 module_exit(viodasd_exit);