Hi all,
I've posted this(below) message about a week ago.
>I had a problem about qlogic fc driver (qlogicfc.c).
>It works on kernel 2.2.5, but it fails on kernel 2.2.6 and over.
>Is someone who have a same problem ?
>My hardwares are: PII + QLA2100 + Seagate_disk(ST39173FC).
I tried to check up the error cause. (I don't know FC spec. though..)
The buggy code i nominated is below.
---------------------------------------------------------------------
kernel-2.2.6 qlogicfc.c:
static int isp2100_make_portdb(struct Scsi_Host *host)
{
.
.
*******************************************************************
This function is searching every ports in FC-loop,
and is making port database. (i guess)
*******************************************************************
param[0] = MBOX_GET_INIT_SCSI_ID;
isp2100_mbox_command(host, param);
if (param[0] == MBOX_COMMAND_COMPLETE) {
hostdata->port_id = ((u_int) param[3]) << 16;
hostdata->port_id |= param[2];
temp[0].loop_id = param[1];
temp[0].wwn = hostdata->wwn;
}
else {
printk("qlogicfc: error getting scsi id.\n");
}
*******************************************************************
First, GET_INIT_SCSI_ID is issued to get initiator's loop_id and wwn.(?)
In many cases, initiator's loop_id may be 0, i guess..
But in my case, it was *1*.
In my FC-loop, there are FC-card(loop_id=1) and Seagate-disk(loop_id=0).
The entry of initiator is created.
(wnn:200000e08b004558 loop_id:1)
*******************************************************************
for (i = 1, j = 1; i <= QLOGICFC_MAX_ID; i++) {
temp[i].loop_id = temp[0].loop_id;
*******************************************************************
Then, this program is going to search every ports from *1* (i = 1) to
QLOGICFC_MAX_ID by sending GET_PORT_NAME command.
(The loop_id of my Seagate-disk is *0* though...)
So, all commands were failed.
*******************************************************************
param[0] = MBOX_GET_PORT_NAME;
param[1] = (i << 8) & 0xff00;
isp2100_mbox_command(host, param);
if (param[0] == MBOX_COMMAND_COMPLETE) {
temp[j].loop_id = i;
temp[j].wwn = ((u64) (param[2] & 0xff)) << 56;
temp[j].wwn |= ((u64) ((param[2] >> 8) & 0xff)) << 48;
temp[j].wwn |= ((u64) (param[3] & 0xff)) << 40;
temp[j].wwn |= ((u64) ((param[3] >> 8) & 0xff)) << 32;
temp[j].wwn |= ((u64) (param[6] & 0xff)) << 24;
temp[j].wwn |= ((u64) ((param[6] >> 8) & 0xff)) << 16;
temp[j].wwn |= ((u64) (param[7] & 0xff)) << 8;
temp[j].wwn |= ((u64) ((param[7] >> 8) & 0xff));
j++;
}
}
*******************************************************************
Finally, only one entry(initiator) of database is created.
And there is no entry of the disk.
For this reason, qlogicfc didn't recognize my hard-disk in 2.2.6.(?)
*******************************************************************
---------------------------------------------------------------------
Any comments ?
p.s.
This code is updated in kernel 2.3.10.
And my hardware(QLA2100 + Seagate-disk) works fine, again.
---------------------------------------------------------------------
kernel-2.3.10 qlogicfc.c:
for (i = 0, j = 1; i <= QLOGICFC_MAX_LOOP_ID; i++) {
^^^^^
*******************************************************************
2 entries were created.
(wnn:200000e08b004558 loop_id:1)
(wnn:2200002037100d1a loop_id:0)
*******************************************************************
---------------------------------------------------------------------
Thanks,
Hiro Oura
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]