From kevinl@bruce.cs.monash.edu.au Wed Mar 23 22:14:30 EST 1994 Article: 7022 of comp.os.linux.development Path: bigblue.oit.unc.edu!concert!gatech!howland.reston.ans.net!vixen.cso.uiuc.edu!uchinews!msuinfo!harbinger.cc.monash.edu.au!bruce.cs.monash.edu.au!kevinl From: kevinl@bruce.cs.monash.edu.au (Kevin Lentin) Newsgroups: comp.os.linux.development Subject: Patch for T130B with interupts Date: 24 Mar 1994 02:50:25 GMT Organization: Computer Science, Monash University, Australia Lines: 133 Distribution: world Message-ID: <2mqv5h$cl9@harbinger.cc.monash.edu.au> NNTP-Posting-Host: molly.cs.monash.edu.au X-Newsreader: TIN [version 1.2 021193BETA PL3] OK, here is a tar.gz file containing 2 new files (g_C400.[ch]) and patches to the NCR5380 scsi code and a few files up the source tree to config.in. These patches will allow you to configure in an NCR53C400 generic scsi driver which is (at the moment) just the same as the NCR5380 driver with one extra write to turn on T130B interupts and a whole lot of other stuff which will make the next stage (PSEUDO_DMA) easier. Note that previously, you had to add 8 to your port address to get the NCR5380 driver to work with a T130B. Now the 53C400 driver does this for you so you should configure it in at the port address jumpered on the card. The patches below include a patch to Makefile that sets an overide for the default address of 0x350 which you're welcome to use, remove or change as you require. The driver can be configured for mthe lilo prompt in the same way as the ncr5380 driver, expcept you use ncr53c400=.... instead. (Although if you have the override in the Makefile, you don't need this). I'm hoping this patch is complete. I know that the patches in the NCR5380.* files and the new g_C400.* files are but I have had to refix the files further up (eg hosts.c and main.c and config.in) without access to a Linux box (my modem link went down and I had forgotten to grab those files). I'm almost certain I got everything, but let me know if you have troubles compiling this. The performance of this code is still poor, given that there is no DMA happening but it is better than the generic 5380 driver with no interupts. I'm working on the PSEUDO_DMA code at the moment but time is scarce. Here comes the tar.gz file uuencoded. It contains g_C400.h and g_C400.c which you should copy into /usr/src/linux/drivers/scsi and a patch file which you can apply from /usr/src/linux using: patch -p1 < c400.patch begin 644 c400.tar.gz M'XL( .;WD"T" ^U:>W/B1A+WO_ I.MZ]"QB!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HQ3VHYN M6JIGL+>WGVF^'DZ!<[*3>.?9>&O:+DM/V?%(YP+/(W7C/D@HP5P7\[13YIKR MPW-HUL_X'4OW:]7@KDIW) "^_QXDB4:#C1+9'@7E1J*.FY+15,=0@4H\AR. M3B0$9UP];!5(&E9"\>OEEU6<['WQ:_T?UO]!^?F?Z_^)]5JU'O7_6C7>_Y-J MK_V_/^/:W^P+7,K-;/K!']#V2TSXVOW[[^[^<>2\'=IWIYMO*RH+X1[>ADW" MN97=6WH?M8.RGN6W7G#D]]!OO?N()^[(USL./+2CXQ58^=9=(2R.V#&'*<\+ MSD=&RGX<[62(BTTD2>9"V:D0SX1V"?O5-WQ#":L,7TX@FA-DA,U?5$F M*]T]>PY?#G=\/,' [AP*N=PO^=RN;1%V)*2\U;*+-[4+PBY,"9#-S

3+ / M8 *Q8T*CJ1:P&=&3DCD_/C+I>T%H"2!?*1VF;\BSTJD&@Z5O,:[$GK#FDDCY M%^O3;GYU;*XP0*TPMK-PI%2L;4N@+SP+.%.1R&\+C+4$;?S'1HO%+0[^_3D^%/@W MAZHW*+OD?= MWG0VODW--,TB9P^VQ5/S<$=/<8LV!>+G0LT6-T/X+N1G[!'N\ZX(E$S>606= M\'SV%BAZ&D;R]&C&N4$$K_7_R^O_@]?K]7J]7J_7Z__R>JW_7^O_U_K__[?^ *_S=*!JCG $ &C& end -- [==================================================================] [ Kevin Lentin |___/~\__/~\___/~~~~\__/~\__/~\_| ] [ kevinl@bruce.cs.monash.edu.au |___/~\/~\_____/~\______/~\/~\__| ] [ Macintrash: 'Just say NO!' |___/~\__/~\___/~~~~\____/~~\___| ] [==================================================================]