public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Matthew Wilcox <matthew@wil.cx>
To: "Mukker, Atul" <Atul.Mukker@lsi.com>
Cc: Christoph Hellwig <hch@infradead.org>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [RFC]: new LSI MegaRAID driver implementation
Date: Tue, 16 Feb 2010 09:45:37 -0700	[thread overview]
Message-ID: <20100216164537.GL11239@parisc-linux.org> (raw)
In-Reply-To: <6C678488C5CEE74F813A4D1948FD2DC7B79724D5@cosmail02.lsi.com>

On Tue, Feb 16, 2010 at 09:37:14AM -0700, Mukker, Atul wrote:
> Thanks for the inputs Christoph.
> 
> We sort of had an idea for this possible route. What are your biggest concerns for a single driver model?

My biggest concern is that you'll do something to fix a bug in the new
hardware and inadvertently create a bug for some old piece of hardware.

> The split model has implications for LSI RAID management applications and we want to make sure that decision is made with a thorough analysis.

I'm not sure I see the downside to having a second driver.

One interesting possibility, if you feel you really must have a single driver that handles both sets of hardware is to do this:

------
a.c:

struct pci_driver a_pci_driver { ... };

b.c:

struct pci_driver b_pci_driver { ... };

common.c:

static int __init my_init(void)
{
	error = pci_register_driver(&a_pci_driver);
	if (error)
		return error;
	error = pci_register_driver(&b_pci_driver);
	if (error)
		pci_unregister_driver(&a_pci_driver);
	return error;
}

module_init(my_init);

------

Now you have two completely separated drivers which are bound together
into a single object file.  Bit wasteful, but might make your management
happier.

-- 
Matthew Wilcox				Intel Open Source Technology Centre
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."

      reply	other threads:[~2010-02-16 16:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-15 17:09 [RFC]: new LSI MegaRAID driver implementation Mukker, Atul
2010-02-15 18:18 ` Christoph Hellwig
2010-02-16 16:37   ` Mukker, Atul
2010-02-16 16:45     ` Matthew Wilcox [this message]

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=20100216164537.GL11239@parisc-linux.org \
    --to=matthew@wil.cx \
    --cc=Atul.Mukker@lsi.com \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    /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