mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-18 11:54:37 +08:00
[SCSI] mvme147: Reindentation
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
This commit is contained in:
parent
bb17b7871b
commit
be4540db06
@ -13,16 +13,17 @@
|
||||
#include "wd33c93.h"
|
||||
#include "mvme147.h"
|
||||
|
||||
#include<linux/stat.h>
|
||||
#include <linux/stat.h>
|
||||
|
||||
|
||||
#define HDATA(ptr) ((struct WD33C93_hostdata *)((ptr)->hostdata))
|
||||
|
||||
static struct Scsi_Host *mvme147_host = NULL;
|
||||
|
||||
static irqreturn_t mvme147_intr (int irq, void *dummy)
|
||||
static irqreturn_t mvme147_intr(int irq, void *dummy)
|
||||
{
|
||||
if (irq == MVME147_IRQ_SCSI_PORT)
|
||||
wd33c93_intr (mvme147_host);
|
||||
wd33c93_intr(mvme147_host);
|
||||
else
|
||||
m147_pcc->dma_intr = 0x89; /* Ack and enable ints */
|
||||
return IRQ_HANDLED;
|
||||
@ -40,15 +41,16 @@ static int dma_setup(struct scsi_cmnd *cmd, int dir_in)
|
||||
/* remember direction */
|
||||
HDATA(mvme147_host)->dma_dir = dir_in;
|
||||
|
||||
if (dir_in)
|
||||
if (dir_in) {
|
||||
/* invalidate any cache */
|
||||
cache_clear (addr, cmd->SCp.this_residual);
|
||||
else
|
||||
cache_clear(addr, cmd->SCp.this_residual);
|
||||
} else {
|
||||
/* push any dirty cache */
|
||||
cache_push (addr, cmd->SCp.this_residual);
|
||||
cache_push(addr, cmd->SCp.this_residual);
|
||||
}
|
||||
|
||||
/* start DMA */
|
||||
m147_pcc->dma_bcr = cmd->SCp.this_residual | (1<<24);
|
||||
m147_pcc->dma_bcr = cmd->SCp.this_residual | (1 << 24);
|
||||
m147_pcc->dma_dadr = addr;
|
||||
m147_pcc->dma_cntrl = flags;
|
||||
|
||||
@ -74,7 +76,7 @@ int mvme147_detect(struct scsi_host_template *tpnt)
|
||||
tpnt->proc_name = "MVME147";
|
||||
tpnt->proc_info = &wd33c93_proc_info;
|
||||
|
||||
mvme147_host = scsi_register (tpnt, sizeof(struct WD33C93_hostdata));
|
||||
mvme147_host = scsi_register(tpnt, sizeof(struct WD33C93_hostdata));
|
||||
if (!mvme147_host)
|
||||
goto err_out;
|
||||
|
||||
@ -87,9 +89,11 @@ int mvme147_detect(struct scsi_host_template *tpnt)
|
||||
HDATA(mvme147_host)->dma_mode = CTRL_DMA;
|
||||
wd33c93_init(mvme147_host, regs, dma_setup, dma_stop, WD33C93_FS_8_10);
|
||||
|
||||
if (request_irq(MVME147_IRQ_SCSI_PORT, mvme147_intr, 0, "MVME147 SCSI PORT", mvme147_intr))
|
||||
if (request_irq(MVME147_IRQ_SCSI_PORT, mvme147_intr, 0,
|
||||
"MVME147 SCSI PORT", mvme147_intr))
|
||||
goto err_unregister;
|
||||
if (request_irq(MVME147_IRQ_SCSI_DMA, mvme147_intr, 0, "MVME147 SCSI DMA", mvme147_intr))
|
||||
if (request_irq(MVME147_IRQ_SCSI_DMA, mvme147_intr, 0,
|
||||
"MVME147 SCSI DMA", mvme147_intr))
|
||||
goto err_free_irq;
|
||||
#if 0 /* Disabled; causes problems booting */
|
||||
m147_pcc->scsi_interrupt = 0x10; /* Assert SCSI bus reset */
|
||||
@ -105,11 +109,11 @@ int mvme147_detect(struct scsi_host_template *tpnt)
|
||||
|
||||
return 1;
|
||||
|
||||
err_free_irq:
|
||||
err_free_irq:
|
||||
free_irq(MVME147_IRQ_SCSI_PORT, mvme147_intr);
|
||||
err_unregister:
|
||||
err_unregister:
|
||||
scsi_unregister(mvme147_host);
|
||||
err_out:
|
||||
err_out:
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user