aboutsummaryrefslogtreecommitdiff
path: root/drivers/scsi
AgeCommit message (Collapse)AuthorFilesLines
2012-05-17isci: fix oem parameter validation on single controller skusDan Williams1-1/+1
OEM parameters [1] are parsed from the platform option-rom / efi driver. By default the driver was validating the parameters for the dual-controller case, but in single-controller case only the first set of parameters may be valid. Limit the validation to the number of actual controllers detected otherwise the driver may fail to parse the valid parameters leading to driver-load or runtime failures. [1] the platform specific set of phy address, configuration,and analog tuning values [stable v3.0+] Cc: <[email protected]> Reported-by: Dave Jiang <[email protected]> Tested-by: Dave Jiang <[email protected]> Signed-off-by: Dan Williams <[email protected]>
2012-05-17isci: enable BCN in sci_port_add_phy()Maciej Trela1-0/+2
Ensure we enable receiving BCN's from the hardware when adding phy to isci_port. Otherwise if we get BCN before the port is created we won't see any BCN Signed-off-by: Maciej Trela <[email protected]> Reported-by: Richard Boyd <[email protected]> Signed-off-by: Dan Williams <[email protected]>
2012-05-17isci: Changes in COMSAS timings enabling ISCI to detect buggy disc drives.Andrzej Jakowski2-0/+63
This patch extends timings in COMSAS signaling, so ISCI can detect disc drives having issues to send COMSAS in correct time frame. Signed-off-by: Andrzej Jakowski <[email protected]> Signed-off-by: Dan Williams <[email protected]>
2012-05-17isci: kill isci_host.shostDan Williams2-10/+12
We can retrieve the shost from the sas_ha like the rest of libsas and drop this out of our local data structure. Acked-by: Jacek Danecki <[email protected]> Signed-off-by: Dan Williams <[email protected]>
2012-05-17isci: fix interrupt disableDan Williams2-13/+27
There is a (dubious?) lost irq workaround in sci_controller_isr() that effectively nullifies attempts to disable interrupts. Until the workaround can be re-evaluated add some infrastructure to prevent the interrupt handler from inadvertantly re-enabling interrupts. The failure mode was interrupts continuing to run after the driver had been removed and its iomappings torn down. Reported-by: Jacek Danecki <[email protected]> Tested-by: Jacek Danecki <[email protected]> [richard: clear remaining interrupts at the end of reset] Acked-by: Richard Boyd <[email protected]> Signed-off-by: Dan Williams <[email protected]>
2012-05-17isci: fix 'link-up' events occur after 'start-complete'Dan Williams3-38/+50
The call to wait_for_start() is meant to ensure that all links have been given a chance to come up before letting the kernel proceed with probing. However, the implementation is not correctly syncing with the port configuration agent. In the MPC case the ports are hard-coded, in the APC case we need to wait for the port-configuration to form ports from the started phys. Towards that end increase the timeout for the APC agent to form ports, and delay start complete until all phys are out of link-training. Cc: <[email protected]> Cc: Richard Boyd <[email protected]> Signed-off-by: Dan Williams <[email protected]>
2012-05-17isci: fix controller stopDan Williams2-52/+55
1/ notify waiters when controller stop completes (fixes 10 second stall unloading the driver) 2/ make sure phy stop is after port and device stop Cc: Richard Boyd <[email protected]> Signed-off-by: Dan Williams <[email protected]>
2012-05-17isci: refactor initialization for S3/S4Dan Williams8-360/+277
Based on an original implementation by Ed Nadolski and Artur Wojcik In preparation for S3/S4 support refactor initialization so that driver-load and resume-from-suspend can share the common init path of isci_host_init(). Organize the initialization into objects that are self-contained to the driver (initialized by isci_host_init) versus those that have some upward registration (initialized at allocation time asd_sas_phy, asd_sas_port, dma allocations). The largest change is moving the the validation of the oem and module parameters from isci_host_init() to isci_host_alloc(). The S3/S4 approach being taken is that libsas will be tasked with remembering the state of the domain and the lldd is free to be forgetful. In the case of isci we'll just re-init using a subset of the normal driver load path. [clean up some unused / mis-indented function definitions in host.h] Signed-off-by: Ed Nadolski <[email protected]> Signed-off-by: Artur Wojcik <[email protected]> Signed-off-by: Dan Williams <[email protected]>
2012-05-17isci: kill isci_port.domain_dev_listDan Williams3-15/+6
Another unused field, and isci_port_init is overkill. Signed-off-by: Dan Williams <[email protected]>
2012-05-17isci: kill ->status, and ->state_lock in isci_hostDan Williams2-34/+0
They serve no incremental purpose over the existing sas_ha state. Signed-off-by: Dan Williams <[email protected]>
2012-05-17isci: Don't filter BROADCAST CHANGE primitivesTom Jackson1-0/+7
Per the SAS spec, several types of BROADCAST CHANGE primitives must cause re-discovery of the originating expander. Only the standard BROADCAST CHANGE primitive was being sent to the LIBSAS layer. The other BC primitives have been added to the sci_phy_event_handler() Signed-off-by: Tom Jackson <[email protected]> Signed-off-by: Dan Williams <[email protected]>
2012-05-17isci: kill sci_phy_protocol and sci_request_protocolDan Williams6-37/+21
Holdovers from the initial driver cleanup, replace with enum sas_protocol. Signed-off-by: Dan Williams <[email protected]>
2012-05-17isci: kill ->is_direct_attachedDan Williams5-49/+17
domain_device ->parent conveys the same information. Occurrences of ->is_direct_attached appear next to incomplete open-coded versions of dev_is_sata(), clean those up as well. Signed-off-by: Dan Williams <[email protected]>
2012-05-17isci: improve 'invalid state' warningsDan Williams2-30/+36
Convert controller state machine warnings to emit the state number (it missed the number to string conversion, but since these error rarely happen not much motivation to go further). Fix up the rnc warnings to use the state name. Signed-off-by: Dan Williams <[email protected]>
2012-05-17[SCSI] lpfc 8.3.31: Update lpfc to version 8.3.31James Smart1-1/+1
Signed-off-by: Alex Iannicelli <[email protected]> Signed-off-by: James Smart <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2012-05-17[SCSI] lpfc 8.3.31: Fixed system crash due to not providing SCSI ↵James Smart2-4/+44
error-handling host reset handler Signed-off-by: Alex Iannicelli <[email protected]> Signed-off-by: James Smart <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2012-05-17[SCSI] lpfc 8.3.31: Fix bug with driver using the wrong xritag when sending ↵James Smart2-1/+8
an els echo Signed-off-by: Alex Iannicelli <[email protected]> Signed-off-by: James Smart <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2012-05-17[SCSI] lpfc 8.3.31: Debug helper utility routines for dumping various SLI4 ↵James Smart3-0/+467
queues Signed-off-by: Alex Iannicelli <[email protected]> Signed-off-by: James Smart <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2012-05-17[SCSI] lpfc 8.3.31: Fix unsol abts xri lookupJames Smart3-14/+25
Signed-off-by: Alex Iannicelli <[email protected]> Signed-off-by: James Smart <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2012-05-17[SCSI] lpfc 8.3.31: Correct point-to-point mode discovery errors on LPe16xxxJames Smart7-31/+175
Signed-off-by: Alex Iannicelli <[email protected]> Signed-off-by: James Smart <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2012-05-17[SCSI] lpfc 8.3.31: Reregister VPI for SLI3 after cable moved to new Saturn portJames Smart1-5/+8
Signed-off-by: Alex Iannicelli <[email protected]> Signed-off-by: James Smart <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2012-05-17[SCSI] lpfc 8.3.31: Fix driver crash during back-to-back ramp eventsJames Smart1-0/+8
Signed-off-by: Alex Iannicelli <[email protected]> Signed-off-by: James Smart <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2012-05-17[SCSI] lpfc 8.3.31: Fix log message for Mailbox command when no error is ↵James Smart1-8/+17
detected Signed-off-by: Alex Iannicelli <[email protected]> Signed-off-by: James Smart <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2012-05-17[SCSI] lpfc 8.3.31: Revise FCP LOG for easier Finisar trace correlationJames Smart1-1/+6
Signed-off-by: Alex Iannicelli <[email protected]> Signed-off-by: James Smart <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2012-05-17[SCSI] lpfc 8.3.31: Fix build warnings when debugfs is not definedJames Smart1-0/+8
Signed-off-by: Alex Iannicelli <[email protected]> Signed-off-by: James Smart <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2012-05-17[SCSI] lpfc 8.3.31: Fix kernel panic when going into to sleep stateJames Smart1-0/+1
Signed-off-by: Alex Iannicelli <[email protected]> Signed-off-by: James Smart <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2012-05-17[SCSI] lpfc 8.3.31: Fix error message displayed even when not an errorJames Smart1-10/+8
Signed-off-by: Alex Iannicelli <[email protected]> Signed-off-by: James Smart <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2012-05-17[SCSI] lpfc 8.3.31: Fix Read Link status dataJames Smart1-3/+4
Signed-off-by: Alex Iannicelli <[email protected]> Signed-off-by: James Smart <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2012-05-17[SCSI] lpfc 8.3.31: Fixed system panic due to midlayer abort and driver ↵James Smart5-21/+54
complete race on SCSI cmd Signed-off-by: Alex Iannicelli <[email protected]> Signed-off-by: James Smart <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2012-05-17[SCSI] lpfc 8.3.31: Fix unable to create vports on FCoE SLI4 adapterJames Smart1-1/+1
Signed-off-by: Alex Iannicelli <[email protected]> Signed-off-by: James Smart <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2012-05-17[SCSI] lpfc 8.3.31: Fix initiator sending flogi after acking flogi from targetJames Smart2-4/+26
Signed-off-by: Alex Iannicelli <[email protected]> Signed-off-by: James Smart <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2012-05-17[SCSI] lpfc 8.3.31: Fix bug with driver not supporting the get controller ↵James Smart2-2/+4
attributes command Signed-off-by: Alex Iannicelli <[email protected]> Signed-off-by: James Smart <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2012-05-17[SCSI] lpfc 8.3.31: Correct handling of SLI4-port XRI resource-provisioning ↵James Smart6-702/+594
profile change Signed-off-by: Alex Iannicelli <[email protected]> Signed-off-by: James Smart <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2012-05-17[SCSI] lpfc 8.3.31: Fix bug with driver unload leaving a scsi host for a ↵James Smart1-2/+8
vport around Signed-off-by: Alex Iannicelli <[email protected]> Signed-off-by: James Smart <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2012-05-17[SCSI] sg: constify sg_proc_leaf_arrJörn Engel1-2/+2
Signed-off-by: Joern Engel <[email protected]> Acked-by: Douglas Gilbert <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2012-05-17[SCSI] sg: remove sg_mutexJörn Engel1-17/+2
With the exception of the detached field, sg_mutex no longer adds any locking. detached handling has been broken before and is still broken and this patch does not seem to make things worse than they were to begin with. However, I have observed cases of tasks being blocked for >200s waiting for sg_mutex. So the removal clearly adds value for very little cost. Signed-off-by: Joern Engel <[email protected]> Acked-by: Douglas Gilbert <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2012-05-17[SCSI] sg: completely protect sfdsJörn Engel1-3/+16
sfds is protected by sg_index_lock - except for sg_open(), where it isn't. Change that and add some documentation. Signed-off-by: Joern Engel <[email protected]> Acked-by: Douglas Gilbert <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2012-05-17[SCSI] sg: protect sdp->excludeJörn Engel1-7/+30
Changes since v1: set_exclude now returns the new value, which gets rid of the comma expression and the operator precedence bug. Thanks to Douglas for spotting it. sdp->exclude was previously protected by the BKL. The sg_mutex, which replaced the BKL, only semi-protected it, as it was missing from sg_release() and sg_proc_seq_show_debug(). Take an explicit spinlock for it. Signed-off-by: Joern Engel <[email protected]> Acked-by: Douglas Gilbert <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2012-05-17[SCSI] sg: prevent unwoken sleepJörn Engel1-2/+14
srp->done is protected by sfp->rq_list_lock everywhere, except for this one case. Result can be that the wake-up happens before the cacheline with the changed srp->done has arrived, so the waiter can go back to sleep and never be woken up again. The wait_event_interruptible() means that anyone trying to debug this unlikely race will likely notice everything working fine again, as the next signal will unwedge things. Evil. Signed-off-by: Joern Engel <[email protected]> Acked-by: Douglas Gilbert <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2012-05-17[SCSI] sg: remove closed flagJörn Engel1-7/+7
After sg_release() has been called, noone should be able to actually use that filedescriptor anymore. So if closed ever made a difference in the past five years or so, it would have meant a bug. Remove it. Signed-off-by: Joern Engel <[email protected]> Acked-by: Douglas Gilbert <[email protected]> [jejb: fix up checkpatch warnings] Signed-off-by: James Bottomley <[email protected]>
2012-05-17[SCSI] sg: use wait_event_interruptible()Jörn Engel1-12/+7
Afaics the use of __wait_event_interruptible() as opposed to wait_event_interruptible() is purely historic. So let's follow the rest of the kernel and check the condition before prepare_to_wait() - and also make the code a bit nicer. Signed-off-by: Joern Engel <[email protected]> Acked-by: Douglas Gilbert <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2012-05-17[SCSI] sg: remove while (1) non-loopJörn Engel1-30/+22
The while (1) construct isn't actually a loop at all. So let's not pretent and obfuscate the code. Signed-off-by: Joern Engel <[email protected]> Acked-by: Douglas Gilbert <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2012-05-17[SCSI] sg: remove unnecessary indentationJörn Engel1-29/+24
blocking is de-facto a constant and the now-removed comment wasn't all that useful either. Without them and the resulting indentation the code is a bit nicer to read. Signed-off-by: Joern Engel <[email protected]> Acked-by: Douglas Gilbert <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2012-05-17[SCSI] sd: limit the scope of the async probe domainDan Williams5-6/+19
sd injects and synchronizes probe work on the global kernel-wide domain. This runs into conflict with PM that wants to perform resume actions in async context: [ 494.237079] INFO: task kworker/u:3:554 blocked for more than 120 seconds. [ 494.294396] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 494.360809] kworker/u:3 D 0000000000000000 0 554 2 0x00000000 [ 494.420739] ffff88012e4d3af0 0000000000000046 ffff88013200c160 ffff88012e4d3fd8 [ 494.484392] ffff88012e4d3fd8 0000000000012500 ffff8801394ea0b0 ffff88013200c160 [ 494.548038] ffff88012e4d3ae0 00000000000001e3 ffffffff81a249e0 ffff8801321c5398 [ 494.611685] Call Trace: [ 494.632649] [<ffffffff8149dd25>] schedule+0x5a/0x5c [ 494.674687] [<ffffffff8104b968>] async_synchronize_cookie_domain+0xb6/0x112 [ 494.734177] [<ffffffff810461ff>] ? __init_waitqueue_head+0x50/0x50 [ 494.787134] [<ffffffff8131a224>] ? scsi_remove_target+0x48/0x48 [ 494.837900] [<ffffffff8104b9d9>] async_synchronize_cookie+0x15/0x17 [ 494.891567] [<ffffffff8104ba49>] async_synchronize_full+0x54/0x70 <-- here we wait for async contexts to complete [ 494.943783] [<ffffffff8104b9f5>] ? async_synchronize_full_domain+0x1a/0x1a [ 495.002547] [<ffffffffa00114b1>] sd_remove+0x2c/0xa2 [sd_mod] [ 495.051861] [<ffffffff812fe94f>] __device_release_driver+0x86/0xcf [ 495.104807] [<ffffffff812fe9bd>] device_release_driver+0x25/0x32 <-- here we take device_lock() [ 853.511341] INFO: task kworker/u:4:549 blocked for more than 120 seconds. [ 853.568693] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 853.635119] kworker/u:4 D ffff88013097b5d0 0 549 2 0x00000000 [ 853.695129] ffff880132773c40 0000000000000046 ffff880130790000 ffff880132773fd8 [ 853.758990] ffff880132773fd8 0000000000012500 ffff88013288a0b0 ffff880130790000 [ 853.822796] 0000000000000246 0000000000000040 ffff88013097b5c8 ffff880130790000 [ 853.886633] Call Trace: [ 853.907631] [<ffffffff8149dd25>] schedule+0x5a/0x5c [ 853.949670] [<ffffffff8149cc44>] __mutex_lock_common+0x220/0x351 [ 854.001225] [<ffffffff81304bd7>] ? device_resume+0x58/0x1c4 [ 854.049082] [<ffffffff81304bd7>] ? device_resume+0x58/0x1c4 [ 854.097011] [<ffffffff8149ce48>] mutex_lock_nested+0x2f/0x36 <-- here we wait for device_lock() [ 854.145591] [<ffffffff81304bd7>] device_resume+0x58/0x1c4 [ 854.192066] [<ffffffff81304d61>] async_resume+0x1e/0x45 [ 854.237019] [<ffffffff8104bc93>] async_run_entry_fn+0xc6/0x173 <-- ...while running in async context Provide a 'scsi_sd_probe_domain' so that async probe actions actions can be flushed without regard for the state of PM, and allow for the resume path to handle devices that have transitioned from SDEV_QUIESCE to SDEV_DEL prior to resume. Acked-by: Alan Stern <[email protected]> [alan: uplevel scsi_sd_probe_domain, clarify scsi_device_resume] Signed-off-by: Dan Williams <[email protected]> [jejb: remove unneeded config guards in include file] Signed-off-by: James Bottomley <[email protected]>
2012-05-16Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller9-18/+57
2012-05-10[SCSI] hpsa: dial down lockup detection during firmware flashStephen M. Cameron3-5/+37
Dial back the aggressiveness of the controller lockup detection thread. Currently it will declare the controller to be locked up if it goes for 10 seconds with no interrupts and no change in the heartbeat register. Dial back this to 30 seconds with no heartbeat change, and also snoop the ioctl path and if a firmware flash command is detected, dial it back further to 4 minutes until the firmware flash command completes. The reason for this is that during the firmware flash operation, the controller apparently doesn't update the heartbeat register as frequently as it is supposed to, and we can get a false positive. Signed-off-by: Stephen M. Cameron <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2012-05-10[SCSI] hpsa: removed unused member maxQsinceinitStephen M. Cameron1-1/+0
Signed-off-by: Stephen M. Cameron <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2012-05-10[SCSI] hpsa: add new RAID level "1(ADM)"Mike Miller1-1/+1
Signed-off-by: Mike Miller <[email protected]> Signed-off-by: Stephen M. Cameron <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2012-05-10[SCSI] hpsa: factor out hpsa_free_irqs_and_disable_msixStephen M. Cameron1-12/+14
Signed-off-by: Stephen M. Cameron <[email protected]> Signed-off-by: James Bottomley <[email protected]>
2012-05-10[SCSI] hpsa: refine interrupt handler locking for greater concurrencyMatt Gates2-26/+48
Use spinlocks with finer granularity in the submission and completion paths to allow concurrent execution for multiple reply queues. In particular, do not hold a spin lock while submitting a request to the device, nor during most of the interrupt handler. Signed-off-by: Matt Gates <[email protected]> Signed-off-by: Stephen M. Cameron <[email protected]> Signed-off-by: James Bottomley <[email protected]>