2 * drivers/cdrom/viocd.c
4 * iSeries Virtual CD Rom
6 * Authors: Dave Boutcher <boutcher@us.ibm.com>
7 * Ryan Arnold <ryanarn@us.ibm.com>
8 * Colin Devilbiss <devilbis@us.ibm.com>
9 * Stephen Rothwell <sfr@au1.ibm.com>
11 * (C) Copyright 2000-2004 IBM Corporation
13 * This program is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU General Public License as
15 * published by the Free Software Foundation; either version 2 of the
16 * License, or (at your option) anyu later version.
18 * This program is distributed in the hope that it will be useful, but
19 * WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 * General Public License for more details.
23 * You should have received a copy of the GNU General Public License
24 * along with this program; if not, write to the Free Software Foundation,
25 * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
27 * This routine provides access to CD ROM drives owned and managed by an
28 * OS/400 partition running on the same box as this Linux partition.
30 * All operations are performed by sending messages back and forth to
31 * the OS/400 partition.
34 #include <linux/major.h>
35 #include <linux/blkdev.h>
36 #include <linux/cdrom.h>
37 #include <linux/errno.h>
38 #include <linux/init.h>
39 #include <linux/dma-mapping.h>
40 #include <linux/module.h>
41 #include <linux/completion.h>
42 #include <linux/proc_fs.h>
43 #include <linux/seq_file.h>
46 #include <asm/scatterlist.h>
47 #include <asm/iseries/hv_types.h>
48 #include <asm/iseries/hv_lp_event.h>
49 #include <asm/iseries/vio.h>
50 #include <asm/firmware.h>
52 #define VIOCD_DEVICE "iseries/vcd"
54 #define VIOCD_VERS "1.06"
56 #define VIOCD_KERN_WARNING KERN_WARNING "viocd: "
57 #define VIOCD_KERN_INFO KERN_INFO "viocd: "
60 struct HvLpEvent event;
67 u64 offset; /* On open, max number of disks */
68 u64 len; /* On open, size of the disk */
69 u32 block_size; /* Only set on open */
70 u32 media_size; /* Only set on open */
78 viocdlockdoor = 0x0005,
79 viocdgetinfo = 0x0006,
84 * Should probably make this a module parameter....sigh
86 #define VIOCD_MAX_CD HVMAXARCHITECTEDVIRTUALCDROMS
88 static const struct vio_error_entry viocd_err_table[] = {
89 {0x0201, EINVAL, "Invalid Range"},
90 {0x0202, EINVAL, "Invalid Token"},
91 {0x0203, EIO, "DMA Error"},
92 {0x0204, EIO, "Use Error"},
93 {0x0205, EIO, "Release Error"},
94 {0x0206, EINVAL, "Invalid CD"},
95 {0x020C, EROFS, "Read Only Device"},
96 {0x020D, ENOMEDIUM, "Changed or Missing Volume (or Varied Off?)"},
97 {0x020E, EIO, "Optical System Error (Varied Off?)"},
98 {0x02FF, EIO, "Internal Error"},
99 {0x3010, EIO, "Changed Volume"},
100 {0xC100, EIO, "Optical System Error"},
105 * This is the structure we use to exchange info between driver and interrupt
108 struct viocd_waitevent {
109 struct completion com;
115 /* this is a lookup table for the true capabilities of a device */
116 struct capability_entry {
121 static struct capability_entry capability_table[] __initdata = {
122 { "6330", CDC_LOCK | CDC_DVD_RAM | CDC_RAM },
123 { "6331", CDC_LOCK | CDC_DVD_RAM | CDC_RAM },
124 { "6333", CDC_LOCK | CDC_DVD_RAM | CDC_RAM },
125 { "632A", CDC_LOCK | CDC_DVD_RAM | CDC_RAM },
126 { "6321", CDC_LOCK },
131 /* These are our internal structures for keeping track of devices */
132 static int viocd_numdev;
141 struct gendisk *viocd_disk;
142 struct cdrom_device_info viocd_info;
144 struct cdrom_info unitinfo;
146 static struct disk_info viocd_diskinfo[VIOCD_MAX_CD];
148 #define DEVICE_NR(di) ((di) - &viocd_diskinfo[0])
150 static spinlock_t viocd_reqlock;
155 static int proc_viocd_show(struct seq_file *m, void *v)
159 for (i = 0; i < viocd_numdev; i++) {
160 seq_printf(m, "viocd device %d is iSeries resource %10.10s"
161 "type %4.4s, model %3.3s\n",
162 i, viocd_diskinfo[i].unitinfo.rsrcname,
163 viocd_diskinfo[i].unitinfo.type,
164 viocd_diskinfo[i].unitinfo.model);
169 static int proc_viocd_open(struct inode *inode, struct file *file)
171 return single_open(file, proc_viocd_show, NULL);
174 static const struct file_operations proc_viocd_operations = {
175 .open = proc_viocd_open,
178 .release = single_release,
181 static int viocd_blk_open(struct inode *inode, struct file *file)
183 struct disk_info *di = inode->i_bdev->bd_disk->private_data;
184 return cdrom_open(&di->viocd_info, inode, file);
187 static int viocd_blk_release(struct inode *inode, struct file *file)
189 struct disk_info *di = inode->i_bdev->bd_disk->private_data;
190 return cdrom_release(&di->viocd_info, file);
193 static int viocd_blk_ioctl(struct inode *inode, struct file *file,
194 unsigned cmd, unsigned long arg)
196 struct disk_info *di = inode->i_bdev->bd_disk->private_data;
197 return cdrom_ioctl(file, &di->viocd_info, inode, cmd, arg);
200 static int viocd_blk_media_changed(struct gendisk *disk)
202 struct disk_info *di = disk->private_data;
203 return cdrom_media_changed(&di->viocd_info);
206 struct block_device_operations viocd_fops = {
207 .owner = THIS_MODULE,
208 .open = viocd_blk_open,
209 .release = viocd_blk_release,
210 .ioctl = viocd_blk_ioctl,
211 .media_changed = viocd_blk_media_changed,
214 /* Get info on CD devices from OS/400 */
215 static void __init get_viocd_info(void)
219 struct viocd_waitevent we;
220 struct cdrom_info *viocd_unitinfo;
221 dma_addr_t unitinfo_dmaaddr;
223 viocd_unitinfo = iseries_hv_alloc(
224 sizeof(*viocd_unitinfo) * VIOCD_MAX_CD,
225 &unitinfo_dmaaddr, GFP_ATOMIC);
226 if (viocd_unitinfo == NULL) {
227 printk(VIOCD_KERN_WARNING "error allocating unitinfo\n");
231 memset(viocd_unitinfo, 0, sizeof(*viocd_unitinfo) * VIOCD_MAX_CD);
233 init_completion(&we.com);
235 hvrc = HvCallEvent_signalLpEventFast(viopath_hostLp,
236 HvLpEvent_Type_VirtualIo,
237 viomajorsubtype_cdio | viocdgetinfo,
238 HvLpEvent_AckInd_DoAck, HvLpEvent_AckType_ImmediateAck,
239 viopath_sourceinst(viopath_hostLp),
240 viopath_targetinst(viopath_hostLp),
241 (u64)&we, VIOVERSION << 16, unitinfo_dmaaddr, 0,
242 sizeof(*viocd_unitinfo) * VIOCD_MAX_CD, 0);
243 if (hvrc != HvLpEvent_Rc_Good) {
244 printk(VIOCD_KERN_WARNING "cdrom error sending event. rc %d\n",
249 wait_for_completion(&we.com);
252 const struct vio_error_entry *err =
253 vio_lookup_rc(viocd_err_table, we.sub_result);
254 printk(VIOCD_KERN_WARNING "bad rc %d:0x%04X on getinfo: %s\n",
255 we.rc, we.sub_result, err->msg);
259 for (i = 0; (i < VIOCD_MAX_CD) && viocd_unitinfo[i].rsrcname[0]; i++) {
260 viocd_diskinfo[viocd_numdev].unitinfo = viocd_unitinfo[i];
265 iseries_hv_free(sizeof(*viocd_unitinfo) * VIOCD_MAX_CD,
266 viocd_unitinfo, unitinfo_dmaaddr);
269 static int viocd_open(struct cdrom_device_info *cdi, int purpose)
271 struct disk_info *diskinfo = cdi->handle;
272 int device_no = DEVICE_NR(diskinfo);
274 struct viocd_waitevent we;
276 init_completion(&we.com);
277 hvrc = HvCallEvent_signalLpEventFast(viopath_hostLp,
278 HvLpEvent_Type_VirtualIo,
279 viomajorsubtype_cdio | viocdopen,
280 HvLpEvent_AckInd_DoAck, HvLpEvent_AckType_ImmediateAck,
281 viopath_sourceinst(viopath_hostLp),
282 viopath_targetinst(viopath_hostLp),
283 (u64)&we, VIOVERSION << 16, ((u64)device_no << 48),
286 printk(VIOCD_KERN_WARNING
287 "bad rc on HvCallEvent_signalLpEventFast %d\n",
292 wait_for_completion(&we.com);
295 const struct vio_error_entry *err =
296 vio_lookup_rc(viocd_err_table, we.sub_result);
297 printk(VIOCD_KERN_WARNING "bad rc %d:0x%04X on open: %s\n",
298 we.rc, we.sub_result, err->msg);
305 static void viocd_release(struct cdrom_device_info *cdi)
307 int device_no = DEVICE_NR((struct disk_info *)cdi->handle);
310 hvrc = HvCallEvent_signalLpEventFast(viopath_hostLp,
311 HvLpEvent_Type_VirtualIo,
312 viomajorsubtype_cdio | viocdclose,
313 HvLpEvent_AckInd_NoAck, HvLpEvent_AckType_ImmediateAck,
314 viopath_sourceinst(viopath_hostLp),
315 viopath_targetinst(viopath_hostLp), 0,
316 VIOVERSION << 16, ((u64)device_no << 48), 0, 0, 0);
318 printk(VIOCD_KERN_WARNING
319 "bad rc on HvCallEvent_signalLpEventFast %d\n",
323 /* Send a read or write request to OS/400 */
324 static int send_request(struct request *req)
327 struct disk_info *diskinfo = req->rq_disk->private_data;
332 struct scatterlist sg;
334 BUG_ON(req->nr_phys_segments > 1);
336 if (rq_data_dir(req) == READ) {
337 direction = DMA_FROM_DEVICE;
338 cmd = viomajorsubtype_cdio | viocdread;
340 direction = DMA_TO_DEVICE;
341 cmd = viomajorsubtype_cdio | viocdwrite;
344 if (blk_rq_map_sg(req->q, req, &sg) == 0) {
345 printk(VIOCD_KERN_WARNING
346 "error setting up scatter/gather list\n");
350 if (dma_map_sg(diskinfo->dev, &sg, 1, direction) == 0) {
351 printk(VIOCD_KERN_WARNING "error allocating sg tce\n");
354 dmaaddr = sg_dma_address(&sg);
355 len = sg_dma_len(&sg);
357 hvrc = HvCallEvent_signalLpEventFast(viopath_hostLp,
358 HvLpEvent_Type_VirtualIo, cmd,
359 HvLpEvent_AckInd_DoAck,
360 HvLpEvent_AckType_ImmediateAck,
361 viopath_sourceinst(viopath_hostLp),
362 viopath_targetinst(viopath_hostLp),
363 (u64)req, VIOVERSION << 16,
364 ((u64)DEVICE_NR(diskinfo) << 48) | dmaaddr,
365 (u64)req->sector * 512, len, 0);
366 if (hvrc != HvLpEvent_Rc_Good) {
367 printk(VIOCD_KERN_WARNING "hv error on op %d\n", (int)hvrc);
374 static void viocd_end_request(struct request *req, int uptodate)
376 int nsectors = req->hard_nr_sectors;
379 * Make sure it's fully ended, and ensure that we process
380 * at least one sector.
382 if (blk_pc_request(req))
383 nsectors = (req->data_len + 511) >> 9;
387 if (end_that_request_first(req, uptodate, nsectors))
389 add_disk_randomness(req->rq_disk);
390 blkdev_dequeue_request(req);
391 end_that_request_last(req, uptodate);
396 static void do_viocd_request(struct request_queue *q)
400 while ((rwreq == 0) && ((req = elv_next_request(q)) != NULL)) {
401 if (!blk_fs_request(req))
402 viocd_end_request(req, 0);
403 else if (send_request(req) < 0) {
404 printk(VIOCD_KERN_WARNING
405 "unable to send message to OS/400!");
406 viocd_end_request(req, 0);
412 static int viocd_media_changed(struct cdrom_device_info *cdi, int disc_nr)
414 struct viocd_waitevent we;
416 int device_no = DEVICE_NR((struct disk_info *)cdi->handle);
418 init_completion(&we.com);
420 /* Send the open event to OS/400 */
421 hvrc = HvCallEvent_signalLpEventFast(viopath_hostLp,
422 HvLpEvent_Type_VirtualIo,
423 viomajorsubtype_cdio | viocdcheck,
424 HvLpEvent_AckInd_DoAck, HvLpEvent_AckType_ImmediateAck,
425 viopath_sourceinst(viopath_hostLp),
426 viopath_targetinst(viopath_hostLp),
427 (u64)&we, VIOVERSION << 16, ((u64)device_no << 48),
430 printk(VIOCD_KERN_WARNING "bad rc on HvCallEvent_signalLpEventFast %d\n",
435 wait_for_completion(&we.com);
437 /* Check the return code. If bad, assume no change */
439 const struct vio_error_entry *err =
440 vio_lookup_rc(viocd_err_table, we.sub_result);
441 printk(VIOCD_KERN_WARNING
442 "bad rc %d:0x%04X on check_change: %s; Assuming no change\n",
443 we.rc, we.sub_result, err->msg);
450 static int viocd_lock_door(struct cdrom_device_info *cdi, int locking)
453 u64 device_no = DEVICE_NR((struct disk_info *)cdi->handle);
454 /* NOTE: flags is 1 or 0 so it won't overwrite the device_no */
455 u64 flags = !!locking;
456 struct viocd_waitevent we;
458 init_completion(&we.com);
460 /* Send the lockdoor event to OS/400 */
461 hvrc = HvCallEvent_signalLpEventFast(viopath_hostLp,
462 HvLpEvent_Type_VirtualIo,
463 viomajorsubtype_cdio | viocdlockdoor,
464 HvLpEvent_AckInd_DoAck, HvLpEvent_AckType_ImmediateAck,
465 viopath_sourceinst(viopath_hostLp),
466 viopath_targetinst(viopath_hostLp),
467 (u64)&we, VIOVERSION << 16,
468 (device_no << 48) | (flags << 32), 0, 0, 0);
470 printk(VIOCD_KERN_WARNING "bad rc on HvCallEvent_signalLpEventFast %d\n",
475 wait_for_completion(&we.com);
482 static int viocd_packet(struct cdrom_device_info *cdi,
483 struct packet_command *cgc)
485 unsigned int buflen = cgc->buflen;
488 switch (cgc->cmd[0]) {
489 case GPCMD_READ_DISC_INFO:
491 disc_information *di = (disc_information *)cgc->buffer;
494 di->disc_information_length = cpu_to_be16(1);
499 (cdi->ops->capability & ~cdi->mask
500 & (CDC_DVD_RAM | CDC_RAM)) != 0;
503 case GPCMD_GET_CONFIGURATION:
504 if (cgc->cmd[3] == CDF_RWRT) {
505 struct rwrt_feature_desc *rfd = (struct rwrt_feature_desc *)(cgc->buffer + sizeof(struct feature_header));
508 (sizeof(struct feature_header) + sizeof(*rfd))) &&
509 (cdi->ops->capability & ~cdi->mask
510 & (CDC_DVD_RAM | CDC_RAM))) {
511 rfd->feature_code = cpu_to_be16(CDF_RWRT);
519 /* indicate Unknown code */
520 cgc->sense->sense_key = 0x05;
521 cgc->sense->asc = 0x20;
522 cgc->sense->ascq = 0x00;
531 static void restart_all_queues(int first_index)
535 for (i = first_index + 1; i < viocd_numdev; i++)
536 if (viocd_diskinfo[i].viocd_disk)
537 blk_run_queue(viocd_diskinfo[i].viocd_disk->queue);
538 for (i = 0; i <= first_index; i++)
539 if (viocd_diskinfo[i].viocd_disk)
540 blk_run_queue(viocd_diskinfo[i].viocd_disk->queue);
543 /* This routine handles incoming CD LP events */
544 static void vio_handle_cd_event(struct HvLpEvent *event)
546 struct viocdlpevent *bevent;
547 struct viocd_waitevent *pwe;
548 struct disk_info *di;
554 /* Notification that a partition went away! */
556 /* First, we should NEVER get an int here...only acks */
557 if (hvlpevent_is_int(event)) {
558 printk(VIOCD_KERN_WARNING
559 "Yikes! got an int in viocd event handler!\n");
560 if (hvlpevent_need_ack(event)) {
561 event->xRc = HvLpEvent_Rc_InvalidSubtype;
562 HvCallEvent_ackLpEvent(event);
566 bevent = (struct viocdlpevent *)event;
568 switch (event->xSubtype & VIOMINOR_SUBTYPE_MASK) {
570 if (event->xRc == 0) {
571 di = &viocd_diskinfo[bevent->disk];
572 blk_queue_hardsect_size(di->viocd_disk->queue,
574 set_capacity(di->viocd_disk,
576 bevent->block_size / 512);
581 pwe = (struct viocd_waitevent *)event->xCorrelationToken;
583 pwe->rc = event->xRc;
584 pwe->sub_result = bevent->sub_result;
589 pwe = (struct viocd_waitevent *)event->xCorrelationToken;
590 pwe->changed = bevent->flags;
591 goto return_complete;
599 * Since this is running in interrupt mode, we need to
600 * make sure we're not stepping on any global I/O operations
602 di = &viocd_diskinfo[bevent->disk];
603 spin_lock_irqsave(&viocd_reqlock, flags);
604 dma_unmap_single(di->dev, bevent->token, bevent->len,
605 ((event->xSubtype & VIOMINOR_SUBTYPE_MASK) == viocdread)
606 ? DMA_FROM_DEVICE : DMA_TO_DEVICE);
607 req = (struct request *)bevent->event.xCorrelationToken;
610 if (event->xRc != HvLpEvent_Rc_Good) {
611 const struct vio_error_entry *err =
612 vio_lookup_rc(viocd_err_table,
614 printk(VIOCD_KERN_WARNING "request %p failed "
615 "with rc %d:0x%04X: %s\n",
617 bevent->sub_result, err->msg);
618 viocd_end_request(req, 0);
620 viocd_end_request(req, 1);
622 /* restart handling of incoming requests */
623 spin_unlock_irqrestore(&viocd_reqlock, flags);
624 restart_all_queues(bevent->disk);
628 printk(VIOCD_KERN_WARNING
629 "message with invalid subtype %0x04X!\n",
630 event->xSubtype & VIOMINOR_SUBTYPE_MASK);
631 if (hvlpevent_need_ack(event)) {
632 event->xRc = HvLpEvent_Rc_InvalidSubtype;
633 HvCallEvent_ackLpEvent(event);
638 static struct cdrom_device_ops viocd_dops = {
640 .release = viocd_release,
641 .media_changed = viocd_media_changed,
642 .lock_door = viocd_lock_door,
643 .generic_packet = viocd_packet,
644 .capability = CDC_CLOSE_TRAY | CDC_OPEN_TRAY | CDC_LOCK | CDC_SELECT_SPEED | CDC_SELECT_DISC | CDC_MULTI_SESSION | CDC_MCN | CDC_MEDIA_CHANGED | CDC_PLAY_AUDIO | CDC_RESET | CDC_DRIVE_STATUS | CDC_GENERIC_PACKET | CDC_CD_R | CDC_CD_RW | CDC_DVD | CDC_DVD_R | CDC_DVD_RAM | CDC_RAM
647 static int __init find_capability(const char *type)
649 struct capability_entry *entry;
651 for(entry = capability_table; entry->type; ++entry)
652 if(!strncmp(entry->type, type, 4))
654 return entry->capability;
657 static int viocd_probe(struct vio_dev *vdev, const struct vio_device_id *id)
659 struct gendisk *gendisk;
662 struct cdrom_device_info *c;
663 struct cdrom_info *ci;
664 struct request_queue *q;
666 deviceno = vdev->unit_address;
667 if (deviceno >= viocd_numdev)
670 d = &viocd_diskinfo[deviceno];
674 c->ops = &viocd_dops;
678 c->mask = ~find_capability(ci->type);
679 sprintf(c->name, VIOCD_DEVICE "%c", 'a' + deviceno);
681 if (register_cdrom(c) != 0) {
682 printk(VIOCD_KERN_WARNING "Cannot register viocd CD-ROM %s!\n",
686 printk(VIOCD_KERN_INFO "cd %s is iSeries resource %10.10s "
687 "type %4.4s, model %3.3s\n",
688 c->name, ci->rsrcname, ci->type, ci->model);
689 q = blk_init_queue(do_viocd_request, &viocd_reqlock);
691 printk(VIOCD_KERN_WARNING "Cannot allocate queue for %s!\n",
693 goto out_unregister_cdrom;
695 gendisk = alloc_disk(1);
696 if (gendisk == NULL) {
697 printk(VIOCD_KERN_WARNING "Cannot create gendisk for %s!\n",
699 goto out_cleanup_queue;
701 gendisk->major = VIOCD_MAJOR;
702 gendisk->first_minor = deviceno;
703 strncpy(gendisk->disk_name, c->name,
704 sizeof(gendisk->disk_name));
705 blk_queue_max_hw_segments(q, 1);
706 blk_queue_max_phys_segments(q, 1);
707 blk_queue_max_sectors(q, 4096 / 512);
709 gendisk->fops = &viocd_fops;
710 gendisk->flags = GENHD_FL_CD|GENHD_FL_REMOVABLE;
711 set_capacity(gendisk, 0);
712 gendisk->private_data = d;
713 d->viocd_disk = gendisk;
715 gendisk->driverfs_dev = d->dev;
720 blk_cleanup_queue(q);
721 out_unregister_cdrom:
727 static int viocd_remove(struct vio_dev *vdev)
729 struct disk_info *d = &viocd_diskinfo[vdev->unit_address];
731 if (unregister_cdrom(&d->viocd_info) != 0)
732 printk(VIOCD_KERN_WARNING
733 "Cannot unregister viocd CD-ROM %s!\n",
735 del_gendisk(d->viocd_disk);
736 blk_cleanup_queue(d->viocd_disk->queue);
737 put_disk(d->viocd_disk);
742 * viocd_device_table: Used by vio.c to match devices that we
745 static struct vio_device_id viocd_device_table[] __devinitdata = {
746 { "block", "IBM,iSeries-viocd" },
749 MODULE_DEVICE_TABLE(vio, viocd_device_table);
751 static struct vio_driver viocd_driver = {
752 .id_table = viocd_device_table,
753 .probe = viocd_probe,
754 .remove = viocd_remove,
757 .owner = THIS_MODULE,
761 static int __init viocd_init(void)
763 struct proc_dir_entry *e;
766 if (!firmware_has_feature(FW_FEATURE_ISERIES))
769 if (viopath_hostLp == HvLpIndexInvalid) {
771 /* If we don't have a host, bail out */
772 if (viopath_hostLp == HvLpIndexInvalid)
776 printk(VIOCD_KERN_INFO "vers " VIOCD_VERS ", hosting partition %d\n",
779 if (register_blkdev(VIOCD_MAJOR, VIOCD_DEVICE) != 0) {
780 printk(VIOCD_KERN_WARNING "Unable to get major %d for %s\n",
781 VIOCD_MAJOR, VIOCD_DEVICE);
785 ret = viopath_open(viopath_hostLp, viomajorsubtype_cdio,
788 printk(VIOCD_KERN_WARNING
789 "error opening path to host partition %d\n",
794 /* Initialize our request handler */
795 vio_setHandler(viomajorsubtype_cdio, vio_handle_cd_event);
799 spin_lock_init(&viocd_reqlock);
801 ret = vio_register_driver(&viocd_driver);
805 e = create_proc_entry("iSeries/viocd", S_IFREG|S_IRUGO, NULL);
807 e->owner = THIS_MODULE;
808 e->proc_fops = &proc_viocd_operations;
814 vio_clearHandler(viomajorsubtype_cdio);
815 viopath_close(viopath_hostLp, viomajorsubtype_cdio, MAX_CD_REQ + 2);
817 unregister_blkdev(VIOCD_MAJOR, VIOCD_DEVICE);
821 static void __exit viocd_exit(void)
823 remove_proc_entry("iSeries/viocd", NULL);
824 vio_unregister_driver(&viocd_driver);
825 viopath_close(viopath_hostLp, viomajorsubtype_cdio, MAX_CD_REQ + 2);
826 vio_clearHandler(viomajorsubtype_cdio);
827 unregister_blkdev(VIOCD_MAJOR, VIOCD_DEVICE);
830 module_init(viocd_init);
831 module_exit(viocd_exit);
832 MODULE_LICENSE("GPL");