	.file	"extr_bnx2x_link.c_bnx2x_update_link_down.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Port %x: Link is down\n"
	.text
	.p2align 4
	.type	bnx2x_update_link_down, @function
bnx2x_update_link_down:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rsi
	lea	rsi, .LC0[rip]
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	r12d, DWORD PTR [rdi]
	mov	r13, QWORD PTR 8[rdi]
	mov	edi, DWORD PTR NETIF_MSG_LINK[rip]
	mov	edx, r12d
	sal	r12d, 2
	call	DP@PLT
	mov	edx, DWORD PTR LED_MODE_OFF[rip]
	xor	ecx, ecx
	mov	rsi, rbx
	mov	rdi, rbp
	movsx	r12, r12d
	call	bnx2x_set_led@PLT
	mov	eax, DWORD PTR PHY_PHYSICAL_LINK_FLAG[rip]
	mov	esi, DWORD PTR LINK_UPDATE_MASK[rip]
	mov	rdi, rbp
	mov	QWORD PTR 8[rbx], 0
	not	eax
	and	DWORD PTR 20[rbx], eax
	mov	eax, DWORD PTR MAC_TYPE_NONE[rip]
	not	esi
	and	esi, DWORD PTR 4[rbx]
	mov	DWORD PTR 4[rbx], esi
	mov	DWORD PTR 16[rbx], eax
	call	bnx2x_update_mng@PLT
	mov	rsi, QWORD PTR NIG_REG_EGRESS_DRAIN0_MODE[rip]
	mov	rdi, r13
	mov	edx, 1
	add	rsi, r12
	call	REG_WR@PLT
	mov	rdi, r13
	call	CHIP_IS_E3@PLT
	test	rax, rax
	je	.L12
.L2:
	mov	edi, 10000
	mov	esi, 20000
	call	usleep_range@PLT
	mov	rdi, r13
	call	CHIP_IS_E1x@PLT
	test	rax, rax
	jne	.L5
	mov	rdi, r13
	call	CHIP_IS_E2@PLT
	test	rax, rax
	jne	.L5
	mov	rdi, r13
	call	CHIP_IS_E3@PLT
	test	rax, rax
	jne	.L13
.L6:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	mov	esi, DWORD PTR 4[rbp]
	mov	edx, DWORD PTR 0[rbp]
	xor	ecx, ecx
	mov	rdi, r13
	call	bnx2x_set_bmac_rx@PLT
	mov	rdi, r13
	call	CHIP_IS_E3@PLT
	test	rax, rax
	je	.L6
.L13:
	mov	eax, DWORD PTR 0[rbp]
	mov	rdi, r13
	xor	edx, edx
	lea	esi, 0[0+rax*4]
	movsx	rsi, esi
	add	rsi, QWORD PTR MISC_REG_CPMU_LP_FW_ENABLE_P0[rip]
	call	REG_WR@PLT
	mov	eax, DWORD PTR 0[rbp]
	xor	edx, edx
	mov	rdi, r13
	lea	esi, 0[0+rax*4]
	movsx	rsi, esi
	add	rsi, QWORD PTR MISC_REG_CPMU_LP_MASK_ENT_P0[rip]
	call	REG_WR@PLT
	mov	esi, DWORD PTR SHMEM_EEE_LP_ADV_STATUS_MASK[rip]
	mov	rdi, rbp
	or	esi, DWORD PTR SHMEM_EEE_ACTIVE_BIT[rip]
	not	esi
	and	esi, DWORD PTR [rbx]
	mov	DWORD PTR [rbx], esi
	call	bnx2x_update_mng_eee@PLT
	mov	rdi, rbp
	xor	esi, esi
	call	bnx2x_set_xmac_rxtx@PLT
	mov	rdi, rbp
	xor	esi, esi
	call	bnx2x_set_umac_rxtx@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	mov	rsi, QWORD PTR NIG_REG_NIG_EMAC0_EN[rip]
	xor	edx, edx
	mov	rdi, r13
	add	rsi, r12
	call	REG_WR@PLT
	jmp	.L2
	.cfi_endproc
.LFE0:
	.size	bnx2x_update_link_down, .-bnx2x_update_link_down
	.comm	SHMEM_EEE_LP_ADV_STATUS_MASK,4,4
	.comm	SHMEM_EEE_ACTIVE_BIT,4,4
	.comm	PHY_PHYSICAL_LINK_FLAG,4,4
	.comm	NIG_REG_NIG_EMAC0_EN,8,8
	.comm	NIG_REG_EGRESS_DRAIN0_MODE,8,8
	.comm	NETIF_MSG_LINK,4,4
	.comm	MISC_REG_CPMU_LP_MASK_ENT_P0,8,8
	.comm	MISC_REG_CPMU_LP_FW_ENABLE_P0,8,8
	.comm	MAC_TYPE_NONE,4,4
	.comm	LINK_UPDATE_MASK,4,4
	.comm	LED_MODE_OFF,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_bnx2x_link.c_bnx2x_update_link_down.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Port %x: Link is down\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	bnx2x_update_link_down, %function
