summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* isci: clarify phy to port lookupsDan Williams2011-07-035-12/+11
| | | | | | | | | 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-032-527/+83
| | | | | | | | 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-032-642/+384
| | | | | | | 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-032-179/+93
| | | | | | | 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-032-34/+0
| | | | | | | 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-032-47/+12
| | | | | | | 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-032-62/+23
| | | | | | | 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-032-61/+19
| | | | | | | 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-033-299/+276
| | | | | | | | | | | 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-032-469/+82
| | | | | | | | | | | 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-032-337/+197
| | | | | | | | | | | | | 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-033-607/+422
| | | | | | | | 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-033-94/+74
| | | | | | | | | | 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-032-103/+50
| | | | | | | | 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-035-1927/+1571
| | | | | | | | | | | | 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-035-593/+436
| | | | | | | | | | | | 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-034-286/+178
| | | | | | | | | | | | | | | | | | | | 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-0317-3425/+2929
| | | | | | | | * 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-0311-3031/+2784
| | | | | | | 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-0327-3198/+2194
| | | | | | | | | | | * 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-0315-116/+31
| | | | | | | | 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-0317-257/+121
| | | | | 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-0328-3940/+3360
| | | | | | | | 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-0338-962/+497
| | | | | | | | | | | 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-0315-257/+128
| | | | | | | | | | 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>
* isci: make command/response iu explicit request object membersDan Williams2011-07-0310-423/+104
| | | | | | | Final elimination of the anonymous data at the end of the request structure. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* isci: move task context alignment from run-time to compile timeDan Williams2011-07-034-113/+13
| | | | | | | | | | | Remove usage of PTR_ALIGN by arranging for the task context to be aligned by the compiler. Another step towards unifying isci_request and scic_sds_request. Once this is complete the task context in the request can likely be removed in favor of building the task directly to tc memory (see: scic_sds_controller_copy_task_context). It's not clear why this needs to be cacheline aligned if we just end up copying before submission... Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* isci: make sgl explicit/aligned request object memberDan Williams2011-07-037-64/+19
| | | | | | | Towards unifying request objects we need all members to be defined in the object and not carved out of anonymous buffer space. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* isci: move stp request info to scic_sds_requestDan Williams2011-07-035-435/+313
| | | | | | | In preparation for unifying allocation of all request information make stp data available in all requests. Incidentally collapse indentation. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* isci: unify port data structuresDan Williams2011-07-0312-113/+67
| | | | | | | | | Make scic_sds_port a member of isci_port and merge their lifetimes which means removing the port table from scic_sds_controller in favor of the one at the isci_host level. Merge ihost->sas_ports into ihost->ports. _ Reported-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* isci: unify phy data structuresDan Williams2011-07-0310-313/+187
| | | | | | | | | Make scic_sds_phy a member of isci_phy and merge their lifetimes which means removing the phy table from scic_sds_controller in favor of the one at that isci_host level. Reported-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* isci: rnc state machine table c99 conversionJacek Danecki2011-07-032-71/+58
| | | | | | | | This makes the subsequent patches to delete rnc->state_handler more clear. Signed-off-by: Jacek Danecki <Jacek.Danecki@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* isci: remove scic_sds_port_increment_request_countEdmund Nadolski2011-07-032-7/+1
| | | | | | | Removes excessive encapsulation function. Signed-off-by: Edmund Nadolski <edmund.nadolski@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* isci: kill scic_controller_get_port_handle functionEdmund Nadolski2011-07-034-78/+25
| | | | | | | | This function is just overkill and its usage is inconsistent. Replace with inlined code. Signed-off-by: Edmund Nadolski <edmund.nadolski@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* isci: Removing unnecessary functions in request.cDave Jiang2011-07-033-71/+12
| | | | | | | No need for wrappers, just access sas_task directly. Signed-off-by: Dave Jiang <dave.jiang@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* isci: unify isci_host data structuresArtur Wojcik2011-07-0318-163/+83
| | | | | | | | | Make it explicit that isci_host and scic_sds_controller are one in the same object. Signed-off-by: Artur Wojcik <artur.wojcik@intel.com> [removed ->ihost back pointer] Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* isci: implement I_T_nexus_resetDan Williams2011-07-033-64/+76
| | | | | | | | | | | | | This is a requirement for 2.6.39's new libata eh. Still some questions about lldd_dev_gone racing against dev->lldd_dev lookups, but we are at least no more broken than mvsas in this regard. We also short-circuit I_T_nexus_reset invocations from the device discovery path (IDEV_EH similar to MVS_DEV_EH) to filter out the resulting domain rediscoveries triggered by the reset. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* isci: fix ata lockingDan Williams2011-07-031-13/+13
| | | | | | | | Upstream commit a29b5dad "libata: fix locking for sas paths" switched libsas ata locking to the ata_host lock. We need to do the same when returning ata tasks from the execute path. Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* isci: removing intel_*.h headersDave Jiang2011-07-0318-676/+17
| | | | | Signed-off-by: Dave Jiang <dave.jiang@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* isci: Using Linux SSP frame headerDave Jiang2011-07-035-68/+22
| | | | | | | Removing of struct sci_ssp_frame_header and migrate to struct ssp_frame_hdr. Signed-off-by: Dave Jiang <dave.jiang@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* isci: Remove SCIC_SWAP_DWORD()Dave Jiang2011-07-035-91/+60
| | | | | | | | | | | Use Linux native swab32() call instead of SCIC_SWAP_DWORD(). We need to swab() because the hardware munges the data into a "big-endian dword" stream which is byte-swapped from the sas definition regardless of host endian. Signed-off-by: Dave Jiang <dave.jiang@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* isci: fixup SAS iaf protocols data structureDave Jiang2011-07-037-138/+59
| | | | | | | | | Moved the actual data structure that's read from the phy register to phy header. Removed the parsing of identify address frame protocol bits as that seemed not necessary and we can use existing information. Signed-off-by: Dave Jiang <dave.jiang@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* isci: remove redundant copies of IAFDave Jiang2011-07-035-136/+11
| | | | | | | | | We need to remove the extra copies of identify address frame that's being kept around. We only need the one copy that libsas is using. Signed-off-by: Dave Jiang <dave.jiang@intel.com> [further cleanups] Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* isci: Converting smp_response to Linux native smp_respDave Jiang2011-07-033-223/+34
| | | | | Signed-off-by: Dave Jiang <dave.jiang@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* isci: Fixup of smp requestDave Jiang2011-07-035-260/+196
| | | | | | | | The struct smp_request data structure has be fixed up for Linux consumption. This probably should go to scsi/sas.h eventually. Signed-off-by: Dave Jiang <dave.jiang@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* isci: Convert of sci_ssp_response_iu to ssp_response_iuDave Jiang2011-07-036-252/+141
| | | | | | | | | | | Converting to Linux native format. However the isci driver does a lot of the calculation based on the max size of this data structure and the Linux data structure only has a pointer to the response data. Thus the sizeof(struct ssp_response_iu) will be incorrect and we need to define the max size. Signed-off-by: Dave Jiang <dave.jiang@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* isci: Fixup SSP command IU and task IUDave Jiang2011-07-035-285/+74
| | | | | | | Fixup of SSP command IU and SSP task IU to something that looks like Linux Signed-off-by: Dave Jiang <dave.jiang@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* isci: renaming sas_capabilities to scic_phy_capDave Jiang2011-07-033-55/+50
| | | | | | | | | This seems to be a data structure that represents the phy capabilities register from the hardware and has nothing to do with SAS data structs. Moving and fixup Signed-off-by: Dave Jiang <dave.jiang@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* isci: Collapsing of phy_type data structureDave Jiang2011-07-032-16/+8
| | | | | | | Collapsing of struct scic_sds_phy phy_type data structure Signed-off-by: Dave Jiang <dave.jiang@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
* isci: Convert SAS identify address frame to Linux Native formatDave Jiang2011-07-036-106/+27
| | | | | | | Convert struct sci_sas_identify_address_frame to struct sas_identify_frame Signed-off-by: Dave Jiang <dave.jiang@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
OpenPOWER on IntegriCloud