Commit graph

183530 commits

Author SHA1 Message Date
Vijaya Mohan Guvva 4e1e0d8d71 [SCSI] bfa: Forward Error Correction status query
This patch includes changes to get FC HBA feature Forward Error
Correction (FEC) (enabled at 16Gig speed) status from firmware and to
return to brocade HBA management utility.

Signed-off-by: Vijaya Mohan Guvva <vmohan@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-06-26 11:42:21 -07:00
Vijaya Mohan Guvva bbe37a67d9 [SCSI] bfa: Support for FC BB credit recovery
This patch includes changes to  1) Enable/disable fc credit recovery on
Brocade FC adapter port operating at max supported speed. 2) Get credit
recovery status and stats related to credit loss and recovered credits

Signed-off-by: Vijaya Mohan Guvva <vmohan@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-06-26 11:40:12 -07:00
Sergei Shtylyov 32d3d793fb [SCSI] ipr: qc_fill_rtf() method should not store alternate status register
The 'ctl' field of  the 'struct ata_taskfile' is not really dual purpose, i.e.
it is not intended  for storing the alternate status register (which is mapped
at the same address in the legacy IDE controllers) in the qc_fill_rtf() method.
No other 'libata' driver except 'drivers/scsi/ipr.c' stores the alternate status
register's value in the 'ctl' field of 'qc->result_tf', hence this driver should
not do this as well...

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Acked-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-06-26 11:11:30 -07:00
James Smart 9246cc2bd4 [SCSI] lpfc 8.3.40: Update lpfc version to driver version 8.3.40
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-06-26 10:48:56 -07:00
James Smart 92c13f291e [SCSI] lpfc 8.3.40: Update Copyrights to 2013 for 8.3.38, 8.3.39, and 8.3.40 modifications
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-06-26 10:48:55 -07:00
James Smart c2b9712edd [SCSI] lpfc 8.3.40: Fixed a race condition between SLI host and port failed FCF rediscovery
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-06-26 10:48:54 -07:00
James Smart b230b8a298 [SCSI] lpfc 8.3.40: Fixed issue mailbox wait routine failed to issue dump memory mbox command
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-06-26 10:48:53 -07:00
James Smart 3be30e0e44 [SCSI] lpfc 8.3.40: Fixed system panic due to unsafe walking and deleting linked list
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-06-26 10:48:52 -07:00
James Smart df0d085fdd [SCSI] lpfc 8.3.40: Fixed FCoE connection list vlan identifier and add FCF list debug
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-06-26 10:48:51 -07:00
James Smart c4a7c922f5 [SCSI] lpfc 8.3.40: Clarified the behavior of the lpfc_max_luns module parameter
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-06-26 10:48:49 -07:00
James Smart 06f3555125 [SCSI] lpfc 8.3.40: Fix to allow OCM to report FEC status
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-06-26 10:48:48 -07:00
James Smart b069d7eb02 [SCSI] lpfc 8.3.40: Fixed a missing return code in a logging message
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-06-26 10:48:47 -07:00
James Smart 8e668af5c2 [SCSI] lpfc 8.3.40: Fixed some logging message fields
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-06-26 10:48:46 -07:00
James Smart 398d81c9ff [SCSI] lpfc 8.3.40: Fixed list corruption when lpfc_drain_tx runs.
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-06-26 10:48:45 -07:00
James Smart e85d8f9f62 [SCSI] lpfc 8.3.40: Fix starting reference tag when calculating BG error
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-06-26 10:48:44 -07:00
James Smart 91f32d01d9 [SCSI] lpfc 8.3.40: Fix inconsistent list removal causes crash.
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-06-26 10:48:43 -07:00
James Smart 61f35bff15 [SCSI] lpfc 8.3.40: Fixed system panic during handling unsolicited receive buffer error condition
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-06-26 10:48:42 -07:00
James Smart 9c6aa9d75f [SCSI] lpfc 8.3.40: Fix BlockGuard error checking
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-06-26 10:48:41 -07:00
James Smart 3bf41ba937 [SCSI] lpfc 8.3.40: Fixed crash during FCoE failover testing.
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-06-26 10:48:40 -07:00
James Smart b246de1743 [SCSI] lpfc 8.3.40: Fix lpfc_used_cpu to be more dynamic
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-06-26 10:48:39 -07:00
wenxiong@linux.vnet.ibm.com feccada972 [SCSI] ipr: possible irq lock inversion dependency detected
When enable lockdep, seeing "possible irq lock inversion dependency detected"
error. This patch fixes the issue.

Signed-off-by: Wen Xiong <wenxiong@linux.vnet.ibm.com>
Acked-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-06-26 10:48:38 -07:00
Karen Xie 3bd3e8bf62 [SCSI] cxgb4i: add support for T5 adapter
Signed-off-by: Karen Xie <kxie@chelsio.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-06-26 10:48:24 -07:00
Ben Hutchings 2ee3e26c67 [SCSI] sd: Fix parsing of 'temporary ' cache mode prefix
Commit 39c60a0948 '[SCSI] sd: fix array cache flushing bug causing
performance problems' added temp as a pointer to "temporary " and used
sizeof(temp) - 1 as its length.  But sizeof(temp) is the size of the
pointer, not the size of the string constant.  Change temp to a static
array so that sizeof() does what was intended.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Cc: stable@vger.kernel.org
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-06-26 08:44:33 -07:00
Jakob Normark c6e23d83c3 [SCSI] bfa: Fixes for 0-terminated strncpy and possible null pointer dereference
This patch fixes two cppcheck errors in drivers/scsi/bfa/bfad_im.c

[jejb: correct strlcpy fix]
Signed-off-by: Jakob Normark <jakobnormark@gmail.com>
Acked-by: Vijay Mohan Guvva <vmohan@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-06-26 07:59:37 -07:00
Sumit.Saxena@lsi.com 7525be545c [SCSI] megaraid_sas: Changelog and driver version update
Signed-off-by: Sumit Saxena <sumit.saxena@lsi.com>
Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-06-24 17:52:10 -07:00
Sumit.Saxena@lsi.com 404a8a1a89 [SCSI] megaraid_sas: Add support to differentiate between iMR vs MR Firmware
Add support to differentiate between iMR(no external memory) and MR(with
external memory) controllers.

Signed-off-by: Sumit Saxena <sumit.saxena@lsi.com>
Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-06-24 17:51:05 -07:00
Sumit.Saxena@lsi.com bc93d425fc [SCSI] megaraid_sas: Add support for Uneven Span PRL11
MegaRAID older Firmware does not support uneven span configuration for PRL11.
E.g User wants to create 34 Driver PRL11 config, it was not possible using old
firmware, since it was not supported configuration in old firmware

Old Firmware expect even number of Drives in each span and same number of
physical drives at each span.  Considering above design, 17 Drives at Span-0
and 17 drives at span-1 was not possible.

Now, using this new feature Firmware and Driver both required changes.  New
Firmware can allow user to create 16 Drives at span-0 and 18 Drives at
span-1. This will allow user to create 34 Drives Uneven span PRL11.

RAID map is interface between Driver and FW to fetch all required
fields(attributes) for each Virtual Drives.  Since legacy RAID map consider
Even Span design, there was no place to keep Uneven span information in
existing Raid map.  Because of this limitation, for Uneven span VD, driver can
not use RAID map.

This patch address the changes required in Driver to support Uneven span PRL11
support.

1. Driver will find if Firmware has UnevenSpanSupport or not by reading
   Controller Info.
2. If Firmware has UnvenSpan PRL11 support, then Driver will inform about its
   capability of handling UnevenSpan PRL11 to the firmware.
3. Driver will update its copy of span info on each time Raid map update is
   called.
4. Follow different IO path if it is Uneven Span. (For Uneven Span, Driver
   uses Span Set info to find relavent fields for that particular Virtual
   Disk)

More verbose prints will be available by setting "SPAN_DEBUG" to 1 at
compilation time.

Signed-off-by: Sumit Saxena <sumit.saxena@lsi.com>
Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-06-24 17:48:12 -07:00
Sumit.Saxena@lsi.com d46a3ad679 [SCSI] megaraid_sas: Add support for Extended MSI-x vectors for 12Gb/s controller
This Driver will use more than 8 MSI-x support provided by Invader/Fury max
upto 128 MSI-x.

