Age | Commit message (Collapse) | Author | Files | Lines |
|
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 <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
|
|
Delete code which is no longer used.
Signed-off-by: Edmund Nadolski <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
|
|
Replace the timeout_timer in the isci_tmf with a call to
wait_for_completion_timeout
Signed-off-by: Edmund Nadolski <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
|
|
Signed-off-by: Edmund Nadolski <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
|
|
Signed-off-by: Edmund Nadolski <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
|
|
Signed-off-by: Edmund Nadolski <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
|
|
Convert the sata_timeout_timer in the scic_sds_phy struct to
use a struct sci_timer
Signed-off-by: Edmund Nadolski <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
|
|
Signed-off-by: Edmund Nadolski <[email protected]>
[squashed collateral cleanups]
Signed-off-by: Dan Williams <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
|
|
Unify rnc start{io|task} handlers and delete the state handler
infrastructure.
Reported-by: Christoph Hellwig <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
|
|
Unify rnc suspend/resume handlers and delete the state handlers.
Reported-by: Christoph Hellwig <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
|
|
Unify rnc destruct handlers and delete the state handler.
Reported-by: Christoph Hellwig <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
|
|
Unify rnc event handlers and delete the state handler.
Reported-by: Christoph Hellwig <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
|
|
Unify the handlers and kill the state handler infrastructure.
Reported-by: Christoph Hellwig <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
|
|
Unify the handlers and kill the state handler implementations.
Reported-by: Christoph Hellwig <[email protected]>
Signed-off-by: Piotr Sawicki <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
|
|
Unused infrastructure.
Reported-by: Christoph Hellwig <[email protected]>
Signed-off-by: Piotr Sawicki <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
|
|
Unify the implementations and remove the state handlers.
Reported-by: Christoph Hellwig <[email protected]>
Signed-off-by: Piotr Sawicki <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
|
|
The handler was never used.
Signed-off-by: Piotr Sawicki <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
|
|
Implement the stop handlers directly in scic_sds_port_stop()
Reported-by: Christoph Hellwig <[email protected]>
Signed-off-by: Piotr Sawicki <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
|
|
remove the handler from the port state handler table and implement the
logic directly in scic_sds_port_start().
Signed-off-by: Piotr Sawicki <[email protected]>
[remove a level of indirection]
Signed-off-by: Dan Williams <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: Piotr Sawicki <[email protected]>
[fix ready state exit handling]
Signed-off-by: Dan Williams <[email protected]>
|
|
Name the table fields for consistancy and clarity.
Signed-off-by: Piotr Sawicki <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
|
|
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 <[email protected]>
|
|
Unify the implementations in scic_sds_phy_consume_power_handler(), and kill
the state handler plus infrastructure.
Reported-by: Christoph Hellwig <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
|
|
Unify the implementations in scic_sds_phy_event_handler(), and kill the state handler
Reported-by: Christoph Hellwig <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
|
|
Unify the implementations in scic_sds_phy_frame_handler(), and kill the state handler
Reported-by: Christoph Hellwig <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
|
|
Unused infrastructure.
Reported-by: Christoph Hellwig <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
|
|
Unify the implementations in scic_sds_phy_reset(), and kill the state handler
Reported-by: Christoph Hellwig <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
|
|
Merge all implementations in scic_sds_phy_stop(), and kill the state handler
Reported-by: Christoph Hellwig <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
|
|
Implement all handlers in scic_sds_phy_start(), and kill the state handler
Reported-by: Christoph Hellwig <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: Adam Gruchala <[email protected]>
[fixed construction, starting_state_enter, and starting check]
Signed-off-by: Dan Williams <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
|
|
Unify the implementation in scic_sds_io_request_frame_handler and kill
the state handler.
Reported-by: Christoph Hellwig <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
|
|
Unify the implementation in scic_sds_request_start and kill the state
handler.
Reported-by: Christoph Hellwig <[email protected]>
Signed-off-by: Piotr Sawicki <[email protected]>
[remove scic_sds_request_constructed_state_start_handler]
Signed-off-by: Dan Williams <[email protected]>
|
|
Unify the implementation in scic_sds_io_request_terminate and kill the state
handler.
Reported-by: Christoph Hellwig <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
|
|
* Move port configuration agent implementation
* Merge core/scic_sds_port.[ch] into port.[ch]
Reported-by: Christoph Hellwig <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
|
|
Merge core/scic_sds_phy.[ch] into phy.[ch]
Reported-by: Christoph Hellwig <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
|
|
* 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 <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
|
|
unify core/sci_base_state.h and core/sci_base_state_machine.[ch] into
state_machine.[ch]
Reported-by: Christoph Hellwig <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
|
|
Reported-by: Christoph Hellwig <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
|
|
Now that the data structures are unified unify the implementation in
host.[ch] and cleanup namespace pollution.
Reported-by: Christoph Hellwig <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
|
|
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 <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
|
|
Final elimination of the anonymous data at the end of the request
structure.
Signed-off-by: Dan Williams <[email protected]>
|