Commit 76a58ab3 authored by Paul Gortmaker's avatar Paul Gortmaker Committed by Linus Torvalds

[PATCH] 2.5.4pre5 scsi/aha1542.c & DMA changes

There are a couple of errors in the DMA changes to the
aha1542.c driver that appeared in 2.5.4pre3:

- a typo (BUF vs BUS)
- a macro handed a page instead of a scatterlist
- printk format length mismatch

Paul.
parent be4258fe
...@@ -58,7 +58,7 @@ static void BAD_DMA(void *address, unsigned int length) ...@@ -58,7 +58,7 @@ static void BAD_DMA(void *address, unsigned int length)
{ {
printk(KERN_CRIT "buf vaddress %p paddress 0x%lx length %d\n", printk(KERN_CRIT "buf vaddress %p paddress 0x%lx length %d\n",
address, address,
SCSI_BUS_PA(address), SCSI_BUF_PA(address),
length); length);
panic("Buffer at physical address > 16Mb used for aha1542"); panic("Buffer at physical address > 16Mb used for aha1542");
} }
...@@ -68,7 +68,7 @@ static void BAD_SG_DMA(Scsi_Cmnd * SCpnt, ...@@ -68,7 +68,7 @@ static void BAD_SG_DMA(Scsi_Cmnd * SCpnt,
int nseg, int nseg,
int badseg) int badseg)
{ {
printk(KERN_CRIT "sgpnt[%d:%d] page %p/0x%lx length %d\n", printk(KERN_CRIT "sgpnt[%d:%d] page %p/0x%x length %d\n",
badseg, nseg, badseg, nseg,
page_address(sgpnt[badseg].page) + sgpnt[badseg].offset, page_address(sgpnt[badseg].page) + sgpnt[badseg].offset,
SCSI_SG_PA(&sgpnt[badseg]), SCSI_SG_PA(&sgpnt[badseg]),
...@@ -727,7 +727,7 @@ static int aha1542_queuecommand(Scsi_Cmnd * SCpnt, void (*done) (Scsi_Cmnd *)) ...@@ -727,7 +727,7 @@ static int aha1542_queuecommand(Scsi_Cmnd * SCpnt, void (*done) (Scsi_Cmnd *))
panic("Foooooooood fight!"); panic("Foooooooood fight!");
}; };
any2scsi(cptr[i].dataptr, SCSI_SG_PA(&sgpnt[i])); any2scsi(cptr[i].dataptr, SCSI_SG_PA(&sgpnt[i]));
if (SCSI_SG_PA(&sgpnt[i].page) + sgpnt[i].length - 1 > ISA_DMA_THRESHOLD) if (SCSI_SG_PA(&sgpnt[i]) + sgpnt[i].length - 1 > ISA_DMA_THRESHOLD)
BAD_SG_DMA(SCpnt, sgpnt, SCpnt->use_sg, i); BAD_SG_DMA(SCpnt, sgpnt, SCpnt->use_sg, i);
any2scsi(cptr[i].datalen, sgpnt[i].length); any2scsi(cptr[i].datalen, sgpnt[i].length);
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment