	.file	"extr_hisi_sas_v3_hw.c_hisi_sas_v3_suspend.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"PCI PM not supported\n"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"PM suspend: disable host failed rc=%d\n"
	.align 8
.LC2:
	.string	"entering operating state [D%d]\n"
	.text
	.p2align 4
	.type	hisi_sas_v3_suspend, @function
hisi_sas_v3_suspend:
.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
	mov	r14d, esi
	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
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	call	pci_get_drvdata@PLT
	mov	edx, DWORD PTR 0[rbp]
	mov	r12, QWORD PTR [rax]
	mov	r15, QWORD PTR 16[r12]
	test	edx, edx
	je	.L8
	mov	edi, DWORD PTR HISI_SAS_RESET_BIT[rip]
	mov	rsi, r12
	mov	rbx, QWORD PTR 8[r12]
	mov	r13, rax
	call	test_and_set_bit@PLT
	test	rax, rax
	jne	.L5
	mov	rdi, rbx
	call	scsi_block_requests@PLT
	mov	edi, DWORD PTR HISI_SAS_REJECT_CMD_BIT[rip]
	mov	rsi, r12
	call	set_bit@PLT
	mov	edi, DWORD PTR 4[r12]
	call	flush_workqueue@PLT
	mov	rdi, r12
	call	disable_host_v3_hw@PLT
	test	eax, eax
	jne	.L9
	mov	rdi, r12
	mov	DWORD PTR 12[rsp], eax
	call	hisi_sas_init_mem@PLT
	mov	esi, r14d
	mov	rdi, rbp
	call	pci_choose_state@PLT
	lea	rsi, .LC2[rip]
	mov	rdi, r15
	mov	edx, eax
	mov	r14d, eax
	call	dev_warn@PLT
	mov	rdi, rbp
	call	pci_save_state@PLT
	mov	rdi, rbp
	call	pci_disable_device@PLT
	mov	esi, r14d
	mov	rdi, rbp
	call	pci_set_power_state@PLT
	mov	rdi, r12
	call	hisi_sas_release_tasks@PLT
	mov	rdi, r13
	call	sas_suspend_ha@PLT
	mov	r8d, DWORD PTR 12[rsp]
.L1:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r8d
	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
.L9:
	.cfi_restore_state
	mov	edx, eax
	mov	DWORD PTR 12[rsp], eax
	lea	rsi, .LC1[rip]
	mov	rdi, r15
	xor	eax, eax
	call	dev_err@PLT
	mov	edi, DWORD PTR HISI_SAS_REJECT_CMD_BIT[rip]
	mov	rsi, r12
	call	clear_bit@PLT
	mov	edi, DWORD PTR HISI_SAS_RESET_BIT[rip]
	mov	rsi, r12
	call	clear_bit@PLT
	mov	rdi, rbx
	call	scsi_unblock_requests@PLT
	mov	r8d, DWORD PTR 12[rsp]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L8:
	lea	rsi, .LC0[rip]
	mov	rdi, r15
	xor	eax, eax
	call	dev_err@PLT
	mov	r8d, DWORD PTR ENODEV[rip]
	neg	r8d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L5:
	mov	r8d, -1
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	hisi_sas_v3_suspend, .-hisi_sas_v3_suspend
	.comm	HISI_SAS_RESET_BIT,4,4
	.comm	HISI_SAS_REJECT_CMD_BIT,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_hisi_sas_v3_hw.c_hisi_sas_v3_suspend.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"PCI PM not supported\012\000"
	.align	2
.LC1:
	.ascii	"PM suspend: disable host failed rc=%d\012\000"
	.align	2
.LC2:
	.ascii	"entering operating state [D%d]\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	hisi_sas_v3_suspend, %function
hisi_sas_v3_suspend:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r5, r0
	sub	sp, sp, #12
	mov	r7, r1
	bl	pci_get_drvdata
	ldr	r3, [r5]
	ldr	r4, [r0]
	cmp	r3, #0
	ldr	r8, [r4, #12]
	beq	.L8
	ldr	r9, .L10
	mov	r6, r0
	mov	r1, r4
	ldr	r0, [r9]
	ldr	r10, [r4, #8]
	bl	test_and_set_bit
	cmp	r0, #0
	bne	.L5
	ldr	fp, .L10+4
	mov	r0, r10
	bl	scsi_block_requests
	mov	r1, r4
	ldr	r0, [fp]
	bl	set_bit
	ldr	r0, [r4, #4]
	bl	flush_workqueue
	mov	r0, r4
	bl	disable_host_v3_hw
	subs	r3, r0, #0
	bne	.L9
	mov	r0, r4
	str	r3, [sp, #4]
	bl	hisi_sas_init_mem
	mov	r1, r7
	mov	r0, r5
	bl	pci_choose_state
	mov	r7, r0
	ldr	r1, .L10+8
	mov	r2, r7
	mov	r0, r8
	bl	dev_warn
	mov	r0, r5
	bl	pci_save_state
	mov	r0, r5
	bl	pci_disable_device
	mov	r1, r7
	mov	r0, r5
	bl	pci_set_power_state
	mov	r0, r4
	bl	hisi_sas_release_tasks
	mov	r0, r6
	bl	sas_suspend_ha
	ldr	r3, [sp, #4]
.L1:
	mov	r0, r3
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L9:
	mov	r2, r3
	mov	r0, r8
	ldr	r1, .L10+12
	str	r3, [sp, #4]
	bl	dev_err
	mov	r1, r4
	ldr	r0, [fp]
	bl	clear_bit
	mov	r1, r4
	ldr	r0, [r9]
	bl	clear_bit
	mov	r0, r10
	bl	scsi_unblock_requests
	ldr	r3, [sp, #4]
	mov	r0, r3
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L8:
	mov	r0, r8
	ldr	r1, .L10+16
	bl	dev_err
	ldr	r3, .L10+20
	ldr	r3, [r3]
	rsb	r3, r3, #0
	mov	r0, r3
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L5:
	mvn	r3, #0
	b	.L1
.L11:
	.align	2
.L10:
	.word	HISI_SAS_RESET_BIT
	.word	HISI_SAS_REJECT_CMD_BIT
	.word	.LC2
	.word	.LC1
	.word	.LC0
	.word	ENODEV
	.size	hisi_sas_v3_suspend, .-hisi_sas_v3_suspend
	.comm	HISI_SAS_RESET_BIT,4,4
	.comm	HISI_SAS_REJECT_CMD_BIT,4,4
	.comm	ENODEV,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
