* Removing the qlogicfc driver
@ 2004-01-16 16:49 James Bottomley
0 siblings, 0 replies; 10+ messages in thread
From: James Bottomley @ 2004-01-16 16:49 UTC (permalink / raw)
To: SCSI Mailing List
Now that the qla2xxx driver is in the kernel, I don't see any reason to
keep the qlogicfc driver hanging around.
Unless anyone has a good reason why not, I'll remove it in the next SCSI
patch set.
James
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Removing the qlogicfc driver
@ 2004-01-16 22:18 christophe.varoqui
0 siblings, 0 replies; 10+ messages in thread
From: christophe.varoqui @ 2004-01-16 22:18 UTC (permalink / raw)
To: linux-scsi
Hello,
I report that I can't see no LUN with the qla2xxx+qla2200 driver whereas the
qlogicfc driver works fine (well until it BUGs :)
The LUNs are in StorageWorks EVA5000 & EMA8000 arrays.
The HBAs are 2 PCI qlogic 2200, latest bios.
Intel x86 arch.
The switchs are Brocade SilkWorm 8 ports 2 Gb/s
with qlogicfc :
xa-s03:~# multipath -v -d
600508b4000156d700012000000b0000 (0 0 1 1) /dev/sda [HSV110 (C)COMPAQ]
600508b4000156c30001200000210000 (0 0 1 2) /dev/sdb [HSV110 (C)COMPAQ]
60001fe1000bdad0000903507109004b (0 0 3 1) /dev/sdc [HSG80 ]
60001fe1000bdad000090371312100bf (0 0 3 2) /dev/sdd [HSG80 ]
60001fe1000bdad000090371312100c2 (0 0 3 3) /dev/sde [HSG80 ]
60001fe1000bdad00009037131210067 (0 0 4 1) /dev/sdf [HSG80 ]
60001fe1000bdad000090371312100b3 (0 0 4 2) /dev/sdg [HSG80 ]
60001fe1000bdad00009035071090024 (0 0 4 3) /dev/sdh [HSG80 ]
600508b4000156d700012000000b0000 (0 0 5 1) /dev/sdi [HSV110 (C)COMPAQ]
600508b4000156c30001200000210000 (0 0 5 2) /dev/sdj [HSV110 (C)COMPAQ]
600508b4000156d700012000000b0000 (1 0 1 1) /dev/sdk [HSV110 (C)COMPAQ]
600508b4000156c30001200000210000 (1 0 1 2) /dev/sdl [HSV110 (C)COMPAQ]
600508b4000156d700012000000b0000 (1 0 3 1) /dev/sdm [HSV110 (C)COMPAQ]
600508b4000156c30001200000210000 (1 0 3 2) /dev/sdn [HSV110 (C)COMPAQ]
with qla2200 beta* : nothing
Some debug info (let me know if I can provide more) :
---
kernel release :
2.6.0 + udm2 patchset (ie mm2 + devmapper stuff)
compilation cookie as reported by modinfo :
2.6.0-mm2 SMP PENTIUM4 gcc-3.3
---
kernel log :
QLogic Fibre Channel HBA Driver (f89c7000)
qla2200 0000:03:01.0: Found an ISP2200, irq 20, iobase 0xf8844000
qla2200 0000:03:01.0: Configuring PCI space...
qla2200 0000:03:01.0: Configure NVRAM parameters...
qla2200 0000:03:01.0: Verifying loaded RISC code...
qla2200 0000:03:01.0: Waiting for LIP to complete...
qla2200 0000:03:01.0: LOOP UP detected (1 Gbps).
qla2200 0000:03:01.0: Topology - (F_Port), Host Loop address 0xffff
scsi2 : qla2xxx
qla2200 0000:03:01.0:
QLogic Fibre Channel HBA Driver: 8.00.00b9
QLogic QLA22xx -
ISP2200: PCI (66 MHz) @ 0000:03:01.0 hdma-, host#=2, fw=2.02.06 TP
qla2200 0000:06:01.0: Found an ISP2200, irq 24, iobase 0xf8846000
qla2200 0000:06:01.0: Configuring PCI space...
qla2200 0000:06:01.0: Configure NVRAM parameters...
qla2200 0000:06:01.0: Verifying loaded RISC code...
qla2200 0000:06:01.0: Waiting for LIP to complete...
qla2200 0000:06:01.0: LIP reset occured (f7f7).
qla2200 0000:06:01.0: LOOP UP detected (1 Gbps).
qla2200 0000:06:01.0: Topology - (F_Port), Host Loop address 0xffff
scsi3 : qla2xxx
qla2200 0000:06:01.0:
QLogic Fibre Channel HBA Driver: 8.00.00b9
QLogic QLA22xx -
ISP2200: PCI (66 MHz) @ 0000:06:01.0 hdma-, host#=3, fw=2.02.06 TP
---
xa-s03:~# cat /proc/scsi/qla2xxx/2
QLogic PCI to Fibre Channel Host Adapter for QLA22xx:
Firmware version 2.02.06 TP, Driver version 8.00.00b9
Entry address = f89c7000
ISP: ISP2200, Serial# C23881
Request Queue = 0x367c0000, Response Queue = 0x379ca000
Request Queue count = 1024, Response Queue count = 64
Total number of active commands = 0
Total number of interrupts = 29196
Device queue depth = 0x10
Number of free request entries = 1023
Number of mailbox timeouts = 0
Number of ISP aborts = 0
Number of loop resyncs = 0
Number of retries for empty slots = 0
Number of reqs in pending_q= 0, retry_q= 0, done_q= 0, scsi_retry_q= 0
Host adapter:loop state = <READY>, flags = 0x1c83
Dpc flags = 0x0
MBX flags = 0x0
Link down Timeout = 000
Port down retry = 008
Login retry count = 008
Commands retried with dropped frame(s) = 0
Product ID = 4953 5020 2020 0001
SCSI Device Information:
scsi-qla0-adapter-node=200000e08b03896a;
scsi-qla0-adapter-port=210000e08b03896a;
SCSI LUN Information:
(Id:Lun) * - indicates lun is not registered with the OS.
xa-s03:~#
---
lspci -vvv exerpt :
06:01.0 SCSI storage controller: QLogic Corp. QLA2200 (rev 05)
Subsystem: QLogic Corp. QLA2200
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop- ParErr+
Stepping- SERR+ FastB2B-
Status: Cap+ 66Mhz+ UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort-
<TAbort- <MAbort- >SERR- <PERR-
Latency: 64 (16000ns min), Cache Line Size: 0x20 (128 bytes)
Interrupt: pin A routed to IRQ 24
Region 0: I/O ports at 5000 [size=256]
Region 1: Memory at f7ff0000 (32-bit, non-prefetchable) [size=4K]
Expansion ROM at <unassigned> [disabled] [size=128K]
Capabilities: [44] Power Management version 1
Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA
PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Removing the qlogicfc driver
[not found] <B179AE41C1147041AA1121F44614F0B0598E38@AVEXCH02.qlogic.org>
@ 2004-01-17 12:57 ` christophe.varoqui
2004-01-17 20:21 ` Andrew Vasquez
2004-01-18 21:14 ` christophe.varoqui
1 sibling, 1 reply; 10+ messages in thread
From: christophe.varoqui @ 2004-01-17 12:57 UTC (permalink / raw)
To: Andrew Vasquez; +Cc: linux-scsi
On Friday 16 January 2004 23:57, Andrew Vasquez wrote:
> Hmm, from the output of proc/scsi/qla* your two 2200 don't appear to
> be recognizing any devices after the SNS scan:
> Could you enable enable a couple of debug swtiches:
> Andrew Vasquez
Yes, here it is :
qla2200 0000:03:01.0: Found an ISP2200, irq 20, iobase 0xf8848000
qla2200 0000:03:01.0: Configuring PCI space...
qla2200 0000:03:01.0: Configure NVRAM parameters...
qla2200 0000:03:01.0: Verifying loaded RISC code...
scsi(4): **** Load RISC code ****
scsi(4): Verifying Checksum of loaded RISC code.
scsi(4): Checksum OK, start firmware.
scsi(4): Issue init firmware.
qla2200 0000:03:01.0: Waiting for LIP to complete...
scsi(4): Asynchronous P2P MODE received.
scsi(4): Asynchronous P2P MODE received.
scsi(4): Asynchronous LOOP UP (1 Gbps).
qla2200 0000:03:01.0: LOOP UP detected (1 Gbps).
scsi(4): Asynchronous PORT UPDATE.
scsi(4): Port database changed 0000 4000.
scsi(4): F/W Ready - OK
scsi(4): fw_state=3 curr time=4926cc4.
qla2200 0000:03:01.0: Topology - (F_Port), Host Loop address 0xffff
scsi(4): Configure loop -- dpc flags =0x80040
scsi(4): RSCN queue entry[0] = [00/000000].
scsi(4): device_resync: rscn overflow.
qla2x00_mailbox_command(4): **** FAILED. mbx0=4005, mbx1=0, mbx2=3c, cmd=54
****
qla2x00_issue_iocb(4): failed rval 0x102qla2x00_issue_iocb(4): failed rval
0x102scsi(4): RFT_ID issue IOCB failed (258).
scsi(4): Register FC-4 TYPE failed.
qla2x00_mailbox_command(4): **** FAILED. mbx0=4005, mbx1=0, mbx2=3c, cmd=54
****
qla2x00_issue_iocb(4): failed rval 0x102qla2x00_issue_iocb(4): failed rval
0x102scsi(4): RFF_ID issue IOCB failed (258).
scsi(4): Register FC-4 Features failed.
qla2x00_mailbox_command(4): **** FAILED. mbx0=4005, mbx1=0, mbx2=3c, cmd=54
****
qla2x00_issue_iocb(4): failed rval 0x102qla2x00_issue_iocb(4): failed rval
0x102scsi(4): RNN_ID issue IOCB failed (258).
scsi(4): Register Node Name failed.
qla2x00_mailbox_command(4): **** FAILED. mbx0=4005, mbx1=0, mbx2=3c, cmd=54
****
qla2x00_issue_iocb(4): failed rval 0x102qla2x00_issue_iocb(4): failed rval
0x102scsi(4): GID_PT issue IOCB failed (258).
qla2x00_mailbox_command(4): **** FAILED. mbx0=4005, mbx1=0, mbx2=3c, cmd=54
****
qla2x00_issue_iocb(4): failed rval 0x102qla2x00_issue_iocb(4): failed rval
0x102scsi(4): GA_NXT issue IOCB failed (258).
scsi(4): Configure fabric error exit: rval=258
scsi(4): LOOP READY
DEBUG: detect hba 4 at address = e45201d4
scsi4 : qla2xxx
qla2200 0000:03:01.0:
QLogic Fibre Channel HBA Driver: 8.00.00b9-debug
QLogic QLA22xx -
ISP2200: PCI (66 MHz) @ 0000:03:01.0 hdma-, host#=4, fw=2.02.06 TP
qla2200 0000:06:01.0: Found an ISP2200, irq 24, iobase 0xf884a000
qla2200 0000:06:01.0: Configuring PCI space...
qla2200 0000:06:01.0: Configure NVRAM parameters...
qla2200 0000:06:01.0: Verifying loaded RISC code...
scsi(5): **** Load RISC code ****
scsi(4): Asynchronous PORT UPDATE ignored.
scsi(5): Verifying Checksum of loaded RISC code.
scsi(5): Checksum OK, start firmware.
scsi(5): Issue init firmware.
qla2200 0000:06:01.0: Waiting for LIP to complete...
scsi(5): Asynchronous LIP RESET (f7f7).
qla2200 0000:06:01.0: LIP reset occured (f7f7).
scsi(5): Asynchronous P2P MODE received.
scsi(5): Asynchronous LOOP UP (1 Gbps).
qla2200 0000:06:01.0: LOOP UP detected (1 Gbps).
scsi(5): Asynchronous PORT UPDATE.
scsi(5): Port database changed 0000 4000.
scsi(5): F/W Ready - OK
scsi(5): fw_state=3 curr time=492762e.
qla2200 0000:06:01.0: Topology - (F_Port), Host Loop address 0xffff
scsi(5): Configure loop -- dpc flags =0x80040
scsi(5): RSCN queue entry[0] = [00/000000].
scsi(5): device_resync: rscn overflow.
qla2x00_mailbox_command(5): **** FAILED. mbx0=4005, mbx1=0, mbx2=3c, cmd=54
****
qla2x00_issue_iocb(5): failed rval 0x102qla2x00_issue_iocb(5): failed rval
0x102scsi(5): RFT_ID issue IOCB failed (258).
scsi(5): Register FC-4 TYPE failed.
qla2x00_mailbox_command(5): **** FAILED. mbx0=4005, mbx1=0, mbx2=3c, cmd=54
****
qla2x00_issue_iocb(5): failed rval 0x102qla2x00_issue_iocb(5): failed rval
0x102scsi(5): RFF_ID issue IOCB failed (258).
scsi(5): Register FC-4 Features failed.
qla2x00_mailbox_command(5): **** FAILED. mbx0=4005, mbx1=0, mbx2=3c, cmd=54
****
qla2x00_issue_iocb(5): failed rval 0x102qla2x00_issue_iocb(5): failed rval
0x102scsi(5): RNN_ID issue IOCB failed (258).
scsi(5): Register Node Name failed.
qla2x00_mailbox_command(5): **** FAILED. mbx0=4005, mbx1=0, mbx2=3c, cmd=54
****
qla2x00_issue_iocb(5): failed rval 0x102qla2x00_issue_iocb(5): failed rval
0x102scsi(5): GID_PT issue IOCB failed (258).
qla2x00_mailbox_command(5): **** FAILED. mbx0=4005, mbx1=0, mbx2=3c, cmd=54
****
qla2x00_issue_iocb(5): failed rval 0x102qla2x00_issue_iocb(5): failed rval
0x102scsi(5): GA_NXT issue IOCB failed (258).
scsi(5): Configure fabric error exit: rval=258
scsi(5): LOOP READY
DEBUG: detect hba 5 at address = dd9741d4
scsi5 : qla2xxx
qla2200 0000:06:01.0:
QLogic Fibre Channel HBA Driver: 8.00.00b9-debug
QLogic QLA22xx -
ISP2200: PCI (66 MHz) @ 0000:06:01.0 hdma-, host#=5, fw=2.02.06 TP
scsi(5): Asynchronous PORT UPDATE ignored.
scsi(5): Asynchronous PORT UPDATE ignored.
scsi(5): Asynchronous PORT UPDATE ignored.
regards,
cvaroqui
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Removing the qlogicfc driver
2004-01-17 12:57 ` christophe.varoqui
@ 2004-01-17 20:21 ` Andrew Vasquez
0 siblings, 0 replies; 10+ messages in thread
From: Andrew Vasquez @ 2004-01-17 20:21 UTC (permalink / raw)
To: linux-scsi
On Sat, 17 Jan 2004, christophe.varoqui wrote:
> On Friday 16 January 2004 23:57, Andrew Vasquez wrote:
>
> > Hmm, from the output of proc/scsi/qla* your two 2200 don't appear to
> > be recognizing any devices after the SNS scan:
> > Could you enable enable a couple of debug swtiches:
> > Andrew Vasquez
>
> Yes, here it is :
>
[snip]
> scsi(4): Asynchronous PORT UPDATE.
> scsi(4): Port database changed 0000 4000.
> scsi(4): F/W Ready - OK
> scsi(4): fw_state=3 curr time=4926cc4.
Firmware appears to be ready.
> qla2200 0000:03:01.0: Topology - (F_Port), Host Loop address 0xffff
F_PORT connection to the switch, we should have a PortID.
> scsi(4): Configure loop -- dpc flags =0x80040
> scsi(4): RSCN queue entry[0] = [00/000000].
> scsi(4): device_resync: rscn overflow.
> qla2x00_mailbox_command(4): **** FAILED. mbx0=4005, mbx1=0, mbx2=3c, cmd=54
> ****
> qla2x00_issue_iocb(4): failed rval 0x102qla2x00_issue_iocb(4): failed rval
> 0x102scsi(4): RFT_ID issue IOCB failed (258).
[snip]
> qla2x00_issue_iocb(4): failed rval 0x102qla2x00_issue_iocb(4): failed rval
> 0x102scsi(4): GA_NXT issue IOCB failed (258).
> scsi(4): Configure fabric error exit: rval=258
>
Yet it seems all of our SNS commands are failing to be executed with a
4005 (command error). Interesting, I'll need to talk with the
firmware folks on Monday.
In the interim, after the 8.x series driver is loaded, could you use
the switch software to take a look at the name-server's list of
recognized devices. I'm interested to know the information (port_id,
nn, pn, etc) it has related to the ports of the 2200s (from a previous
email, 210000e08b03896a).
Regards,
Andrew Vasquez
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Removing the qlogicfc driver
[not found] <B179AE41C1147041AA1121F44614F0B0598E38@AVEXCH02.qlogic.org>
2004-01-17 12:57 ` christophe.varoqui
@ 2004-01-18 21:14 ` christophe.varoqui
1 sibling, 0 replies; 10+ messages in thread
From: christophe.varoqui @ 2004-01-18 21:14 UTC (permalink / raw)
To: Andrew Vasquez; +Cc: linux-scsi
2 independant switches,
each HBA connected to a different switch.
Here are the required info on one of them (QLA2200 in port 3) :
swtest20:admin> switchshow
switchName: swtest20
switchType: 16.2
switchState: Online
switchMode: Native
switchRole: Principal
switchDomain: 20
switchId: fffc14
switchWwn: 10:00:00:60:69:c0:4e:51
switchBeacon: OFF
Zoning: OFF
port 0: id N1 In_Sync Disabled
port 1: id N2 Online F-Port 50:00:1f:e1:50:00:ae:19
port 2: id N1 Online F-Port 10:00:00:00:c9:2a:35:26
port 3: id N1 Online F-Port 21:00:00:e0:8b:03:8a:6a
port 4: id N2 Online F-Port 10:00:00:00:c9:33:4d:60
port 5: id N2 Online F-Port 50:00:1f:e1:50:00:ae:1c
port 6: id N1 Online F-Port 10:00:00:00:c9:25:97:5e
port 7: -- N2 No_Module
swtest20:admin> nsshow
{
Type Pid COS PortName NodeName TTL(sec)
N 141100; 3;50:00:1f:e1:50:00:ae:19;50:00:1f:e1:50:00:ae:10; na
FC4s: FCP
PortSymb: [39] "HSV110 (C)COMPAQ - EVA_TEST - ENT-V2005"
Fabric Port Name: 20:01:00:60:69:c0:4e:51
N 141200; 2,3;10:00:00:00:c9:2a:35:26;20:00:00:00:c9:2a:35:26; na
FC4s: FCIP FCP
Fabric Port Name: 20:02:00:60:69:c0:4e:51
N 141300; 3;21:00:00:e0:8b:03:8a:6a;20:00:00:e0:8b:03:8a:6a; na
Fabric Port Name: 20:03:00:60:69:c0:4e:51
N 141400; 2,3;10:00:00:00:c9:33:4d:60;20:00:00:00:c9:33:4d:60; na
FC4s: FCP
PortSymb: [49] "UNIX (emx0) FCA-2354 S/W Rev 2.07: F/W Rev 3.81a4"
Fabric Port Name: 20:04:00:60:69:c0:4e:51
N 141500; 3;50:00:1f:e1:50:00:ae:1c;50:00:1f:e1:50:00:ae:10; na
FC4s: FCP
PortSymb: [39] "HSV110 (C)COMPAQ - EVA_TEST - ENT-V2005"
Fabric Port Name: 20:05:00:60:69:c0:4e:51
N 141600; 2,3;10:00:00:00:c9:25:97:5e;20:00:00:00:c9:25:97:5e; na
NodeSymb: [35] "Emulex LP8000 FV3.81A1 DV5-4.81A9 "
Fabric Port Name: 20:06:00:60:69:c0:4e:51
The Local Name Server has 6 entries }
swtest20:admin> nsallshow
{
141100 141200 141300 141400 141500 141600
6 Nx_Ports in the Fabric }
regards,
cvaroqui
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: Removing the qlogicfc driver
@ 2004-01-19 17:28 Andrew Vasquez
0 siblings, 0 replies; 10+ messages in thread
From: Andrew Vasquez @ 2004-01-19 17:28 UTC (permalink / raw)
To: christophe.varoqui; +Cc: linux-scsi
On Sunday, January 18, 2004 1:15 PM, christophe.varoqui wrote:
> 2 independant switches,
> each HBA connected to a different switch.
>
> Here are the required info on one of them (QLA2200 in port 3) :
>
Thanks. I have some firmware engineers looking at the
information. There was another problem reported on linux-scsi
with respect to undetected storage (subject: 'No LUNs detected
with 2.6.1-mm4 qla2xxx / qla2300' and '[patch] Have qla2xxx
driver bind fcports.', _but_ I don't believe that to be your
problem since the driver is having problems discovering any
devices.
Regards,
Andrew Vasquez
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: Removing the qlogicfc driver
@ 2004-01-20 0:46 Andrew Vasquez
2004-01-20 13:42 ` christophe.varoqui
0 siblings, 1 reply; 10+ messages in thread
From: Andrew Vasquez @ 2004-01-20 0:46 UTC (permalink / raw)
To: christophe.varoqui; +Cc: linux-scsi
[-- Attachment #1: Type: text/plain, Size: 912 bytes --]
On , linux-scsi-owner@vger.kernel.org wrote:
> 2 independant switches,
> each HBA connected to a different switch.
>
> Here are the required info on one of them (QLA2200 in port 3) :
>
Ok, this turned out to be my mess-up. As it turns out the 2200 fw
doesn't support the MS IOCB interface the driver uses to issue CT
commands to the SNS. Basically, I had to forward-port some code
from the 6.x driver to get the SNS calls to go through. I have
several machines (mixture of 2200s/2300s/others with loop and
fabric connections) in my test rings running with the attached patch.
If you would, I'd like for you to try out the attached patch. It's
delta'd against the qla2xxx driver in the -mm4 tree.
Please let me know how it works out for you. I'd like to forward
it along for inclusion once I get a bit more internal runtime in my
rings.
Thanks for your patience,
Andrew Vasquez
[-- Attachment #2: QL3_sns_fix_2200.diff --]
[-- Type: application/octet-stream, Size: 22562 bytes --]
diff -Nurd -X dontdiff-bk 80000b8-mm4/qla_def.h 80000b8-mm4-fabric/qla_def.h
--- 80000b8-mm4/qla_def.h 2004-01-19 10:47:39.645949864 -0800
+++ 80000b8-mm4-fabric/qla_def.h 2004-01-19 13:30:42.786686408 -0800
@@ -1890,6 +1890,60 @@
} p;
};
+/*
+ * SNS command structures -- for 2200 compatability.
+ */
+#define RFT_ID_SNS_SCMD_LEN 22
+#define RFT_ID_SNS_CMD_SIZE 60
+#define RFT_ID_SNS_DATA_SIZE 16
+
+#define RFF_ID_SNS_SCMD_LEN 8
+#define RFF_ID_SNS_CMD_SIZE 32
+#define RFF_ID_SNS_DATA_SIZE 16
+
+#define RNN_ID_SNS_SCMD_LEN 10
+#define RNN_ID_SNS_CMD_SIZE 36
+#define RNN_ID_SNS_DATA_SIZE 16
+
+#define GA_NXT_SNS_SCMD_LEN 6
+#define GA_NXT_SNS_CMD_SIZE 28
+#define GA_NXT_SNS_DATA_SIZE (620 + 16)
+
+#define GID_PT_SNS_SCMD_LEN 6
+#define GID_PT_SNS_CMD_SIZE 28
+#define GID_PT_SNS_DATA_SIZE (MAX_FIBRE_DEVICES * 4 + 16)
+
+#define GPN_ID_SNS_SCMD_LEN 6
+#define GPN_ID_SNS_CMD_SIZE 28
+#define GPN_ID_SNS_DATA_SIZE (8 + 16)
+
+#define GNN_ID_SNS_SCMD_LEN 6
+#define GNN_ID_SNS_CMD_SIZE 28
+#define GNN_ID_SNS_DATA_SIZE (8 + 16)
+
+struct sns_cmd_pkt {
+ union {
+ struct {
+ uint16_t buffer_length;
+ uint16_t reserved_1;
+ uint32_t buffer_address[2];
+ uint16_t subcommand_length;
+ uint16_t reserved_2;
+ uint16_t subcommand;
+ uint16_t size;
+ uint32_t reserved_3;
+ uint8_t param[36];
+ } cmd;
+
+ uint8_t rft_data[RFT_ID_SNS_DATA_SIZE];
+ uint8_t rff_data[RFF_ID_SNS_DATA_SIZE];
+ uint8_t rnn_data[RNN_ID_SNS_DATA_SIZE];
+ uint8_t gan_data[GA_NXT_SNS_DATA_SIZE];
+ uint8_t gid_data[GID_PT_SNS_DATA_SIZE];
+ uint8_t gpn_data[GPN_ID_SNS_DATA_SIZE];
+ uint8_t gnn_data[GNN_ID_SNS_DATA_SIZE];
+ } p;
+};
/* IO descriptors */
#define MAX_IO_DESCRIPTORS 32
@@ -2164,10 +2218,14 @@
uint8_t rscn_in_ptr;
uint8_t rscn_out_ptr;
+ /* SNS command interfaces. */
ms_iocb_entry_t *ms_iocb;
dma_addr_t ms_iocb_dma;
struct ct_sns_pkt *ct_sns;
dma_addr_t ct_sns_dma;
+ /* SNS command interfaces for 2200. */
+ struct sns_cmd_pkt *sns_cmd;
+ dma_addr_t sns_cmd_dma;
pid_t dpc_pid;
int dpc_should_die;
diff -Nurd -X dontdiff-bk 80000b8-mm4/qla_gs.c 80000b8-mm4-fabric/qla_gs.c
--- 80000b8-mm4/qla_gs.c 2004-01-19 10:47:39.646949712 -0800
+++ 80000b8-mm4-fabric/qla_gs.c 2004-01-19 16:10:00.680665664 -0800
@@ -31,6 +31,17 @@
static inline struct ct_sns_req *
qla2x00_prep_ct_req(struct ct_sns_req *, uint16_t, uint16_t);
+static inline struct sns_cmd_pkt *
+qla2x00_prep_sns_cmd(scsi_qla_host_t *, uint16_t, uint16_t, uint16_t);
+
+static int qla2x00_sns_ga_nxt(scsi_qla_host_t *, fc_port_t *);
+static int qla2x00_sns_gid_pt(scsi_qla_host_t *, sw_info_t *);
+static int qla2x00_sns_gpn_id(scsi_qla_host_t *, sw_info_t *);
+static int qla2x00_sns_gnn_id(scsi_qla_host_t *, sw_info_t *);
+static int qla2x00_sns_rft_id(scsi_qla_host_t *);
+static int qla2x00_sns_rff_id(scsi_qla_host_t *);
+static int qla2x00_sns_rnn_id(scsi_qla_host_t *);
+
/**
* qla2x00_prep_ms_iocb() - Prepare common MS IOCB fields for SNS CT query.
* @ha: HA context
@@ -90,6 +101,7 @@
return (ct_req);
}
+
/**
* qla2x00_ga_nxt() - SNS scan for fabric devices via GA_NXT command.
* @ha: HA context
@@ -106,6 +118,10 @@
struct ct_sns_req *ct_req;
struct ct_sns_rsp *ct_rsp;
+ if (IS_QLA2200(ha)) {
+ return (qla2x00_sns_ga_nxt(ha, fcport));
+ }
+
/* Issue GA_NXT */
/* Prepare common MS IOCB */
ms_pkt = qla2x00_prep_ms_iocb(ha, GA_NXT_REQ_SIZE, GA_NXT_RSP_SIZE);
@@ -190,6 +206,10 @@
struct ct_sns_gid_pt_data *gid_data;
+ if (IS_QLA2200(ha)) {
+ return (qla2x00_sns_gid_pt(ha, list));
+ }
+
gid_data = NULL;
/* Issue GID_PT */
@@ -263,6 +283,10 @@
struct ct_sns_req *ct_req;
struct ct_sns_rsp *ct_rsp;
+ if (IS_QLA2200(ha)) {
+ return (qla2x00_sns_gpn_id(ha, list));
+ }
+
for (i = 0; i < MAX_FIBRE_DEVICES; i++) {
/* Issue GPN_ID */
/* Prepare common MS IOCB */
@@ -308,7 +332,7 @@
}
/**
- * qla2x00_gnn_id() - SNS Get Node Name (GPN_ID) query.
+ * qla2x00_gnn_id() - SNS Get Node Name (GNN_ID) query.
* @ha: HA context
* @list: switch info entries to populate
*
@@ -324,6 +348,10 @@
struct ct_sns_req *ct_req;
struct ct_sns_rsp *ct_rsp;
+ if (IS_QLA2200(ha)) {
+ return (qla2x00_sns_gnn_id(ha, list));
+ }
+
for (i = 0; i < MAX_FIBRE_DEVICES; i++) {
/* Issue GNN_ID */
/* Prepare common MS IOCB */
@@ -462,6 +490,10 @@
struct ct_sns_req *ct_req;
struct ct_sns_rsp *ct_rsp;
+ if (IS_QLA2200(ha)) {
+ return (qla2x00_sns_rft_id(ha));
+ }
+
/* Issue RFT_ID */
/* Prepare common MS IOCB */
ms_pkt = qla2x00_prep_ms_iocb(ha, RFT_ID_REQ_SIZE, RFT_ID_RSP_SIZE);
@@ -516,6 +548,10 @@
struct ct_sns_req *ct_req;
struct ct_sns_rsp *ct_rsp;
+ if (IS_QLA2200(ha)) {
+ return (qla2x00_sns_rff_id(ha));
+ }
+
/* Issue RFF_ID */
/* Prepare common MS IOCB */
ms_pkt = qla2x00_prep_ms_iocb(ha, RFF_ID_REQ_SIZE, RFF_ID_RSP_SIZE);
@@ -569,6 +605,10 @@
struct ct_sns_req *ct_req;
struct ct_sns_rsp *ct_rsp;
+ if (IS_QLA2200(ha)) {
+ return (qla2x00_sns_rnn_id(ha));
+ }
+
/* Issue RNN_ID */
/* Prepare common MS IOCB */
ms_pkt = qla2x00_prep_ms_iocb(ha, RNN_ID_REQ_SIZE, RNN_ID_RSP_SIZE);
@@ -624,6 +664,12 @@
struct ct_sns_req *ct_req;
struct ct_sns_rsp *ct_rsp;
+ if (IS_QLA2200(ha)) {
+ DEBUG2(printk("scsi(%ld): RSNN_ID call unsupported on "
+ "ISP2200.\n", ha->host_no));
+ return (QLA_SUCCESS);
+ }
+
/* Issue RSNN_NN */
/* Prepare common MS IOCB */
/* Request size adjusted after CT preparation */
@@ -679,3 +725,454 @@
return (rval);
}
+
+
+/**
+ * qla2x00_prep_sns_cmd() - Prepare common SNS command request fields for query.
+ * @ha: HA context
+ * @cmd: GS command
+ * @scmd_len: Subcommand length
+ * @data_size: response size in bytes
+ *
+ * Returns a pointer to the @ha's sns_cmd.
+ */
+static inline struct sns_cmd_pkt *
+qla2x00_prep_sns_cmd(scsi_qla_host_t *ha, uint16_t cmd, uint16_t scmd_len,
+ uint16_t data_size)
+{
+ uint16_t wc;
+ struct sns_cmd_pkt *sns_cmd;
+
+ sns_cmd = ha->sns_cmd;
+ memset(sns_cmd, 0, sizeof(struct sns_cmd_pkt));
+ wc = data_size / 2; /* Size in 16bit words. */
+ sns_cmd->p.cmd.buffer_length = cpu_to_le16(wc);
+ sns_cmd->p.cmd.buffer_address[0] = cpu_to_le32(LSD(ha->sns_cmd_dma));
+ sns_cmd->p.cmd.buffer_address[1] = cpu_to_le32(MSD(ha->sns_cmd_dma));
+ sns_cmd->p.cmd.subcommand_length = cpu_to_le16(scmd_len);
+ sns_cmd->p.cmd.subcommand = cpu_to_le16(cmd);
+ wc = (data_size - 16) / 4; /* Size in 32bit words. */
+ sns_cmd->p.cmd.size = cpu_to_le16(wc);
+
+ return (sns_cmd);
+}
+
+/**
+ * qla2x00_sns_ga_nxt() - SNS scan for fabric devices via GA_NXT command.
+ * @ha: HA context
+ * @fcport: fcport entry to updated
+ *
+ * This command uses the old Exectute SNS Command mailbox routine.
+ *
+ * Returns 0 on success.
+ */
+static int
+qla2x00_sns_ga_nxt(scsi_qla_host_t *ha, fc_port_t *fcport)
+{
+ int rval;
+
+ struct sns_cmd_pkt *sns_cmd;
+
+ /* Issue GA_NXT. */
+ /* Prepare SNS command request. */
+ sns_cmd = qla2x00_prep_sns_cmd(ha, GA_NXT_CMD, GA_NXT_SNS_SCMD_LEN,
+ GA_NXT_SNS_DATA_SIZE);
+
+ /* Prepare SNS command arguments -- port_id. */
+ sns_cmd->p.cmd.param[0] = fcport->d_id.b.al_pa;
+ sns_cmd->p.cmd.param[1] = fcport->d_id.b.area;
+ sns_cmd->p.cmd.param[2] = fcport->d_id.b.domain;
+
+ /* Execute SNS command. */
+ rval = qla2x00_send_sns(ha, ha->sns_cmd_dma, GA_NXT_SNS_CMD_SIZE / 2,
+ sizeof(struct sns_cmd_pkt));
+ if (rval != QLA_SUCCESS) {
+ /*EMPTY*/
+ DEBUG2_3(printk("scsi(%ld): GA_NXT Send SNS failed (%d).\n",
+ ha->host_no, rval));
+ } else if (sns_cmd->p.gan_data[8] != 0x80 ||
+ sns_cmd->p.gan_data[9] != 0x02) {
+ DEBUG2_3(printk("scsi(%ld): GA_NXT failed, rejected request, "
+ "ga_nxt_rsp:\n", ha->host_no));
+ DEBUG2_3(qla2x00_dump_buffer(sns_cmd->p.gan_data, 16));
+ rval = QLA_FUNCTION_FAILED;
+ } else {
+ /* Populate fc_port_t entry. */
+ fcport->d_id.b.domain = sns_cmd->p.gan_data[17];
+ fcport->d_id.b.area = sns_cmd->p.gan_data[18];
+ fcport->d_id.b.al_pa = sns_cmd->p.gan_data[19];
+
+ memcpy(fcport->node_name, &sns_cmd->p.gan_data[284], WWN_SIZE);
+ memcpy(fcport->port_name, &sns_cmd->p.gan_data[20], WWN_SIZE);
+
+ if (sns_cmd->p.gan_data[16] != NS_N_PORT_TYPE &&
+ sns_cmd->p.gan_data[16] != NS_NL_PORT_TYPE)
+ fcport->d_id.b.domain = 0xf0;
+
+ DEBUG2_3(printk("scsi(%ld): GA_NXT entry - "
+ "nn %02x%02x%02x%02x%02x%02x%02x%02x "
+ "pn %02x%02x%02x%02x%02x%02x%02x%02x "
+ "portid=%02x%02x%02x.\n",
+ ha->host_no,
+ fcport->node_name[0], fcport->node_name[1],
+ fcport->node_name[2], fcport->node_name[3],
+ fcport->node_name[4], fcport->node_name[5],
+ fcport->node_name[6], fcport->node_name[7],
+ fcport->port_name[0], fcport->port_name[1],
+ fcport->port_name[2], fcport->port_name[3],
+ fcport->port_name[4], fcport->port_name[5],
+ fcport->port_name[6], fcport->port_name[7],
+ fcport->d_id.b.domain, fcport->d_id.b.area,
+ fcport->d_id.b.al_pa));
+ }
+
+ return (rval);
+}
+
+/**
+ * qla2x00_sns_gid_pt() - SNS scan for fabric devices via GID_PT command.
+ * @ha: HA context
+ * @list: switch info entries to populate
+ *
+ * This command uses the old Exectute SNS Command mailbox routine.
+ *
+ * NOTE: Non-Nx_Ports are not requested.
+ *
+ * Returns 0 on success.
+ */
+static int
+qla2x00_sns_gid_pt(scsi_qla_host_t *ha, sw_info_t *list)
+{
+ int rval;
+
+ uint16_t i;
+ uint8_t *entry;
+ struct sns_cmd_pkt *sns_cmd;
+
+ /* Issue GID_PT. */
+ /* Prepare SNS command request. */
+ sns_cmd = qla2x00_prep_sns_cmd(ha, GID_PT_CMD, GID_PT_SNS_SCMD_LEN,
+ GID_PT_SNS_DATA_SIZE);
+
+ /* Prepare SNS command arguments -- port_type. */
+ sns_cmd->p.cmd.param[0] = NS_NX_PORT_TYPE;
+
+ /* Execute SNS command. */
+ rval = qla2x00_send_sns(ha, ha->sns_cmd_dma, GID_PT_SNS_CMD_SIZE / 2,
+ sizeof(struct sns_cmd_pkt));
+ if (rval != QLA_SUCCESS) {
+ /*EMPTY*/
+ DEBUG2_3(printk("scsi(%ld): GID_PT Send SNS failed (%d).\n",
+ ha->host_no, rval));
+ } else if (sns_cmd->p.gid_data[8] != 0x80 ||
+ sns_cmd->p.gid_data[9] != 0x02) {
+ DEBUG2_3(printk("scsi(%ld): GID_PT failed, rejected request, "
+ "gid_rsp:\n", ha->host_no));
+ DEBUG2_3(qla2x00_dump_buffer(sns_cmd->p.gid_data, 16));
+ rval = QLA_FUNCTION_FAILED;
+ } else {
+ /* Set port IDs in switch info list. */
+ for (i = 0; i < MAX_FIBRE_DEVICES; i++) {
+ entry = &sns_cmd->p.gid_data[(i * 4) + 16];
+ list[i].d_id.b.domain = entry[1];
+ list[i].d_id.b.area = entry[2];
+ list[i].d_id.b.al_pa = entry[3];
+
+ /* Last one exit. */
+ if (entry[0] & BIT_7) {
+ list[i].d_id.b.rsvd_1 = entry[0];
+ break;
+ }
+ }
+
+ /*
+ * If we've used all available slots, then the switch is
+ * reporting back more devices that we can handle with this
+ * single call. Return a failed status, and let GA_NXT handle
+ * the overload.
+ */
+ if (i == MAX_FIBRE_DEVICES)
+ rval = QLA_FUNCTION_FAILED;
+ }
+
+ return (rval);
+}
+
+/**
+ * qla2x00_sns_gpn_id() - SNS Get Port Name (GPN_ID) query.
+ * @ha: HA context
+ * @list: switch info entries to populate
+ *
+ * This command uses the old Exectute SNS Command mailbox routine.
+ *
+ * Returns 0 on success.
+ */
+static int
+qla2x00_sns_gpn_id(scsi_qla_host_t *ha, sw_info_t *list)
+{
+ int rval;
+
+ uint16_t i;
+ struct sns_cmd_pkt *sns_cmd;
+
+ for (i = 0; i < MAX_FIBRE_DEVICES; i++) {
+ /* Issue GPN_ID */
+ /* Prepare SNS command request. */
+ sns_cmd = qla2x00_prep_sns_cmd(ha, GPN_ID_CMD,
+ GPN_ID_SNS_SCMD_LEN, GPN_ID_SNS_DATA_SIZE);
+
+ /* Prepare SNS command arguments -- port_id. */
+ sns_cmd->p.cmd.param[0] = list[i].d_id.b.al_pa;
+ sns_cmd->p.cmd.param[1] = list[i].d_id.b.area;
+ sns_cmd->p.cmd.param[2] = list[i].d_id.b.domain;
+
+ /* Execute SNS command. */
+ rval = qla2x00_send_sns(ha, ha->sns_cmd_dma,
+ GPN_ID_SNS_CMD_SIZE / 2, sizeof(struct sns_cmd_pkt));
+ if (rval != QLA_SUCCESS) {
+ /*EMPTY*/
+ DEBUG2_3(printk("scsi(%ld): GPN_ID Send SNS failed "
+ "(%d).\n", ha->host_no, rval));
+ } else if (sns_cmd->p.gpn_data[8] != 0x80 ||
+ sns_cmd->p.gpn_data[9] != 0x02) {
+ DEBUG2_3(printk("scsi(%ld): GPN_ID failed, rejected "
+ "request, gpn_rsp:\n", ha->host_no));
+ DEBUG2_3(qla2x00_dump_buffer(sns_cmd->p.gpn_data, 16));
+ rval = QLA_FUNCTION_FAILED;
+ } else {
+ /* Save portname */
+ memcpy(list[i].port_name, &sns_cmd->p.gpn_data[16],
+ WWN_SIZE);
+ }
+
+ /* Last device exit. */
+ if (list[i].d_id.b.rsvd_1 != 0)
+ break;
+ }
+
+ return (rval);
+}
+
+/**
+ * qla2x00_sns_gnn_id() - SNS Get Node Name (GNN_ID) query.
+ * @ha: HA context
+ * @list: switch info entries to populate
+ *
+ * This command uses the old Exectute SNS Command mailbox routine.
+ *
+ * Returns 0 on success.
+ */
+static int
+qla2x00_sns_gnn_id(scsi_qla_host_t *ha, sw_info_t *list)
+{
+ int rval;
+
+ uint16_t i;
+ struct sns_cmd_pkt *sns_cmd;
+
+ for (i = 0; i < MAX_FIBRE_DEVICES; i++) {
+ /* Issue GNN_ID */
+ /* Prepare SNS command request. */
+ sns_cmd = qla2x00_prep_sns_cmd(ha, GNN_ID_CMD,
+ GNN_ID_SNS_SCMD_LEN, GNN_ID_SNS_DATA_SIZE);
+
+ /* Prepare SNS command arguments -- port_id. */
+ sns_cmd->p.cmd.param[0] = list[i].d_id.b.al_pa;
+ sns_cmd->p.cmd.param[1] = list[i].d_id.b.area;
+ sns_cmd->p.cmd.param[2] = list[i].d_id.b.domain;
+
+ /* Execute SNS command. */
+ rval = qla2x00_send_sns(ha, ha->sns_cmd_dma,
+ GNN_ID_SNS_CMD_SIZE / 2, sizeof(struct sns_cmd_pkt));
+ if (rval != QLA_SUCCESS) {
+ /*EMPTY*/
+ DEBUG2_3(printk("scsi(%ld): GNN_ID Send SNS failed "
+ "(%d).\n", ha->host_no, rval));
+ } else if (sns_cmd->p.gnn_data[8] != 0x80 ||
+ sns_cmd->p.gnn_data[9] != 0x02) {
+ DEBUG2_3(printk("scsi(%ld): GNN_ID failed, rejected "
+ "request, gnn_rsp:\n", ha->host_no));
+ DEBUG2_3(qla2x00_dump_buffer(sns_cmd->p.gnn_data, 16));
+ rval = QLA_FUNCTION_FAILED;
+ } else {
+ /* Save nodename */
+ memcpy(list[i].node_name, &sns_cmd->p.gnn_data[16],
+ WWN_SIZE);
+
+ DEBUG2_3(printk("scsi(%ld): GID_PT entry - "
+ "nn %02x%02x%02x%02x%02x%02x%02x%02x "
+ "pn %02x%02x%02x%02x%02x%02x%02x%02x "
+ "portid=%02x%02x%02x.\n",
+ ha->host_no,
+ list[i].node_name[0], list[i].node_name[1],
+ list[i].node_name[2], list[i].node_name[3],
+ list[i].node_name[4], list[i].node_name[5],
+ list[i].node_name[6], list[i].node_name[7],
+ list[i].port_name[0], list[i].port_name[1],
+ list[i].port_name[2], list[i].port_name[3],
+ list[i].port_name[4], list[i].port_name[5],
+ list[i].port_name[6], list[i].port_name[7],
+ list[i].d_id.b.domain, list[i].d_id.b.area,
+ list[i].d_id.b.al_pa));
+ }
+
+ /* Last device exit. */
+ if (list[i].d_id.b.rsvd_1 != 0)
+ break;
+ }
+
+ return (rval);
+}
+
+/**
+ * qla2x00_snd_rft_id() - SNS Register FC-4 TYPEs (RFT_ID) supported by the HBA.
+ * @ha: HA context
+ *
+ * This command uses the old Exectute SNS Command mailbox routine.
+ *
+ * Returns 0 on success.
+ */
+static int
+qla2x00_sns_rft_id(scsi_qla_host_t *ha)
+{
+ int rval;
+
+ struct sns_cmd_pkt *sns_cmd;
+
+ /* Issue RFT_ID. */
+ /* Prepare SNS command request. */
+ sns_cmd = qla2x00_prep_sns_cmd(ha, RFT_ID_CMD, RFT_ID_SNS_SCMD_LEN,
+ RFT_ID_SNS_DATA_SIZE);
+
+ /* Prepare SNS command arguments -- port_id, FC-4 types */
+ sns_cmd->p.cmd.param[0] = ha->d_id.b.al_pa;
+ sns_cmd->p.cmd.param[1] = ha->d_id.b.area;
+ sns_cmd->p.cmd.param[2] = ha->d_id.b.domain;
+
+ sns_cmd->p.cmd.param[5] = 0x01; /* FCP-3 */
+
+ /* Execute SNS command. */
+ rval = qla2x00_send_sns(ha, ha->sns_cmd_dma, RFT_ID_SNS_CMD_SIZE / 2,
+ sizeof(struct sns_cmd_pkt));
+ if (rval != QLA_SUCCESS) {
+ /*EMPTY*/
+ DEBUG2_3(printk("scsi(%ld): RFT_ID Send SNS failed (%d).\n",
+ ha->host_no, rval));
+ } else if (sns_cmd->p.rft_data[8] != 0x80 ||
+ sns_cmd->p.rft_data[9] != 0x02) {
+ DEBUG2_3(printk("scsi(%ld): RFT_ID failed, rejected request, "
+ "rft_rsp:\n", ha->host_no));
+ DEBUG2_3(qla2x00_dump_buffer(sns_cmd->p.rft_data, 16));
+ rval = QLA_FUNCTION_FAILED;
+ } else {
+ DEBUG2(printk("scsi(%ld): RFT_ID exiting normally.\n",
+ ha->host_no));
+ }
+
+ return (rval);
+}
+
+/**
+ * qla2x00_sns_rff_id() - SNS Register FC-4 Features (RFF_ID) supported by the
+ * HBA.
+ * @ha: HA context
+ *
+ * This command uses the old Exectute SNS Command mailbox routine.
+ *
+ * Returns 0 on success.
+ */
+static int
+qla2x00_sns_rff_id(scsi_qla_host_t *ha)
+{
+ int rval;
+
+ struct sns_cmd_pkt *sns_cmd;
+
+ /* Issue RFF_ID. */
+ /* Prepare SNS command request. */
+ sns_cmd = qla2x00_prep_sns_cmd(ha, RFF_ID_CMD, RFF_ID_SNS_SCMD_LEN,
+ RFF_ID_SNS_DATA_SIZE);
+
+ /* Prepare SNS command arguments -- port_id, FC-4 feature, FC-4 type */
+ sns_cmd->p.cmd.param[0] = ha->d_id.b.al_pa;
+ sns_cmd->p.cmd.param[1] = ha->d_id.b.area;
+ sns_cmd->p.cmd.param[2] = ha->d_id.b.domain;
+
+ sns_cmd->p.cmd.param[6] = 0x08; /* SCSI - FCP */
+
+ /* Execute SNS command. */
+ rval = qla2x00_send_sns(ha, ha->sns_cmd_dma, RFF_ID_SNS_CMD_SIZE / 2,
+ sizeof(struct sns_cmd_pkt));
+ if (rval != QLA_SUCCESS) {
+ /*EMPTY*/
+ DEBUG2_3(printk("scsi(%ld): RFF_ID Send SNS failed (%d).\n",
+ ha->host_no, rval));
+ } else if (sns_cmd->p.rff_data[8] != 0x80 ||
+ sns_cmd->p.rff_data[9] != 0x02) {
+ DEBUG2_3(printk("scsi(%ld): RFF_ID failed, rejected request, "
+ "rff_rsp:\n", ha->host_no));
+ DEBUG2_3(qla2x00_dump_buffer(sns_cmd->p.rff_data, 16));
+ rval = QLA_FUNCTION_FAILED;
+ } else {
+ DEBUG2(printk("scsi(%ld): RFF_ID exiting normally.\n",
+ ha->host_no));
+ }
+
+ return (rval);
+}
+
+/**
+ * qla2x00_sns_rnn_id() - SNS Register Node Name (RNN_ID) of the HBA.
+ * HBA.
+ * @ha: HA context
+ *
+ * This command uses the old Exectute SNS Command mailbox routine.
+ *
+ * Returns 0 on success.
+ */
+static int
+qla2x00_sns_rnn_id(scsi_qla_host_t *ha)
+{
+ int rval;
+
+ struct sns_cmd_pkt *sns_cmd;
+
+ /* Issue RNN_ID. */
+ /* Prepare SNS command request. */
+ sns_cmd = qla2x00_prep_sns_cmd(ha, RNN_ID_CMD, RNN_ID_SNS_SCMD_LEN,
+ RNN_ID_SNS_DATA_SIZE);
+
+ /* Prepare SNS command arguments -- port_id, nodename. */
+ sns_cmd->p.cmd.param[0] = ha->d_id.b.al_pa;
+ sns_cmd->p.cmd.param[1] = ha->d_id.b.area;
+ sns_cmd->p.cmd.param[2] = ha->d_id.b.domain;
+
+ sns_cmd->p.cmd.param[4] = ha->init_cb->node_name[7];
+ sns_cmd->p.cmd.param[5] = ha->init_cb->node_name[6];
+ sns_cmd->p.cmd.param[6] = ha->init_cb->node_name[5];
+ sns_cmd->p.cmd.param[7] = ha->init_cb->node_name[4];
+ sns_cmd->p.cmd.param[8] = ha->init_cb->node_name[3];
+ sns_cmd->p.cmd.param[9] = ha->init_cb->node_name[2];
+ sns_cmd->p.cmd.param[10] = ha->init_cb->node_name[1];
+ sns_cmd->p.cmd.param[11] = ha->init_cb->node_name[0];
+
+ /* Execute SNS command. */
+ rval = qla2x00_send_sns(ha, ha->sns_cmd_dma, RNN_ID_SNS_CMD_SIZE / 2,
+ sizeof(struct sns_cmd_pkt));
+ if (rval != QLA_SUCCESS) {
+ /*EMPTY*/
+ DEBUG2_3(printk("scsi(%ld): RNN_ID Send SNS failed (%d).\n",
+ ha->host_no, rval));
+ } else if (sns_cmd->p.rnn_data[8] != 0x80 ||
+ sns_cmd->p.rnn_data[9] != 0x02) {
+ DEBUG2_3(printk("scsi(%ld): RNN_ID failed, rejected request, "
+ "rnn_rsp:\n", ha->host_no));
+ DEBUG2_3(qla2x00_dump_buffer(sns_cmd->p.rnn_data, 16));
+ rval = QLA_FUNCTION_FAILED;
+ } else {
+ DEBUG2(printk("scsi(%ld): RNN_ID exiting normally.\n",
+ ha->host_no));
+ }
+
+ return (rval);
+}
diff -Nurd -X dontdiff-bk 80000b8-mm4/qla_os.c 80000b8-mm4-fabric/qla_os.c
--- 80000b8-mm4/qla_os.c 2004-01-19 10:47:39.652948800 -0800
+++ 80000b8-mm4-fabric/qla_os.c 2004-01-19 15:48:28.562097544 -0800
@@ -2998,37 +2998,59 @@
}
ha->mbx_sem_pool_tail = tmp_q_tail;
- /* Get consistent memory allocated for MS IOCB */
- ha->ms_iocb = pci_alloc_consistent(ha->pdev,
- sizeof(ms_iocb_entry_t), &ha->ms_iocb_dma);
- if (ha->ms_iocb == NULL) {
- /* error */
- qla_printk(KERN_WARNING, ha,
- "Memory Allocation failed - ms_iocb\n");
+ /* Allocate memory for SNS commands */
+ if (IS_QLA2200(ha)) {
+ /* Get consistent memory allocated for SNS commands */
+ ha->sns_cmd = pci_alloc_consistent(ha->pdev,
+ sizeof(struct sns_cmd_pkt), &ha->sns_cmd_dma);
+ if (ha->sns_cmd == NULL) {
+ /* error */
+ qla_printk(KERN_WARNING, ha,
+ "Memory Allocation failed - sns_cmd\n");
- qla2x00_mem_free(ha);
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(HZ/10);
+ qla2x00_mem_free(ha);
+ set_current_state(TASK_INTERRUPTIBLE);
+ schedule_timeout(HZ/10);
- continue;
- }
- memset(ha->ms_iocb, 0, sizeof(ms_iocb_entry_t));
+ continue;
+ }
+ memset(ha->sns_cmd, 0, sizeof(struct sns_cmd_pkt));
+ } else if (!IS_QLA2100(ha)) {
+ /* Get consistent memory allocated for MS IOCB */
+ ha->ms_iocb = pci_alloc_consistent(ha->pdev,
+ sizeof(ms_iocb_entry_t), &ha->ms_iocb_dma);
+ if (ha->ms_iocb == NULL) {
+ /* error */
+ qla_printk(KERN_WARNING, ha,
+ "Memory Allocation failed - ms_iocb\n");
- /* Get consistent memory allocated for CT SNS commands */
- ha->ct_sns = pci_alloc_consistent(ha->pdev,
- sizeof(struct ct_sns_pkt), &ha->ct_sns_dma);
- if (ha->ct_sns == NULL) {
- /* error */
- qla_printk(KERN_WARNING, ha,
- "Memory Allocation failed - ct_sns\n");
+ qla2x00_mem_free(ha);
+ set_current_state(TASK_INTERRUPTIBLE);
+ schedule_timeout(HZ/10);
- qla2x00_mem_free(ha);
- set_current_state(TASK_INTERRUPTIBLE);
- schedule_timeout(HZ/10);
+ continue;
+ }
+ memset(ha->ms_iocb, 0, sizeof(ms_iocb_entry_t));
- continue;
+ /*
+ * Get consistent memory allocated for CT SNS
+ * commands
+ */
+ ha->ct_sns = pci_alloc_consistent(ha->pdev,
+ sizeof(struct ct_sns_pkt), &ha->ct_sns_dma);
+ if (ha->ct_sns == NULL) {
+ /* error */
+ qla_printk(KERN_WARNING, ha,
+ "Memory Allocation failed - ct_sns\n");
+
+ qla2x00_mem_free(ha);
+ set_current_state(TASK_INTERRUPTIBLE);
+ schedule_timeout(HZ/10);
+
+ continue;
+ }
+ memset(ha->ct_sns, 0, sizeof(struct ct_sns_pkt));
}
- memset(ha->ct_sns, 0, sizeof(struct ct_sns_pkt));
/* Get consistent memory allocated for Get Port Database cmd */
ha->iodesc_pd = pci_alloc_consistent(ha->pdev,
@@ -3119,6 +3141,12 @@
pci_free_consistent(ha->pdev, PORT_DATABASE_SIZE,
ha->iodesc_pd, ha->iodesc_pd_dma);
}
+
+ if (ha->sns_cmd) {
+ pci_free_consistent(ha->pdev,
+ sizeof(struct sns_cmd_pkt), ha->sns_cmd, ha->sns_cmd_dma);
+ }
+
if (ha->ct_sns) {
pci_free_consistent(ha->pdev,
sizeof(struct ct_sns_pkt), ha->ct_sns, ha->ct_sns_dma);
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: Removing the qlogicfc driver
2004-01-20 0:46 Removing the qlogicfc driver Andrew Vasquez
@ 2004-01-20 13:42 ` christophe.varoqui
2004-02-01 16:09 ` Christoph Hellwig
0 siblings, 1 reply; 10+ messages in thread
From: christophe.varoqui @ 2004-01-20 13:42 UTC (permalink / raw)
To: Andrew Vasquez; +Cc: linux-scsi
Selon Andrew Vasquez <andrew.vasquez@qlogic.com>:
>
> Ok, this turned out to be my mess-up. As it turns out the 2200 fw
> doesn't support the MS IOCB interface the driver uses to issue CT
> commands to the SNS. Basically, I had to forward-port some code
> from the 6.x driver to get the SNS calls to go through. I have
> several machines (mixture of 2200s/2300s/others with loop and
> fabric connections) in my test rings running with the attached patch.
> If you would, I'd like for you to try out the attached patch. It's
> delta'd against the qla2xxx driver in the -mm4 tree.
>
> Please let me know how it works out for you. I'd like to forward
> it along for inclusion once I get a bit more internal runtime in my
> rings.
>
I report it works flawlessly with "2.6.0-udm5 (== mm2) + qla8b8 + patch".
Thanks for caring,
cvaroqui
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Removing the qlogicfc driver
2004-01-20 13:42 ` christophe.varoqui
@ 2004-02-01 16:09 ` Christoph Hellwig
2004-02-01 16:52 ` christophe varoqui
0 siblings, 1 reply; 10+ messages in thread
From: Christoph Hellwig @ 2004-02-01 16:09 UTC (permalink / raw)
To: christophe.varoqui; +Cc: Andrew Vasquez, linux-scsi
On Tue, Jan 20, 2004 at 02:42:04PM +0100, christophe.varoqui@free.fr wrote:
> > Please let me know how it works out for you. I'd like to forward
> > it along for inclusion once I get a bit more internal runtime in my
> > rings.
> >
> I report it works flawlessly with "2.6.0-udm5 (== mm2) + qla8b8 + patch".
This means there are no other objections and we can remove driver?
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Removing the qlogicfc driver
2004-02-01 16:09 ` Christoph Hellwig
@ 2004-02-01 16:52 ` christophe varoqui
0 siblings, 0 replies; 10+ messages in thread
From: christophe varoqui @ 2004-02-01 16:52 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: andrew.vasquez, linux-scsi
Christoph Hellwig wrote:
> On Tue, Jan 20, 2004 at 02:42:04PM +0100, christophe.varoqui@free.fr wrote:
>
>>>Please let me know how it works out for you. I'd like to forward
>>>it along for inclusion once I get a bit more internal runtime in my
>>>rings.
>>>
>>
>>I report it works flawlessly with "2.6.0-udm5 (== mm2) + qla8b8 + patch".
>
>
> This means there are no other objections and we can remove driver?
>
If the SNS patch from A. Vasquez gets in, yes, no objections.
Thanks for caring,
cvaroqui
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2004-02-01 16:52 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-20 0:46 Removing the qlogicfc driver Andrew Vasquez
2004-01-20 13:42 ` christophe.varoqui
2004-02-01 16:09 ` Christoph Hellwig
2004-02-01 16:52 ` christophe varoqui
-- strict thread matches above, loose matches on Subject: below --
2004-01-19 17:28 Andrew Vasquez
[not found] <B179AE41C1147041AA1121F44614F0B0598E38@AVEXCH02.qlogic.org>
2004-01-17 12:57 ` christophe.varoqui
2004-01-17 20:21 ` Andrew Vasquez
2004-01-18 21:14 ` christophe.varoqui
2004-01-16 22:18 christophe.varoqui
2004-01-16 16:49 James Bottomley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox