LKML Archive on lore.kernel.org help / color / mirror / Atom feed
* Is the PCI serial driver code GPL v2 or v3 @ 2008-11-06 17:43 n0ano 2008-11-06 18:52 ` Peter Alfredsen 0 siblings, 1 reply; 12+ messages in thread From: n0ano @ 2008-11-06 17:43 UTC (permalink / raw) To: Linux Kernel Mailing List I notice that many of the files that make up the serial driver are licensed as "either version 2 of the License, or (at your option) any later version". Unfortunatley, I would like to use some of the code from `drivers/serial/8250_pci.c' in grub2, which is a GPL v3 project, but the copyright for this file says: * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License. The `either' in that sentence would lead me to believe that there was a typo and the `or later' clause was dropped off but, as it stands, it's just bad English that says version 2 only. Anyone know what the true intent was and how to resolve this? -- Don Dugger "Censeo Toto nos in Kansa esse decisse." - D. Gale n0ano@n0ano.com Ph: 303/443-3786 ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Is the PCI serial driver code GPL v2 or v3 2008-11-06 17:43 Is the PCI serial driver code GPL v2 or v3 n0ano @ 2008-11-06 18:52 ` Peter Alfredsen 2008-11-06 19:12 ` Russell King 0 siblings, 1 reply; 12+ messages in thread From: Peter Alfredsen @ 2008-11-06 18:52 UTC (permalink / raw) To: linux-kernel; +Cc: Russell King [-- Attachment #1: Type: text/plain, Size: 1373 bytes --] On Thursday 06 November 2008, n0ano@n0ano.com wrote: > I notice that many of the files that make up the serial driver > are licensed as "either version 2 of the License, or (at your > option) any later version". Unfortunatley, I would like to use > some of the code from `drivers/serial/8250_pci.c' in grub2, > which is a GPL v3 project, but the copyright for this file > says: > > * This program is free software; you can redistribute it and/or > modify * it under the terms of the GNU General Public License as > published by * the Free Software Foundation; either version 2 of the > License. > > The `either' in that sentence would lead me to believe that there > was a typo and the `or later' clause was dropped off but, as it > stands, it's just bad English that says version 2 only. > > Anyone know what the true intent was and how to resolve this? It seems like a typo to me to.. That wording has been constant since the file drivers/serial/serial_8250_pci.c was created based on work in drivers/char/serial.c: http://git.kernel.org/?p=linux/kernel/git/tglx/history.git;a=commitdiff;h=33c0d1b0c3ebb61243d9b19ce70d9063acff2aac serial_8250.c has the "or later" clause there. But I suppose the best way is to ask the originator of that file. Russell, what say you? Did you mean to license that file under GPL-2 or GPL-2+? -- /PA [-- Attachment #2: This is a digitally signed message part. --] [-- Type: application/pgp-signature, Size: 197 bytes --] ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Is the PCI serial driver code GPL v2 or v3 2008-11-06 18:52 ` Peter Alfredsen @ 2008-11-06 19:12 ` Russell King 2008-11-06 19:20 ` Theodore Tso ` (2 more replies) 0 siblings, 3 replies; 12+ messages in thread From: Russell King @ 2008-11-06 19:12 UTC (permalink / raw) To: Peter Alfredsen, Alan Cox, Lee Howard; +Cc: linux-kernel On Thu, Nov 06, 2008 at 08:52:31PM +0200, Peter Alfredsen wrote: > It seems like a typo to me to.. That wording has been constant since the > file drivers/serial/serial_8250_pci.c was created based on work in > drivers/char/serial.c: > http://git.kernel.org/?p=linux/kernel/git/tglx/history.git;a=commitdiff;h=33c0d1b0c3ebb61243d9b19ce70d9063acff2aac > serial_8250.c has the "or later" clause there. > > But I suppose the best way is to ask the originator of that file. > Russell, what say you? > Did you mean to license that file under GPL-2 or GPL-2+? It was based upon the original serial.c by Ted T'so, but with some reworking to add a separate quirks table, and quite a number of cleanups. My personal position is that code I author is GPLv2, and not GPLv2 or later. So it's a question whether you consider that I'm the author of the code in that file, or whether you think it's Ted's with my contributions were under Ted's original terms. BTW, now that you bring this to my attention, I see this hack in there: struct serial_private * pciserial_init_ports(struct pci_dev *dev, struct pciserial_board *board) { if (dev->vendor == PCI_VENDOR_ID_OXSEMI || dev->vendor == PCI_VENDOR_ID_MAINPINE) pci_oxsemi_tornado_init(dev, board); nr_ports = board->num_ports; It's completely unnecessary with the quirk system, which follows these lines: /* * Run the new-style initialization function. * The initialization function returns: * <0 - error * 0 - use board->num_ports * >0 - number of ports */ if (quirk->init) { rc = quirk->init(dev); if (rc < 0) { priv = ERR_PTR(rc); goto err_out; } if (rc) nr_ports = rc; } So, why they couldn't add a quirk where the init function returns the number of ports, instead of modifying some random board structure and possibly upsetting future allocations is beyond me. We now have the situation, again, where some random entry in the pci_boards array is being modified which could trip up a future board registration. This is plainly idiotic and utterly buggy. -- Russell King Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of: ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Is the PCI serial driver code GPL v2 or v3 2008-11-06 19:12 ` Russell King @ 2008-11-06 19:20 ` Theodore Tso 2008-11-06 19:39 ` Lee Howard 2008-11-09 19:34 ` Pavel Machek 2 siblings, 0 replies; 12+ messages in thread From: Theodore Tso @ 2008-11-06 19:20 UTC (permalink / raw) To: Russell King; +Cc: Peter Alfredsen, Alan Cox, Lee Howard, linux-kernel On Thu, Nov 06, 2008 at 07:12:50PM +0000, Russell King wrote: > It was based upon the original serial.c by Ted T'so, but with some > reworking to add a separate quirks table, and quite a number of cleanups. > > My personal position is that code I author is GPLv2, and not GPLv2 or > later. So it's a question whether you consider that I'm the author > of the code in that file, or whether you think it's Ted's with my > contributions were under Ted's original terms. My personal opinion has also always been GPLv2, and not GPLv2 or later. So I'm a bit puzzled as to where the GPLV2+ language came from.... - Ted ^ permalink raw reply [flat|nested] 12+ messages in thread
* RE: Is the PCI serial driver code GPL v2 or v3 2008-11-06 19:12 ` Russell King 2008-11-06 19:20 ` Theodore Tso @ 2008-11-06 19:39 ` Lee Howard 2008-11-06 20:15 ` Russell King 2008-11-09 19:34 ` Pavel Machek 2 siblings, 1 reply; 12+ messages in thread From: Lee Howard @ 2008-11-06 19:39 UTC (permalink / raw) To: 'Russell King', 'Peter Alfredsen', 'Alan Cox' Cc: linux-kernel (Sorry for the top-post, but Outlook is a pain...) The "hack" originates from code done by Oxford Semiconductor. I would be happy to have it done with the quirk system, and I am willing to write a patch to that effect. My guess, however, would be that I'll still not do it in your favorite way, and so I'm asking if you would like me to write the code change or will you (or someone else here familiar with the favorite ways) do it? For what it's worth, I have tested 2.6.28-rc3 and it works vanilla with this hardware. :-) Thanks, Lee. Lee Howard Mainpine, Inc. Software Development Lead Tel: +1 866 363 6680 ext 805 | Fax: +1 360 462 8160 lee.howard@mainpine.com | www.mainpine.com -----Original Message----- From: Russell King [mailto:rmk@arm.linux.org.uk] On Behalf Of Russell King Sent: Thursday, November 06, 2008 11:13 AM To: Peter Alfredsen; Alan Cox; Lee Howard Cc: linux-kernel@vger.kernel.org Subject: Re: Is the PCI serial driver code GPL v2 or v3 BTW, now that you bring this to my attention, I see this hack in there: struct serial_private * pciserial_init_ports(struct pci_dev *dev, struct pciserial_board *board) { if (dev->vendor == PCI_VENDOR_ID_OXSEMI || dev->vendor == PCI_VENDOR_ID_MAINPINE) pci_oxsemi_tornado_init(dev, board); nr_ports = board->num_ports; It's completely unnecessary with the quirk system, which follows these lines: /* * Run the new-style initialization function. * The initialization function returns: * <0 - error * 0 - use board->num_ports * >0 - number of ports */ if (quirk->init) { rc = quirk->init(dev); if (rc < 0) { priv = ERR_PTR(rc); goto err_out; } if (rc) nr_ports = rc; } So, why they couldn't add a quirk where the init function returns the number of ports, instead of modifying some random board structure and possibly upsetting future allocations is beyond me. We now have the situation, again, where some random entry in the pci_boards array is being modified which could trip up a future board registration. This is plainly idiotic and utterly buggy. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Is the PCI serial driver code GPL v2 or v3 2008-11-06 19:39 ` Lee Howard @ 2008-11-06 20:15 ` Russell King 2008-11-06 20:33 ` Russell King ` (2 more replies) 0 siblings, 3 replies; 12+ messages in thread From: Russell King @ 2008-11-06 20:15 UTC (permalink / raw) To: Lee Howard; +Cc: 'Peter Alfredsen', 'Alan Cox', linux-kernel On Thu, Nov 06, 2008 at 11:39:44AM -0800, Lee Howard wrote: > The "hack" originates from code done by Oxford Semiconductor. I would be > happy to have it done with the quirk system, and I am willing to write a > patch to that effect. My guess, however, would be that I'll still not do it > in your favorite way, and so I'm asking if you would like me to write the > code change or will you (or someone else here familiar with the favorite > ways) do it? There's plenty of examples in there, eg, pci_timedia_init, pci_netmos_init, and pci_ite887x_init all have a variable number of ports. Here's a patch which converts it: diff --git a/drivers/serial/8250_pci.c b/drivers/serial/8250_pci.c index 5450a0e..057b532 100644 --- a/drivers/serial/8250_pci.c +++ b/drivers/serial/8250_pci.c @@ -737,6 +737,38 @@ static void __devexit pci_ite887x_exit(struct pci_dev *dev) release_region(ioport, ITE_887x_IOSIZE); } +/* + * Oxford Semiconductor Inc. + * Check that device is part of the Tornado range of devices, then determine + * the number of ports available on the device. + */ +static int pci_oxsemi_tornado_init(struct pci_dev *dev) +{ + u8 __iomem *p; + unsigned long deviceID; + unsigned int number_uarts = 0; + + /* OxSemi Tornado devices are all 0xCxxx */ + if (dev->vendor == PCI_VENDOR_ID_OXSEMI && + (dev->device & 0xF000) != 0xC000) + return 0; + + p = pci_iomap(dev, 0, 5); + if (p == NULL) + return -ENOMEM; + + deviceID = ioread32(p); + /* Tornado device */ + if (deviceID == 0x07000200) { + number_uarts = ioread8(p + 4); + printk(KERN_DEBUG + "%d ports detected on Oxford PCI Express device\n", + number_uarts); + } + pci_iounmap(dev, p); + return number_uarts; +} + static int pci_default_setup(struct serial_private *priv, struct pciserial_board *board, struct uart_port *port, int idx) @@ -1018,6 +1050,25 @@ static struct pci_serial_quirk pci_serial_quirks[] __refdata = { .setup = pci_default_setup, }, /* + * For Oxford Semiconductor and Mainpine + */ + { + .vendor = PCI_VENDOR_ID_OXSEMI, + .device = PCI_ANY_ID, + .subvendor = PCI_ANY_ID, + .subdevice = PCI_ANY_ID, + .init = pci_oxsemi_tornado_init, + .setup = pci_default_setup, + }, + { + .vendor = PCI_VENDOR_ID_MAINPINE, + .device = PCI_ANY_ID, + .subvendor = PCI_ANY_ID, + .subdevice = PCI_ANY_ID, + .init = pci_oxsemi_tornado_init, + .setup = pci_default_setup, + }, + /* * Default "match everything" terminator entry */ { @@ -1854,39 +1905,6 @@ serial_pci_matches(struct pciserial_board *board, board->first_offset == guessed->first_offset; } -/* - * Oxford Semiconductor Inc. - * Check that device is part of the Tornado range of devices, then determine - * the number of ports available on the device. - */ -static int pci_oxsemi_tornado_init(struct pci_dev *dev, struct pciserial_board *board) -{ - u8 __iomem *p; - unsigned long deviceID; - unsigned int number_uarts; - - /* OxSemi Tornado devices are all 0xCxxx */ - if (dev->vendor == PCI_VENDOR_ID_OXSEMI && - (dev->device & 0xF000) != 0xC000) - return 0; - - p = pci_iomap(dev, 0, 5); - if (p == NULL) - return -ENOMEM; - - deviceID = ioread32(p); - /* Tornado device */ - if (deviceID == 0x07000200) { - number_uarts = ioread8(p + 4); - board->num_ports = number_uarts; - printk(KERN_DEBUG - "%d ports detected on Oxford PCI Express device\n", - number_uarts); - } - pci_iounmap(dev, p); - return 0; -} - struct serial_private * pciserial_init_ports(struct pci_dev *dev, struct pciserial_board *board) { @@ -1895,13 +1913,6 @@ pciserial_init_ports(struct pci_dev *dev, struct pciserial_board *board) struct pci_serial_quirk *quirk; int rc, nr_ports, i; - /* - * Find number of ports on board - */ - if (dev->vendor == PCI_VENDOR_ID_OXSEMI || - dev->vendor == PCI_VENDOR_ID_MAINPINE) - pci_oxsemi_tornado_init(dev, board); - nr_ports = board->num_ports; /* -- Russell King Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of: ^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: Is the PCI serial driver code GPL v2 or v3 2008-11-06 20:15 ` Russell King @ 2008-11-06 20:33 ` Russell King 2008-11-07 6:06 ` Lee Howard 2008-11-07 16:08 ` Alan Cox 2 siblings, 0 replies; 12+ messages in thread From: Russell King @ 2008-11-06 20:33 UTC (permalink / raw) To: Lee Howard; +Cc: 'Peter Alfredsen', 'Alan Cox', linux-kernel On Thu, Nov 06, 2008 at 08:15:01PM +0000, Russell King wrote: > On Thu, Nov 06, 2008 at 11:39:44AM -0800, Lee Howard wrote: > > The "hack" originates from code done by Oxford Semiconductor. I would be > > happy to have it done with the quirk system, and I am willing to write a > > patch to that effect. My guess, however, would be that I'll still not do it > > in your favorite way, and so I'm asking if you would like me to write the > > code change or will you (or someone else here familiar with the favorite > > ways) do it? > > There's plenty of examples in there, eg, pci_timedia_init, pci_netmos_init, > and pci_ite887x_init all have a variable number of ports. Here's a patch > which converts it: And here's a patch (to be applied on top of the last) which prevents this happening again by making use of 'const'. diff -u b/drivers/serial/8250_pci.c b/drivers/serial/8250_pci.c --- b/drivers/serial/8250_pci.c +++ b/drivers/serial/8250_pci.c @@ -42,7 +42,8 @@ u32 subvendor; u32 subdevice; int (*init)(struct pci_dev *dev); - int (*setup)(struct serial_private *, struct pciserial_board *, + int (*setup)(struct serial_private *, + const struct pciserial_board *, struct uart_port *, int); void (*exit)(struct pci_dev *dev); }; @@ -107,7 +108,7 @@ * ADDI-DATA GmbH communication cards <info@addi-data.com> */ static int addidata_apci7800_setup(struct serial_private *priv, - struct pciserial_board *board, + const struct pciserial_board *board, struct uart_port *port, int idx) { unsigned int bar = 0, offset = board->first_offset; @@ -134,7 +135,7 @@ * Not that ugly ;) -- HW */ static int -afavlab_setup(struct serial_private *priv, struct pciserial_board *board, +afavlab_setup(struct serial_private *priv, const struct pciserial_board *board, struct uart_port *port, int idx) { unsigned int bar, offset = board->first_offset; @@ -188,8 +189,9 @@ * some serial ports are supposed to be hidden on certain models. */ static int -pci_hp_diva_setup(struct serial_private *priv, struct pciserial_board *board, - struct uart_port *port, int idx) +pci_hp_diva_setup(struct serial_private *priv, + const struct pciserial_board *board, + struct uart_port *port, int idx) { unsigned int offset = board->first_offset; unsigned int bar = FL_GET_BASE(board->flags); @@ -306,7 +308,7 @@ /* SBS Technologies Inc. PMC-OCTPRO and P-OCTAL cards */ static int -sbs_setup(struct serial_private *priv, struct pciserial_board *board, +sbs_setup(struct serial_private *priv, const struct pciserial_board *board, struct uart_port *port, int idx) { unsigned int bar, offset = board->first_offset; @@ -463,7 +465,7 @@ } static int pci_siig_setup(struct serial_private *priv, - struct pciserial_board *board, + const struct pciserial_board *board, struct uart_port *port, int idx) { unsigned int bar = FL_GET_BASE(board->flags) + idx, offset = 0; @@ -534,7 +536,8 @@ * Ugh, this is ugly as all hell --- TYT */ static int -pci_timedia_setup(struct serial_private *priv, struct pciserial_board *board, +pci_timedia_setup(struct serial_private *priv, + const struct pciserial_board *board, struct uart_port *port, int idx) { unsigned int bar = 0, offset = board->first_offset; @@ -568,7 +571,7 @@ */ static int titan_400l_800l_setup(struct serial_private *priv, - struct pciserial_board *board, + const struct pciserial_board *board, struct uart_port *port, int idx) { unsigned int bar, offset = board->first_offset; @@ -770,7 +773,8 @@ } static int -pci_default_setup(struct serial_private *priv, struct pciserial_board *board, +pci_default_setup(struct serial_private *priv, + const struct pciserial_board *board, struct uart_port *port, int idx) { unsigned int bar, offset = board->first_offset, maxnr; @@ -1099,7 +1103,7 @@ } static inline int get_pci_irq(struct pci_dev *dev, - struct pciserial_board *board) + const struct pciserial_board *board) { if (board->flags & FL_NOIRQ) return 0; @@ -1894,8 +1898,8 @@ } static inline int -serial_pci_matches(struct pciserial_board *board, - struct pciserial_board *guessed) +serial_pci_matches(const struct pciserial_board *board, + const struct pciserial_board *guessed) { return board->num_ports == guessed->num_ports && @@ -1906,7 +1910,7 @@ } struct serial_private * -pciserial_init_ports(struct pci_dev *dev, struct pciserial_board *board) +pciserial_init_ports(struct pci_dev *dev, const struct pciserial_board *board) { struct uart_port serial_port; struct serial_private *priv; @@ -2039,7 +2043,8 @@ pciserial_init_one(struct pci_dev *dev, const struct pci_device_id *ent) { struct serial_private *priv; - struct pciserial_board *board, tmp; + const struct pciserial_board *board; + struct pciserial_board tmp; int rc; if (ent->driver_data >= ARRAY_SIZE(pci_boards)) { @@ -2066,7 +2071,7 @@ * We matched one of our class entries. Try to * determine the parameters of this board. */ - rc = serial_pci_guess_board(dev, board); + rc = serial_pci_guess_board(dev, &tmp); if (rc) goto disable; } else { only in patch2: unchanged: --- a/include/linux/8250_pci.h +++ b/include/linux/8250_pci.h @@ -31,7 +31,7 @@ struct pciserial_board { struct serial_private; struct serial_private * -pciserial_init_ports(struct pci_dev *dev, struct pciserial_board *board); +pciserial_init_ports(struct pci_dev *dev, const struct pciserial_board *board); void pciserial_remove_ports(struct serial_private *priv); void pciserial_suspend_ports(struct serial_private *priv); void pciserial_resume_ports(struct serial_private *priv); -- Russell King Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of: ^ permalink raw reply [flat|nested] 12+ messages in thread
* RE: Is the PCI serial driver code GPL v2 or v3 2008-11-06 20:15 ` Russell King 2008-11-06 20:33 ` Russell King @ 2008-11-07 6:06 ` Lee Howard 2008-11-07 16:08 ` Alan Cox 2 siblings, 0 replies; 12+ messages in thread From: Lee Howard @ 2008-11-07 6:06 UTC (permalink / raw) To: 'Russell King' Cc: 'Peter Alfredsen', 'Alan Cox', linux-kernel This works for me. Do I need to do anything else to see this committed? Thank you, Lee. Lee Howard Mainpine, Inc. Software Development Lead Tel: +1 866 363 6680 ext 805 | Fax: +1 360 462 8160 lee.howard@mainpine.com | www.mainpine.com -----Original Message----- From: Russell King [mailto:rmk@arm.linux.org.uk] On Behalf Of Russell King Sent: Thursday, November 06, 2008 12:15 PM To: Lee Howard Cc: 'Peter Alfredsen'; 'Alan Cox'; linux-kernel@vger.kernel.org Subject: Re: Is the PCI serial driver code GPL v2 or v3 On Thu, Nov 06, 2008 at 11:39:44AM -0800, Lee Howard wrote: > The "hack" originates from code done by Oxford Semiconductor. I would > be happy to have it done with the quirk system, and I am willing to > write a patch to that effect. My guess, however, would be that I'll > still not do it in your favorite way, and so I'm asking if you would > like me to write the code change or will you (or someone else here > familiar with the favorite > ways) do it? There's plenty of examples in there, eg, pci_timedia_init, pci_netmos_init, and pci_ite887x_init all have a variable number of ports. Here's a patch which converts it: diff --git a/drivers/serial/8250_pci.c b/drivers/serial/8250_pci.c index 5450a0e..057b532 100644 --- a/drivers/serial/8250_pci.c +++ b/drivers/serial/8250_pci.c @@ -737,6 +737,38 @@ static void __devexit pci_ite887x_exit(struct pci_dev *dev) release_region(ioport, ITE_887x_IOSIZE); } +/* + * Oxford Semiconductor Inc. + * Check that device is part of the Tornado range of devices, then +determine + * the number of ports available on the device. + */ +static int pci_oxsemi_tornado_init(struct pci_dev *dev) { + u8 __iomem *p; + unsigned long deviceID; + unsigned int number_uarts = 0; + + /* OxSemi Tornado devices are all 0xCxxx */ + if (dev->vendor == PCI_VENDOR_ID_OXSEMI && + (dev->device & 0xF000) != 0xC000) + return 0; + + p = pci_iomap(dev, 0, 5); + if (p == NULL) + return -ENOMEM; + + deviceID = ioread32(p); + /* Tornado device */ + if (deviceID == 0x07000200) { + number_uarts = ioread8(p + 4); + printk(KERN_DEBUG + "%d ports detected on Oxford PCI Express device\n", + number_uarts); + } + pci_iounmap(dev, p); + return number_uarts; +} + static int pci_default_setup(struct serial_private *priv, struct pciserial_board *board, struct uart_port *port, int idx) @@ -1018,6 +1050,25 @@ static struct pci_serial_quirk pci_serial_quirks[] __refdata = { .setup = pci_default_setup, }, /* + * For Oxford Semiconductor and Mainpine + */ + { + .vendor = PCI_VENDOR_ID_OXSEMI, + .device = PCI_ANY_ID, + .subvendor = PCI_ANY_ID, + .subdevice = PCI_ANY_ID, + .init = pci_oxsemi_tornado_init, + .setup = pci_default_setup, + }, + { + .vendor = PCI_VENDOR_ID_MAINPINE, + .device = PCI_ANY_ID, + .subvendor = PCI_ANY_ID, + .subdevice = PCI_ANY_ID, + .init = pci_oxsemi_tornado_init, + .setup = pci_default_setup, + }, + /* * Default "match everything" terminator entry */ { @@ -1854,39 +1905,6 @@ serial_pci_matches(struct pciserial_board *board, board->first_offset == guessed->first_offset; } -/* - * Oxford Semiconductor Inc. - * Check that device is part of the Tornado range of devices, then determine - * the number of ports available on the device. - */ -static int pci_oxsemi_tornado_init(struct pci_dev *dev, struct pciserial_board *board) -{ - u8 __iomem *p; - unsigned long deviceID; - unsigned int number_uarts; - - /* OxSemi Tornado devices are all 0xCxxx */ - if (dev->vendor == PCI_VENDOR_ID_OXSEMI && - (dev->device & 0xF000) != 0xC000) - return 0; - - p = pci_iomap(dev, 0, 5); - if (p == NULL) - return -ENOMEM; - - deviceID = ioread32(p); - /* Tornado device */ - if (deviceID == 0x07000200) { - number_uarts = ioread8(p + 4); - board->num_ports = number_uarts; - printk(KERN_DEBUG - "%d ports detected on Oxford PCI Express device\n", - number_uarts); - } - pci_iounmap(dev, p); - return 0; -} - struct serial_private * pciserial_init_ports(struct pci_dev *dev, struct pciserial_board *board) { @@ -1895,13 +1913,6 @@ pciserial_init_ports(struct pci_dev *dev, struct pciserial_board *board) struct pci_serial_quirk *quirk; int rc, nr_ports, i; - /* - * Find number of ports on board - */ - if (dev->vendor == PCI_VENDOR_ID_OXSEMI || - dev->vendor == PCI_VENDOR_ID_MAINPINE) - pci_oxsemi_tornado_init(dev, board); - nr_ports = board->num_ports; /* -- Russell King Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of: ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Is the PCI serial driver code GPL v2 or v3 2008-11-06 20:15 ` Russell King 2008-11-06 20:33 ` Russell King 2008-11-07 6:06 ` Lee Howard @ 2008-11-07 16:08 ` Alan Cox 2008-11-11 23:05 ` Russell King 2 siblings, 1 reply; 12+ messages in thread From: Alan Cox @ 2008-11-07 16:08 UTC (permalink / raw) To: Russell King; +Cc: Lee Howard, 'Peter Alfredsen', linux-kernel On Thu, 6 Nov 2008 20:15:01 +0000 Russell King <rmk+lkml@arm.linux.org.uk> wrote: > On Thu, Nov 06, 2008 at 11:39:44AM -0800, Lee Howard wrote: > > The "hack" originates from code done by Oxford Semiconductor. I would be > > happy to have it done with the quirk system, and I am willing to write a > > patch to that effect. My guess, however, would be that I'll still not do it > > in your favorite way, and so I'm asking if you would like me to write the > > code change or will you (or someone else here familiar with the favorite > > ways) do it? > > There's plenty of examples in there, eg, pci_timedia_init, pci_netmos_init, > and pci_ite887x_init all have a variable number of ports. Here's a patch > which converts it: Looks good to me but needs a Signed-off-by: line Alan ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Is the PCI serial driver code GPL v2 or v3 2008-11-07 16:08 ` Alan Cox @ 2008-11-11 23:05 ` Russell King 0 siblings, 0 replies; 12+ messages in thread From: Russell King @ 2008-11-11 23:05 UTC (permalink / raw) To: Alan Cox; +Cc: Lee Howard, 'Peter Alfredsen', linux-kernel On Fri, Nov 07, 2008 at 04:08:01PM +0000, Alan Cox wrote: > Looks good to me but needs a Signed-off-by: line ... found this mail again ... for both patches: Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> -- Russell King Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of: ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Is the PCI serial driver code GPL v2 or v3 2008-11-06 19:12 ` Russell King 2008-11-06 19:20 ` Theodore Tso 2008-11-06 19:39 ` Lee Howard @ 2008-11-09 19:34 ` Pavel Machek 2008-11-16 15:18 ` Theodore Tso 2 siblings, 1 reply; 12+ messages in thread From: Pavel Machek @ 2008-11-09 19:34 UTC (permalink / raw) To: Russell King; +Cc: Peter Alfredsen, Alan Cox, Lee Howard, linux-kernel On Thu 2008-11-06 19:12:50, Russell King wrote: > On Thu, Nov 06, 2008 at 08:52:31PM +0200, Peter Alfredsen wrote: > > It seems like a typo to me to.. That wording has been constant since the > > file drivers/serial/serial_8250_pci.c was created based on work in > > drivers/char/serial.c: > > http://git.kernel.org/?p=linux/kernel/git/tglx/history.git;a=commitdiff;h=33c0d1b0c3ebb61243d9b19ce70d9063acff2aac > > serial_8250.c has the "or later" clause there. > > > > But I suppose the best way is to ask the originator of that file. > > Russell, what say you? > > Did you mean to license that file under GPL-2 or GPL-2+? > > It was based upon the original serial.c by Ted T'so, but with some > reworking to add a separate quirks table, and quite a number of cleanups. > > My personal position is that code I author is GPLv2, and not GPLv2 or > later. So it's a question whether you consider that I'm the author > of the code in that file, or whether you think it's Ted's with my > contributions were under Ted's original terms. Original poster wants GPLv3 version for use in grub-2. Would you be willing to relicense your changes in serial_8250.c, so that he can do that? Would Ted be willing to do that? -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Is the PCI serial driver code GPL v2 or v3 2008-11-09 19:34 ` Pavel Machek @ 2008-11-16 15:18 ` Theodore Tso 0 siblings, 0 replies; 12+ messages in thread From: Theodore Tso @ 2008-11-16 15:18 UTC (permalink / raw) To: Pavel Machek Cc: Russell King, Peter Alfredsen, Alan Cox, Lee Howard, linux-kernel On Sun, Nov 09, 2008 at 08:34:01PM +0100, Pavel Machek wrote: > > It was based upon the original serial.c by Ted T'so, but with some > > reworking to add a separate quirks table, and quite a number of cleanups. > > > > My personal position is that code I author is GPLv2, and not GPLv2 or > > later. So it's a question whether you consider that I'm the author > > of the code in that file, or whether you think it's Ted's with my > > contributions were under Ted's original terms. > > Original poster wants GPLv3 version for use in grub-2. Would you be > willing to relicense your changes in serial_8250.c, so that he can do > that? Would Ted be willing to do that? I'd much rather have grub-2 relicense itself to GPLv2. :-) - Ted ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2008-11-16 16:34 UTC | newest] Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2008-11-06 17:43 Is the PCI serial driver code GPL v2 or v3 n0ano 2008-11-06 18:52 ` Peter Alfredsen 2008-11-06 19:12 ` Russell King 2008-11-06 19:20 ` Theodore Tso 2008-11-06 19:39 ` Lee Howard 2008-11-06 20:15 ` Russell King 2008-11-06 20:33 ` Russell King 2008-11-07 6:06 ` Lee Howard 2008-11-07 16:08 ` Alan Cox 2008-11-11 23:05 ` Russell King 2008-11-09 19:34 ` Pavel Machek 2008-11-16 15:18 ` Theodore Tso
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).