isci: merge remote_device substates into a single state machine
authorDan Williams <dan.j.williams@intel.com>
Wed, 27 Apr 2011 23:32:45 +0000 (16:32 -0700)
committerDan Williams <dan.j.williams@intel.com>
Sun, 3 Jul 2011 11:00:39 +0000 (04:00 -0700)
commitab2e8f7d07f577ee39228fb3454b9f29eab0f312
tree9f3fc14b955f689a29d6777349db0f49c8dcf3e0
parentbe2f41c611b65353fa3ae0c155cf906b348dc864
isci: merge remote_device substates into a single state machine

A substate is just a state, so uplevel the smp and stp device substates.
Three tricks at work here:

1/ scic_sds_remote_device_ready_state_enter: needs to know the the device type
   so it can immediately transition to a stp or smp ready substate.

2/ scic_sds_remote_device_ready_state_exit: needs to know the device type. In
   the ssp case the device is no longer ready, in the stp, and smp case we have
   simply exited to a ready "substate".

3/ scic_sds_remote_device_resume_complete_handler: The one location
   where we directly check the current state against
   SCI_BASE_REMOTE_DEVICE_STATE_READY needed to comprehend the possible ready
   substates.

Reported-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/scsi/isci/Makefile
drivers/scsi/isci/remote_device.c
drivers/scsi/isci/remote_device.h
drivers/scsi/isci/smp_remote_device.c [deleted file]
drivers/scsi/isci/stp_remote_device.c [deleted file]