[PARPORT] NetMos 9805 pci parport experiences

From: Joost Kooij (joost@topaz.mdcc.cx)
Date: Sun Oct 28 2001 - 06:22:38 EST

  • Next message: Alexandre Courbot: "Re: [PARPORT] Reverse engineering a parallel device protocol"

    Hi,

    I have a NetMos 1284 parallel port PCI card. Vanilla 2.4.13 does
    not recognise the card, nor does 2.4.13-ac3. Using the patch at
    people.redhat.com/twaugh, I managed to get it to work, but with mixed
    results.

    With the patch applied, it is detected as a simple parallel port as
    shown by the below dmesg output (parport0 is the on-board parport):

      parport: PnP BIOS reports device PNPBIOS PNP0401 (node number 0xa) is configured to use io 0x0378, io 0x0778, irq 7, dma 3
      parport0: PC-style at 0x378 (0x778), irq 7, dma 3 [PCSPP,TRISTATE,COMPAT,EPP,ECP,DMA]
      parport0: cpp_daisy: aa5500ff(98)
      parport0: assign_addrs: aa5500ff(98)
      parport0: Printer, Xerox DocuPrint P1210
      AMD756: dev 9710:9805, router pirq : 3 get irq : 11
      PCI: Found IRQ 11 for device 00:0b.0
      PCI parallel port detected: 9710:9805, I/O at 0xda00(0x0)
      parport1: PC-style at 0xda00 [PCSPP,TRISTATE,EPP]
      parport1: cpp_daisy: aa5500ff(98)
      parport1: assign_addrs: aa5500ff(98)
      parport1: Printer, Xerox DocuPrint M750
      lp0: using parport0 (interrupt-driven).
      lp1: using parport1 (polling).

    Printing works fine with these settings, as you can see it even reports
    the attached printer model.

    Because the card is advertised as a full IEEE-1284 conforming device, I
    tried to force it to use the interrupt that is reported (irq 11). So I do
    "insmod parport_pc io=0x378,0xda00 irq=7,11" and that appears to succeed.
    I can see irq 11 registered in /proc/interrupts, and apparently there
    are no conficts.

    The dmesg output:

      parport0: PC-style at 0x378 (0x778), irq 7, using FIFO [PCSPP,TRISTATE,COMPAT,EPP,ECP]
      parport0: cpp_daisy: aa5500ff(98)
      parport0: assign_addrs: aa5500ff(98)
      parport0: Printer, Xerox DocuPrint P1210
      parport1: PC-style at 0xda00, irq 11 [PCSPP,TRISTATE,EPP]
      parport1: cpp_daisy: aa5500ff(98)
      parport1: assign_addrs: aa5500ff(98)
      parport1: Printer, Xerox DocuPrint M750
      lp0: using parport0 (interrupt-driven).
      lp1: using parport1 (interrupt-driven).

    Now when I attempt to print to lp1, a solid hang occurs and I have to
    toggle the power switch.

    Here's the output of "lspci -v -v -x -s 00:0b.0":

      00:0b.0 Communication controller: Unknown device 9710:9805 (rev 01)
            Subsystem: Symbios Logic Inc. (formerly NCR): Unknown device 0010
            Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B-
            Status: Cap- 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
            Interrupt: pin A routed to IRQ 11
            Region 0: I/O ports at da00 [size=8]
            Region 1: I/O ports at d800 [size=8]
            Region 2: I/O ports at d600 [size=8]
            Region 3: I/O ports at d400 [size=8]
            Region 4: I/O ports at d200 [size=8]
            Region 5: I/O ports at d000 [size=16]
      00: 10 97 05 98 03 01 80 02 01 00 80 07 08 40 00 00
      10: 01 da 00 00 01 d8 00 00 01 d6 00 00 01 d4 00 00
      20: 01 d2 00 00 01 d0 00 00 00 00 00 00 00 10 10 00
      30: 00 00 00 00 00 00 00 00 00 00 00 00 0b 01 00 00

    If you need any more information, or if you can tell me what debug options
    I should set or compile, then I'd be glad to do so. I can also hook a
    console up to the machine, or try a serial console. The first time the
    machine hung, I carried a monitor to it, but the screen was blanked. Also,
    the numlock key did not toggle the light on the keyboard.

    Below is the patch I brewed based on Tim Waugh's bigger patch, that did
    not apply cleanly to 2.4.13-ac3 btw. I added a line for pci.ids, hoping
    that would make the parport_pc detection code print out a nice string, but
    it only serves to beatify the output of /proc/pci.

    Please cc: me on any replies, I am not subscribed to the list.

    Cheers,

    Joost

    diff -ruw 2.4.13-ac3/linux/drivers/parport/parport_pc.c 2.4.13-ac3+netmos/linux/drivers/parport/parport_pc.c
    --- 2.4.13-ac3/linux/drivers/parport/parport_pc.c Sat Oct 27 23:10:47 2001
    +++ 2.4.13-ac3+netmos/linux/drivers/parport/parport_pc.c Sat Oct 27 23:38:16 2001
    @@ -2563,6 +2563,7 @@
             avlab_2p,
             oxsemi_954,
             oxsemi_840,
    + netmos_9805,
     };
     
     
    @@ -2636,6 +2637,7 @@
              * and 840 locks up if you write 1 to bit 2! */
             /* oxsemi_954 */ { 1, { { 0, -1 }, } },
             /* oxsemi_840 */ { 1, { { 0, -1 }, } },
    + /* netmos_9805 */ { 1, { { 0, -1 }, } },
     };
     
     static struct pci_device_id parport_pc_pci_tbl[] __devinitdata = {
    @@ -2729,6 +2731,8 @@
               PCI_ANY_ID, PCI_ANY_ID, 0, 0, oxsemi_954 },
             { PCI_VENDOR_ID_OXSEMI, PCI_DEVICE_ID_OXSEMI_12PCI840,
               PCI_ANY_ID, PCI_ANY_ID, 0, 0, oxsemi_840 },
    + { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9805,
    + PCI_ANY_ID, PCI_ANY_ID, 0, 0, netmos_9805 },
             { 0, } /* terminate list */
     };
     MODULE_DEVICE_TABLE(pci,parport_pc_pci_tbl);
    diff -ruw 2.4.13-ac3/linux/drivers/pci/pci.ids 2.4.13-ac3+netmos/linux/drivers/pci/pci.ids
    --- 2.4.13-ac3/linux/drivers/pci/pci.ids Sat Oct 27 23:10:47 2001
    +++ 2.4.13-ac3+netmos/linux/drivers/pci/pci.ids Sun Oct 28 01:20:44 2001
    @@ -5144,6 +5144,8 @@
             6565 6565
     9699 Omni Media Technology Inc
             6565 6565
    +9710 NetMos Technology
    + 9805 1284 Printer Port
     a0a0 AOPEN Inc.
     a0f1 UNISYS Corporation
     a200 NEC Corporation
    diff -ruw 2.4.13-ac3/linux/include/linux/pci_ids.h 2.4.13-ac3+netmos/linux/include/linux/pci_ids.h
    --- 2.4.13-ac3/linux/include/linux/pci_ids.h Sat Oct 27 23:11:02 2001
    +++ 2.4.13-ac3+netmos/linux/include/linux/pci_ids.h Sat Oct 27 23:38:16 2001
    @@ -1704,6 +1704,7 @@
     
     #define PCI_VENDOR_ID_NETMOS 0x9710
     #define PCI_DEVICE_ID_NETMOS_9735 0x9735
    +#define PCI_DEVICE_ID_NETMOS_9805 0x9805
     #define PCI_DEVICE_ID_NETMOS_9835 0x9835
     
     #define PCI_SUBVENDOR_ID_EXSYS 0xd84d

    -- To unsubscribe, send mail to: linux-parport-request@torque.net --
    -- with the single word "unsubscribe" in the body of the message. --



    This archive was generated by hypermail 2b29 : Sun Oct 28 2001 - 12:18:14 EST