aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cdrom/viocd.c
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2005-05-27 15:52:58 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-28 14:14:00 -0400
commit9db29258893b08a838e5ecfa4a0933c9c1f2e305 (patch)
tree5df4fd30b103a46861fbbc9e9bfa81c198e4f674 /drivers/cdrom/viocd.c
parent9ae250d175e1cbff82223ce2c07897c790c5b948 (diff)
[PATCH] ppc64 iSeries: make virtual DVD-RAMs writable again
It appears that another test has been added in the Uniform CDROM layer that must be passed before a DVD-RAM is considered writeable. This patch implements an emulation of the needed packet command for the viocd driver. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/cdrom/viocd.c')
-rw-r--r--drivers/cdrom/viocd.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/cdrom/viocd.c b/drivers/cdrom/viocd.c
index fcca26c89bbc..38dd9ffbe8bc 100644
--- a/drivers/cdrom/viocd.c
+++ b/drivers/cdrom/viocd.c
@@ -488,6 +488,20 @@ static int viocd_packet(struct cdrom_device_info *cdi,
488 & (CDC_DVD_RAM | CDC_RAM)) != 0; 488 & (CDC_DVD_RAM | CDC_RAM)) != 0;
489 } 489 }
490 break; 490 break;
491 case GPCMD_GET_CONFIGURATION:
492 if (cgc->cmd[3] == CDF_RWRT) {
493 struct rwrt_feature_desc *rfd = (struct rwrt_feature_desc *)(cgc->buffer + sizeof(struct feature_header));
494
495 if ((buflen >=
496 (sizeof(struct feature_header) + sizeof(*rfd))) &&
497 (cdi->ops->capability & ~cdi->mask
498 & (CDC_DVD_RAM | CDC_RAM))) {
499 rfd->feature_code = cpu_to_be16(CDF_RWRT);
500 rfd->curr = 1;
501 ret = 0;
502 }
503 }
504 break;
491 default: 505 default:
492 if (cgc->sense) { 506 if (cgc->sense) {
493 /* indicate Unknown code */ 507 /* indicate Unknown code */