Re: Problems in 1.3.62 with PAS16

Kevin Lentin (kevinl@cs.monash.edu.au)
Thu, 15 Feb 1996 12:14:10 +1100 (EST)


Michael Jarvis Wrote ...
>
> I tried compiling a fresh copy of 1.3.62, and ran into problems with
> trying to use PAS16 for CD-ROM support only. The errors I would get
> were:

Somebody added something to the pas16 code in 1.3.6? that is wrong.
The pas16.c file MUST NOT include g_NCR5380.h. It's completely
non-sensical. The correct fix for the problem that appeared in about 1.3.59
or 60 is to ifdef around the 2 places in NCR5380.c where it gave errors.

ie:

--- linux/drivers/scsi/NCR5380.c.orig Fri Feb 9 17:11:41 1996
+++ linux/drivers/scsi/NCR5380.c Fri Feb 9 17:11:48 1996
@@ -786,8 +786,10 @@
* the base address.
*/

+#ifdef NCR53C400
if (flags & FLAG_NCR53C400)
instance->NCR5380_instance_name += NCR53C400_address_adjust;
+#endif

NCR5380_setup(instance);

@@ -837,9 +839,11 @@
NCR5380_write(TARGET_COMMAND_REG, 0);
NCR5380_write(SELECT_ENABLE_REG, 0);

+#ifdef NCR53C400
if (hostdata->flags & FLAG_NCR53C400) {
NCR5380_write(C400_CONTROL_STATUS_REG, CSR_BASE);
}
+#endif

/*
* Detect and correct bus wedge problems.

Including one low level driver include file into another driver causes huge
redefinition problems as you saw. And the results are completely wrong.

Copying in old NCR5380.* files will fix the problem if all you use is the
pas16 but the above is the correct solution. I mailed this to Linus about 2
patchlevels ago.

I will put those 2 bits back in soon. They won't cause _any_ problems not
being there since the only driver to use them is the g_NCR5380 and it
defines NCR53C400. The point of there being no #ifdef's originally was to
allow one driver to detect and drive multiple cards of the same basic type.

-- 
[=======================================================================]
[ Kevin Lentin                 |finger kevinl@fangorn.cs.monash.edu.au| ]
[ K.Lentin@cs.monash.edu.au    |for PGP public key block. Fingerprint | ]
[ Macintrash: 'Just say NO!'   |6024308DE1F84314  811B511DBA6FD596    | ]
[=======================================================================]