platform/adaptation/renesas_rcar/renesas_kernel.git
11 years ago[SCSI] lpfc 8.3.42: Fix crash on driver load due to cpu affinity logic
James Smart [Fri, 6 Sep 2013 16:20:36 +0000 (12:20 -0400)]
[SCSI] lpfc 8.3.42: Fix crash on driver load due to cpu affinity logic

Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] lpfc 8.3.42: Fixed logging format of setting driver sysfs attributes hard...
James Smart [Fri, 6 Sep 2013 16:20:20 +0000 (12:20 -0400)]
[SCSI] lpfc 8.3.42: Fixed logging format of setting driver sysfs attributes hard to interpret

Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] lpfc 8.3.42: Fixed back to back RSCNs discovery failure.
James Smart [Fri, 6 Sep 2013 16:20:07 +0000 (12:20 -0400)]
[SCSI] lpfc 8.3.42: Fixed back to back RSCNs discovery failure.

Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] lpfc 8.3.42: Fixed race condition between BSG I/O dispatch and timeout handling
James Smart [Fri, 6 Sep 2013 16:19:45 +0000 (12:19 -0400)]
[SCSI] lpfc 8.3.42: Fixed race condition between BSG I/O dispatch and timeout handling

Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] lpfc 8.3.42: Fixed function mode field defined too small for not recognizing...
James Smart [Fri, 6 Sep 2013 16:19:27 +0000 (12:19 -0400)]
[SCSI] lpfc 8.3.42: Fixed function mode field defined too small for not recognizing dual-chute mode

Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] lpfc 8.3.42: Back out data count,(residual fcfi_parm) fix for bad target.
James Smart [Fri, 6 Sep 2013 16:19:17 +0000 (12:19 -0400)]
[SCSI] lpfc 8.3.42: Back out data count,(residual fcfi_parm) fix for bad target.

Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] lpfc 8.3.42: Fixed mailbox memory leak.
James Smart [Fri, 6 Sep 2013 16:19:06 +0000 (12:19 -0400)]
[SCSI] lpfc 8.3.42: Fixed mailbox memory leak.

Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] lpfc 8.3.42: Fix random errors using first burst
James Smart [Fri, 6 Sep 2013 16:18:45 +0000 (12:18 -0400)]
[SCSI] lpfc 8.3.42: Fix random errors using first burst

Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] lpfc 8.3.42: Fixed not able to log informational messages at early stage of...
James Smart [Fri, 6 Sep 2013 16:18:28 +0000 (12:18 -0400)]
[SCSI] lpfc 8.3.42: Fixed not able to log informational messages at early stage of driver init time

Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] lpfc 8.3.42: Fixed using unsafe linked list macro for walking and deleting...
James Smart [Fri, 6 Sep 2013 16:17:56 +0000 (12:17 -0400)]
[SCSI] lpfc 8.3.42: Fixed using unsafe linked list macro for walking and deleting linked list

Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] megaraid_sas: addded support for big endian architecture
Sumit.Saxena@lsi.com [Fri, 6 Sep 2013 10:20:52 +0000 (15:50 +0530)]
[SCSI] megaraid_sas: addded support for big endian architecture

This patch will add big endian architecture support to megaraid_sas
driver. The support added is for LSI MegaRAID all generation controllers-
(3Gb/s, 6Gb/s and 12 Gb/s controllers).

We have done basic sanity test @ppc64 arch and @x86_64. Additional
testing/observations are welcome.

[jejb: fix up rejections]
Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: Sumit Saxena <sumit.saxena@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] aic7xxx: fix swapped arguments in ahc_find_pci_device
Dave Jones [Thu, 5 Sep 2013 02:33:09 +0000 (22:33 -0400)]
[SCSI] aic7xxx: fix swapped arguments in ahc_find_pci_device

The prototype for ahc_9005_subdevinfo_valid shows that the caller has the
arguments in the wrong order.

 637 ahc_9005_subdevinfo_valid(uint16_t device, uint16_t vendor,
 638                           uint16_t subdevice, uint16_t subvendor)

Signed-off-by: Dave Jones <davej@fedoraproject.org>
Acked-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] hpsa: bump driver version to reflect changes
Mike Miller [Wed, 4 Sep 2013 20:12:27 +0000 (15:12 -0500)]
[SCSI] hpsa: bump driver version to reflect changes

Changes the version of hpsa so we know something has changed. Please consider
this for inclusion.

Signed-off-by: Mike Miller <mike.miller@hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] hpsa: housekeeping patch for device_id and product arrays
Mike Miller [Wed, 4 Sep 2013 20:11:10 +0000 (15:11 -0500)]
[SCSI] hpsa: housekeeping patch for device_id and product arrays

This patch does a bit of housekeeping for hpsa. Change lowercase alpha hex
digits to uppercase for consistency within the driver. Also moves the P822se
in the tables to keep controllers of each family grouped together.

Signed-off-by: Mike Miller <mike.miller@hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] hpsa: add HP Smart Array Gen8 names
Mike Miller [Wed, 4 Sep 2013 20:08:29 +0000 (15:08 -0500)]
[SCSI] hpsa: add HP Smart Array Gen8 names

Add the marketing names for HP Smart Array Gen8 controllers. Also removes an
unused ID. Please consider this for inclusion.

Signed-off-by: Mike Miller <mike.miller@hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] hpsa: add HP Smart Array Gen9 PCI ID's
Mike Miller [Wed, 4 Sep 2013 20:05:55 +0000 (15:05 -0500)]
[SCSI] hpsa: add HP Smart Array Gen9 PCI ID's

This patch adds the PCI ID's for HP Smart Array Gen9 controllers. Please
consider this patch for inclusion.

Signed-off-by: Mike Miller <mike.miller@hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] ufs: configure the attribute for power mode
Seungwon Jeon [Sat, 31 Aug 2013 16:10:24 +0000 (21:40 +0530)]
[SCSI] ufs: configure the attribute for power mode

UIC attributes can be set with using DME_SET command for
power mode change. For configuration the link capability
attributes are used, which is updated after successful
link startup.

Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>
Reviewed-by: Subhash Jadavani <subhashj@codeaurora.org>
Signed-off-by: Santosh Y <santoshsy@gmail.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] ufs: add operation for the uic power mode change
Seungwon Jeon [Sat, 31 Aug 2013 16:10:22 +0000 (21:40 +0530)]
[SCSI] ufs: add operation for the uic power mode change

Setting PA_PWRMode using DME_SET triggers the power mode
change. And then the result will be given by the HCS.UPMCRS.
This operation should be done atomically.

Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>
Reviewed-by: Subhash Jadavani <subhashj@codeaurora.org>
Tested-by: Yaniv Gardi <ygardi@codeaurora.org>
Signed-off-by: Santosh Y <santoshsy@gmail.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] ufs: add dme configuration primitives
Seungwon Jeon [Sat, 31 Aug 2013 16:10:21 +0000 (21:40 +0530)]
[SCSI] ufs: add dme configuration primitives

Implements to support GET and SET operations of the DME.
These operations are used to configure the behavior of
the UNIPRO. Along with basic operation, {Peer/AttrSetType}
can be mixed.

Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>
Reviewed-by: Subhash Jadavani <subhashj@codeaurora.org>
Tested-by: Yaniv Gardi <ygardi@codeaurora.org>
Signed-off-by: Santosh Y <santoshsy@gmail.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] ufs: fix the setting interrupt aggregation counter
Seungwon Jeon [Sat, 31 Aug 2013 16:10:20 +0000 (21:40 +0530)]
[SCSI] ufs: fix the setting interrupt aggregation counter

IACTH(Interrupt aggregation counter threshold) value is allowed
up to 0x1F and current setting value is the maximum.
This value is related with NUTRS(max:0x20) of HCI's capability.
Considering HCI controller doesn't support the maximum, IACTH
setting should be adjusted with possible value.
For that, existing 'ufshcd_config_int_aggr' is split into two part
[reset, configure].

Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>
Reviewed-by: Subhash Jadavani <subhashj@codeaurora.org>
Tested-by: Yaniv Gardi <ygardi@codeaurora.org>
Signed-off-by: Santosh Y <santoshsy@gmail.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] ufs: find out sense data over scsi status values
Seungwon Jeon [Sat, 31 Aug 2013 16:10:19 +0000 (21:40 +0530)]
[SCSI] ufs: find out sense data over scsi status values

Unlike 'GOOD' and 'CHECK CONDITION', other status values in
Response UPIU may or may not contain sense data. That is returning
sense data isn't obvious. So, in this case the Data Segment Length
field should be checked. If a non-zero value, it means that UPIU
has Sense Data in the Data Segment area.

Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>
Reviewed-by: Subhash Jadavani <subhashj@codeaurora.org>
Tested-by: Yaniv Gardi <ygardi@codeaurora.org>
Signed-off-by: Santosh Y <santoshsy@gmail.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] megaraid_sas: Version and Changelog update
adam radford [Sat, 31 Aug 2013 23:54:28 +0000 (16:54 -0700)]
[SCSI] megaraid_sas: Version and Changelog update

Signed-off-by: Adam Radford <aradford@gmail.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] megaraid_sas: Add High Availability clustering support using shared Logical...
adam radford [Fri, 6 Sep 2013 22:27:14 +0000 (15:27 -0700)]
[SCSI] megaraid_sas: Add High Availability clustering support using shared Logical Disks

Signed-off-by: Adam Radford <aradford@gmail.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] Allow MPT Fusion SAS 3.0 driver to be built into the kernel
Greg Kroah-Hartman [Tue, 3 Sep 2013 22:00:11 +0000 (15:00 -0700)]
[SCSI] Allow MPT Fusion SAS 3.0 driver to be built into the kernel

Right now the Makefile for the mpt3sas driver does not even allow the
driver to be built into the kernel.  So fix that up, as there doesn't
seem to be any obvious reason why this shouldn't be done.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Sreekanth Reddy <Sreekanth.Reddy@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] ibmvfc: Fix for offlining devices during error recovery
Brian King [Tue, 20 Aug 2013 16:08:42 +0000 (11:08 -0500)]
[SCSI] ibmvfc: Fix for offlining devices during error recovery

This fixes an issue seen with devices getting marked offline
in a scenario where a VIOS was getting rebooted while a
client VFC adapter is in SCSI EH and prevents unnecessary
EH escalation in some scenarios.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Acked-by: Robert Jennings <rcj@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] ibmvscsi: Fix little endian issues
Anton Blanchard [Tue, 3 Sep 2013 00:04:47 +0000 (10:04 +1000)]
[SCSI] ibmvscsi: Fix little endian issues

The hypervisor is big endian, so little endian kernel builds need
to byteswap.

[jejb: fix checkpatch errors]
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] esas2r: Remove null test for stack allocated fw_coredump_buffer
Bradley Grove [Thu, 5 Sep 2013 17:08:00 +0000 (13:08 -0400)]
[SCSI] esas2r: Remove null test for stack allocated fw_coredump_buffer

Reported-by: Dave Jones <davej@redhat.com>
Signed-off-by: Bradley Grove <bgrove@attotech.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] esas2r: coccinelle - Replace memcpy with struct assignment
Bradley Grove [Thu, 29 Aug 2013 19:55:44 +0000 (15:55 -0400)]
[SCSI] esas2r: coccinelle - Replace memcpy with struct assignment

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Bradley Grove <bgrove@attotech.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] esas2r: smatch - Remove test for impossible condition (uint8 > 255)
Bradley Grove [Thu, 29 Aug 2013 19:55:43 +0000 (15:55 -0400)]
[SCSI] esas2r: smatch - Remove test for impossible condition (uint8 > 255)

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Bradley Grove <bgrove@attotech.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] esas2r: smatch - Fix overrun due to sprintf appending NULL
Bradley Grove [Thu, 29 Aug 2013 19:55:42 +0000 (15:55 -0400)]
[SCSI] esas2r: smatch - Fix overrun due to sprintf appending NULL

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Bradley Grove <bgrove@attotech.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] esas2r: smatch - Fix dereference that occurs prior to check
Bradley Grove [Thu, 29 Aug 2013 19:55:40 +0000 (15:55 -0400)]
[SCSI] esas2r: smatch - Fix dereference that occurs prior to check

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Bradley Grove <bgrove@attotech.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] esas2r: smatch - Use biwise rather than logical AND for checking if any bit set
Bradley Grove [Thu, 29 Aug 2013 19:55:39 +0000 (15:55 -0400)]
[SCSI] esas2r: smatch - Use biwise rather than logical AND for checking if any bit set

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Bradley Grove <bgrove@attotech.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] sg: push file descriptor list locking down to per-device locking
Vaughan Cao [Thu, 29 Aug 2013 02:00:39 +0000 (10:00 +0800)]
[SCSI] sg: push file descriptor list locking down to per-device locking

