	.file	"extr_cpsw.c__cpsw_adjust_link.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Speed was changed, CBS shaper speeds are changed!"
	.text
	.p2align 4
	.type	_cpsw_adjust_link, @function
_cpsw_adjust_link:
.LFB0:
	.cfi_startproc
	endbr64
	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
	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
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	r13, QWORD PTR 8[rdi]
	test	r13, r13
	je	.L1
	mov	rbx, rdi
	mov	edi, DWORD PTR 16[rdi]
	mov	r15, QWORD PTR 32[rsi]
	mov	rbp, rsi
	mov	r14, rdx
	call	cpsw_get_slave_port@PLT
	cmp	QWORD PTR 16[r13], 0
	mov	r8d, eax
	je	.L3
	mov	eax, DWORD PTR 0[r13]
	mov	r12d, DWORD PTR CPSW_SL_CTL_GMII_EN[rip]
	mov	rdx, QWORD PTR 8[r13]
	cmp	eax, 1000
	je	.L28
	test	rdx, rdx
	jne	.L5
	cmp	eax, 100
	je	.L29
.L8:
	cmp	eax, 10
	je	.L30
.L6:
	cmp	QWORD PTR 24[rbp], 0
	je	.L9
	or	r12d, DWORD PTR CPSW_SL_CTL_RX_FLOW_EN[rip]
.L9:
	cmp	QWORD PTR 16[rbp], 0
	je	.L10
	or	r12d, DWORD PTR CPSW_SL_CTL_TX_FLOW_EN[rip]
.L10:
	cmp	DWORD PTR [rbx], r12d
	je	.L11
	mov	edi, DWORD PTR 4[rbx]
	mov	esi, r12d
	mov	DWORD PTR 12[rsp], r8d
	call	cpsw_sl_ctl_set@PLT
	mov	r8d, DWORD PTR 12[rsp]
.L11:
	mov	ecx, DWORD PTR ALE_PORT_STATE_FORWARD[rip]
	mov	edx, DWORD PTR ALE_PORT_STATE[rip]
	mov	esi, r8d
	mov	edi, DWORD PTR [r15]
	call	cpsw_ale_control_set@PLT
	mov	rax, QWORD PTR 0[rbp]
	mov	DWORD PTR [r14], 1
	test	rax, rax
	je	.L12
	mov	rdx, QWORD PTR 8[rbx]
	movsx	rdx, DWORD PTR [rdx]
	cmp	rax, rdx
	je	.L12
	mov	rdi, rbp
	call	cpsw_shp_is_off@PLT
	test	eax, eax
	jne	.L12
	mov	edi, DWORD PTR 8[rbp]
	lea	rsi, .LC0[rip]
	call	dev_warn@PLT
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L3:
	mov	ecx, DWORD PTR ALE_PORT_STATE_DISABLE[rip]
	mov	edi, DWORD PTR [r15]
	mov	esi, eax
	xor	r12d, r12d
	mov	edx, DWORD PTR ALE_PORT_STATE[rip]
	call	cpsw_ale_control_set@PLT
	mov	edi, DWORD PTR 4[rbx]
	mov	esi, 100
	call	cpsw_sl_wait_for_idle@PLT
	mov	edi, DWORD PTR 4[rbx]
	call	cpsw_sl_ctl_reset@PLT
.L12:
	cmp	DWORD PTR [rbx], r12d
	je	.L13
	mov	rdi, r13
	call	phy_print_status@PLT
.L13:
	mov	DWORD PTR [rbx], r12d
.L1:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L28:
	.cfi_restore_state
	or	r12d, DWORD PTR CPSW_SL_CTL_GIG[rip]
	test	rdx, rdx
	je	.L6
.L5:
	or	r12d, DWORD PTR CPSW_SL_CTL_FULLDUPLEX[rip]
	cmp	eax, 100
	jne	.L8
.L29:
	or	r12d, DWORD PTR CPSW_SL_CTL_IFCTL_A[rip]
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L30:
	mov	rdi, r13
	mov	DWORD PTR 12[rsp], r8d
	call	phy_interface_is_rgmii@PLT
	mov	r8d, DWORD PTR 12[rsp]
	test	rax, rax
	je	.L6
	or	r12d, DWORD PTR CPSW_SL_CTL_EXT_EN[rip]
	jmp	.L6
	.cfi_endproc
.LFE0:
	.size	_cpsw_adjust_link, .-_cpsw_adjust_link
	.comm	CPSW_SL_CTL_TX_FLOW_EN,4,4
	.comm	CPSW_SL_CTL_RX_FLOW_EN,4,4
	.comm	CPSW_SL_CTL_IFCTL_A,4,4
	.comm	CPSW_SL_CTL_GMII_EN,4,4
	.comm	CPSW_SL_CTL_GIG,4,4
	.comm	CPSW_SL_CTL_FULLDUPLEX,4,4
	.comm	CPSW_SL_CTL_EXT_EN,4,4
	.comm	ALE_PORT_STATE_FORWARD,4,4
	.comm	ALE_PORT_STATE_DISABLE,4,4
	.comm	ALE_PORT_STATE,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_cpsw.c__cpsw_adjust_link.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Speed was changed, CBS shaper speeds are changed!\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	_cpsw_adjust_link, %function
