home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Dream 52
/
Amiga_Dream_52.iso
/
Linux
/
XCdRoast
/
xcdroast-0.96d.tar.gz
/
xcdroast-0.96d.tar
/
xcdroast-0.96d
/
README.ATAPI
< prev
next >
Wrap
Text File
|
1998-03-08
|
8KB
|
259 lines
It is possible to use X-CD-Roast with ATAPI-Writers when you follow
this instructions!
Thomas Niederreiter
----------------------------------------------------------------------------
This was taken out of mails from From: Dave Cohen <dcohen@richmond.infi.net>
and From: Gadi Oxman <gadio@netvision.net.il>
(slightly modified marked ***JS *** execpt typo corrects)
It is only valid for Linux !
Please use cdrecord-1.6a5 or later, it includes the modifications
needed for ATAPI drives and is still working with other SCSI drives.
If you want to use older revisions of cdrecord (not recommended)
you need to apply some patches as described below.
If you use Linux Kernel version 2.1.73 and later there are no
kernel patches needed to run cdrecord. If you are using a Linux
kernel prior to 2.1.73 you need to apply some patches to
the kernel souces ide.h and ide-scsi.c (see below).
In any case, you need to disable generic IDE support in order to make
ATAPI SCSI emulation working.
Many people ask why I use ATAPI-SCSI emulation.
The use of the naming convention "ATAPI-SCSI emulation" is a
litle bit missleading. It should rather be called:
"SCSI host adapter emulation"
The ATAPI standard describes method of sending SCSI commands over IDE
with some small limitations to the "real" SCSI standard.
For this reason ATAPI-SCSI emulation is the native method of
supporting ATAPI devices.
If you have problems to talk to the device when it is jumpered as "slave"
try to use it as "master".
J÷rg Schilling <schilling@fokus.gmd.de>
--------------------------------------------------
Hope that the following is helpful to you.
I recently purchased a HP-7110i CD-RW, which is the U.S. only version of
what you have. The HP 7100 and 7110 CD rewritables use the ATAPI
standard. Originally, the drives were not supported under Linux (due to
some inconsistencies with SCSI translations between the kernel and the
CD), but that problem has just recently been fixed. There are some kernel
and cdrecord patches that have been made to support this device that have
yet to be officially incorporated into cdwrite and the kernel. In order to
get your drive supported under Linux, you will have to do the following:
1. Get the proper version of cdrecord.
As of this writing, I am just getting ready to test Joerg's new cdrecord.
I am currently operational on cdrecord-1.5, so I know that works, and I
have attached patches for that version.
If you are in a hurry, you can download ver. 1.5, apply patches, and
rock-n-roll. You may want to wait, though. Up to you ;). The version with
ATAPI support is cdrecord-1.6alpha5. I'm not sure if the current kernel
patches are valid for this version, but i'll know soon enough.
**** They are valid **** JS
BTW, the new version of xcdroast now supports cdrecord - this version
is in beta testing, too (currently uses cdrecord-1.5 but cdrecord-1.6a5
should work with the actual xcdroast too).
2. Upgrade to kernel version 2.0.31
IDE/SCSI translation was first added in this kernel. Because your CD-RW is
an ATAPI device, it will support SCSI command sets. The translation
allows you to map the device as a SCSI generic device. This will allow
cdrecord to recognize it as a SCSI device.
3. Get the patches and apply them
Attached find kernel patches for kernel souces ide.h and ide-scsi.c, and
cdrecord source scsi_cdr.c (version 1.5 only).
3. Recompile kernel with SCSI emulation support
If you do a "make menuconfig" or "make xconfig", select SCSI emulation
under the category "Floppy, IDE, and other block devices".
WARNING:
Do not install SCSI support as a module - there is a bug in the makefile
structure that will cause the compile to fail. Compile directly into the
kernel.
4. WARNING: Disable generic IDE/ATAPI support *** JS ***
If you don't do this, the SCSI emulation will not work *** JS ***
Dave Cohen
dcohen@richmond.infi.net
(Patch instructions below)
-----------------------------------------------------------------
From: Danilo Fiorenzano <shade@juliet.gppsd.ab.ca>
Anyway, here's what I did, using kernel version 2.0.33 I believe this
is the proper way to get an HP-7100i to work (and as far as I can tell,
any other IDE CD-writer unit):
1) patch the kernel as described by README.ATAPI
2) save your current kernel config to an alternate file, then run
"make mrproper"
3) run 'make menuconfig' or 'make xconfig', then choose "load config
from alternate file" to restore the original configuration
4) In "Floppy, IDE and other block devices", disable "IDE/ATAPI CD-ROM
support" and enable instead "scsi emulation"
5) in "SCSI support" enable "SCSI support", "SCSI CD-ROM support" and
"SCSI generic support", everything directly in the kernel.
6) compile, install kernel/modules, reboot. Now, if everything went
fine, your CDROM units should show up with a message like:
"hdb: HP CD-Writer+ 7100, ATAPI CDROM drive - enabling SCSI emulation"
7) run "cdrecord -scanbus" to make sure cdrecord can see the unit and
talk to it. The end.
Don't forget that now -all- of your CD drives are seen as -SCSI- units
by all programs (/dev/scd0 etc.), so you might want to relink
/dev/cdrom to the proper scd<n> in order to get xcdplay or whatever to
work again.
----------------linux/drivers/block/ide.h----------------------
159c159
< #define WAIT_CMD (10*HZ) /* 10sec - maximum wait for an IRQ to happen */
---
> #define WAIT_CMD (1000*HZ) /* 1000sec - maximum wait for an IRQ to happen */
******* 400 seconds seems to be enough JS *****
----------------linux/drivers/scsi/ide-scsi.c------------------
162a163
> #if 0
170a172
> #endif
180a183
> #if 0
186a190
> #endif
433a438,439
> printk ("ATAPI overlap supported: %s\n",
> drive->id->capability & 0x20 ? "Yes" : "No");
-----------------------cdrecord-1.5/cdrecord/scsi_cdr----------------
If you want to use cdrecord-1.5 relpace the old functions by the following
if you use cdrecord-1.6a5 you don't need this *** JS ***
EXPORT int
mode_select(dp, cnt, smp, pf)
u_char *dp;
int cnt;
int smp;
int pf;
{
u_char xmode[256+4];
movebytes(&dp[4], &xmode[8], cnt-4);
xmode[0] = 0;
xmode[1] = 0;
xmode[2] = dp[1];
xmode[3] = dp[2];
xmode[4] = 0;
xmode[5] = 0;
i_to_short(&xmode[6], dp[3]);
fillbytes((caddr_t)&scmd, sizeof(scmd), '\0');
scmd.addr = (caddr_t)xmode;
scmd.size = cnt+4;
scmd.flags = SCG_DISRE_ENA;
scmd.cdb_len = SC_G1_CDBLEN;
scmd.sense_len = CCS_SENSE_LEN;
scmd.target = target;
scmd.cdb.g1_cdb.cmd = 0x55;
scmd.cdb.g1_cdb.lun = lun;
scmd.cdb.g0_cdb.high_addr = smp ? 1 : 0 | pf ? 0x10 : 0;
g1_cdblen(&scmd.cdb.g1_cdb, cnt+4);
if (verbose) {
printf("%s ", smp?"Save":"Set ");
scsiprbytes("Mode Parameters", dp, cnt);
}
return (scsicmd("mode select g1"));
}
EXPORT int
mode_sense(dp, cnt, page, pcf)
u_char *dp;
int cnt;
int page;
int pcf;
{
u_char xmode[256+4];
int amt = cnt;
int len;
fillbytes((caddr_t)xmode, sizeof(scmd), '\0');
if (amt < 4) {
amt += 1;
} else if (amt == 4) {
amt += 3;
} else {
amt += 4;
}
fillbytes((caddr_t)&scmd, sizeof(scmd), '\0');
scmd.addr = (caddr_t)xmode;
scmd.size = 0xFF;
scmd.size = amt;
scmd.flags = SCG_RECV_DATA|SCG_DISRE_ENA;
scmd.cdb_len = SC_G1_CDBLEN;
scmd.sense_len = CCS_SENSE_LEN;
scmd.target = target;
scmd.cdb.g1_cdb.cmd = 0x5A;
scmd.cdb.g1_cdb.lun = lun;
#ifdef nonono
scmd.cdb.g0_cdb.high_addr = 1<<4; /* DBD Disable Block desc. */
#endif
scmd.cdb.g1_cdb.addr[0] = (page&0x3F) | ((pcf<<6)&0xC0);
g1_cdblen(&scmd.cdb.g1_cdb, amt);
if (scsicmd("mode sense g1") < 0)
return (-1);
if (verbose) scsiprbytes("Mode Sense Data", xmode, amt - scmd.resid);
amt -= scsigetresid();
movebytes(&xmode[8], &dp[4], amt-4);
len = a_to_u_short(xmode);
dp[0] = len - 3;
dp[1] = xmode[2];
dp[2] = xmode[3];
len = a_to_u_short(&xmode[6]);
dp[3] = len;
if (verbose) scsiprbytes("Mode Sense Data", dp, cnt - scmd.resid);
return (0);
}