deliverable/linux.git
12 years ago[SCSI] lpfc 8.3.28: Add Loopback support for SLI4 adapters
James Smart [Tue, 13 Dec 2011 18:23:09 +0000 (13:23 -0500)] 
[SCSI] lpfc 8.3.28: Add Loopback support for SLI4 adapters

- Add Basic support for SLI4 Loopback.
  (CR 124951, 125766, 124951, 125843, 125832, 125843)
- Added missing protection in setting/clearing of phba->link_flag bit
  field (CR 125994)
- Use link type and link number obtained from READ_CONFIG mailbox
  command. (CR 126264)

Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com>
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] lpfc 8.3.28: Critical Miscellaneous fixes
James Smart [Tue, 13 Dec 2011 18:22:37 +0000 (13:22 -0500)] 
[SCSI] lpfc 8.3.28: Critical Miscellaneous fixes

- Make lpfc_sli4_pci_mem_unset interface type aware (CR 124390)
- Convert byte count to word count when calling __iowrite32_copy (CR 122550)
- Checked the ERR1 and ERR2 registers for error attention due to SLI
  Port state affected by forced debug dump. (CR 122986, 122426, 124859)
- Use the lpfc_readl routine instead of the readl for the port status
  register read in lpfc_handle_eratt_s4 (CR 125403)
- Call lpfc_sli4_queue_destroy inside of lpfc_sli4_brdreset before doing
  a pci function reset (CR 125124, 125168, 125572, 125622)
- Zero out the HBQ when it is allocated (CR 125663)
- Alter port reset log messages to indicate error type (CR 125989)
- Added proper NULL pointer checking to all the places that accessing
  the queue memory (CR 125832)

Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com>
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] Lpfc 8.3.28: FC and SCSI Discovery Fixes
James Smart [Tue, 13 Dec 2011 18:22:17 +0000 (13:22 -0500)] 
[SCSI] Lpfc 8.3.28: FC and SCSI Discovery Fixes

FC and SCSI Discovery Fixes:

- Clear the virtual fabrics bit (word 1 bit 30) when sending the FLOGI
  and FDISC. (CR 124339)
- Return a MLQUEUE_DEVICE_BUSY if the driver detects that an I/O is being
  retried too quickly (CR 124668)
- Remove NDLP reference put in lpfc_cmpl_els_logo_acc for all but fabric
  nodes (CR 123924)
- Only retry FDISCs every second and stop retrying after devloss number
  of retries (CR 13939)
- Check to see if vports are unloading before adding them to the vport
  work array. (CR 124996)
- Fixed illegal state transition during driver unload (CR 124191)
- Added missing protection on setting/clearing of vport->fc_flag bit (CR 126002)
- Set NPIV flag in lpfc_mbx_process_link_up for all ports sli3 and
  above. (CR 126094)
- Clear FCP command bytes that are not used. (CR 126209)

Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com>
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] lpfc 8.3.28: Add support for ABTS failure handling
James Smart [Tue, 13 Dec 2011 18:21:57 +0000 (13:21 -0500)] 
[SCSI] lpfc 8.3.28: Add support for ABTS failure handling

Add support for ABTS failure handling:

- Add asynchronous ABTS notification event feature to driver (CR 124578)
- Change driver message 3092 and 3116 to KERN_WARNING (CR 124768)
- Alter the SCR ELS command to use the temporary RPI and the
  Destination DID for SLI4-FC (CR 126070)

Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com>
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] lpfc 8.3.28: SLI fixes and added SLI4 support
James Smart [Tue, 13 Dec 2011 18:21:35 +0000 (13:21 -0500)] 
[SCSI] lpfc 8.3.28: SLI fixes and added SLI4 support

Adapter (SLI) interface fixes:

- Modify WQ handling to use entry_repost (CR 123981)
- Fix for ABTS.  Do not free original IOCB whenever ABTS fails. (CR 115829)
- Check board for FCoE before reading FCoE paramaters (CR124731)
- Add support for SLI4 FC Loop mode (CR 124721)
- Add support for resource count changes during fw reset. (CR 125888, 125675)
- Increase CQE count from 256 to 1024. (CR 126149)

Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com>
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] lpfc 8.3.28: Miscellaneous fixes in sysfs and mgmt interfaces
James Smart [Tue, 13 Dec 2011 18:20:45 +0000 (13:20 -0500)] 
[SCSI] lpfc 8.3.28: Miscellaneous fixes in sysfs and mgmt interfaces

Miscellaneous fixes in sysfs and mgmt interfaces:

- Added SLI4 INTF_TYPE and SLI_FAMILY as sub-field to the fwrev sysfs
  attribute (CR 124103)
- Added a sysfs attribute "protocol" to report SLI4 port link protocol
  type (CR 124102)
- Increment mix-and-match minor number by 1 for added "protocol" sysfs
  attribute. (124102)
- Move the link speed check into the generic sli3/sli4 code
  path. (CR 124185, 124122)
- Deleted check for inExtWLen (CR 122523)
- Add the word "offline" to message 2889 (CR 124385)
- Conditionalize the firmware upgrade/downgrade so that it is only
  attempted for SLI4 type 2 boards (CR 124406)
- Return an error if the mbox sysfs is called. (CR 124210)
- When port_state is less than LPFC_VPORT_READY, report
  FC_PORTSTATE_BYPASSED (CR 120018)
- Added driver support for performing persistent linkdown based on
  configure region 23 (CR 124534)
- Added restore state and error log when sysfs board_mode attribute
  access failed (CR 124158)
- Added support for SLI4_CONFIG non-embedded COMN_GET_CNTL_ADDL_ATTR
  pass-through (CR 124466)
- Rejecting un-supported multi-buffer mailbox commands (CR 124771)
- Byte swap the extended data request and response data for extended
  mailbox data (CR 125081)

Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com>
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] mpt2sas: Removed redundant calling of _scsih_probe_devices() from _scsih_probe
nagalakshmi.nandigama@lsi.com [Tue, 13 Dec 2011 03:59:15 +0000 (09:29 +0530)] 
[SCSI] mpt2sas: Removed redundant calling of _scsih_probe_devices() from _scsih_probe

Removed redundant calling of _scsih_probe_devices() from _scsih_probe as
it is getting called from _scsih_scan_finished.

Also moved the function scsi_scan_host(shost) to get called after the
volumes on warp drive are reported to the OS. Otherwise by the time
the (ioc->hide_drives) flags is set, the volumes on warp drive
are reported to the OS already.

Also modified the initialization of reply queues only in case of driver load
time in the function _base_make_ioc_operational().

Signed-off-by: Nagalakshmi Nandigama <nagalakshmi.nandigama@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] mac_scsi: Remove obsolete IRQ_FLG_* users
Geert Uytterhoeven [Sun, 11 Dec 2011 09:04:51 +0000 (10:04 +0100)] 
[SCSI] mac_scsi: Remove obsolete IRQ_FLG_* users

The m68k core irq code stopped honoring these flags during the irq
restructuring in 2006.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] qla4xxx: Update driver version to 5.02.00-k10
Vikas Chaudhary [Fri, 2 Dec 2011 06:42:14 +0000 (22:42 -0800)] 
[SCSI] qla4xxx: Update driver version to 5.02.00-k10

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] qla4xxx: check for FW alive before calling chip_reset
Shyam Sunder [Fri, 2 Dec 2011 06:42:13 +0000 (22:42 -0800)] 
[SCSI] qla4xxx: check for FW alive before calling chip_reset

Check for firmware alive and do premature completion of
mbox commands in case of FW hung before doing chip_reset

Signed-off-by: Shyam Sunder <shyam.sunder@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
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>
12 years ago[SCSI] qla4xxx: Fix qla4xxx_dump_buffer to dump buffer correctly
Vikas Chaudhary [Fri, 2 Dec 2011 06:42:12 +0000 (22:42 -0800)] 
[SCSI] qla4xxx: Fix qla4xxx_dump_buffer to dump buffer correctly

KERN_INFO in printk adding new line character that mess-up
dump print format. Remove KERN_INFO to fix dump format.

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] qla4xxx: Fix the IDC locking mechanism
Nilesh Javali [Fri, 2 Dec 2011 06:42:11 +0000 (22:42 -0800)] 
[SCSI] qla4xxx: Fix the IDC locking mechanism

This ensures the transition of dev_state from COLD to
INITIALIZING is within lock and atomic.

Signed-off-by: Nilesh Javali <nilesh.javali@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] qla4xxx: Wait for disable_acb before doing set_acb
Vikas Chaudhary [Fri, 2 Dec 2011 06:42:10 +0000 (22:42 -0800)] 
[SCSI] qla4xxx: Wait for disable_acb before doing set_acb

In function qla4xxx_iface_set_param wait for disable_acb to
complete so that set_acb will not fail.

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] qla4xxx: Don't recover adapter if device state is FAILED
Sarang Radke [Fri, 2 Dec 2011 06:42:09 +0000 (22:42 -0800)] 
[SCSI] qla4xxx: Don't recover adapter if device state is FAILED

Multiple reset request don't get handled correctly as
the driver tries to recover adapter which is in FAILED state.

Signed-off-by: Sarang Radke <sarang.radke@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] qla4xxx: fix call trace on rmmod with ql4xdontresethba=1
Sarang Radke [Tue, 6 Dec 2011 10:34:10 +0000 (02:34 -0800)] 
[SCSI] qla4xxx: fix call trace on rmmod with ql4xdontresethba=1

abort all active commands from eh_host_reset in-case
of ql4xdontresethba=1

Fix following call trace:-
Nov 21 14:50:47 172.17.140.111 qla4xxx 0000:13:00.4: qla4_8xxx_disable_msix: qla4xxx (rsp_q)
Nov 21 14:50:47 172.17.140.111 qla4xxx 0000:13:00.4: PCI INT A disabled
Nov 21 14:50:47 172.17.140.111 slab error in kmem_cache_destroy(): cache `qla4xxx_srbs': Can't free all objects
Nov 21 14:50:47 172.17.140.111 Pid: 9154, comm: rmmod Tainted: G           O 3.2.0-rc2+ #2
Nov 21 14:50:47 172.17.140.111 Call Trace:
Nov 21 14:50:47 172.17.140.111  [<c051231a>] ? kmem_cache_destroy+0x9a/0xb0
Nov 21 14:50:47 172.17.140.111  [<c0489c4a>] ? sys_delete_module+0x14a/0x210
Nov 21 14:50:47 172.17.140.111  [<c04fd552>] ? do_munmap+0x202/0x280
Nov 21 14:50:47 172.17.140.111  [<c04a6d4e>] ? audit_syscall_entry+0x1ae/0x1d0
Nov 21 14:50:47 172.17.140.111  [<c083019f>] ? sysenter_do_call+0x12/0x28
Nov 21 14:51:50 172.17.140.111 SLAB: cache with size 64 has lost its name
Nov 21 14:51:50 172.17.140.111 iscsi: registered transport (qla4xxx)
Nov 21 14:51:50 172.17.140.111 qla4xxx 0000:13:00.4: PCI INT A -> GSI 28 (level, low) -> IRQ 28

Signed-off-by: Sarang Radke <sarang.radke@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] qla4xxx: Fix CPU lockups when ql4xdontresethba set
Mike Hernandez [Fri, 2 Dec 2011 06:42:07 +0000 (22:42 -0800)] 
[SCSI] qla4xxx: Fix CPU lockups when ql4xdontresethba set

Fix issue where CPU lockup is seen when ql4xdontresethba is set and
driver is "stuck" in NEED_RESET state handler.

Signed-off-by: Mike Hernandez <michael.hernandez@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] qla4xxx: Perform context resets in case of context failures.
Vikas Chaudhary [Fri, 2 Dec 2011 06:42:06 +0000 (22:42 -0800)] 
[SCSI] qla4xxx: Perform context resets in case of context failures.

For 4032, context reset was the same as chip reset, and any firmware
issue was recovered by performing a chip reset.
For 82xx, the iSCSI firmware runs along with FCoE and the NIC
firmware contexts, and an error encountered doesnot essentially mean
that a chip reset is necessary.

Perform Chip resets only in the following cases:
1. Mailbox system error.
2. Mailbox command timeout.
3. fw_heartbeat_counter counter stops incrementing.

For all other cases, only perform a context reset.
1. Command Completion with an invalid srb.
2. Other mailbox failures.

Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Signed-off-by: Shyam Sunder <shyam.sunder@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] iscsi class: export pid of process that created
Mike Christie [Mon, 5 Dec 2011 22:44:01 +0000 (16:44 -0600)] 
[SCSI] iscsi class: export pid of process that created

There could be multiple userspace entities creating/destroying/
recoverying sessions and also the kernel's iscsi drivers could
be doing this too. If the userspace apps do try to manage the kernel
ones it can get the driver/fw out of sync and cause the user to
loose the root disk, oopses or ping ponging becasue userspace
wants to do one thing but the kernel manager thought we
are trying to do another.

This patch fixes the problem by just exporting the pid of
the entity that created the session. Userspace programs like
iscsid, iscsiadm, iscsistart, qlogic's tools, etc, can then
figure out which sessions they own and only manage them.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] mpt2sas: Remove unused duplicate diag_buffer_enable param
Roland Dreier [Wed, 30 Nov 2011 18:05:50 +0000 (10:05 -0800)] 
[SCSI] mpt2sas: Remove unused duplicate diag_buffer_enable param

Commit 921cd8024b90 ("[SCSI] mpt2sas: New feature - Fast Load
Support") moved handling of the diag_buffer_enable module parameter
from mpt2sas_base.c to mpt2sas_scsih.c, but it left an old copy of the
parameter in mpt2sas_base.c.  Remove the unused stub.

Signed-off-by: Roland Dreier <roland@purestorage.com>
Acked-by: "Nandigama, Nagalakshmi" <Nagalakshmi.Nandigama@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] mpt2sas: Fix possible integer truncation of cpu_count
Roland Dreier [Thu, 1 Dec 2011 00:30:33 +0000 (16:30 -0800)] 
[SCSI] mpt2sas: Fix possible integer truncation of cpu_count

When computing reply_queue_count (the number of MSI-X vectors to use),
the driver does

ioc->reply_queue_count = min_t(u8, ioc->cpu_count,
    ioc->msix_vector_count);

However, on a big machine, ioc->cpu_count could be outside the range
that fits in a u8; eg a system with 256 CPUs will end up
reply_queue_count set to 0.

Fix this by calculating the minimum as ints and then letting the
assignment to reply_queue_count handle integer demotion.

Signed-off-by: Roland Dreier <roland@purestorage.com>
Acked-by: "Nandigama, Nagalakshmi" <Nagalakshmi.Nandigama@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] mpt2sas: Fix leak on mpt2sas_base_attach() error path
Roland Dreier [Thu, 1 Dec 2011 01:14:22 +0000 (17:14 -0800)] 
[SCSI] mpt2sas: Fix leak on mpt2sas_base_attach() error path

Commit 911ae9434f83 ("[SCSI] mpt2sas: Added NUNA IO support in driver
which uses multi-reply queue support of the HBA") added new
allocations to the beginning of mpt2sas_base_attach(), which means
directly returning an error on failure of mpt2sas_base_map_resources()
will leak those allocations.

Fix this by doing "goto out_free_resources" in this place too, as the
rest of the function does.

Signed-off-by: Roland Dreier <roland@purestorage.com>
Acked-by: "Nandigama, Nagalakshmi" <Nagalakshmi.Nandigama@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] mpt2sas : Bump driver vesion to 12.100.00.00
nagalakshmi.nandigama@lsi.com [Thu, 1 Dec 2011 02:23:13 +0000 (07:53 +0530)] 
[SCSI] mpt2sas : Bump driver vesion to 12.100.00.00

Bump driver vesion to 12.100.00.00

Signed-off-by: Nagalakshmi Nandigama <nagalakshmi.nandigama@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] mpt2sas : Fix for memory allocation error for large host credits
nagalakshmi.nandigama@lsi.com [Thu, 1 Dec 2011 02:23:08 +0000 (07:53 +0530)] 
[SCSI] mpt2sas : Fix for memory allocation error for large host credits

The amount of memory required for tracking chain buffers is rather
large, and when the host credit count is big, memory allocation
failure occurs inside __get_free_pages.

The fix is to limit the number of chains to 100,000.  In addition,
the number of host credits is limited to 30,000 IOs. However this
limitation can be overridden this using the command line option
max_queue_depth.  The algorithm for calculating the
reply_post_queue_depth is changed so that it is equal to
(reply_free_queue_depth + 16), previously it was (reply_free_queue_depth * 2).

Signed-off-by: Nagalakshmi Nandigama <nagalakshmi.nandigama@lsi.com>
Cc: stable@kernel.org
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] mpt2sas: Do not retry a timed out direct IO for warpdrive
nagalakshmi.nandigama@lsi.com [Thu, 1 Dec 2011 02:23:02 +0000 (07:53 +0530)] 
[SCSI] mpt2sas: Do not retry a timed out direct IO for warpdrive

When an I/O request to a WarpDrive is timed out by SML and if the
I/O request to the WarpDrive is sent as direct I/O then the aborted
direct I/O will be retried as normal Volume I/O and which results
in failure of Target Reset and results in host reset.

The fix is to not retry a failed IO to volume when the original
IO was sent as direct IO with an ioc status
MPI2_IOCSTATUS_SCSI_TASK_TERMINATED.

Signed-off-by: Nagalakshmi Nandigama <nagalakshmi.nandigama@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] mpt2sas: Release spinlock for the raid device list before blocking it
nagalakshmi.nandigama@lsi.com [Thu, 1 Dec 2011 02:22:56 +0000 (07:52 +0530)] 
[SCSI] mpt2sas: Release spinlock for the raid device list before blocking it

Added code to release the spinlock that is used to protect the
raid device list before calling a function that can block. The
blocking was causing a reschedule, and subsequently it is tried
to acquire the same lock, resulting in a panic (NMI Watchdog
detecting a CPU lockup).

Signed-off-by: Nagalakshmi Nandigama <nagalakshmi.nandigama@lsi.com>
Cc: stable@kernel.org
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] mpt2sas: MPI next revision header update
nagalakshmi.nandigama@lsi.com [Thu, 1 Dec 2011 02:22:49 +0000 (07:52 +0530)] 
[SCSI] mpt2sas: MPI next revision header update

1)Removed Power Management Control option for PCIe link.
2)Added RAID Action for performing a compatibility check. Added
product-specific range to RAID Action values.
3)Added PhysicalPort field to SAS Device Status Change Event data.
4)Added SpinupFlags field containing a Disable Spin-up bit to the
SpinupGroupParameters fields of SAS IO Unit Page 4.

Signed-off-by: Nagalakshmi Nandigama <nagalakshmi.nandigama@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] mpt2sas: Added support for customer specific branding
nagalakshmi.nandigama@lsi.com [Thu, 1 Dec 2011 02:22:42 +0000 (07:52 +0530)] 
[SCSI] mpt2sas: Added support for customer specific branding

Signed-off-by: Nagalakshmi Nandigama <nagalakshmi.nandigama@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] mpt2sas: Increase max transfer support from 4MB to 16MB
nagalakshmi.nandigama@lsi.com [Thu, 1 Dec 2011 02:22:08 +0000 (07:52 +0530)] 
[SCSI] mpt2sas: Increase max transfer support from 4MB to 16MB

Increase max transfer support from 4MB to 16MB.
This is done by changing the shost->max_sector from 8192 to 32767

Signed-off-by: Nagalakshmi Nandigama <nagalakshmi.nandigama@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] mpt2sas: Support for greater than 2TB capacity WarpDrive
nagalakshmi.nandigama@lsi.com [Thu, 1 Dec 2011 02:21:55 +0000 (07:51 +0530)] 
[SCSI] mpt2sas: Support for greater than 2TB capacity WarpDrive

The driver is modified to allow access to the greater than 2TB WarpDrive
and properly handle direct-io mapping for WarpDrive volumes greater than 2TB.

Signed-off-by: Nagalakshmi Nandigama <nagalakshmi.nandigama@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] mpt2sas: Bump driver version to 11.100.00.00
nagalakshmi.nandigama@lsi.com [Thu, 1 Dec 2011 02:14:10 +0000 (07:44 +0530)] 
[SCSI] mpt2sas: Bump driver version to 11.100.00.00

Signed-off-by: Nagalakshmi Nandigama <nagalakshmi.nandigama@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] mpt2sas: Rearrange the the code so that the completion queues are initialized...
nagalakshmi.nandigama@lsi.com [Thu, 1 Dec 2011 02:13:58 +0000 (07:43 +0530)] 
[SCSI] mpt2sas: Rearrange the the code so that the completion queues are initialized prior to sending the request to controller firmware

Signed-off-by: Nagalakshmi Nandigama <nagalakshmi.nandigama@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] mpt2sas: Do not set sas_device->starget to NULL from the slave_destroy callbac...
nagalakshmi.nandigama@lsi.com [Thu, 1 Dec 2011 02:13:50 +0000 (07:43 +0530)] 
[SCSI] mpt2sas: Do not set sas_device->starget to NULL from the slave_destroy callback when all the LUNS have been deleted

If the sas_device->starget to NULL from slave_destroy callback for LUN=1
even though LUN=0 exist, results in entire target getting deleted.
To resolve the issue, the driver should only set sas_device->starget to
NULL when all the LUNS have been deleted from the slave_destroy.

Signed-off-by: Nagalakshmi Nandigama <nagalakshmi.nandigama@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] mpt2sas: MPI next revision header update
nagalakshmi.nandigama@lsi.com [Thu, 1 Dec 2011 02:13:37 +0000 (07:43 +0530)] 
[SCSI] mpt2sas: MPI next revision header update

1) Added product specific range of ImageType macros for the Extended
   Image Header.

2) Added Flags field and related defines to
   MPI2_TOOLBOX_ISTWI_READ_WRITE_REQUEST to support automatic
   reserve/release and page addressing.

Signed-off-by: Nagalakshmi Nandigama <nagalakshmi.nandigama@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] mpt2sas: Adding support for customer specific branding
nagalakshmi.nandigama@lsi.com [Thu, 1 Dec 2011 02:13:00 +0000 (07:43 +0530)] 
[SCSI] mpt2sas: Adding support for customer specific branding

Signed-off-by: Nagalakshmi Nandigama <nagalakshmi.nandigama@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] mpt2sas: When IOs are terminated, update the result to DID_SOFT_ERROR to avoid...
nagalakshmi.nandigama@lsi.com [Thu, 1 Dec 2011 02:12:40 +0000 (07:42 +0530)] 
[SCSI] mpt2sas: When IOs are terminated, update the result to DID_SOFT_ERROR to avoid infinite resets

Signed-off-by: Nagalakshmi Nandigama <nagalakshmi.nandigama@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] mpt2sas: Better handling DEAD IOC (PCI-E LInk down) error condition
nagalakshmi.nandigama@lsi.com [Thu, 1 Dec 2011 02:12:04 +0000 (07:42 +0530)] 
[SCSI] mpt2sas: Better handling DEAD IOC (PCI-E LInk down) error condition

Detection of Dead IOC has been done in fault_reset_work thread.

If IOC Doorbell is 0xFFFFFFFF, it will be detected as non-operation/DEAD IOC.
When a DEAD IOC is detected, the code is modified to remove that IOC and
all its attached devices from OS.
The PCI layer API pci_remove_bus_device() is called to remove the dead IOC.

Signed-off-by: Nagalakshmi Nandigama <nagalakshmi.nandigama@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] be2iscsi: cleanup a min_t() call
Dan Carpenter [Mon, 26 Sep 2011 06:23:37 +0000 (09:23 +0300)] 
[SCSI] be2iscsi: cleanup a min_t() call

"sense_len" was declared as int type but actually it only stores a
u16 value that comes from hardware.  The cast to u16 in min_t()
confuses static analysis because it truncates the int to u16 so I've
fixed the declaration to reflect that "sense_len" is just a u16.

Also there was a call to cpu_to_be16() which I've changed to
be16_to_cpu().  The functions are equivalent, but obviously the
hardware is big endian and we're doing the min_t() comparison on CPU
endian values.

This whole patch is just a cleanup and doesn't affect how the code
works.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Acked-by: Jayamohan Kallickal <Jayamohan.kallickal@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] hpsa: add the Smart Array 5i to the kdump blacklist
Tomas Henzl [Mon, 28 Nov 2011 14:39:55 +0000 (15:39 +0100)] 
[SCSI] hpsa: add the Smart Array 5i to the kdump blacklist

The '5i' controller freezes when a kdump is attemted.
This patch admits it and adds the controller
to the unresetable list.

Signed-off-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] hpsa: Add IRQF_SHARED back in for the non-MSI(X) interrupt handler
Stephen M. Cameron [Mon, 28 Nov 2011 16:15:20 +0000 (10:15 -0600)] 
[SCSI] hpsa: Add IRQF_SHARED back in for the non-MSI(X) interrupt handler

IRQF_SHARED is required for older controllers that don't support MSI(X)
and which may end up sharing an interrupt.  All the controllers hpsa
normally supports have MSI(X) capability, but older controllers may be
encountered via the hpsa_allow_any=1 module parameter.

Also remove deprecated IRQF_DISABLED.

Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] mptsas: Add device ID for SAS1068_820XELP.
Chandrakala Chavva [Fri, 18 Nov 2011 22:13:42 +0000 (14:13 -0800)] 
[SCSI] mptsas: Add device ID for SAS1068_820XELP.

Signed-off-by: Chandrakala Chavva <cchavva@caviumnetworks.com>
Signed-off-by: David Daney <david.daney@cavium.com>
Acked-by: "Nandigama, Nagalakshmi" <Nagalakshmi.Nandigama@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] fusion: ensure NUL-termination of MptCallbacksName elements
Ferenc Wagner [Thu, 25 Aug 2011 12:44:57 +0000 (14:44 +0200)] 
[SCSI] fusion: ensure NUL-termination of MptCallbacksName elements

Using strlcpy instead of memcpy makes the strlen() calls superfluous
and also ensures zero-termination of the copied string.
At the same time get rid of the magic constant 50.

Actually, I can't see why copying the callback name is necessary
instead of simply storing a pointer to it (just like to the callback
function itself), but that goes beyond the scope of this fix.

Signed-off-by: Ferenc Wagner <wferi@niif.hu>
Acked-by: "Nandigama, Nagalakshmi" <Nagalakshmi.Nandigama@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] qla2xxx: remove redundant semicolon
Jesper Juhl [Sun, 20 Nov 2011 21:34:15 +0000 (22:34 +0100)] 
[SCSI] qla2xxx: remove redundant semicolon

One ';' at the end of the return statement is enough.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Acked-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] qla2xxx: Do not check for minidump when device state is QLA82XX_DEV_READY.
Chad Dupuis [Fri, 18 Nov 2011 17:03:22 +0000 (09:03 -0800)] 
[SCSI] qla2xxx: Do not check for minidump when device state is QLA82XX_DEV_READY.

Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] qla2xxx: Move initialization of some variables before iospace_config.
Chad Dupuis [Fri, 18 Nov 2011 17:03:21 +0000 (09:03 -0800)] 
[SCSI] qla2xxx: Move initialization of some variables before iospace_config.

Some variables need to be initialized before we config PCI I/O config space
or else strange firmware initialization errors may occur.

Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] qla2xxx: Ensure there's enough request-queue space for passthru IOCBs.
Andrew Vasquez [Fri, 18 Nov 2011 17:03:20 +0000 (09:03 -0800)] 
[SCSI] qla2xxx: Ensure there's enough request-queue space for passthru IOCBs.

The driver should ensure there's a sufficient number of IOCBs
to satisfy the number of scatter-gather entries specified in the
command.  Add a 'count' to the control structure, srb_ctx, to use
in qla2x00_alloc_iocbs().

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] qla2xxx: Implement FCP priority tagging for 82xx adapters.
Saurav Kashyap [Fri, 18 Nov 2011 17:03:19 +0000 (09:03 -0800)] 
[SCSI] qla2xxx: Implement FCP priority tagging for 82xx adapters.

This provides a capability to set a priority in the FCP packet.

Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] qla2xxx: Consolidated IOCB processing routines.
Giridhar Malavali [Fri, 18 Nov 2011 17:03:18 +0000 (09:03 -0800)] 
[SCSI] qla2xxx: Consolidated IOCB processing routines.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] qla2xxx: Process marker IOCB request on request queue 0.
Giridhar Malavali [Fri, 18 Nov 2011 17:03:17 +0000 (09:03 -0800)] 
[SCSI] qla2xxx: Process marker IOCB request on request queue 0.

When multiple request queues are created process the marker IOCB request
on request queue 0.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] qla2xxx: Added a new entry to ISP specific function pointers structure.
Giridhar Malavali [Fri, 18 Nov 2011 17:03:16 +0000 (09:03 -0800)] 
[SCSI] qla2xxx: Added a new entry to ISP specific function pointers structure.

Add a new function to ISP specific pointers structure to take care of ISP
specific PCI IO space configuration.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] qla2xxx: Corrected the display of firmware dump availability for ISP82xx.
Giridhar Malavali [Fri, 18 Nov 2011 17:03:15 +0000 (09:03 -0800)] 
[SCSI] qla2xxx: Corrected the display of firmware dump availability for ISP82xx.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] qla2xxx: Corrected the default setting of the help text of Minidump capture...
Giridhar Malavali [Fri, 18 Nov 2011 17:03:14 +0000 (09:03 -0800)] 
[SCSI] qla2xxx: Corrected the default setting of the help text of Minidump capture mask.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] qla2xxx: Corrections to returned sysfs error codes.
Joe Carnuccio [Fri, 18 Nov 2011 17:03:13 +0000 (09:03 -0800)] 
[SCSI] qla2xxx: Corrections to returned sysfs error codes.

Correct the erroneous return codes introduced by the following patch:
"Return sysfs error codes appropriate to conditions".

Signed-off-by: Joe Carnuccio <joe.carnuccio@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] qla2xxx: Correct report-id acquisition check
Giridhar Malavali [Fri, 18 Nov 2011 17:03:12 +0000 (09:03 -0800)] 
[SCSI] qla2xxx: Correct report-id acquisition check

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] qla2xxx: Fix to include FCE data as part of dump.
Giridhar Malavali [Fri, 18 Nov 2011 17:03:11 +0000 (09:03 -0800)] 
[SCSI] qla2xxx: Fix to include FCE data as part of dump.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] qla2xxx: Limit excessive DPC cycles.
Andrew Vasquez [Fri, 18 Nov 2011 17:03:10 +0000 (09:03 -0800)] 
[SCSI] qla2xxx: Limit excessive DPC cycles.

The 'continue' cases neglected to place the thread in an
interruptible state, causing the DPC routine to wake immediately.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] qla2xxx: Only read requested mailbox registers.
Andrew Vasquez [Fri, 18 Nov 2011 17:03:09 +0000 (09:03 -0800)] 
[SCSI] qla2xxx: Only read requested mailbox registers.

When reading the incoming mailbox registers, read only the specified ones.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] qla2xxx: Proper cleanup of pass through commands when firmware returns error.
Giridhar Malavali [Fri, 18 Nov 2011 17:03:08 +0000 (09:03 -0800)] 
[SCSI] qla2xxx: Proper cleanup of pass through commands when firmware returns error.

[jejb: fixed up checkpatch and casting errors]
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] qla2xxx: Update to dynamic logging.
Chad Dupuis [Fri, 18 Nov 2011 17:03:07 +0000 (09:03 -0800)] 
[SCSI] qla2xxx: Update to dynamic logging.

This patch contains minor fixes to our new logging infrastructure:

- Remove extranous messages.
- Re-add 'nexus' and 'hdl' information.
- Adjusted the message ids to fill up the holes.
- Display FCP_CMND priority on update.
- Log only mail box error conditions.
- Do not print "Firmware ready **** FAILED ****" if cable is unplugged.
- Drop noisy 'fw_state...curr time...' message.
- Correct nexus display during abort.
- Add a special case error-logging set to '1'.
- Catagorize I/O exception display handling.
- Correct the bsg msg code printing.
- Dont use dynamic logging after host is removed.

Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] qla2xxx: Make the logging functions verify their arguments and fixed the curre...
Joe Perches [Fri, 18 Nov 2011 17:03:06 +0000 (09:03 -0800)] 
[SCSI] qla2xxx: Make the logging functions verify their arguments and fixed the current broken uses as appropriate.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] qla2xxx: Use less stack to emit logging messages.
Joe Perches [Fri, 18 Nov 2011 17:03:05 +0000 (09:03 -0800)] 
[SCSI] qla2xxx: Use less stack to emit logging messages.

Return early when logging level too low.
Use normal kernel codeing style for function braces.
Add const where appropriate to logging functions.
Remove now unused #define QL_DBG_BUF_LEN.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] bfa: fix endian and bit field check bug
Jing Huang [Wed, 16 Nov 2011 20:29:26 +0000 (12:29 -0800)] 
[SCSI] bfa: fix endian and bit field check bug

Fix some endian issue. __BIGENDIAN is not defined and it needs to be
replaced with __BIG_ENDIAN. Also fixed a bug in bit field access.
These two issues were reported by Dan Carpenter.

Signed-off-by: Jing Huang <huangj@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] bfa: fix formating and checkpatch issues
Jing Huang [Wed, 16 Nov 2011 20:28:49 +0000 (12:28 -0800)] 
[SCSI] bfa: fix formating and checkpatch issues

Fixed code indentation and alignment issues.
Fixed all checkpatch warnings.

Signed-off-by: Jing Huang <huangj@brocade.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] scsi_dh: code cleanup and remove the references to scsi_dev_info
Moger, Babu [Thu, 1 Dec 2011 20:03:12 +0000 (15:03 -0500)] 
[SCSI] scsi_dh: code cleanup and remove the references to scsi_dev_info

All the handlers have now implemented the match function so We don't need to
use scsi_dev_info any more for matching purposes.

Signed-off-by: Babu Moger <babu.moger@netapp.com>
Acked-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] scsi_dh_rdac: Adding the match function for rdac device handler
Moger, Babu [Thu, 1 Dec 2011 20:01:40 +0000 (15:01 -0500)] 
[SCSI] scsi_dh_rdac: Adding the match function for rdac device handler

This patch introduces the match function for rdac device handler. Without
this, sometimes handler attach fails during the device_add. Included check for
TPGS bit before proceeding further. The match function was introduced by
commit 6c3633d08acf514e2e89aa95d2346ce9d64d719a

Signed-off-by: Babu Moger <babu.moger@netapp.com>
Acked-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] scsi_dh_hp_sw: Adding the match function for hp_sw device handler
Moger, Babu [Thu, 1 Dec 2011 20:01:28 +0000 (15:01 -0500)] 
[SCSI] scsi_dh_hp_sw: Adding the match function for hp_sw device handler

This patch introduces the match function for hp_sw device handler.  Included
the check for TPGS bit before proceeding further per Hannes comment.  The
match function was introduced by commit
6c3633d08acf514e2e89aa95d2346ce9d64d719a

Signed-off-by: Babu Moger <babu.moger@netapp.com>
Acked-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] scsi_dh_emc: Add a match function for emc device handler
Moger, Babu [Thu, 1 Dec 2011 20:01:16 +0000 (15:01 -0500)] 
[SCSI] scsi_dh_emc: Add a match function for emc device handler

This patch introduces the match function for emc device handler.  Included
check for TPGS bit before proceeding further.  The match function was
introduced by commit 6c3633d08acf514e2e89aa95d2346ce9d64d719a

Signed-off-by: Babu Moger <babu.moger@netapp.com>
Acked-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] bnx2i: Fixed kernel panic caused by unprotected task->sc->request deref
Eddie Wai [Wed, 7 Dec 2011 06:41:21 +0000 (22:41 -0800)] 
[SCSI] bnx2i: Fixed kernel panic caused by unprotected task->sc->request deref

During session recovery, the conn_stop call will trigger a flush
to all outstanding SCSI cmds in the xmit queue.  This will set
all outstanding task->sc to NULL prior to the session_teardown
call which frees the task memory.

In the bnx2i SCSI response processing path, only the task was being checked
for NULL under the session lock before the task->sc->request dereferencing.
If there are outstanding SCSI cmd responses pending for process, the
following kernel panic can be exposed where task->sc was found to be NULL.

 Call Trace:
[   69.720205]  [<ffffffffa040d0d0>] bnx2i_process_new_cqes+0x290/0x3c0 [bnx2i]
[   69.804289]  [<ffffffffa040d233>] bnx2i_fastpath_notification+0x33/0xa0 [bnx2
i]
[   69.891490]  [<ffffffffa040d37b>] bnx2i_indicate_kcqe+0xdb/0x330 [bnx2i]
[   69.971427]  [<ffffffffa03eac5e>] service_kcqes+0x16e/0x1d0 [cnic]
[   70.045132]  [<ffffffffa03eacea>] cnic_service_bnx2x_kcq+0x2a/0x50 [cnic]
[   70.126105]  [<ffffffffa03ead53>] cnic_service_bnx2x_bh+0x43/0x140 [cnic]
[   70.207081]  [<ffffffff81060676>] tasklet_action+0x66/0x110
[   70.273521]  [<ffffffff8106025f>] __do_softirq+0xef/0x220
[   70.337887]  [<ffffffff81447ebc>] call_softirq+0x1c/0x30

This patch adds the !task->sc check and also protects the sc dereferencing
under the session lock.

Signed-off-by: Eddie Wai <eddie.wai@broadcom.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] qla4xxx: check for failed conn setup
Mike Christie [Fri, 2 Dec 2011 03:38:43 +0000 (21:38 -0600)] 
[SCSI] qla4xxx: check for failed conn setup

iscsi_conn_setup can fail so we must check for NULL being
returned.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] qla4xxx: a small loop fix
Tomas Henzl [Fri, 2 Dec 2011 03:38:42 +0000 (21:38 -0600)] 
[SCSI] qla4xxx: a small loop fix

When the qla4xxx_get_fwddb_entry returns QLA_ERROR
the nex_idx is not updated,
      for (idx = 0; idx < max_ddbs; idx = next_idx) {
                ret = qla4xxx_get_fwddb_entry(ha, idx, NULL, 0, NULL,
                                              &next_idx, &state, &conn_err,
                                                NULL, NULL);
                if (ret == QLA_ERROR)
                        continue;

This means there is a risk that the 'idx < max_ddbs' condition will never
met and the loop will loop forever.
Fix this by explicitly increasing the next_idx in the error condition.

Maybe a break instead of continue is more appropriate, leaving the decision
on the qlogic maintainer.

Signed-off-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] qla4xxx: fix flash/ddb support
Mike Christie [Fri, 2 Dec 2011 03:38:41 +0000 (21:38 -0600)] 
[SCSI] qla4xxx: fix flash/ddb support

With open-iscsi support, target entries persisted in the FLASH were not
login. Added support in the qla4xxx driver to do the login on probe
time to the target entries saved in the FLASH by user.
With this changes upgrade to the new kernel with open-iscsi support in
qla4xxx will ensure users original target entries login on driver load

Signed-off-by: Manish Rangankar <manish.rangankar@qlogic.com>
Signed-off-by: Ravi Anand <ravi.anand@qlogic.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] zfcp: return early from slave_destroy if slave_alloc returned early
Steffen Maier [Fri, 18 Nov 2011 19:00:40 +0000 (20:00 +0100)] 
[SCSI] zfcp: return early from slave_destroy if slave_alloc returned early

zfcp_scsi_slave_destroy erroneously always tried to finish its task
even if the corresponding previous zfcp_scsi_slave_alloc returned
early. This can lead to kernel page faults on accessing uninitialized
fields of struct zfcp_scsi_dev in zfcp_erp_lun_shutdown_wait. Take the
port field of the struct to determine if slave_alloc returned early.

This zfcp bug is exposed by 4e6c82b (in turn fixing f7c9c6b to be
compatible with 21208ae) which can call slave_destroy for a
corresponding previous slave_alloc that did not finish.

This patch is based on James Bottomley's fix suggestion in
http://www.spinics.net/lists/linux-scsi/msg55449.html.

Signed-off-by: Steffen Maier <maier@linux.vnet.ibm.com>
Cc: <stable@kernel.org> #2.6.38+
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] fcoe: Fix preempt count leak in fcoe_filter_frames()
Thomas Gleixner [Fri, 11 Nov 2011 19:52:01 +0000 (20:52 +0100)] 
[SCSI] fcoe: Fix preempt count leak in fcoe_filter_frames()

The error exit path leaks preempt count. Add the missing put_cpu().

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Yi Zou <yi.zou@intel.com>
Cc: stable@kernel.org
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] qla2xxx: Update version number to 8.03.07.12-k.
Chad Dupuis [Fri, 18 Nov 2011 17:02:22 +0000 (09:02 -0800)] 
[SCSI] qla2xxx: Update version number to 8.03.07.12-k.

Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] qla2xxx: Submit all chained IOCBs for passthrough commands on request queue 0.
Giridhar Malavali [Fri, 18 Nov 2011 17:02:21 +0000 (09:02 -0800)] 
[SCSI] qla2xxx: Submit all chained IOCBs for passthrough commands on request queue 0.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] qla2xxx: Correct fc_host port_state display.
Saurav Kashyap [Fri, 18 Nov 2011 17:02:20 +0000 (09:02 -0800)] 
[SCSI] qla2xxx: Correct fc_host port_state display.

[jejb: checkpatch fixes]
Add more fine grain parsing of vha->loop_state to export a more accurate
fc_host port_state.

Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] qla2xxx: Disable generating pause frames when firmware hang detected for ISP82xx.
Giridhar Malavali [Fri, 18 Nov 2011 17:02:19 +0000 (09:02 -0800)] 
[SCSI] qla2xxx: Disable generating pause frames when firmware hang detected for ISP82xx.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] qla2xxx: Clear mailbox busy flag during premature mailbox completion for ISP82xx.
Giridhar Malavali [Fri, 18 Nov 2011 17:02:18 +0000 (09:02 -0800)] 
[SCSI] qla2xxx: Clear mailbox busy flag during premature mailbox completion for ISP82xx.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] qla2xxx: Encapsulate prematurely completing mailbox commands during ISP82xx...
Chad Dupuis [Fri, 18 Nov 2011 17:02:17 +0000 (09:02 -0800)] 
[SCSI] qla2xxx: Encapsulate prematurely completing mailbox commands during ISP82xx firmware hang.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] qla2xxx: Display IPE error message for ISP82xx.
Chad Dupuis [Fri, 18 Nov 2011 17:02:16 +0000 (09:02 -0800)] 
[SCSI] qla2xxx: Display IPE error message for ISP82xx.

[jejb: fixup checkpatch error]
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] qla2xxx: Return the correct value for a mailbox command if 82xx is in reset...
Andrew Vasquez [Fri, 18 Nov 2011 17:02:15 +0000 (09:02 -0800)] 
[SCSI] qla2xxx: Return the correct value for a mailbox command if 82xx is in reset recovery.

We need to return QLA_FUNCTION_TIMEOUT immediately otherwise we mess up the
mailbox command state machine.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] qla2xxx: Enable Minidump by default with default capture mask 0x1f.
Giridhar Malavali [Fri, 18 Nov 2011 17:02:14 +0000 (09:02 -0800)] 
[SCSI] qla2xxx: Enable Minidump by default with default capture mask 0x1f.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] qla2xxx: Stop unconditional completion of mailbox commands issued in interrupt...
Giridhar Malavali [Fri, 18 Nov 2011 17:02:13 +0000 (09:02 -0800)] 
[SCSI] qla2xxx: Stop unconditional completion of mailbox commands issued in interrupt mode during firmware hang.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] qla2xxx: Revert back the request queue mapping to request queue 0.
Giridhar Malavali [Fri, 18 Nov 2011 17:02:12 +0000 (09:02 -0800)] 
[SCSI] qla2xxx: Revert back the request queue mapping to request queue 0.

If there is an error creating multiple response queues then we need to revert
the request queue mapping back to request queue 0.

Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] qla2xxx: Don't call alloc_fw_dump for ISP82XX.
Saurav Kashyap [Fri, 18 Nov 2011 17:02:11 +0000 (09:02 -0800)] 
[SCSI] qla2xxx: Don't call alloc_fw_dump for ISP82XX.

Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] qla2xxx: Check for SCSI status on underruns.
Arun Easi [Fri, 18 Nov 2011 17:02:10 +0000 (09:02 -0800)] 
[SCSI] qla2xxx: Check for SCSI status on underruns.

Signed-off-by: Arun Easi <arun.easi@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] qla2xxx: Remove qla2x00_wait_for_loop_ready function.
Saurav Kashyap [Fri, 18 Nov 2011 17:02:09 +0000 (09:02 -0800)] 
[SCSI] qla2xxx: Remove qla2x00_wait_for_loop_ready function.

This function can wait for 5min under certain scenarios. One of them is when
the port is down from switch and bus reset is issued. The bus reset used to
wait for 5 minutes for the loop and upper layer callers used to hang and give
stack trace because of getting stuck for 120 sec. It is legacy code that was
used when the driver used to do queuing of the commands.

Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years ago[SCSI] mpt2sas: _scsih_smart_predicted_fault uses GFP_KERNEL in interrupt context
Anton Blanchard [Mon, 7 Nov 2011 11:05:21 +0000 (22:05 +1100)] 
[SCSI] mpt2sas: _scsih_smart_predicted_fault uses GFP_KERNEL in interrupt context

_scsih_smart_predicted_fault is called in an interrupt and therefore
must allocate memory using GFP_ATOMIC.

Signed-off-by: Anton Blanchard <anton@samba.org>
Cc: <stable@kernel.org>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
12 years agoLinux 3.2-rc5
Linus Torvalds [Fri, 9 Dec 2011 23:09:32 +0000 (15:09 -0800)] 
Linux 3.2-rc5

12 years agoMerge git://git.samba.org/sfrench/cifs-2.6
Linus Torvalds [Fri, 9 Dec 2011 22:45:44 +0000 (14:45 -0800)] 
Merge git://git.samba.org/sfrench/cifs-2.6

* git://git.samba.org/sfrench/cifs-2.6:
  cifs: check for NULL last_entry before calling cifs_save_resume_key
  cifs: attempt to freeze while looping on a receive attempt
  cifs: Fix sparse warning when calling cifs_strtoUCS
  CIFS: Add descriptions to the brlock cache functions

12 years agoMerge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Fri, 9 Dec 2011 22:45:12 +0000 (14:45 -0800)] 
Merge branch 'x86-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86, efi: Calling __pa() with an ioremap()ed address is invalid
  x86, hpet: Immediately disable HPET timer 1 if rtc irq is masked
  x86/intel_mid: Kconfig select fix
  x86/intel_mid: Fix the Kconfig for MID selection

12 years agoMerge branch 'spi/for-3.2' of git://git.pengutronix.de/git/wsa/linux-2.6
Linus Torvalds [Fri, 9 Dec 2011 22:41:50 +0000 (14:41 -0800)] 
Merge branch 'spi/for-3.2' of git://git.pengutronix.de/git/wsa/linux-2.6

* 'spi/for-3.2' of git://git.pengutronix.de/git/wsa/linux-2.6:
  spi/gpio: fix section mismatch warning
  spi/fsl-espi: disable CONFIG_SPI_FSL_ESPI=m build
  spi/nuc900: Include linux/module.h
  spi/ath79: fix compile error due to missing include

12 years agoMerge branch 'for-linus' of git://neil.brown.name/md
Linus Torvalds [Fri, 9 Dec 2011 16:18:08 +0000 (08:18 -0800)] 
Merge branch 'for-linus' of git://neil.brown.name/md

* 'for-linus' of git://neil.brown.name/md:
  md: raid5 crash during degradation
  md/raid5: never wait for bad-block acks on failed device.
  md: ensure new badblocks are handled promptly.
  md: bad blocks shouldn't cause a Blocked status on a Faulty device.
  md: take a reference to mddev during sysfs access.
  md: refine interpretation of "hold_active == UNTIL_IOCTL".
  md/lock: ensure updates to page_attrs are properly locked.

12 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile
Linus Torvalds [Fri, 9 Dec 2011 16:08:57 +0000 (08:08 -0800)] 
Merge git://git./linux/kernel/git/cmetcalf/linux-tile

* git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
  arch/tile: use new generic {enable,disable}_percpu_irq() routines
  drivers/net/ethernet/tile: use skb_frag_page() API
  asm-generic/unistd.h: support new process_vm_{readv,write} syscalls
  arch/tile: fix double-free bug in homecache_free_pages()
  arch/tile: add a few #includes and an EXPORT to catch up with kernel changes.

12 years agoMerge branch 'iommu/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/joro...
Linus Torvalds [Fri, 9 Dec 2011 16:08:14 +0000 (08:08 -0800)] 
Merge branch 'iommu/fixes' of git://git./linux/kernel/git/joro/iommu

* 'iommu/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
  MAINTAINERS: Update amd-iommu F: patterns
  iommu/amd: Fix typo in kernel-parameters.txt
  iommu/msm: Fix compile error in mach-msm/devices-iommu.c
  Fix comparison using wrong pointer variable in dma debug code

12 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Linus Torvalds [Fri, 9 Dec 2011 16:07:42 +0000 (08:07 -0800)] 
Merge branch 'for-linus' of git://git./linux/kernel/git/tiwai/sound

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: hda/realtek - Fix lost speaker volume controls
  ALSA: hda/realtek - Create "Bass Speaker" for two speaker pins
  ALSA: hda/realtek - Don't create extra controls with channel suffix
  ALSA: hda - Fix remaining VREF mute-LED NID check in post-3.1 changes
  ALSA: hda - Fix GPIO LED setup for IDT 92HD75 codecs
  ASoC: Provide a more complete DMA driver stub
  ASoC: Remove references to corgi and spitz from machine driver document
  ASoC: Make SND_SOC_MX27VIS_AIC32X4 depend on I2C
  ASoC: Fix dependency for SND_SOC_RAUMFELD and SND_PXA2XX_SOC_HX4700
  ASoC: uda1380: Return proper error in uda1380_modinit failure path
  ASoC: kirkwood: Make SND_KIRKWOOD_SOC_OPENRD and SND_KIRKWOOD_SOC_T5325 depend on I2C
  ASoC: Mark WM8994 ADC muxes as virtual
  ALSA: hda/realtek - Fix Oops in alc_mux_select()
  ALSA: sis7019 - give slow codecs more time to reset

12 years agoMerge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Fri, 9 Dec 2011 16:07:24 +0000 (08:07 -0800)] 
Merge branch 'perf-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  perf: Do no try to schedule task events if there are none
  lockdep, kmemcheck: Annotate ->lock in lockdep_init_map()
  perf header: Use event_name() to get an event name
  perf stat: Failure with "Operation not supported"

12 years agosys_getppid: add missing rcu_dereference
Mandeep Singh Baines [Thu, 8 Dec 2011 22:34:44 +0000 (14:34 -0800)] 
sys_getppid: add missing rcu_dereference

In order to safely dereference current->real_parent inside an
rcu_read_lock, we need an rcu_dereference.

Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Pavel Emelyanov <xemul@openvz.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Kees Cook <keescook@chromium.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agorapidio/tsi721: modify PCIe capability settings
Alexandre Bounine [Thu, 8 Dec 2011 22:34:42 +0000 (14:34 -0800)] 
rapidio/tsi721: modify PCIe capability settings

Modify initialization of PCIe capability registers in Tsi721 mport driver:
 - change Completion Timeout value to avoid unexpected data transfer
   aborts during intensive traffic.
 - replace hardcoded offset of PCIe capability block by making it use the
   common function.

This patch is applicable to kernel versions starting from 3.2-rc1.

Signed-off-by: Alexandre Bounine <alexandre.bounine@idt.com>
Cc: Matt Porter <mporter@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agorapidio/tsi721: fix mailbox resource reporting
Alexandre Bounine [Thu, 8 Dec 2011 22:34:36 +0000 (14:34 -0800)] 
rapidio/tsi721: fix mailbox resource reporting

Bug fix for Tsi721 RapidIO mport driver: Tsi721 supports four RapidIO
mailboxes (MBOX0 - MBOX3) as defined by RapidIO specification.  Mailbox
resources has to be properly reported to allow use of all available
mailboxes (initial version reports only MBOX0).

This patch is applicable to kernel versions staring from 3.2-rc1.

Signed-off-by: Alexandre Bounine <alexandre.bounine@idt.com>
Cc: Matt Porter <mporter@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agorapidio/tsi721: switch to dma_zalloc_coherent
Alexandre Bounine [Thu, 8 Dec 2011 22:34:35 +0000 (14:34 -0800)] 
rapidio/tsi721: switch to dma_zalloc_coherent

Replace the pair dma_alloc_coherent()+memset() with the new
dma_zalloc_coherent() added by Andrew Morton for kernel version 3.2

Signed-off-by: Alexandre Bounine <alexandre.bounine@idt.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This page took 0.064603 seconds and 5 git commands to generate.