[haiku-bugs] Re: [Haiku] #8987: ps2: initial setup of command byte failed

  • From: "mmlr" <trac@xxxxxxxxxxxx>
  • Date: Mon, 24 Sep 2012 08:37:23 -0000

#8987: ps2: initial setup of command byte failed
----------------------------------+----------------------------------------
   Reporter:  x-ist               |      Owner:  siarzhuk
       Type:  bug                 |     Status:  new
   Priority:  normal              |  Milestone:  R1
  Component:                      |    Version:  R1/Development
  Drivers/Keyboard/PS2            |   Keywords:  ps2 keyboard touchpad OHCI
 Resolution:                      |   Blocking:
 Blocked By:                      |   Platform:  All
Has a Patch:  1                   |
----------------------------------+----------------------------------------

Comment (by mmlr):

 Replying to [comment:12 x-ist]:
 > It definetly fixes #8987, #8984 and possibly #7897, i.e. it also fixes
 occasional Media server chrashes during System shutdown I observed.[[BR]]

 I don't exactly see how this would be related to the media_server. Can you
 elaborate? I see that #8588 reports something similar, however I would
 then tend to say that an interrupt sharing issue existed with some audio
 hardware that is more related to the audio driver than OHCI.

 > Patch description:
 > * OHCI interrupts must no be disabled when performing ownership change
 request. Otherwise the SMM does not reset the OHCI_INTERRUPT_ROUTING flag
 as expected. Thus disabling the OHCI interrupts is postponed to after the
 handover procedure.

 Where do you get the "must not be disabled" from? Just from your testing
 or is there an actual reference? The specs are rather terse about the
 whole handover process, so it's quite hard to know for sure what the
 correct environment for the handover is. So if there is a reference I'd
 like to have it included in the commit message, otherwise I'd like to have
 the commit message reworded to sound less authoritative.

 As you can see in the blame list I've moved it up there in hrev41513 in an
 attempt to maybe help on some chipsets that got stuck at that point. I
 think that at least on some of these systems the real problem were coming
 from the C1E problems for which a fix has been committed since (see
 #3999). The original idea was that there might be firmware that doesn't
 disable interrupts on handover, leading to interrupt storms right after
 the interrupts are routed to the OS. Please read through #8085 where a
 pretty similar patch has been developed and exactly that fear of random
 interrupt storms has been brought up by me (comments 15, 17) and confirmed
 by the author of the patch (comment 18). Therefore I don't think it is a
 good idea to commit this patch as is. As I mentioned in my first comment
 (15) in the other ticket, an alternative to disabling all interrupts is to
 disable all but the ownership change request interrupt. That would seem
 more correct and logical to me in either case. Please see if that alone
 fixes your problems as well.

 > * Removed excess reset upon a failed handover since we do a reset
 anyway, regardless of the handover result.

 The original idea was to only reset in the error case, that's where this
 reset came from. The general reset was introduced in hrev22625 and came
 from FreeBSD, where the same was or may still be done. The argument for
 not resetting is that it takes a lot of time to complete and happens in a
 boot state where nothing else can happen, hence prolongs the boot up time
 (and since there often are multiple OHCI controllers, it does so quite
 considerably). If at all possible we should try to later remove that
 again. Nothing speaks against adding the on-error reset back at that point
 of course.

-- 
Ticket URL: <http://dev.haiku-os.org/ticket/8987#comment:15>
Haiku <http://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: