Re: [PATCH v1 1/3] Synchronization of cmds during termination conditions

2016-10-11 Thread Greg KH
On Tue, Oct 11, 2016 at 05:58:03PM -0500, Michael Cyr wrote: > Signed-off-by: Michael Cyr I almost never accept patches with no changelog information. For a patch that changes 1082 lines in a non-trivial way, you would think that you could explain why you are doing this work... Also, check the

[bug report] scsi: hisi_sas: add internal abort to hisi_sas_abort_task()

2016-10-11 Thread Dan Carpenter
Hello John Garry, The patch dc8a49cabc73: "scsi: hisi_sas: add internal abort to hisi_sas_abort_task()" from Aug 24, 2016, leads to the following static checker warning: drivers/scsi/hisi_sas/hisi_sas_main.c:848 hisi_sas_abort_task() error: we previously assumed 'slot' could be nu

[PATCH 2/2] sr: Drop custom handling of unit attention

2016-10-11 Thread Gabriel Krisman Bertazi
This is no longer necessary, since we handle it in scsi_execute. Signed-off-by: Gabriel Krisman Bertazi --- drivers/scsi/sr_ioctl.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/scsi/sr_ioctl.c b/drivers/scsi/sr_ioctl.c index 03054c0e7689..f7724e52fd0f 100644 --

[PATCH 1/2] scsi: Handle Unit Attention when issuing SCSI command

2016-10-11 Thread Gabriel Krisman Bertazi
Usually, re-sending the SCSI command is enough to recover from a Unit Attention (UA). This adds a generic retry code to the SCSI command path in case of an UA, before giving up and returning the error condition to the caller. I added the UA verification into scsi_execute instead of scsi_execute_r

Re: [PATCH v2 7/7] [RFC] nvme: Fix a race condition

2016-10-11 Thread Bart Van Assche
On 10/11/16 09:46, Christoph Hellwig wrote: On Wed, Sep 28, 2016 at 05:01:45PM -0700, Bart Van Assche wrote: Avoid that nvme_queue_rq() is still running when nvme_stop_queues() returns. Untested. Signed-off-by: Bart Van Assche Cc: Keith Busch Cc: Christoph Hellwig Cc: Sagi Grimberg --- dri

Re: [PATCH] SCSI: remove one useless stack variable

2016-10-11 Thread Martin K. Petersen
> "Ming" == Ming Lei writes: Ming> The local variable of 'devname' in scsi_report_lun_scan() isn't Ming> used any more, so remove it. Applied to 4.9/scsi-fixes. -- Martin K. Petersen Oracle Linux Engineering -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in t

Re: [PATCH] scsi: NCR5380: no longer mark irq probing as __init

2016-10-11 Thread Finn Thain
On Tue, 11 Oct 2016, Ondrej Zary wrote: > > I've tested IRQ probing on my IRQ7-hardwired ISA card without any > success some time ago. No IRQ was detected because it wasn't even > generated (no increment in /proc/interruptts). The IRQ line does not appear in /proc/interrupts unless it has alr

[RESEND PATCH] scsi: ufs: fix race between clock gating and devfreq scaling work

2016-10-11 Thread Subhash Jadavani
UFS devfreq clock scaling work may require clocks to be ON if it need to execute some UFS commands hence it may request for clock hold before issuing the command. But if UFS clock gating work is already running in parallel, ungate work would end up waiting for the clock gating work to finish and as

[PATCH v1 3/3] Return correct partition name/number to client

2016-10-11 Thread Michael Cyr
Signed-off-by: Michael Cyr --- drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c b/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c index 5c4b979..4dbbe4b 100644 --- a/drivers/scsi/ibmvscsi_tgt/ibmvsc

[PATCH v1 2/3] Properly handle if target_submit_cmd/tmr fails

2016-10-11 Thread Michael Cyr
Signed-off-by: Michael Cyr --- drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c b/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c index 34f758c..5c4b979 100644 --- a/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c +++

[PATCH v1 0/3] Fixes for problems found during testing

2016-10-11 Thread Michael Cyr
The first one seems bigger than it is, because I needed to rearrange the order of some functions. Michael Cyr (3): Synchronization of cmds during termination conditions Properly handle if target_submit_cmd/tmr fails Return correct partition name/number to client drivers/scsi/ibmvscsi_tgt/i

[PATCH v1 1/3] Synchronization of cmds during termination conditions

2016-10-11 Thread Michael Cyr
Signed-off-by: Michael Cyr --- drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 1082 +- drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.h |5 +- 2 files changed, 486 insertions(+), 601 deletions(-) diff --git a/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c b/drivers/scsi/ibmvscsi_t

Re: [PATCH] scsi: ufs: add support for BLKSECDISCARD

2016-10-11 Thread Subhash Jadavani
Hi Szymon, On 2016-10-11 04:15, Mielczarek, SzymonX wrote: Hi Jadavani, _> Now it make sense, i wasn't expecting that this patch is to prevent die level attack. Do you want to make that explicit in the commit text?_ No problem with that. Please see the update below: Add BLKSECDISCARD feature

Re: [Resend PATCH] SCSI: scan: fix use-after-free

2016-10-11 Thread Martin K. Petersen
> "Ming" == Ming Lei writes: Ming> This patch fixes one use-after-free report[1] by KASAN. In Ming> __scsi_scan_target(), when a type 31 device is probed, Ming> SCSI_SCAN_TARGET_PRESENT is returned and the target will be Ming> scanned again. Applied to 4.9/scsi-fixes. -- Martin K. Peterse

Re: [PATCH] scsi: replace wrong device handler name for CLARiiON arrays

2016-10-11 Thread Martin K. Petersen
> "Xose" == Xose Vazquez Perez writes: Xose> At drivers/scsi/device_handler/scsi_dh_emc.c it was defined as: Xose> #define CLARIION_NAME "emc" Applied to 4.9/scsi-fixes. -- Martin K. Petersen Oracle Linux Engineering -- To unsubscribe from this list: send the line "unsubscribe linux-s

Re: [RESEND PATCH v3] scsi: ufshcd: fix possible unclocked register access

2016-10-11 Thread Martin K. Petersen
> "Subhash" == Subhash Jadavani writes: Subhash> Vendor specific setup_clocks callback may require the clocks Subhash> managed by ufshcd driver to be ON. So if the vendor specific Subhash> setup_clocks callback is called while the required clocks are Subhash> turned off, it could result into

Re: [PATCHv2 0/7] libfc: sanitize kref and state machine fixes

2016-10-11 Thread Martin K. Petersen
> "Hannes" == Hannes Reinecke writes: Hannes> Hi all, here is the first round of patch to fixup libfc and Hannes> FCoE. It consists of a rewrite of the libfc rport kref handling Hannes> (or, to be precise, is _implements_ rport kref handling) and Hannes> updates the 'disc_mutex' handling to

Re: [PATCH] scsi: NCR5380: no longer mark irq probing as __init

2016-10-11 Thread Ondrej Zary
On Tuesday 11 October 2016 11:39:57 Finn Thain wrote: > Acked-by: Finn Thain > > Thanks. > > On Tue, 11 Oct 2016, Arnd Bergmann wrote: > > The g_NCR5380 has been converted to more regular probing, which > > means its probe function can now be invoked after the __init section > > is discarded, as p

Re: [PATCH v2 0/3] hisi_sas add hip07 support

2016-10-11 Thread Martin K. Petersen
> "John" == John Garry writes: John> This patchset introduces support for hip07 SoC. The hip07 SoC has John> the same v2 hw as in hip06. John> Support for different reference clock is required as some SAS John> registers need be programmed differently, depending on the John> refclock rate.

Re: [PATCH] fnic: Use time64_t to represent trace timestamps

2016-10-11 Thread Martin K. Petersen
> "Deepa" == Deepa Dinamani writes: Deepa> trace timestamps use struct timespec and CURRENT_TIME which are Deepa> not y2038 safe. These timestamps are only part of the trace log Deepa> on the machine and are not shared with the fnic. Replace then Deepa> with y2038 safe struct timespec64 and

Re: [PATCH 2/6] ipr: use pci_irq_allocate_vectors

2016-10-11 Thread Martin K. Petersen
> "Christoph" == Christoph Hellwig writes: Christoph> Switch the ipr driver to use pci_alloc_irq_vectors. We need Christoph> to two calls to pci_alloc_irq_vectors as ipr only supports Christoph> multiple MSI-X vectors, but not multiple MSI vectors. Christoph> Otherwise this cleans up a lot

Re: [PATCH 1/6] arcmsr: use pci_alloc_irq_vectors

2016-10-11 Thread Martin K. Petersen
> "Christoph" == Christoph Hellwig writes: Christoph> Switch the arcmsr driver to use pci_alloc_irq_vectors. We Christoph> need to two calls to pci_alloc_irq_vectors as arcmsr only Christoph> supports multiple MSI-X vectors, but not multiple MSI Christoph> vectors. Christoph> Otherwise this

Re: [PATCH 00/44] Convert FibreChannel bsg code to use bsg-lib

2016-10-11 Thread Hannes Reinecke
On 10/11/2016 01:28 PM, Johannes Thumshirn wrote: This series converts the current bsg usage in the FibreChannel drivers over to use bsg-lib. SAS will follow but 44 patches are big enough for one shot, so I didn't want to include SAS in there as well. It looks a bit huge but most of the patches

Re: [PATCH v2 6/7] SRP transport: Port srp_wait_for_queuecommand() to scsi-mq

2016-10-11 Thread Christoph Hellwig
On Wed, Oct 05, 2016 at 02:51:50PM -0700, Bart Van Assche wrote: > There are multiple direct blk_*() calls in other SCSI transport drivers. So > my proposal is to wait with moving this code into scsi_lib.c until there is > a second user of this code. I still don't think these low-level differenc

Re: [PATCH 00/44] Convert FibreChannel bsg code to use bsg-lib

2016-10-11 Thread Christoph Hellwig
Hi Johannes, this looks great to me. But is there a chance to consolidate it into a more manageable set of patches? E.g. all the patches to call export fc_bsg_jobdone, use it directly and remove the function pointer could go together, possibly even including the new calling convention. Similar a

Re: [PATCH v2 7/7] [RFC] nvme: Fix a race condition

2016-10-11 Thread Christoph Hellwig
On Wed, Sep 28, 2016 at 05:01:45PM -0700, Bart Van Assche wrote: > Avoid that nvme_queue_rq() is still running when nvme_stop_queues() > returns. Untested. > > Signed-off-by: Bart Van Assche > Cc: Keith Busch > Cc: Christoph Hellwig > Cc: Sagi Grimberg > --- > drivers/nvme/host/core.c | 20 ++

Re: [PATCH v2 1/7] blk-mq: Introduce blk_mq_queue_stopped()

2016-10-11 Thread Christoph Hellwig
Looks fine, Reviewed-by: Christoph Hellwig -- 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

Re: [PATCH 0/9] Introduce blk_quiesce_queue() and blk_resume_queue()

2016-10-11 Thread Laurence Oberman
- Original Message - > From: "Bart Van Assche" > To: "Jens Axboe" > Cc: "Christoph Hellwig" , "James Bottomley" > , "Martin K. Petersen" > , "Mike Snitzer" , "Doug > Ledford" , "Keith > Busch" , linux-bl...@vger.kernel.org, > linux-scsi@vger.kernel.org, linux-r...@vger.kernel.org, >

Re: [Open-FCoE] Issue with fc_exch_alloc failing initiated by fc_queuecommand on NUMA or large configurations with Intel ixgbe running FCOE

2016-10-11 Thread Ewan D. Milne
On Sat, 2016-10-08 at 19:35 +0200, Hannes Reinecke wrote: > You might actually be hitting a limitation in the exchange manager code. > The libfc exchange manager tries to be really clever and will assign a > per-cpu exchange manager (probably to increase locality). However, we > only have a limit

Re: [Open-FCoE] Issue with fc_exch_alloc failing initiated by fc_queuecommand on NUMA or large configurations with Intel ixgbe running FCOE

2016-10-11 Thread Laurence Oberman
- Original Message - > From: "Laurence Oberman" > To: "Hannes Reinecke" > Cc: "Linux SCSI Mailinglist" , > fcoe-de...@open-fcoe.org, "Curtis Taylor (c...@us.ibm.com)" > , "Bud Brown" > Sent: Sunday, October 9, 2016 11:52:44 AM > Subject: Re: [Open-FCoE] Issue with fc_exch_alloc failin

[PATCH 00/44] Convert FibreChannel bsg code to use bsg-lib