bnx2x_update_link_down:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r5, r0
	mov	r4, r1
	ldr	r7, [r0]
	ldr	r3, .L14
	mov	r2, r7
	ldr	r0, [r3]
	ldr	r1, .L14+4
	ldr	r6, [r5, #8]
	bl	DP
	ldr	r3, .L14+8
	mov	r1, r4
	ldr	r2, [r3]
	mov	r0, r5
	mov	r3, #0
	bl	bnx2x_set_led
	mov	r2, #0
	ldr	r1, .L14+12
	ldr	r3, [r4, #16]
	ldr	r1, [r1]
	ldr	ip, .L14+16
	ldr	r0, .L14+20
	ldr	ip, [ip]
	bic	r3, r3, r1
	ldr	r1, [r4, #4]
	ldr	r0, [r0]
	bic	r1, r1, ip
	stmib	r4, {r1, r2}
	str	r3, [r4, #16]
	str	r0, [r4, #12]
	mov	r0, r5
	bl	bnx2x_update_mng
	ldr	r3, .L14+24
	mov	r2, #1
	ldr	r1, [r3]
	mov	r0, r6
	add	r1, r1, r7, lsl #2
	bl	REG_WR
	mov	r0, r6
	bl	CHIP_IS_E3
	subs	r2, r0, #0
	beq	.L12
.L2:
	ldr	r1, .L14+28
	ldr	r0, .L14+32
	bl	usleep_range
	mov	r0, r6
	bl	CHIP_IS_E1x
	cmp	r0, #0
	bne	.L5
	mov	r0, r6
	bl	CHIP_IS_E2
	cmp	r0, #0
	bne	.L5
	mov	r0, r6
	bl	CHIP_IS_E3
	cmp	r0, #0
	bne	.L13
.L6:
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L5:
	mov	r3, #0
	ldr	r2, [r5]
	ldr	r1, [r5, #4]
	mov	r0, r6
	bl	bnx2x_set_bmac_rx
	mov	r0, r6
	bl	CHIP_IS_E3
	cmp	r0, #0
	beq	.L6
.L13:
	ldr	r3, .L14+36
	ldr	r1, [r5]
	ldr	r3, [r3]
	mov	r2, #0
	add	r1, r3, r1, lsl #2
	mov	r0, r6
	bl	REG_WR
	ldr	r3, .L14+40
	ldr	r1, [r5]
	ldr	r3, [r3]
	mov	r0, r6
	add	r1, r3, r1, lsl #2
	mov	r2, #0
	bl	REG_WR
	ldr	r3, .L14+44
	ldr	r2, .L14+48
	ldr	r3, [r3]
	ldr	r2, [r2]
	ldr	r1, [r4]
	orr	r3, r3, r2
	bic	r1, r1, r3
	str	r1, [r4]
	mov	r0, r5
	bl	bnx2x_update_mng_eee
	mov	r1, #0
	mov	r0, r5
	bl	bnx2x_set_xmac_rxtx
	mov	r0, r5
	mov	r1, #0
	bl	bnx2x_set_umac_rxtx
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L12:
	ldr	r3, .L14+52
	lsl	r7, r7, #2
	ldr	r1, [r3]
	mov	r0, r6
	add	r1, r7, r1
	bl	REG_WR
	b	.L2
.L15:
	.align	2
.L14:
	.word	NETIF_MSG_LINK
	.word	.LC0
	.word	LED_MODE_OFF
	.word	PHY_PHYSICAL_LINK_FLAG
	.word	LINK_UPDATE_MASK
	.word	MAC_TYPE_NONE
	.word	NIG_REG_EGRESS_DRAIN0_MODE
	.word	20000
	.word	10000
	.word	MISC_REG_CPMU_LP_FW_ENABLE_P0
	.word	MISC_REG_CPMU_LP_MASK_ENT_P0
	.word	SHMEM_EEE_LP_ADV_STATUS_MASK
	.word	SHMEM_EEE_ACTIVE_BIT
	.word	NIG_REG_NIG_EMAC0_EN
	.size	bnx2x_update_link_down, .-bnx2x_update_link_down
	.comm	SHMEM_EEE_LP_ADV_STATUS_MASK,4,4
	.comm	SHMEM_EEE_ACTIVE_BIT,4,4
	.comm	PHY_PHYSICAL_LINK_FLAG,4,4
	.comm	NIG_REG_NIG_EMAC0_EN,4,4
	.comm	NIG_REG_EGRESS_DRAIN0_MODE,4,4
	.comm	NETIF_MSG_LINK,4,4
	.comm	MISC_REG_CPMU_LP_MASK_ENT_P0,4,4
	.comm	MISC_REG_CPMU_LP_FW_ENABLE_P0,4,4
	.comm	MAC_TYPE_NONE,4,4
	.comm	LINK_UPDATE_MASK,4,4
	.comm	LED_MODE_OFF,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
