Re: fw-ohci breaks suspend-to-RAM

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

 



On 6/6/07, Stefan Richter <stefanr@xxxxxxxxxxxxxxxxx> wrote:
Kristian Høgsberg wrote:
> I've posted an updated version of the patch here
                 ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^
You mean "addition to the previous" patch. :-)

Yes, sorry about that.

> that fixes a byteswapping problem, and should make the stack
> actually work after resuming:
>
> http://marc.info/?l=linux1394-devel&m=118108604226326&w=2

That is, protocols which do not involve showing the local ROM to remote
nodes are unaffected?  In that case I would prefer to defer this new
patch until the next merge window if you don't mind.  Nevertheless, if
Marcus could take the time to check whether his machine keeps happily
resuming with the new patch applied, that would be good.  I will test it
with APM suspend and SBP-2 circa tomorrow.

No there's more to it than that.  When the ohci controller processes
the bus reset, it loads back values from the config rom into a couple
of ohci registers, specifically BusOptions[1].  If we provide the
wrong value in config_rom[2], the controller will load that value
after reset and we'll typically end up with a 0 in the max_rec field,
which will prevent async receive from working.  So byteswapping this
correctly will very likely fix the problem you saw, where your box
came back from suspend, but the firewire stack was busted.

cheers,
Kristian

[1] If you look at the bus reset tasklet, you'll see that there's more
to it.  I turns out that not all controllers agree on whether or not
to byteswap the be32 value read from the config_rom map.
Specifically, the ricoh chipset in my laptop gets it right and swaps
it from be32 to le32 before writing to the ohci register, but all TI
chipsets just writes the value as is, effectively making the otherwise
well designed atomic config rom update mechanism useless.  So in the
end I manually write the BusOptions register in the bus reset tasklet,
but I also load it from the ohci->config_rom map, so this has to be
the right byte order.

_______________________________________________
linux-pm mailing list
linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/linux-pm

[Index of Archives]     [Linux ACPI]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [CPU Freq]     [Kernel Newbies]     [Fedora Kernel]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux