Commit 804b3f9a authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev

* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  drivers/ata/pata_ixp4xx_cf.c: ioremap return code check
  Ata: pata_marvell, use ioread* for iomap-ped memory
  libata: fix for sata_mv >64KB DMA segments
parents 3e0ca2f1 991bf528
...@@ -189,6 +189,9 @@ static __devinit int ixp4xx_pata_probe(struct platform_device *pdev) ...@@ -189,6 +189,9 @@ static __devinit int ixp4xx_pata_probe(struct platform_device *pdev)
data->cs0 = devm_ioremap(&pdev->dev, cs0->start, 0x1000); data->cs0 = devm_ioremap(&pdev->dev, cs0->start, 0x1000);
data->cs1 = devm_ioremap(&pdev->dev, cs1->start, 0x1000); data->cs1 = devm_ioremap(&pdev->dev, cs1->start, 0x1000);
if (!data->cs0 || !data->cs1)
return -ENOMEM;
irq = platform_get_irq(pdev, 0); irq = platform_get_irq(pdev, 0);
if (irq) if (irq)
set_irq_type(irq, IRQT_RISING); set_irq_type(irq, IRQT_RISING);
......
...@@ -44,10 +44,10 @@ static int marvell_pre_reset(struct ata_port *ap, unsigned long deadline) ...@@ -44,10 +44,10 @@ static int marvell_pre_reset(struct ata_port *ap, unsigned long deadline)
return -ENOMEM; return -ENOMEM;
printk("BAR5:"); printk("BAR5:");
for(i = 0; i <= 0x0F; i++) for(i = 0; i <= 0x0F; i++)
printk("%02X:%02X ", i, readb(barp + i)); printk("%02X:%02X ", i, ioread8(barp + i));
printk("\n"); printk("\n");
devices = readl(barp + 0x0C); devices = ioread32(barp + 0x0C);
pci_iounmap(pdev, barp); pci_iounmap(pdev, barp);
if ((pdev->device == 0x6145) && (ap->port_no == 0) && if ((pdev->device == 0x6145) && (ap->port_no == 0) &&
......
...@@ -1139,15 +1139,27 @@ static unsigned int mv_fill_sg(struct ata_queued_cmd *qc) ...@@ -1139,15 +1139,27 @@ static unsigned int mv_fill_sg(struct ata_queued_cmd *qc)
dma_addr_t addr = sg_dma_address(sg); dma_addr_t addr = sg_dma_address(sg);
u32 sg_len = sg_dma_len(sg); u32 sg_len = sg_dma_len(sg);
mv_sg->addr = cpu_to_le32(addr & 0xffffffff); while (sg_len) {
mv_sg->addr_hi = cpu_to_le32((addr >> 16) >> 16); u32 offset = addr & 0xffff;
mv_sg->flags_size = cpu_to_le32(sg_len & 0xffff); u32 len = sg_len;
if (ata_sg_is_last(sg, qc)) if ((offset + sg_len > 0x10000))
mv_sg->flags_size |= cpu_to_le32(EPRD_FLAG_END_OF_TBL); len = 0x10000 - offset;
mv_sg->addr = cpu_to_le32(addr & 0xffffffff);
mv_sg->addr_hi = cpu_to_le32((addr >> 16) >> 16);
mv_sg->flags_size = cpu_to_le32(len);
sg_len -= len;
addr += len;
if (!sg_len && ata_sg_is_last(sg, qc))
mv_sg->flags_size |= cpu_to_le32(EPRD_FLAG_END_OF_TBL);
mv_sg++;
n_sg++;
}
mv_sg++;
n_sg++;
} }
return n_sg; return n_sg;
......
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