LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: "Lee Howard" <lee.howard@mainpine.com>
To: "'Russell King'" <rmk+lkml@arm.linux.org.uk>,
	"'Peter Alfredsen'" <loki_val@gentoo.org>,
	"'Alan Cox'" <alan@lxorguk.ukuu.org.uk>
Cc: <linux-kernel@vger.kernel.org>
Subject: RE: Is the PCI serial driver code GPL v2 or v3
Date: Thu, 6 Nov 2008 11:39:44 -0800	[thread overview]
Message-ID: <AA46BE34D4E74CB69F948F36984126A9@callisto> (raw)
In-Reply-To: <20081106191250.GA28514@flint.arm.linux.org.uk>

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


  parent reply	other threads:[~2008-11-06 19:49 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AA46BE34D4E74CB69F948F36984126A9@callisto \
    --to=lee.howard@mainpine.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=loki_val@gentoo.org \
    --cc=rmk+lkml@arm.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).