isci: simplify request state handlers
authorChristoph Hellwig <hch@infradead.org>
Thu, 31 Mar 2011 15:06:16 +0000 (11:06 -0400)
committerDan Williams <dan.j.williams@intel.com>
Sun, 3 Jul 2011 11:00:37 +0000 (04:00 -0700)
commit524b5f723be8a1d966c1285d69810bc461f181c2
treefe9843f60e832d326f7b72bbe64aaf0c94424b3a
parent78141676784ed190ce2546f97a7d6368f21e450b
isci: simplify request state handlers

Instead of filling up tables with default handlers call the default
handler in the only caller.

IMHO the whole state handlers concept is not very suitable for the
isci request.  For example there is a single real instance of the
start handler, and we'd be much better off just having a check for
the right state in the only caller, than all this mess.  It's
quite similar for the abort handler as well.

Even the actual state machine has a lot of states that are rather
pointless.  The initial and constructed states are not needed at all
as the request is not reachable for calls before it's fully set up and
started.  And the abort state should be replaced with an abort actions
and a state transition to the completed state.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/scsi/isci/core/scic_sds_request.c
drivers/scsi/isci/core/scic_sds_request.h
drivers/scsi/isci/core/scic_sds_smp_request.c
drivers/scsi/isci/core/scic_sds_ssp_request.c
drivers/scsi/isci/core/scic_sds_stp_packet_request.c
drivers/scsi/isci/core/scic_sds_stp_request.c