Re: Shortened CC (Re: New topic (PowerPC Linux PCI HELL))

2000-09-23 Thread Alan Cox
> > Several drivers do this. No PCI glue layer will be perfect, and if you try > > to make it perfect it will be bloated and suck. > > Alan, > > What is wrong with an enable struct so that the glue layer is generic? You want to add cache line size to it next, and maybe a flag to say which regi

Shortened CC (Re: New topic (PowerPC Linux PCI HELL))

2000-09-22 Thread Andre Hedrick
On Sat, 23 Sep 2000, Alan Cox wrote: > > Memory Write and Invalidate one way or another, but the decision is not > > arch-specific. It gets worse: it writes cache line size to PCI_COMMAND > > as well. > > Several drivers do this. No PCI glue layer will be perfect, and if you try > to make it pe

Re: New topic (PowerPC Linux PCI HELL)

2000-09-22 Thread Alan Cox
> Memory Write and Invalidate one way or another, but the decision is not > arch-specific. It gets worse: it writes cache line size to PCI_COMMAND > as well. Several drivers do this. No PCI glue layer will be perfect, and if you try to make it perfect it will be bloated and suck. - To unsubscr

Re: New topic (PowerPC Linux PCI HELL)

2000-09-22 Thread Gérard Roudier
On Fri, 22 Sep 2000, Jamie Lokier wrote: > Michel Lanners wrote: > > >> static inline int pci_enable_device(struct pci_device *dev) > > >> { > > >> return pci_enable_device_features(USE_IO|USE_MM); > > >> } > > (snip) > > > And what about other features ? > > > I mean: > > > - Bus Master > > >

Re: New topic (PowerPC Linux PCI HELL)

2000-09-22 Thread Jamie Lokier
Michel Lanners wrote: > >> static inline int pci_enable_device(struct pci_device *dev) > >> { > >>return pci_enable_device_features(USE_IO|USE_MM); > >> } > (snip) > > And what about other features ? > > I mean: > > - Bus Master > > - Memory Write and Invalidate > > - Parity Error response >

Re: New topic (PowerPC Linux PCI HELL)

2000-09-18 Thread Michel Lanners
On 18 Sep, this message from Gérard Roudier echoed through cyberspace: >> > All I wanted was a function that allows the driver to decide that which >> > needs to be enabled. >> > >> > pci_enable_device(struct pci_dev *dev, byte enable_mask) >> > >> > This would allow drivers to enable that which

Re: New topic (PowerPC Linux PCI HELL)

2000-09-18 Thread Gérard Roudier
On Mon, 18 Sep 2000, Alan Cox wrote: > > All I wanted was a function that allows the driver to decide that which > > needs to be enabled. > > > > pci_enable_device(struct pci_dev *dev, byte enable_mask) > > > > This would allow drivers to enable that which it needs and not weird out > > the h

Re: New topic (PowerPC Linux PCI HELL)

2000-09-18 Thread Alan Cox
> All I wanted was a function that allows the driver to decide that which > needs to be enabled. > > pci_enable_device(struct pci_dev *dev, byte enable_mask) > > This would allow drivers to enable that which it needs and not weird out > the hardware that does not like all of this extra fluff. S

Re: New topic (PowerPC Linux PCI HELL)

2000-09-18 Thread Andre Hedrick
On Mon, 18 Sep 2000, Jeff Garzik wrote: > Benjamin Herrenschmidt wrote: > > Andre Hedrick wrote: > > >All I wanted was a function that allows the driver to decide that which > > >needs to be enabled. > > > > > >pci_enable_device(struct pci_dev *dev, byte enable_mask) > > > This is indeed interes

Re: New topic (PowerPC Linux PCI HELL)

2000-09-18 Thread Benjamin Herrenschmidt
> >All I wanted was a function that allows the driver to decide that which >needs to be enabled. > >pci_enable_device(struct pci_dev *dev, byte enable_mask) > >This would allow drivers to enable that which it needs and not weird out >the hardware that does not like all of this extra fluff. This i

Re: New topic (PowerPC Linux PCI HELL)

2000-09-17 Thread Andre Hedrick
Guys, All I wanted was a function that allows the driver to decide that which needs to be enabled. pci_enable_device(struct pci_dev *dev, byte enable_mask) This would allow drivers to enable that which it needs and not weird out the hardware that does not like all of this extra fluff. Cheers,

Re: New topic (PowerPC Linux PCI HELL)

2000-09-17 Thread Richard B. Johnson
[SNIPPED...] On Sat, 16 Sep 2000, [ISO-8859-1] Gérard Roudier wrote: > > > > > > In PCI, you donnot enable windows, but you enable/disable devices to > > > generate and/or respond to transactions. > > > > Well really? From the programmers point-of-view, you have just enabled > > some windows i

Re: New topic (PowerPC Linux PCI HELL)

2000-09-16 Thread Gérard Roudier
On Fri, 15 Sep 2000, Richard B. Johnson wrote: > On Fri, 15 Sep 2000, [ISO-8859-1] Gérard Roudier wrote: > > > > > > > On Fri, 15 Sep 2000, Linus Torvalds wrote: > > > > > On Fri, 15 Sep 2000, Gérard Roudier wrote: > > > > > [ ... ] > > > No ifs, why's or buts. A driver that just enable

Re: New topic (PowerPC Linux PCI HELL)

2000-09-15 Thread Richard B. Johnson
On Fri, 15 Sep 2000, [ISO-8859-1] Gérard Roudier wrote: > > > On Fri, 15 Sep 2000, Linus Torvalds wrote: > > > On Fri, 15 Sep 2000, Gérard Roudier wrote: > > > [Snipped a lot...] > > Call "pci_enable_device()". > > > > What's so hard about that? > > This function delegates too much as a wh

Re: New topic (PowerPC Linux PCI HELL)

2000-09-15 Thread Alan Cox
> For 2.2, it's probably better to leave things as they are and just ask PPC > guys for adding a special fixup to their code. I'd rather they added a pci_enable_device(). Lets do it right and encourage easily ported drivers. - To unsubscribe from this list: send the line "unsubscribe linux-kerne

Re: New topic (PowerPC Linux PCI HELL)

2000-09-15 Thread Jeff Garzik
Gérard Roudier wrote: > This function delegates too much as a whole to the PCI generic layer, IMO. > Imagine that for sanity I want to allocate all the device resources, but > only _enable_ part of device features (for example only memory > transactions). Imagine some special handling to be necess

Re: New topic (PowerPC Linux PCI HELL)

2000-09-15 Thread Gérard Roudier
On Fri, 15 Sep 2000, Linus Torvalds wrote: > On Fri, 15 Sep 2000, Gérard Roudier wrote: > > > > > Just as an example: imagine that the IO windows haven't been set up > > > correctly. If the low-level driver just blindly enables IO cycles by > > > writing to the PCI_COMMAND register, that devic

Re: New topic (PowerPC Linux PCI HELL)

2000-09-15 Thread Martin Mares
Hi! > It is a real issue of failure in 2.2, and it would be useful if the PPC > folks want to use Ultra-ATA cards. For 2.4, making the IDE driver call pci_enable_device() and modifying the PPC PCI code to fix up whatever is needed there. For 2.2, it's probably better to leave things as they are

Re: New topic (PowerPC Linux PCI HELL)

2000-09-15 Thread Linus Torvalds
On Fri, 15 Sep 2000, Gérard Roudier wrote: > > > Just as an example: imagine that the IO windows haven't been set up > > correctly. If the low-level driver just blindly enables IO cycles by > > writing to the PCI_COMMAND register, that device may come up in an invalid > > state, and mess up the

Re: New topic (PowerPC Linux PCI HELL)

2000-09-15 Thread Gérard Roudier
On Fri, 15 Sep 2000, Linus Torvalds wrote: > On Fri, 15 Sep 2000, Richard B. Johnson wrote: > > > > The PCI Specification states, in part, that either the BIOS or the > > driver has to enable the device. So, many drivers find that the device > > has not been enabled. This is normal and necessa

Re: New topic (PowerPC Linux PCI HELL)

2000-09-15 Thread Richard B. Johnson
On Fri, 15 Sep 2000, Alan Cox wrote: > > The PCI Specification states, in part, that either the BIOS or the > > driver has to enable the device. So, many drivers find that the device > > has not been enabled. This is normal and necessary because many/most > > PCI hardware had better not be enable

Re: New topic (PowerPC Linux PCI HELL)

2000-09-15 Thread Alan Cox
> The PCI Specification states, in part, that either the BIOS or the > driver has to enable the device. So, many drivers find that the device > has not been enabled. This is normal and necessary because many/most > PCI hardware had better not be enabled until an ISR is in-place. The Linux 2.4 ker

Re: New topic (PowerPC Linux PCI HELL)

2000-09-15 Thread Linus Torvalds
On Fri, 15 Sep 2000, Richard B. Johnson wrote: > > The PCI Specification states, in part, that either the BIOS or the > driver has to enable the device. So, many drivers find that the device > has not been enabled. This is normal and necessary because many/most > PCI hardware had better not be

Re: New topic (PowerPC Linux PCI HELL)

2000-09-15 Thread Richard B. Johnson
On Fri, 15 Sep 2000, Linus Torvalds wrote: > > > On Wed, 13 Sep 2000, Andre Hedrick wrote: > > > > Okay who can teach me how to force hooks and ram this down the PPC > > > > pci_write_config_word(dev, PCI_COMMAND, 0x05); > > If the PPC PCI code doesn't do this, then that's a PPC architecture

Re: New topic (PowerPC Linux PCI HELL)

2000-09-15 Thread Linus Torvalds
On Wed, 13 Sep 2000, Andre Hedrick wrote: > > Okay who can teach me how to force hooks and ram this down the PPC > > pci_write_config_word(dev, PCI_COMMAND, 0x05); If the PPC PCI code doesn't do this, then that's a PPC architecture bug. DO NOT DO THIS IN THE DRIVER! Fix the real problem inst

Re: New topic (PowerPC Linux PCI HELL)

2000-09-14 Thread Tom Rini
On Thu, Sep 14, 2000 at 09:59:35AM +0200, Vojtech Pavlik wrote: > On Wed, Sep 13, 2000 at 05:29:58PM -0700, Andre Hedrick wrote: > > > Okay who can teach me how to force hooks and ram this down the PPC > > > > pci_write_config_word(dev, PCI_COMMAND, 0x05); > > > > I have all the address registe

Re: New topic (PowerPC Linux PCI HELL)

2000-09-14 Thread Andre Hedrick
On Thu, 14 Sep 2000, Alan Cox wrote: > > > It seems you forget to call pci_enable_device() in the PCI IDE driver. > > > > Hi Martin, > > > > Can we do this for 2.2 ? also ?? > > Right now pci_enable_device is a no-op for compatibility on 2.2. If you need > it to do the real thing go for it It

Re: New topic (PowerPC Linux PCI HELL)

2000-09-14 Thread Alan Cox
> > It seems you forget to call pci_enable_device() in the PCI IDE driver. > > Hi Martin, > > Can we do this for 2.2 ? also ?? Right now pci_enable_device is a no-op for compatibility on 2.2. If you need it to do the real thing go for it - To unsubscribe from this list: send the line "unsubscr

Re: New topic (PowerPC Linux PCI HELL)

2000-09-14 Thread Andre Hedrick
On Thu, 14 Sep 2000, Martin Mares wrote: > Hi! > > > > It belongs in arch/ppc/kernel/*pci*.c > > > > > > This is precisely the kind of compat stuff which should be fixed up in > > > the arch-specific PCI support code. > > > > Martin, cross-platform party on PCI stuff > > It seems you forg

Re: New topic (PowerPC Linux PCI HELL)

2000-09-14 Thread Martin Mares
Hi! > > It belongs in arch/ppc/kernel/*pci*.c > > > > This is precisely the kind of compat stuff which should be fixed up in > > the arch-specific PCI support code. > > Martin, cross-platform party on PCI stuff It seems you forget to call pci_enable_device() in the PCI IDE driver.

Re: New topic (PowerPC Linux PCI HELL)

2000-09-14 Thread Vojtech Pavlik
On Wed, Sep 13, 2000 at 05:29:58PM -0700, Andre Hedrick wrote: > Okay who can teach me how to force hooks and ram this down the PPC > > pci_write_config_word(dev, PCI_COMMAND, 0x05); > > I have all the address registered. > My new PPC G3 (7600/132) toy is not allowing IO's on PCI cards to come

Re: New topic (PowerPC Linux PCI HELL)

2000-09-13 Thread Andre Hedrick
On Wed, 13 Sep 2000, David S. Miller wrote: >Date: Wed, 13 Sep 2000 18:00:02 -0700 (PDT) >From: Matthew Jacob <[EMAIL PROTECTED]> > >This seems to be an artifact of some OBP implementations for PPC- >apples in particular. > >It assigns both I/O and Mem addrs and IRQs, b

Re: New topic (PowerPC Linux PCI HELL)

2000-09-13 Thread Matthew Jacob
On Wed, 13 Sep 2000, David S. Miller wrote: >Date: Wed, 13 Sep 2000 18:00:02 -0700 (PDT) >From: Matthew Jacob <[EMAIL PROTECTED]> > >This seems to be an artifact of some OBP implementations for PPC- >apples in particular. > >It assigns both I/O and Mem addrs and IRQs, b

Re: New topic (PowerPC Linux PCI HELL)

2000-09-13 Thread David S. Miller
Date:Wed, 13 Sep 2000 18:00:02 -0700 (PDT) From: Matthew Jacob <[EMAIL PROTECTED]> This seems to be an artifact of some OBP implementations for PPC- apples in particular. It assigns both I/O and Mem addrs and IRQs, but doesn't enable either memory or I/O. So you have to

Re: New topic (PowerPC Linux PCI HELL)

2000-09-13 Thread Matthew Jacob
This seems to be an artifact of some OBP implementations for PPC- apples in particular. It assigns both I/O and Mem addrs and IRQs, but doesn't enable either memory or I/O. So you have to do it for it. On Wed, 13 Sep 2000, Andre Hedrick wrote: > > Okay who can teach me how to force hooks and

Re: New topic (PowerPC Linux PCI HELL)

2000-09-13 Thread Daniel Jacobowitz
On Wed, Sep 13, 2000 at 05:29:58PM -0700, Andre Hedrick wrote: > > Okay who can teach me how to force hooks and ram this down the PPC > > pci_write_config_word(dev, PCI_COMMAND, 0x05); > > I have all the address registered. > My new PPC G3 (7600/132) toy is not allowing IO's on PCI cards to com