* Re: Busmaster DMA broken in 2.4.18 on Alpha
2002-03-11 14:10 ` Ivan Kokshaysky
@ 2002-03-11 14:32 ` Jochen Friedrich
2002-03-11 15:02 ` Jay Estabrook
2002-03-11 15:16 ` David S. Miller
2 siblings, 0 replies; 10+ messages in thread
From: Jochen Friedrich @ 2002-03-11 14:32 UTC (permalink / raw)
To: Ivan Kokshaysky
Cc: Kurt Garloff, linux-kernel, Jay Estabrook, Richard Henderson
Hi Ivan,
> No, the ability to address 32 bits is property of an ISA bridge, not
> of any particular ISA card or device. Most alphas do have 32-bit ISA DMA.
This is wrong for bus master DMA. tms380tr.c sets DMA_MODE_CASCADE and the
addressing is done by the ISA card. As the card only has 24bit, the DMA is
limited to 24 bits.
Your patch would only cause a machine check, but DMA still wouldn't work.
Cheers,
--jochen
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Busmaster DMA broken in 2.4.18 on Alpha
2002-03-11 14:10 ` Ivan Kokshaysky
2002-03-11 14:32 ` Jochen Friedrich
@ 2002-03-11 15:02 ` Jay Estabrook
2002-03-11 15:45 ` Alan Cox
2002-03-11 16:04 ` Ivan Kokshaysky
2002-03-11 15:16 ` David S. Miller
2 siblings, 2 replies; 10+ messages in thread
From: Jay Estabrook @ 2002-03-11 15:02 UTC (permalink / raw)
To: Ivan Kokshaysky
Cc: Kurt Garloff, Jochen Friedrich, linux-kernel, Richard Henderson
On Mon, Mar 11, 2002 at 05:10:58PM +0300, Ivan Kokshaysky wrote:
> On Mon, Mar 11, 2002 at 12:45:11PM +0100, Kurt Garloff wrote:
> > Unfortunately, your ISA card does not seem to be able to address 32 bits.
> > (I guess no non-on-chip ISA adapter will.)
>
> No, the ability to address 32 bits is property of an ISA bridge, not
> of any particular ISA card or device.
That's not quite true, either.
There are ISA cards, regardless of what ISA bus machine they are
plugged into, that are able to generate only something less than
32-bits worth of address. I believe that the Adaptec 1540 SCSI
controller is one of these, since I had some exposure to its
limitations a while ago; it can generate only 24-bit addresses, IIRC.
Since ISA devices don't have pci_dev structures, there's (currently)
no way to pass an ISA device-dependent DMA mask to the IOMMU routines.
Perhaps there needs to be an addition to the API that would allow
for this (pci_set_isa_device_dma_mask()) ???
> Most alphas do have 32-bit ISA DMA.
True. For those notable exceptions (XL, Ruffian, Nautilus), we can still
depend on the MAX_DMA_ADDRESS to override any device-dependent mask.
--Jay++
-----------------------------------------------------------------------------
Jay A Estabrook Alpha Engineering - LINUX Project
Compaq Computer Corp. - MRO1-2/K15 (508) 467-2080
200 Forest Street, Marlboro MA 01752 Jay.Estabrook@compaq.com
-----------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Busmaster DMA broken in 2.4.18 on Alpha
2002-03-11 15:02 ` Jay Estabrook
@ 2002-03-11 15:45 ` Alan Cox
2002-03-11 16:04 ` Ivan Kokshaysky
1 sibling, 0 replies; 10+ messages in thread
From: Alan Cox @ 2002-03-11 15:45 UTC (permalink / raw)
To: Jay Estabrook
Cc: Ivan Kokshaysky, Kurt Garloff, Jochen Friedrich, linux-kernel,
Richard Henderson
> There are ISA cards, regardless of what ISA bus machine they are
> plugged into, that are able to generate only something less than
> 32-bits worth of address. I believe that the Adaptec 1540 SCSI
All busmasters in fact. There are only 24 address wires on the ISA bus. That
covers stuff from tpqic02 through pcnet/isa, lance and aha154x.
Alan
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Busmaster DMA broken in 2.4.18 on Alpha
2002-03-11 15:02 ` Jay Estabrook
2002-03-11 15:45 ` Alan Cox
@ 2002-03-11 16:04 ` Ivan Kokshaysky
1 sibling, 0 replies; 10+ messages in thread
From: Ivan Kokshaysky @ 2002-03-11 16:04 UTC (permalink / raw)
To: Jay Estabrook
Cc: Kurt Garloff, Jochen Friedrich, linux-kernel, Richard Henderson
On Mon, Mar 11, 2002 at 10:02:00AM -0500, Jay Estabrook wrote:
> There are ISA cards, regardless of what ISA bus machine they are
> plugged into, that are able to generate only something less than
> 32-bits worth of address.
Indeed, I missed that.
> Since ISA devices don't have pci_dev structures, there's (currently)
> no way to pass an ISA device-dependent DMA mask to the IOMMU routines.
> Perhaps there needs to be an addition to the API that would allow
> for this (pci_set_isa_device_dma_mask()) ???
Yes, it would be nice to have something like this.
Another workaround also seems to be possible - for ISA devices
use mask other than 0x00ffffff _only_ if we don't have working
IOMMU. This doesn't help to get older Miatas work with such
type of ISA cards though...
Ivan.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Busmaster DMA broken in 2.4.18 on Alpha
2002-03-11 14:10 ` Ivan Kokshaysky
2002-03-11 14:32 ` Jochen Friedrich
2002-03-11 15:02 ` Jay Estabrook
@ 2002-03-11 15:16 ` David S. Miller
2002-03-11 15:44 ` Jay Estabrook
2 siblings, 1 reply; 10+ messages in thread
From: David S. Miller @ 2002-03-11 15:16 UTC (permalink / raw)
To: Jay.Estabrook; +Cc: ink, garloff, jochen, linux-kernel, rth
From: Jay Estabrook <Jay.Estabrook@compaq.com>
Date: Mon, 11 Mar 2002 10:02:00 -0500
Since ISA devices don't have pci_dev structures, there's (currently)
no way to pass an ISA device-dependent DMA mask to the IOMMU routines.
Perhaps there needs to be an addition to the API that would allow
for this (pci_set_isa_device_dma_mask()) ???
What you could do currently is whip up a dummy pci_dev structure with
the mask you want and pass that into the PCI dma routines. So you
could, for example, default to 24-bit DMA mask when you get "NULL"
as pci_dev, but cook up a special one using a 32-bit DMA mask for the
floppy ISA device in question.
The idea in 2.5.x is to move to a generic struct device, at which time
something like this can be done much more cleanly.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Busmaster DMA broken in 2.4.18 on Alpha
2002-03-11 15:16 ` David S. Miller
@ 2002-03-11 15:44 ` Jay Estabrook
0 siblings, 0 replies; 10+ messages in thread
From: Jay Estabrook @ 2002-03-11 15:44 UTC (permalink / raw)
To: David S. Miller; +Cc: ink, garloff, jochen, linux-kernel, rth
On Mon, Mar 11, 2002 at 07:16:56AM -0800, David S. Miller wrote:
> From: Jay Estabrook <Jay.Estabrook@compaq.com>
> Date: Mon, 11 Mar 2002 10:02:00 -0500
>
> Since ISA devices don't have pci_dev structures, there's (currently)
> no way to pass an ISA device-dependent DMA mask to the IOMMU routines.
> Perhaps there needs to be an addition to the API that would allow
> for this (pci_set_isa_device_dma_mask()) ???
>
> What you could do currently is whip up a dummy pci_dev structure with
> the mask you want and pass that into the PCI dma routines. So you
> could, for example, default to 24-bit DMA mask when you get "NULL"
> as pci_dev, but cook up a special one using a 32-bit DMA mask for the
> floppy ISA device in question.
Yup, that'd work, though it would put the floppy's resources in with
the PCI devices, rather than kept separate as ISA. Should work fine,
though.
> The idea in 2.5.x is to move to a generic struct device, at which time
> something like this can be done much more cleanly.
Sounds good, if only it'd compile on Alpha... ;-}
--Jay++
-----------------------------------------------------------------------------
Jay A Estabrook Alpha Engineering - LINUX Project
Compaq Computer Corp. - MRO1-2/K15 (508) 467-2080
200 Forest Street, Marlboro MA 01752 Jay.Estabrook@compaq.com
-----------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 10+ messages in thread