[PATCH] scsi_dh: convert __ATTR macro to DEVICE_ATTR_RW and snprintf show method cleanup

2015-06-25 Thread Seymour, Shane M
Converted dh_state to use DEVICE_ATTR_RW macro instead of __ATTR. That forced a change to the associated show/store function names and the name of the attribute. Changed usage of snprintf in show function to scnprintf per Documentation/filesystems/sysfs.txt. Signed-off-by: Shane Seymour --- --

scsi_dh: convert __ATTR macro to DEVICE_ATTR_RW and snprintf show method cleanup

2015-06-25 Thread Seymour, Shane M
Converted dh_state to use DEVICE_ATTR_RW macro instead of __ATTR. That forced a change to the associated show/store function names and the name of the attribute. Changed usage of snprintf in show function to scnprintf per Documentation/filesystems/sysfs.txt. Signed-off-by: Shane Seymour --- --

[PATCH] drivers/scsi: fix macro in sg

2015-06-25 Thread 冯力
This patch fix the macro transport_class_to_sdev to the resonable name and use the macro. Signed-off-by: vonnyfly --- drivers/scsi/sg.c |6 +++--- include/scsi/scsi_device.h |2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/sg.c b/drivers/scsi/s

Re: [Patch V2 5/9] [SCSI] aacraid: Tune response path if IsFastPath bit set

2015-06-25 Thread Tomas Henzl
On 06/11/2015 03:42 AM, rajinikanth.panduran...@pmcs.com wrote: > From: Rajinikanth Pandurangan > > Description: > If 'IsFastPath' bit is set, then response path assumes no error > and skips error check. > > Signed-off-by: Rajinikanth Pandurangan > --- > drivers/scsi/aacraid/aa

Re: [Patch V2 2/9] [SCSI] aacraid: Add Power Management support

2015-06-25 Thread Tomas Henzl
On 06/25/2015 06:54 PM, Rajinikanth Pandurangan wrote: > Hello Tomas, > > Please see my response below. > > Thanks, > -Raj P. > > -Original Message- > From: Tomas Henzl [mailto:the...@redhat.com] > Sent: Thursday, June 25, 2015 8:43 AM > To: Rajinikanth Pandurangan; jbottom...@parallels

Re: [PATCH] SCSI-libfc: Delete an unnecessary check before the function call "fc_fcp_ddp_done"

2015-06-25 Thread Vasu Dev
On Wed, 2015-06-24 at 17:54 +0200, SF Markus Elfring wrote: > From: Markus Elfring > Date: Wed, 24 Jun 2015 17:50:32 +0200 > > The fc_fcp_ddp_done() function tests whether its argument is NULL and then > returns immediately. Thus the test around the call is not needed. > > This issue was detecte

Re: [PATCH] bnxfc:Make the function bnx2fc_alloc_work static

2015-06-25 Thread Chad Dupuis
Make sense. Acked-by: Chad Dupuis On Tue, 23 Jun 2015, Nicholas Krause wrote: This makes the function bnx_2fc_alloc_work static now due to this function's only caller being in this particular function's definition/declaration file of bnx2fc_hwi.c. Signed-off-by: Nicholas Krause --- drivers/

[PATCH 06/11] qla2xxx: disable scsi_transport_fc registration in target mode

2015-06-25 Thread Himanshu Madhani
From: Alexei Potashnik There are multiple reasons for disabling this: 1. It provides no functional benefit. We pretty much only get a few more sysfs entries for each port, but all that information is already available from /sys/kernel/debug/target/qla-session-X 2. It already only works in priva

[PATCH 10/11] qla2xxx: delete session if initiator is gone from FW

2015-06-25 Thread Himanshu Madhani
From: Alexei Potashnik 1. Initiator A is logged in with fc_id(1)/loop_id(1) 2. Initiator A re-logs in with fc_id(2)/loop_id(2) 3. Part of old session deletion async logoout for 1/1 is queued 4. Initiator B logs in with fc_id(1)/loop_id(1), starts passing data and creates session. 5. Async logo

[PATCH 02/11] qla2xxx: cleanup cmd in qla workqueue before processing TMR

2015-06-25 Thread Himanshu Madhani
From: Swapnil Nagle Since cmds go into qla_tgt_wq and TMRs don't, it's possible that TMR like TASK_ABORT can be queued over the cmd for which it was meant. To avoid this race, use a per-port list to keep track of cmds that are enqueued to qla_tgt_wq but not yet processed. When a TMR arrives, iter

[PATCH 00/11] qla2xxx: Updates for Target Mode driver

2015-06-25 Thread Himanshu Madhani
Hi James, This series is applied on top of patch series sent on June 10 [PATCH 0/9] qla2xxx: Patches for scsi "misc" branch (http://marc.info/?l=linux-scsi&m=143395156920505&w=2) These set of patches addresses issue with reuse of stale command found in a customer enviorment. Here's sequence o

[PATCH 01/11] qla2xxx: kill sessions/log out initiator on RSCN and port down events

2015-06-25 Thread Himanshu Madhani
From: Roland Dreier To fix some issues talking to ESX, this patch modifies the qla2xxx driver so that it never logs into remote ports. This has the side effect of getting rid of the "rports" entirely, which means we never log out of initiators and never tear down sessions when an initiator goes

[PATCH 11/11] qla2xxx: wait for all conflicts before ack'ing PLOGI

2015-06-25 Thread Himanshu Madhani
From: Alexei Potashnik Until now ack'ing of a new PLOGI has only been delayed if there was an existing session for the same WWN. Ack was released when the session deletion completed. If there was another WWN session with the same fc_id/loop_id pair (aka "conflicting session"), PLOGI was still ac

[PATCH 05/11] qla2xxx: added sess generations to detect RSCN update races

2015-06-25 Thread Himanshu Madhani
From: Alexei Potashnik RSCN processing in qla2xxx driver can run in parallel with ELS/IO processing. As such the decision to remove disappeared fc port's session could be stale, because a new login sequence has occurred since and created a brand new session. Previous mechanism of dealing with th

[PATCH 08/11] qla2xxx: terminate exchange when command is aborted by LIO

2015-06-25 Thread Himanshu Madhani
From: Alexei Potashnik The newly introduced aborted_task TFO callback has to terminate exchange with QLogic driver, since command is being deleted and no status will be queued to the driver at a later point. This patch also moves the burden of releasing one cmd refcount to the aborted_task handl

[PATCH 04/11] qla2xxx: Abort stale cmds on qla_tgt_wq when plogi arrives

2015-06-25 Thread Himanshu Madhani
From: Alexei Potashnik cancel any commands from initiator's s_id that are still waiting on qla_tgt_wq when PLOGI arrives. Cc: Signed-off-by: Alexei Potashnik Acked-by: Quinn Tran Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_target.c | 35 +++

[PATCH 03/11] qla2xxx: delay plogi/prli ack until existing sessions are deleted

2015-06-25 Thread Himanshu Madhani
From: Alexei Potashnik - keep qla_tgt_sess object on the session list until it's freed - modify use of sess->deleted flag to differentiate delayed session deletion that can be cancelled from irreversible one: QLA_SESS_DELETION_PENDING vs QLA_SESS_DELETION_IN_PROGRESS - during IN_PROGRESS de

[PATCH 07/11] qla2xxx: drop cmds/tmrs arrived while session is being deleted

2015-06-25 Thread Himanshu Madhani
From: Alexei Potashnik If a new initiator (different WWN) shows up on the same fcport, old initiator's session is scheduled for deletion. But there is a small window between it being marked with QLA_SESS_DELETION_IN_PROGRESS and qlt_unret_sess getting called when new session's commands will keep

[PATCH 09/11] qla2xxx: Added interface to send ELS commands from driver.

2015-06-25 Thread Himanshu Madhani
Cc: Signed-off-by: Himanshu Madhani Signed-off-by: Giridhar Malavali --- drivers/scsi/qla2xxx/qla_attr.c | 36 +++ drivers/scsi/qla2xxx/qla_dbg.c|5 +- drivers/scsi/qla2xxx/qla_def.h| 19 - drivers/scsi/qla2xxx/qla_gbl.h|2 + drivers/scsi/qla2xxx/qla_inline.h |

RE: [Patch V2 2/9] [SCSI] aacraid: Add Power Management support

2015-06-25 Thread Rajinikanth Pandurangan
Hello Tomas, Please see my response below. Thanks, -Raj P. -Original Message- From: Tomas Henzl [mailto:the...@redhat.com] Sent: Thursday, June 25, 2015 8:43 AM To: Rajinikanth Pandurangan; jbottom...@parallels.com; linux-scsi@vger.kernel.org Cc: aacr...@pmc-sierra.com; Harry Yang; Mah

[PATCH] scsi: storvsc: be more picky about scmnd->sc_data_direction

2015-06-25 Thread Vitaly Kuznetsov
Under the 'default' case in scmnd->sc_data_direction we have 3 options: - DMA_NONE which we handle correctly. - DMA_BIDIRECTIONAL which is never supposed to be set by SCSI stack. - Garbage value. Do WARN() and return -EINVAL in the last two cases. virtio_scsi does BUG_ON() here but it looks like a

Re: [Patch V2 4/9] [SCSI] aacraid: Enable 64-bit write to controller register

2015-06-25 Thread Tomas Henzl
On 06/11/2015 03:42 AM, rajinikanth.panduran...@pmcs.com wrote: > From: Rajinikanth Pandurangan > > Description: > If writeq() not supported, then do atomic two 32bit write > > Signed-off-by: Rajinikanth Pandurangan Reviewed-by: Tomas Henzl Tomas -- To unsubscribe from this list: sen

Re: [Patch V2 3/9] [SCSI] aacraid: Enable MSI interrupt for series-6 controller

2015-06-25 Thread Tomas Henzl
On 06/11/2015 03:42 AM, rajinikanth.panduran...@pmcs.com wrote: > From: Rajinikanth Pandurangan > > Description: > Enable MSI interrupt mode for series-6 controller. What seem problematic to me is that you still keep the module option 'aac_msi' and a poor user might try "IRQ handling. 0=PIC

[PATCHv2 1/1] ipr: Fix invalid array indexing for HRRQ

2015-06-25 Thread Brian King
Updated version per comments from Jiri Slaby. Thanks! 8< Fixes another signed / unsigned array indexing bug in the ipr driver. Currently, when hrrq_index wraps, it becomes a negative number. We do the modulo, but still have a negative number, so we end up indexing backwards in the array. Given w

Re: [PATCH 1/1] ipr: Fix invalid array indexing for HRRQ

2015-06-25 Thread Brian King
On 06/25/2015 09:36 AM, Jiri Slaby wrote: > On 06/25/2015, 03:44 PM, Brian King wrote: >> Fixes another signed / unsigned array indexing bug in the ipr driver. > > Could you be more specific? Specifically, I fail to see why you do +1 > twice now. Regarding the extra +1, you are correct. Its not n

Re: [PATCH 1/1] ipr: Fix invalid array indexing for HRRQ

2015-06-25 Thread Brian King
On 06/25/2015 09:36 AM, Jiri Slaby wrote: > On 06/25/2015, 03:44 PM, Brian King wrote: >> Fixes another signed / unsigned array indexing bug in the ipr driver. > > Could you be more specific? Specifically, I fail to see why you do +1 > twice now. Sure. With the code that is currently upstream, wh

Re: [Patch V2 2/9] [SCSI] aacraid: Add Power Management support

2015-06-25 Thread Tomas Henzl
On 06/11/2015 03:42 AM, rajinikanth.panduran...@pmcs.com wrote: > From: Rajinikanth Pandurangan > > Description: > * .suspend() and .resume() routines implemented in the driver > * aac_release_resources() initiates firmware shutdown > * aac_acquire_resources re-initializes the h

Re: [Patch V2 1/9] [SCSI] aacraid: Fix for logical device name and UID not exposed to the OS

2015-06-25 Thread Tomas Henzl
On 06/11/2015 03:42 AM, rajinikanth.panduran...@pmcs.com wrote: > From: Rajinikanth Pandurangan > > Description: > Driver sends the right size of the response buffer. > > Signed-off-by: Rajinikanth Pandurangan Reviewed-by: Tomas Henzl Tomas -- To unsubscribe from this list: send the lin

Re: [PATCH 1/1] ipr: Fix invalid array indexing for HRRQ

2015-06-25 Thread Jiri Slaby
On 06/25/2015, 03:44 PM, Brian King wrote: > Fixes another signed / unsigned array indexing bug in the ipr driver. Could you be more specific? Specifically, I fail to see why you do +1 twice now. > --- linux/drivers/scsi/ipr.c~ipr_hrrq_index_fix 2015-06-23 > 11:43:18.151741523 -0500 > +++

[PATCH 1/1] ipr: Fix invalid array indexing for HRRQ

2015-06-25 Thread Brian King
James, Here is one more fix for a rather nasty bug where the ipr driver can start accessing memory it doesn't own. I'd like to add to the queue of ipr patches. There are now two patches on top of the previously submitted series of four. If you want me to resend everything as a complete series, pl

Re: [PATCH 16/20] [SCSI] mpt3sas: Added support for customer specific branding

2015-06-25 Thread Sreekanth Reddy
On Tue, Jun 23, 2015 at 2:06 AM, Martin K. Petersen wrote: > > > "Sreekanth" == Sreekanth Reddy writes: > > Sreekanth> I agree with you that these changes belong in pci.ids. But > Sreekanth> Customers are asking us to print the HBA branding name while > Sreekanth> loading the driver on their

[PATCHv1] mpt2sas: setpci reset kernel oops fix

2015-06-25 Thread Nagarajkumar Narayanan
This patch contains the fix for kernel oops on issuing setpci reset along with sysfs, cli access spinlock initialization modified to DEFINE_SPINLOCK as per the comments for previous version of the patch >From edf1c00ddcc9b045fd1527a23631f3d4b1eea599 Mon Sep 17 00:00:00 2001 From: Nagarajkumar Na

[PATCH 1/1] snic: Fixing duplicate cache names

2015-06-25 Thread Narsimhulu Musini
This patch fixes duplicate cache names. Signed-off-by: Narsimhulu Musini --- drivers/scsi/snic/snic_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/snic/snic_main.c b/drivers/scsi/snic/snic_main.c index b2b87ce..47ed593 100644 --- a/drivers/scsi/snic/snic_

Re: [PATCH 1/1] scsi/snic: fixing the error print

2015-06-25 Thread Narsimhulu Musini (nmusini)
On 25/06/15 3:22 pm, "Maninder Singh" wrote: >Currently SNIC_HOST_ERR is called in both cases >whether snic_disc_start returns zero or non-zero. > >From the code it looks like it has to print only if >snic_disc_start return non-zero value, So calling >SNIC_HOST_ERR only for non-zero return from

[PATCH 1/1] scsi: remove check around pci_dev_put

2015-06-25 Thread Maninder Singh
pci_dev_put checks for NULL Pointer itself. Signed-off-by: Maninder Singh --- drivers/scsi/eata_pio.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/scsi/eata_pio.c b/drivers/scsi/eata_pio.c index ca8003f..481ecac 100644 --- a/drivers/scsi/eata_pio.c +++ b/drive

Re: [PATCH] SCSI-wd33c93: Deletion of a check before the function call "wd33c93_setup"

2015-06-25 Thread Dan Carpenter
On Wed, Jun 24, 2015 at 05:33:50PM +0200, SF Markus Elfring wrote: > From: Markus Elfring > Date: Wed, 24 Jun 2015 17:15:17 +0200 > > The wd33c93_setup() function performs also input parameter validation. > Thus the test around the call is not needed. > Guys, you should be aware that Markus aut

[PATCH 1/1] scsi/snic: fixing the error print

2015-06-25 Thread Maninder Singh
Currently SNIC_HOST_ERR is called in both cases whether snic_disc_start returns zero or non-zero. >From the code it looks like it has to print only if snic_disc_start return non-zero value, So calling SNIC_HOST_ERR only for non-zero return from snic_disc_start. Signed-off-by: Maninder Singh Revi