LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 07-19-2022, 11:52 AM   #1
jon Elson
Member
 
Registered: May 2018
Posts: 69

Rep: Reputation: Disabled
need to change parport mode


Hello, I make a line of parallel-port interfaced devices that use the EPP mode of the port. I have a diagnostic program that tests functions of the device. On a particular computer (Dell 7010) the diagnostic does not work, but the user program (LinuxCNC) does work. Looking with lspci -v I FINALLY spotted the issue, the port is in ECP mode. Is there some Linux utility that will set a parport to a different mode? I have a program that usually works, it writes 0x80 to the I/O port address 0x402 above the parport data register. (This is correct for the typical on-mobo port at 0x378. You have to fudge the address to get it to hit the right register on PCI and PCIe cards, but this has always worked in the past.
I really don't know how to unset the ECP mode bit.
Thanks in advance for any ideas!
Jon
 
Old 07-19-2022, 01:10 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 26,465

Rep: Reputation: 6218Reputation: 6218Reputation: 6218Reputation: 6218Reputation: 6218Reputation: 6218Reputation: 6218Reputation: 6218Reputation: 6218Reputation: 6218Reputation: 6218
As far as I can remember for onboard devices there should be a BIOS setting you can change modes from ECP to EPP or SPP and its port address. Have you checked the BIOS configuration?
 
Old 07-19-2022, 08:00 PM   #3
jon Elson
Member
 
Registered: May 2018
Posts: 69

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by michaelk View Post
As far as I can remember for onboard devices there should be a BIOS setting you can change modes from ECP to EPP or SPP and its port address. Have you checked the BIOS configuration?
Yes, but this is a PCIe plug-in card. The BIOS only makes setings for on-motherboard peripherals.
Jon
 
Old 07-19-2022, 08:14 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 26,465

Rep: Reputation: 6218Reputation: 6218Reputation: 6218Reputation: 6218Reputation: 6218Reputation: 6218Reputation: 6218Reputation: 6218Reputation: 6218Reputation: 6218Reputation: 6218
I was not sure which you were referring to. I don't know, it depends on the particular card. Some you can and some not.
 
Old 07-20-2022, 11:45 AM   #5
obobskivich
Member
 
Registered: Jun 2020
Posts: 609

Rep: Reputation: Disabled
So I'm curious based on your initial question's wording: is this issue specific to this card, or the combination of this card only in this specific Dell motherboard? As in, does the card work properly (or respond to your program) in another motherboard? Or do other cards work (or not work) in this Dell? Just trying to think through narrowing done where the 'brokenness' is - that doesn't solve your secondary question, but I'm not sure what else to suggest there either (and assume you have some other working system).
 
Old 07-20-2022, 02:02 PM   #6
jon Elson
Member
 
Registered: May 2018
Posts: 69

Original Poster
Rep: Reputation: Disabled
Well, I don't know for sure. I think it may be a bunch of issues all combining. I have used both Siig and Syba cards in PCIe slots before and found them to work properly. But, I have two Dell Optiplex 7010 machines, one small form factor and one standard "mini-tower" box. It seems on both of them, I cannot get the Syba card with MCS9900 chips to work at all. Using the Siig card with the Oxford chip I can get the LinuxCNC driver for my boards to work, but my bare bones diagnostic doesn't work. The difference is that the LinuxCNC driver asks the OS to release the parport from whatever driver is using it (lp? parport_pc?) while my diagnostic just accesses the I/O ports directly with inb and outb commands from c.
I'd like to be able to do exactly what the LinuxCNC driver does to release the port from the Linux driver and then be able to use my diagnostic.

This may also have something to do with 64-bit kernels, as all this stuff used to just work on 32-bit kernels in the past.
I usually have to force the parport into EPP mode by writing 0x80 into the ECR (Extended Control Register) of the card.
To restate what I THINK I do know, both Siig and Syba PCIe cards do seem to work with both LinuxCNC and my diagnostic with older 32-bit OS'es.
I will have to retest, to be certain.

A complication is I have very few machines here with PCIe to test these issues with.
Thanks for the reply.
Jon

Last edited by jon Elson; 07-20-2022 at 02:05 PM.
 
Old 07-21-2022, 05:07 PM   #7
jon Elson
Member
 
Registered: May 2018
Posts: 69

Original Poster
Rep: Reputation: Disabled
Arrgh! I have one PCIe parport card that works with the LinuxCNC driver, which somehow sets the port to the right mode. This card has the Oxford Semi OXPCIe952-FBAG chip. Even this one will not work with my diagnostic, but I think that is just that I don't know how to put it in EPP mode.
I just bought 2 more siig cards but they have the NETMOS MCS9900 chip, and these don't work with either software. I also have an Iocrest card with the WCH CH382L chip that I can't make work. I am really puzzled why I am having all these issues making this work. I have somd a bunch of Syba cards with the MCX9900 or MCX9901 chips, and customers have not reported trouble with them. I guess I will have to get another system with PCIe slots and see if that works. I'm still stumped!
Jon
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
imm.o init_module not found. All I did was change the parport cable! bigrigdriver Linux - Hardware 0 02-16-2005 05:49 PM
right to write at the /dev/parport tortue Linux - General 2 01-15-2004 03:07 PM
parport, parport_pc, parport_lowlevel modules loaded, now what?! RAYman2k1 Linux - Newbie 1 12-18-2003 10:13 PM
backpack series 6 parport install hfelton Slackware 0 05-13-2003 12:09 AM
Redhat 7.2 PLIP - no /proc/parport slthytove Linux - Software 0 02-06-2002 01:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 12:15 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration