david/ipxe
david
/
ipxe
Archived
1
0
Fork 0

Enable/disable interrupts at open/close time.

This commit is contained in:
Michael Brown 2007-07-03 03:34:08 +01:00
parent 258afef751
commit 290280f90e
1 changed files with 9 additions and 0 deletions

View File

@ -302,6 +302,12 @@ static struct nvo_fragment rtl_nvo_fragments[] = {
*/
static void rtl_reset ( struct rtl8139_nic *rtl ) {
/* Disable interrupts. May not be necessary, but datasheet
* doesn't say that the reset command also resets the
* interrupt mask.
*/
outw ( 0, rtl->ioaddr + IntrMask );
/* Reset chip */
outb ( CmdReset, rtl->ioaddr + ChipCmd );
mdelay ( 10 );
@ -340,6 +346,9 @@ static int rtl_open ( struct net_device *netdev ) {
outl ( ( ( TX_DMA_BURST << 8 ) | ( TX_IPG << 24 ) ),
rtl->ioaddr + TxConfig );
/* Enable interrupts */
outw ( ( ROK | RER | TOK | TER ), rtl->ioaddr + IntrMask );
return 0;
}