History log of /drivers/scsi/qla2xxx/qla_dbg.c
Revision Date Author Comments
33e7997755936ba92516c6ad69cd012c2e7d4dbb 25-Sep-2014 Quinn Tran <quinn.tran@qlogic.com> qla2xxx: Add support for QFull throttling and Term Exchange retry

Through the qla target code, the qlt_send_term_exchange() routine
is used in various different places to cleanup an exchange. For the
case of IOCB request queue is full, the exchange is left unhandled/
dangling. Existing code does not have re-try logic to cleanup the
exchange. This patch add retry logic to cleanup the exchange before
letting new commands through.

For the case of FW running out of exchanges, driver need to reply
SAM_STAT_BUSY to the initiators. This patch add a pending queue
for the busy reply in case IOCB queue is unable to handle the cmd.

Cc: <stable@vger.kernel.org>
Signed-off-by: Quinn Tran <quinn.tran@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
c0cb44967b4a934252091557c8e46345f7ef7259 25-Sep-2014 Arun Easi <arun.easi@qlogic.com> qla2xxx: Add Host reset handling in target mode.

Signed-off-by: Arun Easi <arun.easi@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2486c62765d73ad8f206ba43b8ede09e689bd803 25-Sep-2014 Himanshu Madhani <himanshu.madhani@qlogic.com> qla2xxx: Restore WWPN in case of Loop Dead.

For FA-WWPN capable device, ISP2031 and ISP27XX, when loop
dead is detected by a driver, restore WWPN from NVRAM.

Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2d5a4c344ad35eaaab59a5079eb6c62a843fb9d6 25-Sep-2014 Himanshu Madhani <himanshu.madhani@qlogic.com> qla2xxx: Disable laser for ISP2031 while unloading driver.

Nameserver data on FC switch is not refreshed when
qla2xxx driver is unloaded. Disabling laser for
ISP2031 will force FC switch to rescan ports and
clear fdmi entries from Nameserver.

Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
b5a340dd858b5bdd2813756e14991dc64c0b16d9 25-Sep-2014 Joe Carnuccio <joe.carnuccio@qlogic.com> qla2xxx: Add diagnostic port functionality.

Add support for the D-port (diagnostic port) fabric switch feature.

(Fabric Switch initiates loopback style port testing)

Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
7c9c4766896335d2f20928ccc5d8ad2d1e621b9a 25-Sep-2014 Joe Carnuccio <joe.carnuccio@qlogic.com> qla2xxx: Add FA-WWN functionality.

Add support for the FA-WWN (fabric assigned wwn) fabric switch feature.

(Fabric Assigned World Wide Port Name)

Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
df57cabac41fd54e8eb73f9de482f054eb0b98eb 25-Sep-2014 Himanshu Madhani <himanshu.madhani@qlogic.com> qla2xxx: Add FDMI-2 functionality.

Add support for the FDMI-2 fabric switch feature.

Since FDMI-2 uses code from FDMI-1, some of the existing code
needed to be repaired to prevent fields from being overflowed.

Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
349c390f43c63c2c919b81beb84b3a7592f2dd14 25-Sep-2014 Joe Carnuccio <joe.carnuccio@qlogic.com> qla2xxx: ISP27xx fwdump template error print simplification.

Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2ac224bc0e9021520be95f6678c94440d526aa49 25-Sep-2014 Joe Carnuccio <joe.carnuccio@qlogic.com> qla2xxx: Add ISP27xx fwdump template entry T275 (insert buffer).

Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
01cb65f1bb3e71df1a0eb3393d3066ea0161a425 25-Sep-2014 Joe Carnuccio <joe.carnuccio@qlogic.com> qla2xxx: ISP27xx fwdump template remove high frequency debug logs.

Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
299f5e27ac5fac42f5be38a1cdf004b4e8217cbf 25-Sep-2014 Joe Carnuccio <joe.carnuccio@qlogic.com> qla2xxx: ISP27xx add tests for incomplete template.

Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
8e5a9484aee8d48f7dd3739c139ac684b30e6201 08-Aug-2014 Chad Dupuis <chad.dupuis@qlogic.com> qla2xxx: Remove restriction on starting remote device discovery on port update.

Limiting which port update events will allow the driver to kick off a
name server scan has been problematic in some corner cases so remove the
restriction and restore the previous semantic. Also move the link
up/down informational messages to the LOOP_UP and LOOP_DOWN events.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
63ee7072b55646a1914165de63681279d661a6fe 11-Apr-2014 Chad Dupuis <chad.dupuis@qlogic.com> qla2xxx: Remove wait for online from host reset handler.

This can block progress of the SCSI error handler thread and cause long I/O
outages. Instead just fail immediately if another reset is going on or we are
accessing flash memory.

Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
7108b76e87e9a31099f5d4ac0aed6c3b77dce728 11-Apr-2014 Chad Dupuis <chad.dupuis@qlogic.com> qla2xxx: Do logins from a chip reset in DPC thread instead of the error handler thread.

Attempting to do any logins from the SCSI reset handler can lead to a deadlock
scenario if a rport times out and the FC transport layer. Move doing any port
logins to the DPC thread so as not to impede the progress of the SCSI error
handler thread and avoid deadlock situations.

Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
f83adb617f55be13046191d83fa9110ff0689406 11-Apr-2014 Quinn Tran <quinn.tran@qlogic.com> qla2xxx: T10-Dif: add T10-PI support

Add support for T10-Dif for Target Mode to qla driver.
The driver will look for firmware attribute that support
this feature. When the feature is present, the capabilities
will be report to TCM layer.

Add CTIO CRC2 iocb to build T10-Dif commands.
Add support routines to process good & error cases.

Signed-off-by: Quinn Tran <quinn.tran@qlogic.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
c04964017ac418d8d559aa32fd2ad6876fa162f7 11-Apr-2014 Joe Carnuccio <joe.carnuccio@qlogic.com> qla2xxx: ISP27xx firmware dump template spec updates (including T274).

Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
a018d8ffde82d15fff27f09875bc3c1a704b1a33 11-Apr-2014 Hiral Patel <hiral.patel@qlogic.com> qla2xxx: Check the QLA8044_CRB_DRV_ACTIVE_INDEX register when we are not the owner of the reset.

Signed-off-by: Hiral Patel <hiral.patel@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
27f4b72f94208f9f82589214d5dfdae57d74f580 11-Apr-2014 Atul Deshmukh <atul.deshmukh@qlogic.com> qla2xxx: Use proper log message for flash lock failed error.