[jejb: fix checkpatch warning]
Signed-off-by: Sumit Saxena <sumit.saxena@lsi.com>
Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-06-24 17:46:31 -07:00
Sumit.Saxena@lsi.com 5d0d908d44 [SCSI] megaraid_sas: Set IoFlags to enable Fast Path for JBODs for 12 Gb/s controllers
Signed-off-by: Sumit Saxena <sumit.saxena@lsi.com>
Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-06-24 17:43:58 -07:00
Sumit.Saxena@lsi.com 39b72c3c74 [SCSI] megaraid_sas: Add support to display Customer branding details in syslog
Signed-off-by: Sumit Saxena <sumit.saxena@lsi.com>
Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-06-24 17:42:26 -07:00
Sumit.Saxena@lsi.com 21d3c7105b [SCSI] megaraid_sas: Add support for MegaRAID Fury (device ID-0x005f) 12Gb/s controllers
Signed-off-by: Sumit Saxena <sumit.saxena@lsi.com>
Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-06-24 17:40:53 -07:00
Sumit.Saxena@lsi.com 32d8745c88 [SCSI] megaraid_sas: Set IO request timeout value provided by OS timeout for Tape devices
Signed-off-by: Sumit Saxena <sumit.saxena@lsi.com>
Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-06-24 17:34:38 -07:00
Sumit.Saxena@lsi.com 105900d56e [SCSI] megaraid_sas: Free event detail memory without device ID check
Free event detail memory from more common place, instead of doing it for
limited device types.

Signed-off-by: Sumit Saxena <sumit.saxena@lsi.com>
Signed-off-by: Adam Radford <aradford@gmail.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-06-24 17:24:22 -07:00
Sumit.Saxena@lsi.com 70b47b881e [SCSI] megaraid_sas: Update balance count in driver to be in sync of firmware
Signed-off-by: Sumit Saxena <sumit.saxena@lsi.com>
Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-06-24 17:22:18 -07:00
Sumit.Saxena@lsi.com b5bccadd80 [SCSI] megaraid_sas: Fix the interrupt mask for Gen2 controller
Signed-off-by: Sumit Saxena <sumit.saxena@lsi.com>
Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-06-24 17:19:44 -07:00
Sumit.Saxena@lsi.com b09e66da3f [SCSI] megaraid_sas: Return DID_ERROR for SCSI IO, when controller is in critical h/w error
Do not return SCSI_MLQUEUE_HOST_BUSY, but send DID_ERROR to SCSI mid-layer, if
adapter is in critical error state.  "SCSI_MLQUEUE_HOST_BUSY" will keep same
SCSI command in loop and it is not a right return value, if controller is
hardware critical error.

Signed-off-by: Sumit Saxena <sumit.saxena@lsi.com>
Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-06-24 16:55:17 -07:00
Martin K. Petersen 28ce280fe4 [SCSI] 3w-xxxx: Create sense buffer for unsupported commands
Make the driver return appropriate sense data when an unsupported
operation is queued. This will cause the SCSI layer to stop issuing the
offending command.

Reported-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Acked-by: Adam Radford <aradford@gmail.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-06-24 16:32:22 -07:00
Martin K. Petersen 56f2a8016e [SCSI] Workaround for disks that report bad optimal transfer length
Not all disks fill out the VPD pages correctly. Add a blacklist flag
that allows us ignore the SBC-3 VPD pages for a given device. The
BLIST_SKIP_VPD_PAGES flag triggers our existing skip_vpd_pages
scsi_device parameter to bypass VPD scanning.

Also blacklist the offending Seagate drive model.

Reported-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-06-24 13:00:10 -07:00
Reddy, Sreekanth c3a634bf78 [SCSI] mpt2sas: fix for unused variable 'event_data' warning
If CONFIG_SCSI_MPT2SAS_LOGGING is undefined, then these warnings are emitted

drivers/scsi/mpt2sas/mpt2sas_scsih.c: In function '_scsih_sas_broadcast_primitive_event'
drivers/scsi/mpt2sas/mpt2sas_scsih.c:5810:40: warning: unused variable 'event_data'

Use pr_info() function instead of dewtprintk().

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-06-24 12:55:34 -07:00
Sreekanth Reddy 627d1a1957 [SCSI] mpt2sas: Bump driver vesion to v15.100.00.00
Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-06-24 12:54:23 -07:00
Sreekanth Reddy 148124d931 [SCSI] mpt2sas: Calulate the Reply post queue depth calculation as per the MPI spec
[jejb: checkpatch fixes]
Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-06-24 12:52:47 -07:00
Sreekanth Reddy 48ba2efc38 [SCSI] mpt2sas: fix firmware failure with wrong task attribute
When SCSI command is received with task attribute not set, set it to SIMPLE.
Previously it is set to untagged. This causes the firmware to fail the commands.

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@lsi.com>
Cc: stable@vger.kernel.org
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-06-24 12:49:56 -07:00
Sreekanth Reddy 6241f22ca1 [SCSI] mpt2sas: Fix for device scan following host reset could get stuck in a infinite loop
Modified device scan routine so each configuration page read breaks from the
while loop when the ioc_status is not equal to MPI2_IOCSTATUS_SUCCESS.

