pandora-kernel.git
10 years ago[SCSI] ufs: amend interrupt configuration
Seungwon Jeon [Wed, 26 Jun 2013 17:09:27 +0000 (22:39 +0530)]
[SCSI] ufs: amend interrupt configuration

It makes interrupt setting more flexible especially
for disabling. And wrong bit mask is fixed for ver 1.0.
[17:16] is added for mask.

Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>
Tested-by: Maya Erez <merez@codeaurora.org>
Signed-off-by: Santosh Y <santoshsy@gmail.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] ufs: wrap the i/o access operations
Seungwon Jeon [Wed, 26 Jun 2013 17:09:26 +0000 (22:39 +0530)]
[SCSI] ufs: wrap the i/o access operations

Simplify operations with hiding mmio_base.

Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>
Tested-by: Maya Erez <merez@codeaurora.org>
Signed-off-by: Santosh Y <santoshsy@gmail.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] storvsc: Update the storage protocol to win8 level
K. Y. Srinivasan [Tue, 4 Jun 2013 19:05:06 +0000 (12:05 -0700)]
[SCSI] storvsc: Update the storage protocol to win8 level

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] storvsc: Increase the value of scsi timeout for storvsc devices
K. Y. Srinivasan [Tue, 4 Jun 2013 19:05:05 +0000 (12:05 -0700)]
[SCSI] storvsc: Increase the value of scsi timeout for storvsc devices

The standard scsi timeout is not appropriate in some of the environments where
Hyper-V is deployed. Set this timeout appropriately for all devices managed
by this driver.

On cloud environments where storage latencies may be unbounded, having the
scsi layer initiating recovery can be problematic since (a) the host is
already implementing a variety of recovery strategies and (b) implementing a
recovery strategy at the VM level may be more appropriate in cases where
storage latencies exceed a certain threshold.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] MAINTAINERS: Add myself as the maintainer for BusLogic SCSI driver
Khalid Aziz [Tue, 25 Jun 2013 15:57:27 +0000 (09:57 -0600)]
[SCSI] MAINTAINERS: Add myself as the maintainer for BusLogic SCSI driver

I ported BusLogic driver to 64-bit. There is no current maintainer for
this driver and since I made significant changes to the driver for
64-bit porting work, I will continue to maintain it.

Signed-off-by: Khalid Aziz <khalid@gonehiking.org>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] BusLogic: Port driver to 64-bit.
Khalid Aziz [Fri, 17 May 2013 01:44:14 +0000 (19:44 -0600)]
[SCSI] BusLogic: Port driver to 64-bit.

[jejb: fix up pointer to int cast warning]
Signed-off-by: Khalid Aziz <khalid.aziz@oracle.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] BusLogic: Fix style issues
Khalid Aziz [Fri, 17 May 2013 01:44:13 +0000 (19:44 -0600)]
[SCSI] BusLogic: Fix style issues

Fix CamelCase and extra long lines in the buslogic driver.

Signed-off-by: Khalid Aziz <khalid.aziz@oracle.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] libiscsi: Added new boot entries in the session sysfs
Eddie Wai [Thu, 20 Jun 2013 17:21:26 +0000 (10:21 -0700)]
[SCSI] libiscsi: Added new boot entries in the session sysfs

This is the kernel part of the modification to extract the net params
from the ibft sysfs to the iface struct used for the connection
request upon sync_session in the open-iscsi util.

Three new session sysfs params are defined:
boot_root - holds the name of the /sys/firmware/ibft or iscsi_rootN
boot_nic  - holds the ethernetN name
boot_target - holds the targetN name

Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] aacraid: Fix for arrays are going offline in the system. System hangs
Mahesh Rajashekhara [Tue, 18 Jun 2013 11:32:07 +0000 (17:02 +0530)]
[SCSI] aacraid: Fix for arrays are going offline in the system. System hangs

