|
@@ -146,7 +146,7 @@ static union u_PXENV_ANY __data16 ( undinet_params );
|
146
|
146
|
* Used as the indirection vector for all UNDI API calls. Resides in
|
147
|
147
|
* base memory.
|
148
|
148
|
*/
|
149
|
|
-static SEGOFF16_t __data16 ( undinet_entry_point );
|
|
149
|
+SEGOFF16_t __data16 ( undinet_entry_point );
|
150
|
150
|
#define undinet_entry_point __use_data16 ( undinet_entry_point )
|
151
|
151
|
|
152
|
152
|
/**
|
|
@@ -245,17 +245,21 @@ static int undinet_call ( struct undi_nic *undinic, unsigned int function,
|
245
|
245
|
/**
|
246
|
246
|
* UNDI interrupt service routine
|
247
|
247
|
*
|
248
|
|
- * The UNDI ISR simply increments a counter (@c trigger_count) and
|
249
|
|
- * exits.
|
|
248
|
+ * The UNDI ISR increments a counter (@c trigger_count) and exits.
|
250
|
249
|
*/
|
251
|
|
-extern void undinet_isr ( void );
|
|
250
|
+extern void undiisr ( void );
|
252
|
251
|
|
253
|
|
-/** Dummy chain vector */
|
254
|
|
-static struct segoff prev_handler[ IRQ_MAX + 1 ];
|
|
252
|
+/** IRQ number */
|
|
253
|
+uint8_t __data16 ( undiisr_irq );
|
|
254
|
+#define undiisr_irq __use_data16 ( undiisr_irq )
|
|
255
|
+
|
|
256
|
+/** IRQ chain vector */
|
|
257
|
+struct segoff __data16 ( undiisr_next_handler );
|
|
258
|
+#define undiisr_next_handler __use_data16 ( undiisr_next_handler )
|
255
|
259
|
|
256
|
260
|
/** IRQ trigger count */
|
257
|
|
-static volatile uint8_t __text16 ( trigger_count ) = 0;
|
258
|
|
-#define trigger_count __use_text16 ( trigger_count )
|
|
261
|
+volatile uint8_t __data16 ( undiisr_trigger_count ) = 0;
|
|
262
|
+#define undiisr_trigger_count __use_data16 ( undiisr_trigger_count )
|
259
|
263
|
|
260
|
264
|
/** Last observed trigger count */
|
261
|
265
|
static unsigned int last_trigger_count = 0;
|
|
@@ -275,16 +279,12 @@ static unsigned int last_trigger_count = 0;
|
275
|
279
|
static void undinet_hook_isr ( unsigned int irq ) {
|
276
|
280
|
|
277
|
281
|
assert ( irq <= IRQ_MAX );
|
|
282
|
+ assert ( undiisr_irq == 0 );
|
278
|
283
|
|
279
|
|
- __asm__ __volatile__ ( TEXT16_CODE ( "\nundinet_isr:\n\t"
|
280
|
|
- "incb %%cs:%c0\n\t"
|
281
|
|
- "iret\n\t" )
|
282
|
|
- : : "p" ( & __from_text16 ( trigger_count ) ) );
|
283
|
|
-
|
|
284
|
+ undiisr_irq = irq;
|
284
|
285
|
hook_bios_interrupt ( IRQ_INT ( irq ),
|
285
|
|
- ( ( unsigned int ) undinet_isr ),
|
286
|
|
- &prev_handler[irq] );
|
287
|
|
-
|
|
286
|
+ ( ( unsigned int ) undiisr ),
|
|
287
|
+ &undiisr_next_handler );
|
288
|
288
|
}
|
289
|
289
|
|
290
|
290
|
/**
|
|
@@ -297,8 +297,9 @@ static void undinet_unhook_isr ( unsigned int irq ) {
|
297
|
297
|
assert ( irq <= IRQ_MAX );
|
298
|
298
|
|
299
|
299
|
unhook_bios_interrupt ( IRQ_INT ( irq ),
|
300
|
|
- ( ( unsigned int ) undinet_isr ),
|
301
|
|
- &prev_handler[irq] );
|
|
300
|
+ ( ( unsigned int ) undiisr ),
|
|
301
|
+ &undiisr_next_handler );
|
|
302
|
+ undiisr_irq = 0;
|
302
|
303
|
}
|
303
|
304
|
|
304
|
305
|
/**
|
|
@@ -310,7 +311,7 @@ static int undinet_isr_triggered ( void ) {
|
310
|
311
|
unsigned int this_trigger_count;
|
311
|
312
|
|
312
|
313
|
/* Read trigger_count. Do this only once; it is volatile */
|
313
|
|
- this_trigger_count = trigger_count;
|
|
314
|
+ this_trigger_count = undiisr_trigger_count;
|
314
|
315
|
|
315
|
316
|
if ( this_trigger_count == last_trigger_count ) {
|
316
|
317
|
/* Not triggered */
|
|
@@ -424,6 +425,7 @@ static void undinet_poll ( struct net_device *netdev ) {
|
424
|
425
|
if ( ! undinet_isr_triggered() )
|
425
|
426
|
return;
|
426
|
427
|
|
|
428
|
+#if 0
|
427
|
429
|
/* See if this was our interrupt */
|
428
|
430
|
memset ( &undi_isr, 0, sizeof ( undi_isr ) );
|
429
|
431
|
undi_isr.FuncFlag = PXENV_UNDI_ISR_IN_START;
|
|
@@ -443,6 +445,7 @@ static void undinet_poll ( struct net_device *netdev ) {
|
443
|
445
|
/* If this wasn't our interrupt, exit now */
|
444
|
446
|
if ( undi_isr.FuncFlag != PXENV_UNDI_ISR_OUT_OURS )
|
445
|
447
|
return;
|
|
448
|
+#endif
|
446
|
449
|
|
447
|
450
|
/* Start ISR processing */
|
448
|
451
|
undinic->isr_processing = 1;
|