Signed-off-by: Atul Deshmukh <atul.deshmukh@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
bd21eaf92b249c9925b7fc2123b81167ff191270 11-Apr-2014 Armen Baloyan <armen.baloyan@qlogic.com> qla2xxx: Change copyright year to 2014 in all the source files.

Signed-off-by: Armen Baloyan <armen.baloyan@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
61f098dde16c6b535124d3acc8851bacd3d7e0d4 11-Apr-2014 Hiral Patel <hiral.patel@qlogic.com> qla2xxx: Introduce fw_dump_flag to track fw dump progress.

Signed-off-by: Hiral Patel <hiral.patel@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2f389fc47281dc5f0cfed1306ed22eba51bcc980 11-Apr-2014 Hiral Patel <hiral.patel@qlogic.com> qla2xxx: Remove unnecessary delays from fw dump code path.

Signed-off-by: Hiral Patel <hiral.patel@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
e8887c51f01911f3063e65c229e1f3be102031ba 11-Apr-2014 Joe Carnuccio <joe.carnuccio@qlogic.com> qla2xxx: Add ISP8044 serdes bsg interface.

Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
804df800256c1f2ff24b0350589d0bdad5300026 11-Apr-2014 Pratik Mohanty <pratik.mohanty@qlogic.com> qla2xxx: Support of new firmware dump opcodes QLA8044_RDDFE(38), QLA8044_RDMDIO(39),QLA8044_POLLWR(40).

Signed-off-by: Pratik Mohanty <pratik.mohanty@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
0d90c34cffdfad8623b2636323dce56c9d240d2b 11-Apr-2014 Joe Carnuccio <joe.carnuccio@qlogic.com> qla2xxx: Correct operations for ISP27xx template types 270 and 271.

Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
faef62d134631c1f390006d51d49c76033f9504f 26-Feb-2014 Armen Baloyan <armen.baloyan@qlogic.com> [SCSI] qla2xxx: Fix Task Management command asynchronous handling

- Fix interpreting the wrong IOCB type for task management
functions in the response path.
- Merge the task management function handling for various adapters.

Signed-off-by: Armen Baloyan <armen.baloyan@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
f73cb695d3eccd171f03ed194e72d67732b17487 26-Feb-2014 Chad Dupuis <chad.dupuis@qlogic.com> [SCSI] qla2xxx: Add support for ISP2071.

Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: Armen Baloyan <armen.baloyan@qlogic.com>
Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
03eb912a4d559c4c565814eaf2e18866c3d54487 30-Oct-2013 Armen Baloyan <armen.baloyan@qlogic.com> [SCSI] qla2xxx: Add changes to obtain ISPFX00 adapters product information in accordance with firmware update.

Signed-off-by: Armen Baloyan <armen.baloyan@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
db64e9301c067245928bfdbbd9c048cdba087927 30-Oct-2013 Joe Carnuccio <joe.carnuccio@qlogic.com> [SCSI] qla2xxx: Add BSG interface for read/write serdes register.

Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
e8f5e95d5a7db8c8f195bc92c0ca8363223a0a9e 30-Oct-2013 Armen Baloyan <armen.baloyan@qlogic.com> [SCSI] qla2xxx: Fix issue with not displaying node name after system reboot.

Signed-off-by: Armen Baloyan <armen.baloyan@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
f3ddac1918fe963bcbf8d407a3a3c0881b47248b 30-Oct-2013 Chad Dupuis <chad.dupuis@qlogic.com> [SCSI] qla2xxx: Disable adapter when we encounter a PCI disconnect.

If we become disconnected from the PCI bus/PCIe fabric, there can be long delays
in register reads which can cause erroneous decisions to be made and cause a
soft lockup if a lock is held too long. As a preventative measure, check for a
disconnection (register reads that return -1) and then disable the board if we
find ourselves in this condition. For now, check in our interrupt handlers and
the per adapter one second timer.

Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
a324031c4373fd9df55b771f8253f5df44371680 30-Oct-2013 Armen Baloyan <armen.baloyan@qlogic.com> [SCSI] qla2xxx: Print proper QLAFX00 product name at probe.

Signed-off-by: Armen Baloyan <armen.baloyan@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
36008cf118235cee49b6753455f33b6f2c3a7543 03-Oct-2013 Chad Dupuis <chad.dupuis@qlogic.com> [SCSI] qla2xxx: Fix request queue null dereference.

If an invalid IOCB is returned on the response queue then the index into the
request queue map could be invalid and could return to us a bogus value. This
could cause us to try to deference an invalid pointer and cause an exception.

If we encounter this condition, simply return as no context can be established
for this response.

Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
6ddcfef7e10b5e6faa05533674fcec4a7298ad3a 27-Aug-2013 Saurav Kashyap <saurav.kashyap@qlogic.com> [SCSI] qla2xxx: Correction to message ids.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
8c2cf7d4e387d003259488522523807f25576427 27-Aug-2013 Sawan Chandak <sawan.chandak@qlogic.com> [SCSI] qla2xxx: Add a new interface to update versions.

On any Adapter when we flash through FC/FCoE without card reset option it still
shows the Running FW version in Flashed FW version. This new interface will be
used by API to instruct the driver to update its cache versions.

Signed-off-by: Sawan Chandak <sawan.chandak@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
454073c905ba8f9f4c691146aaa3219b6ed593d5 27-Aug-2013 Santosh Vernekar <santosh.vernekar@qlogic.com> [SCSI] qla2xxx: Add loopback IDC-TIME-EXTEND aen handling support.

Earlier IDC-TIME-EXTEND aen was a nop and ignored by driver.
We now have to handle the aen so that other protocol drivers can use time
extension during some loopback operations.

Signed-off-by: Santosh Vernekar <santosh.vernekar@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
4881d095e6670c12e4606c6b1a7860f78e83daae 27-Aug-2013 Armen Baloyan <armen.baloyan@qlogic.com> [SCSI] qla2xxx: QLAFX00 make over temperature AEN handling informational, add log for normal temperature AEN

Signed-off-by: Armen Baloyan <armen.baloyan@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
71e56003621b2347405c65c3061e5dc0fa9cdd98 27-Aug-2013 Armen Baloyan <armen.baloyan@qlogic.com> [SCSI] qla2xxx: Add critical temperature handling for ISPFX00.

Signed-off-by: Armen Baloyan <armen.baloyan@qlogic.com>
Acked-by: Srinivasa Rao <srinivasa.rao@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
1ae47cf3007f8f8b7c71efad7ed484d9e1f2831d 27-Aug-2013 Joe Carnuccio <joe.carnuccio@qlogic.com> [SCSI] qla2xxx: Reconfigure thermal temperature.

