Re: [PATCH 10/10] ufs: fix DMA mask setting

2013-06-28 Thread Akinobu Mita
2013/6/29 James Bottomley : > On Wed, 2013-06-26 at 22:39 +0530, Santosh Y wrote: >> index 19618c6..431ddb2 100644 >> --- a/drivers/scsi/ufs/ufshcd.c >> +++ b/drivers/scsi/ufs/ufshcd.c >> @@ -1711,6 +1711,25 @@ void ufshcd_remove(struct ufs_hba *hba) >> EXPORT_SYMBOL_GPL(ufshcd_remove); >> >> /**

[patch] [SCSI] megaraid_sas: fix a bug for 64 bit arches

2013-06-28 Thread Dan Carpenter
On 64 bit then -1UL and -1U are not equal, so these conditions don't work as intended and it breaks error handling. Signed-off-by: Dan Carpenter diff --git a/drivers/scsi/megaraid/megaraid_sas_fp.c b/drivers/scsi/megaraid/megaraid_sas_fp.c index 8056eac..4f401f7 100644 --- a/drivers/scsi/megara

Re: [PATCH 10/10] ufs: fix DMA mask setting

2013-06-28 Thread James Bottomley
On Wed, 2013-06-26 at 22:39 +0530, Santosh Y wrote: > index 19618c6..431ddb2 100644 > --- a/drivers/scsi/ufs/ufshcd.c > +++ b/drivers/scsi/ufs/ufshcd.c > @@ -1711,6 +1711,25 @@ void ufshcd_remove(struct ufs_hba *hba) > EXPORT_SYMBOL_GPL(ufshcd_remove); > > /** > + * ufshcd_set_dma_mask - Set dm

Re: [PATCH V1 1/4] scsi_transport_iscsi: Exporting new attrs for iscsi session and connection in sysfs

2013-06-28 Thread James Bottomley
On Wed, 2013-06-26 at 08:11 -0400, vikas.chaudh...@qlogic.com wrote: > From: Adheer Chandravanshi > > Exporting new iSCSI Session and Connection parameters to sysfs This doesn't apply: patching file drivers/scsi/scsi_transport_iscsi.c Hunk #5 FAILED at 3537. Hunk #6 succeeded at 3644 (offset 6

[PATCH V2 0/4] scsi: ufs: Improve UFS error handling

2013-06-28 Thread Sujit Reddy Thumma
The first patch fixes many issues with current task management handling in UFSHCD driver. Others improve error handling in various scenarios. These patches depends on: [PATCH 01/10] scsi: ufs: wrap the i/o access operations [PATCH 02/10] scsi: ufs: amend interrupt configuration [PATCH 03/10] scsi:

[PATCH V2 4/4] scsi: ufs: Improve UFS fatal error handling

2013-06-28 Thread Sujit Reddy Thumma
Error handling in UFS driver is broken and resets the host controller for fatal errors without re-initialization. Correct the fatal error handling sequence according to UFS Host Controller Interface (HCI) v1.1 specification. o Upon determining fatal error condition the host controller may hang f

[PATCH V2 2/4] scsi: ufs: Fix hardware race conditions while aborting a command

2013-06-28 Thread Sujit Reddy Thumma
There is a possible race condition in the hardware when the abort command is issued to terminate the ongoing SCSI command as described below: - A bit in the door-bell register is set in the controller for a new SCSI command. - In some rare situations, before controller get a chance to issue th

[PATCH V2 1/4] scsi: ufs: Fix broken task management command implementation

2013-06-28 Thread Sujit Reddy Thumma
Currently, sending Task Management (TM) command to the card might be broken in some scenarios as listed below: Problem: If there are more than 8 TM commands the implementation returns error to the caller. Fix: Wait for one of the slots to be emptied and send the command. Problem: Som

[PATCH V2 3/4] scsi: ufs: Fix device and host reset methods

2013-06-28 Thread Sujit Reddy Thumma
As of now SCSI initiated error handling is broken because, the reset APIs don't try to bring back the device initialized and ready for further transfers. In case of timeouts, the scsi error handler takes care of handling aborts and resets. Improve the error handling in such scenario by resetting t

[no subject]

2013-06-28 Thread David Carroll
auth 45008867 subscribe linux-scsi \ david.carr...@pmcs.com -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH V2 2/2] scsi: ufs: Add runtime PM helpers for UFS host driver

2013-06-28 Thread Sujit Reddy Thumma
Add runtime PM helpers to suspend/resume the UFS controller device at runtime. Signed-off-by: Sujit Reddy Thumma --- drivers/scsi/ufs/ufshcd-pci.c| 60 ++ drivers/scsi/ufs/ufshcd-pltfrm.c | 41 ++ 2 files changed, 95 insertions(

Re: SCSI vs MN10300: Can get_user() be given an array?

2013-06-28 Thread James Bottomley
On Fri, 2013-06-28 at 17:39 +0100, David Howells wrote: > The MN10300 arch is throwing up an error in the SCSI driver and I'm not sure > whether it needs fixing in the arch - in get_user() - or in the SCSI code. > > The problem is this line in sg_scsi_ioctl(): > > if (get_user(opcode, sic->

[PATCH V2 1/2] scsi: ufs: Add support for host assisted background operations

2013-06-28 Thread Sujit Reddy Thumma
Background operations in the UFS device can be disabled by the host to reduce the response latency of transfer requests. Add support for enabling/disabling the background operations during runtime suspend/resume of the device. If the device is in critical need of BKOPS it will raise an URGENT_BKOP

[PATCH V2 0/2] scsi: ufs: Add support to control UFS device background operations

2013-06-28 Thread Sujit Reddy Thumma
Add host assisted background operations for UFS device and runtime PM helpers for ufshcd platform and pci glue drivers. The background operations are disabled during runtime resume and enabled when the device is idle and runtime suspended. These patches depends on: [PATCH 01/10] scsi: ufs: wrap th

[PATCH V2 2/2] scsi: ufs: Set fDeviceInit flag to initiate device initialization

2013-06-28 Thread Sujit Reddy Thumma
From: Dolev Raviv Allow UFS device to complete its initialization and accept SCSI commands by setting fDeviceInit flag. The device may take time for this operation and hence the host should poll until fDeviceInit flag is toggled to zero. This step is mandated by UFS device specification for devic

[PATCH V2 1/2] scsi: ufs: Add support for sending NOP OUT UPIU

2013-06-28 Thread Sujit Reddy Thumma
As part of device initialization sequence, sending NOP OUT UPIU and waiting for NOP IN UPIU response is mandatory. This confirms that the device UFS Transport (UTP) layer is functional and the host can configure the device with further commands. Add support for sending NOP OUT UPIU to check the dev

[PATCH V2 0/2] Add suport for internal request (NOP and Query Request)

2013-06-28 Thread Sujit Reddy Thumma
This patch series replace the previous Query Request and NOP patches: [PATCH 1/8] scsi: ufs: add support for query [PATCH 6/8] scsi: ufs: Add support for sending NOP OUT UPIU [PATCH 7/8] scsi: ufs: Set fDeviceInit flag to initiate device initialization Major difference - Sending the query

SCSI vs MN10300: Can get_user() be given an array?

2013-06-28 Thread David Howells
The MN10300 arch is throwing up an error in the SCSI driver and I'm not sure whether it needs fixing in the arch - in get_user() - or in the SCSI code. The problem is this line in sg_scsi_ioctl(): if (get_user(opcode, sic->data)) sic points to the following struct: typedef stru

Re: [PATCH 4/7][SCSI] mpt3sas: Infinite loops can occur if MPI2_IOCSTATUS_CONFIG_INVALID_PAGE is not returned

2013-06-28 Thread Bjørn Mork
Sreekanth Reddy writes: > 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 ch

[PATCH v2 12/15] IB/srp: Fail SCSI commands silently

2013-06-28 Thread Bart Van Assche
From: Sebastian Riemer Avoid that path failover in a multipath setup causes the SCSI layer to generate kernel messages about SCSI command failures. This patch speeds up SRP initiator operation significantly when monitoring kernel messages over a serial port. [bvanassche: Changed patch descriptio

Re: [PATCH 7/7] scsi: Add 'eh_deadline' to limit SCSI EH runtime

2013-06-28 Thread Ewan Milne
On Fri, 2013-06-28 at 09:14 +0200, Hannes Reinecke wrote: > >> @@ -232,6 +272,9 @@ int scsi_eh_scmd_add(struct scsi_cmnd *scmd, int > >> eh_flag) > >>if (scsi_host_set_state(shost, SHOST_CANCEL_RECOVERY)) > >>goto out_unlock; > >> > >> + if (sdev->eh_deadline &&

[PATCH v2 08/15] scsi_transport_srp: Add transport layer error handling

2013-06-28 Thread Bart Van Assche
Add the necessary functions in the SRP transport module to allow an SRP initiator driver to implement transport layer error handling similar to the functionality already provided by the FC transport layer. This includes: - Support for implementing fast_io_fail_tmo, the time that should elapse aft

[PATCH v2 07/15] IB/srp: Keep rport as long as the IB transport layer

2013-06-28 Thread Bart Van Assche
Keep the rport data structure around after srp_remove_host() has finished until cleanup of the IB transport layer has finished completely. This is necessary because later patches use the rport pointer inside the queuecommand callback. Without this patch accessing the rport from inside a queuecomman

[PATCH v2 06/15] IB/srp: Maintain a single connection per I_T nexus

2013-06-28 Thread Bart Van Assche
An SRP target is required to maintain a single connection between initiator and target. This means that if the 'add_target' attribute is used to create a second connection to a target that the first connection will be logged out and that the SCSI error handler will kick in. The SCSI error handler w

[PATCH v2 0/15] IB SRP initiator patches for kernel 3.11

2013-06-28 Thread Bart Van Assche
The purpose of this InfiniBand SRP initiator patch series is as follows: - Make the SRP initiator driver better suited for use in a H.A. setup. Speed up failover by reducing the IB RC retry count and by notifying multipathd faster about transport layer failures by adding fast_io_fail_tmo and

Re: [PATCH 1/2] scsi: ufs: Add support for host assisted background operations

2013-06-28 Thread Sujit Reddy Thumma
On 6/26/2013 11:06 PM, Santosh Y wrote: +/** > * ufshcd_memory_alloc - allocate memory for host memory space data >structures > * @hba: per adapter instance > * >@@ -1803,6 +1904,9 @@ ufshcd_transfer_rsp_status(struct ufs_hba *hba, >struct ufshcd_lrb *lrbp) > */ >

