Re: [patch][2.5] setup default dma_mask for cardbus devices

Valdis.Kletnieks@vt.edu
Fri, 10 Jan 2003 19:20:39 -0500


--==_Exmh_-1316245180P
Content-Type: text/plain; charset=us-ascii

On Fri, 10 Jan 2003 18:48:24 EST, Zwane Mwaikambo said:
> Devices hanging off a cardbus bridge don't get a default dma mask which
> causes problems later when doing pci_alloc_consistent. Patch has been
> tested with tulip based ethernet.

> diff -u -r1.1.1.1 cardbus.c
> --- linux-2.5.56/drivers/pcmcia/cardbus.c 10 Jan 2003 21:22:48 -0000
1.1.1.1
> +++ linux-2.5.56/drivers/pcmcia/cardbus.c 10 Jan 2003 23:38:24 -0000
> @@ -281,6 +281,8 @@
> dev->vendor = vend;
> pci_readw(dev, PCI_DEVICE_ID, &dev->device);
> dev->hdr_type = hdr & 0x7f;
> + dev->dma_mask = 0xffffffff;
> + dev->dev.dma_mask = &dev->dma_mask;
>
> pci_setup_device(dev);
> if (pci_enable_device(dev))

And yet, this looks *different* than the bug I've been chasing with the Xircom
card, not 10 lines away from your patch. However, it's odd that
pdev_enable_device() was responsible for both disabling the card ROM *and*
disabling DMA....

Things that make you go "Hmmm...."

-- 
				Valdis Kletnieks
				Computer Systems Senior Engineer
				Virginia Tech

--==_Exmh_-1316245180P Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) Comment: Exmh version 2.5 07/13/2001

iD8DBQE+H2NXcC3lWbTT17ARAqWLAJwJJgaxU9dUFs9tg7JuDNyZ7XxQewCfas1y Rxhz/u2IpvqLUFhIlfT4QA8= =+2P+ -----END PGP SIGNATURE-----

--==_Exmh_-1316245180P-- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/