Push file descriptor list locking down to per-device locking. Let sg_index_lock
only protect device lookup.
sdp->detached is also set and checked with this lock held.

Signed-off-by: Vaughan Cao <vaughan.cao@oracle.com>
Acked-by: Douglas Gilbert <dgilbert@interlog.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] sg: checking sdp->detached isn't protected when open
Vaughan Cao [Thu, 29 Aug 2013 02:00:38 +0000 (10:00 +0800)]
[SCSI] sg: checking sdp->detached isn't protected when open

@detached is set under the protection of sg_index_lock. Without getting the
lock, new sfp will be added during sg removal and there is no chance for it
to be picked out. So check with sg_index_lock held in sg_add_sfp().

Signed-off-by: Vaughan Cao <vaughan.cao@oracle.com>
Acked-by: Douglas Gilbert <dgilbert@interlog.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] sg: no need sg_open_exclusive_lock
Vaughan Cao [Thu, 29 Aug 2013 02:00:37 +0000 (10:00 +0800)]
[SCSI] sg: no need sg_open_exclusive_lock

Open exclusive check is protected by o_sem, no need sg_open_exclusive_lock.
@exclude is used to record which type of rwsem we are holding.

Signed-off-by: Vaughan Cao <vaughan.cao@oracle.com>
Acked-by: Douglas Gilbert <dgilbert@interlog.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] sg: use rwsem to solve race during exclusive open
Vaughan Cao [Thu, 29 Aug 2013 02:00:36 +0000 (10:00 +0800)]
[SCSI] sg: use rwsem to solve race during exclusive open

A race condition may happen if two threads are both trying to open the same sg
with O_EXCL simultaneously. It's possible that they both find fsds list is
empty and get_exclude(sdp) returns 0, then they both call set_exclude() and
break out from wait_event_interruptible and resume open.

Now use rwsem to protect this process. Exclusive open gets write lock and
others get read lock. The lock will be held until file descriptor is closed.
This also leads 'exclude' only a status rather than a check mark.

Signed-off-by: Vaughan Cao <vaughan.cao@oracle.com>
Acked-by: Douglas Gilbert <dgilbert@interlog.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] scsi_debug: fix logical block provisioning support when unmap_alignment != 0
Akinobu Mita [Mon, 26 Aug 2013 13:08:41 +0000 (22:08 +0900)]
[SCSI] scsi_debug: fix logical block provisioning support when unmap_alignment != 0

Commit b90ebc3d5c41c9164ae04efd2e4f8204c2a186f1 ("[SCSI] scsi_debug:
fix logical block provisioning support") fixed several issues with
logical block provisioning support, but it still doesn't properly fix
the cases when unmap_alignment > 0.

For example, load scsi_debug module with the following module parameters
and make all blocks mapped by filling the storage with zero.

        # modprobe scsi_debug lbpu=1 unmap_alignment=1 unmap_granularity=4
        # dd if=/dev/zero of=$DEV

Then, try to unmap the first unmappable blocks at lba=1, but GET LBA STATUS
unexpectedly reports that the last UNMAP has done nothing.

        # sg_unmap --lba=1 --num=4 $DEV
        # sg_get_lba_status --lba=1 $DEV
        descriptor LBA: 0x0000000000000001  blocks: 16383  mapped

The problem is in map_index_to_lba(), which should return the first
LBA which is corresponding to a given index of provisioning map
(map_storep).

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Acked-by: "Martin K. Petersen" <martin.petersen@oracle.com>
Acked-by: Douglas Gilbert <dgilbert@interlog.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] scsi_debug: fix endianness bug in sdebug_build_parts()
Akinobu Mita [Mon, 26 Aug 2013 13:08:40 +0000 (22:08 +0900)]
[SCSI] scsi_debug: fix endianness bug in sdebug_build_parts()

With module parameter num_parts > 0, partition table is built on the
ramdisk storage when loading the driver.  Unfortunately, there is an
endianness bug in sdebug_build_parts().  So the partition table is not
correctly initialized on big-endian systems.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Tested-by: Martin Peschke <mpeschke@linux.vnet.ibm.com>
Acked-by: Douglas Gilbert <dgilbert@interlog.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Update the driver version to 8.06.00.08-k.
Saurav Kashyap [Tue, 27 Aug 2013 05:37:55 +0000 (01:37 -0400)]
[SCSI] qla2xxx: Update the driver version to 8.06.00.08-k.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: print MAC via %pMR.
Andy Shevchenko [Tue, 27 Aug 2013 05:37:54 +0000 (01:37 -0400)]
[SCSI] qla2xxx: print MAC via %pMR.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Correction to message ids.
Saurav Kashyap [Tue, 27 Aug 2013 05:37:53 +0000 (01:37 -0400)]
[SCSI] qla2xxx: Correction to message ids.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Correctly print out/in mailbox registers.
Joe Carnuccio [Fri, 23 Aug 2013 14:25:37 +0000 (07:25 -0700)]
[SCSI] qla2xxx: Correctly print out/in mailbox registers.

At mailbox/buffer debug level, print the correct values of the
outgoing and incoming mailbox registers.

Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Add a new interface to update versions.
Sawan Chandak [Tue, 27 Aug 2013 05:37:51 +0000 (01:37 -0400)]
[SCSI] qla2xxx: Add a new interface to update versions.

On any Adapter when we flash through FC/FCoE without card reset option it still
shows the Running FW version in Flashed FW version. This new interface will be
used by API to instruct the driver to update its cache versions.

Signed-off-by: Sawan Chandak <sawan.chandak@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Move queue depth ramp down message to i/o debug level.
Chad Dupuis [Tue, 27 Aug 2013 05:37:50 +0000 (01:37 -0400)]
[SCSI] qla2xxx: Move queue depth ramp down message to i/o debug level.

Unless there is a need to observe them, the queue depth ramp up/down messages
are a nuisance and may cause the system to become unresponsive so move it a
non-default logging level.

Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Select link initialization option bits from current operating mode.
Joe Carnuccio [Tue, 27 Aug 2013 05:37:49 +0000 (01:37 -0400)]
[SCSI] qla2xxx: Select link initialization option bits from current operating mode.

Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Add loopback IDC-TIME-EXTEND aen handling support.
Santosh Vernekar [Tue, 27 Aug 2013 05:37:48 +0000 (01:37 -0400)]
[SCSI] qla2xxx: Add loopback IDC-TIME-EXTEND aen handling support.

Earlier IDC-TIME-EXTEND aen was a nop and ignored by driver.
We now have to handle the aen so that other protocol drivers can use time
extension during some loopback operations.

Signed-off-by: Santosh Vernekar <santosh.vernekar@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Set default critical temperature value in cases when ISPFX00 firmware...
Armen Baloyan [Tue, 27 Aug 2013 05:37:47 +0000 (01:37 -0400)]
[SCSI] qla2xxx: Set default critical temperature value in cases when ISPFX00 firmware doesn't provide it

Signed-off-by: Armen Baloyan <armen.baloyan@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: QLAFX00 make over temperature AEN handling informational, add log...
Armen Baloyan [Tue, 27 Aug 2013 05:37:46 +0000 (01:37 -0400)]
[SCSI] qla2xxx: QLAFX00 make over temperature AEN handling informational, add log for normal temperature AEN

Signed-off-by: Armen Baloyan <armen.baloyan@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Correct Interrupt Register offset for ISPFX00
Armen Baloyan [Tue, 27 Aug 2013 05:37:45 +0000 (01:37 -0400)]
[SCSI] qla2xxx: Correct Interrupt Register offset for ISPFX00

Signed-off-by: Armen Baloyan <armen.baloyan@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Remove handling of Shutdown Requested AEN from qlafx00_process_aen().
Armen Baloyan [Tue, 27 Aug 2013 05:37:44 +0000 (01:37 -0400)]
[SCSI] qla2xxx: Remove handling of Shutdown Requested AEN from qlafx00_process_aen().

Signed-off-by: Armen Baloyan <armen.baloyan@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Send all AENs for ISPFx00 to above layers.
Armen Baloyan [Tue, 27 Aug 2013 05:37:43 +0000 (01:37 -0400)]
[SCSI] qla2xxx: Send all AENs for ISPFx00 to above layers.

Signed-off-by: Armen Baloyan <armen.baloyan@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Add changes in initialization for ISPFX00 cards with BIOS
Armen Baloyan [Tue, 27 Aug 2013 05:37:42 +0000 (01:37 -0400)]
[SCSI] qla2xxx: Add changes in initialization for ISPFX00 cards with BIOS

Signed-off-by: Armen Baloyan <armen.baloyan@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Add changes to support extended IOs for ISPFX00
Armen Baloyan [Tue, 27 Aug 2013 05:37:41 +0000 (01:37 -0400)]
[SCSI] qla2xxx: Add changes to support extended IOs for ISPFX00

Signed-off-by: Armen Baloyan <armen.baloyan@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Add missing FCP statistics to sysfs interface.
Joe Carnuccio [Tue, 27 Aug 2013 05:37:40 +0000 (01:37 -0400)]
[SCSI] qla2xxx: Add missing FCP statistics to sysfs interface.

Add the missing FCP statistics to sysfs.
Add reset FCP statistics functionality via sysfs.

Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Make log message that prints when a completion status requires a...
Chad Dupuis [Tue, 27 Aug 2013 05:37:39 +0000 (01:37 -0400)]
[SCSI] qla2xxx: Make log message that prints when a completion status requires a port down more readable.

Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Add critical temperature handling for ISPFX00.
Armen Baloyan [Tue, 27 Aug 2013 05:37:38 +0000 (01:37 -0400)]
[SCSI] qla2xxx: Add critical temperature handling for ISPFX00.

Signed-off-by: Armen Baloyan <armen.baloyan@qlogic.com>
Acked-by: Srinivasa Rao <srinivasa.rao@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Notify ISPFX00 firmware when driver is unloaded or system is shut...
Armen Baloyan [Tue, 27 Aug 2013 05:37:37 +0000 (01:37 -0400)]
[SCSI] qla2xxx: Notify ISPFX00 firmware when driver is unloaded or system is shut down.

Signed-off-by: Armen Baloyan <armen.baloyan@qlogic.com>
Acked-by: Srinivasa Rao <srinivasa.rao@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Reconfigure thermal temperature.
Joe Carnuccio [Tue, 27 Aug 2013 05:37:36 +0000 (01:37 -0400)]
[SCSI] qla2xxx: Reconfigure thermal temperature.

For supported ISPS, Read asic temperature by calling the
GET PARAMS (type C) mailbox command.

Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Add setting of driver version string for vendor application.
Joe Carnuccio [Tue, 27 Aug 2013 05:37:35 +0000 (01:37 -0400)]
[SCSI] qla2xxx: Add setting of driver version string for vendor application.

Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Remove QL_DEBUG_LEVEL_17 defines from qla_nx.c.
Chad Dupuis [Tue, 27 Aug 2013 05:37:34 +0000 (01:37 -0400)]
[SCSI] qla2xxx: Remove QL_DEBUG_LEVEL_17 defines from qla_nx.c.

Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Add ISPFX00 specific bus reset routine.
Armen Baloyan [Tue, 27 Aug 2013 05:37:33 +0000 (01:37 -0400)]
[SCSI] qla2xxx: Add ISPFX00 specific bus reset routine.

Signed-off-by: Armen Baloyan <armen.baloyan@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Perform warm reset every 2 minutes if firmware load fails for ISPFX00.
Armen Baloyan [Tue, 27 Aug 2013 05:37:32 +0000 (01:37 -0400)]
[SCSI] qla2xxx: Perform warm reset every 2 minutes if firmware load fails for ISPFX00.

Signed-off-by: Armen Baloyan <armen.baloyan@qlogic.com>
Acked-by: Srinivasa Rao <srinivasa.rao@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Set factory reset recovery timeout to 10 min. for ISPFX00.
Armen Baloyan [Tue, 27 Aug 2013 05:37:31 +0000 (01:37 -0400)]
[SCSI] qla2xxx: Set factory reset recovery timeout to 10 min. for ISPFX00.

Signed-off-by: Armen Baloyan <armen.baloyan@qlogic.com>
Acked-by: Srinivasa Rao <srinivasa.rao@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Correct multiqueue offset calculations.
Andrew Vasquez [Tue, 27 Aug 2013 05:37:30 +0000 (01:37 -0400)]
[SCSI] qla2xxx: Correct multiqueue offset calculations.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Fix incorrect test after list_for_each_entry() exits.
Joe Carnuccio [Tue, 27 Aug 2013 05:37:29 +0000 (01:37 -0400)]
[SCSI] qla2xxx: Fix incorrect test after list_for_each_entry() exits.

list_for_each_entry() never leaves the iterator pointing to null.

Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Add support for ISP8044.
Atul Deshmukh [Tue, 27 Aug 2013 05:37:28 +0000 (01:37 -0400)]
[SCSI] qla2xxx: Add support for ISP8044.

[jejb: checkpatch fixes]
Signed-off-by: Atul Deshmukh <atul.deshmukh@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla2xxx: Print some variables to hexadecimal string via %*phN format
Oleksandr Khoshaba [Tue, 27 Aug 2013 05:37:27 +0000 (01:37 -0400)]
[SCSI] qla2xxx: Print some variables to hexadecimal string via %*phN format

The patch changes a specifier used to output some variables. Instead of using
stack for each byte the '%*ph[CN]' allows to take a one pointer and prints
entire buffer as a hexadecimal string with the separator ':' or ''.

Signed-off-by: Oleksandr Khoshaba <Oleksandr.Khoshaba@gmail.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] mpt3sas: Remove phys on topology change
Jan Vesely [Thu, 1 Aug 2013 10:01:31 +0000 (12:01 +0200)]
[SCSI] mpt3sas: Remove phys on topology change

Signed-off-by: Jan Vesely <jvesely@redhat.com>
Acked-by: Sreekanth Reddy <Sreekanth.Reddy@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] mpt2sas: Remove phys on topology change.
Jan Vesely [Thu, 1 Aug 2013 10:01:30 +0000 (12:01 +0200)]
[SCSI] mpt2sas: Remove phys on topology change.

Signed-off-by: Jan Vesely <jvesely@redhat.com>
Acked-by: Sreekanth Reddy <Sreekanth.Reddy@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] bfa: firmware update to 3.2.1.1
Rasesh Mody [Fri, 23 Aug 2013 23:05:57 +0000 (16:05 -0700)]
[SCSI] bfa: firmware update to 3.2.1.1

This patch updates the firmware to address the thermal notification issue

Signed-off-by: Rasesh Mody <rmody@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] esas2r: ATTO Technology ExpressSAS 6G SAS/SATA RAID Adapter Driver
Bradley Grove [Fri, 23 Aug 2013 14:35:45 +0000 (10:35 -0400)]
[SCSI] esas2r: ATTO Technology ExpressSAS 6G SAS/SATA RAID Adapter Driver

This is a new driver for ATTO Technology's ExpressSAS series of hardware RAID
adapters.  It supports the following adapters:

    - ExpressSAS R60F
    - ExpressSAS R680
    - ExpressSAS R608
    - ExpressSAS R644

Signed-off-by: Bradley Grove <bgrove@attotech.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] eata_pio: off by one in eata_pio_detect()
Dan Carpenter [Fri, 23 Aug 2013 12:11:31 +0000 (15:11 +0300)]
[SCSI] eata_pio: off by one in eata_pio_detect()

Smatch complains that the reg_IRQ[] array only has MAXIRQ (16) elements
so we are one space beyond the end of the array here.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla4xxx: Update driver version to 5.04.00-k1
Vikas Chaudhary [Fri, 23 Aug 2013 07:40:21 +0000 (03:40 -0400)]
[SCSI] qla4xxx: Update driver version to 5.04.00-k1

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla4xxx: Return error if minidump data collection fails
Vikas Chaudhary [Fri, 23 Aug 2013 07:40:20 +0000 (03:40 -0400)]
[SCSI] qla4xxx: Return error if minidump data collection fails

Return error from function qla4_8xxx_collect_md_data()
if minidump data collection fails.

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla4xxx: Fix the minidump data collection check in for loop
Santosh Vernekar [Fri, 23 Aug 2013 07:40:19 +0000 (03:40 -0400)]
[SCSI] qla4xxx: Fix the minidump data collection check in for loop

Signed-off-by: Santosh Vernekar <santosh.vernekar@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla4xxx: Add pex-dma support for capturing minidump
Santosh Vernekar [Fri, 23 Aug 2013 07:40:18 +0000 (03:40 -0400)]
[SCSI] qla4xxx: Add pex-dma support for capturing minidump

Add pex-dma support for ISP8324 and ISP8042 to improve
the minidump capture time.

Signed-off-by: Santosh Vernekar <santosh.vernekar@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] zfcp: enable FCP hardware data router by default
Steffen Maier [Thu, 22 Aug 2013 15:49:34 +0000 (17:49 +0200)]
[SCSI] zfcp: enable FCP hardware data router by default

