The default should be 5us. The hardware encodes it in 256ns increments,
so the value should be 20 to approximate a 5us timeout.
Signed-off-by: Tomasz Chudy <Tomasz.Chudy@intel.com>
Signed-off-by: Jacek Danecki <Jacek.Danecki@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
c99 the struct initializers:
1/ allows grep to consistently show method name associations. The
naming is mostly consistent (except when it isn't) so this guarantees
coverage of present and future exception cases.
2/ let's the compiler guarantee that the state table array entry
correlates with an actual state name and detect accidental reordering or
deletion of states.
/ allows default handler's to be identified easily
Signed-off-by: Jacek Danecki <Jacek.Danecki@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Moved the firmware loading from per adapter to per PCI device. This should
prevent firmware from being loaded twice becuase of 2 SCU controller per
PCI device. We do have to do it per PCI device because request_firmware()
requires a struct device passed in.
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
The proc_name field in struct scsi_host_template is exported through sysfs and
allows userspace tools to identify the driver behind a particular SCSI host
controller.
Initialize this field so that userspace tools can easily identify isci host
controllers through sysfs.
Signed-off-by: Havard Skinnemoen <hskinnemoen@google.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
This removes scic_controller_get_handler_methods and its
associated unused code.
Signed-off-by: Edmund Nadolski <edmund.nadolski@intel.com>
[djbw: kill off the legacy handler, now that we have basic error isr support]
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Some of the chain walks to get back to our dev are invalid.
isci_remote_device_change_state: delete rather than adding conditional deref
chain walking
isci_request_change_state: fix, it was being called too early
isci_request_ssp_io_request_get_lun: fix compile breakage hidden by ifdef DEBUG
Signed-off-by: Maciej Trela <maciej.trela@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Inform libsas of the linkrate of direct attached links.
Reported-by: Haavard Skinnemoen <hskinnemoen@gmail.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Polling the event queue during scan is an unneeded holdover from the
original driver.
Signed-off-by: Edmund Nadolski <edmund.nadolski@intel.com>
[djbw: ensure we flush all port events and domain discovery]
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
The lldd actively disallows requests in the "starting" state. Retrying
or holding off commands in this state is sub-optimal:
1/ it adds another state check to the fast path
2/ retrying can cause libsas to give up
However, isci's ->lldd_dev_found() routine already waits for controller
start to complete before allowing further progress. Checking the
"starting" state in isci_task_execute_task and the isr is redundant and
misleading. Clean this up and introduce a controller-wide event queue
to start reeling in "completion" proliferation in the driver.
The "stopping" state cleanups are in a similar vein, rely on the the isr
and other paths being precluded from occurring rather than implementing
state checking logic.
Reported-by: Christoph Hellwig <hch@infradead.org>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Edmund Nadolski <edmund.nadolski@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
The indirection is unecessary and broken in the current case that assigns the
handlers based on a not up-to-date pdev->msix_enabled value.
Route the handlers directly to the requisite core routines.
Todo: hook up error interrupt handling
Reported-by: Jeff Garzik <jeff@garzik.org>
Cc: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Edmund Nadolski <edmund.nadolski@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
This will be replaced by state machine tracepoints and should have been a part
of the logger removal.
Ran across scic_sds_port_decrement_request_count() which is an ugly macro
which silently hides accounting errors. Turn it into a WARN_ONCE to see if it
ever triggers.
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Callbacks are already type unsafe, obfuscating things further by casting the
callback routine is less safe because now function argument number changes
will not be caught by the compiler.
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Change names from upper to low letters
Signed-off-by: Henryk Dembkowski <henryk.dembkowski@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Remove duplicated license and header file includes that were leftover
from commit 4c1db2d0 "isci: consolidate core" (in the isci.git historical
branch).
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
scic_sds_stp_remote_device_ready_substate_handler_table[]
scic_sds_smp_remote_device_ready_substate_handler_table[]
c99 the struct initializers:
1/ allows grep to consistently show method name associations. The
naming is mostly consistent (except when it isn't) so this guarantees
coverage of present and future exception cases.
2/ let's the compiler guarantee that the state table array entry
correlates with an actual state name and detect accidental reordering or
deletion of states.
3/ allows default handler's to be identified easily
Signed-off-by: Henryk Dembkowski <henryk.dembkowski@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Change names from upper to low letters
Signed-off-by: Henryk Dembkowski <henryk.dembkowski@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
c99 the struct initializers (scic_sds_remote_device_state_handler_table[]):
1/ allows grep to consistently show method name associations. The
naming is mostly consistent (except when it isn't) so this guarantees
coverage of present and future exception cases.
2/ let's the compiler guarantee that the state table array entry
correlates with an actual state name and detect accidental reordering or
deletion of states.
3/ allows default handler's to be identified easily
Change names from upper to low letters
Cleanup empty lines
Signed-off-by: Henryk Dembkowski <henryk.dembkowski@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
We no longer use the loglevel parameter. Remove.
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Edmund Nadolski <edmund.nadolski@intel.com>
[rebased after killing SCI_IO_REQUEST_DATA_DIRECTION]
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
It's an unnecessary typedef that mirrors the kernel's enum
dma_data_direction.
Also cleanup some long variable names along the way.
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Support for the up to 2x4-port 6Gb/s SAS controllers embedded in the
chipset.
This is a snapshot of the first publicly available version of the driver,
commit 4c1db2d0 in the 'historical' branch.
git://git.kernel.org/pub/scm/linux/kernel/git/djbw/isci.git historical
Signed-off-by: Maciej Trela <maciej.trela@intel.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Edmund Nadolski <edmund.nadolski@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>