* [PATCH 40/41] m68k: fix PIO case in esp
@ 2006-01-03 23:29 Al Viro
0 siblings, 0 replies; only message in thread
From: Al Viro @ 2006-01-03 23:29 UTC (permalink / raw)
To: torvalds; +Cc: linux-kernel, linux-m68k
From: Al Viro <viro@zeniv.linux.org.uk>
Date: 1135537383 -0500
we always set ->SCp.ptr to physical address of buffer; for DMA that's
just what we need, but we end up using it as virtual address in PIO
case of esp_do_data(), with obvious breakage as soon as memory mapping
becomes non-trivial. The fix is obvious.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
drivers/scsi/NCR53C9x.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
7f89e0aea371b83e79fb3752b7dd6deeb21f01d9
diff --git a/drivers/scsi/NCR53C9x.c b/drivers/scsi/NCR53C9x.c
index 640590b..c7dd015 100644
--- a/drivers/scsi/NCR53C9x.c
+++ b/drivers/scsi/NCR53C9x.c
@@ -1799,6 +1799,7 @@ static int esp_do_data(struct NCR_ESP *e
*/
int oldphase, i = 0; /* or where we left off last time ?? esp->current_data ?? */
int fifocnt = 0;
+ unsigned char *p = phys_to_virt((unsigned long)SCptr->SCp.ptr);
oldphase = esp_read(eregs->esp_status) & ESP_STAT_PMASK;
@@ -1860,7 +1861,7 @@ static int esp_do_data(struct NCR_ESP *e
/* read fifo */
for(j=0;j<fifocnt;j++)
- SCptr->SCp.ptr[i++] = esp_read(eregs->esp_fdata);
+ p[i++] = esp_read(eregs->esp_fdata);
ESPDATA(("(%d) ", i));
@@ -1882,7 +1883,7 @@ static int esp_do_data(struct NCR_ESP *e
/* fill fifo */
for(j=0;j<this_count;j++)
- esp_write(eregs->esp_fdata, SCptr->SCp.ptr[i++]);
+ esp_write(eregs->esp_fdata, p[i++]);
/* how many left if this goes out ?? */
hmuch -= this_count;
--
0.99.9.GIT
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-01-03 23:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-03 23:29 [PATCH 40/41] m68k: fix PIO case in esp Al Viro
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®