_cpsw_adjust_link:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r8, [r0, #8]
	cmp	r8, #0
	popeq	{r4, r5, r6, r7, r8, r9, r10, pc}
	mov	r4, r0
	ldr	r0, [r0, #12]
	mov	r6, r1
	mov	r7, r2
	ldr	r9, [r1, #16]
	bl	cpsw_get_slave_port
	ldr	r5, [r8, #8]
	mov	r10, r0
	cmp	r5, #0
	beq	.L3
	ldr	r3, [r8]
	ldr	r2, .L37
	cmp	r3, #1000
	ldr	r5, [r2]
	ldr	r2, [r8, #4]
	beq	.L34
	cmp	r2, #0
	bne	.L5
	cmp	r3, #100
	beq	.L35
.L8:
	cmp	r3, #10
	beq	.L36
.L6:
	ldr	r3, [r6, #12]
	cmp	r3, #0
	ldrne	r3, .L37+4
	ldrne	r3, [r3]
	orrne	r5, r5, r3
	ldr	r3, [r6, #8]
	cmp	r3, #0
	ldrne	r3, .L37+8
	ldrne	r3, [r3]
	orrne	r5, r5, r3
	ldr	r3, [r4]
	cmp	r3, r5
	beq	.L11
	mov	r1, r5
	ldr	r0, [r4, #4]
	bl	cpsw_sl_ctl_set
.L11:
	ldr	r3, .L37+12
	ldr	r2, .L37+16
	ldr	r3, [r3]
	ldr	r2, [r2]
	mov	r1, r10
	ldr	r0, [r9]
	bl	cpsw_ale_control_set
	mov	r2, #1
	ldr	r3, [r6]
	str	r2, [r7]
	cmp	r3, #0
	beq	.L12
	ldr	r2, [r4, #8]
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L12
	mov	r0, r6
	bl	cpsw_shp_is_off
	cmp	r0, #0
	bne	.L12
	ldr	r0, [r6, #4]
	ldr	r1, .L37+20
	bl	dev_warn
	b	.L12
.L3:
	ldr	r3, .L37+24
	ldr	r2, .L37+16
	mov	r1, r0
	ldr	r3, [r3]
	ldr	r2, [r2]
	ldr	r0, [r9]
	bl	cpsw_ale_control_set
	mov	r1, #100
	ldr	r0, [r4, #4]
	bl	cpsw_sl_wait_for_idle
	ldr	r0, [r4, #4]
	bl	cpsw_sl_ctl_reset
.L12:
	ldr	r3, [r4]
	cmp	r3, r5
	beq	.L13
	mov	r0, r8
	bl	phy_print_status
.L13:
	str	r5, [r4]
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L34:
	ldr	r1, .L37+28
	cmp	r2, #0
	ldr	r2, [r1]
	orr	r5, r5, r2
	beq	.L6
.L5:
	ldr	r2, .L37+32
	cmp	r3, #100
	ldr	r2, [r2]
	orr	r5, r5, r2
	bne	.L8
.L35:
	ldr	r3, .L37+36
	ldr	r3, [r3]
	orr	r5, r5, r3
	b	.L6
.L36:
	mov	r0, r8
	bl	phy_interface_is_rgmii
	cmp	r0, #0
	ldrne	r3, .L37+40
	ldrne	r3, [r3]
	orrne	r5, r5, r3
	b	.L6
.L38:
	.align	2
.L37:
	.word	CPSW_SL_CTL_GMII_EN
	.word	CPSW_SL_CTL_RX_FLOW_EN
	.word	CPSW_SL_CTL_TX_FLOW_EN
	.word	ALE_PORT_STATE_FORWARD
	.word	ALE_PORT_STATE
	.word	.LC0
	.word	ALE_PORT_STATE_DISABLE
	.word	CPSW_SL_CTL_GIG
	.word	CPSW_SL_CTL_FULLDUPLEX
	.word	CPSW_SL_CTL_IFCTL_A
	.word	CPSW_SL_CTL_EXT_EN
	.size	_cpsw_adjust_link, .-_cpsw_adjust_link
	.comm	CPSW_SL_CTL_TX_FLOW_EN,4,4
	.comm	CPSW_SL_CTL_RX_FLOW_EN,4,4
	.comm	CPSW_SL_CTL_IFCTL_A,4,4
	.comm	CPSW_SL_CTL_GMII_EN,4,4
	.comm	CPSW_SL_CTL_GIG,4,4
	.comm	CPSW_SL_CTL_FULLDUPLEX,4,4
	.comm	CPSW_SL_CTL_EXT_EN,4,4
	.comm	ALE_PORT_STATE_FORWARD,4,4
	.comm	ALE_PORT_STATE_DISABLE,4,4
	.comm	ALE_PORT_STATE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
