diff options
Diffstat (limited to 'src/drivers')
| -rw-r--r-- | src/drivers/bus/isapnp.c | 2 | ||||
| -rw-r--r-- | src/drivers/net/legacy.c | 11 | ||||
| -rw-r--r-- | src/drivers/net/pnic.c | 23 | ||||
| -rw-r--r-- | src/drivers/net/rtl8139.c | 31 |
4 files changed, 10 insertions, 57 deletions
diff --git a/src/drivers/bus/isapnp.c b/src/drivers/bus/isapnp.c index 79268d440..b34108c77 100644 --- a/src/drivers/bus/isapnp.c +++ b/src/drivers/bus/isapnp.c @@ -529,7 +529,7 @@ static int isapnp_try_isolate ( void ) { * */ static void isapnp_isolate ( void ) { - for ( isapnp_read_port = ISAPNP_READ_PORT_MIN ; + for ( isapnp_read_port = ISAPNP_READ_PORT_START ; isapnp_read_port <= ISAPNP_READ_PORT_MAX ; isapnp_read_port += ISAPNP_READ_PORT_STEP ) { /* Avoid problematic locations such as the NE2000 diff --git a/src/drivers/net/legacy.c b/src/drivers/net/legacy.c index 22ddfe661..2d4633d44 100644 --- a/src/drivers/net/legacy.c +++ b/src/drivers/net/legacy.c @@ -57,12 +57,17 @@ static void legacy_poll ( struct net_device *netdev, unsigned int rx_quota ) { } } -static int legacy_open ( struct net_device *netdev __unused ) { +static int legacy_open ( struct net_device *netdev ) { + struct nic *nic = netdev->priv; + + nic->nic_op->irq ( nic, ENABLE ); return 0; } -static void legacy_close ( struct net_device *netdev __unused ) { - /* Nothing to do */ +static void legacy_close ( struct net_device *netdev ) { + struct nic *nic = netdev->priv; + + nic->nic_op->irq ( nic, DISABLE ); } int legacy_probe ( void *hwdev, diff --git a/src/drivers/net/pnic.c b/src/drivers/net/pnic.c index 63b4195ff..f614a073c 100644 --- a/src/drivers/net/pnic.c +++ b/src/drivers/net/pnic.c @@ -161,29 +161,6 @@ static int pnic_transmit ( struct net_device *netdev, struct io_buffer *iobuf ) } /************************************************************************** -IRQ - Handle card interrupt status -***************************************************************************/ -#if 0 -static void pnic_irq ( struct net_device *netdev, irq_action_t action ) { - struct pnic *pnic = netdev->priv; - uint8_t enabled; - - switch ( action ) { - case DISABLE : - case ENABLE : - enabled = ( action == ENABLE ? 1 : 0 ); - pnic_command ( pnic, PNIC_CMD_MASK_IRQ, - &enabled, sizeof ( enabled ), NULL, 0, NULL ); - break; - case FORCE : - pnic_command ( pnic, PNIC_CMD_FORCE_IRQ, - NULL, 0, NULL, 0, NULL ); - break; - } -} -#endif - -/************************************************************************** OPEN - Open network device ***************************************************************************/ static int pnic_open ( struct net_device *netdev ) { diff --git a/src/drivers/net/rtl8139.c b/src/drivers/net/rtl8139.c index 6acffd9b8..90a7182bc 100644 --- a/src/drivers/net/rtl8139.c +++ b/src/drivers/net/rtl8139.c @@ -380,8 +380,7 @@ static int rtl_transmit ( struct net_device *netdev, struct io_buffer *iobuf ) { /* Check for space in TX ring */ if ( rtl->tx.iobuf[rtl->tx.next] != NULL ) { - printf ( "TX overflow\n" ); - free_iob ( iobuf ); + DBG ( "TX overflow\n" ); return -ENOBUFS; } @@ -472,34 +471,6 @@ static void rtl_poll ( struct net_device *netdev, unsigned int rx_quota ) { } } -#if 0 -static void rtl_irq(struct nic *nic, irq_action_t action) -{ - unsigned int mask; - /* Bit of a guess as to which interrupts we should allow */ - unsigned int interested = ROK | RER | RXOVW | FOVW | SERR; - - switch ( action ) { - case DISABLE : - case ENABLE : - mask = inw(rtl->ioaddr + IntrMask); - mask = mask & ~interested; - if ( action == ENABLE ) mask = mask | interested; - outw(mask, rtl->ioaddr + IntrMask); - break; - case FORCE : - /* Apparently writing a 1 to this read-only bit of a - * read-only and otherwise unrelated register will - * force an interrupt. If you ever want to see how - * not to write a datasheet, read the one for the - * RTL8139... - */ - outb(EROK, rtl->ioaddr + RxEarlyStatus); - break; - } -} -#endif - /** * Probe PCI device * |
