sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget'/translations/zh_CN/admin-guide/parportmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget'/translations/zh_TW/admin-guide/parportmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget'/translations/it_IT/admin-guide/parportmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget'/translations/ja_JP/admin-guide/parportmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget'/translations/ko_KR/admin-guide/parportmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget'/translations/sp_SP/admin-guide/parportmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhsection)}(hhh](htitle)}(hParporth]hParport}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhA/var/lib/git/docbuild/linux/Documentation/admin-guide/parport.rsthKubh paragraph)}(hThe ``parport`` code provides parallel-port support under Linux. This includes the ability to share one port between multiple device drivers.h](hThe }(hhhhhNhNubhliteral)}(h ``parport``h]hparport}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhubh code provides parallel-port support under Linux. This includes the ability to share one port between multiple device drivers.}(hhhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hXYou can pass parameters to the ``parport`` code to override its automatic detection of your hardware. This is particularly useful if you want to use IRQs, since in general these can't be autoprobed successfully. By default IRQs are not used even if they **can** be probed. This is because there are a lot of people using the same IRQ for their parallel port and a sound card or network card.h](hYou can pass parameters to the }(hhhhhNhNubh)}(h ``parport``h]hparport}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhubh code to override its automatic detection of your hardware. This is particularly useful if you want to use IRQs, since in general these can’t be autoprobed successfully. By default IRQs are not used even if they }(hhhhhNhNubhstrong)}(h**can**h]hcan}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhubh be probed. This is because there are a lot of people using the same IRQ for their parallel port and a sound card or network card.}(hhhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hThe ``parport`` code is split into two parts: generic (which deals with port-sharing) and architecture-dependent (which deals with actually using the port).h](hThe }(hjhhhNhNubh)}(h ``parport``h]hparport}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh code is split into two parts: generic (which deals with port-sharing) and architecture-dependent (which deals with actually using the port).}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hhh](h)}(hParport as modulesh]hParport as modules}(hj2hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj/hhhhhKubh)}(h2If you load the `parport`` code as a module, say::h](hIf you load the }(hj@hhhNhNubhtitle_reference)}(h `parport``h]hparport`}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1jHhj@ubh code as a module, say:}(hj@hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj/hhubh literal_block)}(h# insmod parporth]h# insmod parport}hjdsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1jbhhhKhj/hhubh)}(hnto load the generic ``parport`` code. You then must load the architecture-dependent code with (for example)::h](hto load the generic }(hjthhhNhNubh)}(h ``parport``h]hparport}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjtubhN code. You then must load the architecture-dependent code with (for example):}(hjthhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj/hhubjc)}(h8# insmod parport_pc io=0x3bc,0x378,0x278 irq=none,7,autoh]h8# insmod parport_pc io=0x3bc,0x378,0x278 irq=none,7,auto}hjsbah}(h]h ]h"]h$]h&]jrjsuh1jbhhhKhj/hhubh)}(hXto tell the ``parport`` code that you want three PC-style ports, one at 0x3bc with no IRQ, one at 0x378 using IRQ 7, and one at 0x278 with an auto-detected IRQ. Currently, PC-style (``parport_pc``), Sun ``bpp``, Amiga, Atari, and MFC3 hardware is supported.h](h to tell the }(hjhhhNhNubh)}(h ``parport``h]hparport}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh code that you want three PC-style ports, one at 0x3bc with no IRQ, one at 0x378 using IRQ 7, and one at 0x278 with an auto-detected IRQ. Currently, PC-style (}(hjhhhNhNubh)}(h``parport_pc``h]h parport_pc}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh), Sun }(hjhhhNhNubh)}(h``bpp``h]hbpp}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh/, Amiga, Atari, and MFC3 hardware is supported.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK hj/hhubh)}(hPCI parallel I/O card support comes from ``parport_pc``. Base I/O addresses should not be specified for supported PCI cards since they are automatically detected.h](h)PCI parallel I/O card support comes from }(hjhhhNhNubh)}(h``parport_pc``h]h parport_pc}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubhl. Base I/O addresses should not be specified for supported PCI cards since they are automatically detected.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK%hj/hhubh)}(hhh](h)}(hmodprobeh]hmodprobe}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK+ubh)}(h{If you use modprobe , you will find it useful to add lines as below to a configuration file in /etc/modprobe.d/ directory::h]hzIf you use modprobe , you will find it useful to add lines as below to a configuration file in /etc/modprobe.d/ directory:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK-hjhhubjc)}(hNalias parport_lowlevel parport_pc options parport_pc io=0x378,0x278 irq=7,autoh]hNalias parport_lowlevel parport_pc options parport_pc io=0x378,0x278 irq=7,auto}hj%sbah}(h]h ]h"]h$]h&]jrjsuh1jbhhhK0hjhhubh)}(hmodprobe will load ``parport_pc`` (with the options ``io=0x378,0x278 irq=7,auto``) whenever a parallel port device driver (such as ``lp``) is loaded.h](hmodprobe will load }(hj3hhhNhNubh)}(h``parport_pc``h]h parport_pc}(hj;hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj3ubh (with the options }(hj3hhhNhNubh)}(h``io=0x378,0x278 irq=7,auto``h]hio=0x378,0x278 irq=7,auto}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj3ubh2) whenever a parallel port device driver (such as }(hj3hhhNhNubh)}(h``lp``h]hlp}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj3ubh ) is loaded.}(hj3hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK3hjhhubh)}(hNote that these are example lines only! You shouldn't in general need to specify any options to ``parport_pc`` in order to be able to use a parallel port.h](hcNote that these are example lines only! You shouldn’t in general need to specify any options to }(hjwhhhNhNubh)}(h``parport_pc``h]h parport_pc}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjwubh, in order to be able to use a parallel port.}(hjwhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK6hjhhubeh}(h]modprobeah ]h"]modprobeah$]h&]uh1hhj/hhhhhK+ubh)}(hhh](h)}(hParport probe [optional]h]hParport probe [optional]}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKhjhhubjc)}(h"parport0: Printer, BJC-210 (Canon)h]h"parport0: Printer, BJC-210 (Canon)}hjsbah}(h]h ]h"]h$]h&]jrjsuh1jbhhhKDhjhhubh)}(hLThe probe information is available from files in ``/proc/sys/dev/parport/``.h](h1The probe information is available from files in }(hjhhhNhNubh)}(h``/proc/sys/dev/parport/``h]h/proc/sys/dev/parport/}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKFhjhhubeh}(h]parport-probe-optionalah ]h"]parport probe [optional]ah$]h&]uh1hhj/hhhhhKIRQ autoprobing works only for a few port types at the moment.h]h>IRQ autoprobing works only for a few port types at the moment.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]ji*uh1jhhhKhj ubah}(h]h ]h"]h$]h&]uh1j hhhKhjhhubeh}(h]device-driversah ]h"]device driversah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h'Reporting printer problems with parporth]h'Reporting printer problems with parport}(hj> hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj; hhhhhKubh)}(hsIf you are having problems printing, please go through these steps to try to narrow down where the problem area is.h]hsIf you are having problems printing, please go through these steps to try to narrow down where the problem area is.}(hjL hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj; hhubh)}(hWhen reporting problems with parport, really you need to give all of the messages that ``parport_pc`` spits out when it initialises. There are several code paths:h](hWWhen reporting problems with parport, really you need to give all of the messages that }(hjZ hhhNhNubh)}(h``parport_pc``h]h parport_pc}(hjb hhhNhNubah}(h]h ]h"]h$]h&]uh1hhjZ ubh> spits out when it initialises. There are several code paths:}(hjZ hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj; hhubj)}(hhh](j)}(hpollingh]h)}(hj h]hpolling}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj} ubah}(h]h ]h"]h$]h&]uh1jhjz hhhhhNubj)}(h&interrupt-driven, protocol in softwareh]h)}(hj h]h&interrupt-driven, protocol in software}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhjz hhhhhNubj)}(h0interrupt-driven, protocol in hardware using PIOh]h)}(hj h]h0interrupt-driven, protocol in hardware using PIO}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhjz hhhhhNubj)}(h1interrupt-driven, protocol in hardware using DMA h]h)}(h0interrupt-driven, protocol in hardware using DMAh]h0interrupt-driven, protocol in hardware using DMA}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhjz hhhhhNubeh}(h]h ]h"]h$]h&]jijjuh1jhhhKhj; hhubh)}(hThe kernel messages that ``parport_pc`` logs give an indication of which code path is being used. (They could be a lot better actually..)h](hThe kernel messages that }(hj hhhNhNubh)}(h``parport_pc``h]h parport_pc}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubhb logs give an indication of which code path is being used. (They could be a lot better actually..)}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj; hhubh)}(h`For normal printer protocol, having IEEE 1284 modes enabled or not should not make a difference.h]h`For normal printer protocol, having IEEE 1284 modes enabled or not should not make a difference.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhMhj; hhubh)}(hTo turn off the 'protocol in hardware' code paths, disable ``CONFIG_PARPORT_PC_FIFO``. Note that when they are enabled they are not necessarily **used**; it depends on whether the hardware is available, enabled by the BIOS, and detected by the driver.h](h?To turn off the ‘protocol in hardware’ code paths, disable }(hj hhhNhNubh)}(h``CONFIG_PARPORT_PC_FIFO``h]hCONFIG_PARPORT_PC_FIFO}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubh<. Note that when they are enabled they are not necessarily }(hj hhhNhNubh)}(h**used**h]hused}(hj( hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubhc; it depends on whether the hardware is available, enabled by the BIOS, and detected by the driver.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj; hhubh)}(hSo, to start with, disable ``CONFIG_PARPORT_PC_FIFO``, and load ``parport_pc`` with ``irq=none``. See if printing works then. It really should, because this is the simplest code path.h](hSo, to start with, disable }(hj@ hhhNhNubh)}(h``CONFIG_PARPORT_PC_FIFO``h]hCONFIG_PARPORT_PC_FIFO}(hjH hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj@ ubh , and load }(hj@ hhhNhNubh)}(h``parport_pc``h]h parport_pc}(hjZ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj@ ubh with }(hj@ hhhNhNubh)}(h ``irq=none``h]hirq=none}(hjl hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj@ ubhX. See if printing works then. It really should, because this is the simplest code path.}(hj@ hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhM hj; hhubh)}(hIf that works fine, try with ``io=0x378 irq=7`` (adjust for your hardware), to make it use interrupt-driven in-software protocol.h](hIf that works fine, try with }(hj hhhNhNubh)}(h``io=0x378 irq=7``h]hio=0x378 irq=7}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubhR (adjust for your hardware), to make it use interrupt-driven in-software protocol.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj; hhubh)}(hIf **that** works fine, then one of the hardware modes isn't working right. Enable ``CONFIG_FIFO`` (no, it isn't a module option, and yes, it should be), set the port to ECP mode in the BIOS and note the DMA channel, and try with::h](hIf }(hj hhhNhNubh)}(h**that**h]hthat}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubhK works fine, then one of the hardware modes isn’t working right. Enable }(hj hhhNhNubh)}(h``CONFIG_FIFO``h]h CONFIG_FIFO}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj ubh (no, it isn’t a module option, and yes, it should be), set the port to ECP mode in the BIOS and note the DMA channel, and try with:}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhMhj; hhubjc)}(h@io=0x378 irq=7 dma=none (for PIO) io=0x378 irq=7 dma=3 (for DMA)h]h@io=0x378 irq=7 dma=none (for PIO) io=0x378 irq=7 dma=3 (for DMA)}hj sbah}(h]h ]h"]h$]h&]jrjsuh1jbhhhMhj; hhubh transition)}(h ----------h]h}(h]h ]h"]h$]h&]uh1j hhhMhj; hhubh)}(hphilb@gnu.org tim@cyberelk.neth](h reference)}(h philb@gnu.orgh]h philb@gnu.org}(hj hhhNhNubah}(h]h ]h"]h$]h&]refurimailto:philb@gnu.orguh1j hj ubh }(hj hhhNhNubj )}(htim@cyberelk.neth]htim@cyberelk.net}(hj hhhNhNubah}(h]h ]h"]h$]h&]refurimailto:tim@cyberelk.netuh1j hj ubeh}(h]h ]h"]h$]h&]uh1hhhhMhj; hhubeh}(h]'reporting-printer-problems-with-parportah ]h"]'reporting printer problems with parportah$]h&]uh1hhhhhhhhKubeh}(h]parportah ]h"]parportah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksjSfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjR error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(j- j* j jjjjjjjjjj8 j5 j% j" u nametypes}(j- j jjjjj8 j% uh}(j* hjj/jjjjjjjjj5 jj" j; u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log] decorationNhhub.