aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAl Viro <viro@ftp.linux.org.uk>2006-01-12 04:06:40 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-12 12:09:05 -0500
commit3c9757b7c28161e073e7f408978b7ed01925924c (patch)
treebcaa65fc847c5053453645a6e0e19c5f3581f0f3 /drivers
parented1705afb93409a3e345d653be9d263984aa5c1b (diff)
[PATCH] m68k: fix PIO case in esp
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> Cc: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/NCR53C9x.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/scsi/NCR53C9x.c b/drivers/scsi/NCR53C9x.c
index 640590bd014a..c7dd0154d012 100644
--- a/drivers/scsi/NCR53C9x.c
+++ b/drivers/scsi/NCR53C9x.c
@@ -1799,6 +1799,7 @@ static int esp_do_data(struct NCR_ESP *esp, struct ESP_regs *eregs)
1799 */ 1799 */
1800 int oldphase, i = 0; /* or where we left off last time ?? esp->current_data ?? */ 1800 int oldphase, i = 0; /* or where we left off last time ?? esp->current_data ?? */
1801 int fifocnt = 0; 1801 int fifocnt = 0;
1802 unsigned char *p = phys_to_virt((unsigned long)SCptr->SCp.ptr);
1802 1803
1803 oldphase = esp_read(eregs->esp_status) & ESP_STAT_PMASK; 1804 oldphase = esp_read(eregs->esp_status) & ESP_STAT_PMASK;
1804 1805
@@ -1860,7 +1861,7 @@ static int esp_do_data(struct NCR_ESP *esp, struct ESP_regs *eregs)
1860 1861
1861 /* read fifo */ 1862 /* read fifo */
1862 for(j=0;j<fifocnt;j++) 1863 for(j=0;j<fifocnt;j++)
1863 SCptr->SCp.ptr[i++] = esp_read(eregs->esp_fdata); 1864 p[i++] = esp_read(eregs->esp_fdata);
1864 1865
1865 ESPDATA(("(%d) ", i)); 1866 ESPDATA(("(%d) ", i));
1866 1867
@@ -1882,7 +1883,7 @@ static int esp_do_data(struct NCR_ESP *esp, struct ESP_regs *eregs)
1882 1883
1883 /* fill fifo */ 1884 /* fill fifo */
1884 for(j=0;j<this_count;j++) 1885 for(j=0;j<this_count;j++)
1885 esp_write(eregs->esp_fdata, SCptr->SCp.ptr[i++]); 1886 esp_write(eregs->esp_fdata, p[i++]);
1886 1887
1887 /* how many left if this goes out ?? */ 1888 /* how many left if this goes out ?? */
1888 hmuch -= this_count; 1889 hmuch -= this_count;