Re: sata_mv: problems using it as a platform_driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 8 Feb 2008, Byron Bradley wrote:

> I'm having problems getting the sata_mv driver working as a platform
> driver on the QNAP TS-209 and the Linkstation/Kurobox (both are Marvell
> Orion 88f5182 based devices). First of all it would oops in
> mv_port_start() while calling dma_pool_alloc(), the patch to fix this is
> at the end of this email.
>
> In mv_platform_probe() host->iomap is set to NULL but it is dereferenced
> in mv_start_dma(), I'm not sure what the fix for this is. This is based on
> the latest 2.6-git and a merge with the for-rmk branch of the orion git.

The following patch makes this driver work although I have no idea if this
is the correct thing to do. Will this be OK for other devices using this
driver? The pointer only works because it is dereferenced as
iomap[MV_PRIMARY_BAR] and MV_PRIMARY_BAR = 0, will another offset ever be
used in the future?

diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
index 04b5717..b538ccc 100644
--- a/drivers/ata/sata_mv.c
+++ b/drivers/ata/sata_mv.c
@@ -2950,8 +2950,8 @@ static int mv_platform_probe(struct platform_device *pdev)
 	host->private_data = hpriv;
 	hpriv->n_ports = n_ports;

-	host->iomap = NULL;
 	hpriv->base = ioremap(res->start, res->end - res->start + 1);
+	host->iomap = &hpriv->base;
 	hpriv->base -= MV_SATAHC0_REG_BASE;

 	rc = mv_create_dma_pools(hpriv, &pdev->dev);
-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux