aboutsummaryrefslogtreecommitdiff
path: root/drivers/parport
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 15:20:36 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 15:20:36 -0700
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /drivers/parport
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'drivers/parport')
-rw-r--r--drivers/parport/BUGS-parport9
-rw-r--r--drivers/parport/ChangeLog583
-rw-r--r--drivers/parport/Kconfig145
-rw-r--r--drivers/parport/Makefile19
-rw-r--r--drivers/parport/TODO-parport20
-rw-r--r--drivers/parport/daisy.c512
-rw-r--r--drivers/parport/ieee1284.c819
-rw-r--r--drivers/parport/ieee1284_ops.c921
-rw-r--r--drivers/parport/multiface.h20
-rw-r--r--drivers/parport/parport_amiga.c293
-rw-r--r--drivers/parport/parport_arc.c139
-rw-r--r--drivers/parport/parport_atari.c240
-rw-r--r--drivers/parport/parport_cs.c397
-rw-r--r--drivers/parport/parport_gsc.c437
-rw-r--r--drivers/parport/parport_gsc.h222
-rw-r--r--drivers/parport/parport_mfc3.c404
-rw-r--r--drivers/parport/parport_pc.c3415
-rw-r--r--drivers/parport/parport_serial.c485
-rw-r--r--drivers/parport/parport_sunbpp.c412
-rw-r--r--drivers/parport/probe.c224
-rw-r--r--drivers/parport/procfs.c533
-rw-r--r--drivers/parport/share.c1014
22 files changed, 11263 insertions, 0 deletions
diff --git a/drivers/parport/BUGS-parport b/drivers/parport/BUGS-parport
new file mode 100644
index 00000000000..622ca3cc7fa
--- /dev/null
+++ b/drivers/parport/BUGS-parport
@@ -0,0 +1,9 @@
+Currently known (or at least suspected) bugs in parport:
+
+o lp doesn't allow you to read status while printing is in progress (is
+ this still true?).
+
+o parport_pc_ecp_read_block_pio() is broken. parport will revert to the
+ software-driven mode in ieee1284_ops.c
+
+See <URL:http://people.redhat.com/twaugh/parport/>.
diff --git a/drivers/parport/ChangeLog b/drivers/parport/ChangeLog
new file mode 100644
index 00000000000..db717c1d62a
--- /dev/null
+++ b/drivers/parport/ChangeLog
@@ -0,0 +1,583 @@
+2001-10-11 Tim Waugh <twaugh@redhat.com>
+ * parport_pc.c, parport_serial.c: Support for NetMos cards.
+ + Patch originally from Michael Reinelt <reinelt@eunet.at>.
+
+2002-04-25 Tim Waugh <twaugh@redhat.com>
+
+ * parport_serial.c, parport_pc.c: Move some SIIG cards around.
+ Patch from Andrey Panin.
+
+2002-01-20 Tim Waugh <twaugh@redhat.com>
+
+ * parport_pc.c (parport_pc_compat_write_block_pio,
+ parport_pc_ecp_write_block_pio, parport_pc_ecp_read_block_pio):
+ Use the default implementations if the caller wants to use
+ O_NONBLOCK.
+
+2002-02-25 Tim Waugh <twaugh@redhat.com>
+
+ * parport_pc.c: Make sure that priv->ctr_writable includes IntEn
+ even if IRQ is given as a parameter.
+
+2002-01-21 Tim Waugh <twaugh@redhat.com>
+
+ * daisy.c: Apply patch from Max Vorobiev to make parport_daisy_select
+ work for ECP/EPP modes.
+
+2002-01-13 Niels Kristian Bech Jensen <nkbj@image.dk>
+
+ * parport_pc.c: Change some occurrences of frob_set_mode to
+ ECR_WRITE. This fixes PLIP.
+
+2002-01-04 Tim Waugh <twaugh@redhat.com>
+
+ * share.c (parport_claim_or_block): Sleep interruptibly to prevent
+ a possible deadlock.
+
+2001-12-07 Damian Gruszka <damian.gruszka@VisionSystems.de>
+
+ * parport_pc.c (ECR_WRITE): Define. If there are forbidden bits
+ in the ECR register for some chips, this will be a useful place to
+ put that knowledge.
+ (change_mode): Use ECR_WRITE.
+ (parport_pc_restore_state): Likewise.
+ (parport_ECPPS2_supported): Likewise.
+ (parport_ECPEPP_supported): Likewise.
+ (irq_probe_EPP): Likewise.
+ (programmable_irq_support): Likewise.
+ (programmable_dma_support): Likewise.
+ (parport_pc_probe_port): Likewise.
+
+ (frob_set_mode): New function. Set the mode bits of the ECR.
+ (get_fifo_residue): Use frob_set_mode.
+ (parport_pc_ecpepp_read_data): Likewise.
+ (parport_pc_ecpepp_write_data): Likewise.
+ (parport_pc_ecpepp_read_addr): Likewise.
+ (parport_pc_ecpepp_write_addr): Likewise.
+ (parport_pc_compat_write_block_pio): Likewise.
+ (parport_pc_ecp_write_block_pio): Likewise.
+ (parport_ECR_present): Likewise.
+ (parport_ECP_supported): Likewise.
+ (parport_EPP_supported): Likewise.
+ (parport_ECPEPP_supported): Likewise.
+ (programmable_irq_support): Likewise.
+ (irq_probe_ECP): Likewise.
+ (programmable_dma_support): Likewise.
+
+ (parport_pc_enable_irq): Only enable interrupts if we know which
+ IRQ line they will come from.
+ (parport_pc_init_state): Set nErrIntrEn at initialisation.
+ (parport_pc_restore_state): Only write writable bits of CTR.
+ (parport_irq_probe): If no IRQ is found, take ackIntEn out of the
+ writable bit set.
+
+2001-12-07 Tim Waugh <twaugh@redhat.com>
+
+ * parport_pc.c (parport_pc_fifo_write_block_pio): Correct typo.
+ (parport_pc_init_state): Only set ackIntEn if we know which IRQ
+ line the interrupts will come from.
+
+2001-12-07 Tim Waugh <twaugh@redhat.com>
+
+ * ieee1284_ops.c (parport_ieee1284_epp_write_addr,
+ parport_ieee1284_epp_read_addr): Actually do something useful.
+
+2001-12-07 Tim Waugh <twaugh@redhat.com>
+
+ * parport_pc.c (dmaval): Don't use DMA by default. It seems to be
+ too buggy at the moment. Use 'dma=auto' to restore the previous
+ behaviour.
+
+2001-12-07 Tim Waugh <twaugh@redhat.com>
+
+ * daisy.c (DEBUG): Undefine.
+
+2001-12-06 Tim Waugh <twaugh@redhat.com>
+
+ * ieee1284_ops.c (parport_ieee1284_ecp_read_data): Mask off
+ PARPORT_CONTROL_AUTOFD as well. Bug spotted by Joe
+ <joeja@mindspring.com>.
+
+2001-12-03 Rich Liu <Rich.Liu@ite.com.tw>
+
+ * parport_pc.c (sio_ite_8872_probe): ITE8873 is a single-port
+ serial board, not a serial+parallel.
+
+2001-11-30 Niels Kristian Bech Jensen <nkbj@image.dk>
+
+ * parport_pc.c: Fix compiler warning.
+
+2001-11-14 Tim Waugh <twaugh@redhat.com>
+
+ * parport_pc.c (parport_pc_pci_probe): Hooks for PCI cards before
+ and after probing for ports.
+ * parport_serial.c (parport_register): Likewise.
+
+2001-11-12 Tim Waugh <twaugh@redhat.com>
+
+ * parport_pc.c (init_module): Warn when parameters are ignored.
+
+2001-11-01 Damian Gruszka <damian.gruszka@VisionSystems.de>
+
+ * parport_serial.c (serial_register): Set base_baud before
+ calling register_serial.
+
+2001-10-26 Tim Waugh <twaugh@redhat.com>
+
+ * parport_pc.c (parport_irq_probe): When ECR programmable IRQ
+ support fails, generate interrupts using the FIFO even if we don't
+ want to use the FIFO for real data transfers.
+ (parport_pc_probe_port): Display the ECR address if we have an
+ ECR, not just if we will use the FIFO.
+
+2001-10-24 Dave Strauss <D.Strauss@motorola.com>
+
+ * parport_pc.c (parport_pc_compat_write_block_pio,
+ parport_pc_ecp_write_block_pio): Allow a few seconds for an ECP
+ transfer to finish up.
+
+2001-10-11 Tim Waugh <twaugh@redhat.com>
+
+ * parport_pc (sio_ite_8872_probe): New function, submitted by Rich
+ Liu from ITE. Cleaned up, removed bogus phys_to_virt calls.
+
+2001-10-24 Tim Waugh <twaugh@redhat.com>
+
+ * parport_pc.c: Support for AKS AladdinCARD. Patch from
+ Aladdin Knowledge Systems (Christian Groessler).
+
+2001-10-24 Tim Waugh <twaugh@redhat.com>
+
+ * ieee1284_ops.c (parport_ieee1284_ecp_read_data): Try to minimise
+ turnaround time.
+
+ * ieee1284.c (parport_poll_peripheral): Try a couple of times
+ first without delaying.
+
+2001-10-10 Tim Waugh <twaugh@redhat.com>
+
+ * parport_pc.c: Support for OX16PCI954 PCI card.
+
+2001-10-10 Tim Waugh <twaugh@redhat.com>
+
+ * parport_pc.c: Support for OX12PCI840 PCI card (reported by
+ mk@daveg.com). Lock-ups diagnosed by Ronnie Arosa (and now we
+ just don't trust its ECR).
+
+2001-10-10 Gunther Mayer <gunther.mayer@braunschweig.okersurf.de>
+
+ * parport_pc.c: Support for AVLAB cards.
+
+2001-10-10 Tim Waugh <twaugh@redhat.com>
+
+ * ieee1284_ops.c (ecp_forward_to_reverse, ecp_reverse_to_forward):
+ Remember to retry direction switch if it fails. Patch from David
+ Lambert.
+
+2001-10-08 David C. Hansen <haveblue@us.ibm.com>
+
+ * share.c: Make driverlist_lock and parportlist_lock static.
+
+2001-10-08 Philip Blundell <philb@gnu.org>
+
+ * parport_pc.c: New modular parameter verbose_logging.
+ Make port->modes indicate the modes that we are prepared to use,
+ rather than the modes that are available.
+
+2001-10-07 Tim Waugh <twaugh@redhat.com>
+
+ * parport_pc.c (parport_pc_probe_port): Fix memory leak spotted by
+ Kipp Cannon.
+
+2001-10-07 Tim Waugh <twaugh@redhat.com>
+
+ * parport_serial.c: Remove NetMos support, since it causes problems
+ for some people.
+
+2001-08-30 Tim Waugh <twaugh@redhat.com>
+
+ * parport_serial.c (parport_serial_pci_probe): Clean-up on partial
+ registration failure.
+
+2001-08-14 Tim Waugh <twaugh@redhat.com>
+
+ * parport_pc.c (parport_pc_init_superio): Allow for more than one
+ SuperIO device. Patch from Rich Lio (ITE).
+
+2001-08-11 Tim Waugh <twaugh@redhat.com>
+
+ * parport_pc.c: Support for Titan Electronics cards.
+
+2001-08-08 Tim Waugh <twaugh@redhat.com>
+
+ * share.c (parport_unregister_device): Remove device from wait list
+ too.
+
+2001-06-20 Tim Waugh <twaugh@redhat.com>
+
+ * parport_pc.c: Make 'io_hi=0' work.
+
+2001-05-31 Tim Waugh <twaugh@redhat.com>
+
+ * parport_serial.c: New file.
+
+2001-06-05 Tim Waugh <twaugh@redhat.com>
+
+ * parport_pc.c (parport_pc_unregister_port): New exported function.
+ Do the opposite of parport_pc_probe_port.
+ (cleanup_module): Use it.
+
+2001-05-22 Juan Quintela <quintela@mandrakesoft.com>
+
+ * parport_amiga.c: Set printk levels.
+ * parport_gsc.c: Likewise.
+ * parport_mfc3.c: Likewise.
+ * parport_pc.c: Likewise.
+ * parport_sunbpp.c: Likewise.
+ * probe.c: Likewise.
+ * share.c: Likewise.
+
+2001-05-10 Fred Barnes <frmb2@ukc.ac.uk>
+
+ * parport_pc.c (parport_pc_epp_read_data): added support for
+ reading from a w91284pic peripheral, flag is PARPORT_W91284PIC.
+
+2001-05-07 Fred Barnes <frmb2@ukc.ac.uk>
+
+ * parport_pc.c (parport_pc_epp_read_data,
+ parport_pc_epp_write_data, parport_pc_epp_read_addr,
+ parport_pc_epp_write_addr): support for fast reads/writes using
+ the PARPORT_EPP_FAST flag.
+
+ * ieee1284.c (parport_read, parport_write): added code to handle
+ software EPP mode (IEEE1284_MODE_EPPSWE). Added code to allow
+ BYTE mode reverse transfers (previously always went for NIBBLE
+ mode).
+
+ * ieee1284_ops.c (parport_ieee1284_epp_read_data,
+ parport_ieee1284_epp_write_data): fixed various polarity problems.
+ Also (theoretically) fixed address versions (.._addr), but no
+ hardware to test this on.
+
+ * parport_pc.h: added parport_dump_state() function for debugging.
+ Needs to have DEBUG_PARPORT to be defined for it to be included.
+
+2001-05-03 Tim Waugh <twaugh@redhat.com>
+
+ * parport_pc.c: Fix the compile problem I introduce from the last
+ change.
+
+2001-04-20 Paul Gortmaker <p_gortmaker@yahoo.com>
+
+ * parport_pc.c: Cut down the size quite a bit (more than 4k off
+ the object, about 1k off the zImage) for the older non-PCI
+ machines which are typically resource starved anyway...
+
+2001-03-26 R Horn <rjh@world.std.com>
+
+ * parport_pc.c: Some commentary changes.
+
+2001-04-19 Tim Waugh <twaugh@redhat.com>
+
+ * parport_pc.c (parport_pc_probe_port): Remove __devinit
+ attribute. Export unconditionally.
+
+2001-04-14 Jeff Garzik <jgarzik@pobox.com>
+
+ Merged: 2001-03-30 Tim Waugh <twaugh@redhat.com>
+
+ * drivers/parport/parport_pc.c: Make Via SuperIO chipsets behave
+ like everything else with respect to irq= and dma= parameters.
+
+2001-04-08 Tim Waugh <twaugh@redhat.com>
+
+ * parport_pc.c (parport_pc_save_state): Read from the soft copy of
+ the control port.
+ (parport_pc_restore_state): Update the soft copy of the control
+ port.
+
+2001-03-26 Tim Waugh <twaugh@redhat.com>
+
+ * share.c (parport_find_number, parport_find_base): Trigger
+ a lowlevel driver load if there are no ports yet.
+
+2001-03-26 Tim Waugh <twaugh@redhat.com>
+
+ * parport_pc.c (parport_ECP_supported): Remove the IRQ conflict
+ check since it seems totally unreliable.
+
+2001-03-02 Tim Waugh <twaugh@redhat.com>
+
+ * ieee1284_ops.c (parport_ieee1284_read_nibble): Reset nAutoFd
+ on timeout. Matches 2.2.x behaviour.
+
+2001-03-02 Andrew Morton <andrewm@uow.edu.au>
+
+ * parport_pc.c (registered_parport): New static variable.
+ (parport_pc_find_ports): Set it when we register PCI driver.
+ (init_module): Unregister PCI driver if necessary when we
+ fail.
+
+2001-03-02 Tim Waugh <twaugh@redhat.com>
+
+ * ieee1284_ops.c (parport_ieee1284_write_compat): Don't use
+ down_trylock to reset the IRQ count. Don't even use sema_init,
+ because it's not even necessary to reset the count. I can't
+ remember why we ever did.
+
+2001-01-04 Peter Osterlund <peter.osterlund@mailbox.swipnet.se>
+
+ * ieee1284.c (parport_negotiate): Fix missing printk argument.
+
+2001-01-03 Paul Schleger <Paul.Schleger@t-online.de>
+
+ * probe.c (parse_data): Get rid of trailing blanks in values.
+ Needed for XEROX XJ8C printer.
+
+2001-01-03 Tim Waugh <twaugh@redhat.com>
+
+ * parport_pc.c (parport_pc_probe_port): Say something when probes
+ are omitted.
+
+2001-01-03 Tim Waugh <twaugh@redhat.com>
+
+ * parport_pc.c (sio_via_686a_probe): Correct dma=255 fix.
+
+2000-11-21 Tim Waugh <twaugh@redhat.com>
+
+ * parport_pc.c (parport_pc_ecp_write_block_pio): Fix
+ reverse-to-forward logic. Spotted by Roland Kuck
+ <rci@cityweb.de>.
+
+2000-09-16 Cesar Eduardo Barros <cesarb@nitnet.com.br>
+
+ * parport_pc.c (sio_via_686a_probe): Handle case
+ where hardware returns 255 for IRQ or DMA.
+
+2000-07-20 Eddie C. Dost <ecd@skynet.be>
+
+ * share.c (attach_driver_chain): attach[i](port) needs to be
+ replaced by attach[count](port).
+
+2000-07-20 Eddie C. Dost <ecd@skynet.be>
+
+ * daisy.c (add_dev): kmalloc args are in wrong order.
+
+2000-07-12 Tim Waugh <twaugh@redhat.com>
+
+ * share.c: Documentation for parport_{get,port}_port,
+ parport_find_{number,base}.
+
+2000-07-12 Tim Waugh <twaugh@redhat.com>
+
+ * share.c (parport_unregister_device): Remove unneeded locking
+ (test cad==dev).
+ (parport_claim): Likewise.
+ (parport_find_number): New function.
+
+2000-07-12 Tim Waugh <twaugh@redhat.com>
+
+ * share.c (parport_register_port): Hold the parportlist_lock while
+ looking for a free parport number.
+ (parport_register_driver): Make sure that attach can block.
+ (attach_driver_chain): Likewise.
+
+2000-07-12 Tim Waugh <twaugh@redhat.com>
+
+ * share.c (call_driver_chain): Do reference counting things.
+ (parport_get_port): New function.
+ (parport_put_port): New function.
+ (parport_register_port): Initialise reference count to zero.
+ (parport_unregister_port): Check reference count rather than
+ driver list to see if we can free the port.
+
+2000-07-12 Tim Waugh <twaugh@redhat.com>
+
+ * share.c: Clarifications in doc comments.
+
+2000-07-12 Tim Waugh <twaugh@redhat.com>
+
+ * share.c (parport_unregister_port): Fix typo in comment.
+
+2000-07-11 Gunther Mayer <gunther.mayer@braunschweig.okersurf.de>
+
+ * parport_pc.c: Support for the full range of Timedia cards.
+
+2000-07-08 Tim Waugh <twaugh@redhat.com>
+
+ * daisy.c: License block comments as part of parportbook.
+ * ieee1284.c: Likewise.
+ * share.c: Likewise.
+
+2000-06-30 Petr Vandrovec <vandrove@vc.cvut.cz>
+
+ * procfs.c (do_hardware_modes): Generated string can be up to 34
+ chars long.
+
+2000-06-20 Gunther Mayer <gunther.mayer@braunschweig.okersurf.de>
+
+ * parport_pc.c (parport_pc_compat_write_block_pio): Warn about
+ change_mode failures.
+ (parport_pc_ecp_write_block_pio): Likewise.
+ (parport_pc_ecp_read_block_pio): Likewise.
+
+2000-06-20 Gunther Mayer <gunther.mayer@braunschweig.okersurf.de>
+
+ * parport_pc.c (parport_SPP_supported): Warn more about possibly
+ incorrect parameters.
+
+2000-06-15 Tim Waugh <twaugh@redhat.com>
+
+ * parport_pc.c (parport_ECP_supported): Set PARPORT_MODE_COMPAT
+ for ECP ports, since they can all do hardware accelerated
+ compatibility mode (I assume).
+
+2000-06-13 Tim Waugh <twaugh@redhat.com>
+
+ * parport_pc.c (cleanup_module): Remark about possible bugs.
+
+2000-06-13 Tim Waugh <twaugh@redhat.com>
+
+ * procfs.c: Break 'hardware' out into separate files.
+
+2000-05-28 Gunther Mayer <gunther.mayer@braunschweig.okersurf.de>
+
+ * Fix PCI ID printk for non-superio PCI cards.
+
+2000-05-28 Tim Waugh <twaugh@redhat.com>
+
+ * share.c (call_driver_chain): Get the driverlist_lock.
+ (parport_register_device): Make sure that port->devices always
+ looks consistent.
+ (parport_register_driver): Ensure that parport drivers are given
+ parameters that are valid for the duration of the callback by
+ locking the portlist against changes.
+ (parport_unregister_driver): Likewise.
+ (parport_claim): Don't overwrite flags.
+
+2000-05-28 Tim Waugh <twaugh@redhat.com>
+
+ * daisy.c (assign_addrs): Avoid double-probing daisy-chain devices
+ if the first probe succeeds.
+
+2000-05-16 Tim Waugh <twaugh@redhat.com>
+
+ * share.c (parport_claim): Fix SMP race.
+
+2000-05-15 Gunther Mayer <gunther.mayer@braunschweig.okersurf.de>
+
+ * parport_pc.c (parport_pc_compat_write_block_pio): Check for
+ timeouts.
+ (parport_pc_ecp_write_block_pio): Likewise.
+ (parport_pc_ecp_read_block_pio): Likewise.
+
+2000-05-02 Gunther Mayer <gunther.mayer@braunschweig.okersurf.de>
+
+ * parport_pc.c: PCI SYBA patch and verbose PCI detection.
+
+2000-05-02 Gunther Mayer <gunther.mayer@braunschweig.okersurf.de>
+
+ * parport_pc.c (decode_smsc): Fix SMSC 665/666 identification.
+
+2000-04-28 Tim Waugh <twaugh@redhat.com>
+
+ * ieee1284.c: Short function descriptions can't be multiline.
+
+ * daisy.c: Short function descriptions can't be multiline.
+
+2000-04-19 Tim Waugh <twaugh@redhat.com>
+
+ * parport_pc.c (parport_pc_fifo_write_block_dma): Make maxlen
+ calculation a bit clearer.
+
+ * ieee1284.c (parport_negotiate): Turn on data line drivers.
+
+ * ieee1284_ops.c (parport_ieee1284_read_byte): Turn off data line
+ drivers.
+ (parport_ieee1284_write_compat): Turn on data line drivers.
+
+ * daisy.c (assign_addrs): Turn on data line drivers.
+ (cpp_mux): Likewise.
+ (cpp_daisy): Likewise.
+
+2000-04-04 Tim Waugh <twaugh@redhat.com>
+
+ * parport_pc.c: Add support for another PCI card.
+
+2000-04-04 Tim Waugh <twaugh@redhat.com>
+
+ * daisy.c: Documentation in kernel-doc format.
+
+ * ieee1284.c: Likewise.
+
+ * share.c: Likewise.
+
+2000-04-01 Tim Waugh <twaugh@redhat.com>
+
+ * share.c (parport_register_device): Need to hold the module
+ reference counts before sleeping.
+
+2000-03-27 Tim Waugh <twaugh@redhat.com>
+
+ * parport_pc.c (parport_pc_ecp_read_block_pio): Correct operation
+ when peripheral is trying to send data when we stop listening.
+
+2000-03-22 Tim Waugh <twaugh@redhat.com>
+
+ * init.c (parport_setup): Fix return value.
+
+2000-03-21 Tim Waugh <twaugh@redhat.com>
+
+ * parport_pc.c (parport_pc_pci_probe): Fix return value; call
+ pci_enable_device.
+
+2000-03-16 Tim Waugh <twaugh@redhat.com>
+
+ * parport_pc.c (parport_ECP_supported): This seems to trigger on
+ machines that don't have an IRQ conflict; toned down the warning
+ message accordingly.
+
+2000-03-16 Gunther Mayer <gunther.mayer@braunschweig.netsurf.de>
+
+ * parport_pc.c (show_parconfig_smsc37c669): Fix typo.
+ (decode_winbond): More IDs.
+ (winbond_check): Protect against false positives.
+ (winbond_check2): Likewise.
+ (smsc_check): Likewise.
+
+2000-03-15 Tim Waugh <twaugh@redhat.com>
+
+ * parport_pc.c (cleanup_module): Don't call pci_unregister_driver
+ if we didn't call pci_register_driver first.
+
+2000-03-13 Tim Waugh <twaugh@redhat.com>
+
+ * parport_pc.c (parport_pc_init): Moved from asm/parport.h.
+
+ * Config.in: CONFIG_PARPORT_PC_SUPERIO: new option.
+
+ * parport_pc.c (show_parconfig_smsc37c669): Make __devinit.
+ (show_parconfig_winbond): Likewise.
+ (decode_winbond): Likewise.
+ (decode_smsc): Likewise.
+ (winbond_check): Likewise.
+ (winbond_check2): Likewise.
+ (smsc_check): Likewise.
+ (detect_and_report_winbond): Likewise.
+ (detect_and_report_smsc): Likewise.
+ (get_superio_dma): Likewise.
+ (get_superio_irq): Likewise.
+ (parport_pc_find_isa_ports): New function.
+ (parport_pc_find_ports): New function.
+ (init_module): Make superio a config option, not a parameter.
+
+2000-03-10 Tim Waugh <twaugh@redhat.com>
+
+ * parport_pc.c (decode_winbond): Use correct 83877ATF chip ID.
+ (decode_winbond): Fix typo.
+
+2000-03-09 Tim Waugh <twaugh@redhat.com>
+
+ * parport_pc.c: Integrate SuperIO PCI probe with normal PCI card
+ probe, so that the MODULE_DEVICE_TABLE is complete.
+
diff --git a/drivers/parport/Kconfig b/drivers/parport/Kconfig
new file mode 100644
index 00000000000..731010e0e6f
--- /dev/null
+++ b/drivers/parport/Kconfig
@@ -0,0 +1,145 @@
+#
+# For a description of the syntax of this configuration file,
+# see Documentation/kbuild/kconfig-language.txt.
+#
+# Parport configuration.
+#
+
+menu "Parallel port support"
+
+config PARPORT
+ tristate "Parallel port support"
+ ---help---
+ If you want to use devices connected to your machine's parallel port
+ (the connector at the computer with 25 holes), e.g. printer, ZIP
+ drive, PLIP link (Parallel Line Internet Protocol is mainly used to
+ create a mini network by connecting the parallel ports of two local
+ machines) etc., then you need to say Y here; please read
+ <file:Documentation/parport.txt> and
+ <file:drivers/parport/BUGS-parport>.
+
+ For extensive information about drivers for many devices attaching
+ to the parallel port see <http://www.torque.net/linux-pp.html> on
+ the WWW.
+
+ It is possible to share a single parallel port among several devices
+ and it is safe to compile all the corresponding drivers into the
+ kernel. To compile parallel port support as a module, choose M here:
+ the module will be called parport.
+ If you have more than one parallel port and want to specify which
+ port and IRQ to be used by this driver at module load time, take a
+ look at <file:Documentation/parport.txt>.
+
+ If unsure, say Y.
+
+config PARPORT_PC
+ tristate "PC-style hardware"
+ depends on PARPORT && (!SPARC64 || PCI) && (!SPARC32 || BROKEN)
+ ---help---
+ You should say Y here if you have a PC-style parallel port. All
+ IBM PC compatible computers and some Alphas have PC-style
+ parallel ports. PA-RISC owners should only say Y here if they
+ have a SuperIO parallel port.
+
+ To compile this driver as a module, choose M here: the
+ module will be called parport_pc.
+
+ If unsure, say Y.
+
+config PARPORT_SERIAL
+ tristate "Multi-IO cards (parallel and serial)"
+ depends on SERIAL_8250 && PARPORT_PC && PCI
+ help
+ This adds support for multi-IO PCI cards that have parallel and
+ serial ports. You should say Y or M here. If you say M, the module
+ will be called parport_serial.
+
+config PARPORT_PC_FIFO
+ bool "Use FIFO/DMA if available (EXPERIMENTAL)"
+ depends on PARPORT_PC && EXPERIMENTAL
+ help
+ Many parallel port chipsets provide hardware that can speed up
+ printing. Say Y here if you want to take advantage of that.
+
+ As well as actually having a FIFO, or DMA capability, the kernel
+ will need to know which IRQ the parallel port has. By default,
+ parallel port interrupts will not be used, and so neither will the
+ FIFO. See <file:Documentation/parport.txt> to find out how to
+ specify which IRQ/DMA to use.
+
+config PARPORT_PC_SUPERIO
+ bool "SuperIO chipset support (EXPERIMENTAL)"
+ depends on PARPORT_PC && EXPERIMENTAL
+ help
+ Saying Y here enables some probes for Super-IO chipsets in order to
+ find out things like base addresses, IRQ lines and DMA channels. It
+ is safe to say N.
+
+config PARPORT_PC_PCMCIA
+ tristate "Support for PCMCIA management for PC-style ports"
+ depends on PARPORT!=n && (PCMCIA!=n && PARPORT_PC=m && PARPORT_PC || PARPORT_PC=y && PCMCIA)
+ help
+ Say Y here if you need PCMCIA support for your PC-style parallel
+ ports. If unsure, say N.
+
+config PARPORT_NOT_PC
+ bool
+
+config PARPORT_ARC
+ tristate "Archimedes hardware"
+ depends on ARM && PARPORT
+ select PARPORT_NOT_PC
+
+config PARPORT_AMIGA
+ tristate "Amiga builtin port"
+ depends on AMIGA && PARPORT
+ select PARPORT_NOT_PC
+ help
+ Say Y here if you need support for the parallel port hardware on
+ Amiga machines. This code is also available as a module (say M),
+ called parport_amiga. If in doubt, saying N is the safe plan.
+
+config PARPORT_MFC3
+ tristate "Multiface III parallel port"
+ depends on ZORRO && PARPORT
+ select PARPORT_NOT_PC
+ help
+ Say Y here if you need parallel port support for the MFC3 card.
+ This code is also available as a module (say M), called
+ parport_mfc3. If in doubt, saying N is the safe plan.
+
+config PARPORT_ATARI
+ tristate "Atari hardware"
+ depends on ATARI && PARPORT
+ select PARPORT_NOT_PC
+ help
+ Say Y here if you need support for the parallel port hardware on
+ Atari machines. This code is also available as a module (say M),
+ called parport_atari. If in doubt, saying N is the safe plan.
+
+config PARPORT_GSC
+ tristate
+ default GSC
+ depends on PARPORT
+
+config PARPORT_SUNBPP
+ tristate "Sparc hardware (EXPERIMENTAL)"
+ depends on SBUS && PARPORT && EXPERIMENTAL
+ select PARPORT_NOT_PC
+ help
+ This driver provides support for the bidirectional parallel port
+ found on many Sun machines. Note that many of the newer Ultras
+ actually have pc style hardware instead.
+
+config PARPORT_1284
+ bool "IEEE 1284 transfer modes"
+ depends on PARPORT
+ help
+ If you have a printer that supports status readback or device ID, or
+ want to use a device that uses enhanced parallel port transfer modes
+ such as EPP and ECP, say Y here to enable advanced IEEE 1284
+ transfer modes. Also say Y if you want device ID information to
+ appear in /proc/sys/dev/parport/*/autoprobe*. It is safe to say N.
+
+endmenu
+
diff --git a/drivers/parport/Makefile b/drivers/parport/Makefile
new file mode 100644
index 00000000000..5372212bb9d
--- /dev/null
+++ b/drivers/parport/Makefile
@@ -0,0 +1,19 @@
+#
+# Makefile for the kernel Parallel port device drivers.
+#
+
+parport-objs := share.o ieee1284.o ieee1284_ops.o procfs.o
+
+ifeq ($(CONFIG_PARPORT_1284),y)
+ parport-objs += daisy.o probe.o
+endif
+
+obj-$(CONFIG_PARPORT) += parport.o
+obj-$(CONFIG_PARPORT_PC) += parport_pc.o
+obj-$(CONFIG_PARPORT_SERIAL) += parport_serial.o
+obj-$(CONFIG_PARPORT_PC_PCMCIA) += parport_cs.o
+obj-$(CONFIG_PARPORT_AMIGA) += parport_amiga.o
+obj-$(CONFIG_PARPORT_MFC3) += parport_mfc3.o
+obj-$(CONFIG_PARPORT_ATARI) += parport_atari.o
+obj-$(CONFIG_PARPORT_SUNBPP) += parport_sunbpp.o
+obj-$(CONFIG_PARPORT_GSC) += parport_gsc.o
diff --git a/drivers/parport/TODO-parport b/drivers/parport/TODO-parport
new file mode 100644
index 00000000000..089b14ee446
--- /dev/null
+++ b/drivers/parport/TODO-parport
@@ -0,0 +1,20 @@
+Things to be done.
+
+0. Fix the bugs (see BUGS-parport).
+
+1. Proper documentation.
+
+2. A better lp.c:
+
+ a) ECP support would be nice. This can only work if both the port and
+ the printer support it.
+
+ b) Handle status readback automatically. IEEE1284 printers can post status
+ bits when they have something to say. We should read out and deal
+ with (maybe just log) whatever the printer wants to tell the world.
+
+3. Support more hardware (eg m68k, Sun bpp).
+
+4. A better PLIP (make use of bidirectional/ECP/EPP ports).
+
+See <URL:http://people.redhat.com/twaugh/parport/>.
diff --git a/drivers/parport/daisy.c b/drivers/parport/daisy.c
new file mode 100644
index 00000000000..075c7eb5c85
--- /dev/null
+++ b/drivers/parport/daisy.c
@@ -0,0 +1,512 @@
+/*
+ * IEEE 1284.3 Parallel port daisy chain and multiplexor code
+ *
+ * Copyright (C) 1999, 2000 Tim Waugh <tim@cyberelk.demon.co.uk>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ *
+ * ??-12-1998: Initial implementation.
+ * 31-01-1999: Make port-cloning transparent.
+ * 13-02-1999: Move DeviceID technique from parport_probe.
+ * 13-03-1999: Get DeviceID from non-IEEE 1284.3 devices too.
+ * 22-02-2000: Count devices that are actually detected.
+ *
+ * Any part of this program may be used in documents licensed under
+ * the GNU Free Documentation License, Version 1.1 or any later version
+ * published by the Free Software Foundation.
+ */
+
+#include <linux/module.h>
+#include <linux/parport.h>
+#include <linux/delay.h>
+#include <linux/sched.h>
+
+#include <asm/current.h>
+#include <asm/uaccess.h>
+
+#undef DEBUG
+
+#ifdef DEBUG
+#define DPRINTK(stuff...) printk (stuff)
+#else
+#define DPRINTK(stuff...)
+#endif
+
+static struct daisydev {
+ struct daisydev *next;
+ struct parport *port;
+ int daisy;
+ int devnum;
+} *topology = NULL;
+static DEFINE_SPINLOCK(topology_lock);
+
+static int numdevs = 0;
+
+/* Forward-declaration of lower-level functions. */
+static int mux_present (struct parport *port);
+static int num_mux_ports (struct parport *port);
+static int select_port (struct parport *port);
+static int assign_addrs (struct parport *port);
+
+/* Add a device to the discovered topology. */
+static void add_dev (int devnum, struct parport *port, int daisy)
+{
+ struct daisydev *newdev, **p;
+ newdev = kmalloc (sizeof (struct daisydev), GFP_KERNEL);
+ if (newdev) {
+ newdev->port = port;
+ newdev->daisy = daisy;
+ newdev->devnum = devnum;
+ spin_lock(&topology_lock);
+ for (p = &topology; *p && (*p)->devnum<devnum; p = &(*p)->next)
+ ;
+ newdev->next = *p;
+ *p = newdev;
+ spin_unlock(&topology_lock);
+ }
+}
+
+/* Clone a parport (actually, make an alias). */
+static struct parport *clone_parport (struct parport *real, int muxport)
+{
+ struct parport *extra = parport_register_port (real->base,
+ real->irq,
+ real->dma,
+ real->ops);
+ if (extra) {
+ extra->portnum = real->portnum;
+ extra->physport = real;
+ extra->muxport = muxport;
+ real->slaves[muxport-1] = extra;
+ }
+
+ return extra;
+}<