From: drew@ophelia.cs.colorado.edu (Drew Eckhardt)
Newsgroups: comp.os.linux
Subject: Re: Support for TMC 950 SCSI controllers
Date: 13 Aug 92 20:14:10 GMT
Organization: University of Colorado at Boulder

In article <1992Aug13.142645.4980@random.ccs.northeastern.edu> alansar@ccs.northeastern.edu (Mohammad Al-Ansari) writes:
>
>The faq says that a patch for TMC 950 SCSI controllers was posted to the
>net and that it is going to be incorporated into the Linux package soon.
>Where can one get this patch? Is it at any of the ftp sites?
>
>Thanks a lot in advance.
>
>--

I haven't had a chance to incorporate it <yet>, here's the original 
posting : 

--- cut ---
Someone asked about the Future Domain card TMC-950 and how to get
it to work with linux. I can't ftp diffs but the changes were
pretty simple so this is what I did:

	1. The target id of the controller must be 6 not 7. I found
		this in two places seagate.c and scsi.c

		in scsi.c change 
			for (dev = 0; dev < 7; ++dev)
		to
			for (dev = 0; dev < 6; ++dev)


		in seagate.c change
			if (target > 6)
		to
			if (target > 5)
		and
			DATA = (unsigned char) ((1 << target) | 0x80);
		to
			DATA = (unsigned char) ((1 << target) | 0x40);
		and
			if (!((temp = DATA) & 0x80))
		to
			if (!((temp = DATA) & 0x40))

	2. The offsets for TMC-950 are slightly different than the 
	   seagate, i.e. in seagate.c change
	    st0x_cr_sr =(void *) (((unsigned char *) base_address) + 0x1a00);
	    st0x_dr = (void *) (((unsigned char *) base_address+ 0x1c00);
	   to
	    ""							   + 0x1c00);
	    ""						       + 0x1e00);

	3. I had to add a cludge to the cmd out phase where the 
		sequence of commands is delayed between bytes.
		You may or may not need this, this appeared to
		be bus speed dependent. I basically looped for
		2000 clock ticks before outputting sequential
		command bytes.

--- drew's comment --- 

I changed the command out phase so that REQ is checked before a byte 
is sent, so this sbould be unecessary 

---
	4. I compiled with -DOVERRIDE=0xc8000 since I do not
	   (nor do I want) have a Future Domain BIOS chip.



	5. In scsi.h change the reference to a host target id of 7 to 6.
	   Its ORed into the lun in a define I think.


The only problem I have encountered is that on first power-up
the READ CAPACITY (and for tapes READ BLOCK LIMITS) fail. For

--- drew again ---

This has been kludged arround - the error handling code in version 
1 of the SCSI drivers doesn't work very well, and won't be fixed 
because version 2 handles things fine.

In the init code, if something fails, it gets retried - this seems
to have worked in 99.99% of the cases 

---

now all I do is a soft reset and that goes away. Also, the
driver appears to get stuck in a non-error timeout loop sometimes
so that disk access appears extremely slow.

If you need a description of the ports for the TMC I can spend 
some time and post it, seems hardly worth it though as this board
is so slow. I only use it for SCSI tapes, disk access is crummy.

Louis Birk.
birk_lj@rso.dnet.ge.com


-- 
Microsoft is responsible for propogating the evils it calls DOS and Windows, 
IBM for AIX (appropriately called Aches by those having to administer it), but neither is as bad as AT&T.  Boycott AT&T, and let them know how you feel.