linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* pktcdvd DVD+RW always writes at max drive speed (not media speed)
@ 2006-02-18 20:23 linuxer
  2006-02-18 22:19 ` Peter Osterlund
  2006-02-19  6:11 ` Phillip Susi
  0 siblings, 2 replies; 9+ messages in thread
From: linuxer @ 2006-02-18 20:23 UTC (permalink / raw)
  To: linux-kernel

In drivers/block/pktcdvd.c it appears that in the case of DVD
rewriting, pkt_open_write always sets the write speed to pkt_get_max_speed
(the maximum writing speed reported by the drive). 

In my case, I have a new drive capable of 8x re-writing. However, all of
my existing media is rated for only 4x rewrite speed. 

When attempting to rw mount these disks, pktcdvd reports:

Feb 18 00:09:52 ever kernel: pktcdvd: write speed 11080kB/s
Feb 18 00:09:54 ever kernel: pktcdvd: 54 01 00 00 00 00 00 00 00 00 00 00 -
sense 00.54.9c (No sense)
Feb 18 00:09:54 ever kernel: pktcdvd: pktcdvd0 Optimum Power Calibration failed

And then of course a huge heap of I/O errors on the disk. 


pktcdvd.c only calls pkt_media_speed for CD drives, not DVD
drives. dvd+rw-tools has a program, dvd+rw-mediainfo, that is able to derive
the information of the rated media speed successfully. Code from this should
be integrated into the pktcdvd driver so as to avoid this pitfall. 

However, as I don't necessarily expect someone to do this for me right
away, I have a second question:

Although migrating sensing code from dvd+rw-mediatype would be by far the
more elegant solution, it occurs to me that an easier hack would be to add
a new case to pkt_ctl_ioctl, something along the lines of
PKT_CTRL_CMD_FORCESPEED or similar, and patch pktsetup.c (simple user mode
pktcdvd setup/teardown utility, a component provided in udftools) likewise
to allow the user to specify the write speed. I would also have to add an
additional member to struct pktcdvd_device in order to store this setting
on a per device context, however. Would this work, or am I too naive about
kernel programming?

Also, would this be a welcome or useful addition anyways (regardless of
possible future media-speed autodetection), to allow the user to override
and write faster/slower than drive reports media speed, to allow the user
more flexibility in overspeed/underspeed writing based on individual media
performance? 

Thank you for taking the time to read this, and I would appreciate any of
your thoughts.

PS: Please CC me, as I am not currently subscribed to the list. 


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2006-02-25 22:43 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-18 20:23 pktcdvd DVD+RW always writes at max drive speed (not media speed) linuxer
2006-02-18 22:19 ` Peter Osterlund
2006-02-18 23:35   ` linuxer
2006-02-19 10:09     ` Peter Osterlund
2006-02-22 22:28     ` Peter Osterlund
2006-02-25  1:12       ` linuxer
2006-02-25 22:43         ` Peter Osterlund
2006-02-19  6:11 ` Phillip Susi
2006-02-19  6:46   ` linuxer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).