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
nexedi
linux
Commits
1395acd9
Commit
1395acd9
authored
Oct 28, 2002
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SPARC]: Bring QlogicPTI driver in line with modern EH handling.
parent
4b5e362c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
33 deletions
+23
-33
drivers/scsi/qlogicpti.c
drivers/scsi/qlogicpti.c
+5
-5
drivers/scsi/qlogicpti.h
drivers/scsi/qlogicpti.h
+18
-28
No files found.
drivers/scsi/qlogicpti.c
View file @
1395acd9
...
...
@@ -1466,7 +1466,7 @@ int qlogicpti_abort(Scsi_Cmnd *Cmnd)
u_short
param
[
6
];
struct
Scsi_Host
*
host
=
Cmnd
->
host
;
struct
qlogicpti
*
qpti
=
(
struct
qlogicpti
*
)
host
->
hostdata
;
int
return_status
=
S
CSI_ABORT_S
UCCESS
;
int
return_status
=
SUCCESS
;
unsigned
long
flags
;
u32
cmd_cookie
;
int
i
;
...
...
@@ -1493,7 +1493,7 @@ int qlogicpti_abort(Scsi_Cmnd *Cmnd)
if
(
qlogicpti_mbox_command
(
qpti
,
param
,
0
)
||
(
param
[
0
]
!=
MBOX_COMMAND_COMPLETE
))
{
printk
(
KERN_EMERG
"qlogicpti : scsi abort failure: %x
\n
"
,
param
[
0
]);
return_status
=
SCSI_ABORT_ERROR
;
return_status
=
FAILED
;
}
qlogicpti_enable_irqs
(
qpti
);
...
...
@@ -1503,12 +1503,12 @@ int qlogicpti_abort(Scsi_Cmnd *Cmnd)
return
return_status
;
}
int
qlogicpti_reset
(
Scsi_Cmnd
*
Cmnd
,
unsigned
int
reset_flags
)
int
qlogicpti_reset
(
Scsi_Cmnd
*
Cmnd
)
{
u_short
param
[
6
];
struct
Scsi_Host
*
host
=
Cmnd
->
host
;
struct
qlogicpti
*
qpti
=
(
struct
qlogicpti
*
)
host
->
hostdata
;
int
return_status
=
S
CSI_RESET_S
UCCESS
;
int
return_status
=
SUCCESS
;
unsigned
long
flags
;
printk
(
KERN_WARNING
"qlogicpti : Resetting SCSI bus!
\n
"
);
...
...
@@ -1522,7 +1522,7 @@ int qlogicpti_reset(Scsi_Cmnd *Cmnd, unsigned int reset_flags)
if
(
qlogicpti_mbox_command
(
qpti
,
param
,
0
)
||
(
param
[
0
]
!=
MBOX_COMMAND_COMPLETE
))
{
printk
(
KERN_EMERG
"qlogicisp : scsi bus reset failure: %x
\n
"
,
param
[
0
]);
return_status
=
SCSI_RESET_ERROR
;
return_status
=
FAILED
;
}
qlogicpti_enable_irqs
(
qpti
);
...
...
drivers/scsi/qlogicpti.h
View file @
1395acd9
...
...
@@ -57,7 +57,7 @@ const char * qlogicpti_info(struct Scsi_Host *);
int
qlogicpti_queuecommand
(
Scsi_Cmnd
*
,
void
(
*
done
)(
Scsi_Cmnd
*
));
int
qlogicpti_queuecommand_slow
(
Scsi_Cmnd
*
,
void
(
*
done
)(
Scsi_Cmnd
*
));
int
qlogicpti_abort
(
Scsi_Cmnd
*
);
int
qlogicpti_reset
(
Scsi_Cmnd
*
,
unsigned
int
);
int
qlogicpti_reset
(
Scsi_Cmnd
*
);
/* mailbox command complete status codes */
#define MBOX_COMMAND_COMPLETE 0x4000
...
...
@@ -515,37 +515,27 @@ struct qlogicpti {
#define HCCTRL_B0ENAB 0x0004
/* Breakpoint 0 enable */
#ifdef CONFIG_SPARC64
#define QLOGICPTI { \
detect: qlogicpti_detect, \
release: qlogicpti_release, \
info: qlogicpti_info, \
queuecommand: qlogicpti_queuecommand_slow, \
abort: qlogicpti_abort, \
reset: qlogicpti_reset, \
can_queue: QLOGICPTI_REQ_QUEUE_LEN, \
this_id: 7, \
sg_tablesize: QLOGICPTI_MAX_SG(QLOGICPTI_REQ_QUEUE_LEN), \
cmd_per_lun: 1, \
use_clustering: ENABLE_CLUSTERING, \
highmem_io: 1, \
}
#define QLOGICPTI_HIGHMEM_IO 1
#else
/* Sparc32's iommu code cannot handle highmem pages yet. */
#define QLOGICPTI { \
detect: qlogicpti_detect, \
release: qlogicpti_release, \
info: qlogicpti_info, \
queuecommand: qlogicpti_queuecommand_slow, \
abort: qlogicpti_abort, \
reset: qlogicpti_reset, \
can_queue: QLOGICPTI_REQ_QUEUE_LEN, \
this_id: 7, \
sg_tablesize: QLOGICPTI_MAX_SG(QLOGICPTI_REQ_QUEUE_LEN), \
cmd_per_lun: 1, \
use_clustering: ENABLE_CLUSTERING, \
}
#define QLOGICPTI_HIGHMEM_IO 0
#endif
#define QLOGICPTI { \
.detect = qlogicpti_detect, \
.release = qlogicpti_release, \
.info = qlogicpti_info, \
.queuecommand = qlogicpti_queuecommand_slow, \
.eh_abort_handler = qlogicpti_abort, \
.eh_bus_reset_handler = qlogicpti_reset, \
.can_queue = QLOGICPTI_REQ_QUEUE_LEN, \
.this_id = 7, \
.sg_tablesize = QLOGICPTI_MAX_SG(QLOGICPTI_REQ_QUEUE_LEN), \
.cmd_per_lun = 1, \
.use_clustering = ENABLE_CLUSTERING, \
.highmem_io = QLOGICPTI_HIGHMEM_IO, \
}
/* For our interrupt engine. */
#define for_each_qlogicpti(qp) \
for((qp) = qptichain; (qp); (qp) = (qp)->next)
...
...
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