Port-vax archive

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

Re: KA46/48 vsbus DMA fallthrough



Am 09.05.2015 um 16:11 schrieb Anders Magnusson:
#if VAX46 || VAX48
    case VAX_BTYP_48:
    case VAX_BTYP_46:
        sc->sc_vsregs = vax_map_physmem(VS_REGS, 1);
        sc->sc_intreq = (char *)sc->sc_vsregs + 15;
        sc->sc_intclr = (char *)sc->sc_vsregs + 15;
        sc->sc_intmsk = (char *)sc->sc_vsregs + 12;
        vsbus_dma_init(sc, 32768);
#endif

    default:
        sc->sc_vsregs = vax_map_physmem(VS_REGS, 1);
        sc->sc_intreq = (char *)sc->sc_vsregs + 15;
        sc->sc_intclr = (char *)sc->sc_vsregs + 15;
        sc->sc_intmsk = (char *)sc->sc_vsregs + 12;
[...]
This is most likely a bug, yes, but since the regs are set to the same
values it seems like it do not have any bad side effects.

Just tested a kernel with the missing break added after the above case on my VS4000/60 and it works.
(It also "incidentally" works without the break, but ...)

There are a few lines below in the default case that may have some meaning,
so it is recommended to test it on one of these machines before fixing it.

I checked the lines there and all differing values that are set (dbase, dsize, sc->sc_dmasize, sc->sc_dmaaddr) are *not* relevant for KA46 and KA48. They are for other machines like KA410, KA420 and VS3100. Also, above the KA46/48 case, the KA49/53 case does have a break after the otherwise much more similar code. And a KA49 also works fine, as verified on my VS4000/96.

In short: For me it's a bug, there should be a break.

Do you want me to file a PR?


Home | Main Index | Thread Index | Old Index