One of the customer had reported that the set of raid logical arrays will
become unavailable (I/O offline) after a long hours of IO stress test.  The OS
wouldn`t be accessible afterwards and require a hard reset.

This driver patch has a fix for race condition between the doorbell and the
circular buffer. The driver is modified to do an extra read after clearing the
doorbell in case there had been a completion posted during the small timing
window.

With this fix, we ran IO stress for ~13 days. There were no IO failures.

Signed-off-by: Mahesh Rajashekhara <Mahesh.Rajashekhara@pmcs.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] ipr: IOA Status Code(IOASC) update
wenxiong@linux.vnet.ibm.com [Tue, 4 Jun 2013 23:57:35 +0000 (18:57 -0500)]
[SCSI] ipr: IOA Status Code(IOASC) update

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>
10 years ago[SCSI] sd: Update WRITE SAME heuristics
Martin K. Petersen [Fri, 7 Jun 2013 02:15:55 +0000 (22:15 -0400)]
[SCSI] sd: Update WRITE SAME heuristics

SATA drives located behind a SAS controller would incorrectly receive
WRITE SAME commands. Tweak the heuristics so that:

 - If REPORT SUPPORTED OPERATION CODES is provided we will use that to
   choose between WRITE SAME(16), WRITE SAME(10) and disabled. This also
   fixes an issue with the old code which would issue WRITE SAME(10)
   despite the command not being whitelisted in REPORT SUPPORTED
   OPERATION CODES.

 - If REPORT SUPPORTED OPERATION CODES is not provided we will fall back
   to WRITE SAME(10) unless the device has an ATA Information VPD page.
   The assumption is that a SATL which is smart enough to implement
   WRITE SAME would also provide REPORT SUPPORTED OPERATION CODES.

To facilitate the new heuristics scsi_report_opcode() has been modified
to so we can distinguish between "operation not supported" and "RSOC not
supported".

Reported-by: H. Peter Anvin <hpa@zytor.com>
Tested-by: Bernd Schubert <bernd.schubert@itwm.fraunhofer.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] fnic: potential dead lock in fnic_is_abts_pending()
Dan Carpenter [Thu, 30 May 2013 07:50:46 +0000 (10:50 +0300)]
[SCSI] fnic: potential dead lock in fnic_is_abts_pending()

There is an unlock missing if the == FNIC_IOREQ_ABTS_PENDING is
false.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Hiral Patel <hiralpat@cisco.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] bfa: Update the driver version to 3.2.21.1
Vijaya Mohan Guvva [Mon, 13 May 2013 09:33:35 +0000 (02:33 -0700)]
[SCSI] bfa: Update the driver version to 3.2.21.1

Update bfa driver version to 3.2.21.1
Update bfa to use firmware image versions 3.2.1.0

Signed-off-by: Vijaya Mohan Guvva <vmohan@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] bfa: dis-associate bfa path_tov with dev_loss_tmo
Vijaya Mohan Guvva [Mon, 13 May 2013 09:33:34 +0000 (02:33 -0700)]
[SCSI] bfa: dis-associate bfa path_tov with dev_loss_tmo

Disassoicate path_tov in the driver with the dev_loss_tmo set by the
application.

Signed-off-by: Vijaya Mohan Guvva <vmohan@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] bfa: Support for chinook-quad port card
Vijaya Mohan Guvva [Mon, 13 May 2013 09:33:33 +0000 (02:33 -0700)]
[SCSI] bfa: Support for chinook-quad port card

This patch enables support for chinook quad port 16G FC card (falcon)

Signed-off-by: Vijaya Mohan Guvva <vmohan@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] bfa: fix endianess issue for firmware stats
Vijaya Mohan Guvva [Mon, 13 May 2013 09:33:32 +0000 (02:33 -0700)]
[SCSI] bfa: fix endianess issue for firmware stats

Fix endianess issue on Big-endian architecture for firmware statistics

Signed-off-by: Vijaya Mohan Guvva <vmohan@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] bfa: Fix bug_on condition in RPSC rsp handling
Vijaya Mohan Guvva [Mon, 13 May 2013 09:33:31 +0000 (02:33 -0700)]
[SCSI] bfa: Fix bug_on condition in RPSC rsp handling

Fix bug_on condition check in RPSC (Report Port Speed Capabilities)
response processing.

Signed-off-by: Vijaya Mohan Guvva <vmohan@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] bfa: Allow rsp queue process during ioc disable
Vijaya Mohan Guvva [Mon, 13 May 2013 09:33:30 +0000 (02:33 -0700)]
[SCSI] bfa: Allow rsp queue process during ioc disable

Allow processing completions from firmware during IOC_DISABLE request is
being processed by the firmware, by setting the queue_process flag
appropriately.

Signed-off-by: Vijaya Mohan Guvva <vmohan@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] bfa: firmware statistics update
Vijaya Mohan Guvva [Mon, 13 May 2013 09:33:29 +0000 (02:33 -0700)]
[SCSI] bfa: firmware statistics update

Get RDS drop interrupts and REC (Read Exchange Concise) related stats
from firmware.

Signed-off-by: Vijaya Mohan Guvva <vmohan@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] bfa: fru vpd date update changes
Vijaya Mohan Guvva [Mon, 13 May 2013 09:33:28 +0000 (02:33 -0700)]
[SCSI] bfa: fru vpd date update changes

1. While FRU VPD data update, inform firmware to send a completion event
   on I2C bus. Without this change, firmware used to send completion
   message on I2C bus for every chunk of FRU VPD update.
2. Support for FRU VPN update on CHINOOK2 cards.
3. Append port count to the model name to differentiate between single
   port and dual port model of 1860.
4. Update the size of the model name to 16bytes

Signed-off-by: Vijaya Mohan Guvva <vmohan@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] bfa: driver compatibility with 32bit libs
Vijaya Mohan Guvva [Mon, 13 May 2013 09:33:27 +0000 (02:33 -0700)]
[SCSI] bfa: driver compatibility with 32bit libs

Replaced usage of void * with u64 in data structure shared between
brocade user space libraries and the bfa driver to address pointer
size changes across 32-bit vs 64-bit to have the compatibility between
32bit library and 64bit driver and vice versa.

Signed-off-by: Vijaya Mohan Guvva <vmohan@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] bfa: kdump fix on 815 and 825 adapters
Vijaya Mohan Guvva [Mon, 13 May 2013 09:33:26 +0000 (02:33 -0700)]
[SCSI] bfa: kdump fix on 815 and 825 adapters

Root cause: When kernel crashes, On brocade 815/825 adapters,
 bfa IOC state machine and FW doesn't get a notification and
hence are not cleanly shutdown. So registers holding driver/IOC
state information are not reset back to valid disabled/parking
values. This causes subsequent driver initialization to fail
during kdump kernel boot.

Fix description: during the initialization of first PCI function, reset
corresponding register when unclean shutown is detect by reading chip
registers. This will make sure that ioc/fw gets clean re-initialization.

Signed-off-by: Vijaya Mohan Guvva <vmohan@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] bfa: Fix FDISC timeout handling
Vijaya Mohan Guvva [Mon, 13 May 2013 09:33:25 +0000 (02:33 -0700)]
[SCSI] bfa: Fix FDISC timeout handling

Retry FDISC a max of 6 times. Introduce new events to handle vport
login fails due to max logins to fabric/switch.

Signed-off-by: Anil Gurumurthy <agurumur@brocade.com>
Signed-off-by: Vijaya Mohan Guvva <vmohan@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] bfa: Fix 1860 port initialize when ATC is enabled
Vijaya Mohan Guvva [Mon, 13 May 2013 09:33:24 +0000 (02:33 -0700)]
[SCSI] bfa: Fix 1860 port initialize when ATC is enabled

On Xen kernels, if ATC (address translation cache) is enabled, the
first PCIe DMA read from the adapter fails with an error. This is due to
a bug ASIC, which leads to a failure of 1860 ports to be initialised.

This patch includes the fix to disable Invalidated Tag Match Enable
capability by setting the bit 26 of CHIP_MISC_PRG to 0, by default it is
set to 1.

Signed-off-by: Anil Gurumurthy <agurumur@brocade.com>
Signed-off-by: Vijaya Mohan Guvva <vmohan@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] bfa: FDMI enhancements
Vijaya Mohan Guvva [Mon, 13 May 2013 09:33:23 +0000 (02:33 -0700)]
[SCSI] bfa: FDMI enhancements

Update addl. fields in FDMI to confirm to FC-GS6 standard for RPA and
RHBA commands.

Signed-off-by: Anil Gurumurthy <agurumur@brocade.com>
Signed-off-by: Vijaya Mohan Guvva <vmohan@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] bfa: Fix WARN_ON condition check
Vijaya Mohan Guvva [Mon, 13 May 2013 09:33:22 +0000 (02:33 -0700)]
[SCSI] bfa: Fix WARN_ON condition check

The WARN_ON condition check in IO completion path is wrong. IOtags
returned by the firmware is compared with driver/bfa iotag after masking
the retry count bits.

Signed-off-by: Vijaya Mohan Guvva <vmohan@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] bfa: Add dynamic diagnostic port support
Vijaya Mohan Guvva [Mon, 13 May 2013 09:33:21 +0000 (02:33 -0700)]
[SCSI] bfa: Add dynamic diagnostic port support

D-Port is a new port type created with the intention of running link
level diagnostic tests like loopback, traffic test. In static D-port
mode, user configures the port to D-port mode and starts the test, but
in dynamic D-port, once the Brocade switch port is configured to
D-port, it will reject the regular FLOGI from HBA with reason that it is
in D-port mode. So based on the reason code HBA port will turn itself into
D-port and start diagnostic test.

Signed-off-by: Sudarsana Reddy Kalluru <skalluru@brocade.com>
Signed-off-by: Vijaya Mohan Guvva <vmohan@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] bfa: Forward Error Correction status query
Vijaya Mohan Guvva [Mon, 13 May 2013 09:33:20 +0000 (02:33 -0700)]
[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>
10 years ago[SCSI] bfa: Support for FC BB credit recovery
Vijaya Mohan Guvva [Mon, 13 May 2013 09:33:19 +0000 (02:33 -0700)]
[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>
10 years ago[SCSI] ipr: qc_fill_rtf() method should not store alternate status register
Sergei Shtylyov [Tue, 21 May 2013 19:24:22 +0000 (23:24 +0400)]
[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>
10 years ago[SCSI] lpfc 8.3.40: Update lpfc version to driver version 8.3.40
James Smart [Fri, 31 May 2013 21:05:53 +0000 (17:05 -0400)]
[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>
10 years ago[SCSI] lpfc 8.3.40: Update Copyrights to 2013 for 8.3.38, 8.3.39, and 8.3.40 modifica...
James Smart [Fri, 31 May 2013 21:05:45 +0000 (17:05 -0400)]
[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>
10 years ago[SCSI] lpfc 8.3.40: Fixed a race condition between SLI host and port failed FCF redis...
James Smart [Fri, 31 May 2013 21:05:36 +0000 (17:05 -0400)]
[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>
10 years ago[SCSI] lpfc 8.3.40: Fixed issue mailbox wait routine failed to issue dump memory...
James Smart [Fri, 31 May 2013 21:05:27 +0000 (17:05 -0400)]
[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>
10 years ago[SCSI] lpfc 8.3.40: Fixed system panic due to unsafe walking and deleting linked...
James Smart [Fri, 31 May 2013 21:05:17 +0000 (17:05 -0400)]
[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>
10 years ago[SCSI] lpfc 8.3.40: Fixed FCoE connection list vlan identifier and add FCF list debug
James Smart [Fri, 31 May 2013 21:05:08 +0000 (17:05 -0400)]
[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>
10 years ago[SCSI] lpfc 8.3.40: Clarified the behavior of the lpfc_max_luns module parameter
James Smart [Fri, 31 May 2013 21:04:59 +0000 (17:04 -0400)]
[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>
10 years ago[SCSI] lpfc 8.3.40: Fix to allow OCM to report FEC status
James Smart [Fri, 31 May 2013 21:04:50 +0000 (17:04 -0400)]
[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>
10 years ago[SCSI] lpfc 8.3.40: Fixed a missing return code in a logging message
James Smart [Fri, 31 May 2013 21:04:36 +0000 (17:04 -0400)]
[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>
10 years ago[SCSI] lpfc 8.3.40: Fixed some logging message fields
James Smart [Fri, 31 May 2013 21:04:28 +0000 (17:04 -0400)]
[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>
10 years ago[SCSI] lpfc 8.3.40: Fixed list corruption when lpfc_drain_tx runs.
James Smart [Fri, 31 May 2013 21:04:19 +0000 (17:04 -0400)]
[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>
10 years ago[SCSI] lpfc 8.3.40: Fix starting reference tag when calculating BG error
James Smart [Fri, 31 May 2013 21:04:10 +0000 (17:04 -0400)]
[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>
10 years ago[SCSI] lpfc 8.3.40: Fix inconsistent list removal causes crash.
James Smart [Fri, 31 May 2013 21:04:01 +0000 (17:04 -0400)]
[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>
10 years ago[SCSI] lpfc 8.3.40: Fixed system panic during handling unsolicited receive buffer...
James Smart [Fri, 31 May 2013 21:03:48 +0000 (17:03 -0400)]
[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>
10 years ago[SCSI] lpfc 8.3.40: Fix BlockGuard error checking
James Smart [Fri, 31 May 2013 21:03:39 +0000 (17:03 -0400)]
[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>
10 years ago[SCSI] lpfc 8.3.40: Fixed crash during FCoE failover testing.
James Smart [Fri, 31 May 2013 21:03:18 +0000 (17:03 -0400)]
[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>
10 years ago[SCSI] lpfc 8.3.40: Fix lpfc_used_cpu to be more dynamic
James Smart [Fri, 31 May 2013 21:03:07 +0000 (17:03 -0400)]
[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>
10 years ago[SCSI] ipr: possible irq lock inversion dependency detected
wenxiong@linux.vnet.ibm.com [Fri, 24 May 2013 14:59:13 +0000 (09:59 -0500)]
[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>
10 years ago[SCSI] cxgb4i: add support for T5 adapter
Karen Xie [Thu, 30 May 2013 00:13:28 +0000 (17:13 -0700)]
[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>
10 years ago[SCSI] sd: Fix parsing of 'temporary ' cache mode prefix
Ben Hutchings [Mon, 27 May 2013 18:07:19 +0000 (19:07 +0100)]
[SCSI] sd: Fix parsing of 'temporary ' cache mode prefix

Commit 39c60a0948cc '[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>
10 years ago[SCSI] bfa: Fixes for 0-terminated strncpy and possible null pointer dereference
Jakob Normark [Wed, 15 May 2013 19:41:51 +0000 (21:41 +0200)]
[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>
10 years ago[SCSI] megaraid_sas: Changelog and driver version update
Sumit.Saxena@lsi.com [Wed, 22 May 2013 07:06:17 +0000 (12:36 +0530)]
[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>
10 years ago[SCSI] megaraid_sas: Add support to differentiate between iMR vs MR Firmware
Sumit.Saxena@lsi.com [Wed, 22 May 2013 07:05:33 +0000 (12:35 +0530)]
[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>
10 years ago[SCSI] megaraid_sas: Add support for Uneven Span PRL11
Sumit.Saxena@lsi.com [Wed, 22 May 2013 07:05:04 +0000 (12:35 +0530)]
[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>
10 years ago[SCSI] megaraid_sas: Add support for Extended MSI-x vectors for 12Gb/s controller
Sumit.Saxena@lsi.com [Wed, 22 May 2013 07:04:14 +0000 (12:34 +0530)]
[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>
10 years ago[SCSI] megaraid_sas: Set IoFlags to enable Fast Path for JBODs for 12 Gb/s controllers
Sumit.Saxena@lsi.com [Wed, 22 May 2013 07:03:29 +0000 (12:33 +0530)]
[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>
10 years ago[SCSI] megaraid_sas: Add support to display Customer branding details in syslog
Sumit.Saxena@lsi.com [Wed, 22 May 2013 07:02:43 +0000 (12:32 +0530)]
[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>
10 years ago[SCSI] megaraid_sas: Add support for MegaRAID Fury (device ID-0x005f) 12Gb/s controllers
Sumit.Saxena@lsi.com [Wed, 22 May 2013 07:01:43 +0000 (12:31 +0530)]
[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>
10 years ago[SCSI] megaraid_sas: Set IO request timeout value provided by OS timeout for Tape...
Sumit.Saxena@lsi.com [Wed, 22 May 2013 07:01:18 +0000 (12:31 +0530)]
[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>
10 years ago[SCSI] megaraid_sas: Free event detail memory without device ID check
Sumit.Saxena@lsi.com [Wed, 22 May 2013 07:00:54 +0000 (12:30 +0530)]
[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>
10 years ago[SCSI] megaraid_sas: Update balance count in driver to be in sync of firmware
Sumit.Saxena@lsi.com [Wed, 22 May 2013 07:00:22 +0000 (12:30 +0530)]
[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>
10 years ago[SCSI] megaraid_sas: Fix the interrupt mask for Gen2 controller
Sumit.Saxena@lsi.com [Wed, 22 May 2013 06:59:54 +0000 (12:29 +0530)]
[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>
10 years ago[SCSI] megaraid_sas: Return DID_ERROR for SCSI IO, when controller is in critical...
Sumit.Saxena@lsi.com [Wed, 22 May 2013 06:59:28 +0000 (12:29 +0530)]
[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>
10 years ago[SCSI] 3w-xxxx: Create sense buffer for unsupported commands
Martin K. Petersen [Mon, 29 Apr 2013 16:13:01 +0000 (12:13 -0400)]
[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>
10 years ago[SCSI] Workaround for disks that report bad optimal transfer length
Martin K. Petersen [Thu, 25 Apr 2013 01:19:47 +0000 (21:19 -0400)]
[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>
10 years ago[SCSI] mpt2sas: fix for unused variable 'event_data' warning
Reddy, Sreekanth [Tue, 26 Feb 2013 12:06:12 +0000 (17:36 +0530)]
[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>
10 years ago[SCSI] mpt2sas: Bump driver vesion to v15.100.00.00
Sreekanth Reddy [Fri, 1 Feb 2013 16:33:17 +0000 (22:03 +0530)]
[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>
10 years ago[SCSI] mpt2sas: Calulate the Reply post queue depth calculation as per the MPI spec
Sreekanth Reddy [Fri, 1 Feb 2013 16:32:04 +0000 (22:02 +0530)]
[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>
10 years ago[SCSI] mpt2sas: fix firmware failure with wrong task attribute
Sreekanth Reddy [Fri, 1 Feb 2013 19:28:20 +0000 (00:58 +0530)]
[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>
10 years ago[SCSI] mpt2sas: Fix for device scan following host reset could get stuck in a infinit...
Sreekanth Reddy [Fri, 1 Feb 2013 19:26:18 +0000 (00:56 +0530)]
[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>
10 years ago[SCSI] mpt2sas: Update the timing requirements for issuing a Hard Reset
Sreekanth Reddy [Fri, 1 Feb 2013 16:25:43 +0000 (21:55 +0530)]
[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>
10 years ago[SCSI] mpt2sas: MPI2 Rev W (2.00.15) specification
Sreekanth Reddy [Fri, 1 Feb 2013 16:24:13 +0000 (21:54 +0530)]
[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>
10 years ago[SCSI] mpt2sas: Fix for issue Missing delay not getting set during system bootup
Reddy, Sreekanth [Tue, 26 Feb 2013 11:29:59 +0000 (16:59 +0530)]
[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>
10 years ago[SCSI] csiostor: Retain default adapter configuration in absence of config file.
Naresh Kumar Inna [Fri, 17 May 2013 10:20:03 +0000 (15:50 +0530)]
[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>
10 years ago[SCSI] bfa: fix for FC Direct Attach LUN discovery failure
Vijay Mohan Guvva [Mon, 13 May 2013 09:56:48 +0000 (03:56 -0600)]
[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>
10 years ago[SCSI] bfa: fix faulty handling of events in lps sm
Vijay Mohan Guvva [Mon, 13 May 2013 09:49:44 +0000 (03:49 -0600)]
[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>
10 years ago[SCSI] Allow error handling timeout to be specified
Martin K. Petersen [Fri, 10 May 2013 14:36:04 +0000 (10:36 -0400)]
[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>
10 years ago[SCSI] sd: avoid deadlocks when running under multipath
Hannes Reinecke [Fri, 10 May 2013 09:06:16 +0000 (11:06 +0200)]
[SCSI] sd: avoid deadlocks when running under multipath

When multipathed systems run into an all-paths-down scenario
all devices might be dropped, too. This causes 'del_gendisk'
to be called, which will unregister the kobj_map->probe()
function for all disk device numbers.
When the device comes back the default ->probe() function
is run which will call __request_module(), which will
deadlock.
As 'del_gendisk' typically does _not_ trigger a module unload
the default ->probe() function is pointless anyway.
This patch implements a dummy ->probe() function, which will
just return NULL if the disk is not registered.
This will avoid the deadlock. Plus it'll speed up device
scanning.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] ipr: Avoid target_destroy accessing memory after it was freed
wenxiong@linux.vnet.ibm.com [Thu, 14 Mar 2013 18:52:25 +0000 (13:52 -0500)]
[SCSI] ipr: Avoid target_destroy accessing memory after it was freed

Defined target_ids,array_ids and vsets_ids as unsigned long to avoid
target_destroy accessing memory after it was freed.

Signed-off-by: Wen Xiong <wenxiong@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] Documentation/devicetree: Add DT bindings for UFS host controller
Sujit Reddy Thumma [Tue, 14 May 2013 16:04:15 +0000 (21:34 +0530)]
[SCSI] Documentation/devicetree: Add DT bindings for UFS host controller

Compatible list is used in commit 03b1781 but is not documented.
Add necessary device tree bindings to describe on-chip UFS host
controllers.

Signed-off-by: Sujit Reddy Thumma <sthumma@codeaurora.org>
Signed-off-by: Santosh Y <santoshsy@gmail.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] ufs: SCSI_UFSHCD should depend on SCSI_DMA
Geert Uytterhoeven [Tue, 14 May 2013 16:04:14 +0000 (21:34 +0530)]
[SCSI] ufs: SCSI_UFSHCD should depend on SCSI_DMA

If NO_DMA=y:

drivers/built-in.o: In function `ufshcd_transfer_req_compl':
drivers/scsi/ufs/ufshcd.c:1182: undefined reference to `scsi_dma_unmap'
drivers/built-in.o: In function `ufshcd_map_sg':
drivers/scsi/ufs/ufshcd.c:377: undefined reference to `scsi_dma_map'
drivers/built-in.o: In function `ufshcd_do_reset':
drivers/scsi/ufs/ufshcd.c:912: undefined reference to `scsi_dma_unmap'
drivers/built-in.o: In function `ufshcd_memory_alloc':
drivers/scsi/ufs/ufshcd.c:565: undefined reference to `dma_alloc_coherent'
drivers/built-in.o: In function `ufshcd_free_hba_memory':
drivers/scsi/ufs/ufshcd.c:185: undefined reference to `dma_free_coherent'
drivers/scsi/ufs/ufshcd.c:192: undefined reference to `dma_free_coherent'
drivers/scsi/ufs/ufshcd.c:199: undefined reference to `dma_free_coherent'
drivers/scsi/ufs/ufshcd.c:185: undefined reference to `dma_free_coherent'
drivers/scsi/ufs/ufshcd.c:192: undefined reference to `dma_free_coherent'
drivers/built-in.o:drivers/scsi/ufs/ufshcd.c:199: more undefined references to `dma_free_coherent' follow
drivers/built-in.o: In function `ufshcd_abort':
drivers/scsi/ufs/ufshcd.c:1498: undefined reference to `scsi_dma_unmap'
drivers/built-in.o: In function `ufshcd_device_reset':
drivers/scsi/ufs/ufshcd.c:1436: undefined reference to `scsi_dma_unmap'

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Santosh Y <santoshsy@gmail.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] ufs: Remove redundant platform_set_drvdata()
Sachin Kamat [Tue, 14 May 2013 16:04:13 +0000 (21:34 +0530)]
[SCSI] ufs: Remove redundant platform_set_drvdata()