For supported ISPS, Read asic temperature by calling the
GET PARAMS (type C) mailbox command.

Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
c46e65c7e544b85efaec1f0f82e64f9a00217b76 27-Aug-2013 Joe Carnuccio <joe.carnuccio@qlogic.com> [SCSI] qla2xxx: Add setting of driver version string for vendor application.

Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
a78951b23bdb164ec9d7cea3095e234cc40ff95a 27-Aug-2013 Chad Dupuis <chad.dupuis@qlogic.com> [SCSI] qla2xxx: Remove QL_DEBUG_LEVEL_17 defines from qla_nx.c.

Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
5854771e314e1c8ee79fc4c00989b91c3dec9421 27-Aug-2013 Armen Baloyan <armen.baloyan@qlogic.com> [SCSI] qla2xxx: Add ISPFX00 specific bus reset routine.

Signed-off-by: Armen Baloyan <armen.baloyan@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
da9b1d5cb9d408a1e634740c849187bc031929db 27-Aug-2013 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Correct multiqueue offset calculations.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
7ec0effd30bb4b1379cd2f5ed1a7bd6b9ec49cfd 27-Aug-2013 Atul Deshmukh <atul.deshmukh@qlogic.com> [SCSI] qla2xxx: Add support for ISP8044.

[jejb: checkpatch fixes]
Signed-off-by: Atul Deshmukh <atul.deshmukh@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
7f544d00698282655c7abed2262a39f5d9fe9283 25-Jun-2013 Bart Van Assche <bvanassche@acm.org> [SCSI] qla2xxx: Remove redundant assignments.

The value of the pointer called "nxt" is not used after the
"nxt = qla24xx_copy_eft(ha, nxt)" statement. Hence keep the function
call but remove the assignment.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
6593d5bdbdb26d848ac5afa469cdca7abd3298df 25-Jun-2013 Bart Van Assche <bvanassche@acm.org> [SCSI] qla2xxx: Remove dead code in qla2x00_configure_hba()

At the end of qla2x00_configure_hba() we know that rval == QLA_SUCCESS.
Hence remove the dead code.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
a44c72f309224973ffc7c7dfeee6e354c6f3d739 25-Jun-2013 Bart Van Assche <bvanassche@acm.org> [SCSI] qla2xxx: Clean up qla84xx_mgmt_cmd()

Remove dead code, simplify a pointer computation and move the
ql84_mgmt assignment to just before its first use.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
090fc2e2cf6a2763f609af6f128a812d5051d935 25-Jun-2013 Bart Van Assche <bvanassche@acm.org> [SCSI] qla2xxx: Clean up qla24xx_iidma()

Remove dead code and simplify a pointer computation.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
754d1243915d0fda6874fa0f1a926d85eb09e0b4 25-Jun-2013 Giridhar Malavali <giridhar.malavali@qlogic.com> [SCSI] qla2xxx: Clear the MBX_INTR_WAIT flag when the mailbox time-out happens.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
8ae6d9c7eb1004bc134813287010d57a863ba13b 28-Mar-2013 Giridhar Malavali <giridhar.malavali@qlogic.com> [SCSI] qla2xxx: Enhancements to support ISPFx00.

[jejb: fix up checkpatch issues]
Signed-off-by: Andrew Vazquez <andrew.vasquez@qlogic.com>
Signed-off-by: Armen Baloyan <armen.baloyan@qlogic.com>
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
00876ae85b47cdfe76aa08b1fffb27fd67425f53 25-Mar-2013 Arun Easi <arun.easi@qlogic.com> [SCSI] qla2xxx: Fix crash during firmware dump procedure.

System crashes, in initiator mode operation, with
qla2xxx_copy_atioqueues() in stack trace when firmware dump is
attempted.

Check for atio_q_length alone does not indicate if atio_ring is
allocated, make explicit check of atio_ring to avoid the crash.

Applicable to ISP24xx, ISP25xx, ISP81xx & ISP83xx line of HBAs.

Signed-off-by: Arun Easi <arun.easi@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
e9f4f418076f7d08a73667472b5f74a02965221d 25-Mar-2013 Joe Carnuccio <joe.carnuccio@qlogic.com> [SCSI] Revert "qla2xxx: Add setting of driver version string for vendor application."

The original patch was not covering all the adapters and firmwares.

This commit reverts 3a11711ad00caebee07e262d188cea66f3473c38.

Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
fe52f6e121a8e6b66a608b79deb1c383e08aa32f 08-Feb-2013 Joe Carnuccio <joe.carnuccio@qlogic.com> [SCSI] qla2xxx: Integrate generic card temperature with mezz card temperature.

Give priority to I2C thermal.

Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
3a11711ad00caebee07e262d188cea66f3473c38 08-Feb-2013 Joe Carnuccio <joe.carnuccio@qlogic.com> [SCSI] qla2xxx: Add setting of driver version string for vendor application.

Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
1e63395ce04f6d64f67c64d87762d2b6d48ec4d4 08-Feb-2013 Saurav Kashyap <saurav.kashyap@qlogic.com> [SCSI] qla2xxx: Update the copyright information.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
6c315553285533d6785ec313e437c3b3ab89ad47 08-Feb-2013 Saurav Kashyap <saurav.kashyap@qlogic.com> [SCSI] qla2xxx: Display the lock owner on lock acquire failure.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
61e1b269be20f2bd81d0e6a2ccdc42eca3a6f059 08-Feb-2013 Joe Carnuccio <joe.carnuccio@qlogic.com> [SCSI] qla2xxx: Do link initialization on get loop id failure.

To avoid continually doing ISP resets when get loop id fails to
obtain the adapter loop id, first try to do a link initialization.

Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
1bcc46cb74d3ba7471eac57af8931ca1a03e7b36 08-Feb-2013 Chad Dupuis <chad.dupuis@qlogic.com> [SCSI] qla2xxx: Reject loopback request if one is already in progress.

If another function on the port has initiated a loopback operation do not
process the current request.

Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
37f489b580929c542dddc4bb6389d3aeb9bd39be 08-Feb-2013 Joe Carnuccio <joe.carnuccio@qlogic.com> [SCSI] qla2xxx: Print thermal unsupported message.

