Subject: CVS commit: syssrc
To: None <source-changes@netbsd.org>
From: Noriyuki Soda <soda@netbsd.org>
List: source-changes
Date: 08/11/2000 01:53:45
Module Name:	syssrc
Committed By:	soda
Date:		Thu Aug 10 22:53:45 UTC 2000

Modified Files:
	syssrc/sys/arch/i386/pci [netbsd-1-5]: pci_intr_fixup.c

Log Message:
Pull up to netbsd-1-5 branch
Approved by: thorpej

- Use PCIBIOS_PRINTV().

- Use PCI_INTERRUPT_PIN_MAX and I386_PCI_INTERRUPT_LINE_NO_CONNECTION
  instead of magic number.

- Do not touch a PIRQ router, if the PIRQ is already routed
  by the BIOS, or no appropriate IRQ is found for the PIRQ.
  The latter prevents a panic on the machine of Frank van der Linden.

  Do not modify a PCI Interrupt Configuration register,
  if it is already set by the BIOS, even if it is inconsistent
  with the PCI IRQ routing table provided by the BIOS.
  (The PCI Interrupt Configuration register seems to be more reliable
   than the PCI IRQ routing table.)
  This is needed to prevent a incorrect header_fixup() caused
  by the incorrect PIR table on a Panasonic Let's Note AL-N2T516J5.
  Provide "options PCIBIOS_INTR_FIXUP_FORCE" to retain
  previous behavior, i.e. believe the PCI IRQ routing table
  and ignore the PCI Interrupt Configuration register.
  Although I'm not sure this is really needed.

  Do not modify a PCI Interrupt Configuration register,
  if appropriate IRQ is not found for the link.

  Move a pciintr_icu_getclink() call and a pciintr_icu_get_intr()
  call from pciintr_link_fixup() to pciintr_link_alloc(),
  and only allocate pciintr_link_map if those calls succeeded.
  This reduces number of calls of pciintr_icu_getclink(),
  and also avoid necessity to validate a clink value in
  ICU's {get,set}_{intr,trigger}() functions.
  The sanity checks are not removed yet, though.

  Fix uninitialized usage of variable `bitmap' on stage 3
  of pciintr_link_fixup().

  Remove a member variable `old_irq' from struct pciintr_link_map.

  Always use 0x%02x for printf format of canonical link value.

  Use DIAGNOSTIC instead of PCIINTR_DEBUG for really weird situation.

	Modified with UCHIYAMA Yasushi <uch@netbsd.org>.

- make PCIBIOS_IRQS_HINT patchable.

- better message from John Hawkinson <jhawk@MIT.EDU>

- Add another option PCIBIOS_INTR_GUESS for no compatible ICU found case.

  Under this option, if only one IRQ is available for the link,
  we assumes that the IRQ is already connected, and configure
  PCI Interrupt Configuration Register accordingly.
  This is what Linux pcmcia-cs-3.1.19 does by default.

  This fixes unconfigured pccbb interrupt problem of
  Sharp Mebius MN-5500. It's interrupt router is ITExpress Inc. IT8330G.
  (http://www.ite.com.tw/, vendor=0x1283, product=0x8330)
  Problem reporeted by Kitagawa <sk@kiu.ac.jp> in
  http://www.kaynet.or.jp/~kay/ml/netbsd-pcmcia/msg/msg00608.html

Revision pulled up:
 > cvs rdiff -r1.6 -r1.10 syssrc/sys/arch/i386/pci/pci_intr_fixup.c


To generate a diff of this commit:
cvs rdiff -r1.5.6.1 -r1.5.6.2 syssrc/sys/arch/i386/pci/pci_intr_fixup.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.