2016-10-11 Thread Johannes Thumshirn
This series converts the current bsg usage in the FibreChannel drivers over to use bsg-lib. SAS will follow but 44 patches are big enough for one shot, so I didn't want to include SAS in there as well. It looks a bit huge but most of the patches are only code movement and slow API conversions so e

[PATCH 02/44] bfa: don't use fc_bsg_job::request and fc_bsg_job::reply directly

2016-10-11 Thread Johannes Thumshirn
Don't use fc_bsg_job::request and fc_bsg_job::reply directly, but use helper variables bsg_request and bsg_reply. This will be helpfull when transitioning to bsg-lib. Signed-off-by: Johannes Thumshirn --- drivers/scsi/bfa/bfad_bsg.c | 40 +++- 1 file changed,

[PATCH 05/44] lpfc: don't use fc_bsg_job::request and fc_bsg_job::reply directly

2016-10-11 Thread Johannes Thumshirn
Don't use fc_bsg_job::request and fc_bsg_job::reply directly, but use helper variables bsg_request and bsg_reply. This will be helpfull when transitioning to bsg-lib. Signed-off-by: Johannes Thumshirn --- drivers/scsi/lpfc/lpfc_bsg.c | 194 +++ 1 file chan

[PATCH 08/44] scsi: fc: don't use fc_bsg_job::request and fc_bsg_job::reply directly

2016-10-11 Thread Johannes Thumshirn
Don't use fc_bsg_job::request and fc_bsg_job::reply directly, but use helper variables bsg_request and bsg_reply. This will be helpfull when transitioning to bsg-lib. Signed-off-by: Johannes Thumshirn --- drivers/scsi/scsi_transport_fc.c | 37 +++-- 1 file changed

[PATCH 06/44] qla2xxx: don't use fc_bsg_job::request and fc_bsg_job::reply directly

2016-10-11 Thread Johannes Thumshirn
Don't use fc_bsg_job::request and fc_bsg_job::reply directly, but use helper variables bsg_request and bsg_reply. This will be helpfull when transitioning to bsg-lib. Signed-off-by: Johannes Thumshirn --- drivers/scsi/qla2xxx/qla_bsg.c | 264 +++- drivers/scs

[PATCH 03/44] zfcp: don't use fc_bsg_job::request and fc_bsg_job::reply directly

2016-10-11 Thread Johannes Thumshirn
Don't use fc_bsg_job::request and fc_bsg_job::reply directly, but use helper variables bsg_request and bsg_reply. This will be helpfull when transitioning to bsg-lib. Signed-off-by: Johannes Thumshirn --- drivers/s390/scsi/zfcp_fc.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-)

[PATCH 13/44] libfc: Use fc_bsg_jobdone()

2016-10-11 Thread Johannes Thumshirn
Use fc_bsg_jobdone() directly instead of the struct bsg_job::job_done() callback. Signed-off-by: Johannes Thumshirn --- drivers/scsi/libfc/fc_lport.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/libfc/fc_lport.c b/drivers/scsi/libfc/fc_lport.c index a1c12e

[PATCH 14/44] lpfc: Use fc_bsg_jobdone()

2016-10-11 Thread Johannes Thumshirn
Use fc_bsg_jobdone() directly instead of the struct bsg_job::job_done() callback. Signed-off-by: Johannes Thumshirn --- drivers/scsi/lpfc/lpfc_bsg.c | 38 +++--- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_bsg.c b/drivers

[PATCH 18/44] scsi: fc: provide fc_bsg_to_shost() helper

2016-10-11 Thread Johannes Thumshirn
Provide fc_bsg_to_shost() helper that will become handy when we're moving from struct fc_bsg_job to a plain struct bsg_job. Signed-off-by: Johannes Thumshirn --- include/scsi/scsi_transport_fc.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/scsi/scsi_transport_fc.h b/include/s

[PATCH 01/44] scsi: Get rid of struct fc_bsg_buffer

2016-10-11 Thread Johannes Thumshirn
struct fc_bsg_buffer is just a clone of struct bsg_buffer from bsg-lib, so use this one instead. Signed-off-by: Johannes Thumshirn --- drivers/scsi/lpfc/lpfc_bsg.c | 3 ++- drivers/scsi/scsi_transport_fc.c | 2 +- include/scsi/scsi_transport_fc.h | 12 +++- 3 files changed, 6 inser

[PATCH 04/44] ibmvfc: don't use fc_bsg_job::request and fc_bsg_job::reply directly

2016-10-11 Thread Johannes Thumshirn
Don't use fc_bsg_job::request and fc_bsg_job::reply directly, but use helper variables bsg_request and bsg_reply. This will be helpfull when transitioning to bsg-lib. Signed-off-by: Johannes Thumshirn --- drivers/scsi/ibmvscsi/ibmvfc.c | 22 -- 1 file changed, 12 insertions(+

[PATCH 10/44] zfcp: Use fc_bsg_jobdone()

2016-10-11 Thread Johannes Thumshirn
Use fc_bsg_jobdone() directly instead of the struct bsg_job::job_done() callback. Signed-off-by: Johannes Thumshirn --- drivers/s390/scsi/zfcp_fc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/s390/scsi/zfcp_fc.c b/drivers/s390/scsi/zfcp_fc.c index 4c4023f..40d8f06

[PATCH 11/44] bfa: Use fc_bsg_jobdone()

2016-10-11 Thread Johannes Thumshirn
Use fc_bsg_jobdone() directly instead of the struct bsg_job::job_done() callback. Signed-off-by: Johannes Thumshirn --- drivers/scsi/bfa/bfad_bsg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/bfa/bfad_bsg.c b/drivers/scsi/bfa/bfad_bsg.c index 48366d8..258

[PATCH 17/44] scsi: Unify interfaces of fc_bsg_jobdone and bsg_job_done

2016-10-11 Thread Johannes Thumshirn
Unify the interfaces of fc_bsg_jobdone and bsg_job_done. This will reduce the diff when moving from 'struct fc_bsg_job' to a plain 'struct bsg_job' later on. Signed-off-by: Johannes Thumshirn --- drivers/s390/scsi/zfcp_fc.c | 2 +- drivers/scsi/bfa/bfad_bsg.c | 6 ++-- drivers/scsi/i

[PATCH 07/44] libfc: don't use fc_bsg_job::request and fc_bsg_job::reply directly

2016-10-11 Thread Johannes Thumshirn
Don't use fc_bsg_job::request and fc_bsg_job::reply directly, but use helper variables bsg_request and bsg_reply. This will be helpfull when transitioning to bsg-lib. Signed-off-by: Johannes Thumshirn --- drivers/scsi/libfc/fc_lport.c | 23 +-- 1 file changed, 13 insertions(+

[PATCH 15/44] qla2xxx: Use fc_bsg_jobdone()

2016-10-11 Thread Johannes Thumshirn
Use fc_bsg_jobdone() directly instead of the struct bsg_job::job_done() callback. Signed-off-by: Johannes Thumshirn --- drivers/scsi/qla2xxx/qla_bsg.c | 44 +- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_bsg.c b

[PATCH 12/44] ibmvfc: Use fc_bsg_jobdone()

2016-10-11 Thread Johannes Thumshirn
Use fc_bsg_jobdone() directly instead of the struct bsg_job::job_done() callback. Signed-off-by: Johannes Thumshirn --- drivers/scsi/ibmvscsi/ibmvfc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c index 8b55279

[PATCH 19/44] scsi: fc: use fc_bsg_to_shost() to access a bsg_job's Scsi_Host

2016-10-11 Thread Johannes Thumshirn
Signed-off-by: Johannes Thumshirn --- drivers/scsi/scsi_transport_fc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/scsi_transport_fc.c b/drivers/scsi/scsi_transport_fc.c index 9744476..d6d18ce 100644 --- a/drivers/scsi/scsi_transport_fc.c +++ b/drivers/scsi/sc

[PATCH 09/44] scsi: fc: Export fc_bsg_jobdone

2016-10-11 Thread Johannes Thumshirn
Export fc_bsg_jobdone so drivers can use it directly instead of doing the round-trip via struct fc_bsg_job::job_done(). Signed-off-by: Johannes Thumshirn --- drivers/scsi/scsi_transport_fc.c | 4 ++-- include/scsi/scsi_transport_fc.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff

[PATCH 22/44] qla2xxx: use fc_bsg_to_shost() to access a bsg_job's Scsi_Host

2016-10-11 Thread Johannes Thumshirn
Signed-off-by: Johannes Thumshirn --- drivers/scsi/qla2xxx/qla_bsg.c | 54 +- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_bsg.c b/drivers/scsi/qla2xxx/qla_bsg.c index 9293d5a..109b852 100644 --- a/drivers/scsi/ql

[PATCH 16/44] scsi: fc: remove job_done method from struct fc_bsg_job

2016-10-11 Thread Johannes Thumshirn
Now that we've converted all LLDDs over to use fc_bsg_jobdone() directly, remove the function pointer from struct fc_bsg_job. Signed-off-by: Johannes Thumshirn --- drivers/scsi/scsi_transport_fc.c | 1 - include/scsi/scsi_transport_fc.h | 1 - 2 files changed, 2 deletions(-) diff --git a/driver

[PATCH 20/44] bfa: use fc_bsg_to_shost() to access a bsg_job's Scsi_Host

2016-10-11 Thread Johannes Thumshirn
Signed-off-by: Johannes Thumshirn --- drivers/scsi/bfa/bfad_bsg.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/bfa/bfad_bsg.c b/drivers/scsi/bfa/bfad_bsg.c index e49a6c8..d3094270 100644 --- a/drivers/scsi/bfa/bfad_bsg.c +++ b/drivers/scsi/bfa/bfad_bsg.c

[PATCH 23/44] libfc: use fc_bsg_to_shost() to access a bsg_job's Scsi_Host

2016-10-11 Thread Johannes Thumshirn
Signed-off-by: Johannes Thumshirn --- drivers/scsi/libfc/fc_lport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/libfc/fc_lport.c b/drivers/scsi/libfc/fc_lport.c index 4bed7ec..c60fdb9 100644 --- a/drivers/scsi/libfc/fc_lport.c +++ b/drivers/scsi/libfc/fc_lport

[PATCH 25/44] zfcp: use fc_bsg_to_shost() to access a bsg_job's Scsi_Host

2016-10-11 Thread Johannes Thumshirn
Signed-off-by: Johannes Thumshirn --- drivers/s390/scsi/zfcp_fc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/s390/scsi/zfcp_fc.c b/drivers/s390/scsi/zfcp_fc.c index 87f6330..813c286 100644 --- a/drivers/s390/scsi/zfcp_fc.c +++ b/drivers/s390/scsi/zfcp_fc.c @@

[PATCH 24/44] ibmvfc: use fc_bsg_to_shost() to access a bsg_job's Scsi_Host

2016-10-11 Thread Johannes Thumshirn
Signed-off-by: Johannes Thumshirn --- drivers/scsi/ibmvscsi/ibmvfc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c index 1001d4a..f7b50af 100644 --- a/drivers/scsi/ibmvscsi/ibmvfc.c +++ b/drivers/scsi/ibmvsc

[PATCH 34/44] scsi: fc: implement kref backed reference counting

2016-10-11 Thread Johannes Thumshirn
Implement kref backed reference counting instead of rolling our own. This elimnates the need of the following fields in 'struct fc_bsg_job': * ref_cnt * state_flags * job_lock bringing us close to unification of 'struct fc_bsg_job' and 'struct bsg_job'. Signed-off-by: Johannes Thumshirn --- driv

[PATCH 28/44] zfcp: use fc_bsg_to_rport() to access a bsg_job's rport

2016-10-11 Thread Johannes Thumshirn
Signed-off-by: Johannes Thumshirn --- drivers/s390/scsi/zfcp_fc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/s390/scsi/zfcp_fc.c b/drivers/s390/scsi/zfcp_fc.c index 813c286..1977a66 100644 --- a/drivers/s390/scsi/zfcp_fc.c +++ b/drivers/s390/scsi/zfcp_fc.c @@

[PATCH 21/44] lpfc: use fc_bsg_to_shost() to access a bsg_job's Scsi_Host

2016-10-11 Thread Johannes Thumshirn
Signed-off-by: Johannes Thumshirn --- drivers/scsi/lpfc/lpfc_bsg.c | 32 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_bsg.c b/drivers/scsi/lpfc/lpfc_bsg.c index 447a7af..bfcc37d 100644 --- a/drivers/scsi/lpfc/lpfc_bsg.c ++

[PATCH 27/44] scsi: fc: use fc_bsg_to_rport() to access a bsg_job's rport

2016-10-11 Thread Johannes Thumshirn
Signed-off-by: Johannes Thumshirn --- drivers/scsi/scsi_transport_fc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/scsi_transport_fc.c b/drivers/scsi/scsi_transport_fc.c index d6d18ce..96b3a2e 100644 --- a/drivers/scsi/scsi_transport_fc.c +++ b/drivers/scsi/

[PATCH 26/44] scsi: fc: provide fc_bsg_to_rport() helper

2016-10-11 Thread Johannes Thumshirn
Provide fc_bsg_to_rport() helper that will become handy when we're moving from struct fc_bsg_job to a plain struct bsg_job. Signed-off-by: Johannes Thumshirn --- include/scsi/scsi_transport_fc.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/scsi/scsi_transport_fc.h b/include/s

[PATCH 31/44] libfc: use fc_bsg_to_rport() to access a bsg_job's rport

2016-10-11 Thread Johannes Thumshirn
Signed-off-by: Johannes Thumshirn --- drivers/scsi/libfc/fc_lport.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/libfc/fc_lport.c b/drivers/scsi/libfc/fc_lport.c index c60fdb9..156708a 100644 --- a/drivers/scsi/libfc/fc_lport.c +++ b/drivers/scsi/libfc/fc_l

[PATCH 35/44] block: add reference counting for struct bsg_job

2016-10-11 Thread Johannes Thumshirn
Add reference counting to 'struct bsg_job' so we can implement a reuqest timeout handler for bsg_jobs, which is needed for Fibre Channel. Signed-off-by: Johannes Thumshirn --- block/bsg-lib.c | 7 +-- include/linux/bsg-lib.h | 2 ++ 2 files changed, 7 insertions(+), 2 deletions(-) d

[PATCH 38/44] scsi: fc: Use bsg_destroy_job

2016-10-11 Thread Johannes Thumshirn
fc_destroy_bsgjob() and bsg_destroy_job() are now 1:1 copies, so use the later. Signed-off-by: Johannes Thumshirn --- drivers/scsi/scsi_transport_fc.c | 20 ++-- 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/drivers/scsi/scsi_transport_fc.c b/drivers/scsi/scsi_tr

[PATCH 30/44] lpfc: use fc_bsg_to_rport() to access a bsg_job's rport

2016-10-11 Thread Johannes Thumshirn
Signed-off-by: Johannes Thumshirn --- drivers/scsi/lpfc/lpfc_bsg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_bsg.c b/drivers/scsi/lpfc/lpfc_bsg.c index bfcc37d..dae7cc3 100644 --- a/drivers/scsi/lpfc/lpfc_bsg.c +++ b/drivers/scsi/lpfc/lpfc_bsg.

[PATCH 32/44] ibmvfc: use fc_bsg_to_rport() to access a bsg_job's rport

2016-10-11 Thread Johannes Thumshirn
Signed-off-by: Johannes Thumshirn --- drivers/scsi/ibmvscsi/ibmvfc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c index f7b50af..35114d9 100644 --- a/drivers/scsi/ibmvscsi/ibmvfc.c +++ b/drivers/scsi/ibmvscsi/i

[PATCH 33/44] scsi: libfc: don't set FC_RQST_STATE_DONE before calling fc_bsg_jobdone()

2016-10-11 Thread Johannes Thumshirn
Don't set FC_RQST_STATE_DONE before calling fc_bsg_jobdone() as fc_bsg_jobdone() calls blk_complete_requeust() which raises a soft-IRQ that ends up in fc_bsg_sofirq_done() and fc_bsg_softirq_done() sets the FC_RQST_STATE_DONE flag. Signed-off-by: Johannes Thumshirn --- drivers/scsi/libfc/fc_lpor

[PATCH 29/44] qla2xxx: use fc_bsg_to_rport() to access a bsg_job's rport

2016-10-11 Thread Johannes Thumshirn
Signed-off-by: Johannes Thumshirn --- drivers/scsi/qla2xxx/qla_bsg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_bsg.c b/drivers/scsi/qla2xxx/qla_bsg.c index 109b852..917eafe 100644 --- a/drivers/scsi/qla2xxx/qla_bsg.c +++ b/drivers/scsi/qla2xx

[PATCH 40/44] scsi: fc: use bsg_softirq_done

