	.file	"extr_i40e_virtchnl_pf.c_i40e_reset_all_vfs.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"VF reset check timeout on VF %d\n"
	.text
	.p2align 4
	.globl	i40e_reset_all_vfs
	.type	i40e_reset_all_vfs, @function
i40e_reset_all_vfs:
.LFB0:
	.cfi_startproc
	endbr64
	mov	ecx, DWORD PTR [rdi]
	test	ecx, ecx
	jne	.L2
	xor	eax, eax
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13d, esi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	mov	esi, DWORD PTR 4[rdi]
	mov	edi, DWORD PTR __I40E_VF_DISABLE[rip]
	call	test_and_set_bit@PLT
	test	rax, rax
	jne	.L4
	mov	eax, DWORD PTR [rbx]
	test	eax, eax
	jle	.L5
	xor	ebp, ebp
	.p2align 4,,10
	.p2align 3
.L6:
	mov	rdi, rbp
	mov	esi, r13d
	add	rbp, 1
	sal	rdi, 4
	add	rdi, QWORD PTR 8[rbx]
	call	i40e_trigger_vf_reset@PLT
	mov	eax, DWORD PTR [rbx]
	cmp	eax, ebp
	jg	.L6
.L5:
	xor	r14d, r14d
	lea	rbp, 32[rbx]
	mov	r12d, 10
	cmp	r14d, eax
	jge	.L51
	.p2align 4,,10
	.p2align 3
.L11:
	mov	esi, 20000
	mov	edi, 10000
	call	usleep_range@PLT
	cmp	DWORD PTR [rbx], r14d
	jle	.L8
	movsx	r15, r14d
	sal	r15, 4
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L52:
	add	r14d, 1
	add	r15, 16
	cmp	DWORD PTR [rbx], r14d
	jle	.L8
.L9:
	mov	rax, QWORD PTR 8[rbx]
	mov	edi, DWORD PTR 8[rax+r15]
	call	I40E_VPGEN_VFRSTAT@PLT
	mov	rdi, rbp
	mov	esi, eax
	call	rd32@PLT
	test	DWORD PTR I40E_VPGEN_VFRSTAT_VFRD_MASK[rip], eax
	jne	.L52
.L8:
	sub	r12d, 1
	je	.L10
	mov	eax, DWORD PTR [rbx]
	cmp	r14d, eax
	jl	.L11
.L51:
	test	r13d, r13d
	jne	.L23
.L15:
	mov	esi, 20000
	mov	edi, 10000
	xor	r12d, r12d
	call	usleep_range@PLT
	mov	edx, DWORD PTR [rbx]
	test	edx, edx
	jle	.L20
	.p2align 4,,10
	.p2align 3
.L16:
	mov	rax, r12
	sal	rax, 4
	add	rax, QWORD PTR 8[rbx]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	je	.L19
	mov	rdx, QWORD PTR 16[rbx]
	mov	edi, DWORD PTR [rdx+rax*4]
	call	i40e_vsi_stop_rings_no_wait@PLT
.L19:
	mov	eax, DWORD PTR [rbx]
	add	r12, 1
	cmp	eax, r12d
	jg	.L16
	test	eax, eax
	jle	.L20
	xor	r12d, r12d
	.p2align 4,,10
	.p2align 3
.L22:
	mov	rax, r12
	sal	rax, 4
	add	rax, QWORD PTR 8[rbx]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	je	.L21
	mov	rdx, QWORD PTR 16[rbx]
	mov	edi, DWORD PTR [rdx+rax*4]
	call	i40e_vsi_wait_queues_disabled@PLT
.L21:
	add	r12, 1
	cmp	DWORD PTR [rbx], r12d
	jg	.L22
.L20:
	mov	edi, 50
	xor	r12d, r12d
	call	mdelay@PLT
	mov	eax, DWORD PTR [rbx]
	test	eax, eax
	jle	.L18
	.p2align 4,,10
	.p2align 3
.L17:
	mov	rdi, r12
	add	r12, 1
	sal	rdi, 4
	add	rdi, QWORD PTR 8[rbx]
	call	i40e_cleanup_reset_vf@PLT
	cmp	DWORD PTR [rbx], r12d
	jg	.L17
.L18:
	mov	rdi, rbp
	call	i40e_flush@PLT
	mov	esi, DWORD PTR 4[rbx]
	mov	edi, DWORD PTR __I40E_VF_DISABLE[rip]
	call	clear_bit@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, 1
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
.L4:
	.cfi_restore_state
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	test	r13d, r13d
	jne	.L23
	cmp	DWORD PTR [rbx], r14d
	jle	.L15
.L53:
	movsx	rax, r14d
	mov	rdi, QWORD PTR 24[rbx]
	lea	rsi, .LC0[rip]
	sal	rax, 4
	add	rax, QWORD PTR 8[rbx]
	mov	edx, DWORD PTR 8[rax]
	call	dev_err@PLT
	jmp	.L15
.L23:
	mov	esi, 20000
	mov	edi, 10000
	call	usleep_range@PLT
	cmp	DWORD PTR [rbx], r14d
	jle	.L15
	jmp	.L53
	.cfi_endproc
