Re: [PATCH v2] m68k/amiga - zorro.c: set up z->dev.dma_mask for the DMA API

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Geert,

thanks for explaining - I had forgotten that the SCSI adapter in elgar
is probably on the CPU accelerator card.

00: Phase 5 Digital Products CyberSCSI/Blizzard 1220
        Type: Zorro II
        Address: 00e90000 (00010000 bytes)
        Serial number: 00000000
        Slot address: 00e9
        Slot size: 0001

is the output for that card.

The register address space of these cards (except Fastlane) fits into
the smaller ZorroII space.

Your version of the patch, plus setup of the 32 bit mask in the
driver, is the correct solution. Do you want me to submit a corrected
patch, or can you do that on the fly?

Cheers,


On Tue, Mar 6, 2018 at 12:05 AM, Geert Uytterhoeven
<geert@xxxxxxxxxxxxxx> wrote:
Hi Michael,

On Sun, Mar 4, 2018 at 1:21 AM, Michael Schmitz <schmitzmic@xxxxxxxxx> wrote:
that's odd - the DMA setup code in the old ESP drivers does program the
full 32 bit addresses on DMA set-up. No masking off to 24 bit.

All boards except for the Fastlane are ZorroII. Writes to the DMA
registers are done byte-wise there (only on the Fastlane, the target
address is written as one longword), so this suggests there is a limit
to the data bus width, but doesn't speak to the address bus width.

I'm sure Amigas weren't limited to 16 MB of RAM (pretty certain kullervo
had 32 or 64 MB). No evidence of Amiga SCSI ever using a DMA bounce
buffer (as we've had to use on Atari). How would the old SCSI drivers
have worked, if DMA can't address the full 32 bit space?

The Fastlane is indeed a Zorro III board, that fits into a Zorro III
expansion slot.

However, the other boards supported by your new zorro_esp driver are not
Zorro II expansion boards. They fit in the CPU expansion slot, and thus have
full access to all memory. They just use the Zorro AutoConfig protocol for
discovery.

I don't know how their expansion ROMs look like. They may identify as either
a Zorro II or Zorro III board, depending on how much address space they need
for their registers. Given SCSI doesn't need much, most probably look like a
Zorro II board.

Google found the following lszorro output:

00: Phase 5 Blizzard 2060 [Accelerator]
        Type: Zorro II
        Address: 00ea0000 (00020000 bytes)
        Serial number: 00000000
        Slot address: 00ea
        Slot size: 0002

elgar:~# lszorro -vv
        00: Phase 5 Blizzard 1220/CyberStorm [Accelerator and SCSI Host Adapter]
        Type: Zorro II
        Address: 00e90000 (00010000 bytes)
        Serial number: 00000000
        Slot address: 00e9
        Slot size: 0001

which confirms that they identify as Zorro II boards.
So the Zorro driver core can set their DMA masks to 24-bit, but the driver can
safely override it to 32-bit.

Am 03.03.2018 um 22:31 schrieb Geert Uytterhoeven:
On Sat, Mar 3, 2018 at 12:08 AM, Christoph Hellwig <hch@xxxxxx> wrote:
Assuming all zorro devices can deal fine with a 32-bit dma mask:

No they don't. Zorro II has a 24-bit bus, Zorro III has a 32-bit bus.
So it should be something like:

    switch (z->rom.er_Type & ERT_TYPEMASK) {
    case ERT_ZORROIII:
            z->dev.coherent_dma_mask = DMA_BIT_MASK(32);
            break;
    case ERT_ZORROII:
    default:
            z->dev.coherent_dma_mask = DMA_BIT_MASK(24);
            break;
    }

Other types are not defined, but I have no idea how expansion boards for
the original Amiga 1000 ("Zorro I") are represented. As that one had a 24-bit
bus, using 24 for the default should be fine.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Video for Linux]     [Yosemite News]     [Linux S/390]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux