1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305
|
In order to use ATAPI-CD-Writers with X-CD-Roast you have to follow
these instructions.
If you also want to be able to use ATAPI-CDROMs to read audio-tracks you
have to set the Audio-Read-Mode in X-CD-Roast-Setup to "ATAPI". If
this fails for your CDROM (e.g. No data read at all, or only zeroes read),
try to use CDParanoia (See README.cdparanoia).
24.11.98 Thomas Niederreiter
-------- Original README.ATAPI as shipped with cdrecord-1.6.1 ---------
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 !
The basic driver design in Solaris would also allow to use ATAPI
drives but unfortunately, Sun made a mistake in the mid-level design.
If you want to use ATAPI drives with Solaris, ask Sun why they don't
support SCSI passthrough to IDE although they are using a common driver
concept.
Please use cdrecord-1.6 final or later (if available), 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 sources ide.h and ide-scsi.c (see below).
If you are using Linux 2.0.35 or later you also don't need to patch.
If you like to use ATAPI drives, I recommend to use the newer releases
mentioned above to avoid the need for a patch. However, you still need
to configure a kernel with ATAPI/SCSI hostadapter emulation. Read
carefully the following instructions:
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 misleading. 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".
NOTICE:
With the newer kernels it seems to be possible to run SCSI/ATAPI hostadapter
emulation and generic IDE at the same time by selectively telling the
kernel what to use for which drive. However, this would not be needed
if the Linux SCSI CD-ROM driver would be more up to date and supports
standard comforming drives.
Jrg Schilling <schilling@fokus.gmd.de>
--------------------------------------------------
Here is a hint from Alan Brown <alanb@manawatu.gen.nz>:
To allow ATAPI cd and ide-scsi support on the same machine, add
`hd<x>=ide-scsi` to the lilo.conf append entry, or use
`hd<x>=ide-scsi` at the bootup lilo prompt.
I have my HP-7200 RW drive as the primary drive on the second IDE
bus, so the statement used is "hdc=ide-scsi"
--------------------------------------------------
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 sources 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.
-------------------------------------------------------------------------------
HOTE: The patches below are not needed anymore!
1) Actual cdrecord releases support ATAPI
2) Linux 2.0.35 or Linux 2.1.73 or later include ATAPI support
-------------------------------------------------------------------------------
----------------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 replace 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);
}
|