[919] in linux-scsi channel archive

home help back first fref pref prev next nref lref last post

adding Nakamachi NRC-MBR7 cdrom to 1.2.13 scsi

daemon@ATHENA.MIT.EDU (Michael Robinton)
Tue Nov 12 16:44:00 1996

From: "Michael Robinton" <petals@girlswear.com>
To: linux-scsi@vger.rutgers.edu, support@nakamichiusa.com
Date: 	Tue, 12 Nov 1996 12:12:01 +0000
Reply-to: petals@girlswear.com


With help from Gerd Knorr and the folks at Nakamichi

the following patch allows SONY and NAKAMICHI cdrom drives to 
be added to 1.2.13 scsi driver

It turns out that the code in 1.3.10 for SONY is identical to that 
required for Nakamichi

probably works for other versions as well

Michael

#  -------------------- sr.c ---------------------------
455,479d454
<   case SCSI_MAN_SONY: /* Thomas QUINOT <thomas@melchior.frmug.fr.net> */
<   case SCSI_MAN_UNKNOWN: /* most others use SONY's method */
< #ifdef DEBUG
<     printk("sr_photocd: use SONY code\n");
< #endif
<     memset(buf,0,40);
<     *((unsigned long*)buf)   = 0x0;   /* we send nothing...     */
<     *((unsigned long*)buf+1) = 0x0c;  /* and receive 0x0c bytes */
<     cmd[0] = 0x43; /* Read TOC */
<     cmd[8] = 0x0c;
<     cmd[9] = 0x40;
<     rc = kernel_scsi_ioctl(scsi_CDs[MINOR(inode->i_rdev)].device,
<         SCSI_IOCTL_SEND_COMMAND, buf);
<     if ((rc != 0) || ((rec[0] << 8) + rec[1] != 0x0a)) {
<          printk("sr_photocd: ioctl error (SONY): 0x%x\n",rc);
<          break;
<     }
<     sector = rec[11] + (rec[10] << 8) + (rec[9] << 16) + (rec[8] << 24);
<     is_xa = !!sector;
< #ifdef DEBUG
<     if (sector)
<         printk ("sr_photocd: multisession CD detected. start: %lu\n",sector);
< #endif
<     break;
<
481c456
< /*  case SCSI_MAN_UNKNOWN: */
---
>   case SCSI_MAN_UNKNOWN:
# ----------- scsi.h -------------------
285d284
< #define SCSI_MAN_SONY        4

----------------------------------------------------
See Petals' new web page at http://www.girlswear.com
        for Pretty little girls wearing
      distinctive clothing and accessories

home help back first fref pref prev next nref lref last post