* [PATCH] parport: parport_pc: remove double PCI ID for NetMos
@ 2013-11-27 16:43 Sebastian Andrzej Siewior
2013-11-27 21:53 ` Andrew Morton
0 siblings, 1 reply; 4+ messages in thread
From: Sebastian Andrzej Siewior @ 2013-11-27 16:43 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: linux-kernel, linux-parport, Sebastian Andrzej Siewior,
Maximilian Attems, Andrew Morton
In commit 85747f ("PATCH] parport: add NetMOS 9805 support") Max added
the PCI ID for NetMOS 9805 based on a Debian bug report from 2k4 which
was at the v2.4.26 time frame. The patch made into 2.6.14.
Shortly before that patch akpm merged commit 296d3c783b ("[PATCH] Support
NetMOS based PCI cards providing serial and parallel ports") which made
into v2.6.9-rc1.
Now we have two different entries for the same PCI id.
I have here the NetMos 9805 which claims to support SPP/EPP/ECP mode.
This patch takes Max's entry for titan_1284p1 (base != -1 specifies the
ioport for ECP mode) and replaces akpm's entry for netmos_9805 which
specified -1 (=none). Both share the same PCI-ID (my card has subsystem
0x1000 / 0x0020 so it should match PCI_ANY).
While here I also drop the entry for titan_1284p2 which is the same as
netmos_9815.
Cc: Maximilian Attems <maks@stro.at>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
drivers/parport/parport_pc.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/drivers/parport/parport_pc.c b/drivers/parport/parport_pc.c
index 903e128..b0a0d53 100644
--- a/drivers/parport/parport_pc.c
+++ b/drivers/parport/parport_pc.c
@@ -2596,8 +2596,6 @@ enum parport_pc_pci_cards {
syba_2p_epp,
syba_1p_ecp,
titan_010l,
- titan_1284p1,
- titan_1284p2,
avlab_1p,
avlab_2p,
oxsemi_952,
@@ -2656,8 +2654,6 @@ static struct parport_pc_pci {
/* syba_2p_epp AP138B */ { 2, { { 0, 0x078 }, { 0, 0x178 }, } },
/* syba_1p_ecp W83787 */ { 1, { { 0, 0x078 }, } },
/* titan_010l */ { 1, { { 3, -1 }, } },
- /* titan_1284p1 */ { 1, { { 0, 1 }, } },
- /* titan_1284p2 */ { 2, { { 0, 1 }, { 2, 3 }, } },
/* avlab_1p */ { 1, { { 0, 1}, } },
/* avlab_2p */ { 2, { { 0, 1}, { 2, 3 },} },
/* The Oxford Semi cards are unusual: 954 doesn't support ECP,
@@ -2673,8 +2669,8 @@ static struct parport_pc_pci {
/* netmos_9705 */ { 1, { { 0, -1 }, } },
/* netmos_9715 */ { 2, { { 0, 1 }, { 2, 3 },} },
/* netmos_9755 */ { 2, { { 0, 1 }, { 2, 3 },} },
- /* netmos_9805 */ { 1, { { 0, -1 }, } },
- /* netmos_9815 */ { 2, { { 0, -1 }, { 2, -1 }, } },
+ /* netmos_9805 */ { 1, { { 0, 1 }, } },
+ /* netmos_9815 */ { 2, { { 0, 1 }, { 2, 3 }, } },
/* netmos_9901 */ { 1, { { 0, -1 }, } },
/* netmos_9865 */ { 1, { { 0, -1 }, } },
/* quatech_sppxp100 */ { 1, { { 0, 1 }, } },
@@ -2718,8 +2714,6 @@ static const struct pci_device_id parport_pc_pci_tbl[] = {
PCI_ANY_ID, PCI_ANY_ID, 0, 0, syba_1p_ecp },
{ PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_010L,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, titan_010l },
- { 0x9710, 0x9805, 0x1000, 0x0010, 0, 0, titan_1284p1 },
- { 0x9710, 0x9815, 0x1000, 0x0020, 0, 0, titan_1284p2 },
/* PCI_VENDOR_ID_AVLAB/Intek21 has another bunch of cards ...*/
/* AFAVLAB_TK9902 */
{ 0x14db, 0x2120, PCI_ANY_ID, PCI_ANY_ID, 0, 0, avlab_1p},
--
1.8.4.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] parport: parport_pc: remove double PCI ID for NetMos
2013-11-27 16:43 [PATCH] parport: parport_pc: remove double PCI ID for NetMos Sebastian Andrzej Siewior
@ 2013-11-27 21:53 ` Andrew Morton
2013-11-28 10:35 ` Sebastian Andrzej Siewior
0 siblings, 1 reply; 4+ messages in thread
From: Andrew Morton @ 2013-11-27 21:53 UTC (permalink / raw)
To: Sebastian Andrzej Siewior
Cc: Greg Kroah-Hartman, linux-kernel, linux-parport, Maximilian Attems
On Wed, 27 Nov 2013 17:43:43 +0100 Sebastian Andrzej Siewior <bigeasy@linutronix.de> wrote:
> In commit 85747f ("PATCH] parport: add NetMOS 9805 support") Max added
> the PCI ID for NetMOS 9805 based on a Debian bug report from 2k4 which
> was at the v2.4.26 time frame. The patch made into 2.6.14.
> Shortly before that patch akpm merged commit 296d3c783b ("[PATCH] Support
> NetMOS based PCI cards providing serial and parallel ports") which made
> into v2.6.9-rc1.
> Now we have two different entries for the same PCI id.
> I have here the NetMos 9805 which claims to support SPP/EPP/ECP mode.
> This patch takes Max's entry for titan_1284p1 (base != -1 specifies the
> ioport for ECP mode) and replaces akpm's entry for netmos_9805 which
> specified -1 (=none). Both share the same PCI-ID (my card has subsystem
> 0x1000 / 0x0020 so it should match PCI_ANY).
>
> While here I also drop the entry for titan_1284p2 which is the same as
> netmos_9815.
Does this change have any runtime-visible effects?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] parport: parport_pc: remove double PCI ID for NetMos
2013-11-27 21:53 ` Andrew Morton
@ 2013-11-28 10:35 ` Sebastian Andrzej Siewior
2013-12-02 21:44 ` Andrew Morton
0 siblings, 1 reply; 4+ messages in thread
From: Sebastian Andrzej Siewior @ 2013-11-28 10:35 UTC (permalink / raw)
To: Andrew Morton
Cc: Greg Kroah-Hartman, linux-kernel, linux-parport, Maximilian Attems
On 11/27/2013 10:53 PM, Andrew Morton wrote:
>> While here I also drop the entry for titan_1284p2 which is the same as
>> netmos_9815.
>
> Does this change have any runtime-visible effects?
Titan p2 used to specify class + subclass which is now replaced with
PCI_ID_ANY, I doubt this makes any difference at all.
The only runtime visible change I notice is with KERN_DEBUG being
visible. The card details are the same, it always prints
|parport1: PC-style at 0xc120 (0xc128), irq 11, using FIFO
[PCSPP,TRISTATE,COMPAT,ECP]
However the ID that was used to detect the card is different:
| PCI parallel port detected: 1415:c118, I/O at 0xc120(0xc128), IRQ 11
vs
| PCI parallel port detected: 9710:9805, I/O at 0xc120(0xc128), IRQ 11
The wrong id print is printed for all devices which come after
PCI_DEVICE_ID_OXSEMI_PCIe840_G in the id table because the code that
prints the ID table assumes one id per entry.
So we could
- drop printk
- use id->vendor + id->device instead
- do the last item + remove parport_pc_pci_cards and pass the data
struct as data.
- nothing
any preferences?
Sebastian
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] parport: parport_pc: remove double PCI ID for NetMos
2013-11-28 10:35 ` Sebastian Andrzej Siewior
@ 2013-12-02 21:44 ` Andrew Morton
0 siblings, 0 replies; 4+ messages in thread
From: Andrew Morton @ 2013-12-02 21:44 UTC (permalink / raw)
To: Sebastian Andrzej Siewior
Cc: Greg Kroah-Hartman, linux-kernel, linux-parport, Maximilian Attems
On Thu, 28 Nov 2013 11:35:11 +0100 Sebastian Andrzej Siewior <bigeasy@linutronix.de> wrote:
> On 11/27/2013 10:53 PM, Andrew Morton wrote:
> >> While here I also drop the entry for titan_1284p2 which is the same as
> >> netmos_9815.
> >
> > Does this change have any runtime-visible effects?
>
> Titan p2 used to specify class + subclass which is now replaced with
> PCI_ID_ANY, I doubt this makes any difference at all.
>
> The only runtime visible change I notice is with KERN_DEBUG being
> visible. The card details are the same, it always prints
>
> |parport1: PC-style at 0xc120 (0xc128), irq 11, using FIFO
> [PCSPP,TRISTATE,COMPAT,ECP]
>
> However the ID that was used to detect the card is different:
>
> | PCI parallel port detected: 1415:c118, I/O at 0xc120(0xc128), IRQ 11
>
> vs
>
> | PCI parallel port detected: 9710:9805, I/O at 0xc120(0xc128), IRQ 11
>
> The wrong id print is printed for all devices which come after
> PCI_DEVICE_ID_OXSEMI_PCIe840_G in the id table because the code that
> prints the ID table assumes one id per entry.
>
> So we could
> - drop printk
> - use id->vendor + id->device instead
> - do the last item + remove parport_pc_pci_cards and pass the data
> struct as data.
> - nothing
>
> any preferences?
>
Well if the kernel is now printing the incorrect ID, we should fix
that. The message should match the discovered hardware, and it should
match whatever `lspci' says is there.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-12-02 21:45 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-27 16:43 [PATCH] parport: parport_pc: remove double PCI ID for NetMos Sebastian Andrzej Siewior
2013-11-27 21:53 ` Andrew Morton
2013-11-28 10:35 ` Sebastian Andrzej Siewior
2013-12-02 21:44 ` Andrew Morton
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).