When the Read SFP mailbox command fails on the thermal device,
print a message explaining that thermal is not supported.

Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
78d56df6174f6858f79620e0e06ece326a744353 30-Jan-2013 Saurav Kashyap <saurav.kashyap@qlogic.com> [SCSI] qla2xxx: Correction to the message ids.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
33c36c0a556c307a2430e92148d5e8d5a84d29df 30-Jan-2013 Arun Easi <arun.easi@qlogic.com> [SCSI] qla2xxx: Prevent enabling target mode for unsupported HBAs.

Signed-off-by: Arun Easi <arun.easi@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
aa230bc55c169b76a229ff3f927141edf02e7b3a 30-Jan-2013 Arun Easi <arun.easi@qlogic.com> [SCSI] qla2xxx: Enable target mode support for ISP83xx.

Signed-off-by: Arun Easi <arun.easi@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
3c290d0b5f8ff7b0fd2c964c5ec2c14191a9e790 30-Jan-2013 Chad Dupuis <chad.dupuis@qlogic.com> [SCSI] qla2xxx: Ramp down queue depth for attached SCSI devices when driver resources are low.

Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
8d93f5502221cc8eb420da65dc86a5ef07b038d0 30-Jan-2013 Chad Dupuis <chad.dupuis@qlogic.com> [SCSI] qla2xxx: Determine the number of outstanding commands based on available resources.

Base the number of outstanding requests the driver will keep track of on the
available resources instead of being hard-coded.

Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
68d91cbd5267e15a7c6da1415a1c65a9506aed96 21-Nov-2012 Saurav Kashyap <saurav.kashyap@qlogic.com> [SCSI] qla2xxx: Display that driver is operating in legacy interrupt mode.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
8c0bc701f9cd393119056cf6c9863bc5503cb0dd 21-Nov-2012 Saurav Kashyap <saurav.kashyap@qlogic.com> [SCSI] qla2xxx: Fix typo in qla83xx_fw_dump function.

Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
fa4926306a8ea67a1cdd4f6b3407a23653dab0d2 21-Nov-2012 Saurav Kashyap <saurav.kashyap@qlogic.com> [SCSI] qla2xxx: Fix for warnings reported by sparse.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
9e522cd8f3dd7d19b644fc9cfc372bebde9f0053 22-Aug-2012 Arun Easi <arun.easi@qlogic.com> [SCSI] qla2xxx: T10 DIF - ISP83xx changes.

Signed-off-by: Arun Easi <arun.easi@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2a8593f80d576425de5332bc2d1319eb2683b9d5 22-Aug-2012 Saurav Kashyap <saurav.kashyap@qlogic.com> [SCSI] qla2xxx: Get fcal position map should not be called for p2p topology.

Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
bf5b8ad7bd7ad56fc4d4132996babb74443672d6 22-Aug-2012 Chad Dupuis <chad.dupuis@qlogic.com> [SCSI] qla2xxx: Fix for handling some error conditions in loopback.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
0251ce8cf22fa4b531dfa8257497038eb0ac2b90 22-Aug-2012 Saurav Kashyap <saurav.kashyap@qlogic.com> [SCSI] qla2xxx: set idc version if function is first one to come.

Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
46152ceb7c9d3bc39715a9994122a6e403cd3db8 22-Aug-2012 Chad Dupuis <chad.dupuis@qlogic.com> [SCSI] qla2xxx: Update the driver copyright.

Update the driver copyright from 2003-2011 to 2003-2012.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
8fcd6b8b0fbc61fb1af2960dcec8b23bd2211372 22-Aug-2012 Chad Dupuis <chad.dupuis@qlogic.com> [SCSI] qla2xxx: Changes for ISP83xx loopback support.

Minor changes to support loopback functionality with ISP83xx CNAs.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
81178772b636a0effe65c98f85a50dc32427b436 22-Aug-2012 Saurav Kashyap <saurav.kashyap@qlogic.com> [SCSI] qla2xxx: Implemetation of mctp.

[jejb: fix up checkpatch errors]
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
7d613ac6acec8c29e7aa3f80e28e8e982977a151 22-Aug-2012 Santosh Vernekar <santosh.vernekar@qlogic.com> [SCSI] qla2xxx: IDC implementation for ISP83xx.

Signed-off-by: Santosh Vernekar <santosh.vernekar@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
a9b6f722f62d0a302b980a4fdcdf9c9933955772 22-Aug-2012 Saurav Kashyap <saurav.kashyap@qlogic.com> [SCSI] qla2xxx: Implementation of bidirectional.

[jejb: merge fix for introduced warning]
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
5f16b331d83757ad5154af07b449c722fef45d5e 22-Aug-2012 Chad Dupuis <chad.dupuis@qlogic.com> [SCSI] qla2xxx: Use bitmap to store loop_id's for fcports.

Store used fcport loop_id's in a bitmap so that as opposed to looping through
all fcports to find the next free loop_id, new loop_id lookup can be just be
done via bitops.

[jejb: plus fix for incorrect LOOPID_MAP_SIZE from Andrew Vasquez]
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
d6a03581a3f55da93763cc51b3949340824c37bc 22-Aug-2012 Masanari Iida <standby24x7@gmail.com> [SCSI] qla2xxx: Fix typo in qla2xxx files

Correct spelling typo within qla2xxx files.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
7916bb90e258392b34881fb68e98e60f0203d328 22-Aug-2012 Chad Dupuis <chad.dupuis@qlogic.com> [SCSI] qla2xxx: Add check in qla82xx_watchdog for failed hardware state.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2d70c103fd2a066f904712b14239a5ce141f8236 15-May-2012 Nicholas Bellinger <nab@linux-iscsi.org> [SCSI] qla2xxx: Add LLD target-mode infrastructure for >= 24xx series

Add LLD target mode for >= 24xx series HW. This code was originally based on
external qla2x00t module based on 8.02.01-k4, and has been refactored to
push the bulk of code into mainline qla2xxx.ko LLD -> qla_target.c.

The implementation uses internal workqueues for I/O context submission
into tcm_qla2xxx code, and includes the struct qla_tgt_func_tmpl API for
external interaction to allow qla2xxx LDD to function without direct
target-core dependencies:

It also enables qla_target.c usage within existing qla2xxx LLD code.
This includes:

*) Addition of target mode specific members to existing data
structures in qla_def.h and struct qla_hw_data->tgt_ops using
qla_target.h:struct qla_tgt_func_tmpl

*) Addition of struct qla_tgt_func_tmpl and direct calls into
qla_target.c logic w/ qlt_* prefixed functions.

*) Addition of qla_iocb.c:qla2x00_req_pkt() for ring processing, and
qla2x00_issue_marker() for handling request/response queue processing
for target mode operation

*) Addition of various qla_tgt_mode_enabled() logic checks in
qla24xx_nvram_config(), qla2x00_initialize_adapter(), qla2x00_rff_id(),
qla2x00_abort_isp(), qla24xx_modify_vp_config(), and
qla2x00_vp_abort_isp().

By default the new qlini_mode module parameter is setting initiator-mode
to 'enabled' in order for 'modprobe qla2xxx' to continue to function as
expected in initiator only mode. Enabling target-mode operation will
currently require a:

modprobe qla2xxx qlini_mode="disabled"

in order to explictly disabled initiator mode and allow target-mode
to be enabled via tcm_qla2xxx configfs fabric callers.

(nab: Convert to qlini_mode='enabled' by default in qla_target.c)
(joern: Remove loop_id from qla_tgt_make_local_sess() arguments +
Remove unused s_id + fix s_id endianness bug +
simplify qla_tgt_abort_work)
(gerard: fix section __exit mismatch in qla_tgt_exit)
(arun: Capture ATIO queue during firmware dump + Send SCR in target mode +
Target mode review comments)
(roland: Don't create duplicate target sessions to address tearing down
ACLs with IO in flight + Add missing call to qlt_fc_port_deleted
call during qla2x00_schedule_rport_del timeout)

Signed-off-by: Nicholas A. Bellinger <nab@linux-iscsi.org>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
daae62a33e4f9b998cc8bf985fdf9eda62c10e57 15-May-2012 Chad Dupuis <chad.dupuis@qlogic.com> [SCSI] qla2xxx: Log link up and link down messages to track link flops.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
5f28d2d7c62ac154895882fece5841c87454fb79 15-May-2012 Saurav Kashyap <saurav.kashyap@qlogic.com> [SCSI] qla2xxx: Add ql_dbg_verbose logging level.

Add an extra layer of logging granularity for messages that are necessary in
some circumstances but may flood the kernel log buffer with too many messages
otherwise.

Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
5988aeb28fa0090520f912c44f5a35cf69de7d70 15-May-2012 Giridhar Malavali <giridhar.malavali@qlogic.com> [SCSI] qla2xxx: Detect PEG errors.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
4aee57667e9b237d0bd0c5a167c8b6103a27756a 25-Apr-2012 Giridhar Malavali <giridhar.malavali@qlogic.com> [SCSI] qla2xxx: Proper completion to scsi-ml for scsi status task_set_full and busy.

In case of firmmware detected under-run condition and scsi status of
task_set_full or busy_condition, return that to the mid layer for proper error
handling instead of DID_ERROR (which causes error handler activation and a
full retry).

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
642ef983861a6a7ba41e9d7c0aa4da8f6d5af5bf 09-Feb-2012 Chad Dupuis <chad.dupuis@qlogic.com> [SCSI] qla2xxx: Add ha->max_fibre_devices to keep track of the maximum number of targets.

Add a field to the qla_hw_data struct to allow us to set the maximum number of
fabric devices on a per adapter basis based on ISP type.

[jejb: fix up missing rval = QLA_SUCCESS to prevent uninit var warning]
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
733a95bd39d79c5759c1f7016a94c08e7367076d 09-Feb-2012 Joe Carnuccio <joe.carnuccio@qlogic.com> [SCSI] qla2xxx: Remove EDC sysfs interface.

Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
557cf7857cbf396f899034f1a7a13e245ef7e914 09-Feb-2012 Arun Easi <arun.easi@qlogic.com> [SCSI] qla2xxx: Add new message when a new loopid is assigned.

Signed-off-by: Arun Easi <arun.easi@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
70a3fc7671a70d3ba3e606a38bd70834f08d10f3 09-Feb-2012 Chad Dupuis <chad.dupuis@qlogic.com> [SCSI] qla2xxx: Use ql_log* #define's in ql_log() and ql_log_pci().

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
3256b435819195ce06696e206b792ad41083528a 09-Feb-2012 Chad Dupuis <chad.dupuis@qlogic.com> [SCSI] qla2xxx: Convert remaining printk's to ql_log format.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
af11f64dfd634e8116b7c4e2422e0e0c698b91c1 09-Feb-2012 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Perform implicit logout during rport tear-down.

During rport tear-down, make sure we do an implicit LOGO of the fcport in our
firmware to try to clear any residual commands associated with that fcport.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
0b91d1169e5382040d80622fe79e40c60ff88555 09-Feb-2012 Chad Dupuis <chad.dupuis@qlogic.com> [SCSI] qla2xxx: Handle failure cases during fabric_login

Make sure that all calls to ha->isp_ops->fabric_login() check the
return value for failure.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
9ba56b95a588906a65664a9299a9f8ac1a0f6a91 09-Feb-2012 Giridhar Malavali <giridhar.malavali@qlogic.com> [SCSI] qla2xxx: Consolidation of SRB processing.

Rework the structures related to SRB processing to minimize the memory
allocations per I/O and manage resources associated with and completions
from common routines.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
6246b8a1d26c7cdb77fd2f3f3578d4db025d5c9e 09-Feb-2012 Giridhar Malavali <giridhar.malavali@qlogic.com> [SCSI] qla2xxx: Enhancements to support ISP83xx.

Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Harish Zunjarrao <harish.zunjarrao@qlogic.com>
Signed-off-by: Nigel Kirkland <nigel.kirkland@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
050c9bb1361439e63dafb5f192f87b81d8ffbf4a 09-Feb-2012 Giridhar Malavali <giridhar.malavali@qlogic.com> [SCSI] qla2xxx: Enhanced the dump routines to capture multiple request and response queues.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
d051a5aa1c234c8de01fc0a488b1a18d65246150 09-Feb-2012 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Add an "is reset active" helper.

Many locations within the driver would use an inconsistent set of
checks to determine ISP-reset state. Consolidate the checks into
this inline-helper.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
5162cf0c4e3962b28a9c8bc1ce89d266db67aa55 18-Nov-2011 Giridhar Malavali <giridhar.malavali@qlogic.com> [SCSI] qla2xxx: Consolidated IOCB processing routines.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
3cb0a67d6d0f5af55ab9673893cd8e8148025331 18-Nov-2011 Giridhar Malavali <giridhar.malavali@qlogic.com> [SCSI] qla2xxx: Fix to include FCE data as part of dump.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
cfb0919c12a33132f75fb91971bbd8bdd44ebb90 18-Nov-2011 Chad Dupuis <chad.dupuis@qlogic.com> [SCSI] qla2xxx: Update to dynamic logging.

This patch contains minor fixes to our new logging infrastructure:

- Remove extranous messages.
- Re-add 'nexus' and 'hdl' information.
- Adjusted the message ids to fill up the holes.
- Display FCP_CMND priority on update.
- Log only mail box error conditions.
- Do not print "Firmware ready **** FAILED ****" if cable is unplugged.
- Drop noisy 'fw_state...curr time...' message.
- Correct nexus display during abort.
- Add a special case error-logging set to '1'.
- Catagorize I/O exception display handling.
- Correct the bsg msg code printing.
- Dont use dynamic logging after host is removed.

Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
086b3e8a399ecd089534280597cfba45b2b55887 18-Nov-2011 Joe Perches <joe@perches.ccom> [SCSI] qla2xxx: Use less stack to emit logging messages.

Return early when logging level too low.
Use normal kernel codeing style for function braces.
Add const where appropriate to logging functions.
Remove now unused #define QL_DBG_BUF_LEN.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
631549169801df054210839cfda0aceef78966af 18-Nov-2011 Giridhar Malavali <giridhar.malavali@qlogic.com> [SCSI] qla2xxx: Disable generating pause frames when firmware hang detected for ISP82xx.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
c8f6544e6d831f05720687f3536d5cbc290ff181 18-Nov-2011 Chad Dupuis <chad.dupuis@qlogic.com> [SCSI] qla2xxx: Encapsulate prematurely completing mailbox commands during ISP82xx firmware hang.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
999916dc59dc2fb0de221ad607d58cdc88fcbbe4 16-Aug-2011 Saurav Kashyap <saurav.kashyap@qlogic.com> [SCSI] qla2xxx: Implemeted beacon on/off for ISP82XX.

[jejb: fix up checkpatch.pl errors]
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
08de2844c626511cfd1db9c36e5e7d126707f780 16-Aug-2011 Giridhar Malavali <giridhar.malavali@qlogic.com> [SCSI] qla2xxx: Add support for ISP82xx to capture dump (minidump) on failure.

Minidump allows us to catpure a snapshot of the firmware/hardware states at the
time of failure for further analysis.

[jejb: added missing #include <linux/vmalloc.h>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> ]
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
e02587d777bfb398f70709fd3a92fa0154959003 16-Aug-2011 Arun Easi <arun.easi@qlogic.com> [SCSI] qla2xxx: T10 DIF - Fix incorrect error reporting.

This fix:
- Disables app tag peeking; correct tag check will be added when the
SCSI API is available.
- Always derive ref_tag from scsi_get_lba()
- Removes incorrect swap of FCP_LUN in FCP_CMND
- Moves app-tag error check before ref-tag check. The reason being,
currently there is no interface in SCSI to retrieve the app-tag
for protection I/Os, so driver puts zero for app-tag in the
firmware interface, but requests not to validate it, but when a
ref-tag error is detected by firmware, it would put
expected/actual tags for all the protection tags (guard/app/ref).
As driver checks for app tag error first, a ref-tag error is
incorrectly flagged as app-tag error.
- Convert HBA specific checks to capability based.

Signed-off-by: Arun Easi <arun.easi@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
92fd65c095f0dedd3c874904fb63ddc8fb7836fd 14-Jul-2011 Saurav Kashyap <saurav.kashyap@qlogic.com> [SCSI] qla2xxx: Cleanup of previous infrastructure.

Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
7c3df1320e5e875478775e78d01a09aee96b8abe 14-Jul-2011 Saurav Kashyap <saurav.kashyap@qlogic.com> [SCSI] qla2xxx: Code changes to support new dynamic logging infrastructure.

The code is changed to support the new dynamic logging infrastructure.
Following are the levels added.
Default is 0 - no logging. 0x40000000 - Module Init & Probe.
0x20000000 - Mailbox Cmnds. 0x10000000 - Device Discovery.
0x08000000 - IO tracing. 0x04000000 - DPC Thread.
0x02000000 - Async events. 0x01000000 - Timer routines.
0x00800000 - User space. 0x00400000 - Task Management.
0x00200000 - AER/EEH. 0x00100000 - Multi Q.
0x00080000 - P3P Specific. 0x00040000 - Virtual Port.
0x00020000 - Buffer Dump. 0x00010000 - Misc.
0x7fffffff - For enabling all logs, can be too many logs.

Setting ql2xextended_error_logging module parameter to any of the above
value, will enable the debug for that particular level.
Do LOGICAL OR of the value to enable more than one level.

Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
3ce8866ceae87258cf66d1f7fd72abc918753cec 14-Jul-2011 Saurav Kashyap <saurav.kashyap@qlogic.com> [SCSI] qla2xxx: Basic infrastructure for dynamic logging.

This patch adds the dynamic logging framework to the qla2xxx driver.
The user will be able to change the logging levels on the fly i.e.
without load/unload of the driver. This also enables logging to be
enabled for a particular section of the driver such as initialization,
device discovery etc.

Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
07e264b76d1db5794614ca3d726fdf1c0399dac0 30-Mar-2011 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Update copyright banner.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
de7c5d059dbd245ad80011725f9c86f560e61fff 23-Jul-2010 Giridhar Malavali <giridhar.malavali@qlogic.com> [SCSI] qla2xxx: Update copyright banner.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
bad750028917a7b804623701d0674e46c6012c18 05-May-2010 Arun Easi <arun.easi@qlogic.com> [SCSI] qla2xxx: T10 DIF support added.

Signed-off-by: Duane Grigsby <duane.grigsby@qlogic.com>
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
a9083016a5314b3aeba6e0d2e814872e72168c08 13-Apr-2010 Giridhar Malavali <giridhar.malavali@qlogic.com> [SCSI] qla2xxx: Add ISP82XX support.

Enhanced the driver to support new FCoE host bus adapter.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
3420d36cac2f1d28fc99290de12dd66dfaf65d8e 14-Oct-2009 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Add firmware-dump kobject uevent notification.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
e18e963b7e533149676b5d387d0a56160df9f111 17-Jun-2009 Andrew Vasquez <andrew.vasquez@qlogic.com> qla2xxx: Correct (again) overflow during dump-processing on large-memory ISP23xx parts.

Commit 7b867cf76fbcc8d77867cbec6f509f71dce8a98f ([SCSI] qla2xxx:
Refactor qla data structures) inadvertently reverted
e792121ec85672c1fa48f79d13986a3f4f56c590 ([SCSI] qla2xxx: Correct
overflow during dump-processing on large-memory ISP23xx parts.).

Cc: stable@kernel.org
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
aed10881129c52f0e5dc1c96ac706b5ce7708a13 03-Jun-2009 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Query supported RISC registers bits in determining a paused-state.

ISP24xx and above must query the host-status register, not HCCR.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2afa19a9377ca61b9489e44bf50029574fbe63be 07-Apr-2009 Anirban Chakraborty <anirban.chakraborty@qlogic.com> [SCSI] qla2xxx: Add QoS support.

Set the number of request queues to the module paramater
ql2xmaxqueues. Each vport gets a request queue. The QoS value
set to the request queues determines priority control for queued
IOs. If QoS value is not specified, the vports use the default
queue 0.

Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
3a03eb797ce76ae8868a1497e9e746ad0add1e3b 05-Jan-2009 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Add ISP81XX support.

Codes to support new FCoE boards.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
d63ab53394f408f9e59f5b6ba0580f8c6ef2357a 05-Jan-2009 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Correct MQ-chain information retrieval during a firmware dump.

Original code would not read request/response queue pointers.
Also, collapse code into a helper qla25xx_copy_mq() function in
preparation for newer ISP parts.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
bb99de6703526ebed42e29b8dee402df235f28c7 05-Jan-2009 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Collapse EFT/FCE copy procedures during a firmware dump.

In preparation for new ISP types with varying dump procedures.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
73208dfd7ab19f379d73e8a0fbf30f92c203e5e8 10-Dec-2008 Anirban Chakraborty <anirban.chakraborty@qlogic.com> [SCSI] qla2xxx: add support for multi-queue adapter

Following changes have been made.
1. qla_hw_data structure holds an array for request queue pointers,
and an array for response queue pointers.
2. The base request and response queues are created by default.
3. Additional request and response queues are created at the time of vport
creation. If queue resources are exhausted during vport creation, newly
created vports use the default queue.
4. Requests are sent to the request queue that the vport was assigned
in the beginning.
5. Responses are completed on the response queue with which the request queue
is associated with.

[fixup memcpy argument reversal spotted by davej@redhat.com]
Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
7b867cf76fbcc8d77867cbec6f509f71dce8a98f 06-Nov-2008 Anirban Chakraborty <anirban.chakraborty@qlogic.com> [SCSI] qla2xxx: Refactor qla data structures

Following changes have been made to the qla2xxx FC driver in
preparation for the multi- queue and future SR IOV hardware.

1. scsi_qla_host structure has been changed to contain scsi host
specific data only.

2. A new structure, qla_hw_data is created to contain HBA specific
hardware data.

3. Request and response IO specific data strucures are created.

4. The global list of fcports for the hba is not maintained anymore,
instead a fcport list is construted on per scsi_qla_host.

Signed-of-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
e792121ec85672c1fa48f79d13986a3f4f56c590 11-Jul-2008 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Correct overflow during dump-processing on large-memory ISP23xx parts.

Total ram words can exceed a 16bit value on large-memory boards.
Safely extend to a 32bit width.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
c5722708c236b51286651b8c07855f764239453b 25-Apr-2008 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Collapse RISC-RAM retrieval code during a firmware-dump.

Use the more efficient read-DMA'ble-buffer mailbox commands
rather than reading a single word/dword at a time. We also
remove a bulk of the duplicate mailbox command-handling codes in
favor of more generic read-memory() routines (qla2xxx_dump_ram()
and qla24xx_dump_ram()).

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
587f4cae4a8ce1315c3def2229c2a912637269b6 03-Apr-2008 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Cruft cleanup of functions and structures.

Strip unused (DEBUG-ONLY) enabled functions, inlines, useless
wrappers, and unused DPC flags from the code. Another step in
the migration towards a cleaner (less-crusty) driver.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
01e58d8eac93f3b73246b8d0bdee071d9fb85661 03-Apr-2008 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Update copyright banner.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
df613b96077cee826b14089ae6e75eeabf71faa3 17-Jan-2008 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Add Fibre Channel Event (FCE) tracing support.

FCE support enables the firmware to record FC extended link
services and basic link services frames which have been
transmitted and received by the ISP. This allows for a limited
view of the FC traffic through the ISP without using a FC
analyzer. This can be useful in situations where a physical
connection to the FC bus is not possible.

The driver exports this information in two ways -- first, via a
debugfs node exported for all supported ISPs under:

<debugfs_mount_point>/qla2xxx/qla2xxx_<host_no>/fce

where a read of the 'fce' file will provide a snapshot of the
firmware's FCE buffer; and finally, the FCE buffer will be
extracted during a firmware-dump scenario.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
a824ebb37c1a1c5fd8e19b47bf5c14cb7b419b48 17-Jan-2008 Adrian Bunk <bunk@kernel.org> [SCSI] qla2xxx: Code cleanups.

- make the following needlessly global code static:
- qla_attr.c: qla24xx_vport_delete()
- qla_attr.c: qla24xx_vport_disable()
- qla_mid.c: qla24xx_allocate_vp_id()
- qla_mid.c: qla24xx_find_vhost_by_name()
- qla_mid.c: qla2x00_do_dpc_vp()
- qla_os.c: struct qla2x00_driver_template
- qla_os.c: qla2x00_stop_timer()
- qla_os.c: qla2x00_mem_alloc()
- qla_os.c: qla2x00_mem_free()
- qla_sup.c: qla2x00_lock_nvram_access()
- qla_sup.c: qla2x00_unlock_nvram_access()
- qla_sup.c: qla2x00_get_nvram_word()
- qla_sup.c: qla2x00_write_nvram_word()
- #if 0 the following unused global functions:
- qla_mbx.c: qla2x00_system_error()
- qla_os.c: remove some unneeded function prototypes
- removed unused functions:
- qla_dbg.c: qla2x00_dump_pkt()
- qla_mbx.c: qla2x00_get_serdes_params()
- qla_mbx.c: qla2x00_get_idma_speed()
- qla_mbx.c: qla24xx_get_vp_database()
- qla_mbx.c: qla24xx_get_vp_entry()

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Small modifications and
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
f363b9434a464e72927b468ba33cb548f482669f 20-Sep-2007 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Use shost_priv().

Drop usage of legacy to_qla_host() macro.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
b58369273956775c3e8b7bbbe152593d52762099 20-Sep-2007 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Query additional RISC registers during ISP25XX firmware dump.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
c3b058afaea11273835f59694f8645a89915be9c 20-Sep-2007 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Correct staging of RISC while attempting to pause.

There's no need to reset the RISC prior to pausing.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
c81d04c9e27966c0e4c5650d130f209bff9671f9 26-Jul-2007 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Collapse and simplify ISP2XXX firmware dump routines.

Add IO-base-window accessor functions. Merge duplicate
RISC-pause and soft-reset code segments. Drop 'eye-watering'
__iomem casting.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
6afd9763c1b16f12653e5bcb9376886c82805bd5 13-Aug-2007 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Correct mailbox register dump for FWI2 capable ISPs.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
c3a2f0dfe1cecac76950f340f540c1a887dd2500 20-Jul-2007 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Add ISP25XX support.

Large code-reuse from ISP24xx, consolidate RISC memory
extraction routines during firmware-dump.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
385d70b4e2659ae525a00e46a9f97146949cfc14 25-May-2007 FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> [SCSI] qla2xxx: convert to use the data buffer accessors

- remove the unnecessary map_single path.

- convert to use the new accessors for the sg lists and the
parameters.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
a7a167bf7e2d196fc33f292e7b02e90fee03bc9a 24-Jun-2006 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Rework firmware-trace facilities.

- Defer firmware dump-data raw-to-textual conversion to
user-space.
- Add module parameter (ql2xallocfwdump) to allow for per-HBA
allocations of firmware dump memory.
- Dump request and response queue data as per firmware group
request.
- Add extended firmware trace support for ISP24XX/ISP54XX chips.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
d4e3e04d789ba23027c66e176b10ac7477906948 18-May-2006 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Consolidate firmware-dump handling across ISPs.

Simplify and centralise buffer allocation/deallocation, as
there's no point in having two memory request methods.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
75bc4190701d3c6bdffdc21c8a9e17751de9f77a 18-May-2006 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Drop unused driver cruft.

- structure definitions.
- structure members.
- #define's.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
210d53507e961b0f480d1a86d9a26832cc68645e 14-Jan-2006 andrew.vasquez@qlogic.com <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Update firmware-dump procedure for ISP24xx.

Small changes to register retrieval and order as per latest
firmware specification.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
335a1cc976ffbb58491a9b6dc58955349e3f0388 08-Nov-2005 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Correct ISP24xx soft-reset handling.

A driver must wait 100us before attempting an MMIO operation
to the RISC after a soft-reset has been initiated. A
similar delay was needed with earlier ISPs.

Note: a PCI config-space read is used to flush the MMIO
write to the ISP, since the ISP's state machines are unable
to respond to any MMIO read during the reset process.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
fa90c54f6d27664cc67691f9e52d9165e0c25ca7 27-Oct-2005 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Update license.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
b95adac775aad29f79ffbbaf5db0e4d8d57f2714 09-Sep-2005 viro@ZenIV.linux.org.uk <viro@ZenIV.linux.org.uk> [PATCH] trivial iomem annotations in qla2xxx/qla_dbg.c

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
88c2666351f41a7d4459e79594f687a356f5e57c 09-Jul-2005 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Consolidate ISP24xx chip reset logic.

Consolidate ISP24xx chip reset logic.

Consolidate near-duplicate RISC reset logic from
qla24xx_reset_chip() and qla24xx_chip_diag(). Also, after
initiating a soft-reset, insure the firmware has completed
all NVRAM accesses before continuing.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
ae91193cd5bc80b4d62b1d4f0e7f3fea48f41ccd 06-Jul-2005 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Update copyright banner.

Update copyright banner.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
fa2a1ce53d4b869b74da9a770770c79f9af64914 06-Jul-2005 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Code scrubbing.

Code scrubbing.

- Remove trailing whitespace from driver files.
- Remove unused #defines and inlines.
- Standardize on C comments (// -> /* */)

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
6d9b61ed94fd9097f81adfa78d31c4613d9b3ae4 06-Jul-2005 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Add ISP24xx diagnostic routines.

Add ISP24xx diagnostic routines.

Add function and structure definitions for the ISP24xx
diagnostic firmware dump routines.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
3d71644cf952fd1157a13173237258422ba3c569 06-Jul-2005 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Add ISP24xx definitions.

Add ISP24xx definitions.

Add requisite structure definitions and #define's for ISP24xx
support. Also drop volatile modifiers from device_reg_* register
layouts as the members are never really accessed, only their
offsets within the layout are used during reads and writes.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
abbd8870b9cb7754a4935826bc9f3c7b029f8b7c 06-Jul-2005 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] qla2xxx: Factor-out ISP specific functions to method-based call tables.

Factor-out ISP specific functions to method-based call tables.

In anticipation of ISP24xx/ISP25xx support, factor-out ISP
specific functions into a method-based call table.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
354d6b2196c8e53e55e8f169804256ab9c72731d 23-Apr-2005 Andrew Vasquez <andrew.vasquez@qlogic.com> [SCSI] remove some dead code in qla2xxx

Original from: Christoph Hellwig <hch@lst.de>

Modified and
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
bdf796210e01145fd77bbb3ae644d04f982b6c3b 17-Apr-2005 <andrew.vasquez@qlogic.com> [PATCH] qla2xxx: remove lun discovery codes...

Remove internal lun discovery routines and support
structures.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
c6295cdf656de63d6d1123def71daba6cd91939c 03-Apr-2005 <htejun@gmail.com> [PATCH] scsi: remove meaningless scsi_cmnd->serial_number_at_timeout field

scsi_cmnd->serial_number_at_timeout doesn't serve any purpose
anymore. All serial_number == serial_number_at_timeout tests
are always true in abort callbacks. Kill the field. Also, as
->pid always equals ->serial_number and ->serial_number
doesn't have any special meaning anymore, update comments
above ->serial_number accordingly. Once we remove all uses of
this field from all lldd's, this field should go.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
84011ae88da62a20b3ae7b48e2ae3b1ef0fc810a 03-Apr-2005 <htejun@gmail.com> [PATCH] scsi: remove meaningless scsi_cmnd->serial_number_at_timeout field

scsi_cmnd->serial_number_at_timeout doesn't serve any purpose
anymore. All serial_number == serial_number_at_timeout tests
are always true in abort callbacks. Kill the field. Also, as
->pid always equals ->serial_number and ->serial_number
doesn't have any special meaning anymore, update comments
above ->serial_number accordingly. Once we remove all uses of
this field from all lldd's, this field should go.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 17-Apr-2005 Linus Torvalds <torvalds@ppc970.osdl.org> Linux-2.6.12-rc2

Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.

Let it rip!