Update LPFC driver from 12.4 to 12.8
Driver update from: https://docs.broadcom.com/docs/elx_elx-lpfc-12.8.542.34-1_rhel8u4.src.rpm Signed-off-by: Kairui Song <kasong@tencent.com>
This commit is contained in:
parent
76f0b2c4f5
commit
16009a31ce
|
|
@ -0,0 +1,342 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General
|
||||
Public License instead of this License.
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,95 @@
|
|||
#/*******************************************************************
|
||||
# * This file is part of the Emulex Linux Device Driver for *
|
||||
# * Fibre Channel Host Bus Adapters. *
|
||||
# * Copyright (C) 2020 Broadcom. All Rights Reserved. The term *
|
||||
# * “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. *
|
||||
# * Copyright (C) 2004-2009 Emulex. All rights reserved. *
|
||||
# * EMULEX and SLI are trademarks of Emulex. *
|
||||
# * www.broadcom.com *
|
||||
# * *
|
||||
# * This program is free software; you can redistribute it and/or *
|
||||
# * modify it under the terms of version 2 of the GNU General *
|
||||
# * Public License as published by the Free Software Foundation. *
|
||||
# * This program is distributed in the hope that it will be useful. *
|
||||
# * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND *
|
||||
# * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, *
|
||||
# * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE *
|
||||
# * DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD *
|
||||
# * TO BE LEGALLY INVALID. See the GNU General Public License for *
|
||||
# * more details, a copy of which can be found in the file COPYING *
|
||||
# * included with this package. *
|
||||
# *******************************************************************/
|
||||
######################################################################
|
||||
|
||||
KERNELVERSION ?= $(shell uname -r)
|
||||
BASEINCLUDE ?= /lib/modules/$(KERNELVERSION)/build
|
||||
DRIVERDIR ?= $(PWD)
|
||||
DEBUG_FS = $(shell grep CONFIG_DEBUG_FS=y $(BASEINCLUDE)/.config)
|
||||
|
||||
ifeq ($(DEBUG_FS),CONFIG_DEBUG_FS=y)
|
||||
EXTRA_CFLAGS += -DCONFIG_SCSI_LPFC_DEBUG_FS
|
||||
export EXTRA_CFLAGS
|
||||
endif
|
||||
|
||||
ifneq ($(GCOV),)
|
||||
EXTRA_CFLAGS += -fprofile-arcs -ftest-coverage
|
||||
EXTRA_CFLAGS += -O0
|
||||
export EXTRA_CFLAGS
|
||||
endif
|
||||
|
||||
clean-files += Modules.symvers Module.symvers Module.markers modules.order
|
||||
|
||||
export clean-files
|
||||
|
||||
$(info GNUmakefile setting EXTRA_CFLAGS to $(EXTRA_CFLAGS))
|
||||
default:
|
||||
$(MAKE) -C $(BASEINCLUDE) M=$(DRIVERDIR) CONFIG_SCSI_LPFC=m modules
|
||||
|
||||
brcmfcoe:
|
||||
@cp lpfc_attr.c brcmfcoe_attr.c
|
||||
@cp lpfc_bsg.c brcmfcoe_bsg.c
|
||||
@cp lpfc_ct.c brcmfcoe_ct.c
|
||||
@cp lpfc_debugfs.c brcmfcoe_debugfs.c
|
||||
@cp lpfc_els.c brcmfcoe_els.c
|
||||
@cp lpfc_hbadisc.c brcmfcoe_hbadisc.c
|
||||
@cp lpfc_init.c brcmfcoe_init.c
|
||||
@cp lpfc_mbox.c brcmfcoe_mbox.c
|
||||
@cp lpfc_mem.c brcmfcoe_mem.c
|
||||
@cp lpfc_nportdisc.c brcmfcoe_nportdisc.c
|
||||
@cp lpfc_scsi.c brcmfcoe_scsi.c
|
||||
@cp lpfc_sli.c brcmfcoe_sli.c
|
||||
@cp lpfc_vport.c brcmfcoe_vport.c
|
||||
@cp lpfc_nvme.c brcmfcoe_nvme.c
|
||||
@cp lpfc_nvmet.c brcmfcoe_nvmet.c
|
||||
$(MAKE) -C $(BASEINCLUDE) M=$(DRIVERDIR) CONFIG_SCSI_BRCMFCOE=m BUILD_FLAGS=-DBUILD_BRCMFCOE modules
|
||||
@rm -f brcmfcoe_attr.c
|
||||
@rm -f brcmfcoe_bsg.c
|
||||
@rm -f brcmfcoe_ct.c
|
||||
@rm -f brcmfcoe_debugfs.c
|
||||
@rm -f brcmfcoe_els.c
|
||||
@rm -f brcmfcoe_hbadisc.c
|
||||
@rm -f brcmfcoe_init.c
|
||||
@rm -f brcmfcoe_mbox.c
|
||||
@rm -f brcmfcoe_mem.c
|
||||
@rm -f brcmfcoe_nportdisc.c
|
||||
@rm -f brcmfcoe_scsi.c
|
||||
@rm -f brcmfcoe_sli.c
|
||||
@rm -f brcmfcoe_vport.c
|
||||
@rm -f brcmfcoe_nvme.c
|
||||
@rm -f brcmfcoe_nvmet.c
|
||||
|
||||
|
||||
install:
|
||||
@rm -f /lib/modules/$(KERNELVERSION)/kernel/drivers/scsi/lpfc.ko
|
||||
install -d /lib/modules/$(KERNELVERSION)/kernel/drivers/scsi/lpfc
|
||||
install -c lpfc.ko /lib/modules/$(KERNELVERSION)/kernel/drivers/scsi/lpfc
|
||||
depmod -a
|
||||
|
||||
brcmfcoeinstall:
|
||||
@rm -f /lib/modules/$(KERNELVERSION)/kernel/drivers/scsi/brcmfcoe.ko
|
||||
install -d /lib/modules/$(KERNELVERSION)/kernel/drivers/scsi/brcmfcoe
|
||||
install -c brcmfcoe.ko /lib/modules/$(KERNELVERSION)/kernel/drivers/scsi/brcmfcoe
|
||||
depmod -a
|
||||
|
||||
clean:
|
||||
$(MAKE) -C $(BASEINCLUDE) M=$(DRIVERDIR) CONFIG_SCSI_LPFC=m clean
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
#/*******************************************************************
|
||||
# * This file is part of the Emulex Linux Device Driver for *
|
||||
# * Fibre Channel Host Bus Adapters. *
|
||||
# * Copyright (C) 2017-2018 Broadcom. All Rights Reserved. The term *
|
||||
# * “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. *
|
||||
# * Copyright (C) 2017-2020 Broadcom. All Rights Reserved. The term *
|
||||
# * “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. *
|
||||
# * Copyright (C) 2004-2012 Emulex. All rights reserved. *
|
||||
# * EMULEX and SLI are trademarks of Emulex. *
|
||||
# * www.broadcom.com *
|
||||
|
|
@ -21,16 +21,116 @@
|
|||
# *******************************************************************/
|
||||
######################################################################
|
||||
|
||||
ccflags-$(GCOV) := -fprofile-arcs -ftest-coverage
|
||||
ccflags-$(GCOV) += -O0
|
||||
SUBLEVEL = $(shell echo ${KERNELVERSION} | \
|
||||
sed -e 's/[0-9]*.[0-9]*.\([0-9]*\).[0-9]*.*/\1/')
|
||||
EXTRAVERSION = $(shell echo ${KERNELRELEASE} | \
|
||||
sed -e 's/[0-9]*.[0-9]*.[0-9]*.\([0-9]*\).*/\1/')
|
||||
MAJORVERSION = $(shell echo ${KERNELVERSION} | \
|
||||
sed -e 's/\([0-9]*\).*/\1/')
|
||||
MINORVERSION = $(shell echo ${KERNELVERSION} | \
|
||||
sed -e 's/[0-9]*.\([0-9]*\).*/\1/')
|
||||
|
||||
ifdef WARNINGS_BECOME_ERRORS
|
||||
ccflags-y += -Werror
|
||||
EXTRA_CFLAGS += -Werror -DKERNEL_MAJOR=${MAJORVERSION} -DKERNEL_MINOR=${MINORVERSION}
|
||||
|
||||
ifneq ($(GCOV),)
|
||||
EXTRA_CFLAGS += -fprofile-arcs -ftest-coverage
|
||||
EXTRA_CFLAGS += -O0
|
||||
endif
|
||||
|
||||
#
|
||||
# DISTRO KERNELVERSION SUBLEVEL EXTRAVERSION
|
||||
# sles15-sp3 5.3.18-37 18 37
|
||||
# sles15-sp2 5.3.18-22 18 22
|
||||
# sles15-sp1 4.12.14-195 14 195
|
||||
# sles15-sp0 4.12.14-23 14 23
|
||||
# sles12-sp5 4.12.14-100 14 100
|
||||
# sles12-sp4 4.12.14-94.4 14 94
|
||||
# rhel8.4 4.18.0-259.el8 Alpha-1.0
|
||||
# rhel8.3 4.18.0-240.el8
|
||||
# rhel8.2 4.18.0-193.el8
|
||||
# rhel8.1 4.18.0-147.el8
|
||||
# rhel8.0 4.18.0-80.el8
|
||||
#
|
||||
|
||||
ifeq (,$(findstring -DBUILD_BRCMFCOE,$(BUILD_FLAGS)))
|
||||
ifeq ("$(wildcard /etc/debian_version)","")
|
||||
EXTRA_CFLAGS += -DBUILD_NVME
|
||||
endif
|
||||
endif
|
||||
|
||||
# This will pick out a Citrix kernel, xs5.6 / xs6.0 / xs6.1
|
||||
EXTRAXSINFO = $(shell echo ${KERNELVERSION} | \
|
||||
grep 'xs[156].[016]' | sed -e 's/.*xs.*/xs/')
|
||||
|
||||
ifeq ($(EXTRAXSINFO),xs)
|
||||
EXTRA_CFLAGS += -DBUILD_CITRIX_XS
|
||||
endif
|
||||
EXTRAXSINFO = $(shell echo ${KERNELVERSION} | \
|
||||
grep 'el8' | sed -e 's/.*el8.*/el8/')
|
||||
|
||||
ifeq ($(EXTRAXSINFO),el8)
|
||||
EXTRA_CFLAGS += -DBUILD_RHEL8
|
||||
RHEL8_NZ = $(shell echo "${KERNELVERSION} 4.18.0-83.el8.x86_64" | \
|
||||
tr " " "\n" | sort -V | head -n1)
|
||||
ifeq ($(RHEL8_NZ), 4.18.0-83.el8.x86_64)
|
||||
EXTRA_CFLAGS += -DBUILD_RHEL8_NZ
|
||||
endif
|
||||
ifeq ($(shell test $(EXTRAVERSION) -ge 211; echo $$?), 0)
|
||||
EXTRA_CFLAGS += -DBUILD_RHEL83
|
||||
endif
|
||||
# RHEL 8.4 adds NVME1+ Addendum
|
||||
ifeq ($(shell test $(EXTRAVERSION) -ge 259; echo $$?), 0)
|
||||
EXTRA_CFLAGS += -DBUILD_NVME_PLUS
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ("$(wildcard /etc/os-release)","")
|
||||
SLES15SP = $(shell grep -q 'sles:15:sp' /etc/os-release && echo 1)
|
||||
ifeq ($(SLES15SP),1)
|
||||
EXTRA_CFLAGS += -DBUILD_SLES15SP
|
||||
endif
|
||||
SLES12SP5 = $(shell grep -q 'sles:12:sp5' /etc/os-release && echo 1)
|
||||
ifeq ($(SLES12SP5),1)
|
||||
EXTRA_CFLAGS += -DBUILD_SLES12SP5
|
||||
endif
|
||||
SLES15SP2 = $(shell grep -q 'sles:15:sp2' /etc/os-release && echo 1)
|
||||
ifeq ($(SLES15SP2),1)
|
||||
EXTRA_CFLAGS += -DBUILD_SLES15SP2 -DBUILD_NVME_PLUS
|
||||
endif
|
||||
SLES15SP3 = $(shell grep -q 'sles:15:sp3' /etc/os-release && echo 1)
|
||||
ifeq ($(SLES15SP3),1)
|
||||
EXTRA_CFLAGS += -DBUILD_SLES15SP2 -DBUILD_NVME_PLUS
|
||||
endif
|
||||
endif
|
||||
|
||||
# This will pick out an openEuler kernel
|
||||
EXTRAOE1INFO = $(shell echo ${KERNELVERSION} | grep oe1 | \
|
||||
sed -e 's/.*oe1.*/oe1/')
|
||||
ifeq ($(EXTRAOE1INFO),oe1)
|
||||
ifneq ("$(wildcard /etc/os-release)","")
|
||||
OE1_20 = $(shell grep -q 'VERSION="20.' /etc/os-release && echo 1)
|
||||
ifeq ($(OE1_20),1)
|
||||
EXTRA_CFLAGS += -DBUILD_OE1_20
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
# This will pick out a xen kernel
|
||||
EXTRAXENINFO = $(shell echo ${KERNELVERSION} | \
|
||||
grep 'xen' | sed -e 's/.*xen.*/xen/')
|
||||
|
||||
EXTRA_CFLAGS += ${BUILD_FLAGS}
|
||||
|
||||
obj-$(CONFIG_SCSI_LPFC) := lpfc.o
|
||||
|
||||
lpfc-objs := lpfc_mem.o lpfc_sli.o lpfc_ct.o lpfc_els.o \
|
||||
lpfc_hbadisc.o lpfc_init.o lpfc_mbox.o lpfc_nportdisc.o \
|
||||
lpfc_scsi.o lpfc_attr.o lpfc_vport.o lpfc_debugfs.o lpfc_bsg.o \
|
||||
lpfc_nvme.o lpfc_nvmet.o
|
||||
lpfc_nvme.o lpfc_nvmet.o lpfc_auth.o
|
||||
|
||||
obj-$(CONFIG_SCSI_BRCMFCOE) := brcmfcoe.o
|
||||
|
||||
brcmfcoe-objs := brcmfcoe_mem.o brcmfcoe_sli.o brcmfcoe_ct.o brcmfcoe_els.o brcmfcoe_hbadisc.o \
|
||||
brcmfcoe_init.o brcmfcoe_mbox.o brcmfcoe_nportdisc.o brcmfcoe_scsi.o brcmfcoe_attr.o \
|
||||
brcmfcoe_vport.o brcmfcoe_debugfs.o brcmfcoe_bsg.o \
|
||||
brcmfcoe_nvme.o brcmfcoe_nvmet.o
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/*******************************************************************
|
||||
* This file is part of the Emulex Linux Device Driver for *
|
||||
* Fibre Channel Host Bus Adapters. *
|
||||
* Copyright (C) 2017-2019 Broadcom. All Rights Reserved. The term *
|
||||
* Copyright (C) 2017-2020 Broadcom. All Rights Reserved. The term *
|
||||
* “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. *
|
||||
* Copyright (C) 2004-2016 Emulex. All rights reserved. *
|
||||
* EMULEX and SLI are trademarks of Emulex. *
|
||||
|
|
@ -22,6 +22,7 @@
|
|||
*******************************************************************/
|
||||
|
||||
#include <scsi/scsi_host.h>
|
||||
#include <linux/version.h>
|
||||
#include <linux/ktime.h>
|
||||
#include <linux/workqueue.h>
|
||||
|
||||
|
|
@ -29,6 +30,15 @@
|
|||
#define CONFIG_SCSI_LPFC_DEBUG_FS
|
||||
#endif
|
||||
|
||||
/* define XS6.5 and XS7.0 kernel version since
|
||||
* XenServer build environment does not pass
|
||||
* these values in
|
||||
*/
|
||||
#if defined(XS_API)
|
||||
#define KERNEL_MAJOR 3
|
||||
#define KERNEL_MINOR 10
|
||||
#endif
|
||||
|
||||
struct lpfc_sli2_slim;
|
||||
|
||||
#define ELX_MODEL_NAME_SIZE 80
|
||||
|
|
@ -55,6 +65,7 @@ struct lpfc_sli2_slim;
|
|||
#define LPFC_MAX_SG_TABLESIZE 0xffff
|
||||
#define LPFC_MIN_SG_SLI4_BUF_SZ 0x800 /* based on LPFC_DEFAULT_SG_SEG_CNT */
|
||||
#define LPFC_MAX_BG_SLI4_SEG_CNT_DIF 128 /* sg element count for BlockGuard */
|
||||
#define LPFC_MAX_ED_SLI4_SEG_CNT_DIF 256 /* sg element count for ExternalDIF */
|
||||
#define LPFC_MAX_SG_SEG_CNT_DIF 512 /* sg element count per scsi cmnd */
|
||||
#define LPFC_MAX_SG_SEG_CNT 4096 /* sg element count per scsi cmnd */
|
||||
#define LPFC_MIN_SG_SEG_CNT 32 /* sg element count per scsi cmnd */
|
||||
|
|
@ -69,6 +80,9 @@ struct lpfc_sli2_slim;
|
|||
#define LPFC_TGTQ_RAMPUP_PCENT 5 /* Target queue rampup in percentage */
|
||||
#define LPFC_MIN_TGT_QDEPTH 10
|
||||
#define LPFC_MAX_TGT_QDEPTH 0xFFFF
|
||||
#define LPFC_MIN_LUN_QDEPTH 1
|
||||
#define LPFC_DEF_LUN_QDEPTH 64
|
||||
#define LPFC_MAX_LUN_QDEPTH 512
|
||||
|
||||
#define LPFC_MAX_BUCKET_COUNT 20 /* Maximum no. of buckets for stat data
|
||||
collection. */
|
||||
|
|
@ -114,6 +128,12 @@ struct lpfc_sli2_slim;
|
|||
#define LPFC_MBX_NO_WAIT 0
|
||||
#define LPFC_MBX_WAIT 1
|
||||
|
||||
#define LPFC_CFG_PARAM_MAGIC_NUM 0xFEAA0005
|
||||
#define LPFC_PORT_CFG_NAME "/cfg/port.cfg"
|
||||
|
||||
#define lpfc_rangecheck(val, min, max) \
|
||||
((uint)(val) >= (uint)(min) && (val) <= (max))
|
||||
|
||||
enum lpfc_polling_flags {
|
||||
ENABLE_FCP_RING_POLLING = 0x1,
|
||||
DISABLE_FCP_RING_INT = 0x2
|
||||
|
|
@ -207,8 +227,7 @@ typedef struct lpfc_vpd {
|
|||
} rev;
|
||||
struct {
|
||||
#ifdef __BIG_ENDIAN_BITFIELD
|
||||
uint32_t rsvd3 :19; /* Reserved */
|
||||
uint32_t cdss : 1; /* Configure Data Security SLI */
|
||||
uint32_t rsvd3 :20; /* Reserved */
|
||||
uint32_t rsvd2 : 3; /* Reserved */
|
||||
uint32_t cbg : 1; /* Configure BlockGuard */
|
||||
uint32_t cmv : 1; /* Configure Max VPIs */
|
||||
|
|
@ -230,8 +249,7 @@ typedef struct lpfc_vpd {
|
|||
uint32_t cmv : 1; /* Configure Max VPIs */
|
||||
uint32_t cbg : 1; /* Configure BlockGuard */
|
||||
uint32_t rsvd2 : 3; /* Reserved */
|
||||
uint32_t cdss : 1; /* Configure Data Security SLI */
|
||||
uint32_t rsvd3 :19; /* Reserved */
|
||||
uint32_t rsvd3 :20; /* Reserved */
|
||||
#endif
|
||||
} sli3Feat;
|
||||
} lpfc_vpd_t;
|
||||
|
|
@ -262,13 +280,15 @@ struct lpfc_stats {
|
|||
uint32_t elsRcvPRLI;
|
||||
uint32_t elsRcvLIRR;
|
||||
uint32_t elsRcvRLS;
|
||||
uint32_t elsRcvRPS;
|
||||
uint32_t elsRcvRPL;
|
||||
uint32_t elsRcvRRQ;
|
||||
uint32_t elsRcvRTV;
|
||||
uint32_t elsRcvECHO;
|
||||
uint32_t elsRcvLCB;
|
||||
uint32_t elsRcvRDP;
|
||||
uint32_t elsRcvAUTH;
|
||||
uint32_t elsRcvFPIN;
|
||||
uint32_t elsRcvEDC;
|
||||
uint32_t elsXmitFLOGI;
|
||||
uint32_t elsXmitFDISC;
|
||||
uint32_t elsXmitPLOGI;
|
||||
|
|
@ -282,6 +302,8 @@ struct lpfc_stats {
|
|||
uint32_t elsXmitFARPR;
|
||||
uint32_t elsXmitACC;
|
||||
uint32_t elsXmitLSRJT;
|
||||
uint32_t elsXmitRDF;
|
||||
uint32_t elsXmitEDC;
|
||||
|
||||
uint32_t frameRcvBcast;
|
||||
uint32_t frameRcvMulti;
|
||||
|
|
@ -335,6 +357,52 @@ enum hba_state {
|
|||
LPFC_HBA_ERROR = -1
|
||||
};
|
||||
|
||||
/* Structure used to identify all devices controlled
|
||||
* by the External DIF logic.
|
||||
*/
|
||||
struct lpfc_external_dif_support {
|
||||
struct list_head listentry;
|
||||
struct lpfc_name portName;
|
||||
uint64_t lun;
|
||||
uint16_t sid;
|
||||
uint8_t dif_info;
|
||||
uint8_t state;
|
||||
#define LPFC_EDSM_IGNORE 0
|
||||
#define LPFC_EDSM_INIT 1
|
||||
#define LPFC_EDSM_NEEDS_INQUIRY 2
|
||||
#define LPFC_EDSM_PATH_STANDBY 3
|
||||
#define LPFC_EDSM_PATH_READY 4
|
||||
#define LPFC_EDSM_PATH_CHECK 5
|
||||
uint16_t inq_retry;
|
||||
#define LPFC_EDSM_MAX_RETRY 3
|
||||
uint16_t inq_cnt;
|
||||
uint32_t err3f_cnt;
|
||||
uint32_t err4b_cnt;
|
||||
};
|
||||
|
||||
/* Struct used to identify External DIF vendor specific info */
|
||||
struct lpfc_vendor_dif {
|
||||
uint8_t length;
|
||||
uint8_t version;
|
||||
uint8_t dif_info;
|
||||
#define LPFC_FDIF_ATO 0x01
|
||||
#define LPFC_FDIF_REFCHK 0x02
|
||||
#define LPFC_FDIF_APPCHK 0x04
|
||||
#define LPFC_FDIF_GRDCHK 0x08
|
||||
#define LPFC_FDIF_SPTMASK 0x70
|
||||
#define LPFC_FDIF_PROTECT 0x80
|
||||
uint8_t reserved1;
|
||||
};
|
||||
|
||||
/* Defines used to identify a External DIF device */
|
||||
#define LPFC_INQ_VID_OFFSET 8
|
||||
#define LPFC_INQ_VDIF_OFFSET 168
|
||||
#define LPFC_INQ_FDIF_SZ (LPFC_INQ_VDIF_OFFSET + 4)
|
||||
#define LPFC_INQ_FDIF_VENDOR "3PARdata" /* Vendor Identification */
|
||||
#define LPFC_INQ_FDIF_VERSION 1
|
||||
#define LPFC_INQ_FDIF_SIZE 2
|
||||
#define LPFC_FDIF_CDB_PROTECT 0x20 /* Set RD/WR PROTECT = 001 */
|
||||
|
||||
struct lpfc_trunk_link_state {
|
||||
enum hba_state state;
|
||||
uint8_t fault;
|
||||
|
|
@ -347,6 +415,168 @@ struct lpfc_trunk_link {
|
|||
link3;
|
||||
};
|
||||
|
||||
/* Format of congestion module parameters */
|
||||
struct lpfc_cgn_param {
|
||||
uint32_t cgn_param_magic;
|
||||
uint8_t cgn_param_version; /* version 1 */
|
||||
uint8_t cgn_param_mode; /* 0=off 1=managed 2=monitor only */
|
||||
#define LPFC_CFG_OFF 0
|
||||
#define LPFC_CFG_MANAGED 1
|
||||
#define LPFC_CFG_MONITOR 2
|
||||
uint8_t cgn_rsvd1; /* Unused for CMF */
|
||||
uint8_t cgn_rsvd2; /* Unused for CMF */
|
||||
uint8_t cgn_param_acr; /* 0=conserve 1=moderate 2=severe */
|
||||
#define LPFC_CFG_CONSERVE 0
|
||||
#define LPFC_CFG_MODERATE 1
|
||||
#define LPFC_CFG_SEVERE 2
|
||||
uint8_t cgn_param_rxburst; /* Burst in 512K units */
|
||||
#define LPFC_CFG_BURST_MIN 0
|
||||
#define LPFC_CFG_BURST_MAX 32
|
||||
#define LPFC_CFG_BURST_DEF 4
|
||||
uint8_t cgn_param_rxbw; /* BW in units of 5% */
|
||||
#define LPFC_CFG_BW_MIN 1
|
||||
#define LPFC_CFG_BW_MAX 20
|
||||
#define LPFC_CFG_BW_DEF 18
|
||||
uint8_t cgn_param_acr_min_rxbw; /* in units of 5%, must be < acrrxbw */
|
||||
#define LPFC_CFG_DEFAULT_MIN_BW 8
|
||||
uint8_t cgn_param_acr_scale; /* used in recovery and ramp up/down */
|
||||
#define LPFC_CFG_LOW_SCALE 1
|
||||
#define LPFC_CFG_DEFAULT_SCALE 10 /* 100% */
|
||||
#define LPFC_CFG_HIGH_SCALE 255
|
||||
uint8_t cgn_param_acr_max_rxburst; /* Burst in 512K units */
|
||||
uint8_t cgn_param_acr_max_rxbw; /* BW in units of 5% */
|
||||
uint8_t cgn_param_acr_min_rxburst; /* units of 5%, be < acrrxburst */
|
||||
};
|
||||
|
||||
/* Max number of days of congestion data */
|
||||
#define LPFC_MAX_CGN_DAYS 10
|
||||
|
||||
/* Format of congestion buffer info
|
||||
* This structure defines memory thats allocated and registered with
|
||||
* the HBA firmware. When adding or removing fields from this structure
|
||||
* the alignment must match the HBA firmware.
|
||||
*/
|
||||
|
||||
struct lpfc_cgn_info {
|
||||
/* Header */
|
||||
__le16 cgn_info_size; /* is sizeof(struct lpfc_cgn_info) */
|
||||
uint8_t cgn_info_version; /* represents format of structure */
|
||||
#define LPFC_CGN_INFO_V1 1
|
||||
#define LPFC_CGN_INFO_V2 2
|
||||
#define LPFC_CGN_INFO_V3 3
|
||||
uint8_t cgn_info_mode; /* 0=off 1=managed 2=monitor only */
|
||||
uint8_t cgn_info_detect; /* 1=driver 2-fabric 3=both */
|
||||
uint8_t cgn_info_action; /* 0=fixed 1=adaptive */
|
||||
uint8_t cgn_info_acr; /* 0=conserve 1=moderate 2=aggressive */
|
||||
uint8_t cgn_info_rxburst; /* Burst in 512K units */
|
||||
uint8_t cgn_info_rxbw; /* BW in units of 5% */
|
||||
|
||||
/* Start Time */
|
||||
uint8_t cgn_info_month;
|
||||
uint8_t cgn_info_day;
|
||||
uint8_t cgn_info_year;
|
||||
uint8_t cgn_info_hour;
|
||||
uint8_t cgn_info_minute;
|
||||
uint8_t cgn_info_second;
|
||||
|
||||
/* minute / hours / daily indices */
|
||||
uint8_t cgn_index_minute;
|
||||
uint8_t cgn_index_hour;
|
||||
uint8_t cgn_index_day;
|
||||
|
||||
__le16 cgn_warn_freq;
|
||||
__le16 cgn_alarm_freq;
|
||||
__le16 cgn_lunq;
|
||||
uint8_t cgn_pad1[8];
|
||||
|
||||
/* Driver Information */
|
||||
__le16 cgn_drvr_min[60];
|
||||
__le32 cgn_drvr_hr[24];
|
||||
__le32 cgn_drvr_day[LPFC_MAX_CGN_DAYS];
|
||||
|
||||
/* Congestion Warnings */
|
||||
__le16 cgn_warn_min[60];
|
||||
__le32 cgn_warn_hr[24];
|
||||
__le32 cgn_warn_day[LPFC_MAX_CGN_DAYS];
|
||||
|
||||
/* Latency Information */
|
||||
__le32 cgn_latency_min[60];
|
||||
__le32 cgn_latency_hr[24];
|
||||
__le32 cgn_latency_day[LPFC_MAX_CGN_DAYS];
|
||||
|
||||
/* Bandwidth Information */
|
||||
__le16 cgn_bw_min[60];
|
||||
__le16 cgn_bw_hr[24];
|
||||
__le16 cgn_bw_day[LPFC_MAX_CGN_DAYS];
|
||||
|
||||
/* Congestion Alarms */
|
||||
__le16 cgn_alarm_min[60];
|
||||
__le32 cgn_alarm_hr[24];
|
||||
__le32 cgn_alarm_day[LPFC_MAX_CGN_DAYS];
|
||||
|
||||
/* Start of congestion statistics */
|
||||
uint8_t cgn_stat_npm; /* Notifications per minute */
|
||||
|
||||
/* Start Time */
|
||||
uint8_t cgn_stat_month;
|
||||
uint8_t cgn_stat_day;
|
||||
uint8_t cgn_stat_year;
|
||||
uint8_t cgn_stat_hour;
|
||||
uint8_t cgn_stat_minute;
|
||||
uint8_t cgn_pad2[2];
|
||||
|
||||
__le32 cgn_notification;
|
||||
__le32 cgn_peer_notification;
|
||||
__le32 link_integ_notification;
|
||||
__le32 delivery_notification;
|
||||
|
||||
uint8_t cgn_stat_cgn_month; /* Last congestion notification FPIN */
|
||||
uint8_t cgn_stat_cgn_day;
|
||||
uint8_t cgn_stat_cgn_year;
|
||||
uint8_t cgn_stat_cgn_hour;
|
||||
uint8_t cgn_stat_cgn_min;
|
||||
uint8_t cgn_stat_cgn_sec;
|
||||
|
||||
uint8_t cgn_stat_peer_month; /* Last peer congestion FPIN */
|
||||
uint8_t cgn_stat_peer_day;
|
||||
uint8_t cgn_stat_peer_year;
|
||||
uint8_t cgn_stat_peer_hour;
|
||||
uint8_t cgn_stat_peer_min;
|
||||
uint8_t cgn_stat_peer_sec;
|
||||
|
||||
uint8_t cgn_stat_lnk_month; /* Last link integrity FPIN */
|
||||
uint8_t cgn_stat_lnk_day;
|
||||
uint8_t cgn_stat_lnk_year;
|
||||
uint8_t cgn_stat_lnk_hour;
|
||||
uint8_t cgn_stat_lnk_min;
|
||||
uint8_t cgn_stat_lnk_sec;
|
||||
|
||||
uint8_t cgn_stat_del_month; /* Last delivery notification FPIN */
|
||||
uint8_t cgn_stat_del_day;
|
||||
uint8_t cgn_stat_del_year;
|
||||
uint8_t cgn_stat_del_hour;
|
||||
uint8_t cgn_stat_del_min;
|
||||
uint8_t cgn_stat_del_sec;
|
||||
#define LPFC_CGN_STAT_SIZE 48
|
||||
#define LPFC_CGN_DATA_SIZE (sizeof(struct lpfc_cgn_info) - \
|
||||
LPFC_CGN_STAT_SIZE - sizeof(uint32_t))
|
||||
|
||||
__le32 cgn_info_crc;
|
||||
#define LPFC_CGN_CRC32_MAGIC_NUMBER 0x1EDC6F41
|
||||
#define LPFC_CGN_CRC32_SEED 0xFFFFFFFF
|
||||
};
|
||||
|
||||
#define LPFC_CGN_INFO_SZ (sizeof(struct lpfc_cgn_info) - \
|
||||
sizeof(uint32_t))
|
||||
|
||||
struct lpfc_cgn_stat {
|
||||
atomic64_t total_bytes;
|
||||
atomic64_t rcv_bytes;
|
||||
atomic64_t rx_latency;
|
||||
#define LPFC_CGN_NOT_SENT 0xFFFFFFFFFFFFFFFFLL
|
||||
atomic_t rx_io_cnt;
|
||||
};
|
||||
|
||||
struct lpfc_vport {
|
||||
struct lpfc_hba *phba;
|
||||
struct list_head listentry;
|
||||
|
|
@ -388,6 +618,7 @@ struct lpfc_vport {
|
|||
#define FC_VFI_REGISTERED 0x800000 /* VFI is registered */
|
||||
#define FC_FDISC_COMPLETED 0x1000000/* FDISC completed */
|
||||
#define FC_DISC_DELAYED 0x2000000/* Delay NPort discovery */
|
||||
#define FC_CT_CGN_RPA 0x4000000 /* CGN RPA sent to switch */
|
||||
|
||||
uint32_t ct_flags;
|
||||
#define FC_CT_RFF_ID 0x1 /* RFF_ID accepted by switch */
|
||||
|
|
@ -397,6 +628,7 @@ struct lpfc_vport {
|
|||
#define FC_CT_RFT_ID 0x10 /* RFT_ID accepted by switch */
|
||||
|
||||
struct list_head fc_nodes;
|
||||
uint32_t throttle_cnt;
|
||||
|
||||
/* Keep counters for the number of entries in each list. */
|
||||
uint16_t fc_plogi_cnt;
|
||||
|
|
@ -479,10 +711,11 @@ struct lpfc_vport {
|
|||
#ifdef CONFIG_SCSI_LPFC_DEBUG_FS
|
||||
struct dentry *debug_disc_trc;
|
||||
struct dentry *debug_nodelist;
|
||||
struct dentry *debug_ediflist;
|
||||
struct dentry *debug_nvmestat;
|
||||
struct dentry *debug_scsistat;
|
||||
struct dentry *debug_nvmektime;
|
||||
struct dentry *debug_cpucheck;
|
||||
struct dentry *debug_ioktime;
|
||||
struct dentry *debug_hdwqstat;
|
||||
struct dentry *vport_debugfs_root;
|
||||
struct lpfc_debugfs_trc *disc_trc;
|
||||
atomic_t disc_trc_cnt;
|
||||
|
|
@ -496,6 +729,11 @@ struct lpfc_vport {
|
|||
#define FAWWPN_SET 2
|
||||
#define FAWWPN_PARAM_CHG 4
|
||||
|
||||
struct throttle_history log; /* Throttle log history for phba */
|
||||
/* Used to discover External DIF devices */
|
||||
struct list_head external_dif_list;
|
||||
spinlock_t external_dif_lock; /* lock for external_dif_list */
|
||||
|
||||
uint16_t fdmi_num_disc;
|
||||
uint32_t fdmi_hba_mask;
|
||||
uint32_t fdmi_port_mask;
|
||||
|
|
@ -605,6 +843,12 @@ struct lpfc_epd_pool {
|
|||
spinlock_t lock; /* lock for expedite pool */
|
||||
};
|
||||
|
||||
enum ras_state {
|
||||
INACTIVE,
|
||||
REG_INPROGRESS,
|
||||
ACTIVE
|
||||
};
|
||||
|
||||
struct lpfc_ras_fwlog {
|
||||
uint8_t *fwlog_buff;
|
||||
uint32_t fw_buffcount; /* Buffer size posted to FW */
|
||||
|
|
@ -621,7 +865,28 @@ struct lpfc_ras_fwlog {
|
|||
bool ras_enabled; /* Ras Enabled for the function */
|
||||
#define LPFC_RAS_DISABLE_LOGGING 0x00
|
||||
#define LPFC_RAS_ENABLE_LOGGING 0x01
|
||||
bool ras_active; /* RAS logging running state */
|
||||
enum ras_state state; /* RAS logging running state */
|
||||
};
|
||||
|
||||
#define DBG_LOG_STR_SZ 256
|
||||
#define DBG_LOG_SZ 256
|
||||
|
||||
struct dbg_log_ent {
|
||||
char log[DBG_LOG_STR_SZ];
|
||||
u64 t_ns;
|
||||
};
|
||||
|
||||
enum lpfc_irq_chann_mode {
|
||||
/* Assign IRQs to all possible cpus that have hardware queues */
|
||||
NORMAL_MODE,
|
||||
|
||||
/* Assign IRQs only to cpus on the same numa node as HBA */
|
||||
NUMA_MODE,
|
||||
|
||||
/* Assign IRQs only on non-hyperthreaded CPUs. This is the
|
||||
* same as normal_mode, but assign IRQS only on physical CPUs.
|
||||
*/
|
||||
NHT_MODE,
|
||||
};
|
||||
|
||||
struct lpfc_hba {
|
||||
|
|
@ -637,7 +902,7 @@ struct lpfc_hba {
|
|||
(struct lpfc_hba *, struct lpfc_io_buf *);
|
||||
void (*lpfc_rampdown_queue_depth)
|
||||
(struct lpfc_hba *);
|
||||
void (*lpfc_scsi_prep_cmnd)
|
||||
int (*lpfc_scsi_prep_cmnd)
|
||||
(struct lpfc_vport *, struct lpfc_io_buf *,
|
||||
struct lpfc_nodelist *);
|
||||
|
||||
|
|
@ -674,9 +939,9 @@ struct lpfc_hba {
|
|||
void (*lpfc_stop_port)
|
||||
(struct lpfc_hba *);
|
||||
int (*lpfc_hba_init_link)
|
||||
(struct lpfc_hba *, uint32_t);
|
||||
(struct lpfc_hba *);
|
||||
int (*lpfc_hba_down_link)
|
||||
(struct lpfc_hba *, uint32_t);
|
||||
(struct lpfc_hba *);
|
||||
int (*lpfc_selective_reset)
|
||||
(struct lpfc_hba *);
|
||||
|
||||
|
|
@ -693,6 +958,9 @@ struct lpfc_hba {
|
|||
struct workqueue_struct *wq;
|
||||
struct delayed_work eq_delay_work;
|
||||
|
||||
#define LPFC_IDLE_STAT_DELAY 1000
|
||||
struct delayed_work idle_stat_delay_work;
|
||||
|
||||
struct lpfc_sli sli;
|
||||
uint8_t pci_dev_grp; /* lpfc PCI dev group: 0x0, 0x1, 0x2,... */
|
||||
uint32_t sli_rev; /* SLI2, SLI3, or SLI4 */
|
||||
|
|
@ -725,7 +993,8 @@ struct lpfc_hba {
|
|||
#define HBA_FCOE_MODE 0x4 /* HBA function in FCoE Mode */
|
||||
#define HBA_SP_QUEUE_EVT 0x8 /* Slow-path qevt posted to worker thread*/
|
||||
#define HBA_POST_RECEIVE_BUFFER 0x10 /* Rcv buffers need to be posted */
|
||||
#define ELS_XRI_ABORT_EVENT 0x40
|
||||
#define HBA_PERSISTENT_TOPO 0x20 /* Persistent topology support in hba */
|
||||
#define ELS_XRI_ABORT_EVENT 0x40 /* ELS_XRI abort event was queued */
|
||||
#define ASYNC_EVENT 0x80
|
||||
#define LINK_DISABLED 0x100 /* Link disabled by user */
|
||||
#define FCF_TS_INPROG 0x200 /* FCF table scan in progress */
|
||||
|
|
@ -742,7 +1011,12 @@ struct lpfc_hba {
|
|||
* capability
|
||||
*/
|
||||
#define HBA_FLOGI_ISSUED 0x100000 /* FLOGI was issued */
|
||||
#define HBA_CGN_BOTTOM 0x200000 /* HBA Congestion mgmt hits bottom */
|
||||
#define HBA_CGN_DAY_WRAP 0x400000 /* HBA Congestion info day wraps */
|
||||
#define HBA_DEFER_FLOGI 0x800000 /* Defer FLOGI till read_sparm cmpl */
|
||||
#define HBA_SETUP 0x1000000 /* Signifies HBA setup is completed */
|
||||
#define HBA_HBEAT_INP 0x2000000 /* mbox HBEAT is in progress */
|
||||
#define HBA_HBEAT_TMO 0x4000000 /* HBEAT initiated after timeout */
|
||||
|
||||
uint32_t fcp_ring_in_use; /* When polling test if intr-hndlr active*/
|
||||
struct lpfc_dmabuf slim2p;
|
||||
|
|
@ -805,6 +1079,9 @@ struct lpfc_hba {
|
|||
uint32_t cfg_xpsgl;
|
||||
uint32_t cfg_enable_npiv;
|
||||
uint32_t cfg_enable_rrq;
|
||||
#ifndef NO_APEX
|
||||
uint32_t cfg_enable_fcp_priority;
|
||||
#endif
|
||||
uint32_t cfg_topology;
|
||||
uint32_t cfg_link_speed;
|
||||
#define LPFC_FCF_FOV 1 /* Fast fcf failover */
|
||||
|
|
@ -824,9 +1101,9 @@ struct lpfc_hba {
|
|||
uint32_t cfg_use_msi;
|
||||
uint32_t cfg_auto_imax;
|
||||
uint32_t cfg_fcp_imax;
|
||||
uint32_t cfg_force_rscn;
|
||||
uint32_t cfg_cq_poll_threshold;
|
||||
uint32_t cfg_cq_max_proc_limit;
|
||||
uint32_t cfg_force_rscn;
|
||||
uint32_t cfg_fcp_cpu_map;
|
||||
uint32_t cfg_fcp_mq_threshold;
|
||||
uint32_t cfg_hdw_queue;
|
||||
|
|
@ -844,8 +1121,6 @@ struct lpfc_hba {
|
|||
uint32_t cfg_nvme_seg_cnt;
|
||||
uint32_t cfg_scsi_seg_cnt;
|
||||
uint32_t cfg_sg_dma_buf_size;
|
||||
uint64_t cfg_soft_wwnn;
|
||||
uint64_t cfg_soft_wwpn;
|
||||
uint32_t cfg_hba_queue_depth;
|
||||
uint32_t cfg_enable_hba_reset;
|
||||
uint32_t cfg_enable_hba_heartbeat;
|
||||
|
|
@ -867,24 +1142,27 @@ struct lpfc_hba {
|
|||
uint32_t cfg_enable_bg;
|
||||
uint32_t cfg_prot_mask;
|
||||
uint32_t cfg_prot_guard;
|
||||
uint32_t cfg_external_dif;
|
||||
uint32_t cfg_hostmem_hgp;
|
||||
uint32_t cfg_log_verbose;
|
||||
uint32_t cfg_enable_fc4_type;
|
||||
uint32_t cfg_aer_support;
|
||||
uint32_t cfg_sriov_nr_virtfn;
|
||||
uint32_t cfg_request_firmware_upgrade;
|
||||
uint32_t cfg_iocb_cnt;
|
||||
uint32_t cfg_suppress_link_up;
|
||||
uint32_t cfg_throttle_log_cnt;
|
||||
uint32_t cfg_throttle_log_time;
|
||||
struct throttle_history log; /* Throttle log history for phba */
|
||||
uint32_t cfg_rrq_xri_bitmap_sz;
|
||||
uint32_t cfg_delay_discovery;
|
||||
uint32_t cfg_sli_mode;
|
||||
#define LPFC_INITIALIZE_LINK 0 /* do normal init_link mbox */
|
||||
#define LPFC_DELAY_INIT_LINK 1 /* layered driver hold off */
|
||||
#define LPFC_DELAY_INIT_LINK_INDEFINITELY 2 /* wait, manual intervention */
|
||||
uint32_t cfg_enable_dss;
|
||||
uint32_t cfg_fdmi_on;
|
||||
#define LPFC_FDMI_NO_SUPPORT 0 /* FDMI not supported */
|
||||
#define LPFC_FDMI_SUPPORT 1 /* FDMI supported? */
|
||||
uint32_t cfg_enable_e2e;
|
||||
uint32_t cfg_enable_SmartSAN;
|
||||
uint32_t cfg_enable_mds_diags;
|
||||
uint32_t cfg_ras_fwlog_level;
|
||||
|
|
@ -896,7 +1174,13 @@ struct lpfc_hba {
|
|||
#define LPFC_ENABLE_NVME 2
|
||||
#define LPFC_ENABLE_BOTH 3
|
||||
uint32_t cfg_enable_pbde;
|
||||
uint32_t cfg_enable_scsi_mq;
|
||||
uint32_t cfg_enable_auth;
|
||||
#define LPFC_AUTH_DISABLE 0
|
||||
#define LPFC_AUTH_ENABLE 1
|
||||
#if defined(BUILD_NVME)
|
||||
struct nvmet_fc_target_port *targetport;
|
||||
#endif
|
||||
lpfc_vpd_t vpd; /* vital product data */
|
||||
|
||||
struct pci_dev *pcidev;
|
||||
|
|
@ -906,6 +1190,15 @@ struct lpfc_hba {
|
|||
uint32_t work_hs; /* HS stored in case of ERRAT */
|
||||
uint32_t work_status[2]; /* Extra status from SLIM */
|
||||
|
||||
uint32_t nvme_pendq_cnt;
|
||||
struct list_head nvme_pendq;
|
||||
spinlock_t nvme_pendq_lock;
|
||||
struct list_head nvme_abts_pendq;
|
||||
atomic_t nvme_abts_cnt;
|
||||
|
||||
struct workqueue_struct *nvme_io;
|
||||
struct work_struct nvme_defer_work;
|
||||
|
||||
wait_queue_head_t work_waitq;
|
||||
struct task_struct *worker_thread;
|
||||
unsigned long data_flags;
|
||||
|
|
@ -963,8 +1256,6 @@ struct lpfc_hba {
|
|||
#define VPD_PORT 0x8 /* valid vpd port data */
|
||||
#define VPD_MASK 0xf /* mask for any vpd data */
|
||||
|
||||
uint8_t soft_wwn_enable;
|
||||
|
||||
struct timer_list fcp_poll_timer;
|
||||
struct timer_list eratt_poll;
|
||||
uint32_t eratt_poll_interval;
|
||||
|
|
@ -983,6 +1274,7 @@ struct lpfc_hba {
|
|||
uint32_t total_iocbq_bufs;
|
||||
struct list_head active_rrq_list;
|
||||
spinlock_t hbalock;
|
||||
struct work_struct unblock_request_work; /* SCSI layer unblock IOs */
|
||||
|
||||
/* dma_mem_pools */
|
||||
struct dma_pool *lpfc_sg_dma_buf_pool;
|
||||
|
|
@ -991,7 +1283,6 @@ struct lpfc_hba {
|
|||
struct dma_pool *lpfc_drb_pool; /* data receive buffer pool */
|
||||
struct dma_pool *lpfc_nvmet_drb_pool; /* data receive buffer pool */
|
||||
struct dma_pool *lpfc_hbq_pool; /* SLI3 hbq buffer pool */
|
||||
struct dma_pool *txrdy_payload_pool;
|
||||
struct dma_pool *lpfc_cmd_rsp_buf_pool;
|
||||
struct lpfc_dma_pool lpfc_mbuf_safety_pool;
|
||||
|
||||
|
|
@ -1001,9 +1292,11 @@ struct lpfc_hba {
|
|||
mempool_t *active_rrq_pool;
|
||||
|
||||
struct fc_host_statistics link_stats;
|
||||
enum lpfc_irq_chann_mode irq_chann_mode;
|
||||
enum intr_type_t intr_type;
|
||||
uint32_t intr_mode;
|
||||
#define LPFC_INTR_ERROR 0xFFFFFFFF
|
||||
struct msix_entry msix_entries[LPFC_MSIX_VECTORS];
|
||||
struct list_head port_list;
|
||||
spinlock_t port_list_lock; /* lock for port_list mutations */
|
||||
struct lpfc_vport *pport; /* physical lpfc_vport pointer */
|
||||
|
|
@ -1023,6 +1316,8 @@ struct lpfc_hba {
|
|||
uint16_t vpi_count;
|
||||
struct list_head lpfc_vpi_blk_list;
|
||||
|
||||
struct list_head lpfc_auth_active_cfg_list;
|
||||
|
||||
/* Data structure used by fabric iocb scheduler */
|
||||
struct list_head fabric_iocb_list;
|
||||
atomic_t fabric_iocb_count;
|
||||
|
|
@ -1056,6 +1351,9 @@ struct lpfc_hba {
|
|||
#ifdef LPFC_HDWQ_LOCK_STAT
|
||||
struct dentry *debug_lockstat;
|
||||
#endif
|
||||
struct dentry *debug_cgn_buffer;
|
||||
struct dentry *debug_rx_monitor;
|
||||
struct dentry *debug_ras_log;
|
||||
atomic_t nvmeio_trc_cnt;
|
||||
uint32_t nvmeio_trc_size;
|
||||
uint32_t nvmeio_trc_output_idx;
|
||||
|
|
@ -1099,7 +1397,6 @@ struct lpfc_hba {
|
|||
unsigned long last_completion_time;
|
||||
unsigned long skipped_hb;
|
||||
struct timer_list hb_tmofunc;
|
||||
uint8_t hb_outstanding;
|
||||
struct timer_list rrq_tmr;
|
||||
enum hba_temp_state over_temp_state;
|
||||
/* ndlp reference management */
|
||||
|
|
@ -1150,8 +1447,10 @@ struct lpfc_hba {
|
|||
uint32_t iocb_cnt;
|
||||
uint32_t iocb_max;
|
||||
atomic_t sdev_cnt;
|
||||
uint8_t fips_spec_rev;
|
||||
uint8_t fips_level;
|
||||
uint8_t dif_wqidx;
|
||||
#ifndef NO_APEX
|
||||
struct lpfc_fcp_pri_rules *fcp_priority_rules;
|
||||
#endif
|
||||
spinlock_t devicelock; /* lock for luns list */
|
||||
mempool_t *device_data_mem_pool;
|
||||
struct list_head luns;
|
||||
|
|
@ -1169,12 +1468,11 @@ struct lpfc_hba {
|
|||
uint16_t sfp_warning;
|
||||
|
||||
#ifdef CONFIG_SCSI_LPFC_DEBUG_FS
|
||||
uint16_t cpucheck_on;
|
||||
uint16_t hdwqstat_on;
|
||||
#define LPFC_CHECK_OFF 0
|
||||
#define LPFC_CHECK_NVME_IO 1
|
||||
#define LPFC_CHECK_NVMET_RCV 2
|
||||
#define LPFC_CHECK_NVMET_IO 4
|
||||
#define LPFC_CHECK_SCSI_IO 8
|
||||
#define LPFC_CHECK_NVMET_IO 2
|
||||
#define LPFC_CHECK_SCSI_IO 4
|
||||
uint16_t ktime_on;
|
||||
uint64_t ktime_data_samples;
|
||||
uint64_t ktime_status_samples;
|
||||
|
|
@ -1210,6 +1508,72 @@ struct lpfc_hba {
|
|||
uint64_t ktime_seg10_min;
|
||||
uint64_t ktime_seg10_max;
|
||||
#endif
|
||||
/* CMF objects */
|
||||
struct lpfc_cgn_stat __percpu *cmf_stat;
|
||||
uint32_t cmf_interval_rate; /* timer interval limit in ms */
|
||||
uint32_t cmf_timer_cnt;
|
||||
#define LPFC_CMF_INTERVAL 90
|
||||
uint64_t cmf_link_byte_count;
|
||||
uint64_t cmf_max_line_rate;
|
||||
uint64_t cmf_max_bytes_per_interval;
|
||||
uint64_t cmf_last_sync_bw;
|
||||
#define LPFC_CMF_BLK_SIZE 512
|
||||
struct hrtimer cmf_timer;
|
||||
atomic_t cmf_bw_wait;
|
||||
atomic_t cmf_busy;
|
||||
atomic_t cmf_stop_io; /* To block request and stop IO's */
|
||||
uint32_t cmf_active_mode;
|
||||
uint32_t cmf_info_per_interval;
|
||||
#define LPFC_MAX_CMF_INFO 32
|
||||
struct timespec64 cmf_latency; /* Interval congestion timestamp */
|
||||
uint32_t cmf_last_ts; /* Interval congestion time (ms) */
|
||||
uint32_t cmf_active_info;
|
||||
|
||||
/* Signal / FPIN handling for Congestion Mgmt */
|
||||
u8 cgn_reg_fpin; /* Negotiated value from RDF */
|
||||
u8 cgn_init_reg_fpin; /* Initial value from READ_CONFIG */
|
||||
#define LPFC_CGN_FPIN_NONE 0x0
|
||||
#define LPFC_CGN_FPIN_WARN 0x1
|
||||
#define LPFC_CGN_FPIN_ALARM 0x2
|
||||
#define LPFC_CGN_FPIN_BOTH (LPFC_CGN_FPIN_WARN | LPFC_CGN_FPIN_ALARM)
|
||||
u8 cgn_reg_signal; /* Negotiated value from EDC */
|
||||
u8 cgn_init_reg_signal; /* Initial value from READ_CONFIG */
|
||||
#define LPFC_CGN_SIGNAL_NO_SPT 0x0
|
||||
#define LPFC_CGN_SIGNAL_WARN 0x1
|
||||
#define LPFC_CGN_SIGNAL_BOTH 0x2
|
||||
u16 cgn_fpin_frequency;
|
||||
#define LPFC_FPIN_INIT_FREQ 0xffff
|
||||
u32 cgn_sig_freq;
|
||||
u32 cgn_acqe_cnt;
|
||||
|
||||
/* RX monitor handling for CMF */
|
||||
struct rxtable_entry *rxtable; /* RX_monitor information */
|
||||
atomic_t rxtable_idx_head;
|
||||
#define LPFC_RXMONITOR_TABLE_IN_USE (LPFC_MAX_RXMONITOR_ENTRY + 73)
|
||||
atomic_t rxtable_idx_tail;
|
||||
atomic_t rx_max_read_cnt; /* Maximum read bytes */
|
||||
uint64_t rx_block_cnt;
|
||||
|
||||
/* Congestion parameters from flash */
|
||||
struct lpfc_cgn_param cgn_p;
|
||||
|
||||
/* Congestion buffer information */
|
||||
struct lpfc_dmabuf *cgn_i; /* Congestion Info buffer */
|
||||
atomic_t cgn_fabric_warn_cnt; /* Total warning cgn events for info */
|
||||
atomic_t cgn_fabric_alarm_cnt; /* Total alarm cgn events for info */
|
||||
atomic_t cgn_sync_warn_cnt; /* Total warning events for SYNC wqe */
|
||||
atomic_t cgn_sync_alarm_cnt; /* Total alarm events for SYNC wqe */
|
||||
atomic_t cgn_driver_evt_cnt; /* Total driver cgn events for fmw */
|
||||
atomic_t cgn_latency_evt_cnt;
|
||||
struct timespec64 cgn_daily_ts;
|
||||
atomic64_t cgn_latency_evt; /* Avg latency per minute */
|
||||
unsigned long cgn_evt_timestamp;
|
||||
#define LPFC_CGN_TIMER_TO_MIN 60000 /* ms in a minute */
|
||||
uint32_t cgn_evt_minute;
|
||||
#define LPFC_SEC_MIN 60
|
||||
#define LPFC_MIN_HOUR 60
|
||||
#define LPFC_HOUR_DAY 24
|
||||
#define LPFC_MIN_DAY (LPFC_MIN_HOUR * LPFC_HOUR_DAY)
|
||||
|
||||
struct hlist_node cpuhp; /* used for cpuhp per hba callback */
|
||||
struct timer_list cpuhp_poll_timer;
|
||||
|
|
@ -1219,6 +1583,31 @@ struct lpfc_hba {
|
|||
#define LPFC_POLL_SLOWPATH 1 /* called from slowpath */
|
||||
|
||||
char os_host_name[MAXHOSTNAMELEN];
|
||||
|
||||
/* SCSI host template information - for physical port */
|
||||
struct scsi_host_template port_template;
|
||||
/* SCSI host template information - for all vports */
|
||||
struct scsi_host_template vport_template;
|
||||
atomic_t dbg_log_idx;
|
||||
atomic_t dbg_log_cnt;
|
||||
atomic_t dbg_log_dmping;
|
||||
struct dbg_log_ent dbg_log[DBG_LOG_SZ];
|
||||
};
|
||||
|
||||
#define LPFC_MAX_RXMONITOR_ENTRY 800
|
||||
#define LPFC_MAX_RXMONITOR_DUMP 32
|
||||
struct rxtable_entry {
|
||||
uint64_t total_bytes; /* Total no of read bytes requested */
|
||||
uint64_t rcv_bytes; /* Total no of read bytes completed */
|
||||
uint64_t avg_io_size;
|
||||
uint64_t avg_io_latency;/* Average io latency in microseconds */
|
||||
uint64_t max_read_cnt; /* Maximum read bytes */
|
||||
uint64_t max_bytes_per_interval;
|
||||
uint32_t cmf_busy;
|
||||
uint32_t cmf_info; /* CMF_SYNC_WQE info */
|
||||
uint32_t io_cnt;
|
||||
uint32_t timer_utilization;
|
||||
uint32_t timer_interval;
|
||||
};
|
||||
|
||||
static inline struct Scsi_Host *
|
||||
|
|
@ -1327,3 +1716,24 @@ lpfc_sli4_mod_hba_eq_delay(struct lpfc_hba *phba, struct lpfc_queue *eq,
|
|||
writel(reg_data.word0, phba->sli4_hba.u.if_type2.EQDregaddr);
|
||||
eq->q_mode = delay;
|
||||
}
|
||||
|
||||
/**
|
||||
* lpfc_next_online_cpu - Finds next online CPU on cpumask
|
||||
* @mask: Pointer to phba's cpumask member.
|
||||
* @start: starting cpu index
|
||||
*
|
||||
* Note: If no valid cpu found, then nr_cpu_ids is returned.
|
||||
*
|
||||
**/
|
||||
static inline unsigned int
|
||||
lpfc_next_online_cpu(const struct cpumask *mask, unsigned int start)
|
||||
{
|
||||
unsigned int cpu_it;
|
||||
|
||||
for_each_cpu_wrap(cpu_it, mask, start) {
|
||||
if (cpu_online(cpu_it))
|
||||
break;
|
||||
}
|
||||
|
||||
return cpu_it;
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,7 +1,7 @@
|
|||
/*******************************************************************
|
||||
* This file is part of the Emulex Linux Device Driver for *
|
||||
* Fibre Channel Host Bus Adapters. *
|
||||
* Copyright (C) 2017-2018 Broadcom. All Rights Reserved. The term *
|
||||
* Copyright (C) 2017 Broadcom. All Rights Reserved. The term *
|
||||
* “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. *
|
||||
* Copyright (C) 2004-2016 Emulex. All rights reserved. *
|
||||
* EMULEX and SLI are trademarks of Emulex. *
|
||||
|
|
@ -21,6 +21,8 @@
|
|||
* included with this package. *
|
||||
*******************************************************************/
|
||||
|
||||
#ifndef BUILD_BRCMFCOE
|
||||
|
||||
#define LPFC_ATTR(name, defval, minval, maxval, desc) \
|
||||
static uint lpfc_##name = defval;\
|
||||
module_param(lpfc_##name, uint, S_IRUGO);\
|
||||
|
|
@ -126,3 +128,251 @@ lpfc_vport_param_set(name, defval, minval, maxval)\
|
|||
lpfc_vport_param_store(name)\
|
||||
static DEVICE_ATTR(lpfc_##name, S_IRUGO | S_IWUSR,\
|
||||
lpfc_##name##_show, lpfc_##name##_store)
|
||||
|
||||
#else
|
||||
|
||||
#define LPFC_ATTR(name, defval, minval, maxval, desc) \
|
||||
static uint brcmfcoe_##name = defval;\
|
||||
module_param(brcmfcoe_##name, uint, S_IRUGO);\
|
||||
MODULE_PARM_DESC(brcmfcoe_##name, desc);\
|
||||
lpfc_param_init(name, defval, minval, maxval)
|
||||
|
||||
#define LPFC_ATTR_R(name, defval, minval, maxval, desc) \
|
||||
static uint brcmfcoe_##name = defval;\
|
||||
module_param(brcmfcoe_##name, uint, S_IRUGO);\
|
||||
MODULE_PARM_DESC(brcmfcoe_##name, desc);\
|
||||
lpfc_param_show(name)\
|
||||
lpfc_param_init(name, defval, minval, maxval)\
|
||||
static DEVICE_ATTR(brcmfcoe_##name, S_IRUGO , lpfc_##name##_show, NULL)
|
||||
|
||||
#define LPFC_ATTR_RW(name, defval, minval, maxval, desc) \
|
||||
static uint brcmfcoe_##name = defval;\
|
||||
module_param(brcmfcoe_##name, uint, S_IRUGO);\
|
||||
MODULE_PARM_DESC(brcmfcoe_##name, desc);\
|
||||
lpfc_param_show(name)\
|
||||
lpfc_param_init(name, defval, minval, maxval)\
|
||||
lpfc_param_set(name, defval, minval, maxval)\
|
||||
lpfc_param_store(name)\
|
||||
static DEVICE_ATTR(brcmfcoe_##name, S_IRUGO | S_IWUSR,\
|
||||
lpfc_##name##_show, lpfc_##name##_store)
|
||||
|
||||
#define LPFC_BBCR_ATTR_RW(name, defval, minval, maxval, desc) \
|
||||
static uint brcmfcoe_##name = defval;\
|
||||
module_param(brcmfcoe_##name, uint, S_IRUGO);\
|
||||
MODULE_PARM_DESC(brcmfcoe_##name, desc);\
|
||||
lpfc_param_show(name)\
|
||||
lpfc_param_init(name, defval, minval, maxval)\
|
||||
lpfc_param_store(name)\
|
||||
static DEVICE_ATTR(lpfc_##name, S_IRUGO | S_IWUSR,\
|
||||
lpfc_##name##_show, lpfc_##name##_store)
|
||||
|
||||
#define LPFC_ATTR_HEX_R(name, defval, minval, maxval, desc) \
|
||||
static uint brcmfcoe_##name = defval;\
|
||||
module_param(brcmfcoe_##name, uint, S_IRUGO);\
|
||||
MODULE_PARM_DESC(brcmfcoe_##name, desc);\
|
||||
lpfc_param_hex_show(name)\
|
||||
lpfc_param_init(name, defval, minval, maxval)\
|
||||
static DEVICE_ATTR(brcmfcoe_##name, S_IRUGO , lpfc_##name##_show, NULL)
|
||||
|
||||
#define LPFC_ATTR_HEX_RW(name, defval, minval, maxval, desc) \
|
||||
static uint brcmfcoe_##name = defval;\
|
||||
module_param(brcmfcoe_##name, uint, S_IRUGO);\
|
||||
MODULE_PARM_DESC(brcmfcoe_##name, desc);\
|
||||
lpfc_param_hex_show(name)\
|
||||
lpfc_param_init(name, defval, minval, maxval)\
|
||||
lpfc_param_set(name, defval, minval, maxval)\
|
||||
lpfc_param_store(name)\
|
||||
static DEVICE_ATTR(brcmfcoe_##name, S_IRUGO | S_IWUSR,\
|
||||
lpfc_##name##_show, lpfc_##name##_store)
|
||||
|
||||
#define LPFC_VPORT_ATTR(name, defval, minval, maxval, desc) \
|
||||
static uint brcmfcoe_##name = defval;\
|
||||
module_param(brcmfcoe_##name, uint, S_IRUGO);\
|
||||
MODULE_PARM_DESC(brcmfcoe_##name, desc);\
|
||||
lpfc_vport_param_init(name, defval, minval, maxval)
|
||||
|
||||
#define LPFC_VPORT_ATTR_R(name, defval, minval, maxval, desc) \
|
||||
static uint brcmfcoe_##name = defval;\
|
||||
module_param(brcmfcoe_##name, uint, S_IRUGO);\
|
||||
MODULE_PARM_DESC(brcmfcoe_##name, desc);\
|
||||
lpfc_vport_param_show(name)\
|
||||
lpfc_vport_param_init(name, defval, minval, maxval)\
|
||||
static DEVICE_ATTR(brcmfcoe_##name, S_IRUGO , lpfc_##name##_show, NULL)
|
||||
|
||||
#define LPFC_VPORT_ULL_ATTR_R(name, defval, minval, maxval, desc) \
|
||||
static uint64_t brcmfcoe_##name = defval;\
|
||||
module_param(brcmfcoe_##name, ullong, S_IRUGO);\
|
||||
MODULE_PARM_DESC(brcmfcoe_##name, desc);\
|
||||
lpfc_vport_param_show(name)\
|
||||
lpfc_vport_param_init(name, defval, minval, maxval)\
|
||||
static DEVICE_ATTR(brcmfcoe_##name, S_IRUGO , lpfc_##name##_show, NULL)
|
||||
|
||||
#define LPFC_VPORT_ATTR_RW(name, defval, minval, maxval, desc) \
|
||||
static uint brcmfcoe_##name = defval;\
|
||||
module_param(brcmfcoe_##name, uint, S_IRUGO);\
|
||||
MODULE_PARM_DESC(brcmfcoe_##name, desc);\
|
||||
lpfc_vport_param_show(name)\
|
||||
lpfc_vport_param_init(name, defval, minval, maxval)\
|
||||
lpfc_vport_param_set(name, defval, minval, maxval)\
|
||||
lpfc_vport_param_store(name)\
|
||||
static DEVICE_ATTR(brcmfcoe_##name, S_IRUGO | S_IWUSR,\
|
||||
lpfc_##name##_show, lpfc_##name##_store)
|
||||
|
||||
#define LPFC_VPORT_ATTR_HEX_R(name, defval, minval, maxval, desc) \
|
||||
static uint brcmfcoe_##name = defval;\
|
||||
module_param(brcmfcoe_##name, uint, S_IRUGO);\
|
||||
MODULE_PARM_DESC(brcmfcoe_##name, desc);\
|
||||
lpfc_vport_param_hex_show(name)\
|
||||
lpfc_vport_param_init(name, defval, minval, maxval)\
|
||||
static DEVICE_ATTR(brcmfcoe_##name, S_IRUGO , lpfc_##name##_show, NULL)
|
||||
|
||||
#define LPFC_VPORT_ATTR_HEX_RW(name, defval, minval, maxval, desc) \
|
||||
static uint brcmfcoe_##name = defval;\
|
||||
module_param(brcmfcoe_##name, uint, S_IRUGO);\
|
||||
MODULE_PARM_DESC(brcmfcoe_##name, desc);\
|
||||
lpfc_vport_param_hex_show(name)\
|
||||
lpfc_vport_param_init(name, defval, minval, maxval)\
|
||||
lpfc_vport_param_set(name, defval, minval, maxval)\
|
||||
lpfc_vport_param_store(name)\
|
||||
static DEVICE_ATTR(brcmfcoe_##name, S_IRUGO | S_IWUSR,\
|
||||
lpfc_##name##_show, lpfc_##name##_store)
|
||||
|
||||
#define lpfc_drvr_version brcmfcoe_drvr_version
|
||||
#define lpfc_enable_fip brcmfcoe_enable_fip
|
||||
#define lpfc_temp_sensor brcmfcoe_temp_sensor
|
||||
#define lpfc_sriov_hw_max_virtfn brcmfcoe_sriov_hw_max_virtfn
|
||||
#define lpfc_xlane_supported brcmfcoe_xlane_supported
|
||||
|
||||
#define dev_attr_lpfc_log_verbose dev_attr_brcmfcoe_log_verbose
|
||||
#define dev_attr_lpfc_lun_queue_depth dev_attr_brcmfcoe_lun_queue_depth
|
||||
#define dev_attr_lpfc_tgt_queue_depth dev_attr_brcmfcoe_tgt_queue_depth
|
||||
#define dev_attr_lpfc_hba_queue_depth dev_attr_brcmfcoe_hba_queue_depth
|
||||
#define dev_attr_lpfc_peer_port_login dev_attr_brcmfcoe_peer_port_login
|
||||
#define dev_attr_lpfc_fcp_class dev_attr_brcmfcoe_fcp_class
|
||||
#define dev_attr_lpfc_use_adisc dev_attr_brcmfcoe_use_adisc
|
||||
#define dev_attr_lpfc_first_burst_size dev_attr_brcmfcoe_first_burst_size
|
||||
#define dev_attr_lpfc_ack0 dev_attr_brcmfcoe_ack0
|
||||
#define dev_attr_lpfc_xri_rebalancing dev_attr_brcmfcoe_xri_rebalancing
|
||||
#define dev_attr_lpfc_scan_down dev_attr_brcmfcoe_scan_down
|
||||
#define dev_attr_lpfc_fcp_io_sched dev_attr_brcmfcoe_fcp_io_sched
|
||||
#define dev_attr_lpfc_ns_query dev_attr_brcmfcoe_ns_query
|
||||
#define dev_attr_lpfc_fcp2_no_tgt_reset dev_attr_brcmfcoe_fcp2_no_tgt_reset
|
||||
#define dev_attr_lpfc_cr_delay dev_attr_brcmfcoe_cr_delay
|
||||
#define dev_attr_lpfc_cr_count dev_attr_brcmfcoe_cr_count
|
||||
#define dev_attr_lpfc_multi_ring_support dev_attr_brcmfcoe_multi_ring_support
|
||||
#define dev_attr_lpfc_multi_ring_rctl dev_attr_brcmfcoe_multi_ring_rctl
|
||||
#define dev_attr_lpfc_multi_ring_type dev_attr_brcmfcoe_multi_ring_type
|
||||
#define dev_attr_lpfc_fdmi_on dev_attr_brcmfcoe_fdmi_on
|
||||
#define dev_attr_lpfc_enable_SmartSAN dev_attr_brcmfcoe_enable_SmartSAN
|
||||
#define dev_attr_lpfc_max_luns dev_attr_brcmfcoe_max_luns
|
||||
#define dev_attr_lpfc_fcf_failover_policy dev_attr_brcmfcoe_fcf_failover_policy
|
||||
#define dev_attr_lpfc_enable_fcp_priority dev_attr_brcmfcoe_enable_fcp_priority
|
||||
#define dev_attr_lpfc_poll_tmo dev_attr_brcmfcoe_poll_tmo
|
||||
#define dev_attr_lpfc_task_mgmt_tmo dev_attr_brcmfcoe_task_mgmt_tmo
|
||||
#define dev_attr_lpfc_enable_npiv dev_attr_brcmfcoe_enable_npiv
|
||||
#define dev_attr_lpfc_use_msi dev_attr_brcmfcoe_use_msi
|
||||
#define dev_attr_lpfc_cq_max_proc_limit dev_attr_brcmfcoe_cq_max_proc_limit
|
||||
#define dev_attr_lpfc_fcp_imax dev_attr_brcmfcoe_fcp_imax
|
||||
#define dev_attr_lpfc_cq_poll_threshold dev_attr_brcmfcoe_cq_poll_threshold
|
||||
#define dev_attr_lpfc_fcp_mq_threshold dev_attr_brcmfcoe_fcp_mq_threshold
|
||||
#define dev_attr_lpfc_hdw_queue dev_attr_brcmfcoe_hdw_queue
|
||||
#define dev_attr_lpfc_irq_chann dev_attr_brcmfcoe_irq_chann
|
||||
#define dev_attr_lpfc_enable_bg dev_attr_brcmfcoe_enable_bg
|
||||
#define dev_attr_lpfc_external_dif dev_attr_brcmfcoe_external_dif
|
||||
#define dev_attr_lpfc_enable_hba_reset dev_attr_brcmfcoe_enable_hba_reset
|
||||
#define dev_attr_lpfc_enable_hba_heartbeat \
|
||||
dev_attr_brcmfcoe_enable_hba_heartbeat
|
||||
#define dev_attr_lpfc_EnableXLane dev_attr_brcmfcoe_EnableXLane
|
||||
#define dev_attr_lpfc_XLanePriority dev_attr_brcmfcoe_XLanePriority
|
||||
#define dev_attr_lpfc_sg_seg_cnt dev_attr_brcmfcoe_sg_seg_cnt
|
||||
#define dev_attr_lpfc_enable_rrq dev_attr_brcmfcoe_enable_rrq
|
||||
#define dev_attr_lpfc_suppress_link_up dev_attr_brcmfcoe_suppress_link_up
|
||||
#define dev_attr_lpfc_throttle_log_cnt dev_attr_brcmfcoe_throttle_log_cnt
|
||||
#define dev_attr_lpfc_throttle_log_time dev_attr_brcmfcoe_throttle_log_time
|
||||
#define dev_attr_lpfc_enable_mds_diags dev_attr_brcmfcoe_enable_mds_diags
|
||||
#define lpfc_enable_bbcr brcmfcoe_enable_bbcr
|
||||
#define dev_attr_lpfc_enable_da_id dev_attr_brcmfcoe_enable_da_id
|
||||
#define dev_attr_lpfc_suppress_rsp dev_attr_brcmfcoe_suppress_rsp
|
||||
#define dev_attr_lpfc_enable_fc4_type dev_attr_brcmfcoe_enable_fc4_type
|
||||
#define dev_attr_lpfc_xri_split dev_attr_brcmfcoe_xri_split
|
||||
#define dev_attr_lpfc_ras_fwlog_buffsize dev_attr_brcmfcoe_ras_fwlog_buffsize
|
||||
#define dev_attr_lpfc_ras_fwlog_level dev_attr_brcmfcoe_ras_fwlog_level
|
||||
#define dev_attr_lpfc_ras_fwlog_func dev_attr_brcmfcoe_ras_fwlog_func
|
||||
|
||||
#define lpfc_fcp_io_sched brcmfcoe_fcp_io_sched
|
||||
#define lpfc_ns_query brcmfcoe_ns_query
|
||||
#define lpfc_fcp2_no_tgt_reset brcmfcoe_fcp2_no_tgt_reset
|
||||
#define lpfc_cr_delay brcmfcoe_cr_delay
|
||||
#define lpfc_cr_count brcmfcoe_cr_count
|
||||
#define lpfc_multi_ring_support brcmfcoe_multi_ring_support
|
||||
#define lpfc_multi_ring_rctl brcmfcoe_multi_ring_rctl
|
||||
#define lpfc_multi_ring_type brcmfcoe_multi_ring_type
|
||||
#define lpfc_ack0 brcmfcoe_ack0
|
||||
#define lpfc_xri_rebalancing brcmfcoe_xri_rebalancing
|
||||
#define lpfc_topology brcmfcoe_topology
|
||||
#define lpfc_link_speed brcmfcoe_link_speed
|
||||
#define lpfc_poll_tmo brcmfcoe_poll_tmo
|
||||
#define lpfc_task_mgmt_tmo brcmfcoe_task_mgmt_tmo
|
||||
#define lpfc_enable_npiv brcmfcoe_enable_npiv
|
||||
#define lpfc_fcf_failover_policy brcmfcoe_fcf_failover_policy
|
||||
#define lpfc_enable_rrq brcmfcoe_enable_rrq
|
||||
#define lpfc_enable_fcp_priority brcmfcoe_enable_fcp_priority
|
||||
#define lpfc_fdmi_on brcmfcoe_fdmi_on
|
||||
#define lpfc_enable_SmartSAN brcmfcoe_enable_SmartSAN
|
||||
#define lpfc_use_msi brcmfcoe_use_msi
|
||||
#define lpfc_cq_max_proc_limit brcmfcoe_cq_max_proc_limit
|
||||
#define lpfc_fcp_imax brcmfcoe_fcp_imax
|
||||
#define lpfc_cq_poll_threshold brcmfcoe_cq_poll_threshold
|
||||
#define lpfc_fcp_cpu_map brcmfcoe_fcp_cpu_map
|
||||
#define lpfc_fcp_mq_threshold brcmfcoe_fcp_mq_threshold
|
||||
#define lpfc_hdw_queue brcmfcoe_hdw_queue
|
||||
#define lpfc_irq_chann brcmfcoe_irq_chann
|
||||
#define lpfc_enable_hba_reset brcmfcoe_enable_hba_reset
|
||||
#define lpfc_enable_hba_heartbeat brcmfcoe_enable_hba_heartbeat
|
||||
#define lpfc_EnableXLane brcmfcoe_EnableXLane
|
||||
#define lpfc_XLanePriority brcmfcoe_XLanePriority
|
||||
#define lpfc_enable_bg brcmfcoe_enable_bg
|
||||
#define lpfc_prot_mask brcmfcoe_prot_mask
|
||||
#define lpfc_prot_guard brcmfcoe_prot_guard
|
||||
#define lpfc_external_dif brcmfcoe_external_dif
|
||||
#define lpfc_sg_seg_cnt brcmfcoe_sg_seg_cnt
|
||||
#define lpfc_hba_queue_depth brcmfcoe_hba_queue_depth
|
||||
#define lpfc_log_verbose brcmfcoe_log_verbose
|
||||
#define lpfc_aer_support brcmfcoe_aer_support
|
||||
#define lpfc_sriov_nr_virtfn brcmfcoe_sriov_nr_virtfn
|
||||
#define lpfc_req_fw_upgrade brcmfcoe_req_fw_upgrade
|
||||
#define lpfc_suppress_link_up brcmfcoe_suppress_link_up
|
||||
#define lpfc_throttle_log_cnt brcmfcoe_throttle_log_cnt
|
||||
#define lpfc_throttle_log_time brcmfcoe_throttle_log_time
|
||||
#define lpfc_enable_mds_diags brcmfcoe_enable_mds_diags
|
||||
#define lpfc_lun_queue_depth brcmfcoe_lun_queue_depth
|
||||
#define lpfc_tgt_queue_depth brcmfcoe_tgt_queue_depth
|
||||
#define lpfc_peer_port_login brcmfcoe_peer_port_login
|
||||
#define lpfc_fcp_class brcmfcoe_fcp_class
|
||||
#define lpfc_use_adisc brcmfcoe_use_adisc
|
||||
#define lpfc_first_burst_size brcmfcoe_first_burst_size
|
||||
#define lpfc_discovery_threads brcmfcoe_discovery_threads
|
||||
#define lpfc_max_luns brcmfcoe_max_luns
|
||||
#define lpfc_scan_down brcmfcoe_scan_down
|
||||
#define lpfc_enable_da_id brcmfcoe_enable_da_id
|
||||
#define lpfc_sli_mode brcmfcoe_sli_mode
|
||||
#define lpfc_delay_discovery brcmfcoe_delay_discovery
|
||||
#define lpfc_devloss_tmo brcmfcoe_devloss_tmo
|
||||
#define lpfc_drvr_stat_data brcmfcoe_drvr_stat_data
|
||||
#define lpfc_max_scsicmpl_time brcmfcoe_max_scsicmpl_time
|
||||
#define lpfc_nodev_tmo brcmfcoe_nodev_tmo
|
||||
#define lpfc_poll brcmfcoe_poll
|
||||
#define lpfc_stat_data_ctrl brcmfcoe_stat_data_ctrl
|
||||
#define lpfc_xlane_lun brcmfcoe_xlane_lun
|
||||
#define lpfc_xlane_lun_state brcmfcoe_xlane_lun_state
|
||||
#define lpfc_xlane_lun_status brcmfcoe_xlane_lun_status
|
||||
#define lpfc_xlane_priority brcmfcoe_xlane_priority
|
||||
#define lpfc_xlane_tgt brcmfcoe_xlane_tgt
|
||||
#define lpfc_xlane_vpt brcmfcoe_xlane_vpt
|
||||
#define lpfc_enable_fc4_type brcmfcoe_enable_fc4_type
|
||||
#define lpfc_xri_split brcmfcoe_xri_split
|
||||
#define lpfc_suppress_rsp brcmfcoe_suppress_rsp
|
||||
#define lpfc_ras_fwlog_buffsize brcmfcoe_ras_fwlog_buffsize
|
||||
#define lpfc_ras_fwlog_level brcmfcoe_ras_fwlog_level
|
||||
#define lpfc_ras_fwlog_func brcmfcoe_ras_fwlog_func
|
||||
#endif
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,222 @@
|
|||
/*******************************************************************
|
||||
* This file is part of the Emulex Linux Device Driver for *
|
||||
* Fibre Channel Host Bus Adapters. *
|
||||
* Copyright (C) 2018 Broadcom. All Rights Reserved. The term *
|
||||
* “Broadcom” refers to Broadcom Limited and/or its subsidiaries. *
|
||||
* Copyright (C) 2004-2016 Emulex. All rights reserved. *
|
||||
* EMULEX and SLI are trademarks of Emulex. *
|
||||
* www.broadcom.com *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of version 2 of the GNU General *
|
||||
* Public License as published by the Free Software Foundation. *
|
||||
* This program is distributed in the hope that it will be useful. *
|
||||
* ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND *
|
||||
* WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, *
|
||||
* FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE *
|
||||
* DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD *
|
||||
* TO BE LEGALLY INVALID. See the GNU General Public License for *
|
||||
* more details, a copy of which can be found in the file COPYING *
|
||||
* included with this package. *
|
||||
*******************************************************************/
|
||||
/* See Fibre Channel protocol T11 FC-SP-2 for details */
|
||||
|
||||
/* AUTH_ELS Message header */
|
||||
struct lpfc_auth_hdr {
|
||||
uint8_t auth_els_code; /* 0x90 */
|
||||
uint8_t auth_els_flags;
|
||||
uint8_t auth_msg_code;
|
||||
uint8_t protocol_ver; /* version = 1 */
|
||||
uint32_t msg_len; /* msg payload len */
|
||||
uint32_t tran_id; /* transaction id */
|
||||
};
|
||||
|
||||
/* protocol_ver defines */
|
||||
#define AUTH_PROTOCOL_VER_1 0x1
|
||||
|
||||
/* auth_msg_code defines */
|
||||
#define AUTH_REJECT 0x0A
|
||||
#define AUTH_NEGOTIATE 0x0B
|
||||
#define AUTH_DONE 0x0C
|
||||
#define DHCHAP_CHALLENGE 0x10
|
||||
#define DHCHAP_REPLY 0x11
|
||||
#define DHCHAP_SUCCESS 0x12
|
||||
|
||||
/* Auth Parameter Header */
|
||||
struct lpfc_auth_param_hdr {
|
||||
uint16_t tag;
|
||||
uint16_t wcnt;
|
||||
};
|
||||
|
||||
struct lpfc_dhchap_param_cmn {
|
||||
uint32_t param_len;
|
||||
uint32_t protocol_id; /* DH-CHAP = 1 */
|
||||
/* DH-CHAP specific */
|
||||
/* variable length data */
|
||||
};
|
||||
|
||||
/* AUTH_ELS Negotiate payload */
|
||||
struct lpfc_auth_negotiate_cmn {
|
||||
uint16_t name_tag; /* tag = 1 */
|
||||
uint16_t name_len; /* len = 8 */
|
||||
uint32_t port_name[2]; /* WWPN */
|
||||
uint32_t num_protocol; /* only 1 protocol for now */
|
||||
/* Protocol specific */
|
||||
/* variable length data */
|
||||
};
|
||||
|
||||
/* name_tag defines */
|
||||
#define AUTH_NAME_TAG 1
|
||||
|
||||
/* protocol_id defines */
|
||||
#define PROTOCOL_DHCHAP 1
|
||||
#define PROTOCOL_FCAP 2
|
||||
#define PROTOCOL_FCPAP 3
|
||||
#define PROTOCOL_KERBEROS 4
|
||||
|
||||
/* DHCHAP param tag defines */
|
||||
#define DHCHAP_TAG_HASHLIST 1
|
||||
#define DHCHAP_TAG_GRP_IDLIST 2
|
||||
|
||||
/* DHCHAP Group ID defines */
|
||||
#define DH_GROUP_NULL 0x00
|
||||
#define DH_GROUP_1024 0x01
|
||||
#define DH_GROUP_1280 0x02
|
||||
#define DH_GROUP_1536 0x03
|
||||
#define DH_GROUP_2048 0x04
|
||||
|
||||
/* hash function defines */
|
||||
#define HASH_MD5 5
|
||||
#define HASH_SHA1 6
|
||||
|
||||
#define MD5_CHAL_LEN 16
|
||||
#define SHA1_CHAL_LEN 20
|
||||
|
||||
#define AUTH_DIRECTION_NONE 0
|
||||
#define AUTH_DIRECTION_REMOTE 1
|
||||
#define AUTH_DIRECTION_LOCAL 2
|
||||
#define AUTH_DIRECTION_BIDI (AUTH_DIRECTION_LOCAL | AUTH_DIRECTION_REMOTE)
|
||||
|
||||
#define AUTH_FABRIC_WWN 0xFFFFFFFFFFFFFFFFLL
|
||||
|
||||
enum auth_state {
|
||||
LPFC_AUTH_UNKNOWN = 0,
|
||||
LPFC_AUTH_SUCCESS = 1,
|
||||
LPFC_AUTH_FAIL = 2,
|
||||
};
|
||||
|
||||
enum auth_msg_state {
|
||||
LPFC_AUTH_NONE = 0,
|
||||
LPFC_AUTH_REJECT = 1, /* Sent a Reject */
|
||||
LPFC_AUTH_NEGOTIATE = 2, /* Auth Negotiate */
|
||||
LPFC_DHCHAP_CHALLENGE = 3, /* Challenge */
|
||||
LPFC_DHCHAP_REPLY = 4, /* Reply */
|
||||
LPFC_DHCHAP_SUCCESS_REPLY = 5, /* Success with Reply */
|
||||
LPFC_DHCHAP_SUCCESS = 6, /* Success */
|
||||
LPFC_AUTH_DONE = 7,
|
||||
};
|
||||
|
||||
#define LPFC_AUTH_STATE_UNKNOWN 0
|
||||
#define LPFC_AUTH_STATE_SUCCESS 1
|
||||
#define LPFC_AUTH_STATE_FAIL 2
|
||||
|
||||
#define DHC_STATE_AUTH_NEGO 1
|
||||
#define DHC_STATE_AUTH_CHAL 2
|
||||
#define DHC_STATE_AUTH_REPLY 3
|
||||
#define DHC_STATE_AUTH_SUCCESS 4
|
||||
#define DHC_STATE_AUTH_FAIL 5
|
||||
|
||||
/* AUTH_ELS Challenge payload */
|
||||
struct lpfc_auth_challenge {
|
||||
uint16_t name_tag; /* tag = 1 */
|
||||
uint16_t name_len; /* len = 8 */
|
||||
uint32_t port_name[2]; /* WWPN */
|
||||
uint32_t hash_id; /* Hash function id */
|
||||
uint32_t dh_grp_id; /* DH_Group id */
|
||||
uint32_t chal_len; /* Challenge length */
|
||||
/* Variable length data */
|
||||
};
|
||||
|
||||
/* AUTH Reject reason code defines */
|
||||
#define AUTHRJT_FAILURE 1
|
||||
#define AUTHRJT_LOGICAL_ERR 2
|
||||
|
||||
/* AUTH Reject reason code explanation defines */
|
||||
#define AUTHEXPL_MECH_UNUSABLE 1
|
||||
#define AUTHEXPL_DHGRP_UNUSABLE 2
|
||||
#define AUTHEXPL_HASH_UNUSABLE 3
|
||||
#define AUTHEXPL_AUTH_STARTED 4
|
||||
#define AUTHEXPL_AUTH_FAILED 5
|
||||
#define AUTHEXPL_BAD_PAYLOAD 6
|
||||
#define AUTHEXPL_BAD_PROTOCOL 7
|
||||
#define AUTHEXPL_RESTART_AUTH 8
|
||||
|
||||
/* AUTH_ELS Reject payload */
|
||||
struct lpfc_auth_reject {
|
||||
uint8_t rsn_code;
|
||||
uint8_t rsn_expl;
|
||||
uint8_t rsvd[2];
|
||||
};
|
||||
|
||||
struct dh_group {
|
||||
uint32_t groupid;
|
||||
uint32_t length;
|
||||
uint8_t value[256];
|
||||
};
|
||||
|
||||
#define LPFC_AUTH_PSSWD_MAX_LEN 128
|
||||
struct lpfc_auth_pwd_entry {
|
||||
uint8_t local_pw_length;
|
||||
uint8_t local_pw_mode;
|
||||
uint8_t remote_pw_length;
|
||||
uint8_t remote_pw_mode;
|
||||
uint8_t local_pw[LPFC_AUTH_PSSWD_MAX_LEN];
|
||||
uint8_t remote_pw[LPFC_AUTH_PSSWD_MAX_LEN];
|
||||
};
|
||||
|
||||
struct lpfc_auth_cfg_hdr {
|
||||
uint32_t signature;
|
||||
uint8_t version;
|
||||
uint8_t size;
|
||||
uint16_t entry_cnt;
|
||||
};
|
||||
|
||||
struct lpfc_auth_cfg_entry {
|
||||
uint8_t local_wwn[8];
|
||||
uint8_t remote_wwn[8];
|
||||
uint16_t auth_tmo;
|
||||
#define LPFC_AUTH_MODE_DISABLE 1
|
||||
#define LPFC_AUTH_MODE_ACTIVE 2
|
||||
#define LPFC_AUTH_MODE_PASSIVE 3
|
||||
uint8_t auth_mode;
|
||||
#define LPFC_AUTH_BIDIR_DISABLE 0
|
||||
#define LPFC_AUTH_BIDIR_ENABLE 1
|
||||
struct {
|
||||
uint8_t bi_direction : 1;
|
||||
uint8_t rsvd : 6;
|
||||
uint8_t valid : 1;
|
||||
} auth_flags;
|
||||
uint8_t auth_priority[4];
|
||||
#define LPFC_HASH_MD5 1
|
||||
#define LPFC_HASH_SHA1 2
|
||||
uint8_t hash_priority[4];
|
||||
#define LPFC_DH_GROUP_NULL 1
|
||||
#define LPFC_DH_GROUP_1024 2
|
||||
#define LPFC_DH_GROUP_1280 3
|
||||
#define LPFC_DH_GROUP_1536 4
|
||||
#define LPFC_DH_GROUP_2048 5
|
||||
uint8_t dh_grp_priority[8];
|
||||
uint32_t reauth_interval;
|
||||
struct lpfc_auth_pwd_entry pwd;
|
||||
};
|
||||
|
||||
#define LPFC_AUTH_OBJECT_MAX_SIZE 0x8000
|
||||
#define MAX_AUTH_CONFIG_ENTRIES 16
|
||||
#define AUTH_CONFIG_ENTRIES_PER_PAGE ((SLI4_PAGE_SIZE - \
|
||||
sizeof(struct lpfc_auth_cfg_hdr)) / sizeof(struct lpfc_auth_cfg_entry))
|
||||
|
||||
struct lpfc_auth_cfg {
|
||||
struct lpfc_auth_cfg_hdr hdr;
|
||||
struct lpfc_auth_cfg_entry entry[MAX_AUTH_CONFIG_ENTRIES];
|
||||
};
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,7 +1,7 @@
|
|||
/*******************************************************************
|
||||
* This file is part of the Emulex Linux Device Driver for *
|
||||
* Fibre Channel Host Bus Adapters. *
|
||||
* Copyright (C) 2017-2019 Broadcom. All Rights Reserved. The term *
|
||||
* Copyright (C) 2017-2020 Broadcom. All Rights Reserved. The term *
|
||||
* “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. *
|
||||
* Copyright (C) 2010-2015 Emulex. All rights reserved. *
|
||||
* EMULEX and SLI are trademarks of Emulex. *
|
||||
|
|
@ -37,12 +37,18 @@
|
|||
#define LPFC_BSG_VENDOR_MENLO_DATA 9
|
||||
#define LPFC_BSG_VENDOR_DIAG_MODE_END 10
|
||||
#define LPFC_BSG_VENDOR_LINK_DIAG_TEST 11
|
||||
#ifndef NO_APEX
|
||||
#define LPFC_BSG_VENDOR_GET_FCP_PRIORITY 12
|
||||
#define LPFC_BSG_VENDOR_SET_FCP_PRIORITY 13
|
||||
#endif
|
||||
#define LPFC_BSG_VENDOR_FORCED_LINK_SPEED 14
|
||||
#define LPFC_BSG_VENDOR_AUTH_CFG_MGMT 15
|
||||
#define LPFC_BSG_VENDOR_RAS_GET_LWPD 16
|
||||
#define LPFC_BSG_VENDOR_RAS_GET_FWLOG 17
|
||||
#define LPFC_BSG_VENDOR_RAS_GET_CONFIG 18
|
||||
#define LPFC_BSG_VENDOR_RAS_SET_CONFIG 19
|
||||
#define LPFC_BSG_VENDOR_GET_TRUNK_INFO 20
|
||||
#define LPFC_BSG_VENDOR_GET_CGNBUF_INFO 21
|
||||
|
||||
struct set_ct_event {
|
||||
uint32_t command;
|
||||
|
|
@ -105,8 +111,13 @@ struct get_mgmt_rev {
|
|||
uint32_t command;
|
||||
};
|
||||
|
||||
#ifndef NO_APEX
|
||||
#define MANAGEMENT_MAJOR_REV 2
|
||||
#define MANAGEMENT_MINOR_REV 0
|
||||
#else
|
||||
#define MANAGEMENT_MAJOR_REV 1
|
||||
#define MANAGEMENT_MINOR_REV 1
|
||||
#endif
|
||||
|
||||
/* the MgmtRevInfo structure */
|
||||
struct MgmtRevInfo {
|
||||
|
|
@ -225,6 +236,10 @@ struct lpfc_sli_config_hdr {
|
|||
uint32_t reserved5;
|
||||
};
|
||||
|
||||
#define LPFC_CSF_BOOT_DEV 0x1D
|
||||
#define LPFC_CSF_QUERY 0
|
||||
#define LPFC_CSF_SAVE 1
|
||||
|
||||
struct lpfc_sli_config_emb0_subsys {
|
||||
struct lpfc_sli_config_hdr sli_config_hdr;
|
||||
#define LPFC_MBX_SLI_CONFIG_MAX_MSE 19
|
||||
|
|
@ -243,6 +258,15 @@ struct lpfc_sli_config_emb0_subsys {
|
|||
#define FCOE_OPCODE_ADD_FCF 0x09
|
||||
#define FCOE_OPCODE_SET_DPORT_MODE 0x27
|
||||
#define FCOE_OPCODE_GET_DPORT_RESULTS 0x28
|
||||
uint32_t timeout; /* comn_set_feature timeout */
|
||||
uint32_t request_length; /* comn_set_feature request len */
|
||||
uint32_t version; /* comn_set_feature version */
|
||||
uint32_t csf_feature; /* comn_set_feature feature */
|
||||
uint32_t word69; /* comn_set_feature parameter len */
|
||||
uint32_t word70; /* comn_set_feature parameter val0 */
|
||||
#define lpfc_emb0_subcmnd_csf_p0_SHIFT 0
|
||||
#define lpfc_emb0_subcmnd_csf_p0_MASK 0x3
|
||||
#define lpfc_emb0_subcmnd_csf_p0_WORD word70
|
||||
};
|
||||
|
||||
struct lpfc_sli_config_emb1_subsys {
|
||||
|
|
@ -261,6 +285,7 @@ struct lpfc_sli_config_emb1_subsys {
|
|||
#define COMN_OPCODE_WRITE_OBJECT 0xAC
|
||||
#define COMN_OPCODE_READ_OBJECT_LIST 0xAD
|
||||
#define COMN_OPCODE_DELETE_OBJECT 0xAE
|
||||
#define COMN_OPCODE_SET_FEATURES 0xBF
|
||||
#define COMN_OPCODE_GET_CNTL_ADDL_ATTRIBUTES 0x79
|
||||
#define COMN_OPCODE_GET_CNTL_ATTRIBUTES 0x20
|
||||
uint32_t timeout;
|
||||
|
|
@ -294,6 +319,40 @@ struct lpfc_sli_config_mbox {
|
|||
} un;
|
||||
};
|
||||
|
||||
#ifndef NO_APEX
|
||||
struct lpfc_fcp_pri_rule {
|
||||
uint8_t src_wwpn[8];
|
||||
uint8_t tgt_wwpn[8];
|
||||
uint8_t first_lun[8];
|
||||
uint8_t last_lun[8];
|
||||
uint8_t fcp_priority;
|
||||
uint8_t rsvrd[3];
|
||||
};
|
||||
|
||||
struct lpfc_fcp_pri_rules {
|
||||
uint32_t number_of_entries; /* Number of rules in the array */
|
||||
struct lpfc_fcp_pri_rule rule_entry[0];
|
||||
};
|
||||
|
||||
struct get_lpfc_fcp_pri_rules {
|
||||
uint32_t command;
|
||||
uint32_t number_of_entries; /* number of rules to return */
|
||||
};
|
||||
|
||||
struct get_lpfc_fcp_pri_rules_reply {
|
||||
struct lpfc_fcp_pri_rules rule;
|
||||
};
|
||||
|
||||
struct set_lpfc_fcp_pri_rules {
|
||||
uint32_t command;
|
||||
uint32_t number_of_entries; /* number of rules passed to driver */
|
||||
};
|
||||
/* limits for fcp priority rules */
|
||||
#define LPFC_MAX_FCP_RULES 999 /* number of rules */
|
||||
/* so we can add 1 more than the get */
|
||||
#define LPFC_MAX_FCP_SET_RULES (LPFC_MAX_FCP_RULES + 1)
|
||||
#endif
|
||||
|
||||
#define LPFC_FORCED_LINK_SPEED_NOT_SUPPORTED 0
|
||||
#define LPFC_FORCED_LINK_SPEED_SUPPORTED 1
|
||||
struct get_forced_link_speed_support {
|
||||
|
|
@ -303,6 +362,73 @@ struct forced_link_speed_support_reply {
|
|||
uint8_t supported;
|
||||
};
|
||||
|
||||
struct lpfc_bsg_auth_cfg_item {
|
||||
uint8_t lwwpn[8];
|
||||
uint8_t rwwpn[8];
|
||||
uint16_t auth_tmo;
|
||||
uint8_t auth_mode;
|
||||
struct {
|
||||
uint8_t bi_direction : 1;
|
||||
uint8_t rsvd : 6;
|
||||
uint8_t valid : 1;
|
||||
} auth_flags;
|
||||
uint8_t auth_priority[4];
|
||||
uint8_t hash_priority[4];
|
||||
uint8_t dh_grp_priority[8];
|
||||
uint32_t reauth_interval;
|
||||
#define REAUTH_MAX_INTERVAL 3600 /* minutes */
|
||||
uint32_t status;
|
||||
uint32_t rsvd;
|
||||
};
|
||||
|
||||
struct lpfc_bsg_auth_cfg_list {
|
||||
uint32_t version;
|
||||
uint32_t entry_cnt;
|
||||
uint32_t rsvd;
|
||||
struct lpfc_bsg_auth_cfg_item cfg_item[0];
|
||||
};
|
||||
|
||||
#define AUTH_MGMT_OP_SET_CFG 1
|
||||
#define AUTH_MGMT_OP_GET_CFG 2
|
||||
#define AUTH_MGMT_OP_DEL_CFG 3
|
||||
#define AUTH_MGMT_OP_SET_PWD 4
|
||||
#define AUTH_MGMT_OP_GET_PWD 5
|
||||
#define AUTH_MGMT_OP_RMW_OBJ 6
|
||||
#define AUTH_MGMT_OP_DEL_OBJ 7
|
||||
|
||||
struct auth_cfg_mgmt_req {
|
||||
uint32_t command;
|
||||
uint32_t cfg_op;
|
||||
uint8_t wwpn[8];
|
||||
uint32_t param;
|
||||
};
|
||||
|
||||
struct lpfc_bsg_auth_pwd_info {
|
||||
uint16_t length;
|
||||
uint16_t type;
|
||||
uint8_t pwd[128];
|
||||
};
|
||||
|
||||
struct lpfc_bsg_auth_pwd_item {
|
||||
uint8_t lwwpn[8];
|
||||
uint8_t rwwpn[8];
|
||||
struct lpfc_bsg_auth_pwd_info local;
|
||||
struct lpfc_bsg_auth_pwd_info remote;
|
||||
};
|
||||
|
||||
#define LPFC_BSG_AUTH_STS_SUCCESS 0x0000
|
||||
#define LPFC_BSG_AUTH_STS_NOT_CONFIGURED 0x8001
|
||||
#define LPFC_BSG_AUTH_STS_MORE_DATA_AVAILABLE 0x8007
|
||||
#define LPFC_BSG_AUTH_STS_INVALID_OPERATION 0x8009
|
||||
#define LPFC_BSG_AUTH_STS_OUT_OF_RESOURCES 0x800a
|
||||
#define LPFC_BSG_AUTH_STS_IN_PROGRESS 0x800b
|
||||
#define LPFC_BSG_AUTH_STS_PSSWDS_SAME 0x8011
|
||||
#define LPFC_BSG_AUTH_STS_DRVTYPE_NOT_SUPPORTED 0x8030
|
||||
#define LPFC_BSG_AUTH_STS_AUTHENTICATION_NOT_SUPPORTED 0x8031
|
||||
#define LPFC_BSG_AUTH_STS_GENERAL_ERROR 0x8032
|
||||
#define LPFC_BSG_AUTH_STS_CONFIG_NOT_FOUND 0x8034
|
||||
#define LPFC_BSG_AUTH_STS_LOCAL_SECRET_NOT_SET 0x8050
|
||||
|
||||
struct lpfc_bsg_ras_req {
|
||||
uint32_t command;
|
||||
};
|
||||
|
|
@ -372,6 +498,13 @@ struct get_trunk_info_req {
|
|||
uint32_t command;
|
||||
};
|
||||
|
||||
struct get_cgnbuf_info_req {
|
||||
uint32_t command;
|
||||
uint32_t read_size;
|
||||
uint32_t reset;
|
||||
#define LPFC_BSG_CGN_RESET_STAT 1
|
||||
};
|
||||
|
||||
/* driver only */
|
||||
#define SLI_CONFIG_NOT_HANDLED 0
|
||||
#define SLI_CONFIG_HANDLED 1
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/*******************************************************************
|
||||
* This file is part of the Emulex Linux Device Driver for *
|
||||
* Fibre Channel Host Bus Adapters. *
|
||||
* Copyright (C) 2017-2018 Broadcom. All Rights Reserved. The term *
|
||||
* Copyright (C) 2017 Broadcom. All Rights Reserved. The term *
|
||||
* “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. *
|
||||
* Copyright (C) 2004-2011 Emulex. All rights reserved. *
|
||||
* EMULEX and SLI are trademarks of Emulex. *
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/*******************************************************************
|
||||
* This file is part of the Emulex Linux Device Driver for *
|
||||
* Fibre Channel Host Bus Adapters. *
|
||||
* Copyright (C) 2017-2019 Broadcom. All Rights Reserved. The term *
|
||||
* Copyright (C) 2017-2020 Broadcom. All Rights Reserved. The term *
|
||||
* “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. *
|
||||
* Copyright (C) 2004-2016 Emulex. All rights reserved. *
|
||||
* EMULEX and SLI are trademarks of Emulex. *
|
||||
|
|
@ -23,6 +23,7 @@
|
|||
typedef int (*node_filter)(struct lpfc_nodelist *, void *);
|
||||
|
||||
struct fc_rport;
|
||||
bool lpfc_throttler(struct lpfc_vport *, struct throttle_history *);
|
||||
struct fc_frame_header;
|
||||
struct lpfc_nvmet_rcv_ctx;
|
||||
void lpfc_down_link(struct lpfc_hba *, LPFC_MBOXQ_t *);
|
||||
|
|
@ -56,9 +57,14 @@ void lpfc_register_new_vport(struct lpfc_hba *, struct lpfc_vport *,
|
|||
void lpfc_unreg_vpi(struct lpfc_hba *, uint16_t, LPFC_MBOXQ_t *);
|
||||
void lpfc_init_link(struct lpfc_hba *, LPFC_MBOXQ_t *, uint32_t, uint32_t);
|
||||
void lpfc_request_features(struct lpfc_hba *, struct lpfcMboxq *);
|
||||
void lpfc_supported_pages(struct lpfcMboxq *);
|
||||
void lpfc_pc_sli4_params(struct lpfcMboxq *);
|
||||
int lpfc_pc_sli4_params_get(struct lpfc_hba *, LPFC_MBOXQ_t *);
|
||||
int lpfc_sli4_mbox_rsrc_extent(struct lpfc_hba *, struct lpfcMboxq *,
|
||||
uint16_t, uint16_t, bool);
|
||||
int lpfc_get_sli4_parameters(struct lpfc_hba *, LPFC_MBOXQ_t *);
|
||||
int lpfc_reg_congestion_buf(struct lpfc_hba *);
|
||||
int lpfc_unreg_congestion_buf(struct lpfc_hba *phba);
|
||||
struct lpfc_vport *lpfc_find_vport_by_did(struct lpfc_hba *, uint32_t);
|
||||
void lpfc_cleanup_rcv_buffers(struct lpfc_vport *);
|
||||
void lpfc_rcv_seq_check_edtov(struct lpfc_vport *);
|
||||
|
|
@ -75,6 +81,20 @@ int lpfc_init_iocb_list(struct lpfc_hba *phba, int cnt);
|
|||
void lpfc_free_iocb_list(struct lpfc_hba *phba);
|
||||
int lpfc_post_rq_buffer(struct lpfc_hba *phba, struct lpfc_queue *hrq,
|
||||
struct lpfc_queue *drq, int count, int idx);
|
||||
uint32_t lpfc_calc_cmf_latency(struct lpfc_hba *phba);
|
||||
void lpfc_cmf_signal_init(struct lpfc_hba *phba);
|
||||
void lpfc_cmf_start(struct lpfc_hba *phba);
|
||||
void lpfc_cmf_stop(struct lpfc_hba *phba);
|
||||
void lpfc_init_congestion_stat(struct lpfc_hba *phba);
|
||||
void lpfc_init_congestion_buf(struct lpfc_hba *phba);
|
||||
int lpfc_sli4_cgn_params_read(struct lpfc_hba *);
|
||||
uint32_t lpfc_cgn_calc_crc32(void *, uint32_t, uint32_t);
|
||||
int lpfc_config_cgn_signal(struct lpfc_hba *);
|
||||
int lpfc_issue_cmf_sync_wqe(struct lpfc_hba *phba, u32 ms, u64 total);
|
||||
void lpfc_cgn_dump_rxmonitor(struct lpfc_hba *phba);
|
||||
void lpfc_cgn_update_stat(struct lpfc_hba *phba, uint32_t dtag);
|
||||
void lpfc_unblock_requests(struct lpfc_hba *);
|
||||
void lpfc_block_requests(struct lpfc_hba *);
|
||||
|
||||
void lpfc_mbx_cmpl_local_config_link(struct lpfc_hba *, LPFC_MBOXQ_t *);
|
||||
void lpfc_mbx_cmpl_reg_login(struct lpfc_hba *, LPFC_MBOXQ_t *);
|
||||
|
|
@ -103,13 +123,50 @@ int lpfc_check_sli_ndlp(struct lpfc_hba *, struct lpfc_sli_ring *,
|
|||
struct lpfc_nodelist *lpfc_nlp_init(struct lpfc_vport *vport, uint32_t did);
|
||||
struct lpfc_nodelist *lpfc_nlp_get(struct lpfc_nodelist *);
|
||||
int lpfc_nlp_put(struct lpfc_nodelist *);
|
||||
void lpfc_els_rcv_fpin(struct lpfc_vport *vport, void *p, u32 len);
|
||||
int lpfc_nlp_not_used(struct lpfc_nodelist *ndlp);
|
||||
struct lpfc_nodelist *lpfc_setup_disc_node(struct lpfc_vport *, uint32_t);
|
||||
void lpfc_disc_list_loopmap(struct lpfc_vport *);
|
||||
void lpfc_disc_start(struct lpfc_vport *);
|
||||
void lpfc_cleanup_discovery_resources(struct lpfc_vport *);
|
||||
void lpfc_cleanup(struct lpfc_vport *);
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||
void lpfc_disc_timeout(unsigned long);
|
||||
#else
|
||||
void lpfc_disc_timeout(struct timer_list *);
|
||||
#endif
|
||||
#ifndef BUILD_BRCMFCOE
|
||||
struct lpfc_nodelist *
|
||||
lpfc_auth_findnode(struct lpfc_vport *, struct lpfc_name *, struct lpfc_name *);
|
||||
int lpfc_auth_alloc_active_cfg_list(struct lpfc_hba *);
|
||||
void lpfc_auth_free_active_cfg_list(struct lpfc_hba *);
|
||||
int lpfc_auth_read_cfg_object(struct lpfc_hba *);
|
||||
int lpfc_auth_issue_rd_object(struct lpfc_hba *, struct list_head *,
|
||||
uint32_t, uint32_t *, char *);
|
||||
void lpfc_auth_cmpl_rd_object(struct lpfc_hba *, LPFC_MBOXQ_t *);
|
||||
int lpfc_del_object(struct lpfc_hba *, char *);
|
||||
int lpfc_auth_wr_object(struct lpfc_hba *, struct list_head *, uint32_t,
|
||||
uint32_t *, char *);
|
||||
int lpfc_auth_rd_object(struct lpfc_hba *, struct list_head *, uint32_t,
|
||||
uint32_t *, char *);
|
||||
struct lpfc_auth_cfg *lpfc_auth_get_active_cfg_ptr(struct lpfc_hba *phba);
|
||||
struct lpfc_auth_cfg_entry *lpfc_auth_get_active_cfg_p2(struct lpfc_hba *phba);
|
||||
struct lpfc_auth_cfg_entry *lpfc_auth_find_cfg_item(struct lpfc_hba *phba,
|
||||
uint8_t *lwwpn,
|
||||
uint8_t *rwwpn,
|
||||
uint8_t *valid);
|
||||
int lpfc_auth_start(struct lpfc_vport *, struct lpfc_nodelist *);
|
||||
void lpfc_auth_start_reauth_tmr(struct lpfc_nodelist *ndlp);
|
||||
int lpfc_auth_handle_cmd(struct lpfc_vport *, struct lpfc_iocbq *,
|
||||
struct lpfc_nodelist *);
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||
void lpfc_auth_reauth(unsigned long ptr);
|
||||
#else
|
||||
void lpfc_auth_reauth(struct timer_list *);
|
||||
#endif
|
||||
void lpfc_auth_timeout_handler(struct lpfc_vport *vport,
|
||||
struct lpfc_nodelist *ndlp);
|
||||
#endif
|
||||
|
||||
int lpfc_unregister_fcf_prep(struct lpfc_hba *);
|
||||
struct lpfc_nodelist *__lpfc_findnode_rpi(struct lpfc_vport *, uint16_t);
|
||||
|
|
@ -137,9 +194,11 @@ int lpfc_issue_els_prli(struct lpfc_vport *, struct lpfc_nodelist *, uint8_t);
|
|||
int lpfc_issue_els_adisc(struct lpfc_vport *, struct lpfc_nodelist *, uint8_t);
|
||||
int lpfc_issue_els_logo(struct lpfc_vport *, struct lpfc_nodelist *, uint8_t);
|
||||
int lpfc_issue_els_npiv_logo(struct lpfc_vport *, struct lpfc_nodelist *);
|
||||
int lpfc_issue_els_scr(struct lpfc_vport *, uint32_t, uint8_t);
|
||||
int lpfc_issue_els_rscn(struct lpfc_vport *vport, uint8_t retry);
|
||||
int lpfc_issue_els_scr(struct lpfc_vport *vport, uint8_t retry);
|
||||
int lpfc_issue_els_rscn(struct lpfc_vport *, uint8_t);
|
||||
int lpfc_issue_fabric_reglogin(struct lpfc_vport *);
|
||||
int lpfc_issue_els_rdf(struct lpfc_vport *, uint8_t);
|
||||
int lpfc_issue_els_edc(struct lpfc_vport *phba, uint8_t retry);
|
||||
int lpfc_els_free_iocb(struct lpfc_hba *, struct lpfc_iocbq *);
|
||||
int lpfc_ct_free_iocb(struct lpfc_hba *, struct lpfc_iocbq *);
|
||||
int lpfc_els_rsp_acc(struct lpfc_vport *, uint32_t, struct lpfc_iocbq *,
|
||||
|
|
@ -151,7 +210,11 @@ int lpfc_els_rsp_adisc_acc(struct lpfc_vport *, struct lpfc_iocbq *,
|
|||
int lpfc_els_rsp_prli_acc(struct lpfc_vport *, struct lpfc_iocbq *,
|
||||
struct lpfc_nodelist *);
|
||||
void lpfc_cancel_retry_delay_tmo(struct lpfc_vport *, struct lpfc_nodelist *);
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||
void lpfc_els_retry_delay(unsigned long);
|
||||
#else
|
||||
void lpfc_els_retry_delay(struct timer_list *);
|
||||
#endif
|
||||
void lpfc_els_retry_delay_handler(struct lpfc_nodelist *);
|
||||
void lpfc_els_unsol_event(struct lpfc_hba *, struct lpfc_sli_ring *,
|
||||
struct lpfc_iocbq *);
|
||||
|
|
@ -162,7 +225,11 @@ void lpfc_els_flush_all_cmd(struct lpfc_hba *);
|
|||
void lpfc_els_flush_cmd(struct lpfc_vport *);
|
||||
int lpfc_els_disc_adisc(struct lpfc_vport *);
|
||||
int lpfc_els_disc_plogi(struct lpfc_vport *);
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||
void lpfc_els_timeout(unsigned long);
|
||||
#else
|
||||
void lpfc_els_timeout(struct timer_list *);
|
||||
#endif
|
||||
void lpfc_els_timeout_handler(struct lpfc_vport *);
|
||||
struct lpfc_iocbq *lpfc_prep_els_iocb(struct lpfc_vport *, uint8_t, uint16_t,
|
||||
uint8_t, struct lpfc_nodelist *,
|
||||
|
|
@ -172,13 +239,17 @@ void lpfc_hb_timeout_handler(struct lpfc_hba *);
|
|||
void lpfc_ct_unsol_event(struct lpfc_hba *, struct lpfc_sli_ring *,
|
||||
struct lpfc_iocbq *);
|
||||
int lpfc_ct_handle_unsol_abort(struct lpfc_hba *, struct hbq_dmabuf *);
|
||||
int lpfc_issue_gidpt(struct lpfc_vport *vport);
|
||||
int lpfc_issue_gidft(struct lpfc_vport *vport);
|
||||
uint32_t lpfc_issue_gidpt(struct lpfc_vport *vport);
|
||||
uint32_t lpfc_issue_gidft(struct lpfc_vport *vport);
|
||||
int lpfc_get_gidft_type(struct lpfc_vport *vport, struct lpfc_iocbq *iocbq);
|
||||
int lpfc_ns_cmd(struct lpfc_vport *, int, uint8_t, uint32_t);
|
||||
int lpfc_fdmi_cmd(struct lpfc_vport *, struct lpfc_nodelist *, int, uint32_t);
|
||||
void lpfc_fdmi_change_check(struct lpfc_vport *vport);
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||
void lpfc_delayed_disc_tmo(unsigned long);
|
||||
#else
|
||||
void lpfc_delayed_disc_tmo(struct timer_list *);
|
||||
#endif
|
||||
void lpfc_delayed_disc_timeout_handler(struct lpfc_vport *);
|
||||
|
||||
int lpfc_config_port_prep(struct lpfc_hba *);
|
||||
|
|
@ -189,6 +260,7 @@ int lpfc_hba_down_post(struct lpfc_hba *);
|
|||
void lpfc_hba_init(struct lpfc_hba *, uint32_t *);
|
||||
int lpfc_post_buffer(struct lpfc_hba *, struct lpfc_sli_ring *, int);
|
||||
void lpfc_decode_firmware_rev(struct lpfc_hba *, char *, int);
|
||||
int lpfc_issue_lip(struct Scsi_Host *);
|
||||
int lpfc_online(struct lpfc_hba *);
|
||||
void lpfc_unblock_mgmt_io(struct lpfc_hba *);
|
||||
void lpfc_offline_prep(struct lpfc_hba *, int);
|
||||
|
|
@ -212,9 +284,16 @@ irqreturn_t lpfc_sli_fp_intr_handler(int, void *);
|
|||
irqreturn_t lpfc_sli4_intr_handler(int, void *);
|
||||
irqreturn_t lpfc_sli4_hba_intr_handler(int, void *);
|
||||
|
||||
int lpfc_read_object(struct lpfc_hba *, char *, uint32_t *, uint32_t);
|
||||
int lpfc_write_object(struct lpfc_hba *, char *, uint32_t *, uint32_t);
|
||||
|
||||
void lpfc_sli4_cleanup_poll_list(struct lpfc_hba *phba);
|
||||
int lpfc_sli4_poll_eq(struct lpfc_queue *q, uint8_t path);
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||
void lpfc_sli4_poll_hbtimer(unsigned long ptr);
|
||||
#else
|
||||
void lpfc_sli4_poll_hbtimer(struct timer_list *t);
|
||||
#endif
|
||||
void lpfc_sli4_start_polling(struct lpfc_queue *q);
|
||||
void lpfc_sli4_stop_polling(struct lpfc_queue *q);
|
||||
|
||||
|
|
@ -254,8 +333,10 @@ void lpfc_nvmet_ctxbuf_post(struct lpfc_hba *phba,
|
|||
int lpfc_nvmet_rcv_unsol_abort(struct lpfc_vport *vport,
|
||||
struct fc_frame_header *fc_hdr);
|
||||
void lpfc_nvmet_wqfull_process(struct lpfc_hba *phba, struct lpfc_queue *wq);
|
||||
void lpfc_sli_flush_nvme_rings(struct lpfc_hba *phba);
|
||||
void lpfc_nvme_wait_for_io_drain(struct lpfc_hba *phba);
|
||||
void lpfc_nvme_wait_for_io_drain(struct lpfc_hba *);
|
||||
#if defined(BUILD_NVME)
|
||||
void lpfc_nvme_issue_pend_io(struct work_struct *work);
|
||||
#endif
|
||||
void lpfc_sli4_build_dflt_fcf_record(struct lpfc_hba *, struct fcf_record *,
|
||||
uint16_t);
|
||||
int lpfc_sli4_rq_put(struct lpfc_queue *hq, struct lpfc_queue *dq,
|
||||
|
|
@ -281,9 +362,17 @@ void lpfc_mem_free(struct lpfc_hba *);
|
|||
void lpfc_mem_free_all(struct lpfc_hba *);
|
||||
void lpfc_stop_vport_timers(struct lpfc_vport *);
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||
void lpfc_poll_timeout(unsigned long ptr);
|
||||
#else
|
||||
void lpfc_poll_timeout(struct timer_list *t);
|
||||
#endif
|
||||
void lpfc_poll_start_timer(struct lpfc_hba *);
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||
void lpfc_poll_eratt(unsigned long);
|
||||
#else
|
||||
void lpfc_poll_eratt(struct timer_list *);
|
||||
#endif
|
||||
int
|
||||
lpfc_sli_handle_fast_ring_event(struct lpfc_hba *,
|
||||
struct lpfc_sli_ring *, uint32_t);
|
||||
|
|
@ -299,7 +388,7 @@ int lpfc_selective_reset(struct lpfc_hba *);
|
|||
void lpfc_reset_barrier(struct lpfc_hba *);
|
||||
int lpfc_sli_brdready(struct lpfc_hba *, uint32_t);
|
||||
int lpfc_sli_brdkill(struct lpfc_hba *);
|
||||
int lpfc_sli_chipset_init(struct lpfc_hba *phba);
|
||||
int lpfc_sli_chipset_init(struct lpfc_hba *);
|
||||
int lpfc_sli_brdreset(struct lpfc_hba *);
|
||||
int lpfc_sli_brdrestart(struct lpfc_hba *);
|
||||
int lpfc_sli_hba_setup(struct lpfc_hba *);
|
||||
|
|
@ -353,13 +442,19 @@ int
|
|||
lpfc_sli_abort_taskmgmt(struct lpfc_vport *, struct lpfc_sli_ring *,
|
||||
uint16_t, uint64_t, lpfc_ctx_cmd);
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||
void lpfc_mbox_timeout(unsigned long);
|
||||
#else
|
||||
void lpfc_mbox_timeout(struct timer_list *t);
|
||||
#endif
|
||||
void lpfc_mbox_timeout_handler(struct lpfc_hba *);
|
||||
int lpfc_issue_hb_mbox(struct lpfc_hba *phba);
|
||||
void lpfc_issue_hb_tmo(struct lpfc_hba *phba);
|
||||
|
||||
struct lpfc_nodelist *lpfc_findnode_did(struct lpfc_vport *, uint32_t);
|
||||
struct lpfc_nodelist *lpfc_findnode_wwpn(struct lpfc_vport *,
|
||||
struct lpfc_name *);
|
||||
struct lpfc_nodelist *lpfc_findnode_mapped(struct lpfc_vport *vport);
|
||||
struct lpfc_nodelist *lpfc_findnode_mapped(struct lpfc_vport *);
|
||||
|
||||
int lpfc_sli_issue_mbox_wait(struct lpfc_hba *, LPFC_MBOXQ_t *, uint32_t);
|
||||
|
||||
|
|
@ -383,7 +478,7 @@ void lpfc_rq_buf_free(struct lpfc_hba *phba, struct lpfc_dmabuf *mp);
|
|||
int lpfc_link_reset(struct lpfc_vport *vport);
|
||||
|
||||
/* Function prototypes. */
|
||||
int lpfc_check_pci_resettable(const struct lpfc_hba *phba);
|
||||
int lpfc_check_pci_resettable(struct lpfc_hba *phba);
|
||||
const char* lpfc_info(struct Scsi_Host *);
|
||||
int lpfc_scan_finished(struct Scsi_Host *, unsigned long);
|
||||
|
||||
|
|
@ -400,16 +495,14 @@ void lpfc_free_sysfs_attr(struct lpfc_vport *);
|
|||
extern struct device_attribute *lpfc_hba_attrs[];
|
||||
extern struct device_attribute *lpfc_vport_attrs[];
|
||||
extern struct scsi_host_template lpfc_template;
|
||||
extern struct scsi_host_template lpfc_template_no_hr;
|
||||
extern struct scsi_host_template lpfc_template_nvme;
|
||||
extern struct scsi_host_template lpfc_vport_template;
|
||||
extern struct fc_function_template lpfc_transport_functions;
|
||||
extern struct fc_function_template lpfc_vport_transport_functions;
|
||||
|
||||
int lpfc_vport_symbolic_node_name(struct lpfc_vport *, char *, size_t);
|
||||
int lpfc_vport_symbolic_port_name(struct lpfc_vport *, char *, size_t);
|
||||
void lpfc_terminate_rport_io(struct fc_rport *);
|
||||
void lpfc_dev_loss_tmo_callbk(struct fc_rport *rport);
|
||||
void lpfc_dev_loss_tmo_callbk(struct fc_rport *);
|
||||
|
||||
struct lpfc_vport *lpfc_create_port(struct lpfc_hba *, int, struct device *);
|
||||
int lpfc_vport_disable(struct fc_vport *fc_vport, bool disable);
|
||||
|
|
@ -436,10 +529,19 @@ int lpfc_sli4_get_allocated_extnts(struct lpfc_hba *, uint16_t,
|
|||
int lpfc_sli4_get_avail_extnt_rsrc(struct lpfc_hba *, uint16_t,
|
||||
uint16_t *, uint16_t *);
|
||||
|
||||
extern void lpfc_edsm_validate_target(struct lpfc_vport *,
|
||||
struct lpfc_nodelist *);
|
||||
extern void lpfc_edsm_set_state(struct lpfc_vport *,
|
||||
struct lpfc_external_dif_support *, uint32_t);
|
||||
|
||||
/* Interface exported by fabric iocb scheduler */
|
||||
void lpfc_fabric_abort_nport(struct lpfc_nodelist *);
|
||||
void lpfc_fabric_abort_hba(struct lpfc_hba *);
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||
void lpfc_fabric_block_timeout(unsigned long);
|
||||
#else
|
||||
void lpfc_fabric_block_timeout(struct timer_list *);
|
||||
#endif
|
||||
void lpfc_unblock_fabric_iocbs(struct lpfc_hba *);
|
||||
void lpfc_rampdown_queue_depth(struct lpfc_hba *);
|
||||
void lpfc_ramp_down_queue_handler(struct lpfc_hba *);
|
||||
|
|
@ -453,6 +555,9 @@ void lpfc_free_fast_evt(struct lpfc_hba *, struct lpfc_fast_path_event *);
|
|||
void lpfc_create_static_vport(struct lpfc_hba *);
|
||||
void lpfc_stop_hba_timers(struct lpfc_hba *);
|
||||
void lpfc_stop_port(struct lpfc_hba *);
|
||||
int lpfc_update_cmf_cmd(struct lpfc_hba *phba, uint32_t sz);
|
||||
int lpfc_update_cmf_cmpl(struct lpfc_hba *phba, uint64_t val, uint32_t sz,
|
||||
struct Scsi_Host *shost);
|
||||
void __lpfc_sli4_stop_fcf_redisc_wait_timer(struct lpfc_hba *);
|
||||
void lpfc_sli4_stop_fcf_redisc_wait_timer(struct lpfc_hba *);
|
||||
void lpfc_parse_fcoe_conf(struct lpfc_hba *, uint8_t *, uint32_t);
|
||||
|
|
@ -460,6 +565,7 @@ int lpfc_parse_vpd(struct lpfc_hba *, uint8_t *, int);
|
|||
void lpfc_start_fdiscs(struct lpfc_hba *phba);
|
||||
struct lpfc_vport *lpfc_find_vport_by_vpid(struct lpfc_hba *, uint16_t);
|
||||
struct lpfc_sglq *__lpfc_get_active_sglq(struct lpfc_hba *, uint16_t);
|
||||
#define ScsiResult(host_code, scsi_code) (((host_code) << 16) | scsi_code)
|
||||
#define HBA_EVENT_RSCN 5
|
||||
#define HBA_EVENT_LINK_UP 2
|
||||
#define HBA_EVENT_LINK_DOWN 3
|
||||
|
|
@ -477,6 +583,9 @@ struct lpfc_iocbq *lpfc_sli_ringtx_get(struct lpfc_hba *,
|
|||
int __lpfc_sli_issue_iocb(struct lpfc_hba *, uint32_t,
|
||||
struct lpfc_iocbq *, uint32_t);
|
||||
uint32_t lpfc_drain_txq(struct lpfc_hba *);
|
||||
#ifndef NO_APEX
|
||||
void lpfc_set_ndlps_fcp_priority(struct lpfc_nodelist *);
|
||||
#endif
|
||||
void lpfc_clr_rrq_active(struct lpfc_hba *, uint16_t, struct lpfc_node_rrq *);
|
||||
int lpfc_test_rrq_active(struct lpfc_hba *, struct lpfc_nodelist *, uint16_t);
|
||||
void lpfc_handle_rrq_active(struct lpfc_hba *);
|
||||
|
|
@ -499,9 +608,9 @@ int lpfc_sli4_queue_create(struct lpfc_hba *);
|
|||
void lpfc_sli4_queue_destroy(struct lpfc_hba *);
|
||||
void lpfc_sli4_abts_err_handler(struct lpfc_hba *, struct lpfc_nodelist *,
|
||||
struct sli4_wcqe_xri_aborted *);
|
||||
int lpfc_hba_init_link_fc_topology(struct lpfc_hba *, uint32_t);
|
||||
void lpfc_sli_abts_recover_port(struct lpfc_vport *,
|
||||
struct lpfc_nodelist *);
|
||||
int lpfc_hba_init_link_fc_topology(struct lpfc_hba *, uint32_t, uint32_t);
|
||||
int lpfc_issue_reg_vfi(struct lpfc_vport *);
|
||||
int lpfc_issue_unreg_vfi(struct lpfc_vport *);
|
||||
int lpfc_selective_reset(struct lpfc_hba *);
|
||||
|
|
@ -586,10 +695,25 @@ struct lpfc_io_buf *lpfc_get_io_buf(struct lpfc_hba *phba,
|
|||
int);
|
||||
void lpfc_release_io_buf(struct lpfc_hba *phba, struct lpfc_io_buf *ncmd,
|
||||
struct lpfc_sli4_hdw_queue *qp);
|
||||
void lpfc_mode_sense_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *p_io_in,
|
||||
struct lpfc_iocbq *p_io_out);
|
||||
int lpfc_issue_scsi_cmd(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
|
||||
struct lpfc_scsi_io_req *cmd_req);
|
||||
|
||||
#ifdef CONFIG_SCSI_LPFC_DEBUG_FS
|
||||
void lpfc_io_ktime(struct lpfc_hba *phba, struct lpfc_io_buf *ncmd);
|
||||
#endif
|
||||
#if defined(BUILD_NVME)
|
||||
void lpfc_nvme_cmd_template(void);
|
||||
void lpfc_nvmet_cmd_template(void);
|
||||
void lpfc_nvme_cancel_iocb(struct lpfc_hba *phba, struct lpfc_iocbq *pwqeIn);
|
||||
void lpfc_nvme_prep_abort_wqe(struct lpfc_iocbq *pwqeq, u16 xritag, u8 opt);
|
||||
extern int lpfc_enable_nvmet_cnt;
|
||||
extern unsigned long long lpfc_enable_nvmet[];
|
||||
#endif
|
||||
void lpfc_nvme_cancel_iocb(struct lpfc_hba *phba, struct lpfc_iocbq *pwqeIn,
|
||||
uint32_t stat, uint32_t param);
|
||||
extern int lpfc_no_hba_reset_cnt;
|
||||
extern unsigned long lpfc_no_hba_reset[];
|
||||
extern int lpfc_acqe_cgn_frequency;
|
||||
extern int lpfc_fabric_cgn_frequency;
|
||||
extern int lpfc_use_cgn_signal;
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -1,7 +1,7 @@
|
|||
/*******************************************************************
|
||||
* This file is part of the Emulex Linux Device Driver for *
|
||||
* Fibre Channel Host Bus Adapters. *
|
||||
* Copyright (C) 2017-2019 Broadcom. All Rights Reserved. The term *
|
||||
* Copyright (C) 2017-2020 Broadcom. All Rights Reserved. The term *
|
||||
* “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. *
|
||||
* Copyright (C) 2007-2011 Emulex. All rights reserved. *
|
||||
* EMULEX and SLI are trademarks of Emulex. *
|
||||
|
|
@ -32,6 +32,10 @@
|
|||
#define LPFC_NODELIST_SIZE 8192
|
||||
#define LPFC_NODELIST_ENTRY_SIZE 120
|
||||
|
||||
/* ediflist output buffer size */
|
||||
#define LPFC_EDIFLIST_SIZE 8192
|
||||
#define LPFC_EDIFLIST_ENTRY_SIZE 120
|
||||
|
||||
/* dumpHBASlim output buffer size */
|
||||
#define LPFC_DUMPHBASLIM_SIZE 4096
|
||||
|
||||
|
|
@ -44,15 +48,27 @@
|
|||
/* hbqinfo output buffer size */
|
||||
#define LPFC_HBQINFO_SIZE 8192
|
||||
|
||||
/* multixripool output buffer size */
|
||||
#define LPFC_DUMP_MULTIXRIPOOL_SIZE 8192
|
||||
|
||||
enum {
|
||||
DUMP_IO,
|
||||
DUMP_MBX,
|
||||
DUMP_ELS,
|
||||
DUMP_NVMELS,
|
||||
};
|
||||
|
||||
/* nvmestat output buffer size */
|
||||
#define LPFC_NVMESTAT_SIZE 8192
|
||||
#define LPFC_NVMEKTIME_SIZE 8192
|
||||
#define LPFC_CPUCHECK_SIZE 8192
|
||||
#define LPFC_IOKTIME_SIZE 8192
|
||||
#define LPFC_NVMEIO_TRC_SIZE 8192
|
||||
|
||||
/* scsistat output buffer size */
|
||||
#define LPFC_SCSISTAT_SIZE 8192
|
||||
|
||||
/* E2E Congestion Info Buffer size */
|
||||
#define LPFC_CGN_BUF_SIZE 8192
|
||||
|
||||
#define LPFC_DEBUG_OUT_LINE_SZ 80
|
||||
|
||||
/*
|
||||
|
|
@ -279,22 +295,12 @@ struct lpfc_idiag {
|
|||
struct lpfc_idiag_offset offset;
|
||||
void *ptr_private;
|
||||
};
|
||||
|
||||
#else
|
||||
|
||||
#define lpfc_nvmeio_data(phba, fmt, arg...) \
|
||||
no_printk(fmt, ##arg)
|
||||
|
||||
#endif
|
||||
|
||||
/* multixripool output buffer size */
|
||||
#define LPFC_DUMP_MULTIXRIPOOL_SIZE 8192
|
||||
|
||||
enum {
|
||||
DUMP_IO,
|
||||
DUMP_MBX,
|
||||
DUMP_ELS,
|
||||
DUMP_NVMELS,
|
||||
#define MAX_DEBUGFS_RX_TABLE_SIZE (100 * LPFC_MAX_RXMONITOR_ENTRY)
|
||||
struct lpfc_rx_monitor_debug {
|
||||
char *i_private;
|
||||
char *buffer;
|
||||
};
|
||||
|
||||
/* Mask for discovery_trace */
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/*******************************************************************
|
||||
* This file is part of the Emulex Linux Device Driver for *
|
||||
* Fibre Channel Host Bus Adapters. *
|
||||
* Copyright (C) 2017-2018 Broadcom. All Rights Reserved. The term *
|
||||
* Copyright (C) 2017-2020 Broadcom. All Rights Reserved. The term *
|
||||
* “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. *
|
||||
* Copyright (C) 2004-2013 Emulex. All rights reserved. *
|
||||
* EMULEX and SLI are trademarks of Emulex. *
|
||||
|
|
@ -41,6 +41,10 @@ enum lpfc_work_type {
|
|||
LPFC_EVT_DEV_LOSS,
|
||||
LPFC_EVT_FASTPATH_MGMT_EVT,
|
||||
LPFC_EVT_RESET_HBA,
|
||||
#ifndef BUILD_BRCMFCOE
|
||||
LPFC_EVT_REAUTH,
|
||||
#endif
|
||||
LPFC_EVT_RECOVER_PORT
|
||||
};
|
||||
|
||||
/* structure used to queue event to the discovery tasklet */
|
||||
|
|
@ -76,8 +80,46 @@ struct lpfc_node_rrqs {
|
|||
unsigned long xri_bitmap[XRI_BITMAP_ULONGS];
|
||||
};
|
||||
|
||||
struct throttle_history {
|
||||
/* Throttle log defaults if more than 10 messages per second */
|
||||
#define ONE_SEC 1000000 /* one second */
|
||||
bool logit; /* True means throttle logging on */
|
||||
uint32_t log_messages_lost; /* Messages discarded due to throttle */
|
||||
uint32_t log_messages; /* Log messages count within second */
|
||||
uint64_t log_start; /* start of message burst in usec */
|
||||
char announcement[16]; /* announcement string */
|
||||
};
|
||||
|
||||
struct dhchap_config {
|
||||
uint16_t auth_tmo;
|
||||
uint8_t auth_mode;
|
||||
uint8_t bidirectional;
|
||||
uint32_t tran_id;
|
||||
uint32_t hash_id;
|
||||
uint32_t dh_grp_id;
|
||||
uint32_t reauth_interval;
|
||||
uint8_t local_passwd[128];
|
||||
uint32_t local_passwd_len;
|
||||
uint8_t remote_passwd[128];
|
||||
uint32_t remote_passwd_len;
|
||||
uint8_t state;
|
||||
uint8_t msg;
|
||||
uint8_t direction;
|
||||
uint8_t dh_grp_cnt;
|
||||
uint8_t hash_pri[4];
|
||||
uint8_t dh_grp_pri[8];
|
||||
uint8_t rand_num[20];
|
||||
uint8_t nonce[16];
|
||||
uint8_t dhkey[256];
|
||||
uint32_t dhkey_len;
|
||||
unsigned long last_auth;
|
||||
struct timer_list nlp_reauthfunc;
|
||||
};
|
||||
|
||||
struct lpfc_nodelist {
|
||||
struct list_head nlp_listp;
|
||||
struct throttle_history log; /* used to record throttle */
|
||||
struct serv_parm fc_sparam; /* buffer for service params */
|
||||
struct lpfc_name nlp_portname;
|
||||
struct lpfc_name nlp_nodename;
|
||||
uint32_t nlp_flag; /* entry flags */
|
||||
|
|
@ -115,6 +157,7 @@ struct lpfc_nodelist {
|
|||
u8 nlp_nvme_info; /* NVME NSLER Support */
|
||||
#define NLP_NVME_NSLER 0x1 /* NVME NSLER device */
|
||||
|
||||
uint32_t first_burst; /* First Burst size for ndlp */
|
||||
uint16_t nlp_usg_map; /* ndlp management usage bitmap */
|
||||
#define NLP_USG_NODE_ACT_BIT 0x1 /* Indicate ndlp is actively used */
|
||||
#define NLP_USG_IACT_REQ_BIT 0x2 /* Request to inactivate ndlp */
|
||||
|
|
@ -128,19 +171,28 @@ struct lpfc_nodelist {
|
|||
struct lpfc_vport *vport;
|
||||
struct lpfc_work_evt els_retry_evt;
|
||||
struct lpfc_work_evt dev_loss_evt;
|
||||
struct lpfc_work_evt reauth_evt;
|
||||
struct lpfc_work_evt recovery_evt;
|
||||
struct kref kref;
|
||||
atomic_t cmd_pending;
|
||||
uint32_t cmd_qdepth;
|
||||
#ifndef NO_APEX
|
||||
#define MAX_FCP_PRI_LUN 256
|
||||
uint8_t fcp_priority[MAX_FCP_PRI_LUN]; /* 512 lun priority */
|
||||
#endif
|
||||
unsigned long last_change_time;
|
||||
unsigned long *active_rrqs_xri_bitmap;
|
||||
struct lpfc_scsicmd_bkt *lat_data; /* Latency data */
|
||||
uint32_t fc4_prli_sent;
|
||||
uint32_t upcall_flags;
|
||||
#define NLP_WAIT_FOR_UNREG 0x1
|
||||
#define NLP_WAIT_FOR_LOGO 0x2
|
||||
|
||||
uint32_t nvme_fb_size; /* NVME target's supported byte cnt */
|
||||
#define NVME_FB_BIT_SHIFT 9 /* PRLI Rsp first burst in 512B units. */
|
||||
struct dhchap_config dhc_cfg;
|
||||
uint32_t nlp_defer_did;
|
||||
wait_queue_head_t *logo_waitq;
|
||||
};
|
||||
struct lpfc_node_rrq {
|
||||
struct list_head list;
|
||||
|
|
@ -159,7 +211,8 @@ struct lpfc_node_rrq {
|
|||
/* Defines for nlp_flag (uint32) */
|
||||
#define NLP_IGNR_REG_CMPL 0x00000001 /* Rcvd rscn before we cmpl reg login */
|
||||
#define NLP_REG_LOGIN_SEND 0x00000002 /* sent reglogin to adapter */
|
||||
#define NLP_RELEASE_RPI 0x00000004 /* Release RPI to free pool */
|
||||
#define NLP_SKIP_EXT_DIF 0x00000004 /* Target could support External DIF */
|
||||
#define NLP_RELEASE_RPI 0x00000008 /* Release RPI to free pool */
|
||||
#define NLP_SUPPRESS_RSP 0x00000010 /* Remote NPort supports suppress rsp */
|
||||
#define NLP_PLOGI_SND 0x00000020 /* sent PLOGI request for this entry */
|
||||
#define NLP_PRLI_SND 0x00000040 /* sent PRLI request for this entry */
|
||||
|
|
@ -169,6 +222,7 @@ struct lpfc_node_rrq {
|
|||
#define NLP_ELS_SND_MASK 0x000007e0 /* sent ELS request for this entry */
|
||||
#define NLP_NVMET_RECOV 0x00001000 /* NVMET auditing node for recovery. */
|
||||
#define NLP_FCP_PRLI_RJT 0x00002000 /* Rport does not support FCP PRLI. */
|
||||
#define NLP_AUTH_TMO 0x00004000 /* authentication timer is active */
|
||||
#define NLP_UNREG_INP 0x00008000 /* UNREG_RPI cmd is in progress */
|
||||
#define NLP_DEFER_RM 0x00010000 /* Remove this ndlp if no longer used */
|
||||
#define NLP_DELAY_TMO 0x00020000 /* delay timeout is running for node */
|
||||
|
|
@ -185,7 +239,7 @@ struct lpfc_node_rrq {
|
|||
#define NLP_RM_DFLT_RPI 0x04000000 /* need to remove leftover dflt RPI */
|
||||
#define NLP_NODEV_REMOVE 0x08000000 /* Defer removal till discovery ends */
|
||||
#define NLP_TARGET_REMOVE 0x10000000 /* Target remove in process */
|
||||
#define NLP_SC_REQ 0x20000000 /* Target requires authentication */
|
||||
#define NLP_EXTERNAL_DIF 0x20000000 /* Target could support External DIF */
|
||||
#define NLP_FIRSTBURST 0x40000000 /* Target supports FirstBurst */
|
||||
#define NLP_RPI_REGISTERED 0x80000000 /* nlp_rpi is valid */
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -1,7 +1,7 @@
|
|||
/*******************************************************************
|
||||
* This file is part of the Emulex Linux Device Driver for *
|
||||
* Fibre Channel Host Bus Adapters. *
|
||||
* Copyright (C) 2017-2018 Broadcom. All Rights Reserved. The term *
|
||||
* Copyright (C) 2017-2020 Broadcom. All Rights Reserved. The term *
|
||||
* “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. *
|
||||
* Copyright (C) 2004-2016 Emulex. All rights reserved. *
|
||||
* EMULEX and SLI are trademarks of Emulex. *
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
#define FDMI_DID 0xfffffaU
|
||||
#define NameServer_DID 0xfffffcU
|
||||
#define SCR_DID 0xfffffdU
|
||||
#define Fabric_Cntl_DID 0xfffffdU
|
||||
#define Fabric_DID 0xfffffeU
|
||||
#define Bcast_DID 0xffffffU
|
||||
#define Mask_DID 0xffffffU
|
||||
|
|
@ -404,7 +404,8 @@ struct csp {
|
|||
|
||||
uint16_t huntgroup:1; /* FC Word 1, bit 23 */
|
||||
uint16_t simplex:1; /* FC Word 1, bit 22 */
|
||||
uint16_t word1Reserved1:3; /* FC Word 1, bit 21:19 */
|
||||
uint16_t fcsp:1; /* FC Word 1, bit 21 */
|
||||
uint16_t word1Reserved1:2; /* FC Word 1, bit 20:19 */
|
||||
uint16_t dhd:1; /* FC Word 1, bit 18 */
|
||||
uint16_t contIncSeqCnt:1; /* FC Word 1, bit 17 */
|
||||
uint16_t payloadlength:1; /* FC Word 1, bit 16 */
|
||||
|
|
@ -421,7 +422,8 @@ struct csp {
|
|||
uint16_t payloadlength:1; /* FC Word 1, bit 16 */
|
||||
uint16_t contIncSeqCnt:1; /* FC Word 1, bit 17 */
|
||||
uint16_t dhd:1; /* FC Word 1, bit 18 */
|
||||
uint16_t word1Reserved1:3; /* FC Word 1, bit 21:19 */
|
||||
uint16_t word1Reserved1:2; /* FC Word 1, bit 20:19 */
|
||||
uint16_t fcsp:1; /* FC Word 1, bit 21 */
|
||||
uint16_t simplex:1; /* FC Word 1, bit 22 */
|
||||
uint16_t huntgroup:1; /* FC Word 1, bit 23 */
|
||||
#endif
|
||||
|
|
@ -560,10 +562,10 @@ struct fc_vft_header {
|
|||
#define fc_vft_hdr_hopct_WORD word1
|
||||
};
|
||||
|
||||
#include <uapi/scsi/fc/fc_els.h>
|
||||
|
||||
/*
|
||||
* Extended Link Service LS_COMMAND codes (Payload Word 0)
|
||||
* The supported payload size is also hard-coded into this word
|
||||
* when necessary.
|
||||
*/
|
||||
#ifdef __BIG_ENDIAN_BITFIELD
|
||||
#define ELS_CMD_MASK 0xffff0000
|
||||
|
|
@ -587,7 +589,10 @@ struct fc_vft_header {
|
|||
#define ELS_CMD_TEST 0x11000000
|
||||
#define ELS_CMD_RRQ 0x12000000
|
||||
#define ELS_CMD_REC 0x13000000
|
||||
#define ELS_CMD_FPIN 0x16000000
|
||||
#define ELS_CMD_EDC 0x17000000
|
||||
#define ELS_CMD_RDP 0x18000000
|
||||
#define ELS_CMD_RDF 0x19000000
|
||||
#define ELS_CMD_PRLI 0x20100014
|
||||
#define ELS_CMD_NVMEPRLI 0x20140018
|
||||
#define ELS_CMD_PRLO 0x21100014
|
||||
|
|
@ -597,16 +602,16 @@ struct fc_vft_header {
|
|||
#define ELS_CMD_ADISC 0x52000000
|
||||
#define ELS_CMD_FARP 0x54000000
|
||||
#define ELS_CMD_FARPR 0x55000000
|
||||
#define ELS_CMD_RPS 0x56000000
|
||||
#define ELS_CMD_RPL 0x57000000
|
||||
#define ELS_CMD_FAN 0x60000000
|
||||
#define ELS_CMD_RSCN 0x61040000
|
||||
#define ELS_CMD_RSCN_XMT 0x61040008
|
||||
#define ELS_CMD_RSCN 0x61040000
|
||||
#define ELS_CMD_SCR 0x62000000
|
||||
#define ELS_CMD_RNID 0x78000000
|
||||
#define ELS_CMD_LIRR 0x7A000000
|
||||
#define ELS_CMD_LCB 0x81000000
|
||||
#define ELS_CMD_FPIN 0x16000000
|
||||
#define ELS_CMD_AUTH 0x90000000
|
||||
#define ELS_CMD_RAW 0xff000000
|
||||
#else /* __LITTLE_ENDIAN_BITFIELD */
|
||||
#define ELS_CMD_MASK 0xffff
|
||||
#define ELS_RSP_MASK 0xff
|
||||
|
|
@ -629,7 +634,14 @@ struct fc_vft_header {
|
|||
#define ELS_CMD_TEST 0x11
|
||||
#define ELS_CMD_RRQ 0x12
|
||||
#define ELS_CMD_REC 0x13
|
||||
#if defined(FCH_EVT_LINK_FPIN)
|
||||
#define ELS_CMD_FPIN ELS_FPIN
|
||||
#else
|
||||
#define ELS_CMD_FPIN 0x16
|
||||
#endif
|
||||
#define ELS_CMD_EDC 0x17
|
||||
#define ELS_CMD_RDP 0x18
|
||||
#define ELS_CMD_RDF 0x19
|
||||
#define ELS_CMD_PRLI 0x14001020
|
||||
#define ELS_CMD_NVMEPRLI 0x18001420
|
||||
#define ELS_CMD_PRLO 0x14001021
|
||||
|
|
@ -639,16 +651,16 @@ struct fc_vft_header {
|
|||
#define ELS_CMD_ADISC 0x52
|
||||
#define ELS_CMD_FARP 0x54
|
||||
#define ELS_CMD_FARPR 0x55
|
||||
#define ELS_CMD_RPS 0x56
|
||||
#define ELS_CMD_RPL 0x57
|
||||
#define ELS_CMD_FAN 0x60
|
||||
#define ELS_CMD_RSCN 0x0461
|
||||
#define ELS_CMD_RSCN_XMT 0x08000461
|
||||
#define ELS_CMD_RSCN 0x0461
|
||||
#define ELS_CMD_SCR 0x62
|
||||
#define ELS_CMD_RNID 0x78
|
||||
#define ELS_CMD_LIRR 0x7A
|
||||
#define ELS_CMD_LCB 0x81
|
||||
#define ELS_CMD_FPIN ELS_FPIN
|
||||
#define ELS_CMD_AUTH 0x90
|
||||
#define ELS_CMD_RAW 0xff
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
|
@ -919,24 +931,6 @@ typedef struct _RNID { /* Structure is in Big Endian format */
|
|||
} un;
|
||||
} __packed RNID;
|
||||
|
||||
typedef struct _RPS { /* Structure is in Big Endian format */
|
||||
union {
|
||||
uint32_t portNum;
|
||||
struct lpfc_name portName;
|
||||
} un;
|
||||
} RPS;
|
||||
|
||||
typedef struct _RPS_RSP { /* Structure is in Big Endian format */
|
||||
uint16_t rsvd1;
|
||||
uint16_t portStatus;
|
||||
uint32_t linkFailureCnt;
|
||||
uint32_t lossSyncCnt;
|
||||
uint32_t lossSignalCnt;
|
||||
uint32_t primSeqErrCnt;
|
||||
uint32_t invalidXmitWord;
|
||||
uint32_t crcCnt;
|
||||
} RPS_RSP;
|
||||
|
||||
struct RLS { /* Structure is in Big Endian format */
|
||||
uint32_t rls;
|
||||
#define rls_rsvd_SHIFT 24
|
||||
|
|
@ -1099,6 +1093,11 @@ struct fc_lcb_res_frame {
|
|||
uint16_t lcb_duration; /* LCB Payload Word 2, bit 15:0 */
|
||||
};
|
||||
|
||||
struct fc_RSCN { /* RSCN ELS frame */
|
||||
#define RSCN_EQ_PORT_ATTRIBUTE 2
|
||||
uint32_t NPort_ID;
|
||||
};
|
||||
|
||||
/*
|
||||
* Read Diagnostic Parameters (RDP) ELS frame.
|
||||
*/
|
||||
|
|
@ -1398,6 +1397,9 @@ struct lpfc_fdmi_reg_hba {
|
|||
struct lpfc_fdmi_reg_port_list rpl;
|
||||
};
|
||||
|
||||
/******** E2E ********/
|
||||
#define SLI_CT_E2E_Subtypes 0x11
|
||||
|
||||
/*
|
||||
* Register HBA Attributes (RHAT)
|
||||
*/
|
||||
|
|
@ -1501,6 +1503,7 @@ struct lpfc_fdmi_reg_portattr {
|
|||
#define RPRT_PORT_STATE 0x101 /* 32-bit unsigned int */
|
||||
#define RPRT_DISC_PORT 0x102 /* 32-bit unsigned int */
|
||||
#define RPRT_PORT_ID 0x103 /* 32-bit unsigned int */
|
||||
#define RPRT_VENDOR_CGN 0xf047 /* canned ASCII string */
|
||||
#define RPRT_SMART_SERVICE 0xf100 /* 4 to 256 byte ASCII string */
|
||||
#define RPRT_SMART_GUID 0xf101 /* 8 byte WWNN + 8 byte WWPN */
|
||||
#define RPRT_SMART_VERSION 0xf102 /* 4 to 256 byte ASCII string */
|
||||
|
|
@ -1533,6 +1536,7 @@ struct lpfc_fdmi_reg_portattr {
|
|||
#define LPFC_FDMI_SMART_ATTR_port_info 0x00100000 /* Vendor specific */
|
||||
#define LPFC_FDMI_SMART_ATTR_qos 0x00200000 /* Vendor specific */
|
||||
#define LPFC_FDMI_SMART_ATTR_security 0x00400000 /* Vendor specific */
|
||||
#define LPFC_FDMI_VENDOR_ATTR_cgn 0x00800000 /* Vendor specific */
|
||||
|
||||
/* Bit mask for FDMI-1 defined PORT attributes */
|
||||
#define LPFC_FDMI1_PORT_ATTR 0x0000003f
|
||||
|
|
@ -1587,8 +1591,10 @@ struct lpfc_fdmi_reg_portattr {
|
|||
#define PCI_DEVICE_ID_PROTEUS_PF 0xe180
|
||||
#define PCI_DEVICE_ID_LANCER_FC 0xe200
|
||||
#define PCI_DEVICE_ID_LANCER_FC_VF 0xe208
|
||||
#ifndef BUILD_RHEL8
|
||||
#define PCI_DEVICE_ID_LANCER_FCOE 0xe260
|
||||
#define PCI_DEVICE_ID_LANCER_FCOE_VF 0xe268
|
||||
#endif
|
||||
#define PCI_DEVICE_ID_LANCER_G6_FC 0xe300
|
||||
#define PCI_DEVICE_ID_LANCER_G7_FC 0xf400
|
||||
#define PCI_DEVICE_ID_SAT_SMB 0xf011
|
||||
|
|
@ -3280,8 +3286,7 @@ typedef struct {
|
|||
#endif
|
||||
|
||||
#ifdef __BIG_ENDIAN_BITFIELD
|
||||
uint32_t rsvd1 : 19; /* Reserved */
|
||||
uint32_t cdss : 1; /* Configure Data Security SLI */
|
||||
uint32_t rsvd1 : 20; /* Reserved */
|
||||
uint32_t casabt : 1; /* Configure async abts status notice */
|
||||
uint32_t rsvd2 : 2; /* Reserved */
|
||||
uint32_t cbg : 1; /* Configure BlockGuard */
|
||||
|
|
@ -3305,12 +3310,10 @@ typedef struct {
|
|||
uint32_t cbg : 1; /* Configure BlockGuard */
|
||||
uint32_t rsvd2 : 2; /* Reserved */
|
||||
uint32_t casabt : 1; /* Configure async abts status notice */
|
||||
uint32_t cdss : 1; /* Configure Data Security SLI */
|
||||
uint32_t rsvd1 : 19; /* Reserved */
|
||||
uint32_t rsvd1 : 20; /* Reserved */
|
||||
#endif
|
||||
#ifdef __BIG_ENDIAN_BITFIELD
|
||||
uint32_t rsvd3 : 19; /* Reserved */
|
||||
uint32_t gdss : 1; /* Configure Data Security SLI */
|
||||
uint32_t rsvd3 : 20; /* Reserved */
|
||||
uint32_t gasabt : 1; /* Grant async abts status notice */
|
||||
uint32_t rsvd4 : 2; /* Reserved */
|
||||
uint32_t gbg : 1; /* Grant BlockGuard */
|
||||
|
|
@ -3334,8 +3337,7 @@ typedef struct {
|
|||
uint32_t gbg : 1; /* Grant BlockGuard */
|
||||
uint32_t rsvd4 : 2; /* Reserved */
|
||||
uint32_t gasabt : 1; /* Grant async abts status notice */
|
||||
uint32_t gdss : 1; /* Configure Data Security SLI */
|
||||
uint32_t rsvd3 : 19; /* Reserved */
|
||||
uint32_t rsvd3 : 20; /* Reserved */
|
||||
#endif
|
||||
|
||||
#ifdef __BIG_ENDIAN_BITFIELD
|
||||
|
|
@ -3357,15 +3359,11 @@ typedef struct {
|
|||
uint32_t rsvd6; /* Reserved */
|
||||
|
||||
#ifdef __BIG_ENDIAN_BITFIELD
|
||||
uint32_t fips_rev : 3; /* FIPS Spec Revision */
|
||||
uint32_t fips_level : 4; /* FIPS Level */
|
||||
uint32_t sec_err : 9; /* security crypto error */
|
||||
uint32_t rsvd7 : 16;
|
||||
uint32_t max_vpi : 16; /* Max number of virt N-Ports */
|
||||
#else /* __LITTLE_ENDIAN */
|
||||
uint32_t max_vpi : 16; /* Max number of virt N-Ports */
|
||||
uint32_t sec_err : 9; /* security crypto error */
|
||||
uint32_t fips_level : 4; /* FIPS Level */
|
||||
uint32_t fips_rev : 3; /* FIPS Spec Revision */
|
||||
uint32_t rsvd7 : 16;
|
||||
#endif
|
||||
|
||||
} CONFIG_PORT_VAR;
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -24,62 +24,7 @@
|
|||
#include <linux/pci.h>
|
||||
|
||||
const struct pci_device_id lpfc_id_table[] = {
|
||||
{PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_VIPER,
|
||||
PCI_ANY_ID, PCI_ANY_ID, },
|
||||
{PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_FIREFLY,
|
||||
PCI_ANY_ID, PCI_ANY_ID, },
|
||||
{PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_THOR,
|
||||
PCI_ANY_ID, PCI_ANY_ID, },
|
||||
{PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_PEGASUS,
|
||||
PCI_ANY_ID, PCI_ANY_ID, },
|
||||
{PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_CENTAUR,
|
||||
PCI_ANY_ID, PCI_ANY_ID, },
|
||||
{PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_DRAGONFLY,
|
||||
PCI_ANY_ID, PCI_ANY_ID, },
|
||||
{PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_SUPERFLY,
|
||||
PCI_ANY_ID, PCI_ANY_ID, },
|
||||
{PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_RFLY,
|
||||
PCI_ANY_ID, PCI_ANY_ID, },
|
||||
{PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_PFLY,
|
||||
PCI_ANY_ID, PCI_ANY_ID, },
|
||||
{PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_NEPTUNE,
|
||||
PCI_ANY_ID, PCI_ANY_ID, },
|
||||
{PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_NEPTUNE_SCSP,
|
||||
PCI_ANY_ID, PCI_ANY_ID, },
|
||||
{PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_NEPTUNE_DCSP,
|
||||
PCI_ANY_ID, PCI_ANY_ID, },
|
||||
{PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_HELIOS,
|
||||
PCI_ANY_ID, PCI_ANY_ID, },
|
||||
{PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_HELIOS_SCSP,
|
||||
PCI_ANY_ID, PCI_ANY_ID, },
|
||||
{PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_HELIOS_DCSP,
|
||||
PCI_ANY_ID, PCI_ANY_ID, },
|
||||
{PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_BMID,
|
||||
PCI_ANY_ID, PCI_ANY_ID, },
|
||||
{PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_BSMB,
|
||||
PCI_ANY_ID, PCI_ANY_ID, },
|
||||
{PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_ZEPHYR,
|
||||
PCI_ANY_ID, PCI_ANY_ID, },
|
||||
{PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_HORNET,
|
||||
PCI_ANY_ID, PCI_ANY_ID, },
|
||||
{PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_ZEPHYR_SCSP,
|
||||
PCI_ANY_ID, PCI_ANY_ID, },
|
||||
{PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_ZEPHYR_DCSP,
|
||||
PCI_ANY_ID, PCI_ANY_ID, },
|
||||
{PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_ZMID,
|
||||
PCI_ANY_ID, PCI_ANY_ID, },
|
||||
{PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_ZSMB,
|
||||
PCI_ANY_ID, PCI_ANY_ID, },
|
||||
{PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_TFLY,
|
||||
PCI_ANY_ID, PCI_ANY_ID, },
|
||||
{PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_LP101,
|
||||
PCI_ANY_ID, PCI_ANY_ID, },
|
||||
{PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_LP10000S,
|
||||
PCI_ANY_ID, PCI_ANY_ID, },
|
||||
{PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_LP11000S,
|
||||
PCI_ANY_ID, PCI_ANY_ID, },
|
||||
{PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_LPE11000S,
|
||||
PCI_ANY_ID, PCI_ANY_ID, },
|
||||
#ifndef BUILD_BRCMFCOE
|
||||
{PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_SAT,
|
||||
PCI_ANY_ID, PCI_ANY_ID, },
|
||||
{PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_SAT_MID,
|
||||
|
|
@ -92,35 +37,29 @@ const struct pci_device_id lpfc_id_table[] = {
|
|||
PCI_ANY_ID, PCI_ANY_ID, },
|
||||
{PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_SAT_S,
|
||||
PCI_ANY_ID, PCI_ANY_ID, },
|
||||
{PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_PROTEUS_VF,
|
||||
PCI_ANY_ID, PCI_ANY_ID, },
|
||||
{PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_PROTEUS_PF,
|
||||
PCI_ANY_ID, PCI_ANY_ID, },
|
||||
{PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_PROTEUS_S,
|
||||
PCI_ANY_ID, PCI_ANY_ID, },
|
||||
{PCI_VENDOR_ID_SERVERENGINE, PCI_DEVICE_ID_TIGERSHARK,
|
||||
PCI_ANY_ID, PCI_ANY_ID, },
|
||||
{PCI_VENDOR_ID_SERVERENGINE, PCI_DEVICE_ID_TOMCAT,
|
||||
PCI_ANY_ID, PCI_ANY_ID, },
|
||||
{PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_FALCON,
|
||||
PCI_ANY_ID, PCI_ANY_ID, },
|
||||
{PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_BALIUS,
|
||||
PCI_ANY_ID, PCI_ANY_ID, },
|
||||
{PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_LANCER_FC,
|
||||
PCI_ANY_ID, PCI_ANY_ID, },
|
||||
#ifndef BUILD_RHEL8
|
||||
{PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_LANCER_FCOE,
|
||||
PCI_ANY_ID, PCI_ANY_ID, },
|
||||
{PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_LANCER_FC_VF,
|
||||
PCI_ANY_ID, PCI_ANY_ID, },
|
||||
{PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_LANCER_FCOE_VF,
|
||||
PCI_ANY_ID, PCI_ANY_ID, },
|
||||
#endif
|
||||
{PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_LANCER_FC_VF,
|
||||
PCI_ANY_ID, PCI_ANY_ID, },
|
||||
{PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_LANCER_G6_FC,
|
||||
PCI_ANY_ID, PCI_ANY_ID, },
|
||||
{PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_LANCER_G7_FC,
|
||||
PCI_ANY_ID, PCI_ANY_ID, },
|
||||
#else
|
||||
{PCI_VENDOR_ID_SERVERENGINE, PCI_DEVICE_ID_TIGERSHARK,
|
||||
PCI_ANY_ID, PCI_ANY_ID, },
|
||||
{PCI_VENDOR_ID_SERVERENGINE, PCI_DEVICE_ID_TOMCAT,
|
||||
PCI_ANY_ID, PCI_ANY_ID, },
|
||||
{PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_SKYHAWK,
|
||||
PCI_ANY_ID, PCI_ANY_ID, },
|
||||
{PCI_VENDOR_ID_EMULEX, PCI_DEVICE_ID_SKYHAWK_VF,
|
||||
PCI_ANY_ID, PCI_ANY_ID, },
|
||||
#endif
|
||||
{ 0 }
|
||||
};
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,7 +1,7 @@
|
|||
/*******************************************************************
|
||||
* This file is part of the Emulex Linux Device Driver for *
|
||||
* Fibre Channel Host Bus Adapters. *
|
||||
* Copyright (C) 2017-2018 Broadcom. All Rights Reserved. The term *
|
||||
* Copyright (C) 2017-2020 Broadcom. All Rights Reserved. The term *
|
||||
* “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. *
|
||||
* Copyright (C) 2004-2009 Emulex. All rights reserved. *
|
||||
* EMULEX and SLI are trademarks of Emulex. *
|
||||
|
|
@ -44,13 +44,43 @@
|
|||
#define LOG_NVME_DISC 0x00200000 /* NVME Discovery/Connect events. */
|
||||
#define LOG_NVME_ABTS 0x00400000 /* NVME ABTS events. */
|
||||
#define LOG_NVME_IOERR 0x00800000 /* NVME IO Error events. */
|
||||
#define LOG_ALL_MSG 0xffffffff /* LOG all messages */
|
||||
#define LOG_EDIF 0x01000000 /* External DIF events */
|
||||
#define LOG_AUTH 0x02000000 /* Authentication events */
|
||||
#define LOG_CGN_MGMT 0x04000000 /* Congestion Mgmt events */
|
||||
#define LOG_TRACE_EVENT 0x80000000 /* Dmp the DBG log on this err */
|
||||
#define LOG_ALL_MSG 0x7fffffff /* LOG all messages */
|
||||
|
||||
void lpfc_dmp_dbg(struct lpfc_hba *phba);
|
||||
void lpfc_dbg_print(struct lpfc_hba *phba, const char *fmt, ...);
|
||||
|
||||
/* generate message by verbose log setting or severity */
|
||||
#define lpfc_vlog_msg(vport, level, mask, fmt, arg...) \
|
||||
{ if (((mask) & (vport)->cfg_log_verbose) || (level[1] <= '4')) \
|
||||
dev_printk(level, &((vport)->phba->pcidev)->dev, "%d:(%d):" \
|
||||
fmt, (vport)->phba->brd_no, vport->vpi, ##arg); }
|
||||
|
||||
#define lpfc_log_msg(phba, level, mask, fmt, arg...) \
|
||||
do { \
|
||||
{ uint32_t log_verbose = (phba)->pport ? \
|
||||
(phba)->pport->cfg_log_verbose : \
|
||||
(phba)->cfg_log_verbose; \
|
||||
if (((mask) & log_verbose) || (level[1] <= '4')) \
|
||||
dev_printk(level, &((phba)->pcidev)->dev, "%d:" \
|
||||
fmt, phba->brd_no, ##arg); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define lpfc_printf_vlog(vport, level, mask, fmt, arg...) \
|
||||
do { \
|
||||
{ if (((mask) & (vport)->cfg_log_verbose) || (level[1] <= '3')) \
|
||||
{ if (((mask) & (vport)->cfg_log_verbose) || (level[1] <= '3')) { \
|
||||
if ((mask) & LOG_TRACE_EVENT) \
|
||||
lpfc_dmp_dbg((vport)->phba); \
|
||||
dev_printk(level, &((vport)->phba->pcidev)->dev, "%d:(%d):" \
|
||||
fmt, (vport)->phba->brd_no, vport->vpi, ##arg); } \
|
||||
fmt, (vport)->phba->brd_no, vport->vpi, ##arg); \
|
||||
} else if (!(vport)->cfg_log_verbose) \
|
||||
lpfc_dbg_print((vport)->phba, "%d:(%d):" fmt, \
|
||||
(vport)->phba->brd_no, (vport)->vpi, ##arg); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define lpfc_printf_log(phba, level, mask, fmt, arg...) \
|
||||
|
|
@ -58,8 +88,52 @@ do { \
|
|||
{ uint32_t log_verbose = (phba)->pport ? \
|
||||
(phba)->pport->cfg_log_verbose : \
|
||||
(phba)->cfg_log_verbose; \
|
||||
if (((mask) & log_verbose) || (level[1] <= '3')) \
|
||||
if (((mask) & log_verbose) || (level[1] <= '3')) { \
|
||||
if ((mask) & LOG_TRACE_EVENT) \
|
||||
lpfc_dmp_dbg(phba); \
|
||||
dev_printk(level, &((phba)->pcidev)->dev, "%d:" \
|
||||
fmt, phba->brd_no, ##arg); \
|
||||
fmt, phba->brd_no, ##arg); \
|
||||
} else if (!(phba)->cfg_log_verbose)\
|
||||
lpfc_dbg_print(phba, "%d:" fmt, phba->brd_no, ##arg); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define lpfc_throttle_vlog(vport, hist, log, fmt, arg...) \
|
||||
do { \
|
||||
{ if (!lpfc_throttler(vport, (hist))) \
|
||||
break; \
|
||||
lpfc_printf_vlog(vport, KERN_INFO, log, \
|
||||
fmt, arg); \
|
||||
}\
|
||||
} while (0)
|
||||
|
||||
#define lpfc_throttle_log(phba, hist, log, fmt, arg...) \
|
||||
do { \
|
||||
{ if (!lpfc_throttler((phba->pport), (hist))) \
|
||||
break; \
|
||||
lpfc_printf_log(phba, KERN_INFO, log, \
|
||||
fmt, arg); \
|
||||
}\
|
||||
} while (0)
|
||||
|
||||
#define lpfc_optioned_vlog(vport, hist, level, mask, fmt, arg...) \
|
||||
do { \
|
||||
{ if (!lpfc_throttler(vport, (hist))) \
|
||||
{ lpfc_printf_vlog(vport, level, mask, fmt, ##arg); \
|
||||
break; \
|
||||
}\
|
||||
dev_printk(level, &((vport)->phba->pcidev)->dev, "%d:(%d):" \
|
||||
fmt, (vport)->phba->brd_no, vport->vpi, ##arg); \
|
||||
}\
|
||||
} while (0)
|
||||
|
||||
#define lpfc_optioned_log(phba, hist, level, mask, fmt, arg...) \
|
||||
do { \
|
||||
{ if (!lpfc_throttler((phba->pport), (hist))) \
|
||||
{ lpfc_printf_log(phba, level, mask, fmt, ##arg); \
|
||||
break; \
|
||||
}\
|
||||
dev_printk(level, &((phba)->pcidev)->dev, "%d:" \
|
||||
fmt, phba->brd_no, ##arg); \
|
||||
}\
|
||||
} while (0)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/*******************************************************************
|
||||
* This file is part of the Emulex Linux Device Driver for *
|
||||
* Fibre Channel Host Bus Adapters. *
|
||||
* Copyright (C) 2017-2018 Broadcom. All Rights Reserved. The term *
|
||||
* Copyright (C) 2017-2020 Broadcom. All Rights Reserved. The term *
|
||||
* “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. *
|
||||
* Copyright (C) 2004-2016 Emulex. All rights reserved. *
|
||||
* EMULEX and SLI are trademarks of Emulex. *
|
||||
|
|
@ -515,6 +515,7 @@ lpfc_init_link(struct lpfc_hba * phba,
|
|||
|
||||
if ((phba->pcidev->device == PCI_DEVICE_ID_LANCER_G6_FC ||
|
||||
phba->pcidev->device == PCI_DEVICE_ID_LANCER_G7_FC) &&
|
||||
!(phba->sli4_hba.pc_sli4_params.pls) &&
|
||||
mb->un.varInitLnk.link_flags & FLAGS_TOPOLOGY_MODE_LOOP) {
|
||||
mb->un.varInitLnk.link_flags = FLAGS_TOPOLOGY_MODE_PT_PT;
|
||||
phba->cfg_topology = FLAGS_TOPOLOGY_MODE_PT_PT;
|
||||
|
|
@ -755,7 +756,6 @@ lpfc_reg_rpi(struct lpfc_hba *phba, uint16_t vpi, uint32_t did,
|
|||
struct lpfc_dmabuf *mp;
|
||||
|
||||
memset(pmb, 0, sizeof (LPFC_MBOXQ_t));
|
||||
|
||||
mb->un.varRegLogin.rpi = 0;
|
||||
if (phba->sli_rev == LPFC_SLI_REV4)
|
||||
mb->un.varRegLogin.rpi = phba->sli4_hba.rpi_ids[rpi];
|
||||
|
|
@ -1296,10 +1296,8 @@ lpfc_config_port(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb)
|
|||
/* If HBA supports SLI=3 ask for it */
|
||||
|
||||
if (phba->sli_rev == LPFC_SLI_REV3 && phba->vpd.sli3Feat.cerbm) {
|
||||
if (phba->cfg_enable_bg)
|
||||
if (phba->sli3_options & LPFC_SLI3_BG_ENABLED)
|
||||
mb->un.varCfgPort.cbg = 1; /* configure BlockGuard */
|
||||
if (phba->cfg_enable_dss)
|
||||
mb->un.varCfgPort.cdss = 1; /* Configure Security */
|
||||
mb->un.varCfgPort.cerbm = 1; /* Request HBQs */
|
||||
mb->un.varCfgPort.ccrp = 1; /* Command Ring Polling */
|
||||
mb->un.varCfgPort.max_hbq = lpfc_sli_hbq_count();
|
||||
|
|
@ -1379,7 +1377,8 @@ lpfc_config_port(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb)
|
|||
*/
|
||||
|
||||
if (phba->cfg_hostmem_hgp && phba->sli_rev != 3) {
|
||||
phba->host_gp = &phba->mbox->us.s2.host[0];
|
||||
phba->host_gp = (struct lpfc_hgp __iomem *)
|
||||
&phba->mbox->us.s2.host[0];
|
||||
phba->hbq_put = NULL;
|
||||
offset = (uint8_t *)&phba->mbox->us.s2.host -
|
||||
(uint8_t *)phba->slim2p.virt;
|
||||
|
|
@ -2085,7 +2084,7 @@ lpfc_request_features(struct lpfc_hba *phba, struct lpfcMboxq *mboxq)
|
|||
bf_set(lpfc_mbx_rq_ftr_rq_perfh, &mboxq->u.mqe.un.req_ftrs, 1);
|
||||
|
||||
/* Enable DIF (block guard) only if configured to do so. */
|
||||
if (phba->cfg_enable_bg)
|
||||
if (phba->sli3_options & LPFC_SLI3_BG_ENABLED)
|
||||
bf_set(lpfc_mbx_rq_ftr_rq_dif, &mboxq->u.mqe.un.req_ftrs, 1);
|
||||
|
||||
/* Enable NPIV only if configured to do so. */
|
||||
|
|
@ -2299,7 +2298,7 @@ lpfc_sli4_dump_cfg_rg23(struct lpfc_hba *phba, struct lpfcMboxq *mbox)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
void
|
||||
lpfc_mbx_cmpl_rdp_link_stat(struct lpfc_hba *phba, LPFC_MBOXQ_t *mboxq)
|
||||
{
|
||||
MAILBOX_t *mb;
|
||||
|
|
@ -2320,7 +2319,7 @@ mbx_failed:
|
|||
rdp_context->cmpl(phba, rdp_context, rc);
|
||||
}
|
||||
|
||||
static void
|
||||
void
|
||||
lpfc_mbx_cmpl_rdp_page_a2(struct lpfc_hba *phba, LPFC_MBOXQ_t *mbox)
|
||||
{
|
||||
struct lpfc_dmabuf *mp = (struct lpfc_dmabuf *)mbox->ctx_buf;
|
||||
|
|
@ -2367,7 +2366,7 @@ lpfc_mbx_cmpl_rdp_page_a0(struct lpfc_hba *phba, LPFC_MBOXQ_t *mbox)
|
|||
goto error;
|
||||
|
||||
lpfc_sli_bemem_bcopy(mp->virt, &rdp_context->page_a0,
|
||||
DMP_SFF_PAGE_A0_SIZE);
|
||||
DMP_SFF_PAGE_A0_SIZE);
|
||||
|
||||
memset(mbox, 0, sizeof(*mbox));
|
||||
|
||||
|
|
@ -2380,13 +2379,13 @@ lpfc_mbx_cmpl_rdp_page_a0(struct lpfc_hba *phba, LPFC_MBOXQ_t *mbox)
|
|||
|
||||
bf_set(lpfc_mqe_command, &mbox->u.mqe, MBX_DUMP_MEMORY);
|
||||
bf_set(lpfc_mbx_memory_dump_type3_type,
|
||||
&mbox->u.mqe.un.mem_dump_type3, DMP_LMSD);
|
||||
&mbox->u.mqe.un.mem_dump_type3, DMP_LMSD);
|
||||
bf_set(lpfc_mbx_memory_dump_type3_link,
|
||||
&mbox->u.mqe.un.mem_dump_type3, phba->sli4_hba.physical_port);
|
||||
&mbox->u.mqe.un.mem_dump_type3, phba->sli4_hba.physical_port);
|
||||
bf_set(lpfc_mbx_memory_dump_type3_page_no,
|
||||
&mbox->u.mqe.un.mem_dump_type3, DMP_PAGE_A2);
|
||||
&mbox->u.mqe.un.mem_dump_type3, DMP_PAGE_A2);
|
||||
bf_set(lpfc_mbx_memory_dump_type3_length,
|
||||
&mbox->u.mqe.un.mem_dump_type3, DMP_SFF_PAGE_A2_SIZE);
|
||||
&mbox->u.mqe.un.mem_dump_type3, DMP_SFF_PAGE_A2_SIZE);
|
||||
mbox->u.mqe.un.mem_dump_type3.addr_lo = putPaddrLow(mp->phys);
|
||||
mbox->u.mqe.un.mem_dump_type3.addr_hi = putPaddrHigh(mp->phys);
|
||||
|
||||
|
|
@ -2439,13 +2438,13 @@ lpfc_sli4_dump_page_a0(struct lpfc_hba *phba, struct lpfcMboxq *mbox)
|
|||
mbox->ctx_buf = mp;
|
||||
|
||||
bf_set(lpfc_mbx_memory_dump_type3_type,
|
||||
&mbox->u.mqe.un.mem_dump_type3, DMP_LMSD);
|
||||
&mbox->u.mqe.un.mem_dump_type3, DMP_LMSD);
|
||||
bf_set(lpfc_mbx_memory_dump_type3_link,
|
||||
&mbox->u.mqe.un.mem_dump_type3, phba->sli4_hba.physical_port);
|
||||
&mbox->u.mqe.un.mem_dump_type3, phba->sli4_hba.physical_port);
|
||||
bf_set(lpfc_mbx_memory_dump_type3_page_no,
|
||||
&mbox->u.mqe.un.mem_dump_type3, DMP_PAGE_A0);
|
||||
&mbox->u.mqe.un.mem_dump_type3, DMP_PAGE_A0);
|
||||
bf_set(lpfc_mbx_memory_dump_type3_length,
|
||||
&mbox->u.mqe.un.mem_dump_type3, DMP_SFF_PAGE_A0_SIZE);
|
||||
&mbox->u.mqe.un.mem_dump_type3, DMP_SFF_PAGE_A0_SIZE);
|
||||
mbox->u.mqe.un.mem_dump_type3.addr_lo = putPaddrLow(mp->phys);
|
||||
mbox->u.mqe.un.mem_dump_type3.addr_hi = putPaddrHigh(mp->phys);
|
||||
|
||||
|
|
@ -2622,3 +2621,39 @@ lpfc_resume_rpi(struct lpfcMboxq *mbox, struct lpfc_nodelist *ndlp)
|
|||
resume_rpi->event_tag = ndlp->phba->fc_eventTag;
|
||||
}
|
||||
|
||||
/**
|
||||
* lpfc_supported_pages - Initialize the PORT_CAPABILITIES supported pages
|
||||
* mailbox command.
|
||||
* @mbox: pointer to lpfc mbox command to initialize.
|
||||
*
|
||||
* The PORT_CAPABILITIES supported pages mailbox command is issued to
|
||||
* retrieve the particular feature pages supported by the port.
|
||||
**/
|
||||
void
|
||||
lpfc_supported_pages(struct lpfcMboxq *mbox)
|
||||
{
|
||||
struct lpfc_mbx_supp_pages *supp_pages;
|
||||
|
||||
memset(mbox, 0, sizeof(*mbox));
|
||||
supp_pages = &mbox->u.mqe.un.supp_pages;
|
||||
bf_set(lpfc_mqe_command, &mbox->u.mqe, MBX_PORT_CAPABILITIES);
|
||||
bf_set(cpn, supp_pages, LPFC_SUPP_PAGES);
|
||||
}
|
||||
|
||||
/**
|
||||
* lpfc_pc_sli4_params - Initialize the PORT_CAPABILITIES SLI4 Params mbox cmd.
|
||||
* @mbox: pointer to lpfc mbox command to initialize.
|
||||
*
|
||||
* The PORT_CAPABILITIES SLI4 parameters mailbox command is issued to
|
||||
* retrieve the particular SLI4 features supported by the port.
|
||||
**/
|
||||
void
|
||||
lpfc_pc_sli4_params(struct lpfcMboxq *mbox)
|
||||
{
|
||||
struct lpfc_mbx_pc_sli4_params *sli4_params;
|
||||
|
||||
memset(mbox, 0, sizeof(*mbox));
|
||||
sli4_params = &mbox->u.mqe.un.sli4_params;
|
||||
bf_set(lpfc_mqe_command, &mbox->u.mqe, MBX_PORT_CAPABILITIES);
|
||||
bf_set(cpn, sli4_params, LPFC_SLI4_PARAMETERS);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/*******************************************************************
|
||||
* This file is part of the Emulex Linux Device Driver for *
|
||||
* Fibre Channel Host Bus Adapters. *
|
||||
* Copyright (C) 2017-2018 Broadcom. All Rights Reserved. The term *
|
||||
* Copyright (C) 2017-2020 Broadcom. All Rights Reserved. The term *
|
||||
* “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. *
|
||||
* Copyright (C) 2004-2014 Emulex. All rights reserved. *
|
||||
* EMULEX and SLI are trademarks of Emulex. *
|
||||
|
|
@ -30,9 +30,11 @@
|
|||
#include <scsi/scsi_device.h>
|
||||
#include <scsi/scsi_transport_fc.h>
|
||||
#include <scsi/fc/fc_fs.h>
|
||||
|
||||
#if defined(BUILD_NVME)
|
||||
#if (IS_ENABLED(CONFIG_NVME_FC))
|
||||
#include <linux/nvme-fc-driver.h>
|
||||
|
||||
#endif
|
||||
#endif
|
||||
#include "lpfc_hw4.h"
|
||||
#include "lpfc_hw.h"
|
||||
#include "lpfc_sli.h"
|
||||
|
|
@ -49,6 +51,8 @@
|
|||
#define LPFC_MBUF_POOL_SIZE 64 /* max elements in MBUF safety pool */
|
||||
#define LPFC_MEM_POOL_SIZE 64 /* max elem in non-DMA safety pool */
|
||||
#define LPFC_DEVICE_DATA_POOL_SIZE 64 /* max elements in device data pool */
|
||||
#define LPFC_RRQ_POOL_SIZE 256 /* max elements in non-DMA pool */
|
||||
#define LPFC_MBX_POOL_SIZE 256 /* max elements in MBX non-DMA pool */
|
||||
|
||||
int
|
||||
lpfc_mem_alloc_active_rrq_pool_s4(struct lpfc_hba *phba) {
|
||||
|
|
@ -89,16 +93,14 @@ lpfc_mem_alloc(struct lpfc_hba *phba, int align)
|
|||
struct lpfc_dma_pool *pool = &phba->lpfc_mbuf_safety_pool;
|
||||
int i;
|
||||
|
||||
|
||||
phba->lpfc_mbuf_pool = dma_pool_create("lpfc_mbuf_pool", &phba->pcidev->dev,
|
||||
LPFC_BPL_SIZE,
|
||||
align, 0);
|
||||
if (!phba->lpfc_mbuf_pool)
|
||||
goto fail;
|
||||
|
||||
pool->elements = kmalloc_array(LPFC_MBUF_POOL_SIZE,
|
||||
sizeof(struct lpfc_dmabuf),
|
||||
GFP_KERNEL);
|
||||
pool->elements = kmalloc(sizeof(struct lpfc_dmabuf) *
|
||||
LPFC_MBUF_POOL_SIZE, GFP_KERNEL);
|
||||
if (!pool->elements)
|
||||
goto fail_free_lpfc_mbuf_pool;
|
||||
|
||||
|
|
@ -113,8 +115,8 @@ lpfc_mem_alloc(struct lpfc_hba *phba, int align)
|
|||
pool->current_count++;
|
||||
}
|
||||
|
||||
phba->mbox_mem_pool = mempool_create_kmalloc_pool(LPFC_MEM_POOL_SIZE,
|
||||
sizeof(LPFC_MBOXQ_t));
|
||||
phba->mbox_mem_pool = mempool_create_kmalloc_pool(LPFC_MBX_POOL_SIZE,
|
||||
sizeof(LPFC_MBOXQ_t));
|
||||
if (!phba->mbox_mem_pool)
|
||||
goto fail_free_mbuf_pool;
|
||||
|
||||
|
|
@ -125,7 +127,7 @@ lpfc_mem_alloc(struct lpfc_hba *phba, int align)
|
|||
|
||||
if (phba->sli_rev == LPFC_SLI_REV4) {
|
||||
phba->rrq_pool =
|
||||
mempool_create_kmalloc_pool(LPFC_MEM_POOL_SIZE,
|
||||
mempool_create_kmalloc_pool(LPFC_RRQ_POOL_SIZE,
|
||||
sizeof(struct lpfc_node_rrq));
|
||||
if (!phba->rrq_pool)
|
||||
goto fail_free_nlp_mem_pool;
|
||||
|
|
@ -230,9 +232,6 @@ lpfc_mem_free(struct lpfc_hba *phba)
|
|||
dma_pool_destroy(phba->lpfc_hrb_pool);
|
||||
phba->lpfc_hrb_pool = NULL;
|
||||
|
||||
dma_pool_destroy(phba->txrdy_payload_pool);
|
||||
phba->txrdy_payload_pool = NULL;
|
||||
|
||||
dma_pool_destroy(phba->lpfc_hbq_pool);
|
||||
phba->lpfc_hbq_pool = NULL;
|
||||
|
||||
|
|
@ -240,7 +239,8 @@ lpfc_mem_free(struct lpfc_hba *phba)
|
|||
phba->rrq_pool = NULL;
|
||||
|
||||
/* Free NLP memory pool */
|
||||
mempool_destroy(phba->nlp_mem_pool);
|
||||
if (phba->nlp_mem_pool)
|
||||
mempool_destroy(phba->nlp_mem_pool);
|
||||
phba->nlp_mem_pool = NULL;
|
||||
if (phba->sli_rev == LPFC_SLI_REV4 && phba->active_rrq_pool) {
|
||||
mempool_destroy(phba->active_rrq_pool);
|
||||
|
|
@ -248,7 +248,8 @@ lpfc_mem_free(struct lpfc_hba *phba)
|
|||
}
|
||||
|
||||
/* Free mbox memory pool */
|
||||
mempool_destroy(phba->mbox_mem_pool);
|
||||
if (phba->mbox_mem_pool)
|
||||
mempool_destroy(phba->mbox_mem_pool);
|
||||
phba->mbox_mem_pool = NULL;
|
||||
|
||||
/* Free MBUF memory pool */
|
||||
|
|
@ -339,6 +340,19 @@ lpfc_mem_free_all(struct lpfc_hba *phba)
|
|||
dma_pool_destroy(phba->lpfc_cmd_rsp_buf_pool);
|
||||
phba->lpfc_cmd_rsp_buf_pool = NULL;
|
||||
|
||||
/* Free Congestion Data buffer */
|
||||
if (phba->cgn_i) {
|
||||
dma_free_coherent(&phba->pcidev->dev,
|
||||
sizeof(struct lpfc_cgn_info),
|
||||
phba->cgn_i->virt, phba->cgn_i->phys);
|
||||
kfree(phba->cgn_i);
|
||||
phba->cgn_i = NULL;
|
||||
}
|
||||
|
||||
/* Free RX table */
|
||||
kfree(phba->rxtable);
|
||||
phba->rxtable = NULL;
|
||||
|
||||
/* Free the iocb lookup array */
|
||||
kfree(psli->iocbq_lookup);
|
||||
psli->iocbq_lookup = NULL;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/*******************************************************************
|
||||
* This file is part of the Emulex Linux Device Driver for *
|
||||
* Fibre Channel Host Bus Adapters. *
|
||||
* Copyright (C) 2017-2018 Broadcom. All Rights Reserved. The term *
|
||||
* Copyright (C) 2017 Broadcom. All Rights Reserved. The term *
|
||||
* “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. *
|
||||
* Copyright (C) 2010 Emulex. All rights reserved. *
|
||||
* EMULEX and SLI are trademarks of Emulex. *
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/*******************************************************************
|
||||
* This file is part of the Emulex Linux Device Driver for *
|
||||
* Fibre Channel Host Bus Adapters. *
|
||||
* Copyright (C) 2017-2019 Broadcom. All Rights Reserved. The term *
|
||||
* Copyright (C) 2017-2021 Broadcom. All Rights Reserved. The term *
|
||||
* “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. *
|
||||
* Copyright (C) 2004-2016 Emulex. All rights reserved. *
|
||||
* EMULEX and SLI are trademarks of Emulex. *
|
||||
|
|
@ -31,8 +31,11 @@
|
|||
#include <scsi/scsi_host.h>
|
||||
#include <scsi/scsi_transport_fc.h>
|
||||
#include <scsi/fc/fc_fs.h>
|
||||
|
||||
#if defined(BUILD_NVME)
|
||||
#if (IS_ENABLED(CONFIG_NVME_FC))
|
||||
#include <linux/nvme-fc-driver.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "lpfc_hw4.h"
|
||||
#include "lpfc_hw.h"
|
||||
|
|
@ -154,7 +157,7 @@ lpfc_check_sparm(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
|
|||
memcpy(&ndlp->nlp_portname, &sp->portName, sizeof (struct lpfc_name));
|
||||
return 1;
|
||||
bad_service_param:
|
||||
lpfc_printf_vlog(vport, KERN_ERR, LOG_DISCOVERY,
|
||||
lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT,
|
||||
"0207 Device %x "
|
||||
"(%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x) sent "
|
||||
"invalid service parameters. Ignoring device.\n",
|
||||
|
|
@ -252,6 +255,8 @@ lpfc_els_abort(struct lpfc_hba *phba, struct lpfc_nodelist *ndlp)
|
|||
lpfc_sli_issue_abort_iotag(phba, pring, iocb);
|
||||
spin_unlock_irq(&phba->hbalock);
|
||||
}
|
||||
/* Make sure HBA is alive */
|
||||
lpfc_issue_hb_tmo(phba);
|
||||
|
||||
INIT_LIST_HEAD(&abort_list);
|
||||
|
||||
|
|
@ -286,7 +291,7 @@ lpfc_els_abort(struct lpfc_hba *phba, struct lpfc_nodelist *ndlp)
|
|||
* This routine is only called if we are SLI3, direct connect pt2pt
|
||||
* mode and the remote NPort issues the PLOGI after link up.
|
||||
*/
|
||||
static void
|
||||
void
|
||||
lpfc_defer_pt2pt_acc(struct lpfc_hba *phba, LPFC_MBOXQ_t *link_mbox)
|
||||
{
|
||||
LPFC_MBOXQ_t *login_mbox;
|
||||
|
|
@ -303,7 +308,7 @@ lpfc_defer_pt2pt_acc(struct lpfc_hba *phba, LPFC_MBOXQ_t *link_mbox)
|
|||
|
||||
/* Check for CONFIG_LINK error */
|
||||
if (mb->mbxStatus) {
|
||||
lpfc_printf_log(phba, KERN_ERR, LOG_DISCOVERY,
|
||||
lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT,
|
||||
"4575 CONFIG_LINK fails pt2pt discovery: %x\n",
|
||||
mb->mbxStatus);
|
||||
mempool_free(login_mbox, phba->mbox_mem_pool);
|
||||
|
|
@ -318,7 +323,7 @@ lpfc_defer_pt2pt_acc(struct lpfc_hba *phba, LPFC_MBOXQ_t *link_mbox)
|
|||
rc = lpfc_els_rsp_acc(link_mbox->vport, ELS_CMD_PLOGI,
|
||||
save_iocb, ndlp, login_mbox);
|
||||
if (rc) {
|
||||
lpfc_printf_log(phba, KERN_ERR, LOG_DISCOVERY,
|
||||
lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT,
|
||||
"4576 PLOGI ACC fails pt2pt discovery: %x\n",
|
||||
rc);
|
||||
mempool_free(login_mbox, phba->mbox_mem_pool);
|
||||
|
|
@ -340,7 +345,7 @@ lpfc_defer_pt2pt_acc(struct lpfc_hba *phba, LPFC_MBOXQ_t *link_mbox)
|
|||
* This routine is only called if we are SLI4, acting in target
|
||||
* mode and the remote NPort issues the PLOGI after link up.
|
||||
**/
|
||||
static void
|
||||
void
|
||||
lpfc_defer_acc_rsp(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb)
|
||||
{
|
||||
struct lpfc_vport *vport = pmb->vport;
|
||||
|
|
@ -363,7 +368,7 @@ lpfc_defer_acc_rsp(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb)
|
|||
lpfc_sli4_unreg_rpi_cmpl_clr(phba, pmb);
|
||||
|
||||
if (!piocb) {
|
||||
lpfc_printf_vlog(vport, KERN_ERR, LOG_DISCOVERY | LOG_ELS,
|
||||
lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT,
|
||||
"4578 PLOGI ACC fail\n");
|
||||
if (mbox)
|
||||
mempool_free(mbox, phba->mbox_mem_pool);
|
||||
|
|
@ -372,7 +377,7 @@ lpfc_defer_acc_rsp(struct lpfc_hba *phba, LPFC_MBOXQ_t *pmb)
|
|||
|
||||
rc = lpfc_els_rsp_acc(vport, ELS_CMD_PLOGI, piocb, ndlp, mbox);
|
||||
if (rc) {
|
||||
lpfc_printf_vlog(vport, KERN_ERR, LOG_DISCOVERY | LOG_ELS,
|
||||
lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT,
|
||||
"4579 PLOGI ACC fail %x\n", rc);
|
||||
if (mbox)
|
||||
mempool_free(mbox, phba->mbox_mem_pool);
|
||||
|
|
@ -407,7 +412,7 @@ lpfc_rcv_plogi(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
|
|||
lp = (uint32_t *) pcmd->virt;
|
||||
sp = (struct serv_parm *) ((uint8_t *) lp + sizeof (uint32_t));
|
||||
if (wwn_to_u64(sp->portName.u.wwn) == 0) {
|
||||
lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS,
|
||||
lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT,
|
||||
"0140 PLOGI Reject: invalid nname\n");
|
||||
stat.un.b.lsRjtRsnCode = LSRJT_UNABLE_TPC;
|
||||
stat.un.b.lsRjtRsnCodeExp = LSEXP_INVALID_PNAME;
|
||||
|
|
@ -416,7 +421,7 @@ lpfc_rcv_plogi(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
|
|||
return 0;
|
||||
}
|
||||
if (wwn_to_u64(sp->nodeName.u.wwn) == 0) {
|
||||
lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS,
|
||||
lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT,
|
||||
"0141 PLOGI Reject: invalid pname\n");
|
||||
stat.un.b.lsRjtRsnCode = LSRJT_UNABLE_TPC;
|
||||
stat.un.b.lsRjtRsnCodeExp = LSEXP_INVALID_NNAME;
|
||||
|
|
@ -477,13 +482,22 @@ lpfc_rcv_plogi(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
|
|||
*/
|
||||
if (!(ndlp->nlp_type & NLP_FABRIC) &&
|
||||
!(phba->nvmet_support)) {
|
||||
/* Clear ndlp info, since follow up PRLI may have
|
||||
* updated ndlp information
|
||||
*/
|
||||
ndlp->nlp_type &= ~(NLP_FCP_TARGET | NLP_FCP_INITIATOR);
|
||||
ndlp->nlp_type &= ~(NLP_NVME_TARGET | NLP_NVME_INITIATOR);
|
||||
ndlp->nlp_fcp_info &= ~NLP_FCP_2_DEVICE;
|
||||
ndlp->nlp_nvme_info &= ~NLP_NVME_NSLER;
|
||||
ndlp->nlp_flag &= ~NLP_FIRSTBURST;
|
||||
|
||||
lpfc_els_rsp_acc(vport, ELS_CMD_PLOGI, cmdiocb,
|
||||
ndlp, NULL);
|
||||
return 1;
|
||||
}
|
||||
if (nlp_portwwn != 0 &&
|
||||
nlp_portwwn != wwn_to_u64(sp->portName.u.wwn))
|
||||
lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS,
|
||||
lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT,
|
||||
"0143 PLOGI recv'd from DID: x%x "
|
||||
"WWPN changed: old %llx new %llx\n",
|
||||
ndlp->nlp_DID,
|
||||
|
|
@ -500,6 +514,7 @@ lpfc_rcv_plogi(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
|
|||
ndlp->nlp_type &= ~(NLP_FCP_TARGET | NLP_FCP_INITIATOR);
|
||||
ndlp->nlp_type &= ~(NLP_NVME_TARGET | NLP_NVME_INITIATOR);
|
||||
ndlp->nlp_fcp_info &= ~NLP_FCP_2_DEVICE;
|
||||
ndlp->nlp_nvme_info &= ~NLP_NVME_NSLER;
|
||||
ndlp->nlp_flag &= ~NLP_FIRSTBURST;
|
||||
|
||||
login_mbox = NULL;
|
||||
|
|
@ -686,7 +701,7 @@ lpfc_rcv_plogi(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
|
|||
return 1;
|
||||
out:
|
||||
if (defer_acc)
|
||||
lpfc_printf_log(phba, KERN_ERR, LOG_DISCOVERY,
|
||||
lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT,
|
||||
"4577 discovery failure: %p %p %p\n",
|
||||
save_iocb, link_mbox, login_mbox);
|
||||
kfree(save_iocb);
|
||||
|
|
@ -794,11 +809,17 @@ lpfc_rcv_padisc(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
|
|||
ndlp, NULL);
|
||||
}
|
||||
out:
|
||||
/* If we are authenticated, move to the proper state */
|
||||
if (ndlp->nlp_type & (NLP_FCP_TARGET | NLP_NVME_TARGET))
|
||||
lpfc_nlp_set_state(vport, ndlp, NLP_STE_MAPPED_NODE);
|
||||
else
|
||||
lpfc_nlp_set_state(vport, ndlp, NLP_STE_UNMAPPED_NODE);
|
||||
/* If we are authenticated, move to the proper state.
|
||||
* It is possible an ADISC arrived and the remote nport
|
||||
* is already in MAPPED or UNMAPPED state. Catch this
|
||||
* condition and don't set the nlp_state again because
|
||||
* it causes an unnecessary transport unregister/register.
|
||||
*/
|
||||
if (ndlp->nlp_type & (NLP_FCP_TARGET | NLP_NVME_TARGET)) {
|
||||
if (ndlp->nlp_state != NLP_STE_MAPPED_NODE)
|
||||
lpfc_nlp_set_state(vport, ndlp,
|
||||
NLP_STE_MAPPED_NODE);
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
|
@ -888,14 +909,9 @@ lpfc_rcv_logo(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
|
|||
}
|
||||
} else if ((!(ndlp->nlp_type & NLP_FABRIC) &&
|
||||
((ndlp->nlp_type & NLP_FCP_TARGET) ||
|
||||
(ndlp->nlp_type & NLP_NVME_TARGET) ||
|
||||
(vport->fc_flag & FC_PT2PT))) ||
|
||||
!(ndlp->nlp_type & NLP_FCP_INITIATOR))) ||
|
||||
(ndlp->nlp_state == NLP_STE_ADISC_ISSUE)) {
|
||||
/* Only try to re-login if this is NOT a Fabric Node
|
||||
* AND the remote NPORT is a FCP/NVME Target or we
|
||||
* are in pt2pt mode. NLP_STE_ADISC_ISSUE is a special
|
||||
* case for LOGO as a response to ADISC behavior.
|
||||
*/
|
||||
/* Only try to re-login if this is NOT a Fabric Node */
|
||||
mod_timer(&ndlp->nlp_delayfunc,
|
||||
jiffies + msecs_to_jiffies(1000 * 1));
|
||||
spin_lock_irq(shost->host_lock);
|
||||
|
|
@ -976,6 +992,7 @@ lpfc_rcv_prli(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
|
|||
ndlp->nlp_type |= NLP_FCP_INITIATOR;
|
||||
if (npr->prliType == PRLI_NVME_TYPE)
|
||||
ndlp->nlp_type |= NLP_NVME_INITIATOR;
|
||||
ndlp->nlp_flag &= ~NLP_EXTERNAL_DIF;
|
||||
}
|
||||
if (npr->targetFunc) {
|
||||
if (npr->prliType == PRLI_FCP_TYPE)
|
||||
|
|
@ -1037,9 +1054,9 @@ lpfc_disc_set_adisc(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp)
|
|||
|
||||
if (!(vport->fc_flag & FC_PT2PT)) {
|
||||
/* Check config parameter use-adisc or FCP-2 */
|
||||
if (vport->cfg_use_adisc && ((vport->fc_flag & FC_RSCN_MODE) ||
|
||||
if ((vport->cfg_use_adisc && (vport->fc_flag & FC_RSCN_MODE)) ||
|
||||
((ndlp->nlp_fcp_info & NLP_FCP_2_DEVICE) &&
|
||||
(ndlp->nlp_type & NLP_FCP_TARGET)))) {
|
||||
(ndlp->nlp_type & NLP_FCP_TARGET))) {
|
||||
spin_lock_irq(shost->host_lock);
|
||||
ndlp->nlp_flag |= NLP_NPR_ADISC;
|
||||
spin_unlock_irq(shost->host_lock);
|
||||
|
|
@ -1087,8 +1104,8 @@ lpfc_release_rpi(struct lpfc_hba *phba, struct lpfc_vport *vport,
|
|||
pmb = (LPFC_MBOXQ_t *) mempool_alloc(phba->mbox_mem_pool,
|
||||
GFP_KERNEL);
|
||||
if (!pmb)
|
||||
lpfc_printf_vlog(vport, KERN_ERR, LOG_MBOX,
|
||||
"2796 mailbox memory allocation failed \n");
|
||||
lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT,
|
||||
"2796 mailbox memory allocation failed \n");
|
||||
else {
|
||||
lpfc_unreg_login(phba, vport->vpi, rpi, pmb);
|
||||
pmb->mbox_cmpl = lpfc_sli_def_mbox_cmpl;
|
||||
|
|
@ -1126,7 +1143,7 @@ lpfc_disc_illegal(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
|
|||
rpi = pmb->u.mb.un.varWords[0];
|
||||
lpfc_release_rpi(phba, vport, ndlp, rpi);
|
||||
}
|
||||
lpfc_printf_vlog(vport, KERN_ERR, LOG_DISCOVERY,
|
||||
lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT,
|
||||
"0271 Illegal State Transition: node x%x "
|
||||
"event x%x, state x%x Data: x%x x%x\n",
|
||||
ndlp->nlp_DID, evt, ndlp->nlp_state, ndlp->nlp_rpi,
|
||||
|
|
@ -1144,11 +1161,11 @@ lpfc_cmpl_plogi_illegal(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
|
|||
* to stop it.
|
||||
*/
|
||||
if (!(ndlp->nlp_flag & NLP_RCV_PLOGI)) {
|
||||
lpfc_printf_vlog(vport, KERN_ERR, LOG_DISCOVERY,
|
||||
"0272 Illegal State Transition: node x%x "
|
||||
"event x%x, state x%x Data: x%x x%x\n",
|
||||
ndlp->nlp_DID, evt, ndlp->nlp_state, ndlp->nlp_rpi,
|
||||
ndlp->nlp_flag);
|
||||
lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT,
|
||||
"0272 Illegal State Transition: node x%x "
|
||||
"event x%x, state x%x Data: x%x x%x\n",
|
||||
ndlp->nlp_DID, evt, ndlp->nlp_state,
|
||||
ndlp->nlp_rpi, ndlp->nlp_flag);
|
||||
}
|
||||
return ndlp->nlp_state;
|
||||
}
|
||||
|
|
@ -1368,7 +1385,7 @@ lpfc_cmpl_plogi_plogi_issue(struct lpfc_vport *vport,
|
|||
if ((ndlp->nlp_DID != FDMI_DID) &&
|
||||
(wwn_to_u64(sp->portName.u.wwn) == 0 ||
|
||||
wwn_to_u64(sp->nodeName.u.wwn) == 0)) {
|
||||
lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS,
|
||||
lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT,
|
||||
"0142 PLOGI RSP: Invalid WWN.\n");
|
||||
goto out;
|
||||
}
|
||||
|
|
@ -1430,7 +1447,8 @@ lpfc_cmpl_plogi_plogi_issue(struct lpfc_vport *vport,
|
|||
} else {
|
||||
mbox = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL);
|
||||
if (!mbox) {
|
||||
lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS,
|
||||
lpfc_printf_vlog(vport, KERN_ERR,
|
||||
LOG_TRACE_EVENT,
|
||||
"0133 PLOGI: no memory "
|
||||
"for config_link "
|
||||
"Data: x%x x%x x%x x%x\n",
|
||||
|
|
@ -1455,7 +1473,7 @@ lpfc_cmpl_plogi_plogi_issue(struct lpfc_vport *vport,
|
|||
|
||||
mbox = mempool_alloc(phba->mbox_mem_pool, GFP_KERNEL);
|
||||
if (!mbox) {
|
||||
lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS,
|
||||
lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT,
|
||||
"0018 PLOGI: no memory for reg_login "
|
||||
"Data: x%x x%x x%x x%x\n",
|
||||
ndlp->nlp_DID, ndlp->nlp_state,
|
||||
|
|
@ -1495,7 +1513,7 @@ lpfc_cmpl_plogi_plogi_issue(struct lpfc_vport *vport,
|
|||
kfree(mp);
|
||||
mempool_free(mbox, phba->mbox_mem_pool);
|
||||
|
||||
lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS,
|
||||
lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT,
|
||||
"0134 PLOGI: cannot issue reg_login "
|
||||
"Data: x%x x%x x%x x%x\n",
|
||||
ndlp->nlp_DID, ndlp->nlp_state,
|
||||
|
|
@ -1503,7 +1521,7 @@ lpfc_cmpl_plogi_plogi_issue(struct lpfc_vport *vport,
|
|||
} else {
|
||||
mempool_free(mbox, phba->mbox_mem_pool);
|
||||
|
||||
lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS,
|
||||
lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT,
|
||||
"0135 PLOGI: cannot format reg_login "
|
||||
"Data: x%x x%x x%x x%x\n",
|
||||
ndlp->nlp_DID, ndlp->nlp_state,
|
||||
|
|
@ -1514,7 +1532,7 @@ lpfc_cmpl_plogi_plogi_issue(struct lpfc_vport *vport,
|
|||
out:
|
||||
if (ndlp->nlp_DID == NameServer_DID) {
|
||||
lpfc_vport_set_state(vport, FC_VPORT_FAILED);
|
||||
lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS,
|
||||
lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT,
|
||||
"0261 Cannot Register NameServer login\n");
|
||||
}
|
||||
|
||||
|
|
@ -1733,7 +1751,13 @@ lpfc_cmpl_adisc_adisc_issue(struct lpfc_vport *vport,
|
|||
}
|
||||
}
|
||||
|
||||
if (ndlp->nlp_type & NLP_FCP_TARGET) {
|
||||
if (ndlp->nlp_type & NLP_FCP_TARGET)
|
||||
ndlp->nlp_fc4_type |= NLP_FC4_FCP;
|
||||
|
||||
if (ndlp->nlp_type & NLP_NVME_TARGET)
|
||||
ndlp->nlp_fc4_type |= NLP_FC4_NVME;
|
||||
|
||||
if (ndlp->nlp_type & (NLP_FCP_TARGET | NLP_NVME_TARGET)) {
|
||||
ndlp->nlp_prev_state = NLP_STE_ADISC_ISSUE;
|
||||
lpfc_nlp_set_state(vport, ndlp, NLP_STE_MAPPED_NODE);
|
||||
} else {
|
||||
|
|
@ -1936,8 +1960,8 @@ lpfc_cmpl_reglogin_reglogin_issue(struct lpfc_vport *vport,
|
|||
|
||||
if (mb->mbxStatus) {
|
||||
/* RegLogin failed */
|
||||
lpfc_printf_vlog(vport, KERN_ERR, LOG_DISCOVERY,
|
||||
"0246 RegLogin failed Data: x%x x%x x%x x%x "
|
||||
lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT,
|
||||
"0246 RegLogin failed Data: x%x x%x x%x x%x "
|
||||
"x%x\n",
|
||||
did, mb->mbxStatus, vport->port_state,
|
||||
mb->un.varRegLogin.vpi,
|
||||
|
|
@ -1961,6 +1985,8 @@ lpfc_cmpl_reglogin_reglogin_issue(struct lpfc_vport *vport,
|
|||
ndlp->nlp_last_elscmd = ELS_CMD_PLOGI;
|
||||
|
||||
lpfc_issue_els_logo(vport, ndlp, 0);
|
||||
ndlp->nlp_prev_state = NLP_STE_REG_LOGIN_ISSUE;
|
||||
lpfc_nlp_set_state(vport, ndlp, NLP_STE_NPR_NODE);
|
||||
return ndlp->nlp_state;
|
||||
}
|
||||
|
||||
|
|
@ -2018,8 +2044,10 @@ lpfc_cmpl_reglogin_reglogin_issue(struct lpfc_vport *vport,
|
|||
lpfc_nlp_set_state(vport, ndlp, NLP_STE_NPR_NODE);
|
||||
}
|
||||
} else {
|
||||
#if defined(BUILD_NVME) && (IS_ENABLED(CONFIG_NVME_TARGET_FC))
|
||||
if ((vport->fc_flag & FC_PT2PT) && phba->nvmet_support)
|
||||
phba->targetport->port_id = vport->fc_myDID;
|
||||
#endif
|
||||
|
||||
/* Only Fabric ports should transition. NVME target
|
||||
* must complete PRLI.
|
||||
|
|
@ -2102,6 +2130,7 @@ lpfc_rcv_prli_prli_issue(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
|
|||
|
||||
if (!lpfc_rcv_prli_support_check(vport, ndlp, cmdiocb))
|
||||
return ndlp->nlp_state;
|
||||
lpfc_rcv_prli(vport, ndlp, cmdiocb);
|
||||
lpfc_els_rsp_prli_acc(vport, cmdiocb, ndlp);
|
||||
return ndlp->nlp_state;
|
||||
}
|
||||
|
|
@ -2154,7 +2183,9 @@ lpfc_cmpl_prli_prli_issue(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
|
|||
IOCB_t *irsp;
|
||||
PRLI *npr;
|
||||
struct lpfc_nvme_prli *nvpr;
|
||||
struct lpfc_scsi_io_req cmd_req;
|
||||
void *temp_ptr;
|
||||
int ret = 0;
|
||||
|
||||
cmdiocb = (struct lpfc_iocbq *) arg;
|
||||
rspiocb = cmdiocb->context_un.rsp_iocb;
|
||||
|
|
@ -2194,16 +2225,28 @@ lpfc_cmpl_prli_prli_issue(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
|
|||
"6028 FCP NPR PRLI Cmpl Init %d Target %d\n",
|
||||
npr->initiatorFunc,
|
||||
npr->targetFunc);
|
||||
if (npr->initiatorFunc)
|
||||
|
||||
if (npr->initiatorFunc) {
|
||||
ndlp->nlp_type |= NLP_FCP_INITIATOR;
|
||||
ndlp->nlp_flag &= ~NLP_EXTERNAL_DIF;
|
||||
}
|
||||
if (npr->targetFunc) {
|
||||
ndlp->nlp_type |= NLP_FCP_TARGET;
|
||||
if (npr->writeXferRdyDis)
|
||||
if (npr->writeXferRdyDis) {
|
||||
ndlp->nlp_flag |= NLP_FIRSTBURST;
|
||||
cmd_req.cmd_id = MODE_SENSE;
|
||||
cmd_req.dev_id = CTRL_ID;
|
||||
cmd_req.cmd_cmpl = lpfc_mode_sense_cmpl;
|
||||
ret = lpfc_issue_scsi_cmd(vport, ndlp,
|
||||
&cmd_req);
|
||||
lpfc_printf_vlog(vport, KERN_INFO,
|
||||
LOG_FCP | LOG_FCP_ERROR,
|
||||
"6334 FB issue returns %d\n",
|
||||
ret);
|
||||
}
|
||||
}
|
||||
if (npr->Retry)
|
||||
ndlp->nlp_fcp_info |= NLP_FCP_2_DEVICE;
|
||||
|
||||
} else if (nvpr &&
|
||||
(bf_get_be32(prli_acc_rsp_code, nvpr) ==
|
||||
PRLI_REQ_EXECUTED) &&
|
||||
|
|
@ -2214,7 +2257,9 @@ lpfc_cmpl_prli_prli_issue(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
|
|||
if (bf_get_be32(prli_init, nvpr))
|
||||
ndlp->nlp_type |= NLP_NVME_INITIATOR;
|
||||
|
||||
if (phba->nsler && bf_get_be32(prli_nsler, nvpr))
|
||||
if (phba->nsler && bf_get_be32(prli_nsler, nvpr) &&
|
||||
bf_get_be32(prli_conf, nvpr))
|
||||
|
||||
ndlp->nlp_nvme_info |= NLP_NVME_NSLER;
|
||||
else
|
||||
ndlp->nlp_nvme_info &= ~NLP_NVME_NSLER;
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,8 +1,8 @@
|
|||
/*******************************************************************
|
||||
* This file is part of the Emulex Linux Device Driver for *
|
||||
* Fibre Channel Host Bus Adapters. *
|
||||
* Copyright (C) 2017-2019 Broadcom. All Rights Reserved. The term *
|
||||
* “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. *
|
||||
* Copyright (C) 2017-2020 Broadcom. All Rights Reserved. The term *
|
||||
* “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. *
|
||||
* Copyright (C) 2004-2016 Emulex. All rights reserved. *
|
||||
* EMULEX and SLI are trademarks of Emulex. *
|
||||
* www.broadcom.com *
|
||||
|
|
@ -21,7 +21,16 @@
|
|||
* included with this package. *
|
||||
********************************************************************/
|
||||
|
||||
#define LPFC_NVME_DEFAULT_SEGS (64 + 1) /* 256K IOs */
|
||||
#if !defined(BUILD_NVME)
|
||||
#define FC_TYPE_NVME 0x28
|
||||
#endif
|
||||
|
||||
#define LPFC_NVME_MIN_SEGS 16
|
||||
#define LPFC_NVME_DEFAULT_SEGS 66 /* 256K IOs - 64 + 2 */
|
||||
#define LPFC_NVME_MAX_SEGS 510
|
||||
#define LPFC_NVMET_MIN_POSTBUF 16
|
||||
#define LPFC_NVMET_DEFAULT_POSTBUF 1024
|
||||
#define LPFC_NVMET_MAX_POSTBUF 4096
|
||||
|
||||
#define LPFC_NVME_ERSP_LEN 0x20
|
||||
|
||||
|
|
@ -30,14 +39,12 @@
|
|||
#define LPFC_NVME_FB_SHIFT 9
|
||||
#define LPFC_NVME_MAX_FB (1 << 20) /* 1M */
|
||||
|
||||
#define LPFC_MAX_NVME_INFO_TMP_LEN 100
|
||||
#define LPFC_NVME_INFO_MORE_STR "\nCould be more info...\n"
|
||||
|
||||
#define lpfc_ndlp_get_nrport(ndlp) \
|
||||
((!ndlp->nrport || (ndlp->upcall_flags & NLP_WAIT_FOR_UNREG)) \
|
||||
? NULL : ndlp->nrport)
|
||||
|
||||
struct lpfc_nvme_qhandle {
|
||||
struct list_head list; /* list entry to maintain qhandle list */
|
||||
uint32_t index; /* WQ index to use */
|
||||
uint32_t qidx; /* queue index passed to create */
|
||||
uint32_t cpu_id; /* current cpu id at time of create */
|
||||
|
|
@ -62,6 +69,9 @@ struct lpfc_nvme_lport {
|
|||
atomic_t cmpl_fcp_err;
|
||||
atomic_t cmpl_ls_xb;
|
||||
atomic_t cmpl_ls_err;
|
||||
/* Maintaining qhandle list */
|
||||
struct list_head qhandle_list;
|
||||
spinlock_t qhandle_list_lock;
|
||||
};
|
||||
|
||||
struct lpfc_nvme_rport {
|
||||
|
|
@ -73,4 +83,13 @@ struct lpfc_nvme_rport {
|
|||
|
||||
struct lpfc_nvme_fcpreq_priv {
|
||||
struct lpfc_io_buf *nvme_buf;
|
||||
|
||||
/* Used for pending IO */
|
||||
struct list_head nvme_pend_list;
|
||||
struct list_head nvme_abts_pend_list;
|
||||
struct nvme_fc_local_port *pnvme_lport;
|
||||
struct nvme_fc_remote_port *pnvme_rport;
|
||||
void *hw_queue_handle;
|
||||
struct nvmefc_fcp_req *pnvme_fcreq;
|
||||
uint32_t status;
|
||||
};
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,7 +1,7 @@
|
|||
/*******************************************************************
|
||||
* This file is part of the Emulex Linux Device Driver for *
|
||||
* Fibre Channel Host Bus Adapters. *
|
||||
* Copyright (C) 2017-2019 Broadcom. All Rights Reserved. The term *
|
||||
* Copyright (C) 2017-2021 Broadcom. All Rights Reserved. The term *
|
||||
* “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. *
|
||||
* Copyright (C) 2004-2016 Emulex. All rights reserved. *
|
||||
* EMULEX and SLI are trademarks of Emulex. *
|
||||
|
|
@ -21,7 +21,9 @@
|
|||
* included with this package. *
|
||||
********************************************************************/
|
||||
|
||||
#define LPFC_NVMET_DEFAULT_SEGS (64 + 1) /* 256K IOs */
|
||||
#define LPFC_NVMET_MIN_SEGS 16
|
||||
#define LPFC_NVMET_DEFAULT_SEGS 64 /* 256K IOs */
|
||||
#define LPFC_NVMET_MAX_SEGS 510
|
||||
#define LPFC_NVMET_RQE_MIN_POST 128
|
||||
#define LPFC_NVMET_RQE_DEF_POST 512
|
||||
#define LPFC_NVMET_RQE_DEF_COUNT 2048
|
||||
|
|
@ -90,31 +92,22 @@ struct lpfc_nvmet_tgtport {
|
|||
atomic_t defer_wqfull;
|
||||
};
|
||||
|
||||
struct lpfc_nvmet_ctx_info {
|
||||
struct list_head nvmet_ctx_list;
|
||||
spinlock_t nvmet_ctx_list_lock; /* lock per CPU */
|
||||
struct lpfc_nvmet_ctx_info *nvmet_ctx_next_cpu;
|
||||
struct lpfc_nvmet_ctx_info *nvmet_ctx_start_cpu;
|
||||
uint16_t nvmet_ctx_list_cnt;
|
||||
char pad[16]; /* pad to a cache-line */
|
||||
};
|
||||
|
||||
/* This retrieves the context info associated with the specified cpu / mrq */
|
||||
#define lpfc_get_ctx_list(phba, cpu, mrq) \
|
||||
(phba->sli4_hba.nvmet_ctx_info + ((cpu * phba->cfg_nvmet_mrq) + mrq))
|
||||
|
||||
struct lpfc_nvmet_rcv_ctx {
|
||||
#if defined(BUILD_NVME) && (IS_ENABLED(CONFIG_NVME_FC))
|
||||
union {
|
||||
#if defined(BUILD_NVME_PLUS)
|
||||
struct nvmefc_ls_rsp ls_req;
|
||||
#else
|
||||
struct nvmefc_tgt_ls_req ls_req;
|
||||
#endif
|
||||
struct nvmefc_tgt_fcp_req fcp_req;
|
||||
} ctx;
|
||||
#endif
|
||||
struct list_head list;
|
||||
struct lpfc_hba *phba;
|
||||
struct lpfc_iocbq *wqeq;
|
||||
struct lpfc_iocbq *abort_wqeq;
|
||||
dma_addr_t txrdy_phys;
|
||||
spinlock_t ctxlock; /* protect flag access */
|
||||
uint32_t *txrdy;
|
||||
uint32_t sid;
|
||||
uint32_t offset;
|
||||
uint16_t oxid;
|
||||
|
|
@ -158,3 +151,17 @@ struct lpfc_nvmet_rcv_ctx {
|
|||
uint64_t ts_status_nvme;
|
||||
#endif
|
||||
};
|
||||
|
||||
struct lpfc_nvmet_ctx_info {
|
||||
struct list_head nvmet_ctx_list;
|
||||
spinlock_t nvmet_ctx_list_lock; /* lock per CPU */
|
||||
struct lpfc_nvmet_ctx_info *nvmet_ctx_next_cpu;
|
||||
struct lpfc_nvmet_ctx_info *nvmet_ctx_start_cpu;
|
||||
uint16_t nvmet_ctx_list_cnt;
|
||||
char pad[16]; /* pad to a cache-line */
|
||||
};
|
||||
|
||||
/* This retrieves the context info associated with the specified cpu / mrq */
|
||||
#define lpfc_get_ctx_list(phba, cpu, mrq) \
|
||||
(phba->sli4_hba.nvmet_ctx_info + ((cpu * phba->cfg_nvmet_mrq) + mrq))
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -2,7 +2,7 @@
|
|||
* This file is part of the Emulex Linux Device Driver for *
|
||||
* Fibre Channel Host Bus Adapters. *
|
||||
* Copyright (C) 2017-2019 Broadcom. All Rights Reserved. The term *
|
||||
* “Broadcom” refers to Broadcom Inc and/or its subsidiaries. *
|
||||
* “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. *
|
||||
* Copyright (C) 2004-2016 Emulex. All rights reserved. *
|
||||
* EMULEX and SLI are trademarks of Emulex. *
|
||||
* www.broadcom.com *
|
||||
|
|
@ -24,6 +24,9 @@
|
|||
|
||||
struct lpfc_hba;
|
||||
#define LPFC_FCP_CDB_LEN 16
|
||||
#define CTRL_ID 0
|
||||
#define LPFC_DATA_SIZE 255
|
||||
#define LPFC_FCP_FB_MAX 65536
|
||||
|
||||
#define list_remove_head(list, entry, type, member) \
|
||||
do { \
|
||||
|
|
@ -130,6 +133,28 @@ struct lpfc_scsicmd_bkt {
|
|||
uint32_t cmd_count;
|
||||
};
|
||||
|
||||
struct lpfc_scsi_io_req {
|
||||
u32 dev_id;
|
||||
u32 cmd_id;
|
||||
void (*cmd_cmpl)(struct lpfc_hba *phba, struct lpfc_iocbq *p_io_in,
|
||||
struct lpfc_iocbq *p_io_out);
|
||||
};
|
||||
|
||||
struct lpfc_first_burst_page {
|
||||
u8 page_code;
|
||||
u8 page_len;
|
||||
u8 buf_full_r;
|
||||
u8 buf_mt_r;
|
||||
__be16 bus_inact_lmt;
|
||||
__be16 disc_tmo;
|
||||
__be16 conn_tmo;
|
||||
__be16 max_burst;
|
||||
u8 byte12;
|
||||
u8 rsvd;
|
||||
__be16 first_burst;
|
||||
};
|
||||
|
||||
#define LPFC_RETRY_PAUSE 300
|
||||
#define LPFC_SCSI_DMA_EXT_SIZE 264
|
||||
#define LPFC_BPL_SIZE 1024
|
||||
#define MDAC_DIRECT_CMD 0x22
|
||||
|
|
@ -138,12 +163,65 @@ struct lpfc_scsicmd_bkt {
|
|||
#define NO_MORE_OAS_LUN -1
|
||||
#define NOT_OAS_ENABLED_LUN NO_MORE_OAS_LUN
|
||||
|
||||
#ifndef WRITE_SAME_16
|
||||
#define WRITE_SAME_16 0x93
|
||||
#endif
|
||||
|
||||
#ifndef VERIFY_12
|
||||
#define VERIFY_12 0xaf
|
||||
#endif
|
||||
|
||||
/* ASC/ASCQ codes used in driver */
|
||||
#define LPFC_ASC_DIF_ERR 0x10
|
||||
#define LPFC_ASCQ_GUARD_CHECK 0x1
|
||||
#define LPFC_ASCQ_REFTAG_CHECK 0x3
|
||||
#define LPFC_ASC_TARGET_CHANGED 0x3f
|
||||
#define LPFC_ASCQ_INQUIRY_DATA 0x3
|
||||
#define LPFC_ASC_DATA_PHASE_ERR 0x4b
|
||||
#define LPFC_ASCQ_EDIF_MODE 0x82
|
||||
|
||||
/* This macro is available from RHEL 7.1 onwards. */
|
||||
#ifndef FC_PORTSPEED_32GBIT
|
||||
#define FC_PORTSPEED_32GBIT 0x40
|
||||
#endif
|
||||
|
||||
#ifndef FC_PORTSPEED_64GBIT
|
||||
#define FC_PORTSPEED_64GBIT 0x1000
|
||||
#endif
|
||||
|
||||
#ifndef FC_PORTSPEED_25GBIT
|
||||
#define FC_PORTSPEED_25GBIT 0x800
|
||||
#endif
|
||||
|
||||
#ifndef FC_PORTSPEED_40GBIT
|
||||
#define FC_PORTSPEED_40GBIT 0x100
|
||||
#endif
|
||||
|
||||
#ifndef FC_PORTSPEED_100GBIT
|
||||
#define FC_PORTSPEED_100GBIT 0x400
|
||||
#endif
|
||||
|
||||
#ifndef FC_PORTSPEED_128GBIT
|
||||
#define FC_PORTSPEED_128GBIT 0x2000
|
||||
#endif
|
||||
|
||||
#define TXRDY_PAYLOAD_LEN 12
|
||||
|
||||
/* Safe command codes for scanning, excluding group code */
|
||||
#define LPFC_INQUIRY_CMD_CODE (INQUIRY & 0x1f)
|
||||
#define LPFC_LOG_SELECT_CMD_CODE (LOG_SELECT & 0x1f)
|
||||
#define LPFC_LOG_SENSE_CMD_CODE (LOG_SENSE & 0x1f)
|
||||
#define LPFC_MODE_SELECT_CMD_CODE (MODE_SELECT & 0x1f)
|
||||
#define LPFC_MODE_SENSE_CMD_CODE (MODE_SENSE & 0x1f)
|
||||
#define LPFC_REPORT_LUNS_CMD_CODE (REPORT_LUNS & 0x1f)
|
||||
#define LPFC_SEND_DIAGNOSTIC_CMD_CODE (SEND_DIAGNOSTIC & 0x1f)
|
||||
#define LPFC_MAINTENANCE_IN_CMD_CODE (MAINTENANCE_IN & 0x1f)
|
||||
#define LPFC_MAINTENANCE_OUT_CMD_CODE (MAINTENANCE_OUT & 0x1f)
|
||||
#define LPFC_PERSISTENT_RESERVE_IN_CMD_CODE (PERSISTENT_RESERVE_IN & 0x1f)
|
||||
#define LPFC_PERSISTENT_RESERVE_OUT_CMD_CODE (PERSISTENT_RESERVE_OUT & 0x1f)
|
||||
#define LPFC_READ_BUFFER_CMD_CODE (READ_BUFFER & 0x1f)
|
||||
#define LPFC_WRITE_BUFFER_CMD_CODE (WRITE_BUFFER & 0x1f)
|
||||
|
||||
/* For sysfs/debugfs tmp string max len */
|
||||
#define LPFC_MAX_SCSI_INFO_TMP_LEN 79
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,7 +1,7 @@
|
|||
/*******************************************************************
|
||||
* This file is part of the Emulex Linux Device Driver for *
|
||||
* Fibre Channel Host Bus Adapters. *
|
||||
* Copyright (C) 2017-2019 Broadcom. All Rights Reserved. The term *
|
||||
* Copyright (C) 2017-2020 Broadcom. All Rights Reserved. The term *
|
||||
* “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. *
|
||||
* Copyright (C) 2004-2016 Emulex. All rights reserved. *
|
||||
* EMULEX and SLI are trademarks of Emulex. *
|
||||
|
|
@ -95,11 +95,15 @@ struct lpfc_iocbq {
|
|||
#define LPFC_IO_OAS 0x10000 /* OAS FCP IO */
|
||||
#define LPFC_IO_FOF 0x20000 /* FOF FCP IO */
|
||||
#define LPFC_IO_LOOPBACK 0x40000 /* Loopback IO */
|
||||
#define LPFC_IO_DRVR_INIT 0x80000000 /* Driver initiated SCSI cmd */
|
||||
#define LPFC_PRLI_NVME_REQ 0x80000 /* This is an NVME PRLI. */
|
||||
#define LPFC_PRLI_FCP_REQ 0x100000 /* This is an NVME PRLI. */
|
||||
#define LPFC_IO_NVME 0x200000 /* NVME FCP command */
|
||||
#define LPFC_IO_NVME_LS 0x400000 /* NVME LS command */
|
||||
#define LPFC_IO_NVMET 0x800000 /* NVMET command */
|
||||
#define LPFC_IO_RAW 0x1000000 /* Raw ELS command */
|
||||
#define LPFC_IO_CMF 0x2000000 /* CMF command */
|
||||
#define LPFC_IO_DRVR_INIT 0x80000000
|
||||
|
||||
uint32_t drvrTimeout; /* driver timeout in seconds */
|
||||
struct lpfc_vport *vport;/* virtual port pointer */
|
||||
|
|
@ -130,6 +134,7 @@ struct lpfc_iocbq {
|
|||
#define IOCB_BUSY 1
|
||||
#define IOCB_ERROR 2
|
||||
#define IOCB_TIMEDOUT 3
|
||||
#define IOCB_ABORTED 4
|
||||
|
||||
#define SLI_WQE_RET_WQE 1 /* Return WQE if cmd ring full */
|
||||
|
||||
|
|
@ -348,7 +353,7 @@ struct lpfc_sli {
|
|||
struct lpfc_iocbq ** iocbq_lookup; /* array to lookup IOCB by IOTAG */
|
||||
size_t iocbq_lookup_len; /* current lengs of the array */
|
||||
uint16_t last_iotag; /* last allocated IOTAG */
|
||||
time64_t stats_start; /* in seconds */
|
||||
unsigned long stats_start; /* in seconds */
|
||||
struct lpfc_lnk_stat lnk_stat_offsets;
|
||||
};
|
||||
|
||||
|
|
@ -411,6 +416,10 @@ struct lpfc_io_buf {
|
|||
* protection data
|
||||
*/
|
||||
|
||||
void *edifp; /* External DIF information
|
||||
* for IO
|
||||
*/
|
||||
|
||||
/*
|
||||
* data and dma_handle are the kernel virtual and bus
|
||||
* address of the dma-able buffer containing the
|
||||
|
|
@ -439,6 +448,7 @@ struct lpfc_io_buf {
|
|||
struct {
|
||||
struct nvmefc_fcp_req *nvmeCmd;
|
||||
uint16_t qidx;
|
||||
|
||||
};
|
||||
};
|
||||
#ifdef CONFIG_SCSI_LPFC_DEBUG_FS
|
||||
|
|
@ -446,6 +456,7 @@ struct lpfc_io_buf {
|
|||
uint64_t ts_last_cmd;
|
||||
uint64_t ts_cmd_wqput;
|
||||
uint64_t ts_isr_cmpl;
|
||||
uint64_t ts_data_nvme;
|
||||
uint64_t ts_data_io;
|
||||
#endif
|
||||
uint64_t rx_cmd_start;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/*******************************************************************
|
||||
* This file is part of the Emulex Linux Device Driver for *
|
||||
* Fibre Channel Host Bus Adapters. *
|
||||
* Copyright (C) 2017-2019 Broadcom. All Rights Reserved. The term *
|
||||
* Copyright (C) 2017-2020 Broadcom. All Rights Reserved. The term *
|
||||
* “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. *
|
||||
* Copyright (C) 2009-2016 Emulex. All rights reserved. *
|
||||
* EMULEX and SLI are trademarks of Emulex. *
|
||||
|
|
@ -20,6 +20,9 @@
|
|||
* included with this package. *
|
||||
*******************************************************************/
|
||||
|
||||
#include <linux/irq_poll.h>
|
||||
#include <linux/cpufreq.h>
|
||||
|
||||
#if defined(CONFIG_DEBUG_FS) && !defined(CONFIG_SCSI_LPFC_DEBUG_FS)
|
||||
#define CONFIG_SCSI_LPFC_DEBUG_FS
|
||||
#endif
|
||||
|
|
@ -41,10 +44,16 @@
|
|||
|
||||
/* Multi-queue arrangement for FCP EQ/CQ/WQ tuples */
|
||||
#define LPFC_HBA_HDWQ_MIN 0
|
||||
#define LPFC_HBA_HDWQ_MAX 128
|
||||
#define LPFC_HBA_HDWQ_DEF 0
|
||||
#define LPFC_HBA_HDWQ_MAX 256
|
||||
#define LPFC_HBA_HDWQ_DEF LPFC_HBA_HDWQ_MIN
|
||||
|
||||
/* irq_chann range, values */
|
||||
#define LPFC_IRQ_CHANN_MIN 0
|
||||
#define LPFC_IRQ_CHANN_MAX 256
|
||||
#define LPFC_IRQ_CHANN_DEF LPFC_IRQ_CHANN_MIN
|
||||
|
||||
/* FCP MQ queue count limiting */
|
||||
#define LPFC_FCP_SQ_THRESHOLD 4
|
||||
#define LPFC_FCP_MQ_THRESHOLD_MIN 0
|
||||
#define LPFC_FCP_MQ_THRESHOLD_MAX 256
|
||||
#define LPFC_FCP_MQ_THRESHOLD_DEF 8
|
||||
|
|
@ -130,6 +139,16 @@ struct lpfc_rqb {
|
|||
struct rqb_dmabuf *);
|
||||
};
|
||||
|
||||
enum lpfc_poll_mode {
|
||||
LPFC_QUEUE_WORK,
|
||||
LPFC_IRQ_POLL
|
||||
};
|
||||
|
||||
struct lpfc_idle_stat {
|
||||
u64 prev_idle;
|
||||
u64 prev_wall;
|
||||
};
|
||||
|
||||
struct lpfc_queue {
|
||||
struct list_head list;
|
||||
struct list_head wq_list;
|
||||
|
|
@ -216,11 +235,14 @@ struct lpfc_queue {
|
|||
uint8_t q_flag;
|
||||
#define HBA_NVMET_WQFULL 0x1 /* We hit WQ Full condition for NVMET */
|
||||
#define HBA_NVMET_CQ_NOTIFY 0x1 /* LPFC_NVMET_CQ_NOTIFY CQEs this EQE */
|
||||
#define HBA_EQ_DELAY_CHK 0x2 /* EQ is a candidate for coalescing */
|
||||
#define LPFC_NVMET_CQ_NOTIFY 4
|
||||
void __iomem *db_regaddr;
|
||||
#ifndef BUILD_BRCMFCOE
|
||||
uint16_t dpp_enable;
|
||||
uint16_t dpp_id;
|
||||
void __iomem *dpp_regaddr;
|
||||
#endif
|
||||
|
||||
/* For q stats */
|
||||
uint32_t q_cnt_1;
|
||||
|
|
@ -259,6 +281,10 @@ struct lpfc_queue {
|
|||
struct lpfc_queue *assoc_qp;
|
||||
struct list_head _poll_list;
|
||||
void **q_pgs; /* array to index entries per page */
|
||||
|
||||
#define LPFC_IRQ_POLL_WEIGHT 256
|
||||
struct irq_poll iop;
|
||||
enum lpfc_poll_mode poll_mode;
|
||||
};
|
||||
|
||||
struct lpfc_sli4_link {
|
||||
|
|
@ -466,11 +492,17 @@ struct lpfc_hba;
|
|||
#define LPFC_SLI4_HANDLER_NAME_SZ 16
|
||||
struct lpfc_hba_eq_hdl {
|
||||
uint32_t idx;
|
||||
uint16_t irq;
|
||||
char handler_name[LPFC_SLI4_HANDLER_NAME_SZ];
|
||||
struct lpfc_hba *phba;
|
||||
struct lpfc_queue *eq;
|
||||
struct cpumask aff_mask;
|
||||
};
|
||||
|
||||
#define lpfc_get_eq_hdl(eqidx) (&phba->sli4_hba.hba_eq_hdl[eqidx])
|
||||
#define lpfc_get_aff_mask(eqidx) (&phba->sli4_hba.hba_eq_hdl[eqidx].aff_mask)
|
||||
#define lpfc_get_irq(eqidx) (phba->sli4_hba.hba_eq_hdl[eqidx].irq)
|
||||
|
||||
/*BB Credit recovery value*/
|
||||
struct lpfc_bbscn_params {
|
||||
uint32_t word0;
|
||||
|
|
@ -520,6 +552,8 @@ struct lpfc_pc_sli4_params {
|
|||
uint32_t hdr_pp_align;
|
||||
uint32_t sgl_pages_max;
|
||||
uint32_t sgl_pp_align;
|
||||
uint16_t E2E_attr;
|
||||
uint8_t cmf;
|
||||
uint8_t cqv;
|
||||
uint8_t mqv;
|
||||
uint8_t wqv;
|
||||
|
|
@ -528,6 +562,7 @@ struct lpfc_pc_sli4_params {
|
|||
uint8_t cqav;
|
||||
uint8_t wqsize;
|
||||
uint8_t bv1s;
|
||||
uint8_t pls;
|
||||
#define LPFC_WQ_SZ64_SUPPORT 1
|
||||
#define LPFC_WQ_SZ128_SUPPORT 2
|
||||
uint8_t wqpcnt;
|
||||
|
|
@ -559,11 +594,10 @@ struct lpfc_sli4_lnk_info {
|
|||
#define LPFC_SLI4_HANDLER_CNT (LPFC_HBA_IO_CHAN_MAX+ \
|
||||
LPFC_FOF_IO_CHAN_NUM)
|
||||
|
||||
/* Used for IRQ vector to CPU mapping */
|
||||
/* Used for tracking CPU mapping attributes */
|
||||
struct lpfc_vector_map_info {
|
||||
uint16_t phys_id;
|
||||
uint16_t core_id;
|
||||
uint16_t irq;
|
||||
uint16_t eq;
|
||||
uint16_t hdwq;
|
||||
uint16_t flag;
|
||||
|
|
@ -685,13 +719,6 @@ struct lpfc_sli4_hdw_queue {
|
|||
struct lpfc_lock_stat lock_conflict;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SCSI_LPFC_DEBUG_FS
|
||||
#define LPFC_CHECK_CPU_CNT 128
|
||||
uint32_t cpucheck_rcv_io[LPFC_CHECK_CPU_CNT];
|
||||
uint32_t cpucheck_xmt_io[LPFC_CHECK_CPU_CNT];
|
||||
uint32_t cpucheck_cmpl_io[LPFC_CHECK_CPU_CNT];
|
||||
#endif
|
||||
|
||||
/* Per HDWQ pool resources */
|
||||
struct list_head sgl_list;
|
||||
struct list_head cmd_rsp_buf_list;
|
||||
|
|
@ -728,19 +755,37 @@ struct lpfc_sli4_hdw_queue {
|
|||
#define lpfc_qp_spin_lock(lock, qp, lstat) spin_lock(lock)
|
||||
#endif
|
||||
|
||||
/* This cpumask_last macro define is for internal repos only.
|
||||
* (RHEL 7.*, SLES15, SLES12SP4) OSes do not have cpumask_last
|
||||
* routine defined in the kernel's cpumask.h
|
||||
*/
|
||||
#define cpumask_last(maskp) \
|
||||
find_last_bit(cpumask_bits(maskp), nr_cpumask_bits)
|
||||
|
||||
#ifdef CONFIG_SCSI_LPFC_DEBUG_FS
|
||||
struct lpfc_hdwq_stat {
|
||||
u32 hdwq_no;
|
||||
u32 rcv_io;
|
||||
u32 xmt_io;
|
||||
u32 cmpl_io;
|
||||
};
|
||||
#endif
|
||||
|
||||
struct lpfc_sli4_hba {
|
||||
void __iomem *conf_regs_memmap_p; /* Kernel memory mapped address for
|
||||
* config space registers
|
||||
* PCI BAR0, config space registers
|
||||
*/
|
||||
void __iomem *ctrl_regs_memmap_p; /* Kernel memory mapped address for
|
||||
* control registers
|
||||
* PCI BAR1, control registers
|
||||
*/
|
||||
void __iomem *drbl_regs_memmap_p; /* Kernel memory mapped address for
|
||||
* doorbell registers
|
||||
* PCI BAR2, doorbell registers
|
||||
*/
|
||||
#ifndef BUILD_BRCMFCOE
|
||||
void __iomem *dpp_regs_memmap_p; /* Kernel memory mapped address for
|
||||
* dpp registers
|
||||
*/
|
||||
#endif
|
||||
union {
|
||||
struct {
|
||||
/* IF Type 0, BAR 0 PCI cfg space reg mem map */
|
||||
|
|
@ -889,8 +934,9 @@ struct lpfc_sli4_hba {
|
|||
struct list_head sp_queue_event;
|
||||
struct list_head sp_cqe_event_pool;
|
||||
struct list_head sp_asynce_work_queue;
|
||||
struct list_head sp_fcp_xri_aborted_work_queue;
|
||||
spinlock_t asynce_list_lock; /* protect sp_asynce_work_queue list */
|
||||
struct list_head sp_els_xri_aborted_work_queue;
|
||||
spinlock_t els_xri_abrt_list_lock; /* protect els_xri_aborted list */
|
||||
struct list_head sp_unsol_work_queue;
|
||||
struct lpfc_sli4_link link_state;
|
||||
struct lpfc_sli4_lnk_info lnk_info;
|
||||
|
|
@ -906,8 +952,15 @@ struct lpfc_sli4_hba {
|
|||
struct lpfc_vector_map_info *cpu_map;
|
||||
uint16_t num_possible_cpu;
|
||||
uint16_t num_present_cpu;
|
||||
struct cpumask irq_aff_mask;
|
||||
uint16_t curr_disp_cpu;
|
||||
struct lpfc_eq_intr_info __percpu *eq_info;
|
||||
|
||||
uint16_t fawwpn_in_use; /* captured FA-WWPN support state */
|
||||
#ifdef CONFIG_SCSI_LPFC_DEBUG_FS
|
||||
struct lpfc_hdwq_stat __percpu *c_stat;
|
||||
#endif
|
||||
struct lpfc_idle_stat *idle_stat;
|
||||
uint32_t conf_trunk;
|
||||
#define lpfc_conf_trunk_port0_WORD conf_trunk
|
||||
#define lpfc_conf_trunk_port0_SHIFT 0
|
||||
|
|
@ -933,6 +986,8 @@ struct lpfc_sli4_hba {
|
|||
#define lpfc_conf_trunk_port3_nd_WORD conf_trunk
|
||||
#define lpfc_conf_trunk_port3_nd_SHIFT 7
|
||||
#define lpfc_conf_trunk_port3_nd_MASK 0x1
|
||||
uint8_t flash_id;
|
||||
uint8_t asic_rev;
|
||||
};
|
||||
|
||||
enum lpfc_sge_type {
|
||||
|
|
@ -1038,6 +1093,7 @@ int lpfc_rq_create(struct lpfc_hba *, struct lpfc_queue *,
|
|||
int lpfc_mrq_create(struct lpfc_hba *phba, struct lpfc_queue **hrqp,
|
||||
struct lpfc_queue **drqp, struct lpfc_queue **cqp,
|
||||
uint32_t subtype);
|
||||
void lpfc_rq_adjust_repost(struct lpfc_hba *, struct lpfc_queue *, int);
|
||||
int lpfc_eq_destroy(struct lpfc_hba *, struct lpfc_queue *);
|
||||
int lpfc_cq_destroy(struct lpfc_hba *, struct lpfc_queue *);
|
||||
int lpfc_mq_destroy(struct lpfc_hba *, struct lpfc_queue *);
|
||||
|
|
@ -1067,8 +1123,7 @@ void lpfc_sli4_async_event_proc(struct lpfc_hba *);
|
|||
void lpfc_sli4_fcf_redisc_event_proc(struct lpfc_hba *);
|
||||
int lpfc_sli4_resume_rpi(struct lpfc_nodelist *,
|
||||
void (*)(struct lpfc_hba *, LPFC_MBOXQ_t *), void *);
|
||||
void lpfc_sli4_fcp_xri_abort_event_proc(struct lpfc_hba *);
|
||||
void lpfc_sli4_els_xri_abort_event_proc(struct lpfc_hba *);
|
||||
void lpfc_sli4_els_xri_abort_event_proc(struct lpfc_hba *phba);
|
||||
void lpfc_sli4_nvme_xri_aborted(struct lpfc_hba *phba,
|
||||
struct sli4_wcqe_xri_aborted *axri,
|
||||
struct lpfc_io_buf *lpfc_ncmd);
|
||||
|
|
@ -1109,16 +1164,17 @@ uint8_t lpfc_sli_config_mbox_subsys_get(struct lpfc_hba *, LPFC_MBOXQ_t *);
|
|||
uint8_t lpfc_sli_config_mbox_opcode_get(struct lpfc_hba *, LPFC_MBOXQ_t *);
|
||||
void lpfc_sli4_ras_dma_free(struct lpfc_hba *phba);
|
||||
struct sli4_hybrid_sgl *lpfc_get_sgl_per_hdwq(struct lpfc_hba *phba,
|
||||
struct lpfc_io_buf *buf);
|
||||
struct lpfc_io_buf *lpfc_buf);
|
||||
struct fcp_cmd_rsp_buf *lpfc_get_cmd_rsp_buf_per_hdwq(struct lpfc_hba *phba,
|
||||
struct lpfc_io_buf *buf);
|
||||
int lpfc_put_sgl_per_hdwq(struct lpfc_hba *phba, struct lpfc_io_buf *buf);
|
||||
struct lpfc_io_buf
|
||||
*lpfc_buf);
|
||||
int lpfc_put_sgl_per_hdwq(struct lpfc_hba *phba, struct lpfc_io_buf *lpfc_buf);
|
||||
int lpfc_put_cmd_rsp_buf_per_hdwq(struct lpfc_hba *phba,
|
||||
struct lpfc_io_buf *buf);
|
||||
struct lpfc_io_buf *lpfc_buf);
|
||||
void lpfc_free_sgl_per_hdwq(struct lpfc_hba *phba,
|
||||
struct lpfc_sli4_hdw_queue *hdwq);
|
||||
struct lpfc_sli4_hdw_queue *lpfc_buf);
|
||||
void lpfc_free_cmd_rsp_buf_per_hdwq(struct lpfc_hba *phba,
|
||||
struct lpfc_sli4_hdw_queue *hdwq);
|
||||
struct lpfc_sli4_hdw_queue *lpfc_buf);
|
||||
static inline void *lpfc_sli4_qe(struct lpfc_queue *q, uint16_t idx)
|
||||
{
|
||||
return q->q_pgs[idx / q->entry_cnt_per_pg] +
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/*******************************************************************
|
||||
* This file is part of the Emulex Linux Device Driver for *
|
||||
* Fibre Channel Host Bus Adapters. *
|
||||
* Copyright (C) 2017-2019 Broadcom. All Rights Reserved. The term *
|
||||
* Copyright (C) 2017-2021 Broadcom. All Rights Reserved. The term *
|
||||
* “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. *
|
||||
* Copyright (C) 2004-2016 Emulex. All rights reserved. *
|
||||
* EMULEX and SLI are trademarks of Emulex. *
|
||||
|
|
@ -20,8 +20,12 @@
|
|||
* included with this package. *
|
||||
*******************************************************************/
|
||||
|
||||
#define LPFC_DRIVER_VERSION "12.4.0.0"
|
||||
#define LPFC_DRIVER_VERSION "12.8.542.34"
|
||||
|
||||
#ifndef BUILD_BRCMFCOE
|
||||
|
||||
#define LPFC_DRIVER_NAME "lpfc"
|
||||
#define LPFCMGMT_NAME "lpfcmgmt"
|
||||
|
||||
/* Used for SLI 2/3 */
|
||||
#define LPFC_SP_DRIVER_HANDLER_NAME "lpfc:sp"
|
||||
|
|
@ -32,6 +36,25 @@
|
|||
|
||||
#define LPFC_MODULE_DESC "Emulex LightPulse Fibre Channel SCSI driver " \
|
||||
LPFC_DRIVER_VERSION
|
||||
#define LPFC_COPYRIGHT "Copyright (C) 2017-2019 Broadcom. All Rights " \
|
||||
#define LPFC_COPYRIGHT "Copyright (C) 2017-2021 Broadcom. All Rights " \
|
||||
"Reserved. The term \"Broadcom\" refers to Broadcom Inc. " \
|
||||
"and/or its subsidiaries."
|
||||
|
||||
#else
|
||||
|
||||
#define LPFC_DRIVER_NAME "brcmfcoe"
|
||||
#define LPFCMGMT_NAME "brcmfcoemgmt"
|
||||
|
||||
/* Used for SLI 2/3 */
|
||||
#define LPFC_SP_DRIVER_HANDLER_NAME "brcmfcoe:sp"
|
||||
#define LPFC_FP_DRIVER_HANDLER_NAME "brcmfcoe:fp"
|
||||
|
||||
/* Used for SLI4 */
|
||||
#define LPFC_DRIVER_HANDLER_NAME "brcmfcoe:"
|
||||
|
||||
#define LPFC_MODULE_DESC "Emulex FCoE SCSI driver " \
|
||||
LPFC_DRIVER_VERSION
|
||||
#define LPFC_COPYRIGHT "Copyright (C) 2017 Broadcom. All Rights Reserved. " \
|
||||
"The term \"Broadcom\" refers to Broadcom Limited " \
|
||||
"and/or its subsidiaries."
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/*******************************************************************
|
||||
* This file is part of the Emulex Linux Device Driver for *
|
||||
* Fibre Channel Host Bus Adapters. *
|
||||
* Copyright (C) 2017-2019 Broadcom. All Rights Reserved. The term *
|
||||
* Copyright (C) 2017-2020 Broadcom. All Rights Reserved. The term *
|
||||
* “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. *
|
||||
* Copyright (C) 2004-2016 Emulex. All rights reserved. *
|
||||
* EMULEX and SLI are trademarks of Emulex. *
|
||||
|
|
@ -145,7 +145,7 @@ lpfc_vport_sparm(struct lpfc_hba *phba, struct lpfc_vport *vport)
|
|||
rc = lpfc_sli_issue_mbox_wait(phba, pmb, phba->fc_ratov * 2);
|
||||
if (rc != MBX_SUCCESS) {
|
||||
if (signal_pending(current)) {
|
||||
lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT | LOG_VPORT,
|
||||
lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT,
|
||||
"1830 Signal aborted mbxCmd x%x\n",
|
||||
mb->mbxCommand);
|
||||
lpfc_mbuf_free(phba, mp->virt, mp->phys);
|
||||
|
|
@ -154,7 +154,7 @@ lpfc_vport_sparm(struct lpfc_hba *phba, struct lpfc_vport *vport)
|
|||
mempool_free(pmb, phba->mbox_mem_pool);
|
||||
return -EINTR;
|
||||
} else {
|
||||
lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT | LOG_VPORT,
|
||||
lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT,
|
||||
"1818 VPort failed init, mbxCmd x%x "
|
||||
"READ_SPARM mbxStatus x%x, rc = x%x\n",
|
||||
mb->mbxCommand, mb->mbxStatus, rc);
|
||||
|
|
@ -190,7 +190,7 @@ lpfc_valid_wwn_format(struct lpfc_hba *phba, struct lpfc_name *wwn,
|
|||
((wwn->u.wwn[0] & 0xf) != 0 || (wwn->u.wwn[1] & 0xf) != 0)))
|
||||
return 1;
|
||||
|
||||
lpfc_printf_log(phba, KERN_ERR, LOG_VPORT,
|
||||
lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT,
|
||||
"1822 Invalid %s: %02x:%02x:%02x:%02x:"
|
||||
"%02x:%02x:%02x:%02x\n",
|
||||
name_type,
|
||||
|
|
@ -284,11 +284,11 @@ static void lpfc_discovery_wait(struct lpfc_vport *vport)
|
|||
}
|
||||
|
||||
if (time_after(jiffies, wait_time_max))
|
||||
lpfc_printf_vlog(vport, KERN_ERR, LOG_VPORT,
|
||||
"1835 Vport discovery quiesce failed:"
|
||||
" state x%x fc_flags x%x wait msecs x%x\n",
|
||||
vport->port_state, vport->fc_flag,
|
||||
jiffies_to_msecs(jiffies - start_time));
|
||||
lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT,
|
||||
"1835 Vport discovery quiesce failed:"
|
||||
" state x%x fc_flags x%x wait msecs x%x\n",
|
||||
vport->port_state, vport->fc_flag,
|
||||
jiffies_to_msecs(jiffies - start_time));
|
||||
}
|
||||
|
||||
int
|
||||
|
|
@ -305,7 +305,7 @@ lpfc_vport_create(struct fc_vport *fc_vport, bool disable)
|
|||
int status;
|
||||
|
||||
if ((phba->sli_rev < 3) || !(phba->cfg_enable_npiv)) {
|
||||
lpfc_printf_log(phba, KERN_ERR, LOG_VPORT,
|
||||
lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT,
|
||||
"1808 Create VPORT failed: "
|
||||
"NPIV is not enabled: SLImode:%d\n",
|
||||
phba->sli_rev);
|
||||
|
|
@ -315,7 +315,7 @@ lpfc_vport_create(struct fc_vport *fc_vport, bool disable)
|
|||
|
||||
/* NPIV is not supported if HBA has NVME Target enabled */
|
||||
if (phba->nvmet_support) {
|
||||
lpfc_printf_log(phba, KERN_ERR, LOG_VPORT,
|
||||
lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT,
|
||||
"3189 Create VPORT failed: "
|
||||
"NPIV is not supported on NVME Target\n");
|
||||
rc = VPORT_INVAL;
|
||||
|
|
@ -324,7 +324,7 @@ lpfc_vport_create(struct fc_vport *fc_vport, bool disable)
|
|||
|
||||
vpi = lpfc_alloc_vpi(phba);
|
||||
if (vpi == 0) {
|
||||
lpfc_printf_log(phba, KERN_ERR, LOG_VPORT,
|
||||
lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT,
|
||||
"1809 Create VPORT failed: "
|
||||
"Max VPORTs (%d) exceeded\n",
|
||||
phba->max_vpi);
|
||||
|
|
@ -334,7 +334,7 @@ lpfc_vport_create(struct fc_vport *fc_vport, bool disable)
|
|||
|
||||
/* Assign an unused board number */
|
||||
if ((instance = lpfc_get_instance()) < 0) {
|
||||
lpfc_printf_log(phba, KERN_ERR, LOG_VPORT,
|
||||
lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT,
|
||||
"1810 Create VPORT failed: Cannot get "
|
||||
"instance number\n");
|
||||
lpfc_free_vpi(phba, vpi);
|
||||
|
|
@ -344,7 +344,7 @@ lpfc_vport_create(struct fc_vport *fc_vport, bool disable)
|
|||
|
||||
vport = lpfc_create_port(phba, instance, &fc_vport->dev);
|
||||
if (!vport) {
|
||||
lpfc_printf_log(phba, KERN_ERR, LOG_VPORT,
|
||||
lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT,
|
||||
"1811 Create VPORT failed: vpi x%x\n", vpi);
|
||||
lpfc_free_vpi(phba, vpi);
|
||||
rc = VPORT_NORESOURCES;
|
||||
|
|
@ -356,11 +356,11 @@ lpfc_vport_create(struct fc_vport *fc_vport, bool disable)
|
|||
|
||||
if ((status = lpfc_vport_sparm(phba, vport))) {
|
||||
if (status == -EINTR) {
|
||||
lpfc_printf_vlog(vport, KERN_ERR, LOG_VPORT,
|
||||
lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT,
|
||||
"1831 Create VPORT Interrupted.\n");
|
||||
rc = VPORT_ERROR;
|
||||
} else {
|
||||
lpfc_printf_vlog(vport, KERN_ERR, LOG_VPORT,
|
||||
lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT,
|
||||
"1813 Create VPORT failed. "
|
||||
"Cannot get sparam\n");
|
||||
rc = VPORT_NORESOURCES;
|
||||
|
|
@ -378,7 +378,7 @@ lpfc_vport_create(struct fc_vport *fc_vport, bool disable)
|
|||
|
||||
if (!lpfc_valid_wwn_format(phba, &vport->fc_sparam.nodeName, "WWNN") ||
|
||||
!lpfc_valid_wwn_format(phba, &vport->fc_sparam.portName, "WWPN")) {
|
||||
lpfc_printf_vlog(vport, KERN_ERR, LOG_VPORT,
|
||||
lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT,
|
||||
"1821 Create VPORT failed. "
|
||||
"Invalid WWN format\n");
|
||||
lpfc_free_vpi(phba, vpi);
|
||||
|
|
@ -388,7 +388,7 @@ lpfc_vport_create(struct fc_vport *fc_vport, bool disable)
|
|||
}
|
||||
|
||||
if (!lpfc_unique_wwpn(phba, vport)) {
|
||||
lpfc_printf_vlog(vport, KERN_ERR, LOG_VPORT,
|
||||
lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT,
|
||||
"1823 Create VPORT failed. "
|
||||
"Duplicate WWN on HBA\n");
|
||||
lpfc_free_vpi(phba, vpi);
|
||||
|
|
@ -426,7 +426,7 @@ lpfc_vport_create(struct fc_vport *fc_vport, bool disable)
|
|||
(pport->fc_flag & FC_VFI_REGISTERED)) {
|
||||
rc = lpfc_sli4_init_vpi(vport);
|
||||
if (rc) {
|
||||
lpfc_printf_log(phba, KERN_ERR, LOG_VPORT,
|
||||
lpfc_printf_log(phba, KERN_ERR, LOG_TRACE_EVENT,
|
||||
"1838 Failed to INIT_VPI on vpi %d "
|
||||
"status %d\n", vpi, rc);
|
||||
rc = VPORT_NORESOURCES;
|
||||
|
|
@ -469,7 +469,7 @@ lpfc_vport_create(struct fc_vport *fc_vport, bool disable)
|
|||
lpfc_initial_fdisc(vport);
|
||||
} else {
|
||||
lpfc_vport_set_state(vport, FC_VPORT_NO_FABRIC_SUPP);
|
||||
lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS,
|
||||
lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT,
|
||||
"0262 No NPIV Fabric support\n");
|
||||
}
|
||||
} else {
|
||||
|
|
@ -479,7 +479,7 @@ lpfc_vport_create(struct fc_vport *fc_vport, bool disable)
|
|||
|
||||
out:
|
||||
lpfc_printf_vlog(vport, KERN_ERR, LOG_VPORT,
|
||||
"1825 Vport Created.\n");
|
||||
"1825 Vport Created.\n");
|
||||
lpfc_host_attrib_init(lpfc_shost_from_vport(vport));
|
||||
error_out:
|
||||
return rc;
|
||||
|
|
@ -534,7 +534,7 @@ disable_vport(struct fc_vport *fc_vport)
|
|||
}
|
||||
|
||||
lpfc_vport_set_state(vport, FC_VPORT_DISABLED);
|
||||
lpfc_printf_vlog(vport, KERN_ERR, LOG_VPORT,
|
||||
lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT,
|
||||
"1826 Vport Disabled.\n");
|
||||
return VPORT_OK;
|
||||
}
|
||||
|
|
@ -575,7 +575,7 @@ enable_vport(struct fc_vport *fc_vport)
|
|||
lpfc_initial_fdisc(vport);
|
||||
} else {
|
||||
lpfc_vport_set_state(vport, FC_VPORT_NO_FABRIC_SUPP);
|
||||
lpfc_printf_vlog(vport, KERN_ERR, LOG_ELS,
|
||||
lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT,
|
||||
"0264 No NPIV Fabric support\n");
|
||||
}
|
||||
} else {
|
||||
|
|
@ -583,7 +583,7 @@ enable_vport(struct fc_vport *fc_vport)
|
|||
}
|
||||
|
||||
out:
|
||||
lpfc_printf_vlog(vport, KERN_ERR, LOG_VPORT,
|
||||
lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT,
|
||||
"1827 Vport Enabled.\n");
|
||||
return VPORT_OK;
|
||||
}
|
||||
|
|
@ -609,7 +609,7 @@ lpfc_vport_delete(struct fc_vport *fc_vport)
|
|||
bool ns_ndlp_referenced = false;
|
||||
|
||||
if (vport->port_type == LPFC_PHYSICAL_PORT) {
|
||||
lpfc_printf_vlog(vport, KERN_ERR, LOG_VPORT,
|
||||
lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT,
|
||||
"1812 vport_delete failed: Cannot delete "
|
||||
"physical host\n");
|
||||
return VPORT_ERROR;
|
||||
|
|
@ -618,7 +618,7 @@ lpfc_vport_delete(struct fc_vport *fc_vport)
|
|||
/* If the vport is a static vport fail the deletion. */
|
||||
if ((vport->vport_flag & STATIC_VPORT) &&
|
||||
!(phba->pport->load_flag & FC_UNLOADING)) {
|
||||
lpfc_printf_vlog(vport, KERN_ERR, LOG_VPORT,
|
||||
lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT,
|
||||
"1837 vport_delete failed: Cannot delete "
|
||||
"static vport.\n");
|
||||
return VPORT_ERROR;
|
||||
|
|
@ -807,7 +807,7 @@ skip_logo:
|
|||
spin_lock_irq(&phba->port_list_lock);
|
||||
list_del_init(&vport->listentry);
|
||||
spin_unlock_irq(&phba->port_list_lock);
|
||||
lpfc_printf_vlog(vport, KERN_ERR, LOG_VPORT,
|
||||
lpfc_printf_vlog(vport, KERN_ERR, LOG_TRACE_EVENT,
|
||||
"1828 Vport Deleted.\n");
|
||||
scsi_host_put(shost);
|
||||
return VPORT_OK;
|
||||
|
|
@ -819,7 +819,7 @@ lpfc_create_vport_work_array(struct lpfc_hba *phba)
|
|||
struct lpfc_vport *port_iterator;
|
||||
struct lpfc_vport **vports;
|
||||
int index = 0;
|
||||
vports = kcalloc(phba->max_vports + 1, sizeof(struct lpfc_vport *),
|
||||
vports = kzalloc((phba->max_vports + 1) * sizeof(struct lpfc_vport *),
|
||||
GFP_KERNEL);
|
||||
if (vports == NULL)
|
||||
return NULL;
|
||||
|
|
@ -828,7 +828,8 @@ lpfc_create_vport_work_array(struct lpfc_hba *phba)
|
|||
if (port_iterator->load_flag & FC_UNLOADING)
|
||||
continue;
|
||||
if (!scsi_host_get(lpfc_shost_from_vport(port_iterator))) {
|
||||
lpfc_printf_vlog(port_iterator, KERN_ERR, LOG_VPORT,
|
||||
lpfc_printf_vlog(port_iterator, KERN_ERR,
|
||||
LOG_TRACE_EVENT,
|
||||
"1801 Create vport work array FAILED: "
|
||||
"cannot do scsi_host_get\n");
|
||||
continue;
|
||||
|
|
@ -898,7 +899,8 @@ lpfc_alloc_bucket(struct lpfc_vport *vport)
|
|||
GFP_ATOMIC);
|
||||
|
||||
if (!ndlp->lat_data)
|
||||
lpfc_printf_vlog(vport, KERN_ERR, LOG_NODE,
|
||||
lpfc_printf_vlog(vport, KERN_ERR,
|
||||
LOG_TRACE_EVENT,
|
||||
"0287 lpfc_alloc_bucket failed to "
|
||||
"allocate statistical data buffer DID "
|
||||
"0x%x\n", ndlp->nlp_DID);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/*******************************************************************
|
||||
* This file is part of the Emulex Linux Device Driver for *
|
||||
* Fibre Channel Host Bus Adapters. *
|
||||
* Copyright (C) 2017-2018 Broadcom. All Rights Reserved. The term *
|
||||
* Copyright (C) 2017 Broadcom. All Rights Reserved. The term *
|
||||
* “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. *
|
||||
* Copyright (C) 2004-2006 Emulex. All rights reserved. *
|
||||
* EMULEX and SLI are trademarks of Emulex. *
|
||||
|
|
|
|||
Loading…
Reference in New Issue