Here is a patch for the scsi cdrom driver. It does:
* implements the select speed ioctl
* rearranged multisession stuff: support for these old TOSHIBA and NEC
drives is optional (vi vendor specific extentions). The code for
modern drives use is included allways.
* the driver does lazy blocksize switching now when reading XA sectors
(mode2/form2, 2336 bytes long) via CDROMREADMODE2 ioctl.
The driver is currently somewhat verbose.
Gerd
begin 644 sr.51.diff.gz
M'XL(``W-_C,``ZP\:W?:1M.?X5=LW3:%(&&$P1?<."&8Q#PQQ@72)F^;HR-+
MB]$Q2%02L?TT^>_OS.RN;EQ,\E2GIV#MSNSLW'9F=HCC3B9,7P;LC@<>G^W7
MJT:U:>R?^_9RSKW(BES?V^_XWL2]70:\.N6S!9NYWO)AZY2BKNO?@+'P)G!9
M>WG+ZG56K[6,6JMQQ(R3DZ-BI5+98;D\_&&KWA3PKUXQW3AL'FM&C574EU>O
MBJSK63<SSCYSS_$#/5QPVYVX-N,/$?="6"%DI8D?L%%GU&.=\^&@7RZRSN#J
M3>^M^?KRG7G>_=T<#<W?NU?G@V&1,3:>NB'CA#1DT92S96C=<N9/Y!(L7H)0
MVOY\;GE.6!6`;EC4&0OXWTLWX`[#E4-_SED8+4$\]U/7GL(<YO%['@!VRZ,E
M$)/>Z\$L0&4%3@N1])>SR!WQ$#<!E+-PN5CX0<1@BL#I^G8T"VF-@%N.Z]VR
MON]P5F=O_&#.ZH@DY';D!T#=1W_YRVS&%H%_`UM[9/>6%['(9Z'UR#ZR*0^X
MQI8>[#EDC_Z23:W/G%F(P03<,P#P9XX)9.C`0>8$[F=>+592.T54DL`Y$A[&
MA/\2,OB\=Z,IXF!7W<[^>#"ZZ+UN(P+;"?RY0`B2PKU=7+,_`C?B05BNLMXD
M(2=<`O,L,9>X<,LC1($<G+A!&#&UJ._-'C46!8](5K0,D,LNDE$%#L$\N5PX
M]9<S!U'<^\$=X/`XT>DO(P*H%EE12/F6>SP`D<LMQAK4N1@*#7I;=-;;'RT5
MA/NA';K[?>N.3US05F$):\?66-S:>:NFUEPQM?6`XR4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