2016-10-11 Thread Johannes Thumshirn
bsg_softirq_done() and fc_bsg_softirq_done() are copies of each other, so ditch the fc specific one. Signed-off-by: Johannes Thumshirn --- drivers/scsi/scsi_transport_fc.c | 16 ++-- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/drivers/scsi/scsi_transport_fc.c b/dri

[PATCH 39/44] block: export bsg_softirq_done

2016-10-11 Thread Johannes Thumshirn
Export bsg_softirq_done so it can be used by clients of bsg-lib. Signed-off-by: Johannes Thumshirn --- block/bsg-lib.c | 3 ++- include/linux/bsg-lib.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/block/bsg-lib.c b/block/bsg-lib.c index 6b99c7f..5d24d25 100644 ---

[PATCH 42/44] block: add bsg_job_put() and bsg_job_get()

2016-10-11 Thread Johannes Thumshirn
Add bsg_job_put() and bsg_job_get() so don't need to export bsg_destroy_job() any more. Signed-off-by: Johannes Thumshirn --- block/bsg-lib.c | 17 ++--- drivers/scsi/scsi_transport_fc.c | 2 +- include/linux/bsg-lib.h | 3 ++- 3 files changed, 17 insertio

[PATCH 43/44] scsi: fc: move FC transport's bsg code to bsg-lib

2016-10-11 Thread Johannes Thumshirn
Now that all conversions are done, move the FibreChannel bsg code over to the bsg library. This patch is derived from work done by Mike Christie in 2011 [1] but only the iscsi parts got merged back then. [1] http://marc.info/?l=linux-scsi&m=131149780921009&w=2 Signed-off-by: Johannes Thumshirn

[PATCH 36/44] scsi: change FC drivers to use 'struct bsg_job'

2016-10-11 Thread Johannes Thumshirn
Change FC drivers to use 'struct bsg_job' from bsg-lib.h instead of 'struct fc_bsg_job' from scsi_transport_fc.h and remove 'struct fc_bsg_job'. Signed-off-by: Johannes Thumshirn --- drivers/s390/scsi/zfcp_fc.c | 15 drivers/scsi/bfa/bfad_bsg.c | 10 +++--- drivers/scsi/bfa/bf

[PATCH 37/44] block: export bsg_destroy_job

2016-10-11 Thread Johannes Thumshirn
Export bsg_destroy_job so we can use it from clients of bsg-lib. Signed-off-by: Johannes Thumshirn --- block/bsg-lib.c | 3 ++- include/linux/bsg-lib.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/block/bsg-lib.c b/block/bsg-lib.c index 632fb40..6b99c7f 100644 ---

[PATCH 41/44] scsi: fc: use bsg_job_done

2016-10-11 Thread Johannes Thumshirn
fc_bsg_jobdone() and bsg_job_done() are 1:1 copies now so use the bsg-lib one instead of the FC private implementation. Signed-off-by: Johannes Thumshirn --- drivers/s390/scsi/zfcp_fc.c | 2 +- drivers/scsi/bfa/bfad_bsg.c | 4 ++-- drivers/scsi/ibmvscsi/ibmvfc.c | 2 +- drivers/sc

[PATCH 44/44] block: unexport bsg_softirq_done() again

2016-10-11 Thread Johannes Thumshirn
Unexport bsg_softirq_done() again, we don't need it outside of bsg-lib.c anymore now that scsi_transport_fc is a pure bsg-lib client. Signed-off-by: Johannes Thumshirn --- block/bsg-lib.c | 3 +-- include/linux/bsg-lib.h | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git

Re: [PATCH] scsi: NCR5380: no longer mark irq probing as __init

2016-10-11 Thread Finn Thain
Acked-by: Finn Thain Thanks. On Tue, 11 Oct 2016, Arnd Bergmann wrote: > The g_NCR5380 has been converted to more regular probing, which > means its probe function can now be invoked after the __init section > is discarded, as pointed out by this kbuild warning: > > WARNING: drivers/scsi/buil

[PATCH] scsi: NCR5380: no longer mark irq probing as __init

2016-10-11 Thread Arnd Bergmann
The g_NCR5380 has been converted to more regular probing, which means its probe function can now be invoked after the __init section is discarded, as pointed out by this kbuild warning: WARNING: drivers/scsi/built-in.o(.text+0x3a105): Section mismatch in reference from the function generic_NCR538