[jejb: checkpatch fixes]
Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@lsi.com>
Cc: stable@vger.kernel.org
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-06-24 12:47:27 -07:00
Sreekanth Reddy ca6832e91b [SCSI] mpt2sas: Update the timing requirements for issuing a Hard Reset
Updated the mpt2sas driver code that issues hard reset to comply with the
timing requirements mentioned in MPI specifications rev V.

[jejb: checpatch fixes]
Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-06-24 12:43:15 -07:00
Sreekanth Reddy 10ec24e4ce [SCSI] mpt2sas: MPI2 Rev W (2.00.15) specification
Change set in MPI 2.0 Rev W(2.00.15) specification and 2.00.27 header files

1. Added a bit to the IOCExceptions field of the IOCFacts Reply to indicate
   that the IOC detected a partial memory failure.
2. Added ElapsedSeconds field to RAID Volume Indicator Structure. Added
   Elapsed Seconds Valid flag to Flags field of this structure.
3. Added ElapsedSeconds field to Integrated RAID Operations Status Event Data.
4. In the IOCSettings field of BIOS Page 1, modified the Adapter Support bits
   description to specify X86 BIOS.
5. Toolbox Diagnostic CLI Tool Request may now use chain elements in the SGL.

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-06-24 12:40:02 -07:00
Reddy, Sreekanth b0df96a006 [SCSI] mpt2sas: Fix for issue Missing delay not getting set during system bootup
Missing delay is not getting set properly. The reason is that it is not
defined in the same file from where it is being invoked.  The fix is to move
the missing delay module parameter from mpt2sas_base.c to mpt2sas_scsh.c.

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@lsi.com>
Cc: stable@vger.kernel.org
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-06-24 12:35:34 -07:00
Naresh Kumar Inna 49c1241384 [SCSI] csiostor: Retain default adapter configuration in absence of config file.
- Retain firmware defined configuration settings in the absence of
user-provided configuration by eliminating the global RSS and the
PF/VF capabilities mailbox commands.
- Remove S_IRUGO from sysfs parameters that don't have 'show'
functionality.

Signed-off-by: Naresh Kumar Inna <naresh@chelsio.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-06-04 11:16:28 -07:00
Vijay Mohan Guvva 07cdc0464f [SCSI] bfa: fix for FC Direct Attach LUN discovery failure
Resending the patch as it didn't make the linux-scsi list.

This patch fixes fcs rport state machine to address ocassional Brocade
FC Direct Attach LUN discovery failure due to not sending PLOGI accept
to the target.

Signed-off-by: Vijaya Mohan Guvva <vmohan@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-06-04 11:16:27 -07:00
Vijay Mohan Guvva 111ecbe426 [SCSI] bfa: fix faulty handling of events in lps sm
When a switch disable/enable or a reboot is done, the HBA port gets an
offline and a subsequent online notification. When the port comes up a
link up notification is sent to bfa from the firmware. The bfa then send
an FLOGI to the firmware which is sent out on the wire.
The switch port meanwhile goes offline (presumably for diagnostics)
which causes the switch not to respond to the FLOGI.
The link down notification is sent to the HBA driver. However owing to a
bug in the lps state machine handling the lps state machine does not
move to sm_init state (it remains in sm_login state and send a login
complete message to fcs). This results in a zero PID assignment as the
login is not really complete.

This fix is to correctly handle the events in lps state machine.

Signed-off-by: Vijaya Mohan Guvva <vmohan@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-06-04 11:16:25 -07:00
Martin K. Petersen 0816c9251a [SCSI] Allow error handling timeout to be specified
Introduce eh_timeout which can be used for error handling purposes. This
was previously hardcoded to 10 seconds in the SCSI error handling
code. However, for some fast-fail scenarios it is necessary to be able
to tune this as it can take several iterations (bus device, target, bus,
controller) before we give up.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2013-06-04 11:16:24 -07:00