	.file	"extr_qla_bsg.c_qlafx00_mgmt_cmd.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Host is not online.\n"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"dma_map_sg return %d for request\n"
	.align 8
.LC2:
	.string	"dma_map_sg return %d for reply\n"
	.align 8
.LC3:
	.string	"request_sg_cnt: %x dma_request_sg_cnt: %x reply_sg_cnt:%x dma_reply_sg_cnt: %x\n"
	.section	.rodata.str1.1
.LC4:
	.string	"Failed to allocate fcport.\n"
.LC5:
	.string	"qla2x00_get_sp failed.\n"
.LC6:
	.string	"bsg_fx_mgmt"
.LC7:
	.string	"FC_BSG_HST_FX_MGMT"
	.section	.rodata.str1.8
	.align 8
.LC8:
	.string	"bsg rqst type: %s fx_mgmt_type: %x id=%x\n"
	.section	.rodata.str1.1
.LC9:
	.string	"qla2x00_start_sp failed=%d.\n"
	.text
	.p2align 4
	.type	qlafx00_mgmt_cmd, @function
qlafx00_mgmt_cmd:
.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
	mov	rbx, rdi
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	rdi, QWORD PTR 24[rdi]
	call	shost_priv@PLT
	mov	r8d, 12
	mov	edx, 28879
	mov	rdi, QWORD PTR ql_dbg_verbose[rip]
	mov	rbp, rax
	mov	rax, QWORD PTR 8[rax]
	add	rdi, QWORD PTR ql_dbg_user[rip]
	mov	rsi, rbp
	mov	QWORD PTR [rsp], rax
	mov	rax, QWORD PTR 16[rbx]
	mov	r13, QWORD PTR [rax]
	lea	rcx, 4[r13]
	call	ql_dump_buffer@PLT
	mov	edi, DWORD PTR 0[rbp]
	test	edi, edi
	je	.L27
	mov	eax, DWORD PTR 4[r13]
	mov	r12d, eax
	and	r12d, DWORD PTR SRB_FXDISC_REQ_DMA_VALID[rip]
	jne	.L28
.L4:
	and	eax, DWORD PTR SRB_FXDISC_RESP_DMA_VALID[rip]
	mov	edx, DWORD PTR 8[rbx]
	mov	r11d, eax
	je	.L6
	mov	rax, QWORD PTR [rsp]
	mov	esi, DWORD PTR 12[rbx]
	mov	ecx, DWORD PTR DMA_FROM_DEVICE[rip]
	mov	rdi, QWORD PTR [rax]
	call	dma_map_sg@PLT
	mov	r11d, eax
	test	eax, eax
	je	.L7
	mov	edx, DWORD PTR 8[rbx]
.L6:
	push	r11
	.cfi_def_cfa_offset 88
	movsx	r8, DWORD PTR [rbx]
	lea	rcx, .LC3[rip]
	mov	r9d, r12d
	mov	rdi, QWORD PTR ql_dbg_user[rip]
	mov	rsi, rbp
	xor	eax, eax
	mov	DWORD PTR 20[rsp], r11d
	push	rdx
	.cfi_def_cfa_offset 96
	mov	edx, 28873
	call	ql_dbg@PLT
	mov	esi, DWORD PTR GFP_KERNEL[rip]
	mov	rdi, rbp
	call	qla2x00_alloc_fcport@PLT
	pop	rcx
	.cfi_def_cfa_offset 88
	pop	rsi
	.cfi_def_cfa_offset 80
	test	rax, rax
	mov	r11d, DWORD PTR 12[rsp]
	mov	r14, rax
	je	.L29
	mov	edx, DWORD PTR GFP_KERNEL[rip]
	mov	rsi, rax
	mov	rdi, rbp
	mov	DWORD PTR 12[rsp], r11d
	call	qla2x00_get_sp@PLT
	mov	r11d, DWORD PTR 12[rsp]
	test	rax, rax
	mov	r15, rax
	je	.L30
	mov	eax, DWORD PTR 12[r13]
	mov	QWORD PTR 8[r14], rbp
	lea	edi, [r12+r11]
	mov	DWORD PTR [r14], eax
	mov	eax, DWORD PTR SRB_FXIOCB_BCMD[rip]
	mov	DWORD PTR 28[r15], eax
	lea	rax, .LC6[rip]
	mov	QWORD PTR [r15], rax
	call	qla24xx_calc_ct_iocbs@PLT
	sub	rsp, 8
	.cfi_def_cfa_offset 88
	mov	r9d, DWORD PTR 8[r13]
	mov	rsi, rbp
	mov	DWORD PTR 24[r15], eax
	mov	eax, DWORD PTR qla2x00_bsg_sp_free[rip]
	mov	edx, 28876
	lea	r8, .LC7[rip]
	mov	QWORD PTR 16[r15], rbx
	mov	rdi, QWORD PTR ql_dbg_user[rip]
	lea	rcx, .LC8[rip]
	mov	DWORD PTR 12[r15], eax
	mov	eax, DWORD PTR qla2x00_bsg_job_done[rip]
	mov	DWORD PTR 8[r15], eax
	mov	eax, DWORD PTR [r14]
	push	rax
	.cfi_def_cfa_offset 96
	xor	eax, eax
	call	ql_dbg@PLT
	mov	rdi, r15
	call	qla2x00_start_sp@PLT
	mov	r12d, eax
	cmp	DWORD PTR QLA_SUCCESS[rip], r12d
	pop	rax
	.cfi_def_cfa_offset 88
	pop	rdx
	.cfi_def_cfa_offset 80
	jne	.L31
.L1:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r12d
	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
	mov	rax, QWORD PTR [rsp]
	mov	esi, DWORD PTR 4[rbx]
	mov	ecx, DWORD PTR DMA_TO_DEVICE[rip]
	mov	edx, DWORD PTR [rbx]
	mov	rdi, QWORD PTR [rax]
	call	dma_map_sg@PLT
	mov	r12d, eax
	test	eax, eax
	je	.L5
	mov	eax, DWORD PTR 4[r13]
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L27:
	mov	edi, DWORD PTR ql_log_warn[rip]
	mov	edx, 28880
	mov	rsi, rbp
	xor	eax, eax
	lea	rcx, .LC0[rip]
	call	ql_log@PLT
	mov	r12d, DWORD PTR EIO[rip]
	neg	r12d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L30:
	mov	edi, DWORD PTR ql_log_warn[rip]
	mov	edx, 28875
	mov	rsi, rbp
	xor	eax, eax
	lea	rcx, .LC5[rip]
	call	ql_log@PLT
	mov	r12d, DWORD PTR ENOMEM[rip]
	neg	r12d
.L12:
	mov	rdi, r14
	call	kfree@PLT
.L10:
	mov	eax, DWORD PTR 4[r13]
	test	DWORD PTR SRB_FXDISC_RESP_DMA_VALID[rip], eax
	jne	.L32
