Messages in this thread | | | Subject | Re: 3c59x driver: Patch for "transmit timed out" and other things. | From | <> | Date | Wed, 20 Mar 1996 17:30:54 -0500 (EST) |
| |
Hello,
Giuseppe Ciaccio enscribed thusly:
> Working with both 3c590 and 3c595 ethercards, I detected two problems:
> 1) During FTP transmissions of bulky files, the message > "transmit timed out" appeared, and the transmission was blocked.
> 2) Having installed both the cards, the driver detected the 3c590 card only, > regardless of having put 'append = "ether=0,0,eth1"' in /etc/lilo.conf > to force the detection of a further ethercard.
> Here follows a patch for the "Vortex" driver for 3c590/3c595 ethercards. > With this patch, everything works properly (at least, it seems to).
> There are two releases of 3c590 cards: 8K buffer and 32K buffers. The > patched driver has shown a significant, though not tragic, loss of > performance with cards of the former type. To understand why, please read > the comments in the patch.
> This is my first attempt to patch something in Linux, I hope the followed > procedure is OK. Apologies for poor English and/or protocol violation.
This patch help fix a major problem for me. Thank you very much!
I had two problems with this patch, though.
1) Please do not send out patches as MIME attachments in base 64 encoding. That made it a royal pain to save and use the patch from elm. If it's a text patch, please make sure it's sent out as text. base 64 encoding just makes it a pain for those of us who don't routinely use mime. I use it when necessary, but text files are not necessary.
2) The patch breaks support for multiple 3c590 cards. I have a router with three of these beasts and when I put in this patch it could only see one.
I tracked the multiple card problem down to the PCI identification code where a new variable, "found", was introduced and at the end of the pci scanning loop was the line "if( !found ) break;". I don't know what you were trying to accomplish with that, but commenting it out, restored recognition for multiple 3c590 boards. If I read this code right, I get the impression that it would stop scanning the PCI list as soon as it found a card it didn't recognize. Since it only looks for 3c59x cards, this would include PCI video cards (which I have) or other sundry PCI peripherals. I may be wrong - but I don't think that code is a good idea.
Here are the problem lines in the patch...
==================================================================== - for (index = 0; product_ids[index]; index++) { - if ( ! pcibios_find_device(TCOM_VENDOR_ID, product_ids[index], + for (index = 0; index < 5; index++) { + found = 0; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + if ( pcibios_find_device(TCOM_VENDOR_ID, product_ids[index], ==================================================================== : ==================================================================== + /* A known PCI card was found */ + found = 1; + ==================================================================== : ==================================================================== + /* If no known card was found, stop scanning. */ + if (!found) break; ====================================================================
The last segment above is what causes the breakage (sorry - ugly pun - been a long day!). If this code is intended to do something useful - it needs to be done in a way which does not break things.
> Regards > >>>>>> > ( @ @ ) > |-------------------------oOOo-(____)-oOOo--------------------------| > | | > | Giuseppe Ciaccio E-mail, Finger: ciaccio@disi.unige.it | > | Please use "finger" to get phone numbers, addresses, etc. | > |-------------------------------------------------------------------| > | Sex is not the answer; sex is the question. "Yes" is the answer! | > |-------------------------------------------------------------------| > || || > oooO Oooo > ---75343811-256057862-827233284=:363 > Content-Type: TEXT/PLAIN; charset=US-ASCII; name=3c59xpatch > Content-Transfer-Encoding: BASE64 > Content-ID: <Pine.LNX.3.91.960319120124.363B@hobbes> > Content-Description: > > LS0tIDNjNTl4b2xkLmMJVGh1IE1hciAxNCAxNTowMToxNSAxOTk2DQorKysg > M2M1OXhuZXcuYwlUdWUgTWFyIDE5IDExOjI5OjA3IDE5OTYNCkBAIC0yLDYg : : Body of base 64 encoded patch deleted... : > UykgJiBDbWRJblByb2dyZXNzKQ0KIAkJCQlicmVhazsNCiAJfQ0K > ---75343811-256057862-827233284=:363-- >
Regards & Thanks Mike -- Michael H. Warfield | (770) 985-6132 | mhw@WittsEnd.com (The Mad Wizard) | (770) 925-8248 | http://www.wittsend.com/mhw/ NIC whois: MHW9 | An optimist believes we live in the best of all PGP Key: 0xDF1DD471 | possible worlds. A pessimist is sure of it!
| |