taglinefilesource code
D_S684drivers/block/sbpcd.c} D_S[NR_SBPCD];
D_S898drivers/block/sbpcd.cD_S[d].CD_changed=0xFF;
D_S1069drivers/block/sbpcd.cD_S[d].status_bits=0;
D_S1070drivers/block/sbpcd.cif (fam1_drive) D_S[d].status_bits=st|p_success;
D_S1073drivers/block/sbpcd.cif (st&p_caddin_old) D_S[d].status_bits |= p_door_closed|p_caddy_in;
D_S1074drivers/block/sbpcd.cif (st&p_spinning) D_S[d].status_bits |= p_spinning;
D_S1075drivers/block/sbpcd.cif (st&p_check) D_S[d].status_bits |= p_check;
D_S1076drivers/block/sbpcd.cif (st&p_success_old) D_S[d].status_bits |= p_success;
D_S1077drivers/block/sbpcd.cif (st&p_busy_old) D_S[d].status_bits |= p_busy_new;
D_S1078drivers/block/sbpcd.cif (st&p_disk_ok) D_S[d].status_bits |= p_disk_ok;
D_S1082drivers/block/sbpcd.cD_S[d].status_bits |= p_success;
D_S1083drivers/block/sbpcd.cif (st&p_caddin_old) D_S[d].status_bits |= p_disk_ok|p_caddy_in;
D_S1084drivers/block/sbpcd.cif (st&p_spinning) D_S[d].status_bits |= p_spinning;
D_S1085drivers/block/sbpcd.cif (st&p_check) D_S[d].status_bits |= p_check;
D_S1086drivers/block/sbpcd.cif (st&p_busy_old) D_S[d].status_bits |= p_busy_new;
D_S1087drivers/block/sbpcd.cif (st&p_lcs_door_closed) D_S[d].status_bits |= p_door_closed;
D_S1088drivers/block/sbpcd.cif (st&p_lcs_door_locked) D_S[d].status_bits |= p_door_locked;
D_S1092drivers/block/sbpcd.cD_S[d].status_bits |= p_success;
D_S1093drivers/block/sbpcd.cif (st&p2_check) D_S[d].status_bits |= p1_check;
D_S1094drivers/block/sbpcd.cif (st&p2_door_closed) D_S[d].status_bits |= p1_door_closed;
D_S1095drivers/block/sbpcd.cif (st&p2_disk_in) D_S[d].status_bits |= p1_disk_in;
D_S1096drivers/block/sbpcd.cif (st&p2_busy1) D_S[d].status_bits |= p1_busy;
D_S1097drivers/block/sbpcd.cif (st&p2_busy2) D_S[d].status_bits |= p1_busy;
D_S1098drivers/block/sbpcd.cif (st&p2_spinning) D_S[d].status_bits |= p1_spinning;
D_S1099drivers/block/sbpcd.cif (st&p2_door_locked) D_S[d].status_bits |= p1_door_locked;
D_S1100drivers/block/sbpcd.cif (st&p2_disk_ok) D_S[d].status_bits |= p1_disk_ok;
D_S1105drivers/block/sbpcd.cD_S[d].status_bits |= p_success;
D_S1106drivers/block/sbpcd.cif (st&p2_check) D_S[d].status_bits |= p1_check;
D_S1107drivers/block/sbpcd.cif (st&p2_door_closed) D_S[d].status_bits |= p1_door_closed;
D_S1108drivers/block/sbpcd.cif (st&p2_disk_in) D_S[d].status_bits |= p1_disk_in;
D_S1109drivers/block/sbpcd.cif (st&p2_busy1) D_S[d].status_bits |= p1_busy;
D_S1110drivers/block/sbpcd.cif (st&p2_busy2) D_S[d].status_bits |= p1_busy;
D_S1111drivers/block/sbpcd.cif (st&p2_spinning) D_S[d].status_bits |= p1_spinning;
D_S1112drivers/block/sbpcd.cif (st&p2_door_locked) D_S[d].status_bits |= p1_door_locked;
D_S1113drivers/block/sbpcd.cif (st&p2_disk_ok) D_S[d].status_bits |= p1_disk_ok;
D_S1126drivers/block/sbpcd.cD_S[d].n_bytes=1;
D_S1137drivers/block/sbpcd.cD_S[d].status_bits=p1_door_closed|p1_disk_in|p1_spinning|p1_disk_ok;
D_S1138drivers/block/sbpcd.celse if (D_S[d].error_state==6)
D_S1140drivers/block/sbpcd.cD_S[d].status_bits=p1_door_closed|p1_disk_in;
D_S1141drivers/block/sbpcd.celse if ((D_S[d].error_state!=2)||(D_S[d].b3!=0x3A)||(D_S[d].b4==0x00))
D_S1144drivers/block/sbpcd.cD_S[d].status_bits=p1_door_closed;
D_S1145drivers/block/sbpcd.cD_S[d].open_count=0;
D_S1147drivers/block/sbpcd.celse if (D_S[d].b4==0x01)
D_S1150drivers/block/sbpcd.cD_S[d].status_bits=0;
D_S1151drivers/block/sbpcd.cD_S[d].open_count=0;
D_S1156drivers/block/sbpcd.cD_S[d].status_bits=p1_door_closed;
D_S1157drivers/block/sbpcd.cD_S[d].open_count=0;
D_S1159drivers/block/sbpcd.cmsg(DBG_TE2,"get_state_T done (%02X)...\n", D_S[d].status_bits);
D_S1160drivers/block/sbpcd.creturn (D_S[d].status_bits);
D_S1208drivers/block/sbpcd.cD_S[d].status_bits=0;
D_S1217drivers/block/sbpcd.cmsg(DBG_STA,"status_bits=%02X, i=%02X\n",D_S[d].status_bits,i);
D_S1219drivers/block/sbpcd.creturn (D_S[d].status_bits);
D_S1272drivers/block/sbpcd.cD_S[d].error_byte=0;
D_S1277drivers/block/sbpcd.cD_S[d].error_byte=infobuf[i];
D_S1278drivers/block/sbpcd.cmsg(DBG_ERR,"cc_ReadError: infobuf[%d] is %d (%02X)\n",i,D_S[d].error_byte,D_S[d].error_byte);
D_S1291drivers/block/sbpcd.cD_S[d].error_state=0;
D_S1292drivers/block/sbpcd.cD_S[d].b3=0;
D_S1293drivers/block/sbpcd.cD_S[d].b4=0;
D_S1294drivers/block/sbpcd.cD_S[d].f_drv_error=0;
D_S1300drivers/block/sbpcd.cOUT(CDo_enable,D_S[d].drv_sel);
D_S1379drivers/block/sbpcd.cD_S[d].error_state=infobuf[2];
D_S1380drivers/block/sbpcd.cD_S[d].b3=infobuf[3];
D_S1381drivers/block/sbpcd.cD_S[d].b4=infobuf[4];
D_S1382drivers/block/sbpcd.cif (D_S[d].f_drv_error)
D_S1384drivers/block/sbpcd.cD_S[d].f_drv_error=0;
D_S1386drivers/block/sbpcd.cD_S[d].error_state=2;
D_S1388drivers/block/sbpcd.creturn (-D_S[d].error_state-400);
D_S1395drivers/block/sbpcd.cD_S[d].f_drv_error=1;
D_S1397drivers/block/sbpcd.cD_S[d].error_state=2;
D_S1429drivers/block/sbpcd.cif (D_S[d].in_SpinUp) msg(DBG_SPI,"in_SpinUp: to CDi_stat_loop.\n");
D_S1438drivers/block/sbpcd.cif (D_S[d].in_SpinUp) msg(DBG_SPI,"in_SpinUp: to cc_ReadStatus.\n");
D_S1444drivers/block/sbpcd.cif (D_S[d].in_SpinUp) msg(DBG_SPI,"in_SpinUp: to ResponseStatus.\n");
D_S1460drivers/block/sbpcd.cif (D_S[d].in_SpinUp) msg(DBG_SPI,"in_SpinUp: to cc_ReadError.\n");
D_S1462drivers/block/sbpcd.cif (D_S[d].in_SpinUp) msg(DBG_SPI,"in_SpinUp: to cmd_out OK.\n");
D_S1513drivers/block/sbpcd.cD_S[d].n_bytes=1;
D_S1525drivers/block/sbpcd.cD_S[d].in_SpinUp = 1;
D_S1551drivers/block/sbpcd.cD_S[d].in_SpinUp = 0;
D_S1607drivers/block/sbpcd.cdrvcmd[1]=D_S[d].speed_byte;
D_S1608drivers/block/sbpcd.cdrvcmd[2]=D_S[d].frmsiz>>8;
D_S1609drivers/block/sbpcd.cdrvcmd[3]=D_S[d].frmsiz&0x0FF;
D_S1610drivers/block/sbpcd.cdrvcmd[4]=D_S[d].f_XA; /* 1: XA */
D_S1611drivers/block/sbpcd.cdrvcmd[5]=D_S[d].type_byte; /* 0, 1, 3 */
D_S1612drivers/block/sbpcd.cdrvcmd[6]=D_S[d].mode_xb_6;
D_S1613drivers/block/sbpcd.cdrvcmd[7]=D_S[d].mode_yb_7|D_S[d].volume_control;
D_S1614drivers/block/sbpcd.cdrvcmd[8]=D_S[d].mode_xb_8;
D_S1615drivers/block/sbpcd.cdrvcmd[9]=D_S[d].delay;
D_S1630drivers/block/sbpcd.cD_S[d].speed_byte=0x02; /* 0x02: auto quad, 0x82: quad, 0x81: double, 0x80: single */
D_S1631drivers/block/sbpcd.cD_S[d].frmsiz=make16(infobuf[2],infobuf[3]);
D_S1632drivers/block/sbpcd.cD_S[d].f_XA=infobuf[4];
D_S1633drivers/block/sbpcd.cif (D_S[d].f_XA==0) D_S[d].type_byte=0;
D_S1634drivers/block/sbpcd.celse D_S[d].type_byte=1;
D_S1635drivers/block/sbpcd.cD_S[d].mode_xb_6=infobuf[6];
D_S1636drivers/block/sbpcd.cD_S[d].mode_yb_7=1;
D_S1637drivers/block/sbpcd.cD_S[d].mode_xb_8=infobuf[8];
D_S1638drivers/block/sbpcd.cD_S[d].delay=0; /* 0, 1, 2, 3 */
D_S1693drivers/block/sbpcd.cD_S[d].diskstate_flags &= ~volume_bit;
D_S1695drivers/block/sbpcd.cchannel0=D_S[d].vol_chan0;
D_S1696drivers/block/sbpcd.cvolume0=D_S[d].vol_ctrl0;
D_S1697drivers/block/sbpcd.cchannel1=control1=D_S[d].vol_chan1;
D_S1698drivers/block/sbpcd.cvolume1=value1=D_S[d].vol_ctrl1;
D_S1701drivers/block/sbpcd.cif (((D_S[d].drv_options&audio_mono)!=0)&&(D_S[d].drv_type>=drv_211))
D_S1770drivers/block/sbpcd.cif (D_S[d].drv_type>=drv_300)
D_S1782drivers/block/sbpcd.cif (D_S[d].drv_type<drv_211)
D_S1815drivers/block/sbpcd.celse if (D_S[d].drv_type<drv_201) volume0=volume1=value0;
D_S1817drivers/block/sbpcd.cif (D_S[d].drv_type>=drv_201)
D_S1822drivers/block/sbpcd.cif (D_S[d].drv_type>=drv_211)
D_S1836drivers/block/sbpcd.cD_S[d].volume_control=0;
D_S1837drivers/block/sbpcd.cif (!volume0) D_S[d].volume_control|=0x10;
D_S1838drivers/block/sbpcd.cif (!volume1) D_S[d].volume_control|=0x20;
D_S1848drivers/block/sbpcd.cD_S[d].diskstate_flags |= volume_bit;
D_S1888drivers/block/sbpcd.cOUT(CDo_enable,D_S[d].drv_sel);
D_S1905drivers/block/sbpcd.cif (D_S[d].error_byte!=aud_12) return -501;
D_S1913drivers/block/sbpcd.cif (!(D_S[d].drv_options&(speed_auto|speed_300|speed_150))) return (0);
D_S1915drivers/block/sbpcd.cif (!(D_S[d].drv_options&speed_auto))
D_S1918drivers/block/sbpcd.cif (!(D_S[d].drv_options&speed_300)) speed=0;
D_S1939drivers/block/sbpcd.cD_S[d].CD_changed=1;
D_S1953drivers/block/sbpcd.cif (D_S[d].audio_state==audio_playing) return (-EINVAL);
D_S2038drivers/block/sbpcd.cif (pau_res==3)  return (cc_PlayAudio(D_S[d].pos_audio_start,D_S[d].pos_audio_end));
D_S2173drivers/block/sbpcd.cD_S[d].diskstate_flags &= ~subq_bit;
D_S2222drivers/block/sbpcd.cD_S[d].SubQ_ctl_adr=D_S[d].SubQ_trk=D_S[d].SubQ_pnt_idx=D_S[d].SubQ_whatisthis=0;
D_S2223drivers/block/sbpcd.cD_S[d].SubQ_run_tot=D_S[d].SubQ_run_trk=0;
D_S2227drivers/block/sbpcd.cif (famT_drive) D_S[d].SubQ_ctl_adr=infobuf[1];
D_S2228drivers/block/sbpcd.celse D_S[d].SubQ_ctl_adr=swap_nibbles(infobuf[1]);
D_S2229drivers/block/sbpcd.cD_S[d].SubQ_trk=byt2bcd(infobuf[2]);
D_S2230drivers/block/sbpcd.cD_S[d].SubQ_pnt_idx=byt2bcd(infobuf[3]);
D_S2234drivers/block/sbpcd.cD_S[d].SubQ_run_tot=make32(make16(0,infobuf[i]),make16(infobuf[i+1],infobuf[i+2])); /* msf-bin */
D_S2239drivers/block/sbpcd.cD_S[d].SubQ_run_trk=make32(make16(0,infobuf[i]),make16(infobuf[i+1],infobuf[i+2])); /* msf-bin */
D_S2240drivers/block/sbpcd.cD_S[d].SubQ_whatisthis=infobuf[i+3];
D_S2241drivers/block/sbpcd.cD_S[d].diskstate_flags |= subq_bit;
D_S2250drivers/block/sbpcd.cD_S[d].diskstate_flags &= ~frame_size_bit;
D_S2274drivers/block/sbpcd.cD_S[d].sense_byte=0;
D_S2275drivers/block/sbpcd.cif (fam1_drive) D_S[d].sense_byte=infobuf[i++];
D_S2278drivers/block/sbpcd.cif (infobuf[4]==0x01) D_S[d].xa_byte=0x20;
D_S2279drivers/block/sbpcd.celse D_S[d].xa_byte=0;
D_S2282drivers/block/sbpcd.cD_S[d].frame_size=make16(infobuf[i],infobuf[i+1]);
D_S2288drivers/block/sbpcd.cD_S[d].diskstate_flags |= frame_size_bit;
D_S2298drivers/block/sbpcd.cD_S[d].diskstate_flags &= ~frame_size_bit;
D_S2300drivers/block/sbpcd.cD_S[d].frame_size=framesize;
D_S2301drivers/block/sbpcd.cif (framesize==CD_FRAMESIZE_RAW) D_S[d].sense_byte=0x82;
D_S2302drivers/block/sbpcd.celse D_S[d].sense_byte=0x00;
D_S2305drivers/block/sbpcd.cD_S[d].sense_byte, D_S[d].frame_size);
D_S2311drivers/block/sbpcd.cdrvcmd[2]=D_S[d].sense_byte;
D_S2312drivers/block/sbpcd.cdrvcmd[3]=(D_S[d].frame_size>>8)&0xFF;
D_S2313drivers/block/sbpcd.cdrvcmd[4]=D_S[d].frame_size&0xFF;
D_S2320drivers/block/sbpcd.cdrvcmd[2]=(D_S[d].frame_size>>8)&0xFF;
D_S2321drivers/block/sbpcd.cdrvcmd[3]=D_S[d].frame_size&0xFF;
D_S2335drivers/block/sbpcd.cD_S[d].diskstate_flags |= frame_size_bit;
D_S2348drivers/block/sbpcd.cD_S[d].diskstate_flags &= ~volume_bit;
D_S2424drivers/block/sbpcd.cif (D_S[d].drv_type>=drv_201)
D_S2426drivers/block/sbpcd.cif (D_S[d].drv_type<drv_300)
D_S2431drivers/block/sbpcd.cif (D_S[d].drv_type>=drv_211)
D_S2451drivers/block/sbpcd.cD_S[d].volume_control=infobuf[7];
D_S2454drivers/block/sbpcd.cif (D_S[d].volume_control&0x10) vol0=0;
D_S2456drivers/block/sbpcd.cif (D_S[d].volume_control&0x20) vol1=0;
D_S2459drivers/block/sbpcd.cD_S[d].vol_chan0=chan0;
D_S2460drivers/block/sbpcd.cD_S[d].vol_ctrl0=vol0;
D_S2461drivers/block/sbpcd.cD_S[d].vol_chan1=chan1;
D_S2462drivers/block/sbpcd.cD_S[d].vol_ctrl1=vol1;
D_S2464drivers/block/sbpcd.cD_S[d].vol_chan2=2;
D_S2465drivers/block/sbpcd.cD_S[d].vol_ctrl2=0xFF;
D_S2466drivers/block/sbpcd.cD_S[d].vol_chan3=3;
D_S2467drivers/block/sbpcd.cD_S[d].vol_ctrl3=0xFF;
D_S2469drivers/block/sbpcd.cD_S[d].diskstate_flags |= volume_bit;
D_S2479drivers/block/sbpcd.cD_S[d].diskstate_flags &= ~cd_size_bit;
D_S2507drivers/block/sbpcd.cif (fam1_drive) D_S[d].CDsize_frm=msf2blk(make32(make16(0,infobuf[0]),make16(infobuf[1],infobuf[2])))+CD_MSF_OFFSET;
D_S2508drivers/block/sbpcd.celse if (fam0_drive) D_S[d].CDsize_frm=make32(make16(0,infobuf[0]),make16(infobuf[1],infobuf[2]));
D_S2509drivers/block/sbpcd.celse if (fam2_drive) D_S[d].CDsize_frm=make32(make16(infobuf[0],infobuf[1]),make16(infobuf[2],infobuf[3]));
D_S2510drivers/block/sbpcd.cD_S[d].diskstate_flags |= cd_size_bit;
D_S2511drivers/block/sbpcd.cmsg(DBG_000,"cc_ReadCapacity: %d frames.\n", D_S[d].CDsize_frm);
D_S2519drivers/block/sbpcd.cD_S[d].diskstate_flags &= ~toc_bit;
D_S2539drivers/block/sbpcd.cD_S[d].f_multisession=0;
D_S2549drivers/block/sbpcd.cD_S[d].f_multisession=0;
D_S2560drivers/block/sbpcd.cD_S[d].xa_byte=infobuf[0];
D_S2563drivers/block/sbpcd.cD_S[d].first_session=infobuf[1];
D_S2564drivers/block/sbpcd.cD_S[d].last_session=infobuf[2];
D_S2565drivers/block/sbpcd.cD_S[d].n_first_track=infobuf[3];
D_S2566drivers/block/sbpcd.cD_S[d].n_last_track=infobuf[4];
D_S2567drivers/block/sbpcd.cif (D_S[d].first_session!=D_S[d].last_session)
D_S2569drivers/block/sbpcd.cD_S[d].f_multisession=1;
D_S2570drivers/block/sbpcd.cD_S[d].lba_multi=msf2blk(make32(make16(0,infobuf[5]),make16(infobuf[6],infobuf[7])));
D_S2573drivers/block/sbpcd.cif (D_S[d].first_session!=D_S[d].last_session)
D_S2575drivers/block/sbpcd.cif (D_S[d].last_session<=20)
D_S2576drivers/block/sbpcd.czwanzig=D_S[d].last_session+1;
D_S2578drivers/block/sbpcd.cfor (count=D_S[d].first_session;count<zwanzig;count++)
D_S2588drivers/block/sbpcd.cD_S[d].msf_multi_n[count]=make32(make16(0,infobuf[5]),make16(infobuf[6],infobuf[7]));
D_S2590drivers/block/sbpcd.cD_S[d].diskstate_flags |= multisession_bit;
D_S2601drivers/block/sbpcd.cD_S[d].size_msf=make32(make16(0,infobuf[2]),make16(infobuf[3],infobuf[4]));
D_S2602drivers/block/sbpcd.cD_S[d].size_blk=msf2blk(D_S[d].size_msf);
D_S2606drivers/block/sbpcd.cD_S[d].size_msf=make32(make16(infobuf[8],infobuf[9]),make16(infobuf[10],infobuf[11]));
D_S2607drivers/block/sbpcd.cD_S[d].size_blk=msf2blk(D_S[d].size_msf);
D_S2608drivers/block/sbpcd.cD_S[d].CDsize_frm=D_S[d].size_blk+1;
D_S2609drivers/block/sbpcd.cD_S[d].n_first_track=infobuf[2];
D_S2610drivers/block/sbpcd.cD_S[d].n_last_track=infobuf[3];
D_S2614drivers/block/sbpcd.cD_S[d].n_first_track=infobuf[1];
D_S2615drivers/block/sbpcd.cD_S[d].n_last_track=infobuf[2];
D_S2616drivers/block/sbpcd.cD_S[d].size_msf=make32(make16(0,infobuf[3]),make16(infobuf[4],infobuf[5]));
D_S2617drivers/block/sbpcd.cD_S[d].size_blk=msf2blk(D_S[d].size_msf);
D_S2618drivers/block/sbpcd.cif (famL_drive) D_S[d].CDsize_frm=D_S[d].size_blk+1;
D_S2620drivers/block/sbpcd.cD_S[d].diskstate_flags |= toc_bit;
D_S2622drivers/block/sbpcd.cD_S[d].xa_byte,
D_S2623drivers/block/sbpcd.cD_S[d].n_first_track,
D_S2624drivers/block/sbpcd.cD_S[d].n_last_track,
D_S2625drivers/block/sbpcd.cD_S[d].size_msf);
D_S2674drivers/block/sbpcd.cD_S[d].TocEnt_nixbyte=infobuf[0];
D_S2682drivers/block/sbpcd.cD_S[d].TocEnt_ctl_adr=swap_nibbles(infobuf[i++]);
D_S2685drivers/block/sbpcd.cD_S[d].TocEnt_number=infobuf[i++];
D_S2686drivers/block/sbpcd.cD_S[d].TocEnt_format=infobuf[i];
D_S2688drivers/block/sbpcd.celse D_S[d].TocEnt_number=num;
D_S2693drivers/block/sbpcd.cD_S[d].TocEnt_address=make32(make16(0,infobuf[i]),
D_S2696drivers/block/sbpcd.cD_S[d].TocEnt_nixbyte, D_S[d].TocEnt_ctl_adr,
D_S2697drivers/block/sbpcd.cD_S[d].TocEnt_number, D_S[d].TocEnt_format,
D_S2698drivers/block/sbpcd.cD_S[d].TocEnt_address);
D_S2729drivers/block/sbpcd.cif (fam1_drive) D_S[d].UPC_buf[i]=swap_nibbles(*p++);
D_S2732drivers/block/sbpcd.cD_S[d].UPC_buf[i]=((*p++)<<4)&0xFF;
D_S2733drivers/block/sbpcd.cD_S[d].UPC_buf[i] |= *p++;
D_S2744drivers/block/sbpcd.cD_S[d].UPC_buf[6] &= 0xF0;
D_S2761drivers/block/sbpcd.cD_S[d].diskstate_flags &= ~upc_bit;
D_S2830drivers/block/sbpcd.cD_S[d].UPC_ctl_adr=0;
D_S2836drivers/block/sbpcd.cD_S[d].UPC_ctl_adr = (D_S[d].TocEnt_ctl_adr & 0xF0) | 0x02;
D_S2839drivers/block/sbpcd.csprintf(&msgbuf[i*3], " %02X", D_S[d].UPC_buf[i]);
D_S2840drivers/block/sbpcd.csprintf(&msgbuf[i*3], " (%02X)", D_S[d].UPC_ctl_adr);
D_S2843drivers/block/sbpcd.cD_S[d].diskstate_flags |= upc_bit;
D_S2852drivers/block/sbpcd.cD_S[d].f_multisession=0;
D_S2853drivers/block/sbpcd.cD_S[d].lba_multi=0;
D_S2865drivers/block/sbpcd.cD_S[d].f_multisession=1;
D_S2866drivers/block/sbpcd.cD_S[d].lba_multi=msf2blk(make32(make16(0,infobuf[1]),
D_S2879drivers/block/sbpcd.cD_S[d].lba_multi=msf2blk(make32(make16(0,infobuf[5]),
D_S2892drivers/block/sbpcd.cD_S[d].first_session=infobuf[2];
D_S2893drivers/block/sbpcd.cD_S[d].last_session=infobuf[3];
D_S2894drivers/block/sbpcd.cD_S[d].track_of_last_session=infobuf[6];
D_S2895drivers/block/sbpcd.cif (D_S[d].first_session!=D_S[d].last_session)
D_S2897drivers/block/sbpcd.cD_S[d].f_multisession=1;
D_S2898drivers/block/sbpcd.cD_S[d].lba_multi=msf2blk(make32(make16(0,infobuf[9]),make16(infobuf[10],infobuf[11])));
D_S2904drivers/block/sbpcd.cmsg(DBG_MUL,"MultiSession Info:%s (%d)\n", msgbuf, D_S[d].lba_multi);
D_S2905drivers/block/sbpcd.cif (D_S[d].lba_multi>200)
D_S2907drivers/block/sbpcd.cD_S[d].f_multisession=1;
D_S2908drivers/block/sbpcd.cmsg(DBG_MUL,"MultiSession base: %06X\n", D_S[d].lba_multi);
D_S2925drivers/block/sbpcd.cif (D_S[d].audio_state!=audio_playing) return (-ENODATA);
D_S2936drivers/block/sbpcd.cD_S[d].frame_size=CD_FRAMESIZE_SUB;
D_S3019drivers/block/sbpcd.cCDo_command, type, D_S[d].drive_model, D_S[d].drv_id);
D_S3036drivers/block/sbpcd.cmsg(DBG_TE2,"check_version: id=%d, d=%d.\n", D_S[d].drv_id, d);
D_S3037drivers/block/sbpcd.cD_S[d].drv_type=0;
D_S3074drivers/block/sbpcd.cD_S[d].drive_model[0]='C';
D_S3075drivers/block/sbpcd.cD_S[d].drive_model[1]='R';
D_S3076drivers/block/sbpcd.cD_S[d].drive_model[2]='-';
D_S3077drivers/block/sbpcd.cD_S[d].drive_model[3]='5';
D_S3078drivers/block/sbpcd.cD_S[d].drive_model[4]=infobuf[i++];
D_S3079drivers/block/sbpcd.cD_S[d].drive_model[5]=infobuf[i++];
D_S3080drivers/block/sbpcd.cD_S[d].drive_model[6]=0;
D_S3081drivers/block/sbpcd.cD_S[d].drv_type=drv_fam1;
D_S3083drivers/block/sbpcd.cif (!D_S[d].drv_type)
D_S3088drivers/block/sbpcd.cD_S[d].drive_model[0]='C';
D_S3089drivers/block/sbpcd.cD_S[d].drive_model[1]='R';
D_S3090drivers/block/sbpcd.cD_S[d].drive_model[2]='-';
D_S3091drivers/block/sbpcd.cD_S[d].drive_model[3]='5';
D_S3092drivers/block/sbpcd.cD_S[d].drive_model[4]='2';
D_S3093drivers/block/sbpcd.cD_S[d].drive_model[5]='x';
D_S3094drivers/block/sbpcd.cD_S[d].drive_model[6]=0;
D_S3095drivers/block/sbpcd.cD_S[d].drv_type=drv_fam0;
D_S3098drivers/block/sbpcd.cif (!D_S[d].drv_type)
D_S3104drivers/block/sbpcd.cD_S[d].drive_model[j]=infobuf[j];
D_S3105drivers/block/sbpcd.cD_S[d].drive_model[8]=0;
D_S3106drivers/block/sbpcd.cD_S[d].drv_type=drv_famL;
D_S3109drivers/block/sbpcd.cif (!D_S[d].drv_type)
D_S3126drivers/block/sbpcd.cOUT(CDo_enable,D_S[d].drv_sel);
D_S3152drivers/block/sbpcd.cD_S[d].drive_model[0]='C';
D_S3153drivers/block/sbpcd.cD_S[d].drive_model[1]='D';
D_S3154drivers/block/sbpcd.cD_S[d].drive_model[2]='2';
D_S3155drivers/block/sbpcd.cD_S[d].drive_model[3]='0';
D_S3156drivers/block/sbpcd.cD_S[d].drive_model[4]='0';
D_S3157drivers/block/sbpcd.cD_S[d].drive_model[5]=infobuf[i++];
D_S3158drivers/block/sbpcd.cD_S[d].drive_model[6]=infobuf[i++];
D_S3159drivers/block/sbpcd.cD_S[d].drive_model[7]=0;
D_S3160drivers/block/sbpcd.cD_S[d].drv_type=drv_fam2;
D_S3164drivers/block/sbpcd.cif (!D_S[d].drv_type)
D_S3168drivers/block/sbpcd.cfor (j=1;j<=((D_S[d].drv_id==0)?3:1);j++)
D_S3170drivers/block/sbpcd.cfor (l=1;l<=((D_S[d].drv_id==0)?10:1);l++)
D_S3176drivers/block/sbpcd.cOUT(CDo_enable,D_S[d].drv_sel);
D_S3182drivers/block/sbpcd.cOUT(CDo_enable,D_S[d].drv_sel);
D_S3209drivers/block/sbpcd.cD_S[d].drive_model[0]='C';
D_S3210drivers/block/sbpcd.cD_S[d].drive_model[1]='D';
D_S3211drivers/block/sbpcd.cD_S[d].drive_model[2]='-';
D_S3212drivers/block/sbpcd.cD_S[d].drive_model[3]='5';
D_S3213drivers/block/sbpcd.cD_S[d].drive_model[4]='5';
D_S3214drivers/block/sbpcd.cD_S[d].drive_model[5]=0;
D_S3215drivers/block/sbpcd.cD_S[d].drv_type=drv_famT;
D_S3219drivers/block/sbpcd.cif (!D_S[d].drv_type)
D_S3221drivers/block/sbpcd.cmsg(DBG_TEA,"no drive found at address %03X under ID %d.\n",CDo_command,D_S[d].drv_id);
D_S3224drivers/block/sbpcd.cfor (j=0;j<4;j++) D_S[d].firmware_version[j]=infobuf[i+j];
D_S3231drivers/block/sbpcd.cif (D_S[d].firmware_version[j]!=lcs_firm_e1[j]) break;
D_S3232drivers/block/sbpcd.cif (j==4) D_S[d].drv_type=drv_e1;
D_S3235drivers/block/sbpcd.cif (D_S[d].firmware_version[j]!=lcs_firm_f4[j]) break;
D_S3236drivers/block/sbpcd.cif (j==4) D_S[d].drv_type=drv_f4;
D_S3238drivers/block/sbpcd.cif (D_S[d].drv_type==drv_famL) ask_mail();
D_S3245drivers/block/sbpcd.cD_S[d].firmware_version[0]=infobuf[7];
D_S3246drivers/block/sbpcd.cD_S[d].firmware_version[1]=infobuf[8];
D_S3247drivers/block/sbpcd.cD_S[d].firmware_version[2]=infobuf[10];
D_S3248drivers/block/sbpcd.cD_S[d].firmware_version[3]=infobuf[11];
D_S3253drivers/block/sbpcd.cD_S[d].firmware_version[0]='0';
D_S3254drivers/block/sbpcd.cD_S[d].firmware_version[1]='.';
D_S3255drivers/block/sbpcd.cD_S[d].firmware_version[2]='0'+(j>>4);
D_S3256drivers/block/sbpcd.cD_S[d].firmware_version[3]='0'+(j&0x0f);
D_S3261drivers/block/sbpcd.cj = (D_S[d].firmware_version[0] & 0x0F) * 100 +
D_S3262drivers/block/sbpcd.c(D_S[d].firmware_version[2] & 0x0F) *10 +
D_S3263drivers/block/sbpcd.c(D_S[d].firmware_version[3] & 0x0F);
D_S3266drivers/block/sbpcd.cif (j<200) D_S[d].drv_type=drv_199;
D_S3267drivers/block/sbpcd.celse if (j<201) D_S[d].drv_type=drv_200;
D_S3268drivers/block/sbpcd.celse if (j<210) D_S[d].drv_type=drv_201;
D_S3269drivers/block/sbpcd.celse if (j<211) D_S[d].drv_type=drv_210;
D_S3270drivers/block/sbpcd.celse if (j<300) D_S[d].drv_type=drv_211;
D_S3271drivers/block/sbpcd.celse if (j>=300) D_S[d].drv_type=drv_300;
D_S3275drivers/block/sbpcd.cif (j<100) D_S[d].drv_type=drv_099;
D_S3278drivers/block/sbpcd.cD_S[d].drv_type=drv_100;
D_S3284drivers/block/sbpcd.cmsg(DBG_INF,"new drive CD200 (%s)detected.\n", D_S[d].firmware_version);
D_S3289drivers/block/sbpcd.cmsg(DBG_LCS,"drive type %02X\n",D_S[d].drv_type);
D_S3297drivers/block/sbpcd.cOUT(CDo_enable,D_S[d].drv_sel);
D_S3298drivers/block/sbpcd.cmsg(DBG_DID,"drive %d (ID=%d) activated.\n", i, D_S[d].drv_id);
D_S3418drivers/block/sbpcd.cD_S[ndrives].drv_id=j;
D_S3419drivers/block/sbpcd.cif (sbpro_type==1) D_S[ndrives].drv_sel=(j&0x01)<<1|(j&0x02)>>1;
D_S3420drivers/block/sbpcd.celse D_S[ndrives].drv_sel=j;
D_S3428drivers/block/sbpcd.cD_S[d].drv_options=drv_pattern[j];
D_S3429drivers/block/sbpcd.cif (fam0L_drive) D_S[d].drv_options&=~(speed_auto|speed_300|speed_150);
D_S3432drivers/block/sbpcd.cD_S[d].drv_id,
D_S3433drivers/block/sbpcd.cD_S[d].drive_model,
D_S3434drivers/block/sbpcd.cD_S[d].firmware_version,
D_S3440drivers/block/sbpcd.cfor (j=ndrives;j<NR_SBPCD;j++) D_S[j].drv_id=-1;
D_S3570drivers/block/sbpcd.ci=msf2blk(D_S[d].pos_audio_end)-1;
D_S3580drivers/block/sbpcd.cD_S[d].diskstate_flags &= ~toc_bit;
D_S3581drivers/block/sbpcd.cD_S[d].ored_ctl_adr=0;
D_S3582drivers/block/sbpcd.cfor (j=D_S[d].n_first_track;j<=D_S[d].n_last_track;j++)
D_S3590drivers/block/sbpcd.cD_S[d].TocBuffer[j].nixbyte=D_S[d].TocEnt_nixbyte;
D_S3591drivers/block/sbpcd.cD_S[d].TocBuffer[j].ctl_adr=D_S[d].TocEnt_ctl_adr;
D_S3592drivers/block/sbpcd.cD_S[d].TocBuffer[j].number=D_S[d].TocEnt_number;
D_S3593drivers/block/sbpcd.cD_S[d].TocBuffer[j].format=D_S[d].TocEnt_format;
D_S3594drivers/block/sbpcd.cD_S[d].TocBuffer[j].address=D_S[d].TocEnt_address;
D_S3595drivers/block/sbpcd.cD_S[d].ored_ctl_adr |= D_S[d].TocEnt_ctl_adr;
D_S3598drivers/block/sbpcd.cD_S[d].TocBuffer[j].nixbyte=0;
D_S3599drivers/block/sbpcd.cD_S[d].TocBuffer[j].ctl_adr=0;
D_S3600drivers/block/sbpcd.cD_S[d].TocBuffer[j].number=CDROM_LEADOUT;
D_S3601drivers/block/sbpcd.cD_S[d].TocBuffer[j].format=0;
D_S3602drivers/block/sbpcd.cD_S[d].TocBuffer[j].address=D_S[d].size_msf;
D_S3604drivers/block/sbpcd.cD_S[d].diskstate_flags |= toc_bit;
D_S3612drivers/block/sbpcd.cD_S[d].mode=READ_M1;
D_S3657drivers/block/sbpcd.cif (D_S[d].f_multisession) D_S[d].sbp_bufsiz=1;  /* possibly a weird PhotoCD */
D_S3658drivers/block/sbpcd.celse D_S[d].sbp_bufsiz=SBP_BUFFER_FRAMES;
D_S3659drivers/block/sbpcd.ci=cc_ReadTocEntry(D_S[d].n_first_track);
D_S3667drivers/block/sbpcd.cif ((fam0L_drive) && (D_S[d].xa_byte==0x20))
D_S3695drivers/block/sbpcd.cif (D_S[d].CD_changed==0xFF)
D_S3697drivers/block/sbpcd.cD_S[d].diskstate_flags=0;
D_S3698drivers/block/sbpcd.cD_S[d].audio_state=0;
D_S3709drivers/block/sbpcd.cD_S[d].CD_changed=1;
D_S3718drivers/block/sbpcd.cD_S[d].diskstate_flags=0;
D_S3719drivers/block/sbpcd.cD_S[d].audio_state=0;
D_S3727drivers/block/sbpcd.cif (D_S[d].audio_state!=audio_pausing)
D_S3735drivers/block/sbpcd.cif (D_S[d].audio_state==audio_playing) seek_pos_audio_end();
D_S3736drivers/block/sbpcd.cD_S[d].audio_state=0;
D_S3743drivers/block/sbpcd.cD_S[d].diskstate_flags=0;
D_S3744drivers/block/sbpcd.cD_S[d].audio_state=0;
D_S3815drivers/block/sbpcd.cif ((i<0) || (i>=NR_SBPCD) || (D_S[i].drv_id==-1))
D_S3847drivers/block/sbpcd.cswitch (D_S[d].audio_state)
D_S3856drivers/block/sbpcd.cD_S[d].pos_audio_start=D_S[d].SubQ_run_tot;
D_S3857drivers/block/sbpcd.cD_S[d].audio_state=audio_pausing;
D_S3860drivers/block/sbpcd.ci=cc_Seek(D_S[d].pos_audio_start,1);
D_S3872drivers/block/sbpcd.cif (D_S[d].audio_state!=audio_pausing) return -EINVAL;
D_S3874drivers/block/sbpcd.ci=cc_PlayAudio(D_S[d].pos_audio_start,
D_S3875drivers/block/sbpcd.cD_S[d].pos_audio_end);
D_S3878drivers/block/sbpcd.cD_S[d].audio_state=audio_playing;
D_S3883drivers/block/sbpcd.cif (D_S[d].audio_state==audio_playing)
D_S3889drivers/block/sbpcd.cD_S[d].pos_audio_start=D_S[d].SubQ_run_tot;
D_S3890drivers/block/sbpcd.ci=cc_Seek(D_S[d].pos_audio_start,1);
D_S3896drivers/block/sbpcd.cD_S[d].pos_audio_start = (msf.cdmsf_min0<<16) |
D_S3899drivers/block/sbpcd.cD_S[d].pos_audio_end = (msf.cdmsf_min1<<16) |
D_S3903drivers/block/sbpcd.cD_S[d].pos_audio_start,D_S[d].pos_audio_end);
D_S3904drivers/block/sbpcd.ci=cc_PlayAudio(D_S[d].pos_audio_start,D_S[d].pos_audio_end);
D_S3909drivers/block/sbpcd.cD_S[d].audio_state=audio_playing;
D_S3914drivers/block/sbpcd.cif (D_S[d].audio_state==audio_playing)
D_S3929drivers/block/sbpcd.cif (ti.cdti_trk0<D_S[d].n_first_track) return (-EINVAL);
D_S3930drivers/block/sbpcd.cif (ti.cdti_trk0>D_S[d].n_last_track) return (-EINVAL);
D_S3932drivers/block/sbpcd.cif (ti.cdti_trk1>D_S[d].n_last_track) ti.cdti_trk1=D_S[d].n_last_track;
D_S3933drivers/block/sbpcd.cD_S[d].pos_audio_start=D_S[d].TocBuffer[ti.cdti_trk0].address;
D_S3934drivers/block/sbpcd.cD_S[d].pos_audio_end=D_S[d].TocBuffer[ti.cdti_trk1+1].address;
D_S3935drivers/block/sbpcd.ci=cc_PlayAudio(D_S[d].pos_audio_start,D_S[d].pos_audio_end);
D_S3939drivers/block/sbpcd.cD_S[d].audio_state=audio_playing;
D_S3944drivers/block/sbpcd.ctochdr.cdth_trk0=D_S[d].n_first_track;
D_S3945drivers/block/sbpcd.ctochdr.cdth_trk1=D_S[d].n_last_track;
D_S3957drivers/block/sbpcd.cif (i==CDROM_LEADOUT) i=D_S[d].n_last_track+1;
D_S3958drivers/block/sbpcd.celse if (i<D_S[d].n_first_track||i>D_S[d].n_last_track) return (-EINVAL);
D_S3959drivers/block/sbpcd.ctocentry.cdte_adr=D_S[d].TocBuffer[i].ctl_adr&0x0F;
D_S3960drivers/block/sbpcd.ctocentry.cdte_ctrl=(D_S[d].TocBuffer[i].ctl_adr>>4)&0x0F;
D_S3961drivers/block/sbpcd.ctocentry.cdte_datamode=D_S[d].TocBuffer[i].format;
D_S3964drivers/block/sbpcd.ctocentry.cdte_addr.msf.minute=(D_S[d].TocBuffer[i].address>>16)&0x00FF;
D_S3965drivers/block/sbpcd.ctocentry.cdte_addr.msf.second=(D_S[d].TocBuffer[i].address>>8)&0x00FF;
D_S3966drivers/block/sbpcd.ctocentry.cdte_addr.msf.frame=D_S[d].TocBuffer[i].address&0x00FF;
D_S3969drivers/block/sbpcd.ctocentry.cdte_addr.lba=msf2blk(D_S[d].TocBuffer[i].address);
D_S3979drivers/block/sbpcd.cD_S[d].audio_state=0;
D_S3985drivers/block/sbpcd.cD_S[d].audio_state=0;
D_S3991drivers/block/sbpcd.cD_S[d].audio_state=0;
D_S3997drivers/block/sbpcd.cif (D_S[d].open_count>1) return (-EBUSY);
D_S3999drivers/block/sbpcd.cD_S[d].open_count=-9; /* to get it locked next time again */
D_S4004drivers/block/sbpcd.cD_S[d].CD_changed=0xFF;
D_S4005drivers/block/sbpcd.cD_S[d].diskstate_flags=0;
D_S4006drivers/block/sbpcd.cD_S[d].audio_state=0;
D_S4012drivers/block/sbpcd.cD_S[d].f_eject=arg;
D_S4020drivers/block/sbpcd.cD_S[d].vol_chan0=0;
D_S4021drivers/block/sbpcd.cD_S[d].vol_ctrl0=volctrl.channel0;
D_S4022drivers/block/sbpcd.cD_S[d].vol_chan1=1;
D_S4023drivers/block/sbpcd.cD_S[d].vol_ctrl1=volctrl.channel1;
D_S4033drivers/block/sbpcd.cvolctrl.channel0=D_S[d].vol_ctrl0;
D_S4034drivers/block/sbpcd.cvolctrl.channel1=D_S[d].vol_ctrl1;
D_S4050drivers/block/sbpcd.cswitch (D_S[d].audio_state)
D_S4062drivers/block/sbpcd.cSC.cdsc_adr=D_S[d].SubQ_ctl_adr;
D_S4063drivers/block/sbpcd.cSC.cdsc_ctrl=D_S[d].SubQ_ctl_adr>>4;
D_S4064drivers/block/sbpcd.cSC.cdsc_trk=bcd2bin(D_S[d].SubQ_trk);
D_S4065drivers/block/sbpcd.cSC.cdsc_ind=bcd2bin(D_S[d].SubQ_pnt_idx);
D_S4068drivers/block/sbpcd.cSC.cdsc_absaddr.lba=msf2blk(D_S[d].SubQ_run_tot);
D_S4069drivers/block/sbpcd.cSC.cdsc_reladdr.lba=msf2blk(D_S[d].SubQ_run_trk);
D_S4073drivers/block/sbpcd.cSC.cdsc_absaddr.msf.minute=(D_S[d].SubQ_run_tot>>16)&0x00FF;
D_S4074drivers/block/sbpcd.cSC.cdsc_absaddr.msf.second=(D_S[d].SubQ_run_tot>>8)&0x00FF;
D_S4075drivers/block/sbpcd.cSC.cdsc_absaddr.msf.frame=D_S[d].SubQ_run_tot&0x00FF;
D_S4076drivers/block/sbpcd.cSC.cdsc_reladdr.msf.minute=(D_S[d].SubQ_run_trk>>16)&0x00FF;
D_S4077drivers/block/sbpcd.cSC.cdsc_reladdr.msf.second=(D_S[d].SubQ_run_trk>>8)&0x00FF;
D_S4078drivers/block/sbpcd.cSC.cdsc_reladdr.msf.frame=D_S[d].SubQ_run_trk&0x00FF;
D_S4092drivers/block/sbpcd.cD_S[d].mode=READ_M1;
D_S4099drivers/block/sbpcd.cD_S[d].mode=READ_M2;
D_S4105drivers/block/sbpcd.cif (D_S[d].sbp_audsiz>0)
D_S4106drivers/block/sbpcd.cvfree(D_S[d].aud_buf);
D_S4108drivers/block/sbpcd.cD_S[d].aud_buf=NULL;
D_S4109drivers/block/sbpcd.cD_S[d].sbp_audsiz=arg;
D_S4110drivers/block/sbpcd.cif (D_S[d].sbp_audsiz>0)
D_S4112drivers/block/sbpcd.cD_S[d].aud_buf=(u_char *) vmalloc(D_S[d].sbp_audsiz*CD_FRAMESIZE_RAW);
D_S4113drivers/block/sbpcd.cif (D_S[d].aud_buf==NULL)
D_S4115drivers/block/sbpcd.cmsg(DBG_INF,"audio buffer (%d frames) not available.\n",D_S[d].sbp_audsiz);
D_S4116drivers/block/sbpcd.cD_S[d].sbp_audsiz=0;
D_S4118drivers/block/sbpcd.celse msg(DBG_INF,"audio buffer size: %d frames.\n",D_S[d].sbp_audsiz);
D_S4120drivers/block/sbpcd.creturn (D_S[d].sbp_audsiz);
D_S4139drivers/block/sbpcd.cif (D_S[d].aud_buf==NULL) return (-EINVAL);
D_S4143drivers/block/sbpcd.cif (read_audio.nframes>D_S[d].sbp_audsiz) return (-EINVAL);
D_S4164drivers/block/sbpcd.cD_S[d].mode=READ_AU;
D_S4245drivers/block/sbpcd.cp = D_S[d].aud_buf;
D_S4292drivers/block/sbpcd.cD_S[d].status_bits);
D_S4304drivers/block/sbpcd.c(u_char *) D_S[d].aud_buf,
D_S4311drivers/block/sbpcd.cD_S[d].mode=READ_M1;
D_S4328drivers/block/sbpcd.clba2msf(D_S[d].lba_multi,&ms_info.addr.msf.minute);
D_S4330drivers/block/sbpcd.cms_info.addr.lba=D_S[d].lba_multi;
D_S4332drivers/block/sbpcd.cif (D_S[d].f_multisession) ms_info.xa_flag=1; /* valid redirection address */
D_S4362drivers/block/sbpcd.c(CURRENT->sector/4 >= D_S[d].sbp_first_frame) &&
D_S4363drivers/block/sbpcd.c(CURRENT->sector/4 <= D_S[d].sbp_last_frame) )
D_S4365drivers/block/sbpcd.coffs = (CURRENT->sector - D_S[d].sbp_first_frame * 4) * 512;
D_S4366drivers/block/sbpcd.cmemcpy(CURRENT->buffer, D_S[d].sbp_buf + offs, 512);
D_S4394drivers/block/sbpcd.cif ( (i<0) || (i>=NR_SBPCD) || (D_S[i].drv_id==-1))
D_S4402drivers/block/sbpcd.cif (D_S[i].audio_state==audio_playing) goto err_done;
D_S4471drivers/block/sbpcd.cD_S[d].sbp_first_frame=D_S[d].sbp_last_frame=-1;      /* purge buffer */
D_S4472drivers/block/sbpcd.cD_S[d].sbp_current = 0;
D_S4474drivers/block/sbpcd.cif (block+D_S[d].sbp_bufsiz <= D_S[d].CDsize_frm)
D_S4475drivers/block/sbpcd.cD_S[d].sbp_read_frames = D_S[d].sbp_bufsiz;
D_S4478drivers/block/sbpcd.cD_S[d].sbp_read_frames=D_S[d].CDsize_frm-block;
D_S4480drivers/block/sbpcd.cif (D_S[d].sbp_read_frames < 1)
D_S4483drivers/block/sbpcd.cblock, D_S[d].CDsize_frm);
D_S4484drivers/block/sbpcd.cD_S[d].sbp_read_frames=1;
D_S4493drivers/block/sbpcd.cif (D_S[d].xa_byte==0x20)
D_S4500drivers/block/sbpcd.cdrvcmd[5]=D_S[d].sbp_read_frames;
D_S4505drivers/block/sbpcd.cif (D_S[d].drv_type>=drv_201)
D_S4518drivers/block/sbpcd.cdrvcmd[5]=D_S[d].sbp_read_frames;
D_S4519drivers/block/sbpcd.cdrvcmd[6]=(D_S[d].drv_type<drv_201)?0:2; /* flag "lba or msf-bcd format" */
D_S4526drivers/block/sbpcd.cdrvcmd[6]=D_S[d].sbp_read_frames;
D_S4532drivers/block/sbpcd.cdrvcmd[5]=D_S[d].sbp_read_frames;
D_S4542drivers/block/sbpcd.cdrvcmd[7]=(D_S[d].sbp_read_frames>>8)&0x0ff;
D_S4543drivers/block/sbpcd.cdrvcmd[8]=D_S[d].sbp_read_frames&0x0ff;
D_S4584drivers/block/sbpcd.cif (D_S[d].f_multisession) max_latency=9*HZ;
D_S4589drivers/block/sbpcd.cfor (frame=0;frame<D_S[d].sbp_read_frames&&!error_flag; frame++)
D_S4599drivers/block/sbpcd.cif (D_S[d].f_multisession) try=maxtim_data*4;
D_S4644drivers/block/sbpcd.cif ((D_S[d].ored_ctl_adr&0x40)==0)
D_S4653drivers/block/sbpcd.cp = D_S[d].sbp_buf + frame *  CD_FRAMESIZE;
D_S4659drivers/block/sbpcd.cD_S[d].sbp_current++;
D_S4730drivers/block/sbpcd.cD_S[d].error_state=infobuf[2];
D_S4731drivers/block/sbpcd.cD_S[d].b3=infobuf[3];
D_S4732drivers/block/sbpcd.cD_S[d].b4=infobuf[4];
D_S4802drivers/block/sbpcd.cmsg(DBG_INF,"bad cc_ReadStatus after read: %02X\n", D_S[d].status_bits);
D_S4816drivers/block/sbpcd.cD_S[d].sbp_first_frame=D_S[d].sbp_last_frame=-1;      /* purge buffer */
D_S4817drivers/block/sbpcd.cD_S[d].sbp_current = 0;
D_S4822drivers/block/sbpcd.cD_S[d].sbp_first_frame = CURRENT -> sector / 4;
D_S4823drivers/block/sbpcd.cD_S[d].sbp_last_frame = D_S[d].sbp_first_frame + D_S[d].sbp_read_frames - 1;
D_S4840drivers/block/sbpcd.cif ((i<0) || (i>=NR_SBPCD) || (D_S[i].drv_id==-1))
D_S4883drivers/block/sbpcd.cif (famT_drive)  msg(DBG_TE2,"sbpcd_open: status %02X\n", D_S[d].status_bits);
D_S4887drivers/block/sbpcd.cD_S[d].open_count=0;
D_S4902drivers/block/sbpcd.cD_S[d].open_count,D_S[d].open_count+1);
D_S4903drivers/block/sbpcd.cif (++D_S[d].open_count<=1)
D_S4906drivers/block/sbpcd.cD_S[d].open_count=1;
D_S4910drivers/block/sbpcd.cif ((D_S[d].ored_ctl_adr&0x40)==0)
D_S4925drivers/block/sbpcd.cif ((i<0) || (i>=NR_SBPCD) || (D_S[i].drv_id==-1))
D_S4932drivers/block/sbpcd.cD_S[d].sbp_first_frame=D_S[d].sbp_last_frame=-1;
D_S4941drivers/block/sbpcd.cD_S[d].open_count,D_S[d].open_count-1);
D_S4942drivers/block/sbpcd.cif (D_S[d].open_count>-2) /* CDROMEJECT may have been done */
D_S4944drivers/block/sbpcd.cif (--D_S[d].open_count<=0) 
D_S4947drivers/block/sbpcd.cif (D_S[d].audio_state!=audio_playing)
D_S4948drivers/block/sbpcd.cif (D_S[d].f_eject) cc_SpinDown();
D_S4949drivers/block/sbpcd.cD_S[d].diskstate_flags &= ~cd_size_bit;
D_S4950drivers/block/sbpcd.cD_S[d].open_count=0; 
D_S5182drivers/block/sbpcd.cif (D_S[j].drv_id==-1) continue;
D_S5188drivers/block/sbpcd.cD_S[d].sbp_first_frame = -1;  /* First frame in buffer */
D_S5189drivers/block/sbpcd.cD_S[d].sbp_last_frame = -1;   /* Last frame in buffer  */
D_S5190drivers/block/sbpcd.cD_S[d].sbp_read_frames = 0;   /* Number of frames being read to buffer */
D_S5191drivers/block/sbpcd.cD_S[d].sbp_current = 0;       /* Frame being currently read */
D_S5192drivers/block/sbpcd.cD_S[d].CD_changed=1;
D_S5193drivers/block/sbpcd.cD_S[d].frame_size=CD_FRAMESIZE;
D_S5195drivers/block/sbpcd.cif (!fam0_drive) D_S[d].f_eject=1;
D_S5196drivers/block/sbpcd.celse D_S[d].f_eject=0;
D_S5198drivers/block/sbpcd.cD_S[d].f_eject=0;
D_S5217drivers/block/sbpcd.cD_S[d].error_byte);
D_S5218drivers/block/sbpcd.cif (D_S[d].error_byte==aud_12)
D_S5227drivers/block/sbpcd.cD_S[d].error_byte);
D_S5234drivers/block/sbpcd.cif (i>=0) D_S[d].CD_changed=1;
D_S5269drivers/block/sbpcd.cif (D_S[j].drv_id==-1) continue;
D_S5274drivers/block/sbpcd.cD_S[j].aud_buf=NULL;
D_S5275drivers/block/sbpcd.cD_S[j].sbp_audsiz=0;
D_S5276drivers/block/sbpcd.cD_S[j].sbp_bufsiz=SBP_BUFFER_FRAMES;
D_S5277drivers/block/sbpcd.cif (D_S[j].drv_type&drv_fam1)
D_S5278drivers/block/sbpcd.cif (READ_AUDIO>0) D_S[j].sbp_audsiz=READ_AUDIO;
D_S5280drivers/block/sbpcd.cD_S[j].sbp_buf=(u_char *) vmalloc(D_S[j].sbp_bufsiz*CD_FRAMESIZE);
D_S5281drivers/block/sbpcd.cif (D_S[j].sbp_buf==NULL)
D_S5283drivers/block/sbpcd.cmsg(DBG_INF,"data buffer (%d frames) not available.\n",D_S[j].sbp_bufsiz);
D_S5287drivers/block/sbpcd.cif (D_S[j].sbp_audsiz>0)
D_S5289drivers/block/sbpcd.cD_S[j].aud_buf=(u_char *) vmalloc(D_S[j].sbp_audsiz*CD_FRAMESIZE_RAW);
D_S5290drivers/block/sbpcd.cif (D_S[j].aud_buf==NULL) msg(DBG_INF,"audio buffer (%d frames) not available.\n",D_S[j].sbp_audsiz);
D_S5291drivers/block/sbpcd.celse msg(DBG_INF,"audio buffer size: %d frames.\n",D_S[j].sbp_audsiz);
D_S5294drivers/block/sbpcd.cD_S[j].sbp_buf=(u_char *)mem_start;
D_S5295drivers/block/sbpcd.cmem_start += D_S[j].sbp_bufsiz*CD_FRAMESIZE;
D_S5296drivers/block/sbpcd.cif (D_S[j].sbp_audsiz>0)
D_S5298drivers/block/sbpcd.cD_S[j].aud_buf=(u_char *)mem_start;
D_S5299drivers/block/sbpcd.cmem_start += D_S[j].sbp_audsiz*CD_FRAMESIZE_RAW;
D_S5347drivers/block/sbpcd.cif (D_S[j].drv_id==-1) continue;
D_S5348drivers/block/sbpcd.cvfree(D_S[j].sbp_buf);
D_S5349drivers/block/sbpcd.cif (D_S[j].sbp_audsiz>0)
D_S5350drivers/block/sbpcd.cvfree(D_S[j].aud_buf);
D_S5369drivers/block/sbpcd.cif ( (i<0) || (i>=NR_SBPCD) || (D_S[i].drv_id==-1) )
D_S5379drivers/block/sbpcd.cmsg(DBG_CHK,"media_check: %02X\n",D_S[d].status_bits);
D_S5385drivers/block/sbpcd.cif (D_S[d].CD_changed==0xFF) msg(DBG_CHK,"media_check: \"changed\" assumed.\n");
D_S5390drivers/block/sbpcd.cD_S[d].CD_changed=0xFF;
D_S5395drivers/block/sbpcd.cD_S[d].open_count=0;
D_S5396drivers/block/sbpcd.cD_S[d].CD_changed=0xFF;
D_S5401drivers/block/sbpcd.cif (D_S[d].CD_changed==0xFF)
D_S5403drivers/block/sbpcd.cD_S[d].CD_changed=1;
D_S216include/linux/sbpcd.h#define upc_valid    (D_S[d].diskstate_flags&upc_bit)
D_S217include/linux/sbpcd.h#define volume_valid    (D_S[d].diskstate_flags&volume_bit)
D_S218include/linux/sbpcd.h#define toc_valid    (D_S[d].diskstate_flags&toc_bit)
D_S219include/linux/sbpcd.h#define cd_size_valid    (D_S[d].diskstate_flags&cd_size_bit)
D_S220include/linux/sbpcd.h#define subq_valid    (D_S[d].diskstate_flags&subq_bit)
D_S221include/linux/sbpcd.h#define frame_size_valid  (D_S[d].diskstate_flags&frame_size_bit)
D_S290include/linux/sbpcd.h#define st_door_closed  (D_S[d].status_bits&p_door_closed)
D_S291include/linux/sbpcd.h#define st_caddy_in  (D_S[d].status_bits&p_caddy_in)
D_S292include/linux/sbpcd.h#define st_spinning  (D_S[d].status_bits&p_spinning)
D_S293include/linux/sbpcd.h#define st_check  (D_S[d].status_bits&p_check)
D_S294include/linux/sbpcd.h#define st_busy    (D_S[d].status_bits&p_busy_new)
D_S295include/linux/sbpcd.h#define st_door_locked  (D_S[d].status_bits&p_door_locked)
D_S296include/linux/sbpcd.h#define st_diskok  (D_S[d].status_bits&p_disk_ok)
D_S334include/linux/sbpcd.h#define fam0_drive  (D_S[d].drv_type&drv_fam0)
D_S335include/linux/sbpcd.h#define famL_drive  (D_S[d].drv_type&drv_famL)
D_S336include/linux/sbpcd.h#define fam1_drive  (D_S[d].drv_type&drv_fam1)
D_S337include/linux/sbpcd.h#define fam2_drive  (D_S[d].drv_type&drv_fam2)
D_S338include/linux/sbpcd.h#define famT_drive  (D_S[d].drv_type&drv_famT)
D_S339include/linux/sbpcd.h#define fam0L_drive  (D_S[d].drv_type&(drv_fam0|drv_famL))
D_S340include/linux/sbpcd.h#define fam1L_drive  (D_S[d].drv_type&(drv_fam1|drv_famL))
D_S341include/linux/sbpcd.h#define fam01_drive  (D_S[d].drv_type&(drv_fam0|drv_fam1))
D_S342include/linux/sbpcd.h#define fam12_drive  (D_S[d].drv_type&(drv_fam1|drv_fam2))
D_S343include/linux/sbpcd.h#define fam2T_drive  (D_S[d].drv_type&(drv_fam2|drv_famT))