lkml.org 
[lkml]   [2000]   [Mar]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectUsing a Creative DVD-RAM RAM1216S drive under Linux kernel 2.2

Dear fellow Linux Enthusiasts:

I apologize for not being a member of the group. But I have only recently
started playing with Linux kernels out of necessity. I ahve some
information which I would like to share with the community.
I woudl appreciate to be personally CC'ed the answers/comments posted to
the list in response to this posting.

After a lot of struggle and lack of useful information from Creative Labs
North America, I have stumbled onto the secret of running the CREATIVE
DVD-RAM RAM1216S drive under Linux kernel 2.2.

In thoery, a patch exists for Linux kernel 2.2.1-2.2.12 for the CREATIVE
DVD-RAM drive, and support is built into kernels 2.2.13 and 2.2.14. Please
see, for example, http://www.bitwizard.nl/dvd/.

Alas, when I try either patching an older kernel or running the new ones,
the drive would be properly recognized, but when I attempt to write to it,
it would start "clicking" and then hang the SCSI bus.

In looking more closely at what people reported on the web, this patch
(and the support in the latest kernel) are for the Creative DVD-RAM
RAM1220S. Whereas what I have is a RAM1216S. I called up Creative and
theyn drew a complete blank. The Technical Support folks have no
information on the 1216S at all--they in fact claim the drive is not
marketed in North America.

Looking closely at the physical appearance of the drive, I decided the
1216S must have come from a different OEM source than the 1220S. The 1220S
is an OEM from Panasonic/Matsushita. I looked at other drives and
discovered that the front and back panels of the drive are similar to the
Toshiba SD-W1101 and SD-W1111 DVD-RAM drives. The fact that both drives
shipped with a metal pin to force the cartridge to eject was the smoking
gun.

I t turns out that Reed Meyer of Yale Astronomy had determined that the
SD-W1101 drive had a special problem. It does not recgnize 6-byte SCSI
commands. Please see, for example,
http://www.uwsg.iu.edu/hypermail/linux/kernel/9908.3/0738.html, for a copy
of the original posting.

The fix is therefore to revert back to 10-byte SCSI commands. Reed Meyer
had posted two patches. One was a patch to recognize the drive as a
removable disk (which the previously mentioned patches and the new kernels
already addresse), and a second was the patch for sd.c. Both of these
patches are for 2.2.11.

I attach below the patch for sd.c under kernel 2.2.14, which is the
current stable kernel. This patch did the trick. I did still have to
follow the instructions that a block size of 2048 (-b 2048) is needed for
both "fdisk" and "mke2fs".

I have since attempted to call both Creative and Toshiba North America to
inquire about a firmware upgrade (I really don't like messing with sd.c).
Creative again has no information about the drive, even though it has
their name on it. Toshiba simply said that they do not support OEM'ed
products-talk to Creative.

I hope this posting will save some time and pain for fellow Linux
entusaists out there.

Cheers!

Charlie Jui
High Resolution Fly's Eye
Dept. of Physics
University of Utah

============================cut here==========================
--- sd.c.orig Wed Mar 22 13:51:01 2000
+++ sd.c Wed Mar 22 13:51:01 2000
@@ -734,10 +734,10 @@
SCpnt = end_scsi_request(SCpnt, 0,
SCpnt->request.nr_sectors);
goto repeat;
}
- cmd[0] = WRITE_6;
+ cmd[0] = WRITE_10;
break;
case READ :
- cmd[0] = READ_6;
+ cmd[0] = READ_10;
break;
default :
panic ("Unknown sd command %d\n", SCpnt->request.cmd);
@@ -1016,12 +1016,11 @@
this_count = this_count << 1;
}

- if (((this_count > 0xff) || (block > 0x1fffff)) &&
rscsi_disks[dev].ten)
+ if (rscsi_disks[dev].ten) /* Can handle ten-byte commands */
{
if (this_count > 0xffff)
this_count = 0xffff;

- cmd[0] += READ_10 - READ_6 ;
cmd[2] = (unsigned char) (block >> 24) & 0xff;
cmd[3] = (unsigned char) (block >> 16) & 0xff;
cmd[4] = (unsigned char) (block >> 8) & 0xff;
@@ -1030,11 +1029,12 @@
cmd[7] = (unsigned char) (this_count >> 8) & 0xff;
cmd[8] = (unsigned char) this_count & 0xff;
}
- else
+ else /* Can't handle ten-byte commands */
{
if (this_count > 0xff)
this_count = 0xff;

+ cmd[0] -= READ_10 - READ_6 ;
cmd[1] |= (unsigned char) ((block >> 16) & 0x1f);
cmd[2] = (unsigned char) ((block >> 8) & 0xff);
cmd[3] = (unsigned char) block & 0xff;
========================end ===============================


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:57    [W:0.043 / U:0.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site