LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] SCSI woes

[ILUG] SCSI woes

John P. Looney jplooney-ilug at online.ie
Mon Feb 7 11:14:02 GMT 2000


On Mon, Feb 07, 2000 at 10:52:02AM +0000, Vincent Cunniffe mentioned:
> > Or is the AVA-1505 a complete pile of crap? (even though I
> > got it for free :-)
> Alan Cox was ranting about it possibly being the nastiest piece
> of hardware he'd ever seen ;-)

 I've seen worse. Tony Bolger got a hold of an ancient NCR scsi card that
was detected on boot, but didn't allow him to mount any of his MO disks,
when he plugged in his Magneto-optical player to it.

 He played around with it for a while, and then called me over to look at
the output of 

 "dd bytes=512 if=/dev/sda"

 It took me about twenty seconds to start giggling. 128 bytes into the
output was the string:

     <random stuff...>  0.5 SODMS

 Yeah, it was reading the first 128bytes backwards, and the second 128
bytes forwards, ad infinitum. Turns out that their offical spec says "Read
from the 128byte memory buffer, and set a flag saying "I'm ready for
more, and wait for an interrupt".

 So, most OSes will just memcpy() the buffer on the card to an internal
buffer. But Linux doesn't. It uses memmove(), in case the memory addresses
overlap (check the man page if you don't know the difference). This card
was so cheap and nasty, that the 128 byte buffer was a "virtual buffer".
What it did was that when you read byte 0 from the card, it gave you said
byte, and incremented the counter. When you read byte 1, it incremented
the counter. Because it was just an I/O port, instead of a memory buffer,
even if you read bytes 1, 15, 29, and 304, then 2, it would give you
0,1,2,3,4 - in that order.

 So, when memmove() was copying backwards.....

 Now that's a crappy SCSI card. When Tony sent in the four-line "This card
is too thick for memmove(), he challenged Alan to come up with a crapper
SCSI card. Alan thought about it, and said he'd not heard of one.

Kate





More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell