Re: patch for sbpcd 4.4 - was Re: sbpcd woes under 2.0.10

Eberhard Moenkeberg (emoenke@gwdg.de)
21 Aug 1996 07:28:29 GMT


I didn't see my answer from Aug-17 appear at the list, so here it
is reposted:

Rob Riggs (rriggs@tesser.com) wrote:
: Here is a patch to the sbpcd driver in kernel 2.0.12. It implements
: a semaphore to regulate whether kernel read requests or ioctls get
: access to the controller. It works quite well for me. I've done a
: whole 30 minutes of testing :-). I can play a Cranberries CD with
: xmcd and do an ls -R on my Yggdrasil Sunsite archive disk at the
: same time.

Thanks, Rob.
I have adopted your changes (your "long" patch and the two smaller
changes you have posted) into sbpcd.4.6-1; the diff against 2.0.13
is appended (I will submit it to Linus when I think I can name it 4.6).

: The only unknown for me is how it will affect the rather odd looking
: busy_audio/busy_data construct.

Your stuff will supersede the OLD_BUSY parts.

: P.S. Look at around lines 4022 and 4023 and check out the two return
: statements. We probably only need one of those. ;-)

Yes - it is a matter of taste. But this fact shall remain visible.

Cheers -e

begin 644 sbpcd.4.6-1.diff.gz
M'XL("&:_%3("`W-B<&-D+C0N-BTQ+F1I9F8`Y3QI<]I*MI_QK^CKJ>3!11")
MQ;%Q<(4`3CSQD@&<FSMY*960&MRQD(@6)Y[$__V=T]U""Q+&B6_-3#VG`D@Z
M??IL?99>5*O5R+,WO=8S?VHQ_YGK,?BU-*VZ61H;`>F%<Z(])UJCHZF=QA[1
M#@[V=JK5*K&9$WY[9GGLAGK^,]/RW$5NPU:G];S3:(N&+U^2FM94GI,J_WSY
M<H>0WTGRSS:FU+:I18:-=EN][!'7(V=O6ZK6QE^-?54]KM2QU;,=LE/[FT5G
MS*'D_7`T/KDX)[LWK7J;#*?4NS(\BYRYU+FF<#4G+^B"7[R<?[7F=8L>[>Y4
M\UKOU;1MVY,=\@R)[[O+6X_-KP)2[E>0SZ:"GRW^V2;;H4.6N'@:T%S32)5_
M-],BLFW=^ZI/[>NZ*80@[^_VKZAY31;48@8QKPQG3G?)5Q9<N6%``C<TKY@S
M)X9S2[B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FC19^(JKV&KTSCHJ(W$ZU_4%G__"_\2
M;S=Y)E^E,N9;^1@_NZ\2%U_*<>N&Y,JXH?$ZC(7W/$QYJ#<S`(2_EX!A(N@3
M_AH6?OYG]6J8P<EX,CIY=3G!"D"+WV.0NJ\*"OA[!3`N(`4BE/(9A#F[X2]0
M(0NH.HPY%6K5VAIJ%;^D4B7JR7`\@='21[31O?&[84_'!\F;''`\.8%[*[JB
L:,?A0@?CW;O>Y(W>?S/LO^4AD-\;7UR>`R#4&(D^5O>@\?\!^9IP,=A'````
`
end

-- 
Eberhard Moenkeberg                         GGG   W   W  DDDD    GGG
                                           G      W   W  D   D  G
E-Mail:   emoenke@gwdg.de                  G GGG  W   W  D   D  G GGG
Phone: +49 551 2011551  Fax: +49 551 21119 G   G  W W W  D   D  G   G
SnailMail:                                  GGG   WW WW  DDDD    GGG
Gesellschaft fuer wissenschaftliche Datenverarbeitung mbH
Am Fassberg, D-37077 Goettingen, GERMANY
At home: Modem+ISDN ("guest") ++49-551-7704102, ISDN-HDLC 7704103