diff options
-rw-r--r-- | drivers/scsi/NCR5380.c | 10 | ||||
-rw-r--r-- | drivers/scsi/arm/cumana_1.c | 10 | ||||
-rw-r--r-- | drivers/scsi/arm/oak.c | 10 | ||||
-rw-r--r-- | drivers/scsi/dmx3191d.c | 4 | ||||
-rw-r--r-- | drivers/scsi/dtc.c | 6 | ||||
-rw-r--r-- | drivers/scsi/dtc.h | 2 | ||||
-rw-r--r-- | drivers/scsi/g_NCR5380.c | 10 | ||||
-rw-r--r-- | drivers/scsi/g_NCR5380.h | 4 | ||||
-rw-r--r-- | drivers/scsi/mac_scsi.c | 5 | ||||
-rw-r--r-- | drivers/scsi/pas16.c | 14 | ||||
-rw-r--r-- | drivers/scsi/pas16.h | 2 | ||||
-rw-r--r-- | drivers/scsi/t128.c | 12 | ||||
-rw-r--r-- | drivers/scsi/t128.h | 2 |
13 files changed, 50 insertions, 41 deletions
diff --git a/drivers/scsi/NCR5380.c b/drivers/scsi/NCR5380.c index 014a01f6875f..b3e5b6b57d83 100644 --- a/drivers/scsi/NCR5380.c +++ b/drivers/scsi/NCR5380.c | |||
@@ -127,17 +127,11 @@ | |||
127 | * specific implementation of the NCR5380 | 127 | * specific implementation of the NCR5380 |
128 | * | 128 | * |
129 | * Either real DMA *or* pseudo DMA may be implemented | 129 | * Either real DMA *or* pseudo DMA may be implemented |
130 | * Note that the DMA setup functions should return the number of bytes | ||
131 | * that they were able to program the controller for. | ||
132 | * | 130 | * |
133 | * NCR5380_dma_write_setup(instance, src, count) - initialize | 131 | * NCR5380_dma_write_setup(instance, src, count) - initialize |
134 | * NCR5380_dma_read_setup(instance, dst, count) - initialize | 132 | * NCR5380_dma_read_setup(instance, dst, count) - initialize |
135 | * NCR5380_dma_residual(instance); - residual count | 133 | * NCR5380_dma_residual(instance); - residual count |
136 | * | 134 | * |
137 | * PSEUDO functions : | ||
138 | * NCR5380_pwrite(instance, src, count) | ||
139 | * NCR5380_pread(instance, dst, count); | ||
140 | * | ||
141 | * The generic driver is initialized by calling NCR5380_init(instance), | 135 | * The generic driver is initialized by calling NCR5380_init(instance), |
142 | * after setting the appropriate host specific fields and ID. If the | 136 | * after setting the appropriate host specific fields and ID. If the |
143 | * driver wishes to autoprobe for an IRQ line, the NCR5380_probe_irq(instance, | 137 | * driver wishes to autoprobe for an IRQ line, the NCR5380_probe_irq(instance, |
@@ -1511,7 +1505,7 @@ static int NCR5380_transfer_dma(struct Scsi_Host *instance, | |||
1511 | */ | 1505 | */ |
1512 | 1506 | ||
1513 | if (p & SR_IO) { | 1507 | if (p & SR_IO) { |
1514 | foo = NCR5380_pread(instance, d, | 1508 | foo = NCR5380_dma_recv_setup(instance, d, |
1515 | hostdata->flags & FLAG_DMA_FIXUP ? c - 1 : c); | 1509 | hostdata->flags & FLAG_DMA_FIXUP ? c - 1 : c); |
1516 | if (!foo && (hostdata->flags & FLAG_DMA_FIXUP)) { | 1510 | if (!foo && (hostdata->flags & FLAG_DMA_FIXUP)) { |
1517 | /* | 1511 | /* |
@@ -1542,7 +1536,7 @@ static int NCR5380_transfer_dma(struct Scsi_Host *instance, | |||
1542 | d[c - 1] = NCR5380_read(INPUT_DATA_REG); | 1536 | d[c - 1] = NCR5380_read(INPUT_DATA_REG); |
1543 | } | 1537 | } |
1544 | } else { | 1538 | } else { |
1545 | foo = NCR5380_pwrite(instance, d, c); | 1539 | foo = NCR5380_dma_send_setup(instance, d, c); |
1546 | if (!foo && (hostdata->flags & FLAG_DMA_FIXUP)) { | 1540 | if (!foo && (hostdata->flags & FLAG_DMA_FIXUP)) { |
1547 | /* | 1541 | /* |
1548 | * Wait for the last byte to be sent. If REQ is being asserted for | 1542 | * Wait for the last byte to be sent. If REQ is being asserted for |
diff --git a/drivers/scsi/arm/cumana_1.c b/drivers/scsi/arm/cumana_1.c index 6e9de19fc3c2..7bcb66893059 100644 --- a/drivers/scsi/arm/cumana_1.c +++ b/drivers/scsi/arm/cumana_1.c | |||
@@ -18,6 +18,8 @@ | |||
18 | #define NCR5380_write(reg, value) cumanascsi_write(instance, reg, value) | 18 | #define NCR5380_write(reg, value) cumanascsi_write(instance, reg, value) |
19 | 19 | ||
20 | #define NCR5380_dma_xfer_len(instance, cmd, phase) (cmd->transfersize) | 20 | #define NCR5380_dma_xfer_len(instance, cmd, phase) (cmd->transfersize) |
21 | #define NCR5380_dma_recv_setup cumanascsi_pread | ||
22 | #define NCR5380_dma_send_setup cumanascsi_pwrite | ||
21 | 23 | ||
22 | #define NCR5380_intr cumanascsi_intr | 24 | #define NCR5380_intr cumanascsi_intr |
23 | #define NCR5380_queue_command cumanascsi_queue_command | 25 | #define NCR5380_queue_command cumanascsi_queue_command |
@@ -39,8 +41,8 @@ void cumanascsi_setup(char *str, int *ints) | |||
39 | #define L(v) (((v)<<16)|((v) & 0x0000ffff)) | 41 | #define L(v) (((v)<<16)|((v) & 0x0000ffff)) |
40 | #define H(v) (((v)>>16)|((v) & 0xffff0000)) | 42 | #define H(v) (((v)>>16)|((v) & 0xffff0000)) |
41 | 43 | ||
42 | static inline int | 44 | static inline int cumanascsi_pwrite(struct Scsi_Host *host, |
43 | NCR5380_pwrite(struct Scsi_Host *host, unsigned char *addr, int len) | 45 | unsigned char *addr, int len) |
44 | { | 46 | { |
45 | unsigned long *laddr; | 47 | unsigned long *laddr; |
46 | void __iomem *dma = priv(host)->dma + 0x2000; | 48 | void __iomem *dma = priv(host)->dma + 0x2000; |
@@ -102,8 +104,8 @@ end: | |||
102 | return len; | 104 | return len; |
103 | } | 105 | } |
104 | 106 | ||
105 | static inline int | 107 | static inline int cumanascsi_pread(struct Scsi_Host *host, |
106 | NCR5380_pread(struct Scsi_Host *host, unsigned char *addr, int len) | 108 | unsigned char *addr, int len) |
107 | { | 109 | { |
108 | unsigned long *laddr; | 110 | unsigned long *laddr; |
109 | void __iomem *dma = priv(host)->dma + 0x2000; | 111 | void __iomem *dma = priv(host)->dma + 0x2000; |
diff --git a/drivers/scsi/arm/oak.c b/drivers/scsi/arm/oak.c index 63abd6b248a6..5d6e0e590638 100644 --- a/drivers/scsi/arm/oak.c +++ b/drivers/scsi/arm/oak.c | |||
@@ -24,6 +24,8 @@ | |||
24 | writeb(value, priv(instance)->base + ((reg) << 2)) | 24 | writeb(value, priv(instance)->base + ((reg) << 2)) |
25 | 25 | ||
26 | #define NCR5380_dma_xfer_len(instance, cmd, phase) (0) | 26 | #define NCR5380_dma_xfer_len(instance, cmd, phase) (0) |
27 | #define NCR5380_dma_recv_setup oakscsi_pread | ||
28 | #define NCR5380_dma_send_setup oakscsi_pwrite | ||
27 | 29 | ||
28 | #define NCR5380_queue_command oakscsi_queue_command | 30 | #define NCR5380_queue_command oakscsi_queue_command |
29 | #define NCR5380_info oakscsi_info | 31 | #define NCR5380_info oakscsi_info |
@@ -39,8 +41,8 @@ | |||
39 | #define STAT ((128 + 16) << 2) | 41 | #define STAT ((128 + 16) << 2) |
40 | #define DATA ((128 + 8) << 2) | 42 | #define DATA ((128 + 8) << 2) |
41 | 43 | ||
42 | static inline int NCR5380_pwrite(struct Scsi_Host *instance, unsigned char *addr, | 44 | static inline int oakscsi_pwrite(struct Scsi_Host *instance, |
43 | int len) | 45 | unsigned char *addr, int len) |
44 | { | 46 | { |
45 | void __iomem *base = priv(instance)->base; | 47 | void __iomem *base = priv(instance)->base; |
46 | 48 | ||
@@ -54,8 +56,8 @@ printk("writing %p len %d\n",addr, len); | |||
54 | } | 56 | } |
55 | } | 57 | } |
56 | 58 | ||
57 | static inline int NCR5380_pread(struct Scsi_Host *instance, unsigned char *addr, | 59 | static inline int oakscsi_pread(struct Scsi_Host *instance, |
58 | int len) | 60 | unsigned char *addr, int len) |
59 | { | 61 | { |
60 | void __iomem *base = priv(instance)->base; | 62 | void __iomem *base = priv(instance)->base; |
61 | printk("reading %p len %d\n", addr, len); | 63 | printk("reading %p len %d\n", addr, len); |
diff --git a/drivers/scsi/dmx3191d.c b/drivers/scsi/dmx3191d.c index 929bc1b618f8..4b58fa0c16fe 100644 --- a/drivers/scsi/dmx3191d.c +++ b/drivers/scsi/dmx3191d.c | |||
@@ -40,8 +40,8 @@ | |||
40 | #define NCR5380_write(reg, value) outb(value, instance->io_port + reg) | 40 | #define NCR5380_write(reg, value) outb(value, instance->io_port + reg) |
41 | 41 | ||
42 | #define NCR5380_dma_xfer_len(instance, cmd, phase) (0) | 42 | #define NCR5380_dma_xfer_len(instance, cmd, phase) (0) |
43 | #define NCR5380_pread(instance, dst, len) (0) | 43 | #define NCR5380_dma_recv_setup(instance, dst, len) (0) |
44 | #define NCR5380_pwrite(instance, src, len) (0) | 44 | #define NCR5380_dma_send_setup(instance, src, len) (0) |
45 | 45 | ||
46 | #define NCR5380_implementation_fields /* none */ | 46 | #define NCR5380_implementation_fields /* none */ |
47 | 47 | ||
diff --git a/drivers/scsi/dtc.c b/drivers/scsi/dtc.c index 30d3e73f70ca..df17904bbe12 100644 --- a/drivers/scsi/dtc.c +++ b/drivers/scsi/dtc.c | |||
@@ -322,7 +322,8 @@ static int dtc_biosparam(struct scsi_device *sdev, struct block_device *dev, | |||
322 | * timeout. | 322 | * timeout. |
323 | */ | 323 | */ |
324 | 324 | ||
325 | static inline int NCR5380_pread(struct Scsi_Host *instance, unsigned char *dst, int len) | 325 | static inline int dtc_pread(struct Scsi_Host *instance, |
326 | unsigned char *dst, int len) | ||
326 | { | 327 | { |
327 | unsigned char *d = dst; | 328 | unsigned char *d = dst; |
328 | int i; /* For counting time spent in the poll-loop */ | 329 | int i; /* For counting time spent in the poll-loop */ |
@@ -367,7 +368,8 @@ static inline int NCR5380_pread(struct Scsi_Host *instance, unsigned char *dst, | |||
367 | * timeout. | 368 | * timeout. |
368 | */ | 369 | */ |
369 | 370 | ||
370 | static inline int NCR5380_pwrite(struct Scsi_Host *instance, unsigned char *src, int len) | 371 | static inline int dtc_pwrite(struct Scsi_Host *instance, |
372 | unsigned char *src, int len) | ||
371 | { | 373 | { |
372 | int i; | 374 | int i; |
373 | struct NCR5380_hostdata *hostdata = shost_priv(instance); | 375 | struct NCR5380_hostdata *hostdata = shost_priv(instance); |
diff --git a/drivers/scsi/dtc.h b/drivers/scsi/dtc.h index 718f95adcec6..65af89e4340c 100644 --- a/drivers/scsi/dtc.h +++ b/drivers/scsi/dtc.h | |||
@@ -21,6 +21,8 @@ | |||
21 | 21 | ||
22 | #define NCR5380_dma_xfer_len(instance, cmd, phase) \ | 22 | #define NCR5380_dma_xfer_len(instance, cmd, phase) \ |
23 | dtc_dma_xfer_len(cmd) | 23 | dtc_dma_xfer_len(cmd) |
24 | #define NCR5380_dma_recv_setup dtc_pread | ||
25 | #define NCR5380_dma_send_setup dtc_pwrite | ||
24 | 26 | ||
25 | #define NCR5380_intr dtc_intr | 27 | #define NCR5380_intr dtc_intr |
26 | #define NCR5380_queue_command dtc_queue_command | 28 | #define NCR5380_queue_command dtc_queue_command |
diff --git a/drivers/scsi/g_NCR5380.c b/drivers/scsi/g_NCR5380.c index fc7bcbcf3f43..f8c00c96a837 100644 --- a/drivers/scsi/g_NCR5380.c +++ b/drivers/scsi/g_NCR5380.c | |||
@@ -551,7 +551,7 @@ static int generic_NCR5380_release_resources(struct Scsi_Host *instance) | |||
551 | } | 551 | } |
552 | 552 | ||
553 | /** | 553 | /** |
554 | * NCR5380_pread - pseudo DMA read | 554 | * generic_NCR5380_pread - pseudo DMA read |
555 | * @instance: adapter to read from | 555 | * @instance: adapter to read from |
556 | * @dst: buffer to read into | 556 | * @dst: buffer to read into |
557 | * @len: buffer length | 557 | * @len: buffer length |
@@ -560,7 +560,8 @@ static int generic_NCR5380_release_resources(struct Scsi_Host *instance) | |||
560 | * controller | 560 | * controller |
561 | */ | 561 | */ |
562 | 562 | ||
563 | static inline int NCR5380_pread(struct Scsi_Host *instance, unsigned char *dst, int len) | 563 | static inline int generic_NCR5380_pread(struct Scsi_Host *instance, |
564 | unsigned char *dst, int len) | ||
564 | { | 565 | { |
565 | struct NCR5380_hostdata *hostdata = shost_priv(instance); | 566 | struct NCR5380_hostdata *hostdata = shost_priv(instance); |
566 | int blocks = len / 128; | 567 | int blocks = len / 128; |
@@ -628,7 +629,7 @@ static inline int NCR5380_pread(struct Scsi_Host *instance, unsigned char *dst, | |||
628 | } | 629 | } |
629 | 630 | ||
630 | /** | 631 | /** |
631 | * NCR5380_write - pseudo DMA write | 632 | * generic_NCR5380_pwrite - pseudo DMA write |
632 | * @instance: adapter to read from | 633 | * @instance: adapter to read from |
633 | * @dst: buffer to read into | 634 | * @dst: buffer to read into |
634 | * @len: buffer length | 635 | * @len: buffer length |
@@ -637,7 +638,8 @@ static inline int NCR5380_pread(struct Scsi_Host *instance, unsigned char *dst, | |||
637 | * controller | 638 | * controller |
638 | */ | 639 | */ |
639 | 640 | ||
640 | static inline int NCR5380_pwrite(struct Scsi_Host *instance, unsigned char *src, int len) | 641 | static inline int generic_NCR5380_pwrite(struct Scsi_Host *instance, |
642 | unsigned char *src, int len) | ||
641 | { | 643 | { |
642 | struct NCR5380_hostdata *hostdata = shost_priv(instance); | 644 | struct NCR5380_hostdata *hostdata = shost_priv(instance); |
643 | int blocks = len / 128; | 645 | int blocks = len / 128; |
diff --git a/drivers/scsi/g_NCR5380.h b/drivers/scsi/g_NCR5380.h index 637740f4c6c7..7f4308705532 100644 --- a/drivers/scsi/g_NCR5380.h +++ b/drivers/scsi/g_NCR5380.h | |||
@@ -62,13 +62,13 @@ | |||
62 | 62 | ||
63 | #define NCR5380_dma_xfer_len(instance, cmd, phase) \ | 63 | #define NCR5380_dma_xfer_len(instance, cmd, phase) \ |
64 | generic_NCR5380_dma_xfer_len(instance, cmd) | 64 | generic_NCR5380_dma_xfer_len(instance, cmd) |
65 | #define NCR5380_dma_recv_setup generic_NCR5380_pread | ||
66 | #define NCR5380_dma_send_setup generic_NCR5380_pwrite | ||
65 | 67 | ||
66 | #define NCR5380_intr generic_NCR5380_intr | 68 | #define NCR5380_intr generic_NCR5380_intr |
67 | #define NCR5380_queue_command generic_NCR5380_queue_command | 69 | #define NCR5380_queue_command generic_NCR5380_queue_command |
68 | #define NCR5380_abort generic_NCR5380_abort | 70 | #define NCR5380_abort generic_NCR5380_abort |
69 | #define NCR5380_bus_reset generic_NCR5380_bus_reset | 71 | #define NCR5380_bus_reset generic_NCR5380_bus_reset |
70 | #define NCR5380_pread generic_NCR5380_pread | ||
71 | #define NCR5380_pwrite generic_NCR5380_pwrite | ||
72 | #define NCR5380_info generic_NCR5380_info | 72 | #define NCR5380_info generic_NCR5380_info |
73 | 73 | ||
74 | #define NCR5380_io_delay(x) udelay(x) | 74 | #define NCR5380_io_delay(x) udelay(x) |
diff --git a/drivers/scsi/mac_scsi.c b/drivers/scsi/mac_scsi.c index 1e0d07ac83a1..99b7bbc3dd94 100644 --- a/drivers/scsi/mac_scsi.c +++ b/drivers/scsi/mac_scsi.c | |||
@@ -33,11 +33,10 @@ | |||
33 | #define NCR5380_read(reg) macscsi_read(instance, reg) | 33 | #define NCR5380_read(reg) macscsi_read(instance, reg) |
34 | #define NCR5380_write(reg, value) macscsi_write(instance, reg, value) | 34 | #define NCR5380_write(reg, value) macscsi_write(instance, reg, value) |
35 | 35 | ||
36 | #define NCR5380_pread macscsi_pread | ||
37 | #define NCR5380_pwrite macscsi_pwrite | ||
38 | |||
39 | #define NCR5380_dma_xfer_len(instance, cmd, phase) \ | 36 | #define NCR5380_dma_xfer_len(instance, cmd, phase) \ |
40 | macscsi_dma_xfer_len(instance, cmd) | 37 | macscsi_dma_xfer_len(instance, cmd) |
38 | #define NCR5380_dma_recv_setup macscsi_pread | ||
39 | #define NCR5380_dma_send_setup macscsi_pwrite | ||
41 | 40 | ||
42 | #define NCR5380_intr macscsi_intr | 41 | #define NCR5380_intr macscsi_intr |
43 | #define NCR5380_queue_command macscsi_queue_command | 42 | #define NCR5380_queue_command macscsi_queue_command |
diff --git a/drivers/scsi/pas16.c b/drivers/scsi/pas16.c index 9c06eb637417..c8fd2230c792 100644 --- a/drivers/scsi/pas16.c +++ b/drivers/scsi/pas16.c | |||
@@ -458,7 +458,7 @@ static int pas16_biosparam(struct scsi_device *sdev, struct block_device *dev, | |||
458 | } | 458 | } |
459 | 459 | ||
460 | /* | 460 | /* |
461 | * Function : int NCR5380_pread (struct Scsi_Host *instance, | 461 | * Function : int pas16_pread (struct Scsi_Host *instance, |
462 | * unsigned char *dst, int len) | 462 | * unsigned char *dst, int len) |
463 | * | 463 | * |
464 | * Purpose : Fast 5380 pseudo-dma read function, transfers len bytes to | 464 | * Purpose : Fast 5380 pseudo-dma read function, transfers len bytes to |
@@ -470,8 +470,9 @@ static int pas16_biosparam(struct scsi_device *sdev, struct block_device *dev, | |||
470 | * timeout. | 470 | * timeout. |
471 | */ | 471 | */ |
472 | 472 | ||
473 | static inline int NCR5380_pread (struct Scsi_Host *instance, unsigned char *dst, | 473 | static inline int pas16_pread(struct Scsi_Host *instance, |
474 | int len) { | 474 | unsigned char *dst, int len) |
475 | { | ||
475 | register unsigned char *d = dst; | 476 | register unsigned char *d = dst; |
476 | register unsigned short reg = (unsigned short) (instance->io_port + | 477 | register unsigned short reg = (unsigned short) (instance->io_port + |
477 | P_DATA_REG_OFFSET); | 478 | P_DATA_REG_OFFSET); |
@@ -493,7 +494,7 @@ static inline int NCR5380_pread (struct Scsi_Host *instance, unsigned char *dst, | |||
493 | } | 494 | } |
494 | 495 | ||
495 | /* | 496 | /* |
496 | * Function : int NCR5380_pwrite (struct Scsi_Host *instance, | 497 | * Function : int pas16_pwrite (struct Scsi_Host *instance, |
497 | * unsigned char *src, int len) | 498 | * unsigned char *src, int len) |
498 | * | 499 | * |
499 | * Purpose : Fast 5380 pseudo-dma write function, transfers len bytes from | 500 | * Purpose : Fast 5380 pseudo-dma write function, transfers len bytes from |
@@ -505,8 +506,9 @@ static inline int NCR5380_pread (struct Scsi_Host *instance, unsigned char *dst, | |||
505 | * timeout. | 506 | * timeout. |
506 | */ | 507 | */ |
507 | 508 | ||
508 | static inline int NCR5380_pwrite (struct Scsi_Host *instance, unsigned char *src, | 509 | static inline int pas16_pwrite(struct Scsi_Host *instance, |
509 | int len) { | 510 | unsigned char *src, int len) |
511 | { | ||
510 | register unsigned char *s = src; | 512 | register unsigned char *s = src; |
511 | register unsigned short reg = (instance->io_port + P_DATA_REG_OFFSET); | 513 | register unsigned short reg = (instance->io_port + P_DATA_REG_OFFSET); |
512 | register int i = len; | 514 | register int i = len; |
diff --git a/drivers/scsi/pas16.h b/drivers/scsi/pas16.h index 1695885ce40c..f56f38796bcd 100644 --- a/drivers/scsi/pas16.h +++ b/drivers/scsi/pas16.h | |||
@@ -103,6 +103,8 @@ | |||
103 | #define NCR5380_write(reg, value) ( outb((value),PAS16_io_port(reg)) ) | 103 | #define NCR5380_write(reg, value) ( outb((value),PAS16_io_port(reg)) ) |
104 | 104 | ||
105 | #define NCR5380_dma_xfer_len(instance, cmd, phase) (cmd->transfersize) | 105 | #define NCR5380_dma_xfer_len(instance, cmd, phase) (cmd->transfersize) |
106 | #define NCR5380_dma_recv_setup pas16_pread | ||
107 | #define NCR5380_dma_send_setup pas16_pwrite | ||
106 | 108 | ||
107 | #define NCR5380_intr pas16_intr | 109 | #define NCR5380_intr pas16_intr |
108 | #define NCR5380_queue_command pas16_queue_command | 110 | #define NCR5380_queue_command pas16_queue_command |
diff --git a/drivers/scsi/t128.c b/drivers/scsi/t128.c index ce2395f3fae9..6cc3da8d1d69 100644 --- a/drivers/scsi/t128.c +++ b/drivers/scsi/t128.c | |||
@@ -292,7 +292,7 @@ static int t128_biosparam(struct scsi_device *sdev, struct block_device *bdev, | |||
292 | } | 292 | } |
293 | 293 | ||
294 | /* | 294 | /* |
295 | * Function : int NCR5380_pread (struct Scsi_Host *instance, | 295 | * Function : int t128_pread (struct Scsi_Host *instance, |
296 | * unsigned char *dst, int len) | 296 | * unsigned char *dst, int len) |
297 | * | 297 | * |
298 | * Purpose : Fast 5380 pseudo-dma read function, transfers len bytes to | 298 | * Purpose : Fast 5380 pseudo-dma read function, transfers len bytes to |
@@ -304,8 +304,8 @@ static int t128_biosparam(struct scsi_device *sdev, struct block_device *bdev, | |||
304 | * timeout. | 304 | * timeout. |
305 | */ | 305 | */ |
306 | 306 | ||
307 | static inline int | 307 | static inline int t128_pread(struct Scsi_Host *instance, |
308 | NCR5380_pread(struct Scsi_Host *instance, unsigned char *dst, int len) | 308 | unsigned char *dst, int len) |
309 | { | 309 | { |
310 | struct NCR5380_hostdata *hostdata = shost_priv(instance); | 310 | struct NCR5380_hostdata *hostdata = shost_priv(instance); |
311 | void __iomem *reg, *base = hostdata->base; | 311 | void __iomem *reg, *base = hostdata->base; |
@@ -338,7 +338,7 @@ NCR5380_pread(struct Scsi_Host *instance, unsigned char *dst, int len) | |||
338 | } | 338 | } |
339 | 339 | ||
340 | /* | 340 | /* |
341 | * Function : int NCR5380_pwrite (struct Scsi_Host *instance, | 341 | * Function : int t128_pwrite (struct Scsi_Host *instance, |
342 | * unsigned char *src, int len) | 342 | * unsigned char *src, int len) |
343 | * | 343 | * |
344 | * Purpose : Fast 5380 pseudo-dma write function, transfers len bytes from | 344 | * Purpose : Fast 5380 pseudo-dma write function, transfers len bytes from |
@@ -350,8 +350,8 @@ NCR5380_pread(struct Scsi_Host *instance, unsigned char *dst, int len) | |||
350 | * timeout. | 350 | * timeout. |
351 | */ | 351 | */ |
352 | 352 | ||
353 | static inline int | 353 | static inline int t128_pwrite(struct Scsi_Host *instance, |
354 | NCR5380_pwrite(struct Scsi_Host *instance, unsigned char *src, int len) | 354 | unsigned char *src, int len) |
355 | { | 355 | { |
356 | struct NCR5380_hostdata *hostdata = shost_priv(instance); | 356 | struct NCR5380_hostdata *hostdata = shost_priv(instance); |
357 | void __iomem *reg, *base = hostdata->base; | 357 | void __iomem *reg, *base = hostdata->base; |
diff --git a/drivers/scsi/t128.h b/drivers/scsi/t128.h index 4caea9d62ac4..b6fe70f0aa4b 100644 --- a/drivers/scsi/t128.h +++ b/drivers/scsi/t128.h | |||
@@ -77,6 +77,8 @@ | |||
77 | #define NCR5380_write(reg, value) writeb((value),(T128_address(reg))) | 77 | #define NCR5380_write(reg, value) writeb((value),(T128_address(reg))) |
78 | 78 | ||
79 | #define NCR5380_dma_xfer_len(instance, cmd, phase) (cmd->transfersize) | 79 | #define NCR5380_dma_xfer_len(instance, cmd, phase) (cmd->transfersize) |
80 | #define NCR5380_dma_recv_setup t128_pread | ||
81 | #define NCR5380_dma_send_setup t128_pwrite | ||
80 | 82 | ||
81 | #define NCR5380_intr t128_intr | 83 | #define NCR5380_intr t128_intr |
82 | #define NCR5380_queue_command t128_queue_command | 84 | #define NCR5380_queue_command t128_queue_command |