* vendor-specific code for SCSI CD-ROM's goes here. * * This is needed becauce most of the new features (multisession and * the like) are too new to be included into the SCSI-II standard (to * be exact: there is'nt anything in my draft copy). * * Aug 1997: Ha! Got a SCSI-3 cdrom spec across my fingers. SCSI-3 does * multisession using the READ TOC command (like SONY). * * Rearranged stuff here: SCSI-3 is included allways, support * for NEC/TOSHIBA/HP commands is optional. * * Gerd Knorr <kraxel@cs.tu-berlin.de> * * -------------------------------------------------------------------------- * * support for XA/multisession-CD's * * - NEC: Detection and support of multisession CD's. * * - TOSHIBA: Detection and support of multisession CD's. * Some XA-Sector tweaking, required for older drives. * * - SONY: Detection and support of multisession CD's. * added by Thomas Quinot <thomas@cuivre.freenix.fr> * * - PIONEER, HITACHI, PLEXTOR, MATSHITA, TEAC, PHILIPS: known to * work with SONY (SCSI3 now) code. * * - HP: Much like SONY, but a little different... (Thomas) * HP-Writers only ??? Maybe other CD-Writers work with this too ? * HP 6020 writers now supported.
*/
/* default */
cd->vendor = VENDOR_SCSI3; if (cd->readcd_known) /* this is true for scsi3/mmc drives - no more checks */ return;
if (cd->device->type == TYPE_WORM) {
cd->vendor = VENDOR_WRITER;
} elseif (!strncmp(vendor, "NEC", 3)) {
cd->vendor = VENDOR_NEC; if (!strncmp(model, "CD-ROM DRIVE:25", 15) ||
!strncmp(model, "CD-ROM DRIVE:36", 15) ||
!strncmp(model, "CD-ROM DRIVE:83", 15) ||
!strncmp(model, "CD-ROM DRIVE:84 ", 16) #if 0 /* my NEC 3x returns the read-raw data if a read-raw
is followed by a read for the same sector - aeb */
|| !strncmp(model, "CD-ROM DRIVE:500", 16) #endif
) /* these can't handle multisession, may hang */
cd->cdi.mask |= CDC_MULTI_SESSION;
} elseif (!strncmp(vendor, "Beurer", 6) &&
!strncmp(model, "Gluco Memory", 12)) { /* The Beurer GL50 evo uses a Cygnal-manufactured CD-on-a-chip that only accepts a subset of SCSI commands. Most of the not-implemented commands are fine to fail, but a few, particularly around the MMC or Audio commands, will put the device into an unrecoverable state, so they need to be avoided at all costs.
*/
cd->vendor = VENDOR_CYGNAL_85ED;
cd->cdi.mask |= (
CDC_MULTI_SESSION |
CDC_CLOSE_TRAY | CDC_OPEN_TRAY |
CDC_LOCK |
CDC_GENERIC_PACKET |
CDC_PLAY_AUDIO
);
}
}
/* small handy function for switching block length using MODE SELECT,
* used by sr_read_sector() */
int sr_set_blocklength(Scsi_CD *cd, int blocklength)
{ unsignedchar *buffer; /* the buffer for the ioctl */ struct packet_command cgc; struct ccs_modesel_head *modesel; int rc, density = 0;
if (cd->vendor == VENDOR_TOSHIBA)
density = (blocklength > 2048) ? 0x81 : 0x83;
buffer = kmalloc(512, GFP_KERNEL); if (!buffer) return -ENOMEM;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.