From: Alex Chiang <achiang@hp.com>
To: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Cc: Matthew Wilcox <matthew@wil.cx>,
Pierre Ossman <drzeus-list@drzeus.cx>,
Jesse Barnes <jbarnes@virtuousgeek.org>,
LKML <linux-kernel@vger.kernel.org>,
linux-pci@vger.kernel.org
Subject: Re: post 2.6.26 requires pciehp_slot_with_bus
Date: Tue, 29 Jul 2008 20:38:42 -0600 [thread overview]
Message-ID: <20080730023842.GA4269@ldl.fc.hp.com> (raw)
In-Reply-To: <48895D3C.7040100@jp.fujitsu.com>
* Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>:
> Matthew Wilcox wrote:
>> So we need a way to find if there's already a slot of this
>> name. I don't see a kobject routine to do that. Maybe we can
>> do it internally to the pci slot code.
pci_hp_register already does this with get_slot_from_name().
>> Then we need to pick a new name for the kobject if it does
>> collide. My suggestion is that the second time we find an
>> object named "2", we call it "2dup1" (the third time "2dup2",
>> etc.) Other opinions I've seen include "2a", "2b", ... or
>> "2-1", "2-2", ... or "2-brokenfw1", "2-brokenfw2".
>
> That looks quite better than using bus number.
I went with:
- first slot to register gets "2"
- second slot to register gets "2-1"
- Mth slot to register gets "2-M"
At first, I thought it would have been better to put this logic
inside of pci_hp_register, since it knows about the collision,
and could just fix stuff up for the caller.
However, the problem is that each hotplug driver can have a
different length for "name", and it got messy quickly.
So, I just patched the two drivers that are known to be
problematic.
Two patches follow, against 2.6.27-rc1.
Compile tested only -- I don't have hardware to replicate this.
I'd say they're somewhere between RFC and requested for
inclusion. I'm certainly not tied to them, just trying to show
some code to implement the approach described above. If we decide
that looking at _RMV + other bits is the way to go, then I'm fine
with that.
It would be great if Pierre and Kenji-san could try them out.
Thanks.
/ac
next prev parent reply other threads:[~2008-07-30 2:38 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-24 11:47 post 2.6.26 requires pciehp_slot_with_bus Pierre Ossman
2008-07-24 12:38 ` Kenji Kaneshige
2008-07-24 20:39 ` Pierre Ossman
2008-07-24 21:07 ` Jesse Barnes
2008-07-24 21:51 ` Pierre Ossman
2008-07-24 22:06 ` Jesse Barnes
2008-07-24 22:29 ` Alex Chiang
2008-07-24 22:49 ` Pierre Ossman
2008-07-24 23:08 ` Alex Chiang
2008-07-24 23:29 ` Pierre Ossman
2008-07-25 3:29 ` Matthew Wilcox
2008-07-25 4:42 ` Alex Chiang
2008-07-25 5:38 ` Kenji Kaneshige
2008-07-25 11:18 ` Matthew Wilcox
2008-07-28 18:05 ` Greg KH
2008-07-25 4:57 ` Kenji Kaneshige
2008-07-30 2:38 ` Alex Chiang [this message]
2008-07-30 2:42 ` [PATCH 1/2] pciehp: Rename duplicate slot name N as N-1, N-2, N-M Alex Chiang
2008-07-31 10:32 ` Kenji Kaneshige
2008-07-30 2:44 ` [PATCH 2/2] shpchp: " Alex Chiang
2008-07-31 10:32 ` Kenji Kaneshige
2008-07-31 10:31 ` post 2.6.26 requires pciehp_slot_with_bus Kenji Kaneshige
2008-07-31 15:47 ` Alex Chiang
2008-08-01 8:43 ` Kenji Kaneshige
2008-07-25 8:53 ` Kenji Kaneshige
2008-07-25 11:40 ` Matthew Wilcox
2008-07-28 7:21 ` Kenji Kaneshige
2008-07-25 4:50 ` Kenji Kaneshige
2008-07-25 22:18 ` Jesse Barnes
2008-07-26 1:16 ` Matthew Wilcox
2008-07-28 8:58 ` Kenji Kaneshige
2008-07-28 8:44 ` Kenji Kaneshige
2008-07-28 16:16 ` Jesse Barnes
2008-07-29 2:43 ` Kenji Kaneshige
2008-07-29 15:14 ` Jesse Barnes
2008-07-30 2:44 ` Kenji Kaneshige
2008-07-28 16:57 ` Matthew Wilcox
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=20080730023842.GA4269@ldl.fc.hp.com \
--to=achiang@hp.com \
--cc=drzeus-list@drzeus.cx \
--cc=jbarnes@virtuousgeek.org \
--cc=kaneshige.kenji@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=matthew@wil.cx \
/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