Skip to contentSkip to conversation

DVD-RAM rewritable again

PATCH In review Pat LaVarre 3 participants 7 messages Aug 3, 2004 – Aug 20, 2004

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 DVD-RAM rewritable again

Jens A:

Can I help by offering the trivial patch shown here? Or can I help in some other way?

I ask because I see this patch makes my PATAPI DVD-RAM disc as rewritable as it was in 2.4.26.

Per my understanding of your instructions, I defer, until 2.4.28, the non-trivial work of making PATAPI and USB DVD-RAM discs behave the same.

Per my understanding of your instructions, I leave USB DVD-RAM discs not rewritable until 2.4.28, since those discs have not been rewritable at least since 2.4.26.

Pat LaVarre

drivers/cdrom/cdrom.c +2 -0
diff -urp linux-2.4.27-rc4/drivers/cdrom/cdrom.c linux-2.4.27-rc4-pel/drivers/cdrom/cdrom.c
@@ -536,6 +536,8 @@ static int cdrom_open_write(struct cdrom
 	if (CDROM_CAN(CDC_RAM) &&
 	    !CDROM_CAN(CDC_CD_R|CDC_CD_RW|CDC_DVD|CDC_DVD_R)) 
 		ret = cdrom_ram_open_write(cdi);
+	else if (CDROM_CAN(CDC_DVD_RAM))
+		ret = 0;
 	else
 		ret = 1;
 
#1 lore raw
Quoted 21 lines · Pat LaVarre

Jens A:

Can I help by offering the trivial patch shown here? Or can I help in some other way?

I ask because I see this patch makes my PATAPI DVD-RAM disc as rewritable as it was in 2.4.26.

Per my understanding of your instructions, I defer, until 2.4.28, the non-trivial work of making PATAPI and USB DVD-RAM discs behave the same.

Per my understanding of your instructions, I leave USB DVD-RAM discs not rewritable until 2.4.28, since those discs have not been rewritable at least since 2.4.26.

Pat LaVarre

diff -urp linux-2.4.27-rc4/drivers/cdrom/cdrom.c linux-2.4.27-rc4-pel/drivers/cdrom/cdrom.c

drivers/cdrom/cdrom.c static int cdrom_open_write(struct cdrom · line 542

Quoted 7 lines
drivers/cdrom/cdrom.c +2 -0
@@ -536,6 +536,8 @@ static int cdrom_open_write(struct cdrom
 	if (CDROM_CAN(CDC_RAM) &&
 	    !CDROM_CAN(CDC_CD_R|CDC_CD_RW|CDC_DVD|CDC_DVD_R)) 
 		ret = cdrom_ram_open_write(cdi);
+	else if (CDROM_CAN(CDC_DVD_RAM))
+		ret = 0;
 	else
 		ret = 1;

That looks fine!

Signature · 1 line
Jens Axboe
#2 lore raw
Quoted 8 lines

drivers/cdrom/cdrom.c static int cdrom_open_write(struct cdrom · line 540

Quoted 6 lines
drivers/cdrom/cdrom.c +2 -0
@@ -536,6 +536,8 @@ static int cdrom_open_write(struct cdrom
 	if (CDROM_CAN(CDC_RAM) &&
 	    !CDROM_CAN(CDC_CD_R|CDC_CD_RW|CDC_DVD|CDC_DVD_R)) 
 		ret = cdrom_ram_open_write(cdi);
+	else if (CDROM_CAN(CDC_DVD_RAM))
+		ret = 0;

...
That looks fine!

Good to hear, I was not certain.

Can I/ should I do anything more to help, ... before we begin the 2.4.28 work of making USB DVD-RAM discs also rewritable, same as USB Iomega REV discs?

Pat LaVarre

P.S. I notice kernel.org changing in parallel with this thread:

--- http://www.kernel.org/pub/linux/kernel/v2.4/testing/patch-2.4.27.log
...
Summary of changes from v2.4.27-rc4 to v2.4.27-rc5
...
Marcelo Tosatti:

  o Revert DVD-RW write support for now: [email protected]|ChangeSet|20040606235035|46544
  o Cset exclude: [email protected]|ChangeSet|20040607195639|57919

...
---

Me the kernelnewbie, I don't yet know how to click thru to a ChangeSet to see specifically what these summaries mean.

#3 lore raw
Quoted 9 lines · Pat LaVarre
Quoted 8 lines

drivers/cdrom/cdrom.c static int cdrom_open_write(struct cdrom · line 540

Quoted 6 lines
drivers/cdrom/cdrom.c +2 -0
@@ -536,6 +536,8 @@ static int cdrom_open_write(struct cdrom
 	if (CDROM_CAN(CDC_RAM) &&
 	    !CDROM_CAN(CDC_CD_R|CDC_CD_RW|CDC_DVD|CDC_DVD_R)) 
 		ret = cdrom_ram_open_write(cdi);
+	else if (CDROM_CAN(CDC_DVD_RAM))
+		ret = 0;

...
That looks fine!

Quoted 5 lines

Good to hear, I was not certain.

Can I/ should I do anything more to help, ... before we begin the 2.4.28 work of making USB DVD-RAM discs also rewritable, same as USB Iomega REV discs?

Prepare a patch against current 2.4.27-rc5 with everything, test it, and then we can send it to Marcelo when 2.4.28 opens.

Signature · 1 line
Jens Axboe
#4 lore raw

dvd-ram open succeeds despite write-protect

Jens A:

Quoted 3 lines

Subject: Re: [PATCH] DVD-RAM rewritable again
...
... with everything, test ...

In 2.6 Linux, do we care about write-protected DVD/CD discs? Do we agree they don't quite work yet? Can I help best by working to fix them?

Just now I specifically tried toggling the invisible MMC PWP write-protect switch found inside of DVD-RAM discs, Iomega REV discs, etc. In Linux-2.6.8.1, with write-protected discs,

I'm glad to see EROFS correctly fail open to write of Iomega REV discs, no matter PATAPI or USB. But I'm sorry to see open, write, and close of DVD-RAM discs succeed, no matter PATAPI or USB. Only in my dmesg do I see that the DVD-RAM disc is actually not changing, e.g.

kernel: hdd: command error: status=0x51 { DriveReady SeekComplete Error }
kernel: hdd: command error: error=0x70
kernel: end_request: I/O error, dev hdd, sector 0

kernel: SCSI error : <0 0 0 0> return code = 0x8000002
kernel: Current sr0: sense key Data Protect
kernel: Additional sense: Write protected
kernel: end_request: I/O error, dev sr0, sector 0

Pat LaVarre
http://linux-pel.blog-city.com/read/771746.htm

#5 lore raw
In reply to Pat LaVarre
Quoted 24 lines · Pat LaVarre
Quoted 8 lines

drivers/cdrom/cdrom.c static int cdrom_open_write(struct cdrom · line 540

Quoted 6 lines
drivers/cdrom/cdrom.c +2 -0
@@ -536,6 +536,8 @@ static int cdrom_open_write(struct cdrom
 	if (CDROM_CAN(CDC_RAM) &&
 	    !CDROM_CAN(CDC_CD_R|CDC_CD_RW|CDC_DVD|CDC_DVD_R)) 
 		ret = cdrom_ram_open_write(cdi);
+	else if (CDROM_CAN(CDC_DVD_RAM))
+		ret = 0;

...
That looks fine!

Good to hear, I was not certain.

Can I/ should I do anything more to help, ... before we begin the 2.4.28 work of making USB DVD-RAM discs also rewritable, same as USB Iomega REV discs?

Pat LaVarre

P.S. I notice kernel.org changing in parallel with this thread:

--- http://www.kernel.org/pub/linux/kernel/v2.4/testing/patch-2.4.27.log
...
Summary of changes from v2.4.27-rc4 to v2.4.27-rc5
...
Marcelo Tosatti:

Quoted 7 lines
  o Revert DVD-RW write support for now: [email protected]|ChangeSet|20040606235035|46544
  o Cset exclude: [email protected]|ChangeSet|20040607195639|57919

...
---

Me the kernelnewbie, I don't yet know how to click thru to a ChangeSet to see specifically what these summaries mean.

Go to http://linux.bkbits.net/linux-2.4 then you can easily see the changesets...

#6 lore raw