Lines Matching full:cd
4 * vendor-specific code for SCSI CD-ROM's goes here.
20 * support for XA/multisession-CD's
22 * - NEC: Detection and support of multisession CD's.
24 * - TOSHIBA: Detection and support of multisession CD's.
27 * - SONY: Detection and support of multisession CD's.
34 * HP-Writers only ??? Maybe other CD-Writers work with this too ?
64 #define VENDOR_CYGNAL_85ED 5 /* CD-on-a-chip */
68 void sr_vendor_init(Scsi_CD *cd) in sr_vendor_init() argument
70 const char *vendor = cd->device->vendor; in sr_vendor_init()
71 const char *model = cd->device->model; in sr_vendor_init()
74 cd->vendor = VENDOR_SCSI3; in sr_vendor_init()
75 if (cd->readcd_known) in sr_vendor_init()
79 if (cd->device->type == TYPE_WORM) { in sr_vendor_init()
80 cd->vendor = VENDOR_WRITER; in sr_vendor_init()
83 cd->vendor = VENDOR_NEC; in sr_vendor_init()
84 if (!strncmp(model, "CD-ROM DRIVE:25", 15) || in sr_vendor_init()
85 !strncmp(model, "CD-ROM DRIVE:36", 15) || in sr_vendor_init()
86 !strncmp(model, "CD-ROM DRIVE:83", 15) || in sr_vendor_init()
87 !strncmp(model, "CD-ROM DRIVE:84 ", 16) in sr_vendor_init()
91 || !strncmp(model, "CD-ROM DRIVE:500", 16) in sr_vendor_init()
95 cd->cdi.mask |= CDC_MULTI_SESSION; in sr_vendor_init()
98 cd->vendor = VENDOR_TOSHIBA; in sr_vendor_init()
102 /* The Beurer GL50 evo uses a Cygnal-manufactured CD-on-a-chip in sr_vendor_init()
109 cd->vendor = VENDOR_CYGNAL_85ED; in sr_vendor_init()
110 cd->cdi.mask |= ( in sr_vendor_init()
124 int sr_set_blocklength(Scsi_CD *cd, int blocklength) in sr_set_blocklength() argument
131 if (cd->vendor == VENDOR_TOSHIBA) in sr_set_blocklength()
139 sr_printk(KERN_INFO, cd, "MODE SELECT 0x%x/%d\n", density, blocklength); in sr_set_blocklength()
155 if (0 == (rc = sr_do_ioctl(cd, &cgc))) { in sr_set_blocklength()
156 cd->device->sector_size = blocklength; in sr_set_blocklength()
160 sr_printk(KERN_INFO, cd, in sr_set_blocklength()
168 /* This function gets called after a media change. Checks if the CD is
173 Scsi_CD *cd = cdi->handle; in sr_cd_check() local
179 if (cd->cdi.mask & CDC_MULTI_SESSION) in sr_cd_check()
192 switch (cd->vendor) { in sr_cd_check()
203 rc = sr_do_ioctl(cd, &cgc); in sr_cd_check()
207 sr_printk(KERN_INFO, cd, "Hmm, seems the drive " in sr_cd_check()
208 "doesn't support multisession CD's\n"); in sr_cd_check()
230 rc = sr_do_ioctl(cd, &cgc); in sr_cd_check()
234 sr_printk(KERN_INFO, cd, "Hmm, seems the cdrom " in sr_cd_check()
235 "doesn't support multisession CD's\n"); in sr_cd_check()
250 /* we request some disc information (is it a XA-CD ?, in sr_cd_check()
259 rc = sr_do_ioctl(cd, &cgc); in sr_cd_check()
261 sr_printk(KERN_INFO, cd, "Hmm, seems the drive " in sr_cd_check()
262 "doesn't support multisession CD's\n"); in sr_cd_check()
274 sr_set_blocklength(cd, 2048); in sr_cd_check()
287 rc = sr_do_ioctl(cd, &cgc); in sr_cd_check()
292 sr_printk(KERN_WARNING, cd, in sr_cd_check()
305 rc = sr_do_ioctl(cd, &cgc); in sr_cd_check()
315 sr_printk(KERN_WARNING, cd, in sr_cd_check()
317 cd->vendor); in sr_cd_check()
322 cd->ms_offset = sector; in sr_cd_check()
323 cd->xa_flag = 0; in sr_cd_check()
324 if (CDS_AUDIO != sr_disk_status(cdi) && 1 == sr_is_xa(cd)) in sr_cd_check()
325 cd->xa_flag = 1; in sr_cd_check()
327 if (2048 != cd->device->sector_size) { in sr_cd_check()
328 sr_set_blocklength(cd, 2048); in sr_cd_check()
335 sr_printk(KERN_DEBUG, cd, "multisession offset=%lu\n", in sr_cd_check()