Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux.local>2002-04-04 16:41:16 -0800
committerLinus Torvalds <torvalds@penguin.transmeta.com>2002-04-04 16:41:16 -0800
commitfe2bd67cc97355c1f23408c70efd1a2248d1297b (patch)
treec1e1fed7c877de7b66a041b10eb2d994c3cc3046
parentb145b98c90a750c801ca211da62891d864821bd5 (diff)
Force some semblance of workingness onto qla1280 driver
-rw-r--r--drivers/scsi/qla1280.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/scsi/qla1280.c b/drivers/scsi/qla1280.c
index f081655aa5ba..7d2f4a58926c 100644
--- a/drivers/scsi/qla1280.c
+++ b/drivers/scsi/qla1280.c
@@ -182,11 +182,7 @@ END OF TERMS AND CONDITIONS
- Initial Beta Release.
*****************************************************************************/
-#error Please convert me to Documentation/DMA-mapping.txt
-
-#ifdef MODULE
#include <linux/module.h>
-#endif
#define QLA1280_VERSION " 3.00-Beta"
@@ -3983,10 +3979,11 @@ qla1280_64bit_start_scsi(scsi_qla_host_t *ha, srb_t *sp)
/* Load command entry data segments. */
for (cnt = 0; cnt < 2 && seg_cnt; cnt++, seg_cnt--)
{
- DEBUG(sprintf(debug_buff,"SG Segment ap=0x%p, len=0x%x\n\r",sg->address,sg->length));
+ unsigned long long address = page_to_phys(sg->page) + sg->offset;
+ DEBUG(sprintf(debug_buff,"SG Segment ap=0x%ull, len=0x%x\n\r",address,sg->length));
DEBUG(qla1280_print(debug_buff));
- *dword_ptr++ = cpu_to_le32(VIRT_TO_BUS_LOW(sg->address));
- *dword_ptr++ = cpu_to_le32(VIRT_TO_BUS_HIGH(sg->address));
+ *dword_ptr++ = cpu_to_le32(address);
+ *dword_ptr++ = cpu_to_le32(address >> 32);
*dword_ptr++ = sg->length;
sg++;
}
@@ -4038,8 +4035,9 @@ qla1280_64bit_start_scsi(scsi_qla_host_t *ha, srb_t *sp)
/* Load continuation entry data segments. */
for (cnt = 0; cnt < 5 && seg_cnt; cnt++, seg_cnt--)
{
- *dword_ptr++ = cpu_to_le32(VIRT_TO_BUS_LOW(sg->address));
- *dword_ptr++ = cpu_to_le32(VIRT_TO_BUS_HIGH(sg->address));
+ unsigned long long address = page_to_phys(sg->page) + sg->offset;
+ *dword_ptr++ = cpu_to_le32(address);
+ *dword_ptr++ = cpu_to_le32(address >> 32);
*dword_ptr++ = sg->length;
sg++;
}
@@ -4325,9 +4323,10 @@ qla1280_32bit_start_scsi(scsi_qla_host_t *ha, srb_t *sp)
/* Load command entry data segments. */
for (cnt = 0; cnt < 4 && seg_cnt; cnt++, seg_cnt--)
{
- *dword_ptr++ = (uint32_t) cpu_to_le32(VIRT_TO_BUS(sg->address));
+ unsigned long long address = page_to_phys(sg->page) + sg->offset;
+ *dword_ptr++ = (uint32_t) cpu_to_le32(address);
*dword_ptr++ = sg->length;
- DEBUG(sprintf(debug_buff,"SG Segment ap=0x%p, len=0x%x\n\r",sg->address,sg->length));
+ DEBUG(sprintf(debug_buff,"SG Segment ap=0x%ull, len=0x%x\n\r",address,sg->length));
DEBUG(qla1280_print(debug_buff));
sg++;
}
@@ -4368,7 +4367,8 @@ qla1280_32bit_start_scsi(scsi_qla_host_t *ha, srb_t *sp)
/* Load continuation entry data segments. */
for (cnt = 0; cnt < 7 && seg_cnt; cnt++, seg_cnt--)
{
- *dword_ptr++ = (u_int) cpu_to_le32(VIRT_TO_BUS(sg->address));
+ unsigned long long address = page_to_phys(sg->page) + sg->offset;
+ *dword_ptr++ = (u_int) cpu_to_le32(address);
*dword_ptr++ = sg->length;
sg++;
}