Skip to content

Commit

Permalink
[SCSI] fusion - expander hotplug suport in mptsas module
Browse files Browse the repository at this point in the history
This adds support for hot adding and removing
expanders, and its associated attached devices.
When there is a change in topology,
the fusion firmware sends the
MPI_EVENT_SAS_DISCOVERY event to the driver.
The driver will read firmware config pages
to determine what changes took place, and refresh
drivers view of the world stored in ioc->sas_topology.

Here is the details of the action the driver does:

(1) Expander Added :  The mptsas_discovery_work
workqueue is called.  Config pages read, and
ioc->sas_topology is refreshed.  The sas_phy_add()
is called for each phy of the expander.  The
expanders attached devices are added via
sas_rphy_add().  Added end devices are handled within
the MPT_ADD_DEVICE logic in  mptsas_hotplug_work
workqueue.

(2) Expander Delete : The sas_rphy_delete() will be
called for the top most compenent of the parent that the
expander is attached to.  The sas_rphy_delete call
will delete all the children phys, rphys, and end devices.
This is handled from mptsas_discovery_work workqueue.

Signed-off-by: Eric Moore <Eric.Moore@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
  • Loading branch information
Moore, Eric authored and James Bottomley committed Mar 14, 2006
1 parent f44e546 commit e6b2d76
Show file tree
Hide file tree
Showing 2 changed files with 289 additions and 69 deletions.
4 changes: 4 additions & 0 deletions drivers/message/fusion/mptbase.h
Original file line number Diff line number Diff line change
Expand Up @@ -619,6 +619,10 @@ typedef struct _MPT_ADAPTER
struct net_device *netdev;
struct list_head sas_topology;
struct mutex sas_topology_mutex;
struct mutex sas_discovery_mutex;
u8 sas_discovery_runtime;
u8 sas_discovery_ignore_events;
int sas_index; /* index refrencing */
MPT_SAS_MGMT sas_mgmt;
int num_ports;
struct work_struct mptscsih_persistTask;
Expand Down
Loading

0 comments on commit e6b2d76

Please sign in to comment.