.LFE0:
	.size	i40e_reset_all_vfs, .-i40e_reset_all_vfs
	.comm	__I40E_VF_DISABLE,4,4
	.comm	I40E_VPGEN_VFRSTAT_VFRD_MASK,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_i40e_virtchnl_pf.c_i40e_reset_all_vfs.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"VF reset check timeout on VF %d\012\000"
	.text
	.align	2
	.global	i40e_reset_all_vfs
	.syntax unified
	.arm
	.fpu softvfp
	.type	i40e_reset_all_vfs, %function
i40e_reset_all_vfs:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r2, [r0]
	cmp	r2, #0
	bne	.L2
	mov	r0, #0
	bx	lr
.L2:
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r3, .L52
	mov	r9, r0
	mov	r8, r1
	ldr	r1, [r0, #4]
	ldr	r0, [r3]
	bl	test_and_set_bit
	subs	r6, r0, #0
	bne	.L4
	ldr	r1, [r9]
	cmp	r1, #0
	ble	.L5
	mov	r4, r6
.L6:
	ldr	r0, [r9, #8]
	mov	r1, r8
	add	r0, r0, r4, lsl #3
	bl	i40e_trigger_vf_reset
	ldr	r1, [r9]
	add	r4, r4, #1
	cmp	r1, r4
	bgt	.L6
.L5:
	mov	fp, #0
	cmp	fp, r1
	mov	r7, #10
	ldr	r10, .L52+4
	ldr	r5, .L52+8
	add	r4, r9, #20
	bge	.L49
.L11:
	mov	r1, r10
	ldr	r0, .L52+12
	bl	usleep_range
	ldr	r1, [r9]
	cmp	r1, fp
	bgt	.L9
	b	.L8
.L50:
	ldr	r1, [r9]
	add	fp, fp, #1
	cmp	r1, fp
	ble	.L8
.L9:
	ldr	r1, [r9, #8]
	add	r1, r1, fp, lsl #3
	ldr	r0, [r1, #4]
	bl	I40E_VPGEN_VFRSTAT
	mov	r1, r0
	mov	r0, r4
	bl	rd32
	ldr	r1, [r5]
	tst	r0, r1
	bne	.L50
.L8:
	subs	r7, r7, #1
	beq	.L10
	ldr	r1, [r9]
	cmp	fp, r1
	blt	.L11
.L49:
	cmp	r8, #0
	bne	.L23
.L15:
	ldr	r1, .L52+4
	ldr	r0, .L52+12
	bl	usleep_range
	ldr	r2, [r9]
	cmp	r2, #0
	movgt	r5, #0
	ble	.L20
.L16:
	ldr	r1, [r9, #8]
	ldr	r1, [r1, r5, lsl #3]
	add	r5, r5, #1
	cmp	r1, #0
	beq	.L19
	ldr	r2, [r9, #12]
	ldr	r0, [r2, r1, lsl #2]
	bl	i40e_vsi_stop_rings_no_wait
	ldr	r2, [r9]
.L19:
	cmp	r2, r5
	bgt	.L16
	cmp	r2, #0
	ble	.L20
	mov	r5, #0
.L22:
	ldr	r1, [r9, #8]
	ldr	r1, [r1, r5, lsl #3]
	add	r5, r5, #1
	cmp	r1, #0
	beq	.L21
	ldr	r2, [r9, #12]
	ldr	r0, [r2, r1, lsl #2]
	bl	i40e_vsi_wait_queues_disabled
	ldr	r2, [r9]
.L21:
	cmp	r2, r5
	bgt	.L22
.L20:
	mov	r0, #50
	bl	mdelay
	ldr	r2, [r9]
	cmp	r2, #0
	ble	.L18
.L17:
	ldr	r0, [r9, #8]
	add	r0, r0, r6, lsl #3
	bl	i40e_cleanup_reset_vf
	ldr	r2, [r9]
	add	r6, r6, #1
	cmp	r2, r6
	bgt	.L17
.L18:
	mov	r0, r4
	bl	i40e_flush
	ldr	r3, .L52
	ldr	r1, [r9, #4]
	ldr	r0, [r3]
	bl	clear_bit
	mov	r0, #1
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L4:
	mov	r0, #0
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L10:
	cmp	r8, #0
	bne	.L23
	ldr	r1, [r9]
	cmp	r1, fp
	ble	.L15
.L51:
	ldr	r0, [r9, #8]
	ldr	r1, .L52+16
	add	r2, r0, fp, lsl #3
	ldr	r2, [r2, #4]
	ldr	r0, [r9, #16]
	bl	dev_err
	b	.L15
.L23:
	ldr	r1, .L52+4
	ldr	r0, .L52+12
	bl	usleep_range
	ldr	r1, [r9]
	cmp	r1, fp
	ble	.L15
	b	.L51
.L53:
	.align	2
.L52:
	.word	__I40E_VF_DISABLE
	.word	20000
	.word	I40E_VPGEN_VFRSTAT_VFRD_MASK
	.word	10000
	.word	.LC0
	.size	i40e_reset_all_vfs, .-i40e_reset_all_vfs
	.comm	__I40E_VF_DISABLE,4,4
	.comm	I40E_VPGEN_VFRSTAT_VFRD_MASK,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
