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

From: Valdis.Kletnieks@vt.edu
Date: Fri Jan 10 2003 - 19:20:39 EST


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


- 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/



This archive was generated by hypermail 2b29 : Wed Jan 15 2003 - 22:00:35 EST