From: Saurav Kashyap <saurav.kashyap@qlogic.com>
To: jbottomley@parallels.com
Cc: giridhar.malavali@qlogic.com, saurav.kashyap@qlogic.com,
andrew.vasquez@qlogic.com, linux-scsi@vger.kernel.org
Subject: [PATCH 03/42] qla2xxx: Correct operations for ISP27xx template types 270 and 271.
Date: Fri, 11 Apr 2014 16:54:08 -0400 [thread overview]
Message-ID: <1397249687-32666-4-git-send-email-saurav.kashyap@qlogic.com> (raw)
In-Reply-To: <1397249687-32666-1-git-send-email-saurav.kashyap@qlogic.com>
From: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
---
drivers/scsi/qla2xxx/qla_dbg.c | 2 +-
drivers/scsi/qla2xxx/qla_tmpl.c | 21 ++++++++++++++++-----
2 files changed, 17 insertions(+), 6 deletions(-)
diff --git a/drivers/scsi/qla2xxx/qla_dbg.c b/drivers/scsi/qla2xxx/qla_dbg.c
index 97255f7..c6ecd24 100644
--- a/drivers/scsi/qla2xxx/qla_dbg.c
+++ b/drivers/scsi/qla2xxx/qla_dbg.c
@@ -60,7 +60,7 @@
* | | | 0xb13c-0xb140 |
* | | | 0xb149 |
* | MultiQ | 0xc00c | |
- * | Misc | 0xd2ff | 0xd017-0xd019 |
+ * | Misc | 0xd300 | 0xd017-0xd019 |
* | | | 0xd020 |
* | | | 0xd02e-0xd0ff |
* | | | 0xd101-0xd1fe |
diff --git a/drivers/scsi/qla2xxx/qla_tmpl.c b/drivers/scsi/qla2xxx/qla_tmpl.c
index a804e9b..2909804 100644
--- a/drivers/scsi/qla2xxx/qla_tmpl.c
+++ b/drivers/scsi/qla2xxx/qla_tmpl.c
@@ -192,6 +192,19 @@ static inline void (*qla27xx_read_vector(uint width))(void *, void *, ulong *)
}
static inline void
+qla27xx_read_off(__iomem struct device_reg_24xx *reg,
+ uint offset, void *buf, ulong *len)
+{
+ void *window = (void *)reg + offset;
+
+ if (buf) {
+ ql_dbg(ql_dbg_misc, NULL, 0xd300,
+ "%s: @%x\n", __func__, offset);
+ }
+ qla27xx_read32(window, buf, len);
+}
+
+static inline void
qla27xx_read_reg(__iomem struct device_reg_24xx *reg,
uint offset, void *buf, ulong *len)
{
@@ -590,7 +603,6 @@ qla27xx_fwdt_entry_t270(struct scsi_qla_host *vha,
struct qla27xx_fwdt_entry *ent, void *buf, ulong *len)
{
struct device_reg_24xx __iomem *reg = qla27xx_isp_reg(vha);
- void *window = (void *)reg + 0xc4;
ulong dwords = ent->t270.count;
ulong addr = ent->t270.addr;
@@ -599,9 +611,8 @@ qla27xx_fwdt_entry_t270(struct scsi_qla_host *vha,
qla27xx_write_reg(reg, IOBASE_ADDR, 0x40, buf);
while (dwords--) {
qla27xx_write_reg(reg, 0xc0, addr|0x80000000, buf);
- qla27xx_read_reg(reg, 0xc4, buf, len);
qla27xx_insert32(addr, buf, len);
- qla27xx_read32(window, buf, len);
+ qla27xx_read_off(reg, 0xc4, buf, len);
addr++;
}
@@ -614,12 +625,12 @@ qla27xx_fwdt_entry_t271(struct scsi_qla_host *vha,
{
struct device_reg_24xx __iomem *reg = qla27xx_isp_reg(vha);
ulong addr = ent->t271.addr;
+ ulong data = ent->t271.data;
ql_dbg(ql_dbg_misc, vha, 0xd20f,
"%s: wrremreg [%lx]\n", __func__, *len);
qla27xx_write_reg(reg, IOBASE_ADDR, 0x40, buf);
- qla27xx_read_reg(reg, 0xc4, buf, len);
- qla27xx_insert32(addr, buf, len);
+ qla27xx_write_reg(reg, 0xc4, data, buf);
qla27xx_write_reg(reg, 0xc0, addr, buf);
return false;
--
1.7.7
next prev parent reply other threads:[~2014-04-11 21:32 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-11 20:54 [PATCH 00/42] qla2xxx: 8.07.00.08-k: Updates for scsi "misc" branch Saurav Kashyap
2014-04-11 20:54 ` [PATCH 01/42] qla2xxx: Wait for reset completion without lock for ISPFX00 Saurav Kashyap
2014-04-11 20:54 ` [PATCH 02/42] qla2xxx: Do not schedule reset when one is already active when receiving an invalid status handle Saurav Kashyap
2014-04-11 20:54 ` Saurav Kashyap [this message]
2014-04-11 20:54 ` [PATCH 04/42] qla2xxx: Allow ISP83XX and ISP27XX both to write req_q_out register Saurav Kashyap
2014-04-11 20:54 ` [PATCH 05/42] qla2xxx: Correct ISP83xx/ISP27xx mislogic in setting out_mb in qla25xx_init_req_que() Saurav Kashyap
2014-04-11 20:54 ` [PATCH 06/42] qla2xxx: Log when device state is moved to failed state Saurav Kashyap
2014-04-11 20:54 ` [PATCH 07/42] qla2xxx: Issue abort command for outstanding commands during cleanup when only firmware is alive Saurav Kashyap
2014-04-11 20:54 ` [PATCH 08/42] qla2xxx: Add pci device id 0x2271 Saurav Kashyap
2014-04-11 20:54 ` [PATCH 09/42] qla2xxx: Allow the next firmware dump if the previous dump capture fails for ISP8044 Saurav Kashyap
2014-04-11 20:54 ` [PATCH 10/42] qla2xxx: Support of new firmware dump opcodes QLA8044_RDDFE(38), QLA8044_RDMDIO(39),QLA8044_POLLWR(40) Saurav Kashyap
2014-04-11 20:54 ` [PATCH 11/42] qla2xxx: Check for peg alive counter and clear any outstanding mailbox command Saurav Kashyap
2014-04-11 20:54 ` [PATCH 12/42] qla2xxx: Add ISP8044 serdes bsg interface Saurav Kashyap
2014-04-11 20:54 ` [PATCH 13/42] qla2xxx: Correction to ISP27xx template entry types 256 and 258 Saurav Kashyap
2014-04-11 20:54 ` [PATCH 14/42] qla2xxx: Track the process when the ROM_LOCK failure happens Saurav Kashyap
2014-04-11 20:54 ` [PATCH 15/42] qla2xxx: Remove unnecessary delays from fw dump code path Saurav Kashyap
2014-04-11 20:54 ` [PATCH 16/42] qla2xxx: Introduce fw_dump_flag to track fw dump progress Saurav Kashyap
2014-04-11 20:54 ` [PATCH 17/42] qla2xxx: Enable fw_dump_size for ISP8044 Saurav Kashyap
2014-04-11 20:54 ` [PATCH 18/42] qla2xxx: Update entry type 270 to match spec update Saurav Kashyap
2014-04-11 20:54 ` [PATCH 19/42] qla2xxx: Change copyright year to 2014 in all the source files Saurav Kashyap
2014-04-11 20:54 ` [PATCH 20/42] qla2xxx: Decrease pci access for response queue processing for ISPFX00 Saurav Kashyap
2014-04-11 20:54 ` [PATCH 21/42] qla2xxx: Use proper log message for flash lock failed error Saurav Kashyap
2014-04-11 20:54 ` [PATCH 22/42] qla2xxx: Include <delay.h> file for msleep declartion in qla_nx2.c file Saurav Kashyap
2014-04-11 20:54 ` [PATCH 23/42] qla2xxx: Remove unnecessary printk_ratelimited from qla_nx2.c Saurav Kashyap
2014-04-11 20:54 ` [PATCH 24/42] qla2xxx: ISP8044 poll ipmdio bus timeout improvement Saurav Kashyap
2014-04-11 20:54 ` [PATCH 25/42] qla2xxx: IOCB data should be copied to I/O mem using memcpy_toio Saurav Kashyap
2014-04-11 20:54 ` [PATCH 26/42] qla2xxx: Avoid escalating the SCSI error handler if the command is not found in firmware Saurav Kashyap
2014-04-11 20:54 ` [PATCH 27/42] qla2xxx: Adjust adapter reset routine to the changes in firmware specification for ISPFx00 Saurav Kashyap
2014-04-11 20:54 ` [PATCH 28/42] qla2xxx: Clear loop_id for ports that are marked lost during fabric scanning Saurav Kashyap
2014-04-11 20:54 ` [PATCH 29/42] qla2xxx: Check the QLA8044_CRB_DRV_ACTIVE_INDEX register when we are not the owner of the reset Saurav Kashyap
2014-04-11 20:54 ` [PATCH 30/42] qla2xxx: Reduce the time we wait for a command to complete during SCSI error handling Saurav Kashyap
2014-04-11 20:54 ` [PATCH 31/42] qla2xxx: ISP27xx firmware dump template spec updates (including T274) Saurav Kashyap
2014-04-11 20:54 ` [PATCH 32/42] qla2xxx: ISP27xx queue index shadow registers Saurav Kashyap
2014-04-11 20:54 ` [PATCH 33/42] qla2xxx: Delay driver unload if there is any pending activity going on Saurav Kashyap
2014-04-11 20:54 ` [PATCH 34/42] qla2xxx: Don't check for firmware hung during the reset context for ISP82XX Saurav Kashyap
2014-04-11 20:54 ` [PATCH 35/42] qla2xxx: Fix beacon blink logic for ISP26xx/83xx Saurav Kashyap
2014-04-11 20:54 ` [PATCH 36/42] qla2xxx: Add MBC option for fast SFP data access Saurav Kashyap
2014-04-11 20:54 ` [PATCH 37/42] qla2xxx: Remove mapped vp index iterator macro dead code Saurav Kashyap
2014-04-11 20:54 ` [PATCH 38/42] qla2xxx: T10-Dif: add T10-PI support Saurav Kashyap
2014-04-11 20:54 ` [PATCH 39/42] qla2xxx: ABTS cause double free of qla_tgt_cmd + Saurav Kashyap
2014-05-23 3:00 ` Nicholas A. Bellinger
2014-05-28 18:52 ` Quinn Tran
2014-04-11 20:54 ` [PATCH 40/42] qla2xxx: Do logins from a chip reset in DPC thread instead of the error handler thread Saurav Kashyap
2014-04-11 20:54 ` [PATCH 41/42] qla2xxx: Remove wait for online from host reset handler Saurav Kashyap
2014-04-11 20:54 ` [PATCH 42/42] qla2xxx: Update the driver version to 8.07.00.08-k Saurav Kashyap
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=1397249687-32666-4-git-send-email-saurav.kashyap@qlogic.com \
--to=saurav.kashyap@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).