]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitfa3ae821047927ce72e6e8aa93272e9aa7788521
treefe9843f60e832d326f7b72bbe64aaf0c94424b3a
parent85f825c3188eb6cbf5036e246eea9cbe3da3afa0
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