cvs commit: src/sys/i386/isa cy.c src/sys/pci cy_pci.c

Bruce Evans bde at FreeBSD.org
Tue Dec 2 04:36:02 PST 2003


bde         2003/12/02 04:36:00 PST

  FreeBSD src repository

  Modified files:
    sys/i386/isa         cy.c 
    sys/pci              cy_pci.c 
  Log:
  Fixed breakage of the pci case of the cy driver by the new interrupt
  code.  Both the driver and the new code were wrong.  Driver interrupt
  handlers are supposed to take "void *vsc" arg, but some including all
  COMPAT_ISA drivers and the pci part of the cy driver want an "int unit"
  arg.  They got this using bogus casts of function pointers which should
  have kept working despite their bogusness.  However, the new interrupt
  code doesn't honor requests to pass an arg of ((void *)0), so things
  are very broken if the arg is actually a representation of unit 0.
  
  The fix is to use a normal "void *vsc" arg for the pci case and a
  wrapper for the COMPAT_ISA case (of the cy driver).  This cleans up
  new-busification of the pci case but takes the COMPAT_ISA case a little
  further from new-bus.  The corresponding bug for the COMPAT_ISA case
  has already been fixed similarly using a wrapper in compat_isa.c and
  we need another wrapper just to undo that.
  
  Fixed some directly related style bugs (mainly by removing compatibility
  cruft).
  
  cy.c:
  Fixed an indirectly related old bug in cyattach_common().  A wrong status
  was returned in the unlikely event that malloc() failed.
  
  Approved by:    re (scottl)
  
  Revision  Changes    Path
  1.137     +32 -31    src/sys/i386/isa/cy.c
  1.30      +8 -17     src/sys/pci/cy_pci.c


More information about the cvs-src mailing list