Enabling the data router support by default
can increase performance in certain situations.
It is safe to do so and tolerated in LPAR and under z/VM
in case there is no data router support in that environment.

Signed-off-by: Steffen Maier <maier@linux.vnet.ibm.com>
Reviewed-by: Martin Peschke <mpeschke@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] zfcp: dead code removal
Martin Peschke [Thu, 22 Aug 2013 15:49:33 +0000 (17:49 +0200)]
[SCSI] zfcp: dead code removal

Get rid of unused function zfcp_fsf_get_req and corresponding
prototype definition.

Commit a54ca0f62f953898b05549391ac2a8a4dad6482b in v2.6.28
"[SCSI] zfcp: Redesign of the debug tracing for HBA records."
accidentally introduced this code which was dead in the first place.

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>
11 years ago[SCSI] zfcp: cleanup use of obsolete strict_strto* functions
Martin Peschke [Thu, 22 Aug 2013 15:49:32 +0000 (17:49 +0200)]
[SCSI] zfcp: cleanup use of obsolete strict_strto* functions

strict_strtoul and friends are obsolete. Use kstrtoul functions
instead.

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>
11 years ago[SCSI] zfcp: consistently use appropriate SBAL flag definitions
Martin Peschke [Thu, 22 Aug 2013 15:49:31 +0000 (17:49 +0200)]
[SCSI] zfcp: consistently use appropriate SBAL flag definitions

minor cleanup for status read request

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>
11 years ago[SCSI] mpt3sas: Added a driver module parameter max_msix_vectors
Sreekanth Reddy [Wed, 14 Aug 2013 12:53:20 +0000 (18:23 +0530)]
[SCSI] mpt3sas: Added a driver module parameter max_msix_vectors

Added a driver module parameter max_msix_vectors. Using this module parameter
the maximum number of MSI-X vectors could be set.

The number of MSI-X vectors used would be the minimum of MSI-X vectors
supported by the HBA, the number of CPU cores and the value set to
max_msix_vectors module parameter.

The default value of this module parameter is set to 8. The default value of
this parameter is set to 8 inorder to reduce the amount of memory required for
Reply Descriptor Post queue.  This is because with the higher MSI-X vectors,
some times kernel is not able to allocate the requested amount of memory and
crash is observed. To overcome this problem, the default value is set to 8.

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla4xxx: Update driver version to 5.04.00-k0
Vikas Chaudhary [Fri, 16 Aug 2013 11:03:05 +0000 (07:03 -0400)]
[SCSI] qla4xxx: Update driver version to 5.04.00-k0

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla4xxx: Update Copyright header
Vikas Chaudhary [Fri, 16 Aug 2013 11:03:04 +0000 (07:03 -0400)]
[SCSI] qla4xxx: Update Copyright header

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla4xxx: Implementation of ACB configuration during Loopback for ISP8042
Nilesh Javali [Fri, 16 Aug 2013 11:03:03 +0000 (07:03 -0400)]
[SCSI] qla4xxx: Implementation of ACB configuration during Loopback for ISP8042

While loopback diagnostic is in progress, disable the ACB which resets
all the active connections to target. Disable ACB would filter out all
the DHCP multicast and broadcast packets which otherwise cause the
diagnostic test to take longer time to complete or failures in some
other cases.

Signed-off-by: Nilesh Javali <nilesh.javali@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] qla4xxx: Added support for ISP8042
Vikas Chaudhary [Fri, 16 Aug 2013 11:03:02 +0000 (07:03 -0400)]
[SCSI] qla4xxx: Added support for ISP8042

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] mpt2sas: Bump driver version to v16.100.00.00
Sreekanth Reddy [Thu, 25 Jul 2013 06:03:40 +0000 (11:33 +0530)]
[SCSI] mpt2sas: Bump driver version to v16.100.00.00

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] mpt2sas: Fix for kernel panic when driver loads with HBA connected to non...
Sreekanth Reddy [Thu, 25 Jul 2013 06:02:51 +0000 (11:32 +0530)]
[SCSI] mpt2sas: Fix for kernel panic when driver loads with HBA connected to non LUN 0 configured expander

With some enclosures when LUN 0 is not created but LUN 1 or LUN X is created
then SCSI scan procedure calls target_alloc, slave_alloc call back functions
for LUN 0 and slave_destory() for same LUN 0.

In these kind of cases within slave_destroy, pointer to scsi_target in
_sas_device structure is set to NULL, following which when slave_alloc for
LUN 1 is called then starget would not be set properly for this LUN.
So, scsi_target pointer pointing to NULL value would lead to a crash later
in the discovery procedure.

To solve this issue set the sas_device's scsi_target pointer to scsi_device's
scsi_target if it is NULL earlier in slave_alloc callback function.

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] mpt2sas: when Async scanning is enabled then while scanning, devices are remov...
Sreekanth Reddy [Thu, 25 Jul 2013 06:01:12 +0000 (11:31 +0530)]
[SCSI] mpt2sas: when Async scanning is enabled then while scanning, devices are removed but their transport layer entries are not removed

When Async scanning mode is enabled and device scanning is in progress then
devices should not be removed. But in actuality, devices are removed but
their transport layer entries are not removed. This causes error to add
the same device to the transport layer after host reset or diagnostic
reset.

So, in this patch, modified the code in such a way that device is not removed
when Async scanning mode is enabled and device scanning is in progress.

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] mpt2sas: Infinite loop can occur if MPI2_IOCSTATUS_CONFIG_INVALID_PAGE is...
Sreekanth Reddy [Thu, 25 Jul 2013 05:59:45 +0000 (11:29 +0530)]
[SCSI] mpt2sas: Infinite loop can occur if MPI2_IOCSTATUS_CONFIG_INVALID_PAGE is not returned

Infinite loop can occur if IOCStatus is not equal to
MPI2_IOCSTATUS_CONFIG_INVALID_PAGE value in the while loops in functions
_scsih_search_responding_sas_devices,
_scsih_search_responding_raid_devices and
_scsih_search_responding_expanders

So, Instead of checking for MPI2_IOCSTATUS_CONFIG_INVALID_PAGE value,
in this patch code is modified to check for IOCStatus not equals to
MPI2_IOCSTATUS_SUCCESS to break the while loop.

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] mpt2sas: The copyright in driver sources is updated for the year 2013
Sreekanth Reddy [Thu, 25 Jul 2013 05:58:01 +0000 (11:28 +0530)]
[SCSI] mpt2sas: The copyright in driver sources is updated for the year 2013

The copyright in driver sources is updated for the year 2013.

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] mpt2sas: MPI2 Rev X (2.00.16) specifications
Sreekanth Reddy [Thu, 25 Jul 2013 05:56:56 +0000 (11:26 +0530)]
[SCSI] mpt2sas: MPI2 Rev X (2.00.16) specifications

Change set in MPI2 Rev x specification and 2.00.26 header files

1. Added two new AbortType values for TargetModeAbort Request: one to abort
   all IOs from a single initiator and other to abort only Command IUs.

2. Added Use Slot Information during Port Enable Event Reply flag to the Flags
   field of Manufacturing Page 7.

3. Added OEM Identifier to BiosOptions bits of BIOS Page 1.

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] mpt2sas: Change in MPI2_RAID_ACTION_SYSTEM_SHUTDOWN_INITIATED notification...
Sreekanth Reddy [Thu, 25 Jul 2013 05:55:57 +0000 (11:25 +0530)]
[SCSI] mpt2sas: Change in MPI2_RAID_ACTION_SYSTEM_SHUTDOWN_INITIATED notification methodology

The intent of this patch is to perform a graceful shutdown of target drives even if
volume doesn't exits. Changes done in this patch

1. Removed the check for the presence of volumes before sending down
   MPI2_RAID_ACTION_SYSTEM_SHUTDOWN_INITIATED. Therefore, this RAID action
   would be sent if the card is IR Firmware.

2. The MPI2_RAID_ACTION_SYSTEM_SHUTDOWN_INITIATED is sent even when the
   system undergoes suspend (in addition to remove/shutdown which was already
   present)

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] mpt2sas: Null pointer deference possibility in mpt2sas_ctl_event_callback...
Sreekanth Reddy [Thu, 25 Jul 2013 05:54:35 +0000 (11:24 +0530)]
[SCSI] mpt2sas: Null pointer deference possibility in mpt2sas_ctl_event_callback function

Added a check to identify if mpi_reply is NULL in mpt2sas_ctl_event_callback()
and return without proceeding if it is the case.

Also modified the following functions to return void instead of 0 or 1
as returning those values from events perspective doesn't make sense.
* _base_async_event()
* mpt2sas_ctl_event_callback()
* mpt2sas_scsih_event_callback()

Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] hpsa: fix warning with smp_processor_id() in preemptible
John Kacur [Fri, 26 Jul 2013 14:06:18 +0000 (16:06 +0200)]
[SCSI] hpsa: fix warning with smp_processor_id() in preemptible

 section Signed-off-by: John Kacur <jkacur@redhat.com>

On a 3.6-rt (real-time patch) kernel we are seeing the following BUG
However, it appears to be relevant for non-realtime (mainline) as well.

[   49.688847] hpsa 0000:03:00.0: hpsa0: <0x323a> at IRQ 67 using DAC
[   49.749928] scsi0 : hpsa
[   49.784437] BUG: using smp_processor_id() in preemptible [00000000
00000000] code: kworker/u:0/6
[   49.784465] caller is enqueue_cmd_and_start_io+0x5a/0x100 [hpsa]
[   49.784468] Pid: 6, comm: kworker/u:0 Not tainted
3.6.11.5-rt37.52.el6rt.x86_64.debug #1
[   49.784471] Call Trace:
[   49.784512]  [<ffffffff812abe83>] debug_smp_processor_id+0x123/0x150
[   49.784520]  [<ffffffffa009043a>] enqueue_cmd_and_start_io+0x5a/0x100
[hpsa]
[   49.784529]  [<ffffffffa00905cb>]
hpsa_scsi_do_simple_cmd_core+0xeb/0x110 [hpsa]
[   49.784537]  [<ffffffff812b09c8>] ? swiotlb_dma_mapping_error+0x18/0x30
[   49.784544]  [<ffffffff812b09c8>] ? swiotlb_dma_mapping_error+0x18/0x30
[   49.784553]  [<ffffffffa0090701>]
hpsa_scsi_do_simple_cmd_with_retry+0x91/0x280 [hpsa]
[   49.784562]  [<ffffffffa0093558>]
hpsa_scsi_do_report_luns.clone.2+0xd8/0x130 [hpsa]
[   49.784571]  [<ffffffffa00935ea>]
hpsa_gather_lun_info.clone.3+0x3a/0x1a0 [hpsa]
[   49.784580]  [<ffffffffa00963df>] hpsa_update_scsi_devices+0x11f/0x4f0
[hpsa]
[   49.784592]  [<ffffffff81592019>] ? sub_preempt_count+0xa9/0xe0
[   49.784601]  [<ffffffffa00968ad>] hpsa_scan_start+0xfd/0x150 [hpsa]
[   49.784613]  [<ffffffff8158cba8>] ? rt_spin_lock_slowunlock+0x78/0x90
[   49.784626]  [<ffffffff813b04d7>] do_scsi_scan_host+0x37/0xa0
[   49.784632]  [<ffffffff813b05da>] do_scan_async+0x1a/0x30
[   49.784643]  [<ffffffff8107c4ab>] async_run_entry_fn+0x9b/0x1d0
[   49.784655]  [<ffffffff8106ae92>] process_one_work+0x1f2/0x620
[   49.784661]  [<ffffffff8106ae20>] ? process_one_work+0x180/0x620
[   49.784668]  [<ffffffff8106d4fe>] ? worker_thread+0x5e/0x3a0
[   49.784674]  [<ffffffff8107c410>] ? async_schedule+0x20/0x20
[   49.784681]  [<ffffffff8106d5d3>] worker_thread+0x133/0x3a0
[   49.784688]  [<ffffffff8106d4a0>] ? manage_workers+0x190/0x190
[   49.784696]  [<ffffffff81073236>] kthread+0xa6/0xb0
[   49.784707]  [<ffffffff815970a4>] kernel_thread_helper+0x4/0x10
[   49.784715]  [<ffffffff81082a7c>] ? finish_task_switch+0x8c/0x110
[   49.784721]  [<ffffffff8158e44b>] ? _raw_spin_unlock_irq+0x3b/0x70
[   49.784727]  [<ffffffff8158e85d>] ? retint_restore_args+0xe/0xe
[   49.784734]  [<ffffffff81073190>] ? kthreadd+0x1e0/0x1e0
[   49.784739]  [<ffffffff815970a0>] ? gs_change+0xb/0xb

-------------------

This is caused by
enqueue_cmd_and_start_io()->
        set_performant_mode()->
                smp_processor_id()
Which if you have debugging enabled calls debug_processor_id() and triggers the warning.

The code here is
 c->Header.ReplyQueue = smp_processor_id() % h->nreply_queues;

Since it is not critical that the code complete on the same processor,
but the cpu is a hint used in generating the ReplyQueue and will still work if
the cpu migrates or is preempted, it is safe to use the raw_smp_processor_id()
to surpress the false positve warning.

Signed-off-by: John Kacur <jkacur@redhat.com>
Acked-by: Stephen Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] IB/iser: Add Discovery support
Or Gerlitz [Thu, 8 Aug 2013 10:44:29 +0000 (13:44 +0300)]
[SCSI] IB/iser: Add Discovery support

To run discovery over iSER we need to advertize the CAP_TEXT_NEGO capability
towards user space. Also need to make sure the login RX buffer is posted when
SendTargets TEXT PDUs are sent. For that end, we use a setting of the
ISCSI_PARAM_DISCOVERY_SESS iscsi param as an indication that this is
discovery session.

Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] pm8001: clean up unnecessary MSI/MSI-X capability find
Yijing Wang [Thu, 8 Aug 2013 13:10:21 +0000 (21:10 +0800)]
[SCSI] pm8001: clean up unnecessary MSI/MSI-X capability find

PCI core will initialize device MSI/MSI-X capability in
pci_msi_init_pci_dev(). So device driver should use
pci_dev->msi_cap/msix_cap to determine whether the device
support MSI/MSI-X instead of using
pci_find_capability(pci_dev, PCI_CAP_ID_MSI/MSIX).
Access to PCIe device config space again will consume more time.

Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Acked-by: lindar_liu <lindar_liu@usish.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] pm80xx: Fix for 32 bit compilation warning
Anand Kumar Santhanam [Mon, 5 Aug 2013 08:46:52 +0000 (14:16 +0530)]
[SCSI] pm80xx: Fix for 32 bit compilation warning

Signed-off-by: Anandkumar.Santhanam@pmcs.com
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] mpt3sas: fix cleanup on controller resource mapping failure
Joe Lawrence [Thu, 8 Aug 2013 20:45:39 +0000 (16:45 -0400)]
[SCSI] mpt3sas: fix cleanup on controller resource mapping failure

If mpt3sas_base_map_resources takes an early error path then its
counterpart, mpt3sas_base_free_resources needs to be careful about
cleaning up:

  1 - _base_mask_interrupts and _base_make_ioc_ready require memory
      mapped I/O registers, make sure that this is true.

  2 - _base_free_irq iterates over the adapter's reply_queue_list, so
      move this list head initialization out of _base_enable_msix to
      _scsih_probe so this will always be safe.

  3 - check that the controller PCI device and its BARs have been
      enabled before disabling them.

Signed-off-by: Joe Lawrence <joe.lawrence@stratus.com>
Acked-by: Sreekanth Reddy <Sreekanth.Reddy@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] mpt2sas: fix cleanup on controller resource mapping failure
Joe Lawrence [Thu, 8 Aug 2013 20:45:38 +0000 (16:45 -0400)]
[SCSI] mpt2sas: fix cleanup on controller resource mapping failure

If mpt2sas_base_map_resources takes an early error path then its
counterpart, mpt2sas_base_free_resources needs to be careful about
cleaning up:

  1 - _base_mask_interrupts and _base_make_ioc_ready require memory
      mapped I/O registers, make sure that this is true.

  2 - _base_free_irq iterates over the adapter's reply_queue_list, so
      move this list head initialization out of _base_enable_msix to
      _scsih_probe so this will always be safe.

  3 - check that the controller PCI device and its BARs have been
      enabled before disabling them.

Signed-off-by: Joe Lawrence <joe.lawrence@stratus.com>
Acked-by: Sreekanth Reddy <Sreekanth.Reddy@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
11 years ago[SCSI] Generate uevents on certain unit attention codes
Ewan D. Milne [Thu, 8 Aug 2013 19:07:48 +0000 (15:07 -0400)]
[SCSI] Generate uevents on certain unit attention codes

Generate a uevent when the following Unit Attention ASC/ASCQ
codes are received:

    2A/01  MODE PARAMETERS CHANGED
    2A/09  CAPACITY DATA HAS CHANGED
    38/07  THIN PROVISIONING SOFT THRESHOLD REACHED
    3F/03  INQUIRY DATA HAS CHANGED
    3F/0E  REPORTED LUNS DATA HAS CHANGED

Log kernel messages when the following Unit Attention ASC/ASCQ
codes are received that are not as specific as those above:

    2A/xx  PARAMETERS CHANGED
    3F/xx  TARGET OPERATING CONDITIONS HAVE CHANGED

Added logic to set expecting_lun_change for other LUNs on the target
after REPORTED LUNS DATA HAS CHANGED is received, so that duplicate
uevents are not generated, and clear expecting_lun_change when a
REPORT LUNS command completes, in accordance with the SPC-3
specification regarding reporting of the 3F 0E ASC/ASCQ UA.

[jejb: remove SPC3 test in scsi_report_lun_change and some docbook fixes and
       unused variable fix, both reported by Fengguang Wu]
Signed-off-by: Ewan D. Milne <emilne@redhat.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>