Commit 0998d06310 (device-core: Ensure drvdata = NULL when no
driver is bound) removes the need to set driver data field to
NULL.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Santosh Y <santoshsy@gmail.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] pm80xx: remove unneeded NULL check
Dan Carpenter [Thu, 9 May 2013 12:48:13 +0000 (15:48 +0300)]
[SCSI] pm80xx: remove unneeded NULL check

Coccinelle complains about the inconsistent NULL checking on "t".  It
turns out the check isn't needed because we verified that "t" is
non-NULL at the start of the function.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Anand Kumar Santhanam <AnandKumar.Santhanam@pmcs.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] libsas: implement > 16 byte CDB support
James Bottomley [Tue, 7 May 2013 22:38:18 +0000 (15:38 -0700)]
[SCSI] libsas: implement > 16 byte CDB support

Remove the arbitrary expectation in libsas that all SCSI commands are 16 bytes
or less.  Instead do all copies via cmd->cmd_len (and use a pointer to this in
the libsas task instead of a copy).  Note that this still doesn't enable > 16
byte CDB support in the underlying drivers because their internal format has
to be fixed and the wire format of > 16 byte CDBs according to the SAS spec is
different.  the libsas drivers (isci, aic94xx, mvsas and pm8xxx are all
updated for this change.

Cc: Lukasz Dorau <lukasz.dorau@intel.com>
Cc: Maciej Patelczyk <maciej.patelczyk@intel.com>
Cc: Dave Jiang <dave.jiang@intel.com>
Cc: Jack Wang <xjtuwjp@gmail.com>
Cc: Lindar Liu <lindar_liu@usish.com>
Cc: Xiangliang Yu <yuxiangl@marvell.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] zfcp: status read buffers on first adapter open with link down
Steffen Maier [Fri, 26 Apr 2013 15:34:54 +0000 (17:34 +0200)]
[SCSI] zfcp: status read buffers on first adapter open with link down

Commit 64deb6efdc5504ce97b5c1c6f281fffbc150bd93
"[SCSI] zfcp: Use status_read_buf_num provided by FCP channel"
started using a value returned by the channel but only evaluated the value
if the fabric link is up.
Commit 8d88cf3f3b9af4713642caeb221b6d6a42019001
"[SCSI] zfcp: Update status read mempool"
introduced mempool resizings based on the above value.
On setting an FCP device online for the very first time since boot, a new
zeroed adapter object is allocated. If the link is down, the number of
status read requests remains zero. Since just the config data exchange is
incomplete, we proceed with adapter open recovery. However, we
unconditionally call mempool_resize with adapter->stat_read_buf_num == 0 in
this case.

This causes a kernel message "kernel BUG at mm/mempool.c:131!" in process
"zfcperp<FCP-device-bus-ID>" with last function mempool_resize in Krnl PSW
and zfcp_erp_thread in the Call Trace.

Don't evaluate channel values which are invalid on link down. The number of
status read requests is always valid, evaluated, and set to a positive
minimum greater than zero. The adapter open recovery can proceed and the
channel has status read buffers to inform us on a future link up event.
While we are not aware of any other code path that could result in mempool
resize attempts of size zero, we still also initialize the number of status
read buffers to be posted to a static minimum number on adapter object
allocation.

