scsi: lpfc: Make FW logging dynamically configurable
authorJames Smart <jsmart2021@gmail.com>
Fri, 18 Oct 2019 21:18:27 +0000 (14:18 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 25 Oct 2019 01:02:05 +0000 (21:02 -0400)
commit95bfc6d8ad86a76c89f62bb466f740b0fc05a667
treed0f02c781d6b336ce19e5ff89a364b3c7b306355
parent8156d378c4cbf8ca19df5d8f0c610ce6923b61e2
scsi: lpfc: Make FW logging dynamically configurable

Currently, the FW logging facility is a load/boot time parameter which
requires the driver to be unloaded/reloaded or the system rebooted in order
to change its configuration.

Convert the logging facility to allow dynamic enablement and configuration.
Specifically:

 - Convert the feature so that it can be enabled dynamically via an
   attribute.  Additionally, the size of the buffer can be configured
   dynamically.

 - Add locks around states that now may be changing.

 - Tie the feature into debugfs so that the logs can be read at any time.

Link: https://lore.kernel.org/r/20191018211832.7917-12-jsmart2021@gmail.com
Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/lpfc/lpfc.h
drivers/scsi/lpfc/lpfc_attr.c
drivers/scsi/lpfc/lpfc_bsg.c
drivers/scsi/lpfc/lpfc_debugfs.c
drivers/scsi/lpfc/lpfc_sli.c