Hi Micha,
Sorry for delayed reply.
Micha Nelissen wrote:
>
> Bounine, Alexandre wrote:
> > struct rio_dev {
> > struct list_head global_list;
> > struct list_head net_list;
> > .
> > . rest of rio_dev
> > .
> > struct rio_switch switch[0];
> > }
>
> It makes
Hi Alex,
Bounine, Alexandre wrote:
struct rio_dev {
struct list_head global_list;
struct list_head net_list;
.
. rest of rio_dev
.
struct rio_switch switch[0];
}
It makes sense to let rio_dev structures point to the switch they are
attached to. That can be
Andrew Morton wrote:
>
> The "variable length array at the end of the struct" thing is pretty
> commonly used and works well. As long as we never want to change the
> number of switches on the fly (hotplug?).
This is expected to be a "strange" array - its size can be 0 or 1 only.
No number of s
On Mon, 20 Sep 2010 07:31:22 -0700
"Bounine, Alexandre" wrote:
> Andrew Morton wrote:
> >
> > > @@ -219,6 +219,7 @@ struct rio_net {
> > > /**
> > > * struct rio_switch - RIO switch info
> > > * @node: Node in global list of switches
> > > + * @rdev: Associated RIO device structure
> > >
Andrew Morton wrote:
>
> > @@ -219,6 +219,7 @@ struct rio_net {
> > /**
> > * struct rio_switch - RIO switch info
> > * @node: Node in global list of switches
> > + * @rdev: Associated RIO device structure
> > * @switchid: Switch ID that is unique across a network
> > * @hopcount: Hopcou
Andrew Morton wrote:
> What is the locking for rdev? In other patches I see pointer chases
> with no obvious locking against concurrent changes?
This rdev should be safe because it is intended for use only by
rio_switch
attached to the same rdev. Therefore rio_global_list_lock will work
here.
On Tue, 14 Sep 2010 10:59:16 -0400
Alexandre Bounine wrote:
> @@ -219,6 +219,7 @@ struct rio_net {
> /**
> * struct rio_switch - RIO switch info
> * @node: Node in global list of switches
> + * @rdev: Associated RIO device structure
> * @switchid: Switch ID that is unique across a network
A switch port information is obtained and stored during RIO device setup.
Therefore repeated reads from Switch Port Information CAR may be removed.
Signed-off-by: Alexandre Bounine
Cc: Thomas Moll
Cc: Matt Porter
Cc: Li Yang
Cc: Kumar Gala
Cc: Micha Nelissen
---
drivers/rapidio/rio-scan.c |