Signed-off-by: Steffen Maier <maier@linux.vnet.ibm.com>
Cc: <stable@vger.kernel.org> #2.6.35+
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] zfcp: remove access control tables interface
Martin Peschke [Fri, 26 Apr 2013 14:13:54 +0000 (16:13 +0200)]
[SCSI] zfcp: remove access control tables interface

This patch removes an interface that was used to manage access control
tables within the HBA. The patch consequently removes the handling
for conditions related to those access control tables, too.

That initiator-based access control feature was only needed until the
introduction of NPIV and was withdrawn with z10 years ago.
It's time to cleanup the corresponding device driver code.

Signed-off-by: Martin Peschke <mpeschke@linux.vnet.ibm.com>
Signed-off-by: Steffen Maier <maier@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] zfcp: module parameter dbflevel for early debugging
Steffen Maier [Fri, 26 Apr 2013 14:13:53 +0000 (16:13 +0200)]
[SCSI] zfcp: module parameter dbflevel for early debugging

So far, we could only increase the s390dbf log level after an FCP
device has been initially set online for it to create the dbf entries
required to adjust the level.

Introduce zfcp.dbflevel as counterpart to the already existing
zfcp.dbfsize to enable debugging of e.g. setting an FCP device online.

Signed-off-by: Steffen Maier <maier@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] zfcp: block queue limits with data router
Steffen Maier [Fri, 26 Apr 2013 15:33:45 +0000 (17:33 +0200)]
[SCSI] zfcp: block queue limits with data router

Commit 86a9668a8d29ea711613e1cb37efa68e7c4db564
"[SCSI] zfcp: support for hardware data router"
reduced the initial block queue limits in the scsi_host_template to the
absolute minimum and adjusted them later on. However, the adjustment was
too late for the BSG devices of Scsi_Host and fc_host.

Therefore, ioctl(..., SG_IO, ...) with request or response size > 4kB to a
BSG device of an fc_host or a Scsi_Host fails with EINVAL. As a result,
users of such ioctl such as HBA_SendCTPassThru() in libzfcphbaapi return
with error HBA_STATUS_ERROR.

Initialize the block queue limits in zfcp_scsi_host_template to the
greatest common denominator (GCD).

While we cannot exploit the slightly enlarged maximum request size with
data router, this should be neglectible. Doing so also avoids running into
trouble after live guest relocation (LGR) / migration from a data router
FCP device to an FCP device that does not support data router. In that
case, zfcp would figure out the new limits on adapter recovery, but the
fc_host and Scsi_Host (plus in fact all sdevs) still exist with the old and
now too large queue limits.

It should also OK, not to use half the size as in the DIX case, because
fc_host and Scsi_Host do not transport FCP requests including SCSI commands
using protection data.

Signed-off-by: Steffen Maier <maier@linux.vnet.ibm.com>
Reviewed-by: Martin Peschke <mpeschke@linux.vnet.ibm.com>
Cc: <stable@vger.kernel.org> #3.2+
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] zfcp: fix adapter (re)open recovery while link to SAN is down
Daniel Hansel [Fri, 26 Apr 2013 15:32:14 +0000 (17:32 +0200)]
[SCSI] zfcp: fix adapter (re)open recovery while link to SAN is down

