Commit 1395acd9 authored by David S. Miller's avatar David S. Miller

[SPARC]: Bring QlogicPTI driver in line with modern EH handling.

parent 4b5e362c
...@@ -1466,7 +1466,7 @@ int qlogicpti_abort(Scsi_Cmnd *Cmnd) ...@@ -1466,7 +1466,7 @@ int qlogicpti_abort(Scsi_Cmnd *Cmnd)
u_short param[6]; u_short param[6];
struct Scsi_Host *host = Cmnd->host; struct Scsi_Host *host = Cmnd->host;
struct qlogicpti *qpti = (struct qlogicpti *) host->hostdata; struct qlogicpti *qpti = (struct qlogicpti *) host->hostdata;
int return_status = SCSI_ABORT_SUCCESS; int return_status = SUCCESS;
unsigned long flags; unsigned long flags;
u32 cmd_cookie; u32 cmd_cookie;
int i; int i;
...@@ -1493,7 +1493,7 @@ int qlogicpti_abort(Scsi_Cmnd *Cmnd) ...@@ -1493,7 +1493,7 @@ int qlogicpti_abort(Scsi_Cmnd *Cmnd)
if (qlogicpti_mbox_command(qpti, param, 0) || if (qlogicpti_mbox_command(qpti, param, 0) ||
(param[0] != MBOX_COMMAND_COMPLETE)) { (param[0] != MBOX_COMMAND_COMPLETE)) {
printk(KERN_EMERG "qlogicpti : scsi abort failure: %x\n", param[0]); printk(KERN_EMERG "qlogicpti : scsi abort failure: %x\n", param[0]);
return_status = SCSI_ABORT_ERROR; return_status = FAILED;
} }
qlogicpti_enable_irqs(qpti); qlogicpti_enable_irqs(qpti);
...@@ -1503,12 +1503,12 @@ int qlogicpti_abort(Scsi_Cmnd *Cmnd) ...@@ -1503,12 +1503,12 @@ int qlogicpti_abort(Scsi_Cmnd *Cmnd)
return return_status; return return_status;
} }
int qlogicpti_reset(Scsi_Cmnd *Cmnd, unsigned int reset_flags) int qlogicpti_reset(Scsi_Cmnd *Cmnd)
{ {
u_short param[6]; u_short param[6];
struct Scsi_Host *host = Cmnd->host; struct Scsi_Host *host = Cmnd->host;
struct qlogicpti *qpti = (struct qlogicpti *) host->hostdata; struct qlogicpti *qpti = (struct qlogicpti *) host->hostdata;
int return_status = SCSI_RESET_SUCCESS; int return_status = SUCCESS;
unsigned long flags; unsigned long flags;
printk(KERN_WARNING "qlogicpti : Resetting SCSI bus!\n"); printk(KERN_WARNING "qlogicpti : Resetting SCSI bus!\n");
...@@ -1522,7 +1522,7 @@ int qlogicpti_reset(Scsi_Cmnd *Cmnd, unsigned int reset_flags) ...@@ -1522,7 +1522,7 @@ int qlogicpti_reset(Scsi_Cmnd *Cmnd, unsigned int reset_flags)
if (qlogicpti_mbox_command(qpti, param, 0) || if (qlogicpti_mbox_command(qpti, param, 0) ||
(param[0] != MBOX_COMMAND_COMPLETE)) { (param[0] != MBOX_COMMAND_COMPLETE)) {
printk(KERN_EMERG "qlogicisp : scsi bus reset failure: %x\n", param[0]); printk(KERN_EMERG "qlogicisp : scsi bus reset failure: %x\n", param[0]);
return_status = SCSI_RESET_ERROR; return_status = FAILED;
} }
qlogicpti_enable_irqs(qpti); qlogicpti_enable_irqs(qpti);
......
...@@ -57,7 +57,7 @@ const char * qlogicpti_info(struct Scsi_Host *); ...@@ -57,7 +57,7 @@ const char * qlogicpti_info(struct Scsi_Host *);
int qlogicpti_queuecommand(Scsi_Cmnd *, void (* done)(Scsi_Cmnd *)); int qlogicpti_queuecommand(Scsi_Cmnd *, void (* done)(Scsi_Cmnd *));
int qlogicpti_queuecommand_slow(Scsi_Cmnd *, void (* done)(Scsi_Cmnd *)); int qlogicpti_queuecommand_slow(Scsi_Cmnd *, void (* done)(Scsi_Cmnd *));
int qlogicpti_abort(Scsi_Cmnd *); int qlogicpti_abort(Scsi_Cmnd *);
int qlogicpti_reset(Scsi_Cmnd *, unsigned int); int qlogicpti_reset(Scsi_Cmnd *);
/* mailbox command complete status codes */ /* mailbox command complete status codes */
#define MBOX_COMMAND_COMPLETE 0x4000 #define MBOX_COMMAND_COMPLETE 0x4000
...@@ -515,37 +515,27 @@ struct qlogicpti { ...@@ -515,37 +515,27 @@ struct qlogicpti {
#define HCCTRL_B0ENAB 0x0004 /* Breakpoint 0 enable */ #define HCCTRL_B0ENAB 0x0004 /* Breakpoint 0 enable */
#ifdef CONFIG_SPARC64 #ifdef CONFIG_SPARC64
#define QLOGICPTI { \ #define QLOGICPTI_HIGHMEM_IO 1
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, \
}
#else #else
/* Sparc32's iommu code cannot handle highmem pages yet. */ /* Sparc32's iommu code cannot handle highmem pages yet. */
#define QLOGICPTI { \ #define QLOGICPTI_HIGHMEM_IO 0
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, \
}
#endif #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. */ /* For our interrupt engine. */
#define for_each_qlogicpti(qp) \ #define for_each_qlogicpti(qp) \
for((qp) = qptichain; (qp); (qp) = (qp)->next) for((qp) = qptichain; (qp); (qp) = (qp)->next)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment