Subject: Cdrecord & ATAPI on NetBSD
To: None <netbsd-help@netbsd.org, netbsd-users@netbsd.org>
From: Joerg Schilling <schilling@fokus.gmd.de>
List: netbsd-users
Date: 08/31/1998 00:25:37
Hi all,

I am just trying to hack cdrecord to support ATAPI on NetBSD.

After looking at the patch for cdrecord on ftp.netbsd.org I am sure
that this patch allows cdrecord to compile on NetBSD but would
never work with ATAPI drives.

I am planning to put a hacked version of cdrecord-1.6.1a3 on my ftp
server tomorrow after I got an answer to the following question:

The new scsi_addr structure on 1.3 looks like this:

struct  scsi_addr {
        int type;       /* bus type */
#define TYPE_SCSI 0
#define TYPE_ATAPI 1
        union {
                struct oscsi_addr scsi;
                struct _atapi {
                        int atbus;  /* -1 if wildcard */
                        int drive;  /* -1 if wildcard */
                } atapi;
        } addr;

Am I right that drive may be one of 0 or 1 ? for Master/Slave

Am I right that atbus my be one of 0 or 1 for the two IDE
ports ?

Would it make sense to map the ATAPI drives to the last posible
SCSI bus #  and create a virtual target # that is computed by:

drive * 2 * atbus #

so the mapped lun will always be 0 ?

Please respond to my mail address, I am not reading this
mailing list.

Jörg

 EMail:joerg@schily.isdn.cs.tu-berlin.de (home) Jörg Schilling D-13353 Berlin
       js@cs.tu-berlin.de		(uni)  If you don't have iso-8859-1
       schilling@fokus.gmd.de		(work) chars I am J"org Schilling
 URL:  http://www.fokus.gmd.de/usr/schilling   ftp://ftp.fokus.gmd.de/pub/unix