aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/isci/request.h
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2011-05-11 11:29:56 -0400
committerDan Williams <dan.j.williams@intel.com>2011-07-03 07:04:48 -0400
commit79e2b6b27699c916e3c7cda18a26d47fea6017fb (patch)
tree3d8aa7d0f9b203f210f66d6026d9414327a7309c /drivers/scsi/isci/request.h
parenta7e255a34220ba57eeeb75637c911974e54c08e7 (diff)
isci: remove the completion and event state handlers
With these handlers gone the rest of the state handler infrastructure is removed. Added some WARN_ONCEs where previously we would cause NULL pointer dereferences or silently run handlers from a previous state. Reported-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/scsi/isci/request.h')
-rw-r--r--drivers/scsi/isci/request.h37
1 files changed, 2 insertions, 35 deletions
diff --git a/drivers/scsi/isci/request.h b/drivers/scsi/isci/request.h
index e13ca3f7c8d7..31d6d5717473 100644
--- a/drivers/scsi/isci/request.h
+++ b/drivers/scsi/isci/request.h
@@ -224,13 +224,6 @@ struct scic_sds_request {
224 u32 saved_rx_frame_index; 224 u32 saved_rx_frame_index;
225 225
226 /** 226 /**
227 * This field specifies the current state handlers in place for this
228 * IO Request object. This field is updated each time the request
229 * changes state.
230 */
231 const struct scic_sds_io_request_state_handler *state_handlers;
232
233 /**
234 * This field in the recorded device sequence for the io request. This is 227 * This field in the recorded device sequence for the io request. This is
235 * recorded during the build operation and is compared in the start 228 * recorded during the build operation and is compared in the start
236 * operation. If the sequence is different then there was a change of 229 * operation. If the sequence is different then there was a change of
@@ -422,27 +415,6 @@ enum sci_base_request_states {
422 SCI_BASE_REQUEST_STATE_FINAL, 415 SCI_BASE_REQUEST_STATE_FINAL,
423}; 416};
424 417
425typedef enum sci_status (*scic_sds_io_request_handler_t)
426 (struct scic_sds_request *request);
427typedef enum sci_status (*scic_sds_io_request_event_handler_t)
428 (struct scic_sds_request *req, u32 event);
429
430/**
431 * struct scic_sds_io_request_state_handler - This is the SDS core definition
432 * of the state handlers.
433 *
434 *
435 */
436struct scic_sds_io_request_state_handler {
437 /**
438 * The complete_handler specifies the method invoked when a user attempts to
439 * complete a request.
440 */
441 scic_sds_io_request_handler_t complete_handler;
442
443 scic_sds_io_request_event_handler_t event_handler;
444};
445
446/** 418/**
447 * scic_sds_request_get_controller() - 419 * scic_sds_request_get_controller() -
448 * 420 *
@@ -495,13 +467,6 @@ struct scic_sds_io_request_state_handler {
495 (request)->sci_status = (sci_status_code); \ 467 (request)->sci_status = (sci_status_code); \
496 } 468 }
497 469
498#define scic_sds_request_complete(a_request) \
499 ((a_request)->state_handlers->complete_handler(a_request))
500
501
502extern enum sci_status
503scic_sds_io_request_tc_completion(struct scic_sds_request *request, u32 completion_code);
504
505/** 470/**
506 * SCU_SGL_ZERO() - 471 * SCU_SGL_ZERO() -
507 * 472 *
@@ -538,6 +503,8 @@ enum sci_status scic_sds_io_request_event_handler(struct scic_sds_request *sci_r
538enum sci_status scic_sds_io_request_frame_handler(struct scic_sds_request *sci_req, 503enum sci_status scic_sds_io_request_frame_handler(struct scic_sds_request *sci_req,
539 u32 frame_index); 504 u32 frame_index);
540enum sci_status scic_sds_task_request_terminate(struct scic_sds_request *sci_req); 505enum sci_status scic_sds_task_request_terminate(struct scic_sds_request *sci_req);
506extern enum sci_status scic_sds_request_complete(struct scic_sds_request *sci_req);
507extern enum sci_status scic_sds_io_request_tc_completion(struct scic_sds_request *sci_req, u32 code);
541 508
542/* XXX open code in caller */ 509/* XXX open code in caller */
543static inline void *scic_request_get_virt_addr(struct scic_sds_request *sci_req, 510static inline void *scic_request_get_virt_addr(struct scic_sds_request *sci_req,