* Fix supprot for AFAVLAB 8port boards in 2.6.x
@ 2004-03-05 11:24 Harald Welte
2004-03-05 14:15 ` Roman Kurakin
2004-03-05 20:38 ` Russell King
0 siblings, 2 replies; 4+ messages in thread
From: Harald Welte @ 2004-03-05 11:24 UTC (permalink / raw)
To: rmk+serial; +Cc: linux-serial
[-- Attachment #1: Type: text/plain, Size: 2132 bytes --]
Hi!
I didn't yet use one of my AFAVLAB boards with 2.6.x until now. The
upper 4 ports are not detected at all. I suppose the bug was introduced
while porting the driver from 2.4.x.
Please consider applying the following patch. It also adds support for
a new 8port board called P030.
Thanks,
diff -Nru --exclude-from /sunbeam/home/laforge/scripts/dontdiff linuxppc25bh-040218-test/drivers/pci/pci.ids linuxppc25bh-040218-serial/drivers/pci/pci.ids
--- linuxppc25bh-040218-test/drivers/pci/pci.ids 2004-02-16 09:43:49.000000000 +0100
+++ linuxppc25bh-040218-serial/drivers/pci/pci.ids 2004-03-05 12:10:09.685724629 +0100
@@ -5601,6 +5601,8 @@
14da National Aerospace Laboratories
14db AFAVLAB Technology Inc
2120 TK9902
+ 2180 P028
+ 2182 P030
14dc Amplicon Liveline Ltd
0000 PCI230
0001 PCI242
diff -Nru --exclude-from /sunbeam/home/laforge/scripts/dontdiff linuxppc25bh-040218-test/drivers/serial/8250_pci.c linuxppc25bh-040218-serial/drivers/serial/8250_pci.c
--- linuxppc25bh-040218-test/drivers/serial/8250_pci.c 2004-02-16 09:44:28.000000000 +0100
+++ linuxppc25bh-040218-serial/drivers/serial/8250_pci.c 2004-03-05 12:23:02.331325424 +0100
@@ -141,13 +141,15 @@
struct serial_struct *req, int idx)
{
unsigned int bar, offset = board->first_offset;
bar = FL_GET_BASE(board->flags);
if (idx < 4)
bar += idx;
- else
+ else {
+ bar = 4;
offset += (idx - 4) * board->uart_offset;
+ }
return setup_port(dev, req, bar, offset, board->reg_shift);
}
@@ -1891,6 +1895,9 @@
{ PCI_VENDOR_ID_AFAVLAB, PCI_DEVICE_ID_AFAVLAB_P028,
PCI_ANY_ID, PCI_ANY_ID, 0, 0,
pbn_b0_bt_8_115200 },
+ { PCI_VENDOR_ID_AFAVLAB, PCI_DEVICE_ID_AFAVLAB_P030,
+ PCI_ANY_ID, PCI_ANY_ID, 0, 0,
+ pbn_b0_bt_8_115200 },
{ PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_DSERIAL,
PCI_ANY_ID, PCI_ANY_ID, 0, 0,
--
- Harald Welte <laforge@gnumonks.org> http://www.gnumonks.org/
============================================================================
Programming is like sex: One mistake and you have to support it your lifetime
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Fix supprot for AFAVLAB 8port boards in 2.6.x
2004-03-05 14:15 ` Roman Kurakin
@ 2004-03-05 14:13 ` Harald Welte
0 siblings, 0 replies; 4+ messages in thread
From: Harald Welte @ 2004-03-05 14:13 UTC (permalink / raw)
To: Roman Kurakin; +Cc: rmk+serial, linux-serial
[-- Attachment #1: Type: text/plain, Size: 1122 bytes --]
On Fri, Mar 05, 2004 at 05:15:01PM +0300, Roman Kurakin wrote:
> May be you didn't add support of more than four ports?
No, this is not the problem. Please note that I am the person who
initially added support for the AFAVLAB boards to the linux serial
driver anyway ;)
Both the P028 and P030 are 8-port devices. And linux only supports the
full eight ports with 2.4.x. 2.6.x needs the attached patch.
The first four ports eich have their own 'bar', the second four ports are
batched together within one 'bar'.
Which means that ports 0 to 3 are set up quite normal (bar == idx,
offset = 0), but ports 4 to 7 have to be setup with bar == 4 and and
offsets 0,8,16,24
> Best regards,
> Roman Kurakin
--
- Harald Welte <laforge@netfilter.org> http://www.netfilter.org/
============================================================================
"Fragmentation is like classful addressing -- an interesting early
architectural error that shows how much experimentation was going
on while IP was being designed." -- Paul Vixie
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Fix supprot for AFAVLAB 8port boards in 2.6.x
2004-03-05 11:24 Fix supprot for AFAVLAB 8port boards in 2.6.x Harald Welte
@ 2004-03-05 14:15 ` Roman Kurakin
2004-03-05 14:13 ` Harald Welte
2004-03-05 20:38 ` Russell King
1 sibling, 1 reply; 4+ messages in thread
From: Roman Kurakin @ 2004-03-05 14:15 UTC (permalink / raw)
To: Harald Welte; +Cc: rmk+serial, linux-serial
May be you didn't add support of more than four ports?
Best regards,
Roman Kurakin
Harald Welte wrote:
>Hi!
>
>I didn't yet use one of my AFAVLAB boards with 2.6.x until now. The
>upper 4 ports are not detected at all. I suppose the bug was introduced
>while porting the driver from 2.4.x.
>
>Please consider applying the following patch. It also adds support for
>a new 8port board called P030.
>
>Thanks,
>
>
>diff -Nru --exclude-from /sunbeam/home/laforge/scripts/dontdiff linuxppc25bh-040218-test/drivers/pci/pci.ids linuxppc25bh-040218-serial/drivers/pci/pci.ids
>--- linuxppc25bh-040218-test/drivers/pci/pci.ids 2004-02-16 09:43:49.000000000 +0100
>+++ linuxppc25bh-040218-serial/drivers/pci/pci.ids 2004-03-05 12:10:09.685724629 +0100
>@@ -5601,6 +5601,8 @@
> 14da National Aerospace Laboratories
> 14db AFAVLAB Technology Inc
> 2120 TK9902
>+ 2180 P028
>+ 2182 P030
> 14dc Amplicon Liveline Ltd
> 0000 PCI230
> 0001 PCI242
>diff -Nru --exclude-from /sunbeam/home/laforge/scripts/dontdiff linuxppc25bh-040218-test/drivers/serial/8250_pci.c linuxppc25bh-040218-serial/drivers/serial/8250_pci.c
>--- linuxppc25bh-040218-test/drivers/serial/8250_pci.c 2004-02-16 09:44:28.000000000 +0100
>+++ linuxppc25bh-040218-serial/drivers/serial/8250_pci.c 2004-03-05 12:23:02.331325424 +0100
>@@ -141,13 +141,15 @@
> struct serial_struct *req, int idx)
> {
> unsigned int bar, offset = board->first_offset;
>
> bar = FL_GET_BASE(board->flags);
> if (idx < 4)
> bar += idx;
>- else
>+ else {
>+ bar = 4;
> offset += (idx - 4) * board->uart_offset;
>+ }
>
> return setup_port(dev, req, bar, offset, board->reg_shift);
> }
>
>@@ -1891,6 +1895,9 @@
> { PCI_VENDOR_ID_AFAVLAB, PCI_DEVICE_ID_AFAVLAB_P028,
> PCI_ANY_ID, PCI_ANY_ID, 0, 0,
> pbn_b0_bt_8_115200 },
>+ { PCI_VENDOR_ID_AFAVLAB, PCI_DEVICE_ID_AFAVLAB_P030,
>+ PCI_ANY_ID, PCI_ANY_ID, 0, 0,
>+ pbn_b0_bt_8_115200 },
>
> { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_DSERIAL,
> PCI_ANY_ID, PCI_ANY_ID, 0, 0,
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Fix supprot for AFAVLAB 8port boards in 2.6.x
2004-03-05 11:24 Fix supprot for AFAVLAB 8port boards in 2.6.x Harald Welte
2004-03-05 14:15 ` Roman Kurakin
@ 2004-03-05 20:38 ` Russell King
1 sibling, 0 replies; 4+ messages in thread
From: Russell King @ 2004-03-05 20:38 UTC (permalink / raw)
To: Harald Welte; +Cc: linux-serial
On Fri, Mar 05, 2004 at 12:24:04PM +0100, Harald Welte wrote:
> I didn't yet use one of my AFAVLAB boards with 2.6.x until now. The
> upper 4 ports are not detected at all. I suppose the bug was introduced
> while porting the driver from 2.4.x.
Yep, looks like I missed that subtle "bar = 4" part. Applied, thanks.
> diff -Nru --exclude-from /sunbeam/home/laforge/scripts/dontdiff linuxppc25bh-040218-test/drivers/serial/8250_pci.c linuxppc25bh-040218-serial/drivers/serial/8250_pci.c
> --- linuxppc25bh-040218-test/drivers/serial/8250_pci.c 2004-02-16 09:44:28.000000000 +0100
> +++ linuxppc25bh-040218-serial/drivers/serial/8250_pci.c 2004-03-05 12:23:02.331325424 +0100
> @@ -141,13 +141,15 @@
> struct serial_struct *req, int idx)
> {
> unsigned int bar, offset = board->first_offset;
>
> bar = FL_GET_BASE(board->flags);
> if (idx < 4)
> bar += idx;
> - else
> + else {
> + bar = 4;
> offset += (idx - 4) * board->uart_offset;
> + }
>
> return setup_port(dev, req, bar, offset, board->reg_shift);
> }
>
I detect patch editing here, which appears to have broken the patch (it
didn't apply.) I've manually fixed it so you don't need to worry.
Please ensure that your patches apply and unapply cleanly to the base
kernel before sending, especially if you've edited the patch file.
Thanks.
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/
2.6 Serial core
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-03-05 20:38 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-05 11:24 Fix supprot for AFAVLAB 8port boards in 2.6.x Harald Welte
2004-03-05 14:15 ` Roman Kurakin
2004-03-05 14:13 ` Harald Welte
2004-03-05 20:38 ` Russell King
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).