FCP device remains in status ERP_FAILED when device is switched online
or adapter recovery is triggered  while link to SAN is down.

When Exchange Configuration Data command returns the FSF status
FSF_EXCHANGE_CONFIG_DATA_INCOMPLETE it aborts the exchange process.
The only retries are done during the common error recovery procedure
(i.e. max. 3 retries with 8sec sleep between) and remains in status
ERP_FAILED with QDIO down.

This commit reverts the commit 0df138476c8306478d6e726f044868b4bccf411c
(zfcp: Fix adapter activation on link down).
When FSF status FSF_EXCHANGE_CONFIG_DATA_INCOMPLETE is received the
adapter recovery will be finished without any retries. QDIO will be
up now and status changes such as LINK UP will be received now.

Signed-off-by: Daniel Hansel <daniel.hansel@linux.vnet.ibm.com>
Signed-off-by: Steffen Maier <maier@linux.vnet.ibm.com>
Cc: <stable@vger.kernel.org> #2.6.37+
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] zfcp: remove unused device_unregister wrapper
Sebastian Ott [Fri, 26 Apr 2013 14:13:50 +0000 (16:13 +0200)]
[SCSI] zfcp: remove unused device_unregister wrapper

Remove the now unused function zfcp_device_unregister since all
users have been converted to use device_unregister directly.

Reviewed-by: Steffen Maier <maier@linux.vnet.ibm.com>
Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Steffen Maier <maier@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] zfcp: cleanup unit sysfs attribute usage
Sebastian Ott [Fri, 26 Apr 2013 14:13:49 +0000 (16:13 +0200)]
[SCSI] zfcp: cleanup unit sysfs attribute usage

Let the driver core handle device attribute creation and removal. This
will simplify the code and eliminates races between attribute
availability and userspace notification via uevents.

Reviewed-by: Steffen Maier <maier@linux.vnet.ibm.com>
Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Steffen Maier <maier@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] zfcp: cleanup port sysfs attribute usage
Sebastian Ott [Fri, 26 Apr 2013 14:13:48 +0000 (16:13 +0200)]
[SCSI] zfcp: cleanup port sysfs attribute usage

Let the driver core handle device attribute creation and removal. This
will simplify the code and eliminates races between attribute
availability and userspace notification via uevents.

Reviewed-by: Steffen Maier <maier@linux.vnet.ibm.com>
Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Steffen Maier <maier@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years ago[SCSI] zfcp: cfdc fops add owner
Sebastian Ott [Fri, 26 Apr 2013 14:13:47 +0000 (16:13 +0200)]
[SCSI] zfcp: cfdc fops add owner

Set the owner member of zfcp_cfdc_fops, to ensure that the
caller of these functions holds a module reference.

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Steffen Maier <maier@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
10 years agoLinux 3.10-rc3 v3.10-rc3
Linus Torvalds [Sun, 26 May 2013 23:00:47 +0000 (16:00 -0700)]
Linux 3.10-rc3

10 years agoipc/sem.c: Fix missing wakeups in do_smart_update_queue()
Manfred Spraul [Sun, 26 May 2013 09:08:52 +0000 (11:08 +0200)]
ipc/sem.c: Fix missing wakeups in do_smart_update_queue()

do_smart_update_queue() is called when an operation (semop,
semctl(SETVAL), semctl(SETALL), ...) modified the array.  It must check
which of the sleeping tasks can proceed.

