	.file	"extr_lpfc_init.c_lpfc_pci_function_reset.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"0494 Unable to allocate memory for issuing SLI_FUNCTION_RESET mailbox command\n"
	.align 8
.LC1:
	.string	"0495 SLI_FUNCTION_RESET mailbox failed with status x%x add_status x%x, mbx status x%x\n"
	.align 8
.LC2:
	.string	"2890 Port not ready, port status reg 0x%x error 1=0x%x, error 2=0x%x\n"
	.align 8
.LC3:
	.string	"3317 HBA not functional: IP Reset Failed try: echo fw_reset > board_mode\n"
	.text
	.p2align 4
	.globl	lpfc_pci_function_reset
	.type	lpfc_pci_function_reset, @function
lpfc_pci_function_reset:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	lea	rsi, 20[rdi]
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	sub	rsp, 16
	.cfi_def_cfa_offset 64
	mov	edi, DWORD PTR lpfc_sli_intf_if_type[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	call	bf_get@PLT
	cmp	eax, 129
	jle	.L35
	cmp	eax, 131
	jne	.L17
	mov	edi, DWORD PTR 32[r12]
	mov	esi, DWORD PTR GFP_KERNEL[rip]
	call	mempool_alloc@PLT
	mov	rbp, rax
	test	rax, rax
	je	.L36
	mov	r9d, DWORD PTR LPFC_SLI4_MBX_EMBED[rip]
	xor	r8d, r8d
	mov	rsi, rax
	mov	rdi, r12
	mov	ecx, DWORD PTR LPFC_MBOX_OPCODE_FUNCTION_RESET[rip]
	mov	edx, DWORD PTR LPFC_MBOX_SUBSYSTEM_COMMON[rip]
	call	lpfc_sli4_config@PLT
	mov	edx, DWORD PTR MBX_POLL[rip]
	mov	rsi, rbp
	mov	rdi, r12
	call	lpfc_sli_issue_mbox@PLT
	mov	edi, DWORD PTR lpfc_mbox_hdr_status[rip]
	mov	rsi, rbp
	mov	ebx, eax
	call	bf_get@PLT
	mov	edi, DWORD PTR lpfc_mbox_hdr_add_status[rip]
	mov	rsi, rbp
	mov	r14d, eax
	call	bf_get@PLT
	cmp	DWORD PTR MBX_TIMEOUT[rip], ebx
	mov	r13d, eax
	jne	.L37
	mov	eax, ebx
	or	eax, r14d
	or	eax, r13d
	jne	.L12
	.p2align 4,,10
	.p2align 3
.L17:
	xor	eax, eax
.L1:
	mov	rcx, QWORD PTR 8[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L38
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	pop	rbx
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L35:
	.cfi_restore_state
	cmp	eax, 127
	jle	.L17
	mov	ebx, 1500
	mov	rbp, rsp
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L39:
	mov	edi, DWORD PTR lpfc_sliport_status_rdy[rip]
	mov	rsi, rbp
	call	bf_get@PLT
	test	eax, eax
	jne	.L7
	mov	edi, 20
	call	msleep@PLT
	sub	ebx, 1
	je	.L7
.L3:
	mov	edi, DWORD PTR 16[r12]
	mov	rsi, rbp
	call	lpfc_readl@PLT
	test	eax, eax
	je	.L39
.L32:
	mov	eax, DWORD PTR ENODEV[rip]
	neg	eax
.L13:
	test	eax, eax
	je	.L17
	mov	edx, DWORD PTR LOG_INIT[rip]
	mov	esi, DWORD PTR KERN_ERR[rip]
	mov	rdi, r12
	xor	eax, eax
	lea	rcx, .LC3[rip]
	call	lpfc_printf_log@PLT
	mov	eax, DWORD PTR ENODEV[rip]
	neg	eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L36:
	mov	edx, DWORD PTR LOG_INIT[rip]
	mov	esi, DWORD PTR KERN_ERR[rip]
	mov	rdi, r12
	xor	eax, eax
	lea	rcx, .LC0[rip]
	call	lpfc_printf_log@PLT
	mov	eax, DWORD PTR ENOMEM[rip]
	neg	eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L37:
	mov	esi, DWORD PTR 32[r12]
	mov	rdi, rbp
	call	mempool_free@PLT
	mov	eax, ebx
	or	eax, r14d
	or	eax, r13d
	je	.L17
.L12:
	sub	rsp, 8
	.cfi_def_cfa_offset 72
	mov	esi, DWORD PTR KERN_ERR[rip]
	mov	rdi, r12
	mov	r9d, r13d
	push	rbx
	.cfi_def_cfa_offset 80
	mov	edx, DWORD PTR LOG_INIT[rip]
	mov	r8d, r14d
	xor	eax, eax
	lea	rcx, .LC1[rip]
	call	lpfc_printf_log@PLT
	mov	eax, DWORD PTR ENXIO[rip]
	pop	rsi
	.cfi_def_cfa_offset 72
	pop	rdi
	.cfi_def_cfa_offset 64
	neg	eax
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L7:
	mov	edi, DWORD PTR lpfc_sliport_status_rdy[rip]
	mov	rsi, rbp
	call	bf_get@PLT
	test	eax, eax
	je	.L8
	mov	edx, DWORD PTR LPFC_SLIPORT_LITTLE_ENDIAN[rip]
	mov	edi, DWORD PTR lpfc_sliport_ctrl_end[rip]
	mov	rsi, rbp
	mov	DWORD PTR [rsp], 0
	mov	ebx, 1500
	call	bf_set@PLT
	mov	edx, DWORD PTR LPFC_SLIPORT_INIT_PORT[rip]
	mov	edi, DWORD PTR lpfc_sliport_ctrl_ip[rip]
	mov	rsi, rbp
	call	bf_set@PLT
	mov	esi, DWORD PTR 4[r12]
	mov	edi, DWORD PTR [rsp]
	call	writel@PLT
	mov	esi, DWORD PTR PCI_DEVICE_ID[rip]
	mov	edi, DWORD PTR [r12]
	lea	rdx, 4[rsp]
	call	pci_read_config_word@PLT
	mov	edi, 20
	call	msleep@PLT
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L14:
	mov	edi, DWORD PTR lpfc_sliport_status_rdy[rip]
	mov	rsi, rbp
	call	bf_get@PLT
	test	eax, eax
	jne	.L15
	mov	edi, 20
	call	msleep@PLT
	sub	ebx, 1
	je	.L15
.L9:
	mov	edi, DWORD PTR 16[r12]
	mov	rsi, rbp
	call	lpfc_readl@PLT
	test	eax, eax
	je	.L14
	jmp	.L32
	.p2align 4,,10
	.p2align 3
.L15:
	mov	edi, DWORD PTR lpfc_sliport_status_rdy[rip]
	mov	rsi, rbp
	call	bf_get@PLT
	test	eax, eax
	je	.L8
	mov	edi, DWORD PTR lpfc_sliport_status_rn[rip]
	mov	rsi, rbp
	call	bf_get@PLT
	test	eax, eax
	je	.L17
	jmp	.L32
.L8:
	mov	edi, DWORD PTR 12[r12]
	mov	rbx, QWORD PTR 24[r12]
	call	readl@PLT
	mov	edi, DWORD PTR 8[r12]
	mov	QWORD PTR [rbx], rax
	mov	rbx, QWORD PTR 24[r12]
	call	readl@PLT
	sub	rsp, 8
	.cfi_def_cfa_offset 72
	mov	rdi, r12
	mov	edx, DWORD PTR LOG_INIT[rip]
	mov	QWORD PTR 8[rbx], rax
	mov	rax, QWORD PTR 24[r12]
	lea	rcx, .LC2[rip]
	mov	esi, DWORD PTR KERN_ERR[rip]
	push	QWORD PTR 8[rax]
	.cfi_def_cfa_offset 80
	mov	r8d, DWORD PTR 16[rsp]
	mov	r9, QWORD PTR [rax]
	xor	eax, eax
	call	lpfc_printf_log@PLT
	mov	eax, DWORD PTR ENODEV[rip]
	pop	rdx
	.cfi_def_cfa_offset 72
	pop	rcx
	.cfi_def_cfa_offset 64
	neg	eax
	jmp	.L13
.L38:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	lpfc_pci_function_reset, .-lpfc_pci_function_reset
	.comm	lpfc_sliport_status_rn,4,4
	.comm	lpfc_sliport_status_rdy,4,4
	.comm	lpfc_sliport_ctrl_ip,4,4
	.comm	lpfc_sliport_ctrl_end,4,4
	.comm	lpfc_sli_intf_if_type,4,4
	.comm	lpfc_mbox_hdr_status,4,4
	.comm	lpfc_mbox_hdr_add_status,4,4
	.comm	PCI_DEVICE_ID,4,4
	.comm	MBX_TIMEOUT,4,4
	.comm	MBX_POLL,4,4
	.comm	LPFC_SLIPORT_LITTLE_ENDIAN,4,4
	.comm	LPFC_SLIPORT_INIT_PORT,4,4
	.comm	LPFC_SLI4_MBX_EMBED,4,4
	.comm	LPFC_MBOX_SUBSYSTEM_COMMON,4,4
	.comm	LPFC_MBOX_OPCODE_FUNCTION_RESET,4,4
	.comm	LOG_INIT,4,4
	.comm	KERN_ERR,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENXIO,4,4
	.comm	ENOMEM,4,4
	.comm	ENODEV,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_lpfc_init.c_lpfc_pci_function_reset.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"0494 Unable to allocate memory for issuing SLI_FUNC"
	.ascii	"TION_RESET mailbox command\012\000"
	.align	2
.LC1:
	.ascii	"0495 SLI_FUNCTION_RESET mailbox failed with status "
	.ascii	"x%x add_status x%x, mbx status x%x\012\000"
	.align	2
.LC2:
	.ascii	"2890 Port not ready, port status reg 0x%x error 1=0"
	.ascii	"x%x, error 2=0x%x\012\000"
	.align	2
.LC3:
	.ascii	"3317 HBA not functional: IP Reset Failed try: echo "
	.ascii	"fw_reset > board_mode\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	lpfc_pci_function_reset
	.syntax unified
	.arm
	.fpu softvfp
	.type	lpfc_pci_function_reset, %function
lpfc_pci_function_reset:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r3, .L40
	add	r1, r0, #20
	mov	r4, r0
	ldr	r0, [r3]
	ldr	r3, .L40+4
	sub	sp, sp, #32
	ldr	r3, [r3]
	str	r3, [sp, #28]
	mov	r3,#0
	bl	bf_get
	cmp	r0, #129
	ble	.L35
	cmp	r0, #131
	bne	.L17
	ldr	r3, .L40+8
	ldr	r0, [r4, #28]
	ldr	r1, [r3]
	bl	mempool_alloc
	subs	r5, r0, #0
	beq	.L36
	mov	r1, #0
	ldr	r2, .L40+12
	ldr	r3, .L40+16
	ldr	r0, [r2]
	ldr	r2, .L40+20
	str	r0, [sp, #4]
	str	r1, [sp]
	ldr	r3, [r3]
	mov	r1, r5
	ldr	r2, [r2]
	mov	r0, r4
	bl	lpfc_sli4_config
	ldr	r3, .L40+24
	mov	r1, r5
	ldr	r2, [r3]
	mov	r0, r4
	bl	lpfc_sli_issue_mbox
	ldr	r3, .L40+28
	mov	r6, r0
	mov	r1, r5
	ldr	r0, [r3]
	bl	bf_get
	ldr	r3, .L40+32
	mov	r7, r0
	mov	r1, r5
	ldr	r0, [r3]
	bl	bf_get
	ldr	r3, .L40+36
	mov	r8, r0
	ldr	r3, [r3]
	cmp	r3, r6
	bne	.L37
	orr	r3, r6, r7
	orrs	r3, r3, r8
	bne	.L12
.L17:
	mov	r0, #0
.L1:
	ldr	r3, .L40+4
	ldr	r2, [r3]
	ldr	r3, [sp, #28]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L38
	add	sp, sp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L35:
	cmp	r0, #127
	ble	.L17
	ldr	r5, .L40+40
	ldr	r6, .L40+44
	b	.L3
.L39:
	ldr	r0, [r6]
	add	r1, sp, #20
	bl	bf_get
	cmp	r0, #0
	bne	.L7
	mov	r0, #20
	bl	msleep
	subs	r5, r5, #1
	beq	.L7
.L3:
	ldr	r0, [r4, #16]
	add	r1, sp, #20
	bl	lpfc_readl
	cmp	r0, #0
	beq	.L39
.L32:
	ldr	r3, .L40+48
	ldr	r3, [r3]
	rsb	r3, r3, #0
.L13:
	cmp	r3, #0
	beq	.L17
	ldr	r3, .L40+52
	ldr	r2, .L40+56
	ldr	r1, [r3]
	mov	r0, r4
	ldr	r3, .L40+60
	ldr	r2, [r2]
	bl	lpfc_printf_log
	ldr	r3, .L40+48
	ldr	r0, [r3]
	rsb	r0, r0, #0
	b	.L1
.L36:
	ldr	r3, .L40+52
	ldr	r2, .L40+56
	ldr	r1, [r3]
	mov	r0, r4
	ldr	r3, .L40+64
	ldr	r2, [r2]
	bl	lpfc_printf_log
	ldr	r3, .L40+68
	ldr	r0, [r3]
	rsb	r0, r0, #0
	b	.L1
.L37:
	mov	r0, r5
	ldr	r1, [r4, #28]
	bl	mempool_free
	orr	r3, r6, r7
	orrs	r3, r3, r8
	beq	.L17
.L12:
	stm	sp, {r7, r8}
	ldr	r3, .L40+52
	ldr	r2, .L40+56
	str	r6, [sp, #8]
	ldr	r1, [r3]
	mov	r0, r4
	ldr	r3, .L40+72
	ldr	r2, [r2]
	bl	lpfc_printf_log
	ldr	r3, .L40+76
	ldr	r3, [r3]
	rsb	r3, r3, #0
	b	.L13
.L7:
	ldr	r0, [r6]
	add	r1, sp, #20
	bl	bf_get
	cmp	r0, #0
	beq	.L8
	mov	r3, #0
	ldr	r1, .L40+80
	ldr	r2, .L40+84
	ldr	r0, [r1]
	ldr	r2, [r2]
	add	r1, sp, #20
	str	r3, [sp, #20]
	bl	bf_set
	ldr	r3, .L40+88
	ldr	r2, .L40+92
	ldr	r0, [r3]
	ldr	r2, [r2]
	add	r1, sp, #20
	bl	bf_set
	ldr	r1, [r4, #4]
	ldr	r0, [sp, #20]
	bl	writel
	ldr	r3, .L40+96
	add	r2, sp, #24
	ldr	r1, [r3]
	ldr	r0, [r4]
	bl	pci_read_config_word
	mov	r0, #20
	bl	msleep
	ldr	r5, .L40+40
	b	.L9
.L14:
	ldr	r0, [r6]
	add	r1, sp, #20
	bl	bf_get
	cmp	r0, #0
	bne	.L15
	mov	r0, #20
	bl	msleep
	subs	r5, r5, #1
	beq	.L15
.L9:
	ldr	r0, [r4, #16]
	add	r1, sp, #20
	bl	lpfc_readl
	cmp	r0, #0
	beq	.L14
	b	.L32
.L15:
	ldr	r0, [r6]
	add	r1, sp, #20
	bl	bf_get
	cmp	r0, #0
	beq	.L8
	ldr	r3, .L40+100
	add	r1, sp, #20
	ldr	r0, [r3]
	bl	bf_get
	cmp	r0, #0
	beq	.L17
	b	.L32
.L8:
	ldr	r0, [r4, #12]
	ldr	r5, [r4, #24]
	bl	readl
	mov	r3, r0
	ldr	r0, [r4, #8]
	str	r3, [r5]
	ldr	r5, [r4, #24]
	bl	readl
	str	r0, [r5, #4]
	ldr	r3, [r4, #24]
	ldr	r2, .L40+56
	ldr	r0, [r3, #4]
	ldr	r1, .L40+52
	str	r0, [sp, #8]
	ldr	r0, [r3]
	ldr	r3, [sp, #20]
	str	r0, [sp, #4]
	ldr	r2, [r2]
	ldr	r1, [r1]
	mov	r0, r4
	str	r3, [sp]
	ldr	r3, .L40+104
	bl	lpfc_printf_log
	ldr	r3, .L40+48
	ldr	r3, [r3]
	rsb	r3, r3, #0
	b	.L13
.L38:
	bl	__stack_chk_fail
.L41:
	.align	2
.L40:
	.word	lpfc_sli_intf_if_type
	.word	.LC4
	.word	GFP_KERNEL
	.word	LPFC_SLI4_MBX_EMBED
	.word	LPFC_MBOX_OPCODE_FUNCTION_RESET
	.word	LPFC_MBOX_SUBSYSTEM_COMMON
	.word	MBX_POLL
	.word	lpfc_mbox_hdr_status
	.word	lpfc_mbox_hdr_add_status
	.word	MBX_TIMEOUT
	.word	1500
	.word	lpfc_sliport_status_rdy
	.word	ENODEV
	.word	KERN_ERR
	.word	LOG_INIT
	.word	.LC3
	.word	.LC0
	.word	ENOMEM
	.word	.LC1
	.word	ENXIO
	.word	lpfc_sliport_ctrl_end
	.word	LPFC_SLIPORT_LITTLE_ENDIAN
	.word	lpfc_sliport_ctrl_ip
	.word	LPFC_SLIPORT_INIT_PORT
	.word	PCI_DEVICE_ID
	.word	lpfc_sliport_status_rn
	.word	.LC2
	.size	lpfc_pci_function_reset, .-lpfc_pci_function_reset
	.comm	lpfc_sliport_status_rn,4,4
	.comm	lpfc_sliport_status_rdy,4,4
	.comm	lpfc_sliport_ctrl_ip,4,4
	.comm	lpfc_sliport_ctrl_end,4,4
	.comm	lpfc_sli_intf_if_type,4,4
	.comm	lpfc_mbox_hdr_status,4,4
	.comm	lpfc_mbox_hdr_add_status,4,4
	.comm	PCI_DEVICE_ID,4,4
	.comm	MBX_TIMEOUT,4,4
	.comm	MBX_POLL,4,4
	.comm	LPFC_SLIPORT_LITTLE_ENDIAN,4,4
	.comm	LPFC_SLIPORT_INIT_PORT,4,4
	.comm	LPFC_SLI4_MBX_EMBED,4,4
	.comm	LPFC_MBOX_SUBSYSTEM_COMMON,4,4
	.comm	LPFC_MBOX_OPCODE_FUNCTION_RESET,4,4
	.comm	LOG_INIT,4,4
	.comm	KERN_ERR,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENXIO,4,4
	.comm	ENOMEM,4,4
	.comm	ENODEV,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
