linux/drivers/scsi/qla2xxx
Arun Easi 8a78dd6ed1 scsi: qla2xxx: Fix FW initialization error on big endian machines
Some fields are not correctly byte swapped causing failure during
initialization. As probe() returns failure, HBAs will not be claimed when
this happens.

qla2xxx [0007:01:00.0]-ffff:3: Secure Flash Update in FW: Supported
qla2xxx [0007:01:00.0]-ffff:3: SCM in FW: Supported
qla2xxx [0007:01:00.0]-00d2:3: Init Firmware **** FAILED ****.
qla2xxx [0007:01:00.0]-00d6:3: Failed to initialize adapter - Adapter flags 2.
qla2xxx 0007:01:00.1: enabling device (0140 -> 0142)
qla2xxx [0007:01:00.1]-011c: : MSI-X vector count: 128.
qla2xxx [0007:01:00.1]-001d: : Found an ISP2289 irq 18 iobase 0xd000080080004000.
qla2xxx 0007:01:00.1: Using 64-bit direct DMA at offset 800000000000000
BUG: Bad page state in process insmod  pfn:67118 page:f00000000168bd40
count:-1 mapcount:0 mapping: (null) index:0x0
page flags: 0x3ffff800000000() page dumped because: nonzero _count
Modules linked in: qla2xxx(OE+) nvme_fc nvme_fabrics
	nvme_core scsi_transport_fc scsi_tgt nls_utf8 isofs ip6t_rpfilter
	ipt_REJECT nf_reject_ipv4 ip6t_REJECT nf_reject_ipv6 xt_conntrack ip_set
	nfnetlink ebtable_nat ebtable_broute bridge stp llc ip6table_nat
	nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 ip6table_mangle
	ip6table_security ip6table_raw iptable_nat nf_conntrack_ipv4
	nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack iptable_mangle
	iptable_security iptable_raw ebtable_filter ebtables ip6table_filter
	ip6_tables iptable_filter nx_crypto ses enclosure scsi_transport_sas
	pseries_rng sg ip_tables xfs libcrc32c sr_mod cdrom sd_mod crc_t10dif
	crct10dif_generic crct10dif_common usb_storage ipr libata tg3 ptp
	pps_core dm_mirror dm_region_hash dm_log dm_mod
CPU: 32 PID: 8560 Comm: insmod Kdump: loaded Tainted: G
	OE  ------------   3.10.0-957.el7.ppc64 #1
Call Trace:
[c0000006dd7caa70] [c00000000001cca8] .show_stack+0x88/0x330 (unreliable)
[c0000006dd7cab30] [c000000000ac3d88] .dump_stack+0x28/0x3c
[c0000006dd7caba0] [c00000000029e48c] .bad_page+0x15c/0x1c0
[c0000006dd7cac40] [c00000000029f938] .get_page_from_freelist+0x11e8/0x1ea0
[c0000006dd7caf40] [c0000000002a1d30] .__alloc_pages_nodemask+0x1c0/0xc70
[c0000006dd7cb140] [c00000000002ba0c] .__dma_direct_alloc_coherent+0x8c/0x170
[c0000006dd7cb1e0] [d000000010a94688] .qla2x00_mem_alloc+0x10f8/0x1370 [qla2xxx]
[c0000006dd7cb2d0] [d000000010a9c790] .qla2x00_probe_one+0xb60/0x22e0 [qla2xxx]
[c0000006dd7cb540] [c0000000005de764] .pci_device_probe+0x204/0x300
[c0000006dd7cb600] [c0000000006ca61c] .driver_probe_device+0x2cc/0x6f0
[c0000006dd7cb6b0] [c0000000006cabec] .__driver_attach+0x10c/0x110
[c0000006dd7cb740] [c0000000006c5f04] .bus_for_each_dev+0x94/0x100
[c0000006dd7cb7e0] [c0000000006c94f4] .driver_attach+0x34/0x50
[c0000006dd7cb860] [c0000000006c8f58] .bus_add_driver+0x298/0x3b0
[c0000006dd7cb900] [c0000000006cb6e0] .driver_register+0xb0/0x1a0
[c0000006dd7cb980] [c0000000005dc474] .__pci_register_driver+0xc4/0xf0
[c0000006dd7cba10] [d000000010b94e20] .qla2x00_module_init+0x2a8/0x328 [qla2xxx]
[c0000006dd7cbaa0] [c00000000000c130] .do_one_initcall+0x130/0x2e0
[c0000006dd7cbb50] [c0000000001b2e8c] .load_module+0x1afc/0x2340
[c0000006dd7cbd40] [c0000000001b3920] .SyS_finit_module+0xd0/0x130
[c0000006dd7cbe30] [c00000000000a284] 	system_call+0x38/0xfc

Link: https://lore.kernel.org/r/20201202132312.19966-9-njavali@marvell.com
Fixes: 9f2475fe74 ("scsi: qla2xxx: SAN congestion management implementation")
Fixes: cf3c54fb49 ("scsi: qla2xxx: Add SLER and PI control support”)
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Arun Easi <aeasi@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2020-12-09 11:34:18 -05:00
..
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile
qla_attr.c SPDX patches for 5.10-rc1 2020-10-14 16:19:42 -07:00
qla_bsg.c scsi/qla2xxx: Convert to SPDX license identifiers 2020-09-16 14:31:50 +02:00
qla_bsg.h scsi/qla2xxx: Convert to SPDX license identifiers 2020-09-16 14:31:50 +02:00
qla_dbg.c SPDX patches for 5.10-rc1 2020-10-14 16:19:42 -07:00
qla_dbg.h scsi/qla2xxx: Convert to SPDX license identifiers 2020-09-16 14:31:50 +02:00
qla_def.h scsi: qla2xxx: Remove trailing semicolon in macro definition 2020-12-07 20:35:14 -05:00
qla_devtbl.h
qla_dfs.c SCSI misc on 20201023 2020-10-23 16:19:02 -07:00
qla_dsd.h scsi: qla2xxx: Include the <asm/unaligned.h> header file from qla_dsd.h 2019-08-12 21:34:04 -04:00
qla_fw.h SPDX patches for 5.10-rc1 2020-10-14 16:19:42 -07:00
qla_gbl.h SPDX patches for 5.10-rc1 2020-10-14 16:19:42 -07:00
qla_gs.c scsi: qla2xxx: Change post del message from debug level to log level 2020-12-09 11:34:17 -05:00
qla_init.c scsi: qla2xxx: Move sess cmd list/lock to driver 2020-11-04 22:39:37 -05:00
qla_inline.h SPDX patches for 5.10-rc1 2020-10-14 16:19:42 -07:00
qla_iocb.c SPDX patches for 5.10-rc1 2020-10-14 16:19:42 -07:00
qla_isr.c scsi: qla2xxx: Tear down session if FW say it is down 2020-12-09 11:34:17 -05:00
qla_mbx.c scsi: qla2xxx: Fix FW initialization error on big endian machines 2020-12-09 11:34:18 -05:00
qla_mid.c SPDX patches for 5.10-rc1 2020-10-14 16:19:42 -07:00
qla_mr.c scsi/qla2xxx: Convert to SPDX license identifiers 2020-09-16 14:31:50 +02:00
qla_mr.h scsi/qla2xxx: Convert to SPDX license identifiers 2020-09-16 14:31:50 +02:00
qla_nvme.c scsi: qla2xxx: Don't check for fw_started while posting NVMe command 2020-12-09 11:34:17 -05:00
qla_nvme.h SPDX patches for 5.10-rc1 2020-10-14 16:19:42 -07:00
qla_nx2.c scsi: qla2xxx: Fix compilation issue in PPC systems 2020-12-09 11:34:17 -05:00
qla_nx2.h scsi/qla2xxx: Convert to SPDX license identifiers 2020-09-16 14:31:50 +02:00
qla_nx.c scsi: qla2xxx: Fix compilation issue in PPC systems 2020-12-09 11:34:17 -05:00
qla_nx.h scsi/qla2xxx: Convert to SPDX license identifiers 2020-09-16 14:31:50 +02:00
qla_os.c scsi: qla2xxx: Remove in_interrupt() from qla83xx-specific code 2020-12-01 00:03:53 -05:00
qla_settings.h scsi/qla2xxx: Convert to SPDX license identifiers 2020-09-16 14:31:50 +02:00
qla_sup.c scsi/qla2xxx: Convert to SPDX license identifiers 2020-09-16 14:31:50 +02:00
qla_target.c scsi: qla2xxx: Change post del message from debug level to log level 2020-12-09 11:34:17 -05:00
qla_target.h scsi: qla2xxx: Move sess cmd list/lock to driver 2020-11-04 22:39:37 -05:00
qla_tmpl.c scsi: qla2xxx: Fix crash during driver load on big endian machines 2020-12-09 11:34:17 -05:00
qla_tmpl.h scsi: qla2xxx: Fix crash during driver load on big endian machines 2020-12-09 11:34:17 -05:00
qla_version.h SPDX patches for 5.10-rc1 2020-10-14 16:19:42 -07:00
tcm_qla2xxx.c scsi: target: tcm_qla2xxx: Remove BUG_ON(in_interrupt()) 2020-12-01 00:03:52 -05:00
tcm_qla2xxx.h scsi: qla2xxx: deadlock by configfs_depend_item 2018-12-19 21:26:38 -05:00