Linus Torvalds
c8d0267efd
Merge tag 'pci-v4.8-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci
...
Pull PCI updates from Bjorn Helgaas:
"Highlights:
- ARM64 support for ACPI host bridges
- new drivers for Axis ARTPEC-6 and Marvell Aardvark
- new pci_alloc_irq_vectors() interface for MSI-X, MSI, legacy INTx
- pci_resource_to_user() cleanup (more to come)
Detailed summary:
Enumeration:
- Move ecam.h to linux/include/pci-ecam.h (Jayachandran C)
- Add parent device field to ECAM struct pci_config_window (Jayachandran C)
- Add generic MCFG table handling (Tomasz Nowicki)
- Refactor pci_bus_assign_domain_nr() for CONFIG_PCI_DOMAINS_GENERIC (Tomasz Nowicki)
- Factor DT-specific pci_bus_find_domain_nr() code out (Tomasz Nowicki)
Resource management:
- Add devm_request_pci_bus_resources() (Bjorn Helgaas)
- Unify pci_resource_to_user() declarations (Bjorn Helgaas)
- Implement pci_resource_to_user() with pcibios_resource_to_bus() (microblaze, powerpc, sparc) (Bjorn Helgaas)
- Request host bridge window resources (designware, iproc, rcar, xgene, xilinx, xilinx-nwl) (Bjorn Helgaas)
- Make PCI I/O space optional on ARM32 (Bjorn Helgaas)
- Ignore write combining when mapping I/O port space (Bjorn Helgaas)
- Claim bus resources on MIPS PCI_PROBE_ONLY set-ups (Bjorn Helgaas)
- Remove unicore32 pci=firmware command line parameter handling (Bjorn Helgaas)
- Support I/O resources when parsing host bridge resources (Jayachandran C)
- Add helpers to request/release memory and I/O regions (Johannes Thumshirn)
- Use pci_(request|release)_mem_regions (NVMe, lpfc, GenWQE, ethernet/intel, alx) (Johannes Thumshirn)
- Extend pci=resource_alignment to specify device/vendor IDs (Koehrer Mathias (ETAS/ESW5))
- Add generic pci_bus_claim_resources() (Lorenzo Pieralisi)
- Claim bus resources on ARM32 PCI_PROBE_ONLY set-ups (Lorenzo Pieralisi)
- Remove ARM32 and ARM64 arch-specific pcibios_enable_device() (Lorenzo Pieralisi)
- Add pci_unmap_iospace() to unmap I/O resources (Sinan Kaya)
- Remove powerpc __pci_mmap_set_pgprot() (Yinghai Lu)
PCI device hotplug:
- Allow additional bus numbers for hotplug bridges (Keith Busch)
- Ignore interrupts during D3cold (Lukas Wunner)
Power management:
- Enforce type casting for pci_power_t (Andy Shevchenko)
- Don't clear d3cold_allowed for PCIe ports (Mika Westerberg)
- Put PCIe ports into D3 during suspend (Mika Westerberg)
- Power on bridges before scanning new devices (Mika Westerberg)
- Runtime resume bridge before rescan (Mika Westerberg)
- Add runtime PM support for PCIe ports (Mika Westerberg)
- Remove redundant check of pcie_set_clkpm (Shawn Lin)
Virtualization:
- Add function 1 DMA alias quirk for Marvell 88SE9182 (Aaron Sierra)
- Add DMA alias quirk for Adaptec 3805 (Alex Williamson)
- Mark Atheros AR9485 and QCA9882 to avoid bus reset (Chris Blake)
- Add ACS quirk for Solarflare SFC9220 (Edward Cree)
MSI:
- Fix PCI_MSI dependencies (Arnd Bergmann)
- Add pci_msix_desc_addr() helper (Christoph Hellwig)
- Switch msix_program_entries() to use pci_msix_desc_addr() (Christoph Hellwig)
- Make the "entries" argument to pci_enable_msix() optional (Christoph Hellwig)
- Provide sensible IRQ vector alloc/free routines (Christoph Hellwig)
- Spread interrupt vectors in pci_alloc_irq_vectors() (Christoph Hellwig)
Error Handling:
- Bind DPC to Root Ports as well as Downstream Ports (Keith Busch)
- Remove DPC tristate module option (Keith Busch)
- Convert Downstream Port Containment driver to use devm_* functions (Mika Westerberg)
Generic host bridge driver:
- Select IRQ_DOMAIN (Arnd Bergmann)
- Claim bus resources on PCI_PROBE_ONLY set-ups (Lorenzo Pieralisi)
ACPI host bridge driver:
- Add ARM64 acpi_pci_bus_find_domain_nr() (Tomasz Nowicki)
- Add ARM64 ACPI support for legacy IRQs parsing and consolidation with DT code (Tomasz Nowicki)
- Implement ARM64 AML accessors for PCI_Config region (Tomasz Nowicki)
- Support ARM64 ACPI-based PCI host controller (Tomasz Nowicki)
Altera host bridge driver:
- Check link status before retrain link (Ley Foon Tan)
- Poll for link up status after retraining the link (Ley Foon Tan)
Axis ARTPEC-6 host bridge driver:
- Add PCI_MSI_IRQ_DOMAIN dependency (Arnd Bergmann)
- Add DT binding for Axis ARTPEC-6 PCIe controller (Niklas Cassel)
- Add Axis ARTPEC-6 PCIe controller driver (Niklas Cassel)
Intel VMD host bridge driver:
- Use lock save/restore in interrupt enable path (Jon Derrick)
- Select device dma ops to override (Keith Busch)
- Initialize list item in IRQ disable (Keith Busch)
- Use x86_vector_domain as parent domain (Keith Busch)
- Separate MSI and MSI-X vector sharing (Keith Busch)
Marvell Aardvark host bridge driver:
- Add DT binding for the Aardvark PCIe controller (Thomas Petazzoni)
- Add Aardvark PCI host controller driver (Thomas Petazzoni)
- Add Aardvark PCIe support for Armada 3700 (Thomas Petazzoni)
Microsoft Hyper-V host bridge driver:
- Fix interrupt cleanup path (Cathy Avery)
- Don't leak buffer in hv_pci_onchannelcallback() (Vitaly Kuznetsov)
- Handle all pending messages in hv_pci_onchannelcallback() (Vitaly Kuznetsov)
NVIDIA Tegra host bridge driver:
- Program PADS_REFCLK_CFG* always, not just on legacy SoCs (Stephen Warren)
- Program PADS_REFCLK_CFG* registers with per-SoC values (Stephen Warren)
- Use lower-case hex consistently for register definitions (Thierry Reding)
- Use generic pci_remap_iospace() rather than ARM32-specific one (Thierry Reding)
- Stop setting pcibios_min_mem (Thierry Reding)
Renesas R-Car host bridge driver:
- Drop gen2 dummy I/O port region (Bjorn Helgaas)
TI DRA7xx host bridge driver:
- Fix return value in case of error (Christophe JAILLET)
Xilinx AXI host bridge driver:
- Fix return value in case of error (Christophe JAILLET)
Miscellaneous:
- Make bus_attr_resource_alignment static (Ben Dooks)
- Include <asm/dma.h> for isa_dma_bridge_buggy (Ben Dooks)
- MAINTAINERS: Add file patterns for PCI device tree bindings (Geert Uytterhoeven)
- Make host bridge drivers explicitly non-modular (Paul Gortmaker)"
* tag 'pci-v4.8-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (125 commits)
PCI: xgene: Make explicitly non-modular
PCI: thunder-pem: Make explicitly non-modular
PCI: thunder-ecam: Make explicitly non-modular
PCI: tegra: Make explicitly non-modular
PCI: rcar-gen2: Make explicitly non-modular
PCI: rcar: Make explicitly non-modular
PCI: mvebu: Make explicitly non-modular
PCI: layerscape: Make explicitly non-modular
PCI: keystone: Make explicitly non-modular
PCI: hisi: Make explicitly non-modular
PCI: generic: Make explicitly non-modular
PCI: designware-plat: Make it explicitly non-modular
PCI: artpec6: Make explicitly non-modular
PCI: armada8k: Make explicitly non-modular
PCI: artpec: Add PCI_MSI_IRQ_DOMAIN dependency
PCI: Add ACS quirk for Solarflare SFC9220
arm64: dts: marvell: Add Aardvark PCIe support for Armada 3700
PCI: aardvark: Add Aardvark PCI host controller driver
dt-bindings: add DT binding for the Aardvark PCIe controller
PCI: tegra: Program PADS_REFCLK_CFG* registers with per-SoC values
...
2016-08-02 17:12:29 -04:00
James Smart
458c083e83
lpfc: Remove global lpfc_enable_npiv attribute in leiu of per-hba lpfc_enable_npiv
...
Remove global lpfc_enable_npiv attribute in leiu of per-hba lpfc_enable_npiv
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com >
Signed-off-by: James Smart <james.smart@broadcom.com >
Reviewed-by: Hannes Reinecke <hare@suse.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2016-07-15 15:25:06 -04:00
James Smart
0e916ee71d
lpfc: Correct Port reset resulting in FC port going offline
...
Correct Port reset resulting in FC port going offline
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com >
Signed-off-by: James Smart <james.smart@broadcom.com >
Reviewed-by: Hannes Reinecke <hare@suse.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2016-07-15 15:25:06 -04:00
James Smart
12f4445733
lpfc: Re-organize source for easier device-id management
...
Re-organize source for easier device-id management
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com >
Signed-off-by: James Smart <james.smart@broadcom.com >
Reviewed-by: Hannes Reinecke <hare@suse.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2016-07-15 15:25:06 -04:00
James Smart
a1cadfeffa
lpfc: Correct FCOE discovery to avoid loss of storage devices after system reboot
...
Correct FCOE discovery to avoid loss of storage devices after system reboot
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com >
Signed-off-by: James Smart <james.smart@broadcom.com >
Reviewed-by: Hannes Reinecke <hare@suse.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2016-07-15 15:25:06 -04:00
James Smart
7bdedb34a0
lpfc: Add MDS Diagnostics Support
...
Add MDS Diagnostics Support
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com >
Signed-off-by: James Smart <james.smart@broadcom.com >
Reviewed-by: Hannes Reinecke <hare@suse.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2016-07-15 15:25:06 -04:00
James Smart
65791f1f90
lpfc: Add recovery from adapter parity errors on some SLI4 adapters
...
Add recovery from adapter parity errors on some SLI4 adapters
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com >
Signed-off-by: James Smart <james.smart@broadcom.com >
Reviewed-by: Hannes Reinecke <hare@suse.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2016-07-15 15:25:06 -04:00
James Smart
310429ef11
lpfc: Fix Transgression Flag of Optical Element descriptor for RDP on Linux
...
Fix Transgression Flag of Optical Element descriptor for RDP on Linux
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com >
Signed-off-by: James Smart <james.smart@broadcom.com >
Reviewed-by: Hannes Reinecke <hare@suse.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2016-07-15 15:25:06 -04:00
Johannes Thumshirn
e0c0483c22
lpfc: Use pci_(request|release)_mem_regions
...
Now that we do have pci_request_mem_regions() and pci_release_mem_regions()
at hand, use it in the lpfc driver.
Suggested-by: Christoph Hellwig <hch@infradead.org >
Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de >
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com >
Acked-by: Dick Kennedy <dick.kennedy@broadcom.com >
CC: James Smart <james.smart@avagotech.com >
CC: James E.J. Bottomley <jejb@linux.vnet.ibm.com >
CC: Martin K. Petersen <martin.petersen@oracle.com >
2016-06-21 17:10:15 -05:00
James Smart
506115777a
lpfc: Update modified file copyrights
...
Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com >
Signed-off-by: James Smart <james.smart@avagotech.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2016-04-11 16:57:09 -04:00
James Smart
8663cbbe3b
lpfc: Fix interaction between fdmi_on and enable_SmartSAN
...
Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com >
Signed-off-by: James Smart <james.smart@avagotech.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2016-04-11 16:57:09 -04:00
James Smart
b5c5395839
lpfc: Utilize embedded CDB logic to minimize IO latency
...
Pass cmd iu payloads inline to adapter job structure rather than as
separate dma buffers.
Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com >
Signed-off-by: James Smart <james.smart@avagotech.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2016-04-11 16:57:09 -04:00
Arnd Bergmann
aeb6641f8e
lpfc: fix misleading indentation
...
gcc-6 complains about the indentation of the lpfc_destroy_vport_work_array()
call in lpfc_online(), which clearly doesn't look right:
drivers/scsi/lpfc/lpfc_init.c: In function 'lpfc_online':
drivers/scsi/lpfc/lpfc_init.c:2880:3: warning: statement is indented as if it were guarded by... [-Wmisleading-indentation]
lpfc_destroy_vport_work_array(phba, vports);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/lpfc/lpfc_init.c:2863:2: note: ...this 'if' clause, but it is not
if (vports != NULL)
^~
Looking at the patch that introduced this code, it's clear that the
behavior is correct and the indentation is wrong.
This fixes the indentation and adds curly braces around the previous
if() block for clarity, as that is most likely what caused the code
to be misindented in the first place.
Signed-off-by: Arnd Bergmann <arnd@arndb.de >
Fixes: 549e55cd2a
("[SCSI] lpfc 8.2.2 : Fix locking around HBA's port_list")
Reviewed-by: Sebastian Herbszt <herbszt@gmx.de >
Reviewed-by: Hannes Reinecke <hare@suse.com >
Reviewed-by: Ewan D. Milne <emilne@redhat.com >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2016-03-18 15:21:23 -04:00
James Smart
448193b5b5
lpfc: Add logging for misconfigured optics.
...
Add logging for misconfigured optics acqe reported by fw.
Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com >
Signed-off-by: James Smart <james.smart@avagotech.com >
Reviewed-by: Hannes Reinicke <hare@suse.de >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2015-12-21 22:06:09 -05:00
James Smart
a085e87c81
lpfc: Use new FDMI speed definitions for 10G, 25G and 40G FCoE.
...
Use new FDMI speed definitions for 10G, 25G and 40G FCoE.
Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com >
Signed-off-by: James Smart <james.smart@avagotech.com >
Reviewed-by: Hannes Reinicke <hare@suse.de >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2015-12-21 22:04:04 -05:00
James Smart
4258e98ee3
lpfc: Modularize and cleanup FDMI code in driver
...
Modularize, cleanup, add comments - for FDMI code in driver
Note: I don't like the comments with leading # - but as we have a lot if
present, I'm deferring to handle it in one big fix later.
Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com >
Signed-off-by: James Smart <james.smart@avagotech.com >
Reviewed-by: Hannes Reinicke <hare@suse.de >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2015-12-21 22:01:20 -05:00
James Smart
6690e0d4fc
lpfc: Fix driver crash when module parameter lpfc_fcp_io_channel set to 16
...
Fix driver crash when module parameter lpfc_fcp_io_channel set to 16
Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com >
Signed-off-by: James Smart <james.smart@avagotech.com >
Reviewed-by: Hannes Reinicke <hare@suse.de >
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com >
2015-12-21 21:54:09 -05:00
James Smart
d38dd52c79
lpfc: Add support for Lancer G6 and 32G FC links
...
Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com >
Signed-off-by: James Smart <james.smart@avagotech.com >
Reviewed-by: Hannes Reinecke <hare@suse.com >
Signed-off-by: James Bottomley <JBottomley@Odin.com >
2015-10-27 10:17:51 +09:00
Sebastian Herbszt
db6f1c2f90
lpfc: remove set but not used variables
...
Remove set but not used variables.
Signed-off-by: Sebastian Herbszt <herbszt@gmx.de >
Signed-off-by: James Smart <james.smart@avagotech.com >
Reviewed-by: Hannes Reinecke <hare@suse.de >
Signed-off-by: James Bottomley <JBottomley@Odin.com >
2015-10-27 10:06:00 +09:00
Ian Mitchell
c0365c0692
Fix kmalloc overflow in LPFC driver at large core count
...
This patch allows the LPFC to start up without a fatal kernel bug based
on an exceeded KMALLOC_MAX_SIZE and a too large NR_CPU-based maskbits
field. The bug was based on the number of CPU cores in a system.
Using the get_cpu_mask() function declared in kernel/cpu.c allows the
driver to load on the community kernel 4.2 RC1.
Below is the kernel bug reproduced:
8<--------------------------------------------------------------------
2199382.828437 ( 0.005216)| lpfc 0003:02:00.0: enabling device (0140 -> 0142)
2199382.999272 ( 0.170835)| ------------[ cut here ]------------
2199382.999337 ( 0.000065)| WARNING: CPU: 84 PID: 404 at mm/slab_common.c:653 kmalloc_slab+0x2f/0x89()
2199383.004534 ( 0.005197)| Modules linked in: lpfc(+) usbcore(+) mptctl scsi_transport_fc sg lpc_ich i2c_i801 usb_common tpm_tis mfd_core tpm acpi_cpufreq button scsi_dh_alua scsi_dh_rdacusbcore: registered new device driver usb
2199383.020568 ( 0.016034)|
2199383.020581 ( 0.000013)| scsi_dh_hp_sw scsi_dh_emc scsi_dh gru thermal sata_nv processor piix fan thermal_sysehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
2199383.035288 ( 0.014707)|
2199383.035306 ( 0.000018)| hwmon ata_piix
2199383.035336 ( 0.000030)| CPU: 84 PID: 404 Comm: kworker/84:0 Not tainted 3.18.0-rc2-gat-00106-ga7ca10f-dirty #178
2199383.047077 ( 0.011741)| ehci-pci: EHCI PCI platform driver
2199383.047134 ( 0.000057)| Hardware name: SGI UV2000/ROMLEY, BIOS SGI UV 2000/3000 series BIOS 01/15/2013
2199383.056245 ( 0.009111)| Workqueue: events work_for_cpu_fn
2199383.066174 ( 0.009929)| 000000000000028d ffff88eef827bbe8 ffffffff815a542f 000000000000028d
2199383.069545 ( 0.003371)| ffffffff810ea142 ffff88eef827bc28 ffffffff8104365c ffff88eefe4006c8
2199383.076214 ( 0.006669)| 0000000000000000 00000000000080d0 0000000000000000 0000000000000004
2199383.079213 ( 0.002999)| Call Trace:
2199383.084084 ( 0.004871)| [<ffffffff815a542f>] dump_stack+0x49/0x62
2199383.087283 ( 0.003199)| [<ffffffff810ea142>] ? kmalloc_slab+0x2f/0x89
2199383.091415 ( 0.004132)| [<ffffffff8104365c>] warn_slowpath_common+0x77/0x92
2199383.095197 ( 0.003782)| [<ffffffff8104368c>] warn_slowpath_null+0x15/0x17
2199383.103336 ( 0.008139)| [<ffffffff810ea142>] kmalloc_slab+0x2f/0x89
2199383.107082 ( 0.003746)| [<ffffffff8110fd9e>] __kmalloc+0x13/0x16a
2199383.112531 ( 0.005449)| [<ffffffffa01a8ed9>] lpfc_pci_probe_one_s4+0x105b/0x1644 [lpfc]
2199383.115316 ( 0.002785)| [<ffffffff81302b92>] ? pci_bus_read_config_dword+0x75/0x87
2199383.123431 ( 0.008115)| [<ffffffffa01a951f>] lpfc_pci_probe_one+0x5d/0xcb5 [lpfc]
2199383.127364 ( 0.003933)| [<ffffffff81497119>] ? dbs_check_cpu+0x168/0x177
2199383.136438 ( 0.009074)| [<ffffffff81496fa5>] ? gov_queue_work+0xb4/0xc0
2199383.140407 ( 0.003969)| [<ffffffff8130b2a1>] local_pci_probe+0x1e/0x52
2199383.143105 ( 0.002698)| [<ffffffff81052c47>] work_for_cpu_fn+0x13/0x1b
2199383.147315 ( 0.004210)| [<ffffffff81054965>] process_one_work+0x222/0x35e
2199383.151379 ( 0.004064)| [<ffffffff81054e76>] worker_thread+0x3d5/0x46e
2199383.159402 ( 0.008023)| [<ffffffff81054aa1>] ? process_one_work+0x35e/0x35e
2199383.163097 ( 0.003695)| [<ffffffff810599c6>] kthread+0xc8/0xd2
2199383.167476 ( 0.004379)| [<ffffffff810598fe>] ? kthread_freezable_should_stop+0x5b/0x5b
2199383.176434 ( 0.008958)| [<ffffffff815a8cac>] ret_from_fork+0x7c/0xb0
2199383.180086 ( 0.003652)| [<ffffffff810598fe>] ? kthread_freezable_should_stop+0x5b/0x5b
2199383.192333 ( 0.012247)| ehci-pci 0000:00:1a.0: EHCI Host Controller
-------------------------------------------------------------------->8
The proposed solution was approved by James Smart at Emulex and tested
on a UV2 machine with 6144 cores. With the fix, the LPFC module loads
with no unwanted effects on the system.
Signed-off-by: Ian Mitchell <imitchell@sgi.com >
Signed-off-by: Alex Thorlton <athorlton@sgi.com >
Suggested-by: Robert Elliot <elliott@hp.com >
[james.smart: resolve unused variable warning]
Signed-off-by: James Smart <james.smart@avagotech.com >
Signed-off-by: James Bottomley <JBottomley@Odin.com >
2015-10-27 10:00:53 +09:00
Johannes Thumshirn
7973967f80
lpfc: Destroy lpfc_hba_index IDR on module exit
...
Destroy lpfc_hba_index IDR on module exit, reclaiming the allocated memory.
This was detected by the following semantic patch (written by Luis Rodriguez
<mcgrof@suse.com >)
<SmPL>
@ defines_module_init @
declarer name module_init, module_exit;
declarer name DEFINE_IDR;
identifier init;
@@
module_init(init);
@ defines_module_exit @
identifier exit;
@@
module_exit(exit);
@ declares_idr depends on defines_module_init && defines_module_exit @
identifier idr;
@@
DEFINE_IDR(idr);
@ on_exit_calls_destroy depends on declares_idr && defines_module_exit @
identifier declares_idr.idr, defines_module_exit.exit;
@@
exit(void)
{
...
idr_destroy(&idr);
...
}
@ missing_module_idr_destroy depends on declares_idr && defines_module_exit && !on_exit_calls_destroy @
identifier declares_idr.idr, defines_module_exit.exit;
@@
exit(void)
{
...
+idr_destroy(&idr);
}
</SmPL>
Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de >
Signed-off-by: James Smart <james.smart@avagotech.com >
Reviewed-by: Hannes Reinecke <hare@suse.de >
Signed-off-by: James Bottomley <JBottomley@Odin.com >
2015-10-27 09:58:37 +09:00
Bodo Stroesser
5f406fae01
lpfc: in sli3 use configured sg_seg_cnt for sg_tablesize
...
Currently the module parameter lpfc_sg_seg_count does not have effect
for sli3 devices.
In lpfc_sli_driver_resource_setup(), which is used for sli3, the code
writes the configured sg_seg_cnt into lpfc_template.sg_tablesize.
But lpfc_template is the template used for sli4 only. Thus the value should
correctly be written to lpfc_template_s3->sg_tablesize.
This patch is for kernel 4.1-rc5, but is tested with lpfc 10.2.405.26 only.
Signed-off-by: Bodo Stroesser <bstroesser@ts.fujitsu.com >
Signed-off-by: James Smart <james.smart@avagotech.com >
Reviewed-by: Sebastian Herbszt <herbszt@gmx.de >
Reviewed-by: Hannes Reinecke <hare@suse.com >
Signed-off-by: James Bottomley <JBottomley@Odin.com >
2015-10-27 09:57:40 +09:00
Firo Yang
c6cb9b4fd9
lpfc: Remove unnessary cast
...
kzalloc() returns a void pointer - no need to cast it in
drivers/scsi/lpfc/lpfc_init.c::lpfc_sli_driver_resource_setup()
Signed-off-by: Firo Yang <firogm@gmail.com >
Signed-off-by: James Smart <james.smart@avagotech.com >
Signed-off-by: James Bottomley <JBottomley@Odin.com >
2015-10-27 09:56:24 +09:00
Sebastian Herbszt
290237d2aa
lpfc: fix model description
...
Remove trailing space from model description.
Signed-off-by: Sebastian Herbszt <herbszt@gmx.de >
Signed-off-by: James Smart <james.smart@avagotech.com >
Reviewed-by: Hannes Reinecke <hare@suse.com >
Signed-off-by: James Bottomley <JBottomley@Odin.com >
2015-10-27 09:55:00 +09:00
James Smart
8b0dff1416
lpfc: Add support for using block multi-queue
...
With blk-mq support in the mid-layer, lpfc can do IO steering based
on the information in the request tag. This patch allows lpfc to use
blk-mq if enabled. If not enabled, we fall back into the emulex-internal
affinity mappings.
This feature can be turned on via CONFIG_SCSI_MQ_DEFAULT or passing
scsi_mod.use_blk_mq=Y as a parameter to the kernel.
Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com >
Signed-off-by: James Smart <james.smart@avagotech.com >
Reviewed-by: Hannes Reinecke <hare@suse.de >
Signed-off-by: James Bottomley <JBottomley@Odin.com >
2015-06-13 08:20:59 -07:00
James Smart
cc82355a6e
lpfc: Fix crash in vport_delete.
...
We inadvertantly took the path to recreate the vport while in a
driver teardown path
Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com >
Signed-off-by: James Smart <james.smart@avagotech.com >
Reviewed-by: Hannes Reinecke <hare@suse.de >
Signed-off-by: James Bottomley <JBottomley@Odin.com >
2015-06-05 22:39:07 -07:00
James Smart
ed243d37be
lpfc: Fix to remove IRQF_SHARED flag for MSI/MSI-X vectors.
...
Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com >
Signed-off-by: James Smart <james.smart@avagotech.com >
Reviewed-by: Hannes Reinecke <hare@suse.de >
Signed-off-by: James Bottomley <JBottomley@Odin.com >
2015-06-05 22:38:12 -07:00
James Smart
8b017a30a3
lpfc: Add support for ELS LCB.
...
Also has a little whitespace fixing.
Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com >
Signed-off-by: James Smart <james.smart@avagotech.com >
Reviewed-by: Hannes Reinecke <hare@suse.de >
Signed-off-by: James Bottomley <JBottomley@Odin.com >
2015-06-05 15:30:28 -07:00
James Smart
f25e8e79bd
lpfc: Update copyright to 2015
...
Update copyright to 2015
Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com >
Signed-off-by: James Smart <james.smart@emulex.com >
Reviewed-by: Hannes Reinecke <hare@suse.de >
Signed-off-by: James Bottomley <JBottomley@Odin.com >
2015-04-10 07:50:42 -07:00
James Smart
be6bb94100
lpfc: Fix premature release of rpi bit in bitmask
...
Currently, the driver plays off the fact that older sli4 adapters have a
different rpi access pattern that allowed for the rpi reference to be
released earlier in the teardown sequence, allowing the driver to recycle
the rpi value sooner. Newer sli4 adapters have a different access pattern that
requires us to wait for a later mailbox completion. This changes the put
call location on the newer sli4 adapters.
Symptoms of the error are "0110 ELS" and the "0372 iotag" errors.
Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com >
Signed-off-by: James Smart <james.smart@emulex.com >
Reviewed-by: Hannes Reinecke <hare@suse.de >
Signed-off-by: James Bottomley <JBottomley@Odin.com >
2015-04-10 07:49:39 -07:00
James Smart
26d830ec7f
lpfc: Parse the new 20G, 25G and 40G link speeds in the lpfc driver
...
Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com >
Signed-off-by: James Smart <james.smart@emulex.com >
Reviewed-by: Hannes Reinecke <hare@suse.de >
Signed-off-by: James Bottomley <JBottomley@Odin.com >
2015-04-10 07:48:08 -07:00
James Smart
2c9c5a0010
lpfc: Fix setting of EQ (interrupt) delay Multiplier
...
Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com >
Signed-off-by: James Smart <james.smart@emulex.com >
Reviewed-by: Hannes Reinecke <hare@suse.de >
Signed-off-by: James Bottomley <JBottomley@Odin.com >
2015-04-10 07:47:27 -07:00
James Smart
ea4142f6b1
lpfc: Fix host reset escalation killing all IOs.
...
Fix host reset escalation killing all IOs.
SLI-3 adapters will use a new host template. The template differs
from SLI-4 adapters in that it does not have an eh_host_reset_handler.
Lpfc has traditionally never had a host_reset. The host reset
handler was added when we ran into a stuck hardware condition on a
SLI-4 adapter. The host_reset will reset and reinit the pci function,
clearing the hardware condition.
Unfortunately, the host reset handler uses attach/detach code paths,
which makes scsi_add_host() and scsi_remove_host() calls. Meaning, a
host_reset will completely remove the scsi_host from the system. As a
new call to scsi_add_host() is made, the shost# changes, which results
in completely new scsi_devices and device names. All the older scsi
devices on the old shost# are now orphaned and unrecoverable.
We realize we need to re-implement the host_reset_handler so the scsi_host
stays registered across the host_reset, but that will be a rather
lengthy effort. In the short term, we had an immediate need to restore
the SLI-3 devices to their working behavior, with the easiest path being
to remove their host_reset handler.
Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com >
Signed-off-by: James Smart <james.smart@emulex.com >
Reviewed-by: Hannes Reinecke <hare@suse.de >
Signed-off-by: James Bottomley <JBottomley@Odin.com >
2015-04-10 07:46:35 -07:00
James Smart
946727dc07
lpfc: Add Lancer Temperature Event support to the lpfc driver
...
This will detect and send an async event if overtemp is detected
Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com >
Signed-off-by: James Smart <james.smart@emulex.com >
Reviewed-by: Hannes Reinecke <hare@suse.de >
Signed-off-by: James Bottomley <JBottomley@Odin.com >
2015-04-10 07:45:03 -07:00
James Smart
77d093fb00
lpfc: Fix the iteration count to match the 30 sec comment in the routine lpfc_pci_function_reset
...
Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com >
Signed-off-by: James Smart <james.smart@emulex.com >
Reviewed-by: Hannes Reinecke <hare@suse.de >
Signed-off-by: James Bottomley <JBottomley@Odin.com >
2015-04-10 07:44:33 -07:00
James Smart
eb01656688
lpfc: fix low priority issues from fortify source code scan
...
Fixed Low priority issues from lpfc given by fortify source code scan.
Signed-off-by: James Smart <james.smart@emulex.com >
Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com >
Signed-off-by: Christoph Hellwig <hch@lst.de >
2014-09-16 09:10:12 -07:00
James Smart
a2fc4aefa0
lpfc: fix high priority issues from fortify source code scan
...
Fixed High priority issues from lpfc given by fortify source code scan.
Signed-off-by: James Smart <james.smart@emulex.com >
Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com >
Signed-off-by: Christoph Hellwig <hch@lst.de >
2014-09-16 09:10:12 -07:00
James Smart
2f6fa2c911
lpfc: fix IP Reset processing - wait for RDY before proceeding
...
Fix IP Reset processing - wait for RDY before proceeding
Signed-off-by: James Smart <james.smart@emulex.com >
Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com >
Signed-off-by: Christoph Hellwig <hch@lst.de >
2014-09-16 09:10:09 -07:00
James Smart
dafe8ceaa8
lpfc: fix discovery timeout during nameserver login
...
Fix discovery timeout during nameserver login
Signed-off-by: James Smart <james.smart@emulex.com >
Signed-off-by: Dick Kennedy <dick.kennedy@emulex.com >
Signed-off-by: Christoph Hellwig <hch@lst.de >
2014-09-16 09:10:08 -07:00
Alexander Gordeev
4f871e1b27
lpfc: Use pci_enable_msix_range() instead of pci_enable_msix()
...
As result of deprecation of MSI-X/MSI enablement functions
pci_enable_msix() and pci_enable_msi_block() all drivers
using these two interfaces need to be updated to use the
new pci_enable_msi_range() or pci_enable_msi_exact()
and pci_enable_msix_range() or pci_enable_msix_exact()
interfaces.
Signed-off-by: Alexander Gordeev <agordeev@redhat.com >
Reviewed-by: James Smart <james.smart@emulex.com >
Signed-off-by: Christoph Hellwig <hch@lst.de >
2014-09-16 09:10:07 -07:00
Joe Perches
1aee383d59
lpfc: use dma_zalloc_coherent
...
Use the zeroing function instead of dma_alloc_coherent & memset(,0,)
Signed-off-by: Joe Perches <joe@perches.com >
Reviewed-by: James Smart <james.smart@emulex.com >
Signed-off-by: Christoph Hellwig <hch@lst.de >
2014-09-16 09:10:06 -07:00
Rashika Kheria
e399b22881
lpfc: mark functions as static in lpfc/lpfc_init.c
...
Mark functions as static in lpfc/lpfc_init.c because they are not used
outside this file.
This eliminates the following warning in lpfc/lpfc_init.c:
drivers/scsi/lpfc/lpfc_init.c:652:1: warning: no previous prototype for ‘lpfc_hba_init_link’ [-Wmissing-prototypes]
drivers/scsi/lpfc/lpfc_init.c:753:1: warning: no previous prototype for ‘lpfc_hba_down_link’ [-Wmissing-prototypes]
drivers/scsi/lpfc/lpfc_init.c:3434:1: warning: no previous prototype for ‘lpfc_sli4_fcf_redisc_wait_tmo’ [-Wmissing-prototypes]
Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com >
Reviewed-by: Josh Triplett <josh@joshtriplett.org >
Reviewed-by: James Smart <james.smart@emulex.com >
Signed-off-by: Christoph Hellwig <hch@lst.de >
2014-09-16 09:10:04 -07:00
Alexander Gordeev
029165acfa
lpfc: Remove superfluous call to pci_disable_msix()
...
There is no need to call pci_disable_msix() in case
the previous call to pci_enable_msix() failed
Signed-off-by: Alexander Gordeev <agordeev@redhat.com >
Acked-by: James Smart <james.smart@emulex.com >
Signed-off-by: Christoph Hellwig <hch@lst.de >
2014-07-29 08:38:53 -04:00
James Smart
12222f4f5e
lpfc: mark old devices as obsolete
...
Signed-off-by: James Smart <james.smart@emulex.com >
Reviewed-By: Dick Kennedy <dick.kennedy@emulex.com >
Signed-off-by: Christoph Hellwig <hch@lst.de >
2014-06-02 18:30:10 +02:00
James Smart
68e814f587
lpfc: Fix for cleaning up stale ring flag and sp_queue_event entries
...
Fix for cleaning up stale ring flag and sp_queue_event entries.
Signed-off-by: James Smart <james.smart@emulex.com >
Reviewed-By: Dick Kennedy <dick.kennedy@emulex.com >
Signed-off-by: Christoph Hellwig <hch@lst.de >
2014-06-02 18:29:49 +02:00
James Smart
16a59fb36f
lpfc: Update Copyright on changed files
...
Update Copyright on changed files
Signed-off-by: James Smart <james.smart@emulex.com >
Reviewed-By: Dick Kennedy <dick.kennedy@emulex.com >
Signed-off-by: Christoph Hellwig <hch@lst.de >
2014-06-02 18:29:05 +02:00
James Smart
f38fa0bb7c
lpfc: Convert runtime references to old xlane cfg param to fof cfg param
...
Convert runtime references to old xlane cfg param to fof cfg param
Signed-off-by: James Smart <james.smart@emulex.com >
Reviewed-By: Dick Kennedy <dick.kennedy@emulex.com >
Signed-off-by: Christoph Hellwig <hch@lst.de >
2014-06-02 18:28:57 +02:00
James Smart
db55fba8dc
lpfc: Fix SLI4 s abort loop to process all FCP rings and under ring_lock
...
Fix SLI4 s abort loop to process all FCP rings and under ring_lock
Signed-off-by: James Smart <james.smart@emulex.com >
Reviewed-By: Dick Kennedy <dick.kennedy@emulex.com >
Signed-off-by: Christoph Hellwig <hch@lst.de >
2014-06-02 18:28:47 +02:00
James Smart
ee62021a11
lpfc: Fixed kernel panic in lpfc_abort_handler
...
Fixed kernel panic in lpfc_abort_handler
Signed-off-by: James Smart <james.smart@emulex.com >
Reviewed-By: Dick Kennedy <dick.kennedy@emulex.com >
Signed-off-by: Christoph Hellwig <hch@lst.de >
2014-06-02 18:28:43 +02:00
James Smart
07eab624e5
lpfc: Fix locking for postbufq when freeing
...
Fix locking for postbufq when freeing
Signed-off-by: James Smart <james.smart@emulex.com >
Reviewed-By: Dick Kennedy <dick.kennedy@emulex.com >
Signed-off-by: Christoph Hellwig <hch@lst.de >
2014-06-02 18:28:39 +02:00