Subversion Repositories Kolibri OS

Rev

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

Rev 1521 Rev 1545
Line 2164... Line 2164...
2164
;      check_tx_status
2164
;      check_tx_status
2165
;   Description
2165
;   Description
2166
;      Checks TxStatus queue.
2166
;      Checks TxStatus queue.
2167
;   Return value
2167
;   Return value
2168
;      al - 0 no error was found
2168
;      al - 0 no error was found
2169
;      al - 1 error was found TxReset is needed
2169
;      al - 1 error was found TxReset was needed
2170
;   Destroyed registers
2170
;   Destroyed registers
2171
;      eax, ecx, edx, ebp
2171
;      eax, ecx, edx, ebp
2172
;
2172
;
2173
;***************************************************************************
2173
;***************************************************************************
Line 2185... Line 2185...
2185
  .tx_status_loop:
2185
  .tx_status_loop:
2186
	in	al, dx
2186
	in	al, dx
2187
	test	al, al
2187
	test	al, al
2188
	jz	.finish ; no error
2188
	jz	.finish ; no error
2189
	test	al, 0x3f
2189
	test	al, 0x3f
2190
	jnz	.finish ; error
2190
	jnz	.error
2191
  .no_error_found:
2191
  .no_error_found:
2192
; clear current TxStatus entry which advances the next one
2192
; clear current TxStatus entry which advances the next one
2193
	xor	al, al
2193
	xor	al, al
2194
	out	dx, al
2194
	out	dx, al
2195
	loop	.tx_status_loop
2195
	loop	.tx_status_loop
Line 2196... Line 2196...
2196
 
2196
 
Line 2197... Line 2197...
2197
  .finish:
2197
  .finish:
Line -... Line 2198...
-
 
2198
 
-
 
2199
	ret
-
 
2200
 
-
 
2201
  .error:
Line 2198... Line 2202...
2198
 
2202
	call	tx_reset
2199
	ret
2203
	ret
2200
 
2204
 
Line 2217... Line 2221...
2217
 
2221
 
2218
	cmp	dword [esp+8], MAX_ETH_FRAME_SIZE
2222
	cmp	dword [esp+8], MAX_ETH_FRAME_SIZE
Line 2219... Line 2223...
2219
	ja	.finish ; packet is too long
2223
	ja	.finish ; packet is too long
2220
 
-
 
2221
	call	check_tx_status
-
 
Line 2222... Line 2224...
2222
	test	al, al
2224
 
2223
	jnz	tx_reset
2225
	call	check_tx_status
2224
 
2226
 
2225
; switch to register window 7
2227
; switch to register window 7
Line 2276... Line 2278...
2276
	cmp	dword [esp+8], MAX_ETH_FRAME_SIZE
2278
	cmp	dword [esp+8], MAX_ETH_FRAME_SIZE
2277
	jg	.fail
2279
	jg	.fail
Line 2278... Line 2280...
2278
 
2280
 
Line 2279... Line -...
2279
	call	check_tx_status
-
 
2280
 
-
 
2281
	test	al, al
-
 
2282
	jnz	tx_reset
2281
	call	check_tx_status
2283
 
2282
 
2284
; calculate descriptor address
2283
; calculate descriptor address
2285
	mov	esi, [device.prev_dpd]
2284
	mov	esi, [device.prev_dpd]
2286
	DEBUGF	1,"Previous DPD: %x\n", esi
2285
	DEBUGF	1,"Previous DPD: %x\n", esi