summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarty Connor2007-12-20 17:53:00 +0100
committerMarty Connor2007-12-20 17:53:00 +0100
commit9d4e4dbc32e52213de685951590254fe9e7c308a (patch)
tree5e959a71978498a80d8b80a59f3626b6a94b8d4e
parentFix e1000 receive tail pointer (RDT) handling (diff)
downloadipxe-9d4e4dbc32e52213de685951590254fe9e7c308a.tar.gz
ipxe-9d4e4dbc32e52213de685951590254fe9e7c308a.tar.xz
ipxe-9d4e4dbc32e52213de685951590254fe9e7c308a.zip
3c90x driver fix (legacy) from Geert Staapers
From: Geert Stappers <stappers@stappers.nl> To: etherboot-developers@lists.sourceforge.net Subject: [Etherboot-developers] 3c90x polling again [patch] Date: Thu, 29 Nov 2007 09:22:36 +0100 User-Agent: Mutt/1.5.16 (2007-06-11) Hello, gPXE didn't work on 3COM 905C Tornado cards for me. It did transmit the DHCP request, but it didn't see the DHCP offer. Adding debug print statements allready solved the problem. Attached is a patch that has a cleaner delay then print statements. The core of it is - for(i=0;i<40000;i++); + mdelay(1); There was no research if the change is about a longer delay or about code NOT being optimized away. It works for me :-) Cheers Geert Stappers
-rw-r--r--src/drivers/net/3c90x.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/drivers/net/3c90x.c b/src/drivers/net/3c90x.c
index 4f836b95..8e1f160e 100644
--- a/src/drivers/net/3c90x.c
+++ b/src/drivers/net/3c90x.c
@@ -34,6 +34,8 @@
* v2.01 5-26-2003 NN Fixed driver alignment issue which
* caused system lockups if driver structures
* not 8-byte aligned.
+ * v2.02 11-28-2007 GSt Got polling working again by replacing
+ * "for(i=0;i<40000;i++);" with "mdelay(1);"
*
*/
@@ -613,7 +615,7 @@ a3c90x_transmit(struct nic *nic __unused, const char *d, unsigned int t,
static int
a3c90x_poll(struct nic *nic, int retrieve)
{
- int i, errcode;
+ int errcode;
if (!(inw(INF_3C90X.IOAddr + regCommandIntStatus_w)&0x0010))
{
@@ -637,9 +639,9 @@ a3c90x_poll(struct nic *nic, int retrieve)
INF_3C90X.IOAddr + regUpListPtr_l);
/** Wait for upload completion (upComplete(15) or upError (14)) **/
- for(i=0;i<40000;i++);
+ mdelay(1);
while((INF_3C90X.ReceiveUPD.UpPktStatus & ((1<<14) | (1<<15))) == 0)
- for(i=0;i<40000;i++);
+ mdelay(1);
/** Check for Error (else we have good packet) **/
if (INF_3C90X.ReceiveUPD.UpPktStatus & (1<<14))
@@ -779,7 +781,7 @@ static int a3c90x_probe ( struct nic *nic, struct pci_device *pci ) {
}
/** Print identification message **/
- printf("\n\n3C90X Driver 2.00 "
+ printf("\n\n3C90X Driver 2.02 "
"Copyright 1999 LightSys Technology Services, Inc.\n"
"Portions Copyright 1999 Steve Smith\n");
printf("Provided with ABSOLUTELY NO WARRANTY.\n");