CD-RW/DVD-RW Multi-Burner

The drive itself works fine in any case, but when it's used as normal EIDE-device there's no DMA support because it's connected to the SATA-controller. Hence it's necessary to use it as SATA-device to get the full speed and low CPU utilization needed, for instance to play DVDs without annoying stuttering.

Current vanilla kernels from http://www.kernel.org have the code for ATAPI support via SATA already included, but it's not enabled by default. After reading some comments about various Linux distributors already enabling the functionality in their custom kernels, I figured it's worth giving it a try.

Kernel 2.6.12.x:

In the kernel source tree in includes/linux/libata.h you have to change

#undef ATA_ENABLE_ATAPI                /* define to enable ATAPI support */
#undef ATA_ENABLE_PATA /* define to enable PATA support in some
* low-level drivers */
#undef ATAPI_ENABLE_DMADIR /* enables ATAPI DMADIR bridge support */

at around line 40 to

#define ATA_ENABLE_ATAPI                /* define to enable ATAPI support */
#define ATA_ENABLE_PATA /* define to enable PATA support in some
* low-level drivers */
#define ATAPI_ENABLE_DMADIR /* enables ATAPI DMADIR bridge support */

Kernel 2.6.14 and beyond:

Just add "libata.atapi_enabled=1" to the kernel command line in the GRUB configuration.

Using the Debian kernel package (currently linux-image-2.6.16-1-686 in sid/unstable), just make sure that the initrd is created in a way that the libata module is loaded with the atapi_enabled=1 option set. Depending on the programm you're using to create the initrd, it's necessary to configure the following files:

Package initrd-tools:

Put the line

libata atapi_enabled=1

into /etc/mkinitrd/modules

Package initramfs-tools:

Put the above line into /etc/mkinitramfs/modules

Package yaird:

Make sure the option is configured in the /etc/modprobe.d/ directory, e.g. put the line

options libata atapi_enabled=1

into a file /etc/modprobe.d/cdrom

Either way, you have to re-create the initrd afterwards, either manually (see the manual pages for mkinitrd, mkinitramfs and yaird, respectively) or by running dpkg-reconfigure linux-image-2.6.16-1-686 

Notes:

If patching is necessary you have to recompile and install the kernel as described on the kernel configuration page. After rebooting into the new kernel, the optical drive should then be accessible via /dev/scd0 (or /dev/sr0) for reading and /dev/sg1 for writing.

If your system still uses /dev/hdc (i.e. the drive is not found in /proc/scsi/scsi) it's maybe because the IDE-detection routines at startup find the multi-burner before the libata subsystem tries to access it. You can disable the IDE-detection by passing "ide1=noprobe" as kernel parameter in your GRUB configuration.

After a week of testing there haven't been any problems so far, so it seems to work fine. Playing DVDs now works perfectly, and writing to optical media works as well. But of course, you can also wait until the kernel developers think the feature is stable enough to enable it by default in the kernel.

Since I use various kernels at the moment, some with the SATA-ATAPI features enabled and some without, I put the following lines into an init script to fix the /dev/cdrom and /dev/dvd symlinks depending on kernel configuration:

# fix dvd and cdrom links
rm -f /dev/cdrom /dev/dvd
if grep -q MATSHITA /proc/scsi/scsi
then
# running libata enabled kernel
ln -s /dev/sr0 /dev/cdrom
ln -s /dev/sr0 /dev/dvd
else
# running kernel with only IDE support
ln -s /dev/hdc /dev/cdrom
ln -s /dev/hdc /dev/dvd
fi

Sections: