> +static inline unsigned long device_to_mask(struct device *hwdev)
> +{
> +     struct pci_dev *pdev;
> +
> +     if (!hwdev) {
> +             pdev = ppc64_isabridge_dev;
> +             if (!pdev) /* This is the best guess we can do */
> +                     return 0xfffffffful;
> +     } else
> +             pdev = to_pci_dev(hwdev);
> +
> +     if (pdev->dma_mask)
> +             return pdev->dma_mask;
> +
> +     /* Assume devices without mask can take 32 bit addresses */
> +     return 0xfffffffful;
> +}

Won't that blow up in flames with non-PCI devices like ... vio ?

We really need the kernel to move the dma mask to struct device instead
of struct pci_dev but that's a different debate ...

Ben.


_______________________________________________
Bcm43xx-dev mailing list
Bcm43xx-dev@lists.berlios.de
http://lists.berlios.de/mailman/listinfo/bcm43xx-dev

Reply via email to