* alpha: small PCI fixes (test11-ac3)
@ 2000-11-24 15:21 Ivan Kokshaysky
0 siblings, 0 replies; only message in thread
From: Ivan Kokshaysky @ 2000-11-24 15:21 UTC (permalink / raw)
To: Richard Henderson; +Cc: linux-kernel
Just out of curiosity I tried S3 Sonic Vibes sound card, which has
only 24 address lines connected, on sx164. This revealed two bugs
in the pci code:
- dma mask 0x00ffffff (24 bits) exactly fits the ISA scatter-gather
window, but was rejected by pci_dma_supported() due to off-by-one bug.
- this card has some non-standard set of I/O ports, and driver tries to
allocate resource for it at the runtime. At this time
pcibios_update_resource() already has been vanished.
With these fixes the card started to work to the best of its ability,
i.e. screechy and noisy, so after being so helpful the poor thing went
back into the rubbish bin...
Ivan.
--- 2.4.0t11ac3/arch/alpha/kernel/pci_iommu.c Sat Sep 23 01:07:43 2000
+++ linux/arch/alpha/kernel/pci_iommu.c Thu Nov 23 14:35:40 2000
@@ -613,10 +613,10 @@ pci_dma_supported(struct pci_dev *pdev,
/* Check that we have a scatter-gather arena that fits. */
hose = pdev ? pdev->sysdata : pci_isa_hose;
arena = hose->sg_isa;
- if (arena && arena->dma_base + arena->size <= mask)
+ if (arena && arena->dma_base + arena->size - 1 <= mask)
return 1;
arena = hose->sg_pci;
- if (arena && arena->dma_base + arena->size <= mask)
+ if (arena && arena->dma_base + arena->size - 1 <= mask)
return 1;
return 0;
--- 2.4.0t11ac3/arch/alpha/kernel/pci.c Thu Nov 23 13:07:02 2000
+++ linux/arch/alpha/kernel/pci.c Thu Nov 23 15:09:59 2000
@@ -282,7 +282,7 @@ pcibios_fixup_bus(struct pci_bus *bus)
}
}
-void __init
+void
pcibios_update_resource(struct pci_dev *dev, struct resource *root,
struct resource *res, int resource)
{
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2000-11-24 15:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-11-24 15:21 alpha: small PCI fixes (test11-ac3) Ivan Kokshaysky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®