Is the PCI serial driver code GPL v2 or v3 - Kernel

This is a discussion on Is the PCI serial driver code GPL v2 or v3 - Kernel ; 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 ...

+ Reply to Thread
Results 1 to 11 of 11

Thread: Is the PCI serial driver code GPL v2 or v3

  1. Is the PCI serial driver code GPL v2 or v3

    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
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  2. Re: Is the PCI serial driver code GPL v2 or v3

    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/kerne...0d9063acff2aac
    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

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v2.0.9 (GNU/Linux)

    iEYEABECAAYFAkkTPPUACgkQtEGUx4TfHiTg2wCeLFgBFdoORN RFUCe5aPHAek9V
    dv4AnRup2tHqRUiY1KKH9V4e2/bk3/MT
    =HYf9
    -----END PGP SIGNATURE-----


  3. Re: Is the PCI serial driver code GPL v2 or v3

    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/kerne...0d9063acff2aac
    > 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:
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  4. Re: Is the PCI serial driver code GPL v2 or v3

    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
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  5. RE: Is the PCI serial driver code GPL v2 or v3

    (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.

    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  6. 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:
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  7. Re: Is the PCI serial driver code GPL v2 or v3

    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
    */
    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:
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  8. RE: Is the PCI serial driver code GPL v2 or v3

    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:

    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  9. Re: Is the PCI serial driver code GPL v2 or v3

    On Thu, 6 Nov 2008 20:15:01 +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:


    Looks good to me but needs a Signed-off-by: line

    Alan
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  10. Re: Is the PCI serial driver code GPL v2 or v3

    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/kerne...0d9063acff2aac
    > > 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/~pav...rses/blog.html
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

  11. Re: Is the PCI serial driver code GPL v2 or v3

    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

    --
    Russell King
    Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
    maintainer of:
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

+ Reply to Thread