Lines Matching refs:cd
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()
95 cd->cdi.mask |= CDC_MULTI_SESSION; in sr_vendor_init()
98 cd->vendor = VENDOR_TOSHIBA; 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()
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()
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()
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()
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()