mvme147.c (0a0fc0ddbe732779366ab6b1b879f62195e65967) mvme147.c (65396410af63db90d6428c678ff84aa652c3c1ec)
1#include <linux/types.h>
2#include <linux/mm.h>
3#include <linux/blkdev.h>
4#include <linux/sched.h>
5#include <linux/interrupt.h>
6
7#include <asm/page.h>
8#include <asm/pgtable.h>

--- 15 unchanged lines hidden (view full) ---

24{
25 if (irq == MVME147_IRQ_SCSI_PORT)
26 wd33c93_intr (mvme147_host);
27 else
28 m147_pcc->dma_intr = 0x89; /* Ack and enable ints */
29 return IRQ_HANDLED;
30}
31
1#include <linux/types.h>
2#include <linux/mm.h>
3#include <linux/blkdev.h>
4#include <linux/sched.h>
5#include <linux/interrupt.h>
6
7#include <asm/page.h>
8#include <asm/pgtable.h>

--- 15 unchanged lines hidden (view full) ---

24{
25 if (irq == MVME147_IRQ_SCSI_PORT)
26 wd33c93_intr (mvme147_host);
27 else
28 m147_pcc->dma_intr = 0x89; /* Ack and enable ints */
29 return IRQ_HANDLED;
30}
31
32static int dma_setup (Scsi_Cmnd *cmd, int dir_in)
32static int dma_setup(struct scsi_cmnd *cmd, int dir_in)
33{
34 unsigned char flags = 0x01;
35 unsigned long addr = virt_to_bus(cmd->SCp.ptr);
36
37 /* setup dma direction */
38 if (!dir_in)
39 flags |= 0x04;
40

--- 11 unchanged lines hidden (view full) ---

52 m147_pcc->dma_bcr = cmd->SCp.this_residual | (1<<24);
53 m147_pcc->dma_dadr = addr;
54 m147_pcc->dma_cntrl = flags;
55
56 /* return success */
57 return 0;
58}
59
33{
34 unsigned char flags = 0x01;
35 unsigned long addr = virt_to_bus(cmd->SCp.ptr);
36
37 /* setup dma direction */
38 if (!dir_in)
39 flags |= 0x04;
40

--- 11 unchanged lines hidden (view full) ---

52 m147_pcc->dma_bcr = cmd->SCp.this_residual | (1<<24);
53 m147_pcc->dma_dadr = addr;
54 m147_pcc->dma_cntrl = flags;
55
56 /* return success */
57 return 0;
58}
59
60static void dma_stop (struct Scsi_Host *instance, Scsi_Cmnd *SCpnt,
60static void dma_stop(struct Scsi_Host *instance, struct scsi_cmnd *SCpnt,
61 int status)
62{
63 m147_pcc->dma_cntrl = 0;
64}
65
66int mvme147_detect(struct scsi_host_template *tpnt)
67{
68 static unsigned char called = 0;

--- 38 unchanged lines hidden (view full) ---

107 free_irq(MVME147_IRQ_SCSI_PORT, mvme147_intr);
108 err_unregister:
109 wd33c93_release();
110 scsi_unregister(mvme147_host);
111 err_out:
112 return 0;
113}
114
61 int status)
62{
63 m147_pcc->dma_cntrl = 0;
64}
65
66int mvme147_detect(struct scsi_host_template *tpnt)
67{
68 static unsigned char called = 0;

--- 38 unchanged lines hidden (view full) ---

107 free_irq(MVME147_IRQ_SCSI_PORT, mvme147_intr);
108 err_unregister:
109 wd33c93_release();
110 scsi_unregister(mvme147_host);
111 err_out:
112 return 0;
113}
114
115static int mvme147_bus_reset(Scsi_Cmnd *cmd)
115static int mvme147_bus_reset(struct scsi_cmnd *cmd)
116{
117 /* FIXME perform bus-specific reset */
118
119 /* FIXME 2: kill this function, and let midlayer fallback to
120 the same result, calling wd33c93_host_reset() */
121
122 spin_lock_irq(cmd->device->host->host_lock);
123 wd33c93_host_reset(cmd);

--- 38 unchanged lines hidden ---
116{
117 /* FIXME perform bus-specific reset */
118
119 /* FIXME 2: kill this function, and let midlayer fallback to
120 the same result, calling wd33c93_host_reset() */
121
122 spin_lock_irq(cmd->device->host->host_lock);
123 wd33c93_host_reset(cmd);

--- 38 unchanged lines hidden ---