aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAge
...
| | * isci: Removing unused variables compiler warningsDave Jiang2011-07-03
| | | | | | | | | | | | | | | | | | | | | Newer gcc's are better at identifying "set, but not used" variables. Signed-off-by: Dave Jiang <dave.jiang@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| | * isci: Retrieve the EFI variable for OEM parameterDave Jiang2011-07-03
| | | | | | | | | | | | | | | | | | | | | | | | We can call the EFI get_variable service routine directly to retrieve the EFI variable that holds the OEM parameters table. Signed-off-by: Dave Jiang <dave.jiang@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| | * isci: removing the kmalloc in smp request constructDave Jiang2011-07-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | It doesn't look like there is any reason to do a kmalloc. We can do the byte swap in place and avoid the allocation. This allow us to remove a kmalloc and a memcpy. Signed-off-by: Dave Jiang <dave.jiang@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| | * isci: remove isci_timer interfaceEdmund Nadolski2011-07-03
| | | | | | | | | | | | | | | | | | | | | Delete code which is no longer used. Signed-off-by: Edmund Nadolski <edmund.nadolski@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| | * isci: Remove tmf timeout_timerEdmund Nadolski2011-07-03
| | | | | | | | | | | | | | | | | | | | | | | | Replace the timeout_timer in the isci_tmf with a call to wait_for_completion_timeout Signed-off-by: Edmund Nadolski <edmund.nadolski@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| | * isci: convert phy_startup_timer to sci_timerEdmund Nadolski2011-07-03
| | | | | | | | | | | | | | | Signed-off-by: Edmund Nadolski <edmund.nadolski@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| | * isci: convert scic_timeout_timer to sci_timerEdmund Nadolski2011-07-03
| | | | | | | | | | | | | | | Signed-off-by: Edmund Nadolski <edmund.nadolski@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| | * isci: convert power control timer to sci_timerEdmund Nadolski2011-07-03
| | | | | | | | | | | | | | | Signed-off-by: Edmund Nadolski <edmund.nadolski@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| | * isci: convert phy sata_timeout_timer to sci_timerEdmund Nadolski2011-07-03
| | | | | | | | | | | | | | | | | | | | | | | | Convert the sata_timeout_timer in the scic_sds_phy struct to use a struct sci_timer Signed-off-by: Edmund Nadolski <edmund.nadolski@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| | * isci: convert port config agent timer to sci_timerEdmund Nadolski2011-07-03
| | | | | | | | | | | | | | | | | | Signed-off-by: Edmund Nadolski <edmund.nadolski@intel.com> [squashed collateral cleanups] Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| | * isci: replace isci_timer list with proper embedded timersEdmund Nadolski2011-07-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rather than preallocating a list of timers and doling them out at runtime, embed a struct timerlist in each object that needs one. A struct sci_timer interface is introduced to manage the timer cancellation semantics which currently need to guarantee the timer is cancelled while holding spin_lock(ihost->scic_lock). Since the timeout functions also need to acquire the lock it currently prevents the driver from using del_timer_sync() for runtime cancellations. del_timer_sync() is used however before the objects go out of scope. Signed-off-by: Edmund Nadolski <edmund.nadolski@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| | * isci: add some type safety to the state machine interfaceDan Williams2011-07-03
| | | | | | | | | | | | | | | | | | | | | | | | Now that any given object type only has one state_machine we can use container_of() to get back to the given state machine owner. Reported-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| | * isci: unify rnc start{io|task} handlersDan Williams2011-07-03
| | | | | | | | | | | | | | | | | | | | | | | | Unify rnc start{io|task} handlers and delete the state handler infrastructure. Reported-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| | * isci: unify rnc suspend/resume handlersDan Williams2011-07-03
| | | | | | | | | | | | | | | | | | | | | Unify rnc suspend/resume handlers and delete the state handlers. Reported-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| | * isci: unify rnc destruct handlersDan Williams2011-07-03
| | | | | | | | | | | | | | | | | | | | | Unify rnc destruct handlers and delete the state handler. Reported-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| | * isci: unify rnc event handlersDan Williams2011-07-03
| | | | | | | | | | | | | | | | | | | | | Unify rnc event handlers and delete the state handler. Reported-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| | * isci: unify port start_io and complete_io handlersDan Williams2011-07-03
| | | | | | | | | | | | | | | | | | | | | Unify the handlers and kill the state handler infrastructure. Reported-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| | * isci: unify port link_up and link_down handlersPiotr Sawicki2011-07-03
| | | | | | | | | | | | | | | | | | | | | | | | Unify the handlers and kill the state handler implementations. Reported-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Piotr Sawicki <piotr.sawicki@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| | * isci: remove port frame and event handlersPiotr Sawicki2011-07-03
| | | | | | | | | | | | | | | | | | | | | | | | Unused infrastructure. Reported-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Piotr Sawicki <piotr.sawicki@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| | * isci: unify port reset, add_phy, and remove_phy handlersPiotr Sawicki2011-07-03
| | | | | | | | | | | | | | | | | | | | | | | | Unify the implementations and remove the state handlers. Reported-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Piotr Sawicki <piotr.sawicki@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| | * isci: remove port destruct handlerPiotr Sawicki2011-07-03
| | | | | | | | | | | | | | | | | | | | | The handler was never used. Signed-off-by: Piotr Sawicki <piotr.sawicki@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| | * isci: unify port stop handlersPiotr Sawicki2011-07-03
| | | | | | | | | | | | | | | | | | | | | | | | Implement the stop handlers directly in scic_sds_port_stop() Reported-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Piotr Sawicki <piotr.sawicki@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| | * isci: remove port start handlerPiotr Sawicki2011-07-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | remove the handler from the port state handler table and implement the logic directly in scic_sds_port_start(). Signed-off-by: Piotr Sawicki <piotr.sawicki@intel.com> [remove a level of indirection] Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| | * isci: merge port ready substates into primary state machinePiotr Sawicki2011-07-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This conversion was complicated by the fact that the ready state exit routine took unconditional action beyond just stopping the substate machine (like in previous conversions). In order to ensure identical behaviour every state transition needs to be instrumented to catch ready-->!ready transitions and execute scic_sds_port_invalidate_dummy_remote_node() Reported-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Piotr Sawicki <piotr.sawicki@intel.com> [fix ready state exit handling] Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| | * isci: c99 port state handlersPiotr Sawicki2011-07-03
| | | | | | | | | | | | | | | | | | | | | Name the table fields for consistancy and clarity. Signed-off-by: Piotr Sawicki <piotr.sawicki@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| | * isci: clarify phy to port lookupsDan Williams2011-07-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | While cleaning up the driver it is very tempting to convert scic_sds_get_* macros to their open coded equivalent. They are all just pointer dereferences *except* scic_sds_phy_get_port() which returns NULL if the phy is assigned to the dummy port. Clarify this by renaming it to phy_get_non_dummy_port(). Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| | * isci: unify phy consume_power handlersDan Williams2011-07-03
| | | | | | | | | | | | | | | | | | | | | | | | Unify the implementations in scic_sds_phy_consume_power_handler(), and kill the state handler plus infrastructure. Reported-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| | * isci: unify phy event handlersDan Williams2011-07-03
| | | | | | | | | | | | | | | | | | | | | Unify the implementations in scic_sds_phy_event_handler(), and kill the state handler Reported-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| | * isci: unify phy frame handlersDan Williams2011-07-03
| | | | | | | | | | | | | | | | | | | | | Unify the implementations in scic_sds_phy_frame_handler(), and kill the state handler Reported-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| | * isci: remove phy destruct handlersDan Williams2011-07-03
| | | | | | | | | | | | | | | | | | | | | Unused infrastructure. Reported-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| | * isci: unify phy reset handlersDan Williams2011-07-03
| | | | | | | | | | | | | | | | | | | | | Unify the implementations in scic_sds_phy_reset(), and kill the state handler Reported-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| | * isci: unify phy stop handlersDan Williams2011-07-03
| | | | | | | | | | | | | | | | | | | | | Merge all implementations in scic_sds_phy_stop(), and kill the state handler Reported-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| | * isci: unify phy start handlersDan Williams2011-07-03
| | | | | | | | | | | | | | | | | | | | | Implement all handlers in scic_sds_phy_start(), and kill the state handler Reported-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| | * isci: merge phy substatesAdam Gruchala2011-07-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merged states and substates into one state machine, as we always unconditionally transitioned to the substate machine it was straightforward to enter that substate from the starting state. Reported-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Adam Gruchala <adam.gruchala@intel.com> [fixed construction, starting_state_enter, and starting check] Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| | * isci: remove the completion and event state handlersDan Williams2011-07-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * isci: remove request task context completion state handlerDan Williams2011-07-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unlike the other conversions this only updates scic_sds_io_request_tc_completion() to call the old state handlers directly (with less verbose names). This was done for future patch readability, the implementations have only minor differences for different completion codes. Without a reference to the function name it would be difficult to dicern which state is being updated. Considered changing the order to look up the completion code before the state but that was not a clean conversion either. Reported-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| | * isci: unify request frame handlersDan Williams2011-07-03
| | | | | | | | | | | | | | | | | | | | | | | | Unify the implementation in scic_sds_io_request_frame_handler and kill the state handler. Reported-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| | * isci: unify request start handlersPiotr Sawicki2011-07-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unify the implementation in scic_sds_request_start and kill the state handler. Reported-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Piotr Sawicki <piotr.sawicki@intel.com> [remove scic_sds_request_constructed_state_start_handler] Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| | * isci: unify request abort handlersDan Williams2011-07-03
| | | | | | | | | | | | | | | | | | | | | | | | Unify the implementation in scic_sds_io_request_terminate and kill the state handler. Reported-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| | * isci: merge stp request substates into primary state machineDan Williams2011-07-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove usage of the request substate machine for stp requests, and kill the request substate infrastructure. Similar to the previous conversions this adds the substates to the primary state machine and arranges for the 'started' state to transition to the proper stp substate. Reported-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| | * isci: merge smp request substates into primary state machineDan Williams2011-07-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove usage of the request substate machine for smp requests identified by: task->task_proto == SAS_PROTOCOL_SMP While merging over the smp_request infrastructure noticed that all the assign buffer implementations are now equal, so moved it to scic_sds_general_request_construct. Reported-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| | * isci: merge ssp task management substates into primary state machineDan Williams2011-07-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove usage of the request substate machine for ssp task management requests identified by: ireq->ttype == tmf_task && dev->dev_type == SAS_END_DEV; The only routine that checks the base 'started' state is scic_sds_io_request_tc_completion which calls the substate machine handler if we are not in the 'started' state or we are 'started' and no substate machine is defined. This routine requires no conversion because we have transitioned out of 'started' and the substate routine will be called naturally as a result. There are also no side effects of this conversion on exiting the 'started', state because it only stops the substate machine, which is no longer relevant for this transaction type. Reported-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| | * isci: uplevel port infrastructureDan Williams2011-07-03
| | | | | | | | | | | | | | | | | | | | | | | | * Move port configuration agent implementation * Merge core/scic_sds_port.[ch] into port.[ch] Reported-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| | * isci: uplevel phy infrastructureDan Williams2011-07-03
| | | | | | | | | | | | | | | | | | | | | Merge core/scic_sds_phy.[ch] into phy.[ch] Reported-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| | * isci: uplevel request infrastructureDan Williams2011-07-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Consolidate tiny header files * Move files out of core/ (drop core/scic_sds_ prefix) * Merge core/scic_sds_request.[ch] into request.[ch] * Cleanup request.c namespace (clean forward declarations and global namespace pollution) Reported-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| | * isci: uplevel state machineDan Williams2011-07-03
| | | | | | | | | | | | | | | | | | | | | | | | unify core/sci_base_state.h and core/sci_base_state_machine.[ch] into state_machine.[ch] Reported-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| | * isci: uplevel register hardware data structures and unsolicited frame handlingDan Williams2011-07-03
| | | | | | | | | | | | | | | Reported-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| | * isci: move core/controller to hostDan Williams2011-07-03
| | | | | | | | | | | | | | | | | | | | | | | | Now that the data structures are unified unify the implementation in host.[ch] and cleanup namespace pollution. Reported-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| | * isci: unify constantsDan Williams2011-07-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cross driver constants are spread out over multiple header files, consolidate them into isci.h, and push some includes out to the source files that need them. TODO: remove SCI_MODE_SIZE infrastructure. TODO: task.h is full of inlines that are too large Signed-off-by: Dan Williams <dan.j.williams@intel.com>
| | * isci: unify request data structuresDan Williams2011-07-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make scic_sds_request a proper member of isci_request. Also let's us get rid of the dma pool object size tracking since we now know that all requests are sizeof(isci_request). While cleaning up the construct routine incidentally replaced SCI_FIELD_OFFSET with offsetof. Reported-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dan Williams <dan.j.williams@intel.com>