Re: [PATCH 1/4] scsi: ufs: Fix broken task management command implementation

2013-06-28 Thread Sujit Reddy Thumma
On 6/27/2013 4:49 PM, Santosh Y wrote: >+ spin_lock_irqsave(host->host_lock, flags); > task_req_descp = hba->utmrdl_base_addr; > task_req_descp += free_slot; > >@@ -2353,38 +2387,39 @@ ufshcd_issue_tm_cmd(struct ufs_hba *hba, > (struct utp_upiu_task_req *) ta

[PATCH 7/7][SCSI] mpt3sas: Bump driver version to v02.100.00.00

2013-06-28 Thread Sreekanth Reddy
Bump driver version to v02.100.00.00. Signed-off-by: Sreekanth Reddy --- drivers/scsi/mpt3sas/mpt3sas_base.h |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.h b/drivers/scsi/mpt3sas/mpt3sas_base.h index 3610647..0ebf5d9 100644 ---

[PATCH 6/7][SCSI] mpt3sas: when async scanning is enabled then while scanning, devices are removed but their transport layer entries are not removed

2013-06-28 Thread Sreekanth Reddy
When Async scanning mode is enabled and device scanning is in progress, 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

[PATCH 5/7][SCSI] mpt3sas: MPI2.5 Rev F v2.5.1.1 specification

2013-06-28 Thread Sreekanth Reddy
Change set in MPI v2.5 Rev F(v2.5.1.1) specification and 2.00.29 header files 1. Added a bit to the IOCExceptions field of the IOCFacts Reply to indicate that the IOC detected a partial memory failure. 2. Added ElapsedSeconds field to RAID Volume Indicator Structure. Added Elapsed Seconds Vali

[PATCH 4/7][SCSI] mpt3sas: Infinite loops can occur if MPI2_IOCSTATUS_CONFIG_INVALID_PAGE is not returned

2013-06-28 Thread Sreekanth Reddy
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_INVAL

[PATCH 3/7][SCSI] mpt3sas: fix for kernel panic when driver loads with HBA conected to non LUN 0 configured expander

2013-06-28 Thread Sreekanth Reddy
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 s

[PATCH 2/7][SCSI] mpt3sas: Updated the Hardware timing requirements

2013-06-28 Thread Sreekanth Reddy
Hardware timing requirements is updated in order to comply with firmware requirement. Signed-off-by: Sreekanth Reddy --- drivers/scsi/mpt3sas/mpt3sas_base.c | 20 +--- 1 files changed, 13 insertions(+), 7 deletions(-) diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drive

[PATCH 1/7][SCSI] mpt3sas: 2013 source code copyright

2013-06-28 Thread Sreekanth Reddy
The Copyright String in all mpt3sas files are changed to 2012-2013. Signed-off-by: Sreekanth Reddy --- drivers/scsi/mpt3sas/Kconfig|2 +- drivers/scsi/mpt3sas/mpt3sas_base.c |2 +- drivers/scsi/mpt3sas/mpt3sas_base.h |2 +- drivers/scsi/mpt3sas/mpt3sa

[PATCH][SCSI] mpt3sas: Description patch

2013-06-28 Thread Sreekanth Reddy
Please consider this patch set fot next kernel release. Signed-off-by: Sreekanth Reddy --- [PATCH 1/7][SCSI] mpt3sas: 2013 source code copyright. [PATCH 2/7][SCSI] mpt3sas: Updated the Hardware timing requirements. [PATCH 3/7][SCSI] mpt3sas: fix for kernel panic when driver loads with HBA cone

Re: [PATCH 7/7] scsi: Add 'eh_deadline' to limit SCSI EH runtime

2013-06-28 Thread Hannes Reinecke
On 06/28/2013 09:29 AM, Bart Van Assche wrote: > On 06/10/13 13:11, Hannes Reinecke wrote: >> +static int sdev_eh_deadline(struct Scsi_Host *shost, >> + unsigned long eh_start) >> +{ >> +if (!shost->eh_deadline) >> +return 0; >> + >> +if (shost->last_reset != 0 && >> +

Re: [PATCH 7/7] scsi: Add 'eh_deadline' to limit SCSI EH runtime

2013-06-28 Thread Bart Van Assche
On 06/10/13 13:11, Hannes Reinecke wrote: +static int sdev_eh_deadline(struct Scsi_Host *shost, + unsigned long eh_start) +{ + if (!shost->eh_deadline) + return 0; + + if (shost->last_reset != 0 && + time_before(shost->last_reset, eh_st

Re: [PATCH 7/7] scsi: Add 'eh_deadline' to limit SCSI EH runtime

2013-06-28 Thread Hannes Reinecke
On 06/27/2013 04:33 PM, Ewan Milne wrote: > The eh_deadline changes allow for a significant improvement > in multipath failover time. It works very well in our testing. > I do have a few corrections, see below: > > On Mon, 2013-06-10 at 13:11 +0200, Hannes Reinecke wrote: >> This patchs adds an '