.L8:
	test	DWORD PTR SRB_FXDISC_REQ_DMA_VALID[rip], eax
	je	.L1
	mov	rax, QWORD PTR [rsp]
	mov	esi, DWORD PTR 4[rbx]
	mov	ecx, DWORD PTR DMA_TO_DEVICE[rip]
	mov	edx, DWORD PTR [rbx]
	mov	rdi, QWORD PTR [rax]
	call	dma_unmap_sg@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L31:
	mov	edi, DWORD PTR ql_log_warn[rip]
	mov	r8d, r12d
	mov	edx, 28877
	xor	eax, eax
	lea	rcx, .LC9[rip]
	mov	rsi, rbp
	call	ql_log@PLT
	mov	rax, QWORD PTR [rsp]
	mov	rdi, r15
	mov	esi, DWORD PTR 8[rax]
	call	mempool_free@PLT
	mov	r12d, DWORD PTR EIO[rip]
	neg	r12d
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L32:
	mov	rax, QWORD PTR [rsp]
	mov	edx, DWORD PTR 8[rbx]
	mov	esi, DWORD PTR 12[rbx]
	mov	ecx, DWORD PTR DMA_FROM_DEVICE[rip]
	mov	rdi, QWORD PTR [rax]
	call	dma_unmap_sg@PLT
	mov	eax, DWORD PTR 4[r13]
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L29:
	mov	edi, DWORD PTR ql_log_warn[rip]
	mov	edx, 28874
	mov	rsi, rbp
	xor	eax, eax
	lea	rcx, .LC4[rip]
	call	ql_log@PLT
	mov	r12d, DWORD PTR ENOMEM[rip]
	neg	r12d
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L7:
	mov	edi, DWORD PTR ql_log_warn[rip]
	xor	r8d, r8d
	mov	edx, 28872
	xor	eax, eax
	lea	rcx, .LC2[rip]
	mov	rsi, rbp
	call	ql_log@PLT
	mov	r12d, DWORD PTR ENOMEM[rip]
	mov	eax, DWORD PTR 4[r13]
	neg	r12d
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L5:
	mov	edi, DWORD PTR ql_log_warn[rip]
	xor	r8d, r8d
	mov	edx, 28871
	xor	eax, eax
	lea	rcx, .LC1[rip]
	mov	rsi, rbp
	call	ql_log@PLT
	mov	r12d, DWORD PTR ENOMEM[rip]
	neg	r12d
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	qlafx00_mgmt_cmd, .-qlafx00_mgmt_cmd
	.comm	qla2x00_bsg_sp_free,4,4
	.comm	qla2x00_bsg_job_done,4,4
	.comm	ql_log_warn,4,4
	.comm	ql_dbg_verbose,8,8
	.comm	ql_dbg_user,8,8
	.comm	SRB_FXIOCB_BCMD,4,4
	.comm	SRB_FXDISC_RESP_DMA_VALID,4,4
	.comm	SRB_FXDISC_REQ_DMA_VALID,4,4
	.comm	QLA_SUCCESS,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.comm	EIO,4,4
	.comm	DRIVER_ERROR,4,4
	.comm	DMA_TO_DEVICE,4,4
	.comm	DMA_FROM_DEVICE,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_qla_bsg.c_qlafx00_mgmt_cmd.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Host is not online.\012\000"
	.align	2
.LC1:
	.ascii	"dma_map_sg return %d for request\012\000"
	.align	2
.LC2:
	.ascii	"dma_map_sg return %d for reply\012\000"
	.align	2
.LC3:
	.ascii	"request_sg_cnt: %x dma_request_sg_cnt: %x reply_sg_"
	.ascii	"cnt:%x dma_reply_sg_cnt: %x\012\000"
	.align	2
.LC4:
	.ascii	"Failed to allocate fcport.\012\000"
	.align	2
.LC5:
	.ascii	"qla2x00_get_sp failed.\012\000"
	.align	2
.LC6:
	.ascii	"bsg_fx_mgmt\000"
	.align	2
.LC7:
	.ascii	"bsg rqst type: %s fx_mgmt_type: %x id=%x\012\000"
	.align	2
.LC8:
	.ascii	"FC_BSG_HST_FX_MGMT\000"
	.align	2
.LC9:
	.ascii	"qla2x00_start_sp failed=%d.\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	qlafx00_mgmt_cmd, %function
qlafx00_mgmt_cmd:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r5, r0
	sub	sp, sp, #36
	ldr	r0, [r0, #20]
	bl	shost_priv
	mov	r4, r0
	mov	r2, #12
	ldr	r1, [r5, #16]
	ldr	r3, .L33
	ldr	r9, .L33+4
	ldr	r8, [r1]
	ldr	r0, [r3]
	ldr	r1, [r4, #4]
	ldr	ip, [r9]
	add	r3, r8, #4
	str	r1, [sp, #28]
	str	r2, [sp]
	mov	r1, r4
	ldr	r2, .L33+8
	add	r0, ip, r0
	bl	ql_dump_buffer
	ldr	r3, [r4]
	cmp	r3, #0
	beq	.L27
	ldr	r10, .L33+12
	ldr	r0, [r8, #4]
	ldr	r3, [r10]
	ands	r3, r0, r3
	str	r3, [sp, #24]
	bne	.L28
.L4:
	ldr	fp, .L33+16
	ldr	r2, [r5, #8]
	ldr	r3, [fp]
	ands	r3, r0, r3
	str	r3, [sp, #20]
	beq	.L6
	ldr	r0, [sp, #28]
	ldr	r3, .L33+20
	ldr	r1, [r5, #12]
	ldr	r3, [r3]
	ldr	r0, [r0]
	bl	dma_map_sg
	subs	r3, r0, #0
	str	r3, [sp, #20]
	beq	.L7
	ldr	r2, [r5, #8]
.L6:
	ldr	r3, [r5]
	ldr	r1, [sp, #20]
	str	r2, [sp, #8]
	ldr	r2, [sp, #24]
	str	r1, [sp, #12]
	str	r2, [sp, #4]
	str	r3, [sp]
	ldr	r6, .L33+24
	mov	r1, r4
	ldr	r3, .L33+28
	ldr	r2, .L33+32
	ldr	r0, [r9]
	bl	ql_dbg
	mov	r0, r4
	ldr	r1, [r6]
	bl	qla2x00_alloc_fcport
	subs	r7, r0, #0
	beq	.L29
	ldr	r2, [r6]
	mov	r1, r7
	mov	r0, r4
	bl	qla2x00_get_sp
	subs	r6, r0, #0
	beq	.L30
	ldr	r3, .L33+36
	ldr	r0, [sp, #20]
	ldr	r2, [r3]
	ldr	r3, [sp, #24]
	ldr	r1, [r8, #12]
	add	r0, r3, r0
	ldr	r3, .L33+40
	str	r1, [r7]
	str	r4, [r7, #4]
	str	r2, [r6, #20]
	str	r3, [r6]
	bl	qla24xx_calc_ct_iocbs
	ldr	r2, .L33+44
	ldr	r3, .L33+48
	ldr	r1, [r2]
	ldr	r2, [r3]
	ldr	r3, [r7]
	str	r0, [r6, #16]
	str	r1, [r6, #8]
	str	r2, [r6, #4]
	str	r5, [r6, #12]
	str	r3, [sp, #8]
	ldr	r2, [r8, #8]
	ldr	r3, .L33+52
	ldr	r0, [r9]
	mov	r1, r4
	str	r2, [sp, #4]
	str	r3, [sp]
	ldr	r2, .L33+56
	ldr	r3, .L33+60
	bl	ql_dbg
	mov	r0, r6
	bl	qla2x00_start_sp
	ldr	r3, .L33+64
	mov	r9, r0
	ldr	r3, [r3]
	cmp	r3, r0
	bne	.L31
.L1:
	mov	r0, r9
	add	sp, sp, #36
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L28:
	ldr	r0, [sp, #28]
	ldr	r3, .L33+68
	ldr	r2, [r5]
	ldr	r3, [r3]
	ldr	r1, [r5, #4]
	ldr	r0, [r0]
	bl	dma_map_sg
	subs	r3, r0, #0
	str	r3, [sp, #24]
	beq	.L5
	ldr	r0, [r8, #4]
	b	.L4
.L27:
	ldr	r3, .L33+72
	mov	r1, r4
	ldr	r0, [r3]
	ldr	r2, .L33+76
	ldr	r3, .L33+80
	bl	ql_log
	ldr	r3, .L33+84
	ldr	r9, [r3]
	rsb	r9, r9, #0
	mov	r0, r9
	add	sp, sp, #36
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L30:
	ldr	r3, .L33+72
	mov	r1, r4
	ldr	r0, [r3]
	ldr	r2, .L33+88
	ldr	r3, .L33+92
	bl	ql_log
	ldr	r3, .L33+96
	ldr	r9, [r3]
	rsb	r9, r9, #0
.L12:
	mov	r0, r7
	bl	kfree
.L10:
	ldr	r2, [fp]
	ldr	r3, [r8, #4]
	tst	r3, r2
	bne	.L32
.L8:
	ldr	r2, [r10]
	tst	r3, r2
	beq	.L1
	ldr	r2, [sp, #28]
	ldr	r3, .L33+68
	ldr	r0, [r2]
	ldr	r3, [r3]
	ldr	r2, [r5]
	ldr	r1, [r5, #4]
	bl	dma_unmap_sg
	mov	r0, r9
	add	sp, sp, #36
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L31:
	ldr	r3, .L33+72
	str	r0, [sp]
	mov	r1, r4
	ldr	r0, [r3]
	ldr	r2, .L33+100
	ldr	r3, .L33+104
	bl	ql_log
	ldr	r3, [sp, #28]
	mov	r0, r6
	ldr	r1, [r3, #4]
	bl	mempool_free
	ldr	r3, .L33+84
	ldr	r9, [r3]
	rsb	r9, r9, #0
	b	.L12
.L32:
	ldr	r0, [sp, #28]
	ldr	r3, .L33+20
	ldr	r2, [r5, #8]
	ldr	r3, [r3]
	ldr	r1, [r5, #12]
	ldr	r0, [r0]
	bl	dma_unmap_sg
	ldr	r3, [r8, #4]
	b	.L8
.L29:
	ldr	r3, .L33+72
	mov	r1, r4
	ldr	r0, [r3]
	ldr	r2, .L33+108
	ldr	r3, .L33+112
	bl	ql_log
	ldr	r3, .L33+96
	ldr	r9, [r3]
	rsb	r9, r9, #0
	b	.L10
.L7:
	ldr	r2, [sp, #20]
	ldr	r3, .L33+72
	str	r2, [sp]
	ldr	r0, [r3]
	ldr	r2, .L33+116
	ldr	r3, .L33+120
	mov	r1, r4
	bl	ql_log
	ldr	r2, .L33+96
	ldr	r3, [r8, #4]
	ldr	r9, [r2]
	rsb	r9, r9, #0
	b	.L8
.L5:
	ldr	r2, [sp, #24]
	ldr	r3, .L33+72
	str	r2, [sp]
	ldr	r0, [r3]
	mov	r1, r4
	ldr	r3, .L33+124
	ldr	r2, .L33+128
	bl	ql_log
	ldr	r3, .L33+96
	ldr	r9, [r3]
	rsb	r9, r9, #0
	b	.L1
.L34:
	.align	2
.L33:
	.word	ql_dbg_verbose
	.word	ql_dbg_user
	.word	28879
	.word	SRB_FXDISC_REQ_DMA_VALID
	.word	SRB_FXDISC_RESP_DMA_VALID
	.word	DMA_FROM_DEVICE
	.word	GFP_KERNEL
	.word	.LC3
	.word	28873
	.word	SRB_FXIOCB_BCMD
	.word	.LC6
	.word	qla2x00_bsg_sp_free
	.word	qla2x00_bsg_job_done
	.word	.LC8
	.word	28876
	.word	.LC7
	.word	QLA_SUCCESS
	.word	DMA_TO_DEVICE
	.word	ql_log_warn
	.word	28880
	.word	.LC0
	.word	EIO
	.word	28875
	.word	.LC5
	.word	ENOMEM
	.word	28877
	.word	.LC9
	.word	28874
	.word	.LC4
	.word	28872
	.word	.LC2
	.word	.LC1
	.word	28871
	.size	qlafx00_mgmt_cmd, .-qlafx00_mgmt_cmd
	.comm	qla2x00_bsg_sp_free,4,4
	.comm	qla2x00_bsg_job_done,4,4
	.comm	ql_log_warn,4,4
	.comm	ql_dbg_verbose,4,4
	.comm	ql_dbg_user,4,4
	.comm	SRB_FXIOCB_BCMD,4,4
	.comm	SRB_FXDISC_RESP_DMA_VALID,4,4
	.comm	SRB_FXDISC_REQ_DMA_VALID,4,4
	.comm	QLA_SUCCESS,4,4
	.comm	GFP_KERNEL,4,4
	.comm	ENOMEM,4,4
	.comm	EIO,4,4
	.comm	DRIVER_ERROR,4,4
	.comm	DMA_TO_DEVICE,4,4
	.comm	DMA_FROM_DEVICE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
