Messages in this thread | ![/](/images/icornerl.gif) | | Subject | Re: [patch][2.5] setup default dma_mask for cardbus devices | From | Valdis.Kletnieks@vt ... | Date | Fri, 10 Jan 2003 19:20:39 -0500 |
| |
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
[unhandled content-type:application/pgp-signature] | ![\](/images/icornerr.gif) |