linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matt Domsch <Matt_Domsch@dell.com>
To: "Mukker, Atul" <Atulm@lsil.com>
Cc: 'James Bottomley' <James.Bottomley@SteelEye.com>,
	"'Salyzyn, Mark'" <mark_salyzyn@adaptec.com>,
	"Bagalkote, Sreenivas" <sreenib@lsil.com>,
	"'brking@us.ibm.com'" <brking@us.ibm.com>,
	"'linux-kernel@vger.kernel.org'" <linux-kernel@vger.kernel.org>,
	'SCSI Mailing List' <linux-scsi@vger.kernel.org>,
	"'bunk@fs.tum.de'" <bunk@fs.tum.de>,
	'Andrew Morton' <akpm@osdl.org>, "Ju, Seokmann" <sju@lsil.com>,
	"Doelfel, Hardy" <hdoelfel@lsil.com>
Subject: Re: How to add/drop SCSI drives from within the driver?
Date: Wed, 15 Dec 2004 14:22:22 -0600	[thread overview]
Message-ID: <20041215202222.GA6945@lists.us.dell.com> (raw)
In-Reply-To: <0E3FA95632D6D047BA649F95DAB60E57057A2156@exa-atlanta>

On Wed, Dec 15, 2004 at 02:42:21PM -0500, Mukker, Atul wrote:
> > 
> > Your management apps currently issue a private ioctl 
> > MEGAIOC_QNADAP which returns the number of 
> > megaraid_mm-handled adapters in the system.  How do you map a 
> > megaraid adapter number to a struct Scsi_Host device, to be 
> > sure you're acting on the controller you think you are?
>
> Megaraid_mm module maintains all the controllers on a list
> (mraid_mm_get_adapter), and each of the adapter maintains a pointer
> to the host object.

Yes, of course, I was unclear.  How do your userspace library and
management tools know that when they send commands via the
/dev/megaraid ioctls for adapter #5, that it's actually going to talk
to the PCI device at 0:03:06.0 (presumably the one it wants to do
configuration on) and not another megaraid-driven PCI device at
0:06:06.0 (which is not the one it wants) ?

If your management application doesn't care, or solves this in another
manner, please advise.

> Megaraid_mm is not a 'scsi' driver but only a conduit to pass the commands
> from application to the megaraid_mbox scsi module. 

But from your userspace tools perspective, it doesn't know that.  All
it knows is that (right now) it opens /dev/megaraid and issues ioctls
to a certain adapter number, yes?

What I'm trying to get to is a mapping, visible to userspace apps,
something like this.  You're right, megaraid_mm isn't a scsi driver,
so perhaps rather than having adapter0 with parent tree of
/sys/bus/scsi/drivers/megaraid_mm, it should be exposed with parent
tree /sys/module/megaraid_mm/, like so:

/sys
|-- class
|   `-- scsi_host
|       `-- host0
|-- devices
|   `-- pci0000:03
|       `-- 0000:03:06.0
`-- module
    |-- megaraid_mbox
    `-- megaraid_mm
        `-- adapter0
            |-- host0 -> ../../../class/scsi_host/host0
            `-- pci_dev -> ../../../devices/pci0000:03/0000:03:06.0

Your struct adapter_t has this mapping already, kernel-internal.  But
I think your userspace tools need to know the mapping too, to make
sure that adapter0 is the device they really intend to send management
commands to.

I think this question (do I have the right adapter), is analogous to
the question before (do I have the right HCTL tuple for this logical
drive), which my patch of last night may help address.

Thanks,
Matt

-- 
Matt Domsch
Sr. Software Engineer, Lead Engineer
Dell Linux Solutions linux.dell.com & www.dell.com/linux
Linux on Dell mailing lists @ http://lists.us.dell.com

  reply	other threads:[~2004-12-15 20:22 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-15 19:42 How to add/drop SCSI drives from within the driver? Mukker, Atul
2004-12-15 20:22 ` Matt Domsch [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-01-26 23:23 Mukker, Atul
2005-01-27  7:05 ` 'Patrick Mansfield'
2005-01-26 16:48 Greg KH
2005-01-25 23:37 Mukker, Atul
2005-01-26 14:48 ` Brian King
2005-01-25 16:27 Mukker, Atul
2005-01-25 16:52 ` Patrick Mansfield
2005-01-21 22:11 Mukker, Atul
2005-01-21 23:58 ` James Bottomley
2005-01-06 14:20 Mukker, Atul
2005-01-06 14:42 ` James Bottomley
2005-01-04 17:25 Bagalkote, Sreenivas
2005-01-04 17:42 ` James Bottomley
2005-01-03 23:02 Bagalkote, Sreenivas
2005-01-03 23:40 ` James Bottomley
2004-12-16 16:51 Salyzyn, Mark
2004-12-16 14:27 Mukker, Atul
2004-12-10  0:31 Bagalkote, Sreenivas
2004-12-09 23:37 Bagalkote, Sreenivas
2004-12-10  0:03 ` Matt Domsch
2004-12-09 17:31 Mukker, Atul
2004-12-09 18:00 ` 'Patrick Mansfield'
2004-12-09 14:11 Mukker, Atul
2004-12-09 17:04 ` Patrick Mansfield
2004-12-09 13:27 Salyzyn, Mark
2004-12-09 14:12 ` Arjan van de Ven
2004-12-08 20:49 Salyzyn, Mark
2004-12-08 20:36 Mukker, Atul
2004-12-08 23:26 ` Bryan Henderson
2004-12-08 19:25 Mukker, Atul
2004-12-08 18:42 Salyzyn, Mark
2004-12-08 20:01 ` James Bottomley
2004-12-15  7:24   ` Matt Domsch
2004-12-15 16:48     ` Matt Domsch
2004-12-15 18:55       ` James Bottomley
2004-12-15 18:49     ` James Bottomley
2004-12-15 21:30       ` Matt Domsch
2004-12-16  9:54         ` Arjan van de Ven
2004-12-16 14:41           ` Alan Cox
2004-12-08 17:56 Bagalkote, Sreenivas
2004-12-08 19:06 ` James Bottomley
2004-12-08 14:55 Mukker, Atul
2004-12-08  7:16 Bagalkote, Sreenivas
2004-12-08 14:07 ` Matt Domsch
2004-12-08 15:40   ` Matthew Wilcox
2004-12-08 20:08     ` Bryan Henderson
2004-12-08 20:14       ` Arjan van de Ven
2004-12-08 15:59 ` James Bottomley
2004-12-08 23:46 ` Brian King
2004-12-03 17:18 Bagalkote, Sreenivas
2004-12-03 15:29 Bagalkote, Sreenivas
2004-12-03 15:58 ` Jan-Benedict Glaw
2004-12-03 16:22 ` Christoph Hellwig
2004-12-03 17:11 ` Matt Domsch
2004-12-03 17:14   ` Matt Domsch
2004-12-03  2:04 Bagalkote, Sreenivas
2004-12-03 15:10 ` Brian King

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=20041215202222.GA6945@lists.us.dell.com \
    --to=matt_domsch@dell.com \
    --cc=Atulm@lsil.com \
    --cc=James.Bottomley@SteelEye.com \
    --cc=akpm@osdl.org \
    --cc=brking@us.ibm.com \
    --cc=bunk@fs.tum.de \
    --cc=hdoelfel@lsil.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=mark_salyzyn@adaptec.com \
    --cc=sju@lsil.com \
    --cc=sreenib@lsil.com \
    /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).