[parisc-linux] DIFF 2.6.0-pa3 suckyio USB support

Grant Grundler grundler at parisc-linux.org
Sat Dec 20 22:10:41 MST 2003


Hi all,
I finally figured out why suckyio USB was broken...lots of little things.
I still can't start X11 but it's likely some other issue (.config
file options likely - I'll post a seperate mail on that)

Diff is at:
	ftp://ftp.parisc-linux.org/patches/diff-2.6.0-suckyio-03

I don't have time to testing this on all variants (a500 and c3k 64-bit).
Please test, comment, and commit if it's looking good. I'll be around
a bit but not really available to commit a final version until after
christmas.

Comments on PCI Config space, diffstat, and comments on the diff follow.

FYA, the final problem was writes to PCI Configuration space.
PCI is by nature a 32-bit bus and byte writes to config space seems
to be broken. I'd like to blame suckyio for this but not sure I can.
It might be broken for all systems with LBA. Or maybe my proto-C3K
(v2.1 Elroys) is just broken. And I just sent my only other production
C3000 to someone who is having a very happy christmas...
Anyway, using 32-bit writes got everything working and seems safer.

grundler <514>diffstat ~/diff-2.6.0-suckyio-03 
 Makefile                         |    2 
 arch/parisc/kernel/firmware.c    |   63 +++++++++-
 arch/parisc/kernel/inventory.c   |   14 --
 drivers/net/tulip/media.c        |   10 +
 drivers/parisc/Kconfig           |    3 
 drivers/parisc/iosapic.c         |  154 ++++++++++++--------------
 drivers/parisc/iosapic_private.h |   20 +--
 drivers/parisc/sba_iommu.c       |   15 ++
 drivers/parisc/superio.c         |  231 +++++++++++++++++++--------------------
 include/asm-parisc/pci.h         |    1 
 include/asm-parisc/pdc.h         |    6 -
 include/asm-parisc/superio.h     |   42 ++++---
 12 files changed, 313 insertions(+), 248 deletions(-)

Here's a summary of changes:
o properly document the fact that SuckyIO uses INTD of the USB device
  to get the interrupt routine for "Legacy IO" devices.
  Restructured the hacks in iosapic_fixup_irq(), superio_fixup_irq() and
  superio_init() to make the initialization sequence a bit more obvious.

o simplify the suckyio serial_init() to use static initializers.
  Registering each port is really only three lines of code now.

o fix iosapic bug where two EIR bits where getting allocated in the
  case where two "devices" used the same iosapic IRQ line.
  Only one was actually used.
  Simple check midway down in iosapic_fixup_irq() takes care of that.

  The two functions of built-in SCSI 53c896 on C3000 exposed this bug.
  Both use INT A.
  Normally a multifuction device like 53c896 will use INT A and INT B.

o remove "vi_" prefix from iosapic vector fields.
  Code is a bit more readable now.
  (sorry - it itched really badly :^)

o moved pdc_io_reset_devices() call to sba code. It's only needed for
  SBA systems which are NOT PAT PDC. Does NOT interfere with serial
  or pdc console.

o added pdc_pci_config() accessor primitives but have not tested them.
  I thought I would need them but don't (yet). Left them in place
  in case someone cares to convert all the cruft in lba_pci.c
  to use PDC calls instead....PAT PDC has a different PDC interface
  but I can deal with that if someone takes care of "legacy PDC"
  systems.

o added gmmio_base field and advertise MMIO resources above 4GB on
  64-bit systems. Not well tested and may want to back this out
  if it even smells like a problem.

o updated comments tulip/media.c and reduce timeout in
  tulip_select_media() to 1ms.

o updated Kconfig help for unsupported CONFIG_PCI_EPIC (V-class only)

o added copyright notice to files I've touched.


enjoy!
grant


More information about the parisc-linux mailing list