Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
4c5d2df4
Commit
4c5d2df4
authored
Mar 16, 2004
by
Andrew Vasquez
Committed by
James Bottomley
Mar 16, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] PATCH [6/15] qla2xxx: Track error-state of SBRs
Consistenly track the error-state of a failed SRB.
parent
ae33fa86
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
13 deletions
+38
-13
drivers/scsi/qla2xxx/qla_def.h
drivers/scsi/qla2xxx/qla_def.h
+4
-0
drivers/scsi/qla2xxx/qla_isr.c
drivers/scsi/qla2xxx/qla_isr.c
+4
-0
drivers/scsi/qla2xxx/qla_os.c
drivers/scsi/qla2xxx/qla_os.c
+30
-13
No files found.
drivers/scsi/qla2xxx/qla_def.h
View file @
4c5d2df4
...
...
@@ -265,6 +265,10 @@ typedef struct srb {
/* Raw completion info for use by failover ? */
uint8_t
fo_retry_cnt
;
/* Retry count this request */
uint8_t
err_id
;
/* error id */
#define SRB_ERR_PORT 1
/* Request failed -- "port down" */
#define SRB_ERR_LOOP 2
/* Request failed -- "loop down" */
#define SRB_ERR_DEVICE 3
/* Request failed -- "device error" */
#define SRB_ERR_OTHER 4
/* Segment/entries counts */
uint16_t
req_cnt
;
/* !0 indicates counts determined */
...
...
drivers/scsi/qla2xxx/qla_isr.c
View file @
4c5d2df4
...
...
@@ -1139,6 +1139,10 @@ qla2x00_status_entry(scsi_qla_host_t *ha, sts_entry_t *pkt)
if
((
sp
->
flags
&
SRB_IOCTL
)
||
atomic_read
(
&
fcport
->
state
)
==
FCS_DEVICE_DEAD
)
{
cp
->
result
=
DID_NO_CONNECT
<<
16
;
if
(
atomic_read
(
&
ha
->
loop_state
)
==
LOOP_DOWN
)
sp
->
err_id
=
SRB_ERR_LOOP
;
else
sp
->
err_id
=
SRB_ERR_PORT
;
add_to_done_queue
(
ha
,
sp
);
}
else
{
qla2x00_extend_timeout
(
cp
,
EXTEND_CMD_TIMEOUT
);
...
...
drivers/scsi/qla2xxx/qla_os.c
View file @
4c5d2df4
...
...
@@ -736,6 +736,7 @@ qla2x00_queuecommand(struct scsi_cmnd *cmd, void (*fn)(struct scsi_cmnd *))
}
sp
->
fo_retry_cnt
=
0
;
sp
->
err_id
=
0
;
/* Generate LU queue on bus, target, LUN */
b
=
cmd
->
device
->
channel
;
...
...
@@ -755,6 +756,7 @@ qla2x00_queuecommand(struct scsi_cmnd *cmd, void (*fn)(struct scsi_cmnd *))
if
(
l
>=
ha
->
max_luns
)
{
cmd
->
result
=
DID_NO_CONNECT
<<
16
;
sp
->
err_id
=
SRB_ERR_PORT
;
spin_lock_irq
(
ha
->
host
->
host_lock
);
...
...
@@ -801,6 +803,7 @@ qla2x00_queuecommand(struct scsi_cmnd *cmd, void (*fn)(struct scsi_cmnd *))
ha
->
host_no
,
t
,
l
));
cmd
->
result
=
DID_NO_CONNECT
<<
16
;
sp
->
err_id
=
SRB_ERR_PORT
;
spin_lock_irq
(
ha
->
host
->
host_lock
);
...
...
@@ -846,6 +849,11 @@ qla2x00_queuecommand(struct scsi_cmnd *cmd, void (*fn)(struct scsi_cmnd *))
* processing
*/
cmd
->
result
=
DID_NO_CONNECT
<<
16
;
if
(
atomic_read
(
&
ha2
->
loop_state
)
==
LOOP_DOWN
)
sp
->
err_id
=
SRB_ERR_LOOP
;
else
sp
->
err_id
=
SRB_ERR_PORT
;
add_to_done_queue
(
ha
,
sp
);
if
(
!
list_empty
(
&
ha
->
done_queue
))
qla2x00_done
(
ha
);
...
...
@@ -3253,6 +3261,11 @@ qla2x00_do_dpc(void *data)
__del_from_retry_queue
(
ha
,
sp
);
sp
->
cmd
->
result
=
DID_NO_CONNECT
<<
16
;
if
(
atomic_read
(
&
fcport
->
ha
->
loop_state
)
==
LOOP_DOWN
)
sp
->
err_id
=
SRB_ERR_LOOP
;
else
sp
->
err_id
=
SRB_ERR_PORT
;
sp
->
cmd
->
host_scribble
=
(
unsigned
char
*
)
NULL
;
__add_to_done_queue
(
ha
,
sp
);
...
...
@@ -3940,6 +3953,10 @@ qla2x00_cmd_timeout(srb_t *sp)
if
(
atomic_read
(
&
fcport
->
state
)
==
FCS_DEVICE_DEAD
||
atomic_read
(
&
vis_ha
->
loop_state
)
==
LOOP_DEAD
)
{
cmd
->
result
=
DID_NO_CONNECT
<<
16
;
if
(
atomic_read
(
&
fcport
->
ha
->
loop_state
)
==
LOOP_DOWN
)
sp
->
err_id
=
SRB_ERR_LOOP
;
else
sp
->
err_id
=
SRB_ERR_PORT
;
}
else
{
cmd
->
result
=
DID_BUS_BUSY
<<
16
;
}
...
...
@@ -3978,6 +3995,10 @@ qla2x00_cmd_timeout(srb_t *sp)
atomic_read
(
&
dest_ha
->
loop_state
)
==
LOOP_DEAD
)
{
qla2x00_extend_timeout
(
cmd
,
EXTEND_CMD_TIMEOUT
);
cmd
->
result
=
DID_NO_CONNECT
<<
16
;
if
(
atomic_read
(
&
dest_ha
->
loop_state
)
==
LOOP_DOWN
)
sp
->
err_id
=
SRB_ERR_LOOP
;
else
sp
->
err_id
=
SRB_ERR_PORT
;
}
else
{
cmd
->
result
=
DID_BUS_BUSY
<<
16
;
}
...
...
@@ -4237,20 +4258,16 @@ qla2x00_next(scsi_qla_host_t *vis_ha)
/* If device is dead then send request back to OS */
if
(
atomic_read
(
&
fcport
->
state
)
==
FCS_DEVICE_DEAD
)
{
sp
->
cmd
->
result
=
DID_NO_CONNECT
<<
16
;
if
(
atomic_read
(
&
dest_ha
->
loop_state
)
==
LOOP_DOWN
)
sp
->
err_id
=
SRB_ERR_LOOP
;
else
sp
->
err_id
=
SRB_ERR_PORT
;
if
(
!
atomic_read
(
&
dest_ha
->
loop_down_timer
)
&&
atomic_read
(
&
dest_ha
->
loop_state
)
==
LOOP_DOWN
)
{
sp
->
err_id
=
2
;
}
else
{
sp
->
err_id
=
1
;
}
DEBUG3
(
printk
(
"scsi(%ld): loop/port is down - "
"pid=%ld, sp=%p loopid=0x%x queued to dest HBA "
"scsi%ld.
\n
"
,
dest_ha
->
host_no
,
sp
->
cmd
->
serial_number
,
sp
,
DEBUG3
(
printk
(
"scsi(%ld): loop/port is down - pid=%ld, "
"sp=%p err_id=%d loopid=0x%x queued to dest HBA "
"scsi%ld.
\n
"
,
dest_ha
->
host_no
,
sp
->
cmd
->
serial_number
,
sp
,
sp
->
err_id
,
fcport
->
loop_id
,
dest_ha
->
host_no
));
/*
* Initiate a failover - done routine will initiate.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment