Subversion Repositories Kolibri OS

Rev

Rev 593 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 593 Rev 1644
Line 28... Line 28...
28
;;                                                                 ;;
28
;;                                                                 ;;
29
;;  10.01.2007 Bugfix for l8139_transmit from Paolo Franchetti     ;;
29
;;  10.01.2007 Bugfix for l8139_transmit from Paolo Franchetti     ;;
30
;;                                                                 ;;
30
;;                                                                 ;;
31
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
31
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 32... Line 32...
32
 
32
 
Line 33... Line 33...
33
$Revision: 593 $
33
$Revision: 1644 $
34
 
34
 
35
 
35
 
Line 321... Line 321...
321
	mov	al, (1 shl RTL8139_BIT_RE) or (1 shl RTL8139_BIT_TE)
321
	mov	al, (1 shl RTL8139_BIT_RE) or (1 shl RTL8139_BIT_TE)
322
	add	edx, RTL8139_REG_COMMAND - RTL8139_REG_MAR4
322
	add	edx, RTL8139_REG_COMMAND - RTL8139_REG_MAR4
323
	out	dx, al
323
	out	dx, al
324
; 32k Rxbuffer, unlimited dma burst, no wrapping, no rx threshold
324
; 32k Rxbuffer, unlimited dma burst, no wrapping, no rx threshold
325
; accept broadcast packets, accept physical match packets
325
; accept broadcast packets, accept physical match packets
326
	mov	ax, RTL8139_RX_CONFIG
326
	mov	eax, RTL8139_RX_CONFIG
327
	add	edx, RTL8139_REG_RXCONFIG - RTL8139_REG_COMMAND
327
	add	edx, RTL8139_REG_RXCONFIG - RTL8139_REG_COMMAND
328
	out	dx, ax
328
	out	dx, eax
329
; 1024 bytes DMA burst, total retries = 16 + 8 * 16 = 144
329
; 1024 bytes DMA burst, total retries = 16 + 8 * 16 = 144
330
	mov	ax, (RTL8139_TX_MXDMA shl RTL8139_BIT_TX_MXDMA) \
330
	mov	eax, (RTL8139_TX_MXDMA shl RTL8139_BIT_TX_MXDMA) \
331
		    or (RTL8139_TXRR shl RTL8139_BIT_TXRR)
331
		    or (RTL8139_TXRR shl RTL8139_BIT_TXRR)
332
	add	edx, RTL8139_REG_TXCONFIG - RTL8139_REG_RXCONFIG
332
	add	edx, RTL8139_REG_TXCONFIG - RTL8139_REG_RXCONFIG
333
	out	dx, ax
333
	out	dx, eax
334
; enable auto negotiation
334
; enable auto negotiation
335
	add	edx, RTL8139_REG_BMCR - RTL8139_REG_TXCONFIG
335
	add	edx, RTL8139_REG_BMCR - RTL8139_REG_TXCONFIG
336
	in	ax, dx
336
	in	ax, dx
337
	or	ax, (1 shl RTL8139_BIT_ANE)
337
	or	ax, (1 shl RTL8139_BIT_ANE)
338
	out	dx, ax
338
	out	dx, ax