提交 af13cbeb 编写于 作者: R Ralf Baechle 提交者: James Bottomley

[SCSI] dec_esp: Use the right address space macro

Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
上级 73711b35
...@@ -516,14 +516,15 @@ static void dma_advance_sg(struct scsi_cmnd * sp) ...@@ -516,14 +516,15 @@ static void dma_advance_sg(struct scsi_cmnd * sp)
static void pmaz_dma_drain(struct NCR_ESP *esp) static void pmaz_dma_drain(struct NCR_ESP *esp)
{ {
memcpy(phys_to_virt(esp_virt_buffer), memcpy(phys_to_virt(esp_virt_buffer),
(void *)KSEG1ADDR(esp->slot + DEC_SCSI_SRAM + ESP_TGT_DMA_SIZE), (void *)CKSEG1ADDR(esp->slot + DEC_SCSI_SRAM +
scsi_current_length); ESP_TGT_DMA_SIZE),
scsi_current_length);
} }
static void pmaz_dma_init_read(struct NCR_ESP *esp, u32 vaddress, int length) static void pmaz_dma_init_read(struct NCR_ESP *esp, u32 vaddress, int length)
{ {
volatile u32 *dmareg = volatile u32 *dmareg =
(volatile u32 *)KSEG1ADDR(esp->slot + DEC_SCSI_DMAREG); (volatile u32 *)CKSEG1ADDR(esp->slot + DEC_SCSI_DMAREG);
if (length > ESP_TGT_DMA_SIZE) if (length > ESP_TGT_DMA_SIZE)
length = ESP_TGT_DMA_SIZE; length = ESP_TGT_DMA_SIZE;
...@@ -539,9 +540,10 @@ static void pmaz_dma_init_read(struct NCR_ESP *esp, u32 vaddress, int length) ...@@ -539,9 +540,10 @@ static void pmaz_dma_init_read(struct NCR_ESP *esp, u32 vaddress, int length)
static void pmaz_dma_init_write(struct NCR_ESP *esp, u32 vaddress, int length) static void pmaz_dma_init_write(struct NCR_ESP *esp, u32 vaddress, int length)
{ {
volatile u32 *dmareg = volatile u32 *dmareg =
(volatile u32 *)KSEG1ADDR(esp->slot + DEC_SCSI_DMAREG); (volatile u32 *)CKSEG1ADDR(esp->slot + DEC_SCSI_DMAREG);
memcpy((void *)KSEG1ADDR(esp->slot + DEC_SCSI_SRAM + ESP_TGT_DMA_SIZE), memcpy((void *)CKSEG1ADDR(esp->slot + DEC_SCSI_SRAM +
ESP_TGT_DMA_SIZE),
phys_to_virt(vaddress), length); phys_to_virt(vaddress), length);
wmb(); wmb();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册