aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/mac53c94.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/mac53c94.c')
-rw-r--r--drivers/scsi/mac53c94.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/drivers/scsi/mac53c94.c b/drivers/scsi/mac53c94.c
index 3ef2a1443996..932dcf0366eb 100644
--- a/drivers/scsi/mac53c94.c
+++ b/drivers/scsi/mac53c94.c
@@ -98,16 +98,14 @@ static int mac53c94_queue(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *
98 return 0; 98 return 0;
99} 99}
100 100
101static int mac53c94_abort(struct scsi_cmnd *cmd)
102{
103 return FAILED;
104}
105
106static int mac53c94_host_reset(struct scsi_cmnd *cmd) 101static int mac53c94_host_reset(struct scsi_cmnd *cmd)
107{ 102{
108 struct fsc_state *state = (struct fsc_state *) cmd->device->host->hostdata; 103 struct fsc_state *state = (struct fsc_state *) cmd->device->host->hostdata;
109 struct mac53c94_regs __iomem *regs = state->regs; 104 struct mac53c94_regs __iomem *regs = state->regs;
110 struct dbdma_regs __iomem *dma = state->dma; 105 struct dbdma_regs __iomem *dma = state->dma;
106 unsigned long flags;
107
108 spin_lock_irqsave(cmd->device->host->host_lock, flags);
111 109
112 writel((RUN|PAUSE|FLUSH|WAKE) << 16, &dma->control); 110 writel((RUN|PAUSE|FLUSH|WAKE) << 16, &dma->control);
113 writeb(CMD_SCSI_RESET, &regs->command); /* assert RST */ 111 writeb(CMD_SCSI_RESET, &regs->command); /* assert RST */
@@ -116,6 +114,8 @@ static int mac53c94_host_reset(struct scsi_cmnd *cmd)
116 udelay(20); 114 udelay(20);
117 mac53c94_init(state); 115 mac53c94_init(state);
118 writeb(CMD_NOP, &regs->command); 116 writeb(CMD_NOP, &regs->command);
117
118 spin_unlock_irqrestore(cmd->device->host->host_lock, flags);
119 return SUCCESS; 119 return SUCCESS;
120} 120}
121 121
@@ -416,7 +416,6 @@ static struct scsi_host_template mac53c94_template = {
416 .proc_name = "53c94", 416 .proc_name = "53c94",
417 .name = "53C94", 417 .name = "53C94",
418 .queuecommand = mac53c94_queue, 418 .queuecommand = mac53c94_queue,
419 .eh_abort_handler = mac53c94_abort,
420 .eh_host_reset_handler = mac53c94_host_reset, 419 .eh_host_reset_handler = mac53c94_host_reset,
421 .can_queue = 1, 420 .can_queue = 1,
422 .this_id = 7, 421 .this_id = 7,
@@ -425,7 +424,7 @@ static struct scsi_host_template mac53c94_template = {
425 .use_clustering = DISABLE_CLUSTERING, 424 .use_clustering = DISABLE_CLUSTERING,
426}; 425};
427 426
428static int mac53c94_probe(struct macio_dev *mdev, const struct of_match *match) 427static int mac53c94_probe(struct macio_dev *mdev, const struct of_device_id *match)
429{ 428{
430 struct device_node *node = macio_get_of_node(mdev); 429 struct device_node *node = macio_get_of_node(mdev);
431 struct pci_dev *pdev = macio_get_pci_dev(mdev); 430 struct pci_dev *pdev = macio_get_pci_dev(mdev);
@@ -545,15 +544,14 @@ static int mac53c94_remove(struct macio_dev *mdev)
545} 544}
546 545
547 546
548static struct of_match mac53c94_match[] = 547static struct of_device_id mac53c94_match[] =
549{ 548{
550 { 549 {
551 .name = "53c94", 550 .name = "53c94",
552 .type = OF_ANY_MATCH,
553 .compatible = OF_ANY_MATCH
554 }, 551 },
555 {}, 552 {},
556}; 553};
554MODULE_DEVICE_TABLE (of, mac53c94_match);
557 555
558static struct macio_driver mac53c94_driver = 556static struct macio_driver mac53c94_driver =
559{ 557{