[parisc-linux-cvs] DIFF 2.6.0-test5-pa6 cleanup round 2

Grant Grundler grundler@parisc-linux.org
Sun, 14 Sep 2003 12:26:36 -0600

On Sun, Sep 14, 2003 at 04:24:02PM +0100, Matthew Wilcox wrote:
> I seem to remember tausq asking that this warning not be fixed as it
> was a reminder to him that he wasn't finished working on something yet.

heh - should I add?
	#warning Randolph will fix profile support


> hmm.. pdc_get_initiator must be broken then.

that's what I was thinking too. Maybe broken for 64-bit only.

> Here's what we do ...
> sym_hipd.c:
> sym_prepare_setting()
> |-> parisc_setup_hcb()
>     |-> pdc_get_initiator()
>     |-> printk("scsi_mode = 0, period = 500");
> pdc_get_initiator() fills in np->maxwide directly.

I compared the above 2.6 to 2.4 code and 2.6 looks right to me.
I haven't tested 64-bit on c3k before and there might be
some porting issue there with calling PDC in wide mode.

> then, later, we do
> sym_reset_scsi_bus()
> |-> if (!np->maxwide) term &= 0x3ffff;
> |-> term = 0x4000100
> To be honest, I think pdc_get_initiator() is being hooked into the
> driver too late.

I would agree except when I worked this out for 2.4 it was right
and it worked.

> I'd like to see it hooked in around sym_get_nvram().

parisc_setup_hcb() is not quite the equivalent to sym_get_nvram().
The problem is we have to force sym2 driver to program the chip to run
in narrow mode and np->maxwide is the only way I've found to
do that. AFAICT, nvram settings have no influence on width.

> I do have other changes planned around that area (eg ioremapping the
> registers before calling sym_get_nvram()), but they shouldn't affect you.
> If you wnt to reorganise how we do that bit, I'm very interested.

I don't since I think it's mostly right as is.
I'll try again with a 32-bit kernel (and newer compiler) and report back.