From: Chad Dupuis <chad.dupuis@qlogic.com>
To: jbottomley@parallels.com
Cc: giridhar.malavali@qlogic.com, chad.dupuis@qlogic.com,
andrew.vasquez@qlogic.com, linux-scsi@vger.kernel.org
Subject: [PATCH 08/42] qla2xxx: Add FW DUMP SIZE sysfs attribute.
Date: Wed, 22 Aug 2012 14:21:02 -0400 [thread overview]
Message-ID: <1345659696-3670-9-git-send-email-chad.dupuis@qlogic.com> (raw)
In-Reply-To: <1345659696-3670-1-git-send-email-chad.dupuis@qlogic.com>
From: Harish Zunjarrao <harish.zunjarrao@qlogic.com>
Signed-off-by: Harish Zunjarrao <harish.zunjarrao@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
---
drivers/scsi/qla2xxx/qla_attr.c | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c
index ff2439b..da804f4 100644
--- a/drivers/scsi/qla2xxx/qla_attr.c
+++ b/drivers/scsi/qla2xxx/qla_attr.c
@@ -1276,6 +1276,24 @@ qla2x00_diag_megabytes_show(struct device *dev,
vha->bidi_stats.transfer_bytes >> 20);
}
+static ssize_t
+qla2x00_fw_dump_size_show(struct device *dev, struct device_attribute *attr,
+ char *buf)
+{
+ scsi_qla_host_t *vha = shost_priv(class_to_shost(dev));
+ struct qla_hw_data *ha = vha->hw;
+ uint32_t size;
+
+ if (!ha->fw_dumped)
+ size = 0;
+ else if (IS_QLA82XX(ha))
+ size = ha->md_template_size + ha->md_dump_size;
+ else
+ size = ha->fw_dump_len;
+
+ return snprintf(buf, PAGE_SIZE, "%d\n", size);
+}
+
static DEVICE_ATTR(driver_version, S_IRUGO, qla2x00_drvr_version_show, NULL);
static DEVICE_ATTR(fw_version, S_IRUGO, qla2x00_fw_version_show, NULL);
static DEVICE_ATTR(serial_num, S_IRUGO, qla2x00_serial_num_show, NULL);
@@ -1316,6 +1334,7 @@ static DEVICE_ATTR(fw_state, S_IRUGO, qla2x00_fw_state_show, NULL);
static DEVICE_ATTR(thermal_temp, S_IRUGO, qla2x00_thermal_temp_show, NULL);
static DEVICE_ATTR(diag_requests, S_IRUGO, qla2x00_diag_requests_show, NULL);
static DEVICE_ATTR(diag_megabytes, S_IRUGO, qla2x00_diag_megabytes_show, NULL);
+static DEVICE_ATTR(fw_dump_size, S_IRUGO, qla2x00_fw_dump_size_show, NULL);
struct device_attribute *qla2x00_host_attrs[] = {
&dev_attr_driver_version,
@@ -1347,6 +1366,7 @@ struct device_attribute *qla2x00_host_attrs[] = {
&dev_attr_thermal_temp,
&dev_attr_diag_requests,
&dev_attr_diag_megabytes,
+ &dev_attr_fw_dump_size,
NULL,
};
--
1.7.7
next prev parent reply other threads:[~2012-08-22 18:38 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-22 18:20 [PATCH 00/42] qla2xxx: Patches for scsi "misc" branch Chad Dupuis
2012-08-22 18:20 ` [PATCH 01/42] qla2xxx: Bind to ISP8031 devices Chad Dupuis
2012-08-22 18:20 ` [PATCH 02/42] qla2xxx: Add I2C BSG interface Chad Dupuis
2012-08-22 18:20 ` [PATCH 03/42] qla2xxx: Add check in qla82xx_watchdog for failed hardware state Chad Dupuis
2012-08-22 18:20 ` [PATCH 04/42] qla2xxx: Fix typo in qla2xxx files Chad Dupuis
2012-08-22 18:20 ` [PATCH 05/42] qla2xxx: Display mailbox failure by default Chad Dupuis
2012-08-22 18:21 ` [PATCH 06/42] qla2xxx: Use bitmap to store loop_id's for fcports Chad Dupuis
2012-08-22 18:21 ` [PATCH 07/42] qla2xxx: Implementation of bidirectional Chad Dupuis
2012-08-22 18:21 ` Chad Dupuis [this message]
2012-08-22 18:21 ` [PATCH 09/42] qla2xxx: IDC implementation for ISP83xx Chad Dupuis
2012-08-22 18:21 ` [PATCH 10/42] qla2xxx: Implemetation of mctp Chad Dupuis
2012-09-14 16:28 ` James Bottomley
2012-08-22 18:21 ` [PATCH 11/42] qla2xxx: Add bit to identify adapters for thermal temp Chad Dupuis
2012-08-22 18:21 ` [PATCH 12/42] qla2xxx: Changes for ISP83xx loopback support Chad Dupuis
2012-08-22 18:21 ` [PATCH 13/42] qla2xxx: Don't register to legacy interrupt for ISP82xx Chad Dupuis
2012-08-22 18:21 ` [PATCH 14/42] qla2xxx: Update the driver license Chad Dupuis
2012-09-14 16:36 ` James Bottomley
2012-08-22 18:21 ` [PATCH 15/42] qla2xxx: Only enable link up on the correct interrupt event Chad Dupuis
2012-08-22 18:21 ` [PATCH 16/42] qla2xxx: Fix for continuous rescan attempts in arbitrated loop topology Chad Dupuis
2012-08-22 18:21 ` [PATCH 17/42] qla2xxx: Implement beacon support for ISP83xx Chad Dupuis
2012-08-22 18:21 ` [PATCH 18/42] qla2xxx: Fix rval may be used uninitialized in this function warning Chad Dupuis
2012-08-22 18:21 ` [PATCH 19/42] qla2xxx: Perform ROM mbx cmd access only after ISP soft-reset during f/w recovery Chad Dupuis
2012-08-22 18:21 ` [PATCH 20/42] qla2xxx: Wrong PCIe(2.5Gb/s x8) speed in the kerenel message for ISP82xx Chad Dupuis
2012-08-22 18:21 ` [PATCH 21/42] qla2xxx: Dont call nic restart firmware if it is already active and running Chad Dupuis
2012-08-22 18:21 ` [PATCH 22/42] qla2xxx: Use #defines instead of hardcoded values for intr status Chad Dupuis
2012-08-22 18:21 ` [PATCH 23/42] qla2xxx: Remove setting Scsi_host->this_id during adapter probe Chad Dupuis
2012-08-22 18:21 ` [PATCH 24/42] qla2xxx: Ensure PLOGI is sent to Fabric Management-Server upon request Chad Dupuis
2012-08-22 18:21 ` [PATCH 25/42] qla2xxx: Fail initialization if unable to load RISC code Chad Dupuis
2012-08-22 18:21 ` [PATCH 26/42] qla2xxx: Do PCI fundamental reset for ISP83xx Chad Dupuis
2012-08-22 18:21 ` [PATCH 27/42] qla2xxx: Do not restrict the number of NPIV ports " Chad Dupuis
2012-08-22 18:21 ` [PATCH 28/42] qla2xxx: set idc version if function is first one to come Chad Dupuis
2012-08-22 18:21 ` [PATCH 29/42] qla2xxx: Fix description of qla2xmaxqdepth parameter Chad Dupuis
2012-08-22 18:21 ` [PATCH 30/42] qla2xxx: Fix for handling some error conditions in loopback Chad Dupuis
2012-08-22 18:21 ` [PATCH 31/42] qla2xxx: Enclose adapter related calls in adapter check in failed state handler Chad Dupuis
2012-08-22 18:21 ` [PATCH 32/42] qla2xxx: Set Maximum Read Request Size to 4K Chad Dupuis
2012-08-22 18:21 ` [PATCH 33/42] qla2xxx: Get fcal position map should not be called for p2p topology Chad Dupuis
2012-08-22 18:21 ` [PATCH 34/42] qla2xxx: Enable fw attributes for ISP24xx and above Chad Dupuis
2012-08-22 18:21 ` [PATCH 35/42] qla2xxx: Restrict nic core reset to one function for mctp Chad Dupuis
2012-08-22 18:21 ` [PATCH 36/42] qla2xxx: Fix for legacy interrupts for ISP83xx Chad Dupuis
2012-08-22 18:21 ` [PATCH 37/42] qla2xxx: T10 DIF - ISP83xx changes Chad Dupuis
2012-08-22 18:21 ` [PATCH 38/42] qla2xxx: Fix incorrect status reporting on DIF errors Chad Dupuis
2012-08-22 18:21 ` [PATCH 39/42] qla2xxx: Don't toggle RISC interrupt bits after IRQ lines are attached Chad Dupuis
2012-08-22 18:21 ` [PATCH 40/42] qla2xxx: Allow MSI interrupt registration for ISP82xx Chad Dupuis
2012-08-22 18:21 ` [PATCH 41/42] qla2xxx: Use the right field for container_of Chad Dupuis
2012-08-22 18:21 ` [PATCH 42/42] qla2xxx: Update version number to 8.04.00.07-k Chad Dupuis
2012-09-14 17:20 ` James Bottomley
2012-09-14 17:27 ` Chad Dupuis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1345659696-3670-9-git-send-email-chad.dupuis@qlogic.com \
--to=chad.dupuis@qlogic.com \
--cc=andrew.vasquez@qlogic.com \
--cc=giridhar.malavali@qlogic.com \
--cc=jbottomley@parallels.com \
--cc=linux-scsi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).