lkml.org 
[lkml]   [2000]   [Feb]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: parport_pc
> > 	struct pci_dev { dma_mask: 0xFFFFFF; } __isa_dma;
> > #define ISA_DMA (&__isa_dma)
>
> This is a bad idea, at least genericly. One should never gen up
> a pci_dev struct yourself, because it won't be valid. A valid
> pci_dev has been munged by arch specific code.

I just meant it as a short piece of pseudo-code (and I got the
inialization syntax wrong anyway, but I'm sure you get the
idea) .. of course you'd need to put the actual initialization
in <asm/pci.h> and fill in the needed arch-specific things.

Since its only meant to be used by pci_alloc_consistent and friends
it probably doesn't need a full assortment of fields, though.

> > However, if we have multiple "pci like" busses without per-device
> > instances of "struct pci_dev" ...
>
> Although I can think of such an instance, you're free to do
> all sorts of weirdness in your own port.

Look at it this way - right now the NULL pointer is saying two
different semi-related things:
* this memory is for a non-PCI, but pci-ish device
* this memory needs to be within the ISA DMA range

If we passed in dma_mask as a seperate paramater to
pci_alloc_consitent this wouldn't be an issue, but since the
value is part of the *pci_dev I think we should pass _some_
sort of token in to explicitly state where we want the
allocation.

-Mitch

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:56    [W:0.450 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site