do_smart_update_queue() missed a few wakeups:
 - if a sleeping complex op was completed, then all per-semaphore queues
   must be scanned - not only those that were modified by *sops
 - if a sleeping simple op proceeded, then the global queue must be
   scanned again

And:
 - the test for "|sops == NULL) before scanning the global queue is not
   required: If the global queue is empty, then it doesn't need to be
   scanned - regardless of the reason for calling do_smart_update_queue()

The patch is not optimized, i.e.  even completing a wait-for-zero
operation causes a rescan.  This is done to keep the patch as simple as
possible.

Signed-off-by: Manfred Spraul <manfred@colorfullife.com>
Acked-by: Davidlohr Bueso <davidlohr.bueso@hp.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
10 years agoMerge tag 'nfs-for-3.10-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
Linus Torvalds [Sun, 26 May 2013 19:33:05 +0000 (12:33 -0700)]
Merge tag 'nfs-for-3.10-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs

Pull NFS client bugfixes from Trond Myklebust:

 - Stable fix to prevent an rpc_task wakeup race
 - Fix a NFSv4.1 session drain deadlock
 - Fix a NFSv4/v4.1 mount regression when not running rpc.gssd
 - Ensure auth_gss pipe detection works in namespaces
 - Fix SETCLIENTID fallback if rpcsec_gss is not available

* tag 'nfs-for-3.10-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
  NFS: Fix SETCLIENTID fallback if GSS is not available
  SUNRPC: Prevent an rpc_task wakeup race
  NFSv4.1 Fix a pNFS session draining deadlock
  SUNRPC: Convert auth_gss pipe detection to work in namespaces
  SUNRPC: Faster detection if gssd is actually running
  SUNRPC: Fix a bug in gss_create_upcall

10 years agoMerge tag 'edac_fixes_for_3.10' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sun, 26 May 2013 16:52:26 +0000 (09:52 -0700)]
Merge tag 'edac_fixes_for_3.10' of git://git./linux/kernel/git/bp/bp

Pull amd64 edac fix from Borislav Petkov:
 "A sysfs file permissions correction"

* tag 'edac_fixes_for_3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp:
  amd64_edac: Fix bogus sysfs file permissions

10 years agoMerge branch 'parisc-for-3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/delle...
Linus Torvalds [Sun, 26 May 2013 16:36:31 +0000 (09:36 -0700)]
Merge branch 'parisc-for-3.10' of git://git./linux/kernel/git/deller/parisc-linux

Pull parisc fixes from Helge Deller:
 "This time we made the kernel- and interruption stack allocation
  reentrant which fixed some strange kernel crashes (specifically
  protection ID traps).

  Furthemore this patchset fixes the interrupt stack in UP and SMP
  configurations by using native locking instructions.  And finally
  usage of floating point calculations on parisc were disabled in the
  MPILIB."

* 'parisc-for-3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
  parisc: fix irq stack on UP and SMP
  parisc/superio: Use module_pci_driver to register driver
  parisc: make interrupt and interruption stack allocation reentrant
  parisc: show number of FPE and unaligned access handler calls in /proc/interrupts
  parisc: add additional parisc git tree to MAINTAINERS file
  parisc: use PAGE_SHIFT instead of hardcoded value 12 in pacache.S
  parisc: add rp5470 entry to machine database
  MPILIB: disable usage of floating point registers on parisc

10 years agoMerge tag 'for-linus-v3.10-rc3' of git://oss.sgi.com/xfs/xfs
Linus Torvalds [Sun, 26 May 2013 16:35:02 +0000 (09:35 -0700)]
Merge tag 'for-linus-v3.10-rc3' of git://oss.sgi.com/xfs/xfs

Pull xfs fixes from Ben Myers:
 "Here are fixes for corruption on 512 byte filesystems, a rounding
  error, a use-after-free, some flags to fix lockdep reports, and
  several fixes related to CRCs.  We have a somewhat larger post -rc1
  queue than usual due to fixes related to the CRC feature we merged for
  3.10:

   - Fix for corruption with FSX on 512 byte blocksize filesystems
   - Fix rounding error in xfs_free_file_space
   - Fix use-after-free with extent free intents
   - Add several missing KM_NOFS flags to fix lockdep reports
   - Several fixes for CRC related code"

* tag 'for-linus-v3.10-rc3' of git://oss.sgi.com/xfs/xfs:
  xfs: remote attribute lookups require the value length
  xfs: xfs_attr_shortform_allfit() does not handle attr3 format.
  xfs: xfs_da3_node_read_verify() doesn't handle XFS_ATTR3_LEAF_MAGIC
  xfs: fix missing KM_NOFS tags to keep lockdep happy
  xfs: Don't reference the EFI after it is freed
  xfs: fix rounding in xfs_free_file_space
  xfs: fix sub-page blocksize data integrity writes

10 years agoMerge tag 'for-v3.10-fixes' of git://git.infradead.org/battery-2.6
Linus Torvalds [Sun, 26 May 2013 03:32:49 +0000 (20:32 -0700)]
Merge tag 'for-v3.10-fixes' of git://git.infradead.org/battery-2.6

Pull bettery fixes from Anton Vorontsov:
 "Last minute one-liners: wrong kfree usage fix, module alias fixup and
  kconfig adjustments"

* tag 'for-v3.10-fixes' of git://git.infradead.org/battery-2.6:
  pm2301_charger: Fix module alias prefix
  wm831x_backup: Fix wrong kfree call for devdata->backup.name
  bq27x00: Fix I2C dependency in KConfig
  lp8788-charger: Fix kconfig dependency