Re: [PATCH] staging: comedi: ii_pci20kc: this is an ISA board not a PCI board

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[Originally posted 2013-06-26.  Reposting to new driverdev-devel list.]

On 2013-06-25 18:38, H Hartley Sweeten wrote:
On Tuesday, June 25, 2013 2:16 AM, Ian Abbott wrote:
On 2013-06-25 01:07, H Hartley Sweeten wrote:
The Intelligent Instrumentation PCI-20001C board is a legacy PC/XT/AT
8-bit ISA board not a PCI board.  The "PCI" appears to mean "Personal
Computer Instrumentation".

Move the Kconfig option into the COMEDI_ISA group.

Signed-off-by: H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx>
Cc: Ian Abbott <abbotti@xxxxxxxxx>
Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

That explains a lot.  I always assumed it was a PCI board and wondered
how the driver could possibly work, since it used memory-mapped I/O and
the driver appears to use physical addresses directly, without remapping
them to virtual addresses.

The iobase address passed should probably still be ioremap()'d but I'm not
sure....

Yes, it should be ioremapped. The existing code would work on a PC if the address is in the ISA memory range and doesn't clash with anything else, as ioremapping doesn't change the address for ISA memory on a PC (for addresses in the range 0xA8000 to 0xFFFFF). The memory region should also be reserved with request_mem_region() (similar to request_region() for I/O ports) before being ioremapped.

Physically, the card only allows addresses below 0x100000 (1 MiB) on a 0x400 (1 KiB) boundary. On a PC, ISA bus memory addresses are the same as physical addresses. It's possible that the user might have to add some constant value to the ISA bus memory address on some other architecture, so maybe the driver shouldn't restrict the range. It could perhaps check it is aligned to a 0x400 boundary.


Acked-by: Ian Abbott <abbotti@xxxxxxxxx>

Thanks.

In reality this driver should probably just be dropped.

The manuals I have found are dated 1988 or 1989 and it is an 8-bit ISA board
that is most likely not manufactured any longer. And, as you stated, the name
of the board just introduces confusion.

The comments in the driver give a copyright of 2000 and a test configuration of:

  *	The test configuration:
  *
  *	kernel 2.2.14 with RTAI v1.2  and patch-2.2.14rthal2
  *	COMEDI 0.7.45
  *	COMEDILIB 0.7.9

I kind of doubt anyone is using this driver today or if any of the boards actually
still exist in the wild. But, the information for the board still exists on the web
so maybe it's still viable...

You're probably right. There might be some old legacy systems still running with these cards, but they're probably not kept up-to-date with the latest kernels! Apparently, the manufacturer can still be contacted for pricing and lead times on these cards.

I have found the manuals for the PCI-20006M and PCI-20341M modules that
this driver claims to support so I can clean it up. But, there are about a half
dozen other modules that can be used with the carrier board. It would be
simple enough to add support for them but I'm not sure if it's worth the time.

It's probably not worth supporting additional modules.

I'll leave the decision to drop the driver up to you.

I have started cleaning up the current driver but can stop it if you decide to
drop the driver.

I'll leave it in your capable hands. The existing driver doesn't look too bad once the ISA memory access issue is sorted out.

--
-=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti@xxxxxxxxx>        )=-
-=( Tel: +44 (0)161 477 1898   FAX: +44 (0)161 718 3587         )=-
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux