Browse Source

Kill off poll_interruptions(); it is lethal when we're acting as a PXE

stack or INT 13 emulator etc.
tags/v0.9.3
Michael Brown 18 years ago
parent
commit
97439cb6eb
7 changed files with 0 additions and 26 deletions
  1. 0
    15
      src/core/misc.c
  2. 0
    5
      src/core/nic.c
  3. 0
    1
      src/core/pcmcia.c
  4. 0
    2
      src/core/timer.c
  5. 0
    1
      src/drivers/net/e1000.c
  6. 0
    1
      src/drivers/net/tg3.c
  7. 0
    1
      src/include/etherboot.h

+ 0
- 15
src/core/misc.c View File

72
 	return seed;
72
 	return seed;
73
 }
73
 }
74
 
74
 
75
-/**************************************************************************
76
-POLL INTERRUPTIONS
77
-**************************************************************************/
78
-void poll_interruptions(void)
79
-{
80
-	int ch;
81
-	if ( ! as_main_program ) return;
82
-	/* If an interruption has occured restart etherboot */
83
-	if (iskey() && (ch = getchar(), (ch == K_ESC) || (ch == K_EOF) || (ch == K_INTR))) {
84
-		int state = (ch != K_INTR)? -1 : -3;
85
-		longjmp(restart_etherboot, state);
86
-	}
87
-}
88
-
89
 /**************************************************************************
75
 /**************************************************************************
90
 SLEEP
76
 SLEEP
91
 **************************************************************************/
77
 **************************************************************************/
94
 	unsigned long tmo;
80
 	unsigned long tmo;
95
 
81
 
96
 	for (tmo = currticks()+secs*TICKS_PER_SEC; currticks() < tmo; ) {
82
 	for (tmo = currticks()+secs*TICKS_PER_SEC; currticks() < tmo; ) {
97
-		poll_interruptions();
98
 	}
83
 	}
99
 }
84
 }
100
 
85
 

+ 0
- 5
src/core/nic.c View File

883
 		if (result == 0) {
883
 		if (result == 0) {
884
 			/* We don't have anything */
884
 			/* We don't have anything */
885
 		
885
 		
886
-			/* Check for abort key only if the Rx queue is empty -
887
-			 * as long as we have something to process, don't
888
-			 * assume that something failed.  It is unlikely that
889
-			 * we have no processing time left between packets.  */
890
-			poll_interruptions();
891
 			/* Do the timeout after at least a full queue walk.  */
886
 			/* Do the timeout after at least a full queue walk.  */
892
 			if ((timeout == 0) || (currticks() > time)) {
887
 			if ((timeout == 0) || (currticks() > time)) {
893
 				break;
888
 				break;

+ 0
- 1
src/core/pcmcia.c View File

48
 void	sleepticks(int numticks ) {
48
 void	sleepticks(int numticks ) {
49
 	u_int	tmo;
49
 	u_int	tmo;
50
 	for (tmo = currticks()+numticks; currticks() < tmo; ) {
50
 	for (tmo = currticks()+numticks; currticks() < tmo; ) {
51
-                poll_interruptions();
52
         }
51
         }
53
 	return;
52
 	return;
54
 }
53
 }

+ 0
- 2
src/core/timer.c View File

17
 	unsigned int i;
17
 	unsigned int i;
18
 	for(i = 0; i < msecs; i++) {
18
 	for(i = 0; i < msecs; i++) {
19
 		udelay(1000);
19
 		udelay(1000);
20
-		poll_interruptions();
21
 	}
20
 	}
22
 }
21
 }
23
 
22
 
25
 {
24
 {
26
 	load_timer2(ticks);
25
 	load_timer2(ticks);
27
 	while(timer2_running()) {
26
 	while(timer2_running()) {
28
-		poll_interruptions();
29
 	}
27
 	}
30
 }
28
 }

+ 0
- 1
src/drivers/net/e1000.c View File

3536
 	E1000_WRITE_REG (&hw, TDT, tx_tail);
3536
 	E1000_WRITE_REG (&hw, TDT, tx_tail);
3537
 	while (!(txp->upper.data & E1000_TXD_STAT_DD)) {
3537
 	while (!(txp->upper.data & E1000_TXD_STAT_DD)) {
3538
 		udelay(10);	/* give the nic a chance to write to the register */
3538
 		udelay(10);	/* give the nic a chance to write to the register */
3539
-		poll_interruptions();
3540
 	}
3539
 	}
3541
 	DEBUGFUNC("send end");
3540
 	DEBUGFUNC("send end");
3542
 }
3541
 }

+ 0
- 1
src/drivers/net/tg3.c View File

3153
 	while((tp->hw_status->idx[0].tx_consumer != entry) &&
3153
 	while((tp->hw_status->idx[0].tx_consumer != entry) &&
3154
 		(tp->hw_status->idx[0].tx_consumer != PREV_TX(entry))) {
3154
 		(tp->hw_status->idx[0].tx_consumer != PREV_TX(entry))) {
3155
 		mdelay(10);	/* give the nick a chance */
3155
 		mdelay(10);	/* give the nick a chance */
3156
-		poll_interruptions();
3157
 		if (++i > 500) { /* timeout 5s for transmit */
3156
 		if (++i > 500) { /* timeout 5s for transmit */
3158
 			printf("transmit timed out\n");
3157
 			printf("transmit timed out\n");
3159
 			tg3_halt(tp);
3158
 			tg3_halt(tp);

+ 0
- 1
src/include/etherboot.h View File

222
 extern void twiddle P((void));
222
 extern void twiddle P((void));
223
 extern void sleep P((int secs));
223
 extern void sleep P((int secs));
224
 extern void interruptible_sleep P((int secs));
224
 extern void interruptible_sleep P((int secs));
225
-extern void poll_interruptions P((void));
226
 extern int strcasecmp P((const char *a, const char *b));
225
 extern int strcasecmp P((const char *a, const char *b));
227
 extern char *substr P((const char *a, const char *b));
226
 extern char *substr P((const char *a, const char *b));
228
 
227
 

Loading…
Cancel
Save