Subversion Repositories Kolibri OS

Rev

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

Rev 1492 Rev 1514
Line 16... Line 16...
16
;; based on RTL8029.asm driver for menuetos                        ;;
16
;; based on RTL8029.asm driver for menuetos                        ;;
17
;; and realtek8029.asm for SolarOS by Eugen Brasoveanu             ;;
17
;; and realtek8029.asm for SolarOS by Eugen Brasoveanu             ;;
18
;;                                                                 ;;
18
;;                                                                 ;;
19
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
19
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 20... Line 20...
20
 
20
 
Line 21... Line 21...
21
;$Revision: 1492 $
21
;$Revision: 1514 $
Line 22... Line 22...
22
 
22
 
Line 307... Line 307...
307
 
307
 
308
	mov	eax, [DEVICES]
308
	mov	eax, [DEVICES]
309
	mov	[DEVICE_LIST+4*eax], ebx
309
	mov	[DEVICE_LIST+4*eax], ebx
Line 310... Line 310...
310
	inc	[DEVICES]
310
	inc	[DEVICES]
-
 
311
 
-
 
312
	mov	[device.type], NET_TYPE_ETH
311
 
313
	call	NetRegDev
312
	call	EthRegDev				     ; Register the device to kernel (ebx points to device struct)
314
 
313
	cmp	eax, -1
315
	cmp	eax, -1
Line 314... Line 316...
314
	jz	.err
316
	jz	.err
Line 315... Line 317...
315
	ret	4
317
	ret	4
316
 
318
 
317
 
319
 
318
; If the device was already loaded, find the device number and return it in eax
320
; If the device was already loaded, find the device number and return it in eax
319
 
321
 
320
  .find_devicenum:
322
  .find_devicenum:
321
	DEBUGF	1,"Trying to find device number of already registered device\n"
323
	DEBUGF	1,"Trying to find device number of already registered device\n"
322
	mov	ebx, eax
324
	mov	ebx, eax
Line 370... Line 372...
370
 
372
 
Line 371... Line 373...
371
find_device_num:
373
find_device_num:
372
 
374
 
373
	DEBUGF	1,"Trying to find device number of already registered device\n"
375
	DEBUGF	1,"Trying to find device number of already registered device\n"
374
	mov	ebx, eax
376
	mov	ebx, eax
375
	call	EthStruc2Dev						; This kernel procedure converts a pointer to device struct in ebx
377
	call	NetPtrToNum						; This kernel procedure converts a pointer to device struct in ebx
376
									; into a device number in edi
378
									; into a device number in edi
377
	mov	eax, edi						; Application wants it in eax instead
379
	mov	eax, edi						; Application wants it in eax instead