aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-07-03isci: fix hang after target resetDan Williams1-6/+14
When aborting a task context we need to be sure that the hardware has acted on this request (retrieved the task context) before invalidating the remote node context. In the case of the "dummy" task context and remote node we do not have the full state machine that goes through the complete tc abort and rnc invalidate states. Instead we ensure the hardware has seen and acted on Signed-off-by: Jacek Danecki <[email protected]> Signed-off-by: Dan Williams <[email protected]>
2011-07-03isci: Cleanup warning messages for phy resetsDave Jiang3-60/+43
Moving some of the chattiness of warning messages to debug so only the Linux system messages are shown. Signed-off-by: Dave Jiang <[email protected]> Signed-off-by: Dan Williams <[email protected]>
2011-07-03isci: Adding support for phy enable and disableDave Jiang2-37/+54
Adding support for PHY_FUNC_LINK_RESET and PHY_FUNC_DISABLE. This allow the sysfs knob enable (both 0 and 1) and link_reset to work properly. Signed-off-by: Dave Jiang <[email protected]> Signed-off-by: Dan Williams <[email protected]>
2011-07-03isci: controller stop/start fixesPawel Marek6-69/+206
Core reworks to support stopping and re-starting the controller, lays the groundwork for phy disable / re-enable and fixes other bugs around port/phy setup/teardown. Signed-off-by: Pawel Marek <[email protected]> Signed-off-by: Dan Williams <[email protected]>
2011-07-03isci: handle cases where a d2h fis is used report an ncq errorPiotr Sawicki1-4/+21
Observed that some devices return a d2h fis, treat like an sdb error fis. Signed-off-by: Piotr Sawicki <[email protected]> Signed-off-by: Dan Williams <[email protected]>
2011-07-03isci: workaround port task scheduler starvation issueTomasz Chudy5-91/+298
There is a condition whereby TCs (task contexts) can jump to the head of the round robin queue causing indefinite starvation of pending tasks. Posting a TC to a suspended RNC (remote node context) causes the hardware to select that task first, but since the RNC is suspended the scheduler proceeds to the next task in the expected round robin fashion, restoring TC arbitration fairness. Signed-off-by: Tomasz Chudy <[email protected]> Signed-off-by: Dan Williams <[email protected]>
2011-07-03isci: rework timer apiDan Williams7-232/+104
Prepare the timer api for the arrival of dynamic creation and destruction events from the core. It pretended to do this previously but the core to date only used it in a static init-time only fashion. This is an interim fix until a cleaner event queue can be developed. 1/ make all locking external to the api (add WARN_ONCE to verify) 2/ add a timer_destroy interface (to be used by the core) 3/ use del_timer_sync() prior to deallocating timer data 4/ delete the "timer_list" indirection, we only have timers allocated for the isci_host 5/ fix detection of timer list allocation errors Signed-off-by: Dan Williams <[email protected]>
2011-07-03isci: fix sas address reportingDan Williams5-38/+19
Undo the open coded and incorrect translation of the oem parameter sas address to its libsas expected format. Signed-off-by: Dan Williams <[email protected]>
2011-07-03isci: Removing deprecated functionsDave Jiang16-1030/+130
Removed all callbacks in the deprecated.c. Core will call the appropriate functions directly. Signed-off-by: Dave Jiang <[email protected]> Signed-off-by: Dan Williams <[email protected]>
2011-07-03isci: Change event notify calls from scic_cb_* to isci_event_*Dave Jiang12-409/+476
Renaming the callbacks to apparopriate event notify calls for the LLDD. Signed-off-by: Dave Jiang <[email protected]> Signed-off-by: Dan Williams <[email protected]>
2011-07-03isci: have the driver use native SG calls and DMA-APIDave Jiang7-228/+245
Remove abstraction for SG building and get rid of callbacks for getting DMA memory mapping. Signed-off-by: Dave Jiang <[email protected]> Signed-off-by: Dan Williams <[email protected]>
2011-07-03isci: Make the driver copy data directly from and to sg for PIODave Jiang7-109/+84
We can copy the data directly to and from sg for SATA PIO read operations. There is no reason to involve the hardware SGL. In the process we also need to kmap the sg because we don't know where that can come from. We also do to not call phys_to_virt(). The driver already has the information. We can just calculcate the appropriate offets. Signed-off-by: Dave Jiang <[email protected]> Signed-off-by: Dan Williams <[email protected]>
2011-07-03isci: Removed special macros that does 64bit address mathDave Jiang2-73/+39
These macros are not necessary. We can do 64bit math directly. Signed-off-by: Dave Jiang <[email protected]> Signed-off-by: Dan Williams <[email protected]>
2011-07-03isci: fix for asserts during aborts/resets to SAS/SATA in APC modePiotr Sawicki1-13/+25
Sending aborts/resets to SAS/SATA targets in APC mode eventually causes an assert in scic_sds_apc_agent_link_up(). We need to handle the hard reset case for apc mode ports. Signed-off-by: Piotr Sawicki <[email protected]> Signed-off-by: Dan Williams <[email protected]>
2011-07-03isci: Add Support for new TC completion codesTomasz Chudy2-0/+5
Update the SCI Core to comprehend the changes in the TC completion codes from A0 to B0. Specifically, there isnew R_ER code differences for command and data FISes. Changes are as follows: 1) 0x16 now additionally indicates an R_ERR received for a COMMAND FIS being sent to a SATA target. 0x16 for SSP still indicates a NAK received for a COMMAND frame. Fix is to retry TC to be compliant with SATA spec or ensure proper error handling of return value (not spec compliant I don't believe). 2) 0x1B was previously called DONE_BREAK_RCVD for STP and DONE_LL_ABORT_ERR for SSP. Now it is universally called DONE_LL_ABORT_ERR. This is purely a superficial change. 3) 0x32 is no longer a reserved code. Now it indicates DONE_CMD_SDMA_ERR for STP/SSP. There was a fatal error on the SDMA for a command IU (includes Raw frames). Consider retry, but at a minimum gracefully fail the request. 4) 0x33 is no longer a reserved code. Now it indicates DONE_CMD_LL_ABORT_ERR for SSP. There was a break receivd during transmission of a command IU. Consider retry, but at a minimum gracefully fail the request. Signed-off-by: Tomasz Chudy <[email protected]> Signed-off-by: Jacek Danecki <[email protected]> Signed-off-by: Dan Williams <[email protected]>
2011-07-03isci: clean up remaining silicon revision ifdefs in phy initDan Williams4-121/+85
Use the dynamic revision detection code in scic_sds_phy_link_layer_initialization() and apply some coding style fixups (long deref chains). The compile time max link rate setting is removed in favor of honoring the user-parameter max. Reported-by: Krzysztof Wierzbicki <[email protected]> Signed-off-by: Dan Williams <[email protected]>
2011-07-03isci: Add support for user parameters in SCIC layerJacek Danecki4-23/+66
Add support for the following parameters in SCIC: /** * This field specifies the NOTIFY (ENABLE SPIN UP) primitive * insertion frequency for this phy index. */ u32 notify_enable_spin_up_insertion_frequency; /** * This method specifies the number of transmitted DWORDs within which * to transmit a single ALIGN primitive. This value applies regardless * of what type of device is attached or connection state. A value of * 0 indicates that no ALIGN primitives will be inserted. */ u16 align_insertion_frequency; /** * This method specifies the number of transmitted DWORDs within which * to transmit 2 ALIGN primitives. This applies for SAS connections * only. A minimum value of 3 is required for this field. */ u16 in_connection_align_insertion_frequency; Signed-off-by: Krzysztof Wierzbicki <[email protected]> Signed-off-by: Dan Williams <[email protected]>
2011-07-03isci: Move transport layer registers from port to phyHenryk Dembkowski9-162/+161
At init and RNC resume we need to touch every phy in a port to be sure we have initialized STP properties in the case where port_index != phy_index. Also add some missing __iomem annotations. Signed-off-by: Henryk Dembkowski <[email protected]> Signed-off-by: Dan Williams <[email protected]>
2011-07-03isci: fix "no outbound task timeout" default valueTomasz Chudy1-2/+1
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 <[email protected]> Signed-off-by: Jacek Danecki <[email protected]> Signed-off-by: Dan Williams <[email protected]>
2011-07-03isci: phy state machine cleanup step1Dan Williams3-208/+145
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 <[email protected]> Signed-off-by: Dan Williams <[email protected]>
2011-07-03isci: Move firmware loading to per PCI deviceDave Jiang3-159/+134
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 <[email protected]> Signed-off-by: Dan Williams <[email protected]>
2011-07-03isci: Initialize proc_name field in scsi_host_templateHavard Skinnemoen1-0/+1
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 <[email protected]> Signed-off-by: Dan Williams <[email protected]>
2011-07-03isci: remove scic_controller_get_handler_methods and ilkEdmund Nadolski4-525/+2
This removes scic_controller_get_handler_methods and its associated unused code. Signed-off-by: Edmund Nadolski <[email protected]> [djbw: kill off the legacy handler, now that we have basic error isr support] Signed-off-by: Dan Williams <[email protected]>
2011-07-03isci: debug fixesDan Williams2-9/+3
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 <[email protected]> Signed-off-by: Dan Williams <[email protected]>
2011-07-03isci: advertise linkrateDan Williams3-0/+10
Inform libsas of the linkrate of direct attached links. Reported-by: Haavard Skinnemoen <[email protected]> Signed-off-by: Dan Williams <[email protected]>
2011-07-03isci: implement error isrDan Williams4-22/+33
Add basic support for handling/reporting error interrupts. Signed-off-by: Dan Williams <[email protected]>
2011-07-03isci: enable interrupts during controller start, and flush discoveryEdmund Nadolski1-20/+9
Polling the event queue during scan is an unneeded holdover from the original driver. Signed-off-by: Edmund Nadolski <[email protected]> [djbw: ensure we flush all port events and domain discovery] Signed-off-by: Dan Williams <[email protected]>
2011-07-03isci: cleanup "starting" state handlingDan Williams4-102/+67
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 <[email protected]> Cc: Jeff Garzik <[email protected]> Signed-off-by: Edmund Nadolski <[email protected]> Signed-off-by: Dan Williams <[email protected]>
2011-07-03isci: bypass scic_controller_get_handler_methods()Dan Williams5-146/+45
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 <[email protected]> Cc: Christoph Hellwig <[email protected]> Signed-off-by: Edmund Nadolski <[email protected]> Signed-off-by: Dan Williams <[email protected]>
2011-07-03isci: remove SCIC_DEBUG_ENABLED, and fixup an odd macroDan Williams4-168/+15
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 <[email protected]>
2011-07-03isci: kill a callback castDan Williams3-10/+9
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 <[email protected]>
2011-07-03isci: coding style changes for remote deviceHenryk Dembkowski1-14/+14
Change names from upper to low letters Signed-off-by: Henryk Dembkowski <[email protected]> Signed-off-by: Dan Williams <[email protected]>
2011-07-03isci: cleanup core consolidation leftoversDan Williams4-385/+23
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 <[email protected]>
2011-07-03isci: c99 tables cleanup step1Henryk Dembkowski3-170/+132
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 <[email protected]> Signed-off-by: Dan Williams <[email protected]>
2011-07-03isci: coding style changes for remote deviceHenryk Dembkowski1-6/+6
Change names from upper to low letters Signed-off-by: Henryk Dembkowski <[email protected]> Signed-off-by: Dan Williams <[email protected]>
2011-07-03isci: remote device and node cleanup step1Henryk Dembkowski6-254/+184
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 <[email protected]> Signed-off-by: Dan Williams <[email protected]>
2011-07-03isci: removing unused loglevel module paramDave Jiang2-3/+0
We no longer use the loglevel parameter. Remove. Signed-off-by: Dave Jiang <[email protected]> Signed-off-by: Dan Williams <[email protected]>
2011-07-03isci: kill sci_types.hEdmund Nadolski30-98/+19
Signed-off-by: Edmund Nadolski <[email protected]> [rebased after killing SCI_IO_REQUEST_DATA_DIRECTION] Signed-off-by: Dan Williams <[email protected]>
2011-07-03isci: kill SCI_IO_REQUEST_DATA_DIRECTIONDan Williams8-143/+73
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 <[email protected]>
2011-07-03isci: remove SCI_INVALID_HANDLEEdmund Nadolski11-54/+50
Replace SCI_INVALID_HANDLE with NULL Signed-off-by: Edmund Nadolski <[email protected]> Signed-off-by: Dan Williams <[email protected]>
2011-07-03isci: remove unused SC_LIBRARY_HANDLE_T typedefEdmund Nadolski2-10/+0
Signed-off-by: Edmund Nadolski <[email protected]> Signed-off-by: Dan Williams <[email protected]>
2011-07-02isci: Intel(R) C600 Series Chipset Storage Control Unit DriverDan Williams104-0/+51230
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 <[email protected]> Signed-off-by: Dave Jiang <[email protected]> Signed-off-by: Edmund Nadolski <[email protected]> Signed-off-by: Dan Williams <[email protected]>
2011-07-02Merge branch 'hwmon-for-linus' of ↵Linus Torvalds3-13/+24
git://git.kernel.org/pub/scm/linux/kernel/git/groeck/staging * 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/staging: hwmon: (pmbus) Auto-detect temp2 and temp3 registers/attributes hwmon: (pmbus) Improve fan detection hwmon: (adm1275) Free allocated memory if probe function fails hwmon: (pmbus) Drop check for PMBus revision register in probe function
2011-07-02Merge branch 'for-linus' of ↵Linus Torvalds8-11/+22
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: ALSA: sb16 - Fix build errors on MIPS and others with 13bit ioctl size ALSA: hdspm - Fix compile warnings with PPC ALSA: cs5535 - Fix invalid big-endian conversions ALSA: HDMI - fix ELD monitor name length ALSA: atmel - update author email for ABDAC, AC97C and AT73C213 ALSA: HDA: Add model=auto quirk for Acer Aspire 3830TG ALSA: HDA: Add a new Conexant codec ID (506c)
2011-07-02Merge branch 'drm-fixes' of ↵Linus Torvalds3-4/+5
git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 * 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: Revert "drm/nvc0: recognise 0xdX chipsets as NV_C0" drm/radeon/kms: fix typo in cayman reg offset drm/radeon/kms: use correct reg on fusion when reading back mem config
2011-07-02PM / Runtime: Update documentation regarding driver removalRafael J. Wysocki1-5/+21
Commit e1866b33b1e89f077b7132daae3dfd9a594e9a1a (PM / Runtime: Rework runtime PM handling during driver removal) forgot to update the documentation in Documentation/power/runtime_pm.txt to match the new code in drivers/base/dd.c. Update that documentation to match the code it describes. Signed-off-by: Rafael J. Wysocki <[email protected]> Reviewed-by: Kevin Hilman <[email protected]>
2011-07-02PM: Documentation: fix typo: pm_runtime_idle_sync() doesn't exist.Kevin Hilman1-1/+1
Replace reference to pm_runtime_idle_sync() in the driver core with pm_runtime_put_sync() which is used in the code. Signed-off-by: Kevin Hilman <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
2011-07-01Merge branch 'drm-intel-fixes' of ↵Linus Torvalds7-109/+94
git://git.kernel.org/pub/scm/linux/kernel/git/keithp/linux-2.6 * 'drm-intel-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/keithp/linux-2.6: drm/i915: apply HWSTAM writes to Ivy Bridge as well drm/i915: move IRQ function table init to i915_irq.c drm/i915/overlay: Fix unpinning along init error paths drm/i915: Don't call describe_obj on NULL pointers drm/i915: Hold struct_mutex during i915_save_state/i915_restore_state
2011-07-01hwmon: (pmbus) Auto-detect temp2 and temp3 registers/attributesGuenter Roeck1-0/+4
Additional temperature attribute support is easy to detect, so do it. Signed-off-by: Guenter Roeck <[email protected]> Reviewed-by: Robert Coulson <[email protected]> Cc: stable.kernel.org # 2.6.39
2011-07-01hwmon: (pmbus) Improve fan detectionGuenter Roeck1-2/+4
Some PMBus devices return no error when reading fan speed registers, but don't really support fans. Strengthen fan detection by also checking if fan configuration registers exist. Signed-off-by: Guenter Roeck <[email protected]> Reviewed-by: Robert Coulson <[email protected]> Cc: stable.kernel.org # 2.6.39