@@ -396,37 +396,6 @@ handle_tx(lan743x_t *l)
396396 }
397397}
398398
399- static bool test_irq_flag = false;
400-
401- static void
402- handle_test_irq (lan743x_t * l )
403- {
404- test_irq_flag = true;
405- // clear interrupt status
406- reg_wr (l -> mmio + INT_EN_CLR , INT_BIT_SW_GP_ );
407- reg_wr (l -> mmio + INT_STS , INT_BIT_SW_GP_ );
408- }
409-
410- bool
411- test_irq (lan743x_t * l )
412- {
413- test_irq_flag = false;
414- // clear status
415- reg_wr (l -> mmio + INT_STS , INT_BIT_SW_GP_ );
416- // activate software interrupt
417- reg_wr (l -> mmio + INT_SET , INT_BIT_SW_GP_ );
418- bool success = false;
419- for (int i = 0 ; i < 10 && !success ; i ++ ) {
420- usleep (1000 );
421- if (test_irq_flag )
422- success = true;
423- }
424- // assuming the previous WAIT includes a timeout in case the test failed.
425- // disable software interrupt
426- reg_wr (l -> mmio + INT_EN_CLR , INT_BIT_SW_GP_ );
427- reg_wr (l -> mmio + INT_STS , INT_BIT_SW_GP_ );
428- return success ;
429- }
430399
431400static void
432401lan743x_irq (void * arg )
@@ -453,9 +422,6 @@ lan743x_irq(void *arg)
453422 handle_tx (l );
454423 }
455424
456- if (status & INT_BIT_ALL_OTHER_ ) {
457- handle_test_irq (l );
458- }
459425 reg_wr (l -> mmio + INT_EN_SET , status );
460426
461427 // Clear DMAC interrupt status bits
@@ -697,7 +663,7 @@ lan743x_attach(device_t *d)
697663
698664 l -> irq = pci_irq_attach_intx (pd , PCI_INTA , IRQ_LEVEL_NET , lan743x_irq , l );
699665
700- reg_wr (l -> mmio + INT_EN_SET , INT_BIT_DMA_RX_ (0 ) | INT_BIT_DMA_TX_ (0 ) | INT_BIT_MAS_ | INT_BIT_SW_GP_ );
666+ reg_wr (l -> mmio + INT_EN_SET , INT_BIT_DMA_RX_ (0 ) | INT_BIT_DMA_TX_ (0 ) | INT_BIT_MAS_ );
701667 reg_wr (l -> mmio + DMAC_INT_EN_SET , DMAC_INT_BIT_RXFRM_ (0 ) | DMAC_INT_BIT_TX_IOC_ (0 ));
702668 reg_wr (l -> mmio + DMAC_INT_STS , DMAC_INT_BIT_RXFRM_ (0 ) | DMAC_INT_BIT_TX_IOC_ (0 ));
703669
@@ -751,8 +717,6 @@ lan743x_attach(device_t *d)
751717 | DMAC_INT_BIT_TX_IOC_ (0 );
752718 reg_wr (l -> mmio + DMAC_INT_STS , dmac_status );
753719
754- bool test = test_irq (l );
755- evlog (LOG_DEBUG , "%s: test irq: %s" , l -> name , test ? "success" : "failure" );
756720
757721 // accept unicast, broadcast and multicast
758722 reg_wr (l -> mmio + 0x508 , 1 << 10 | 1 << 9 | 1 << 8 );
0 commit comments