Re: [PATCH] libfc: fix seconds_since_last_reset miscalculation

2016-11-17 Thread Johannes Thumshirn
On Wed, Nov 16, 2016 at 05:58:14PM +0100, Arnd Bergmann wrote: > On Tuesday, November 15, 2016 4:05:31 PM CET Johannes Thumshirn wrote: > > On Tue, Nov 15, 2016 at 02:50:17PM +, Bart Van Assche wrote: > > > On Tue, 2016-11-15 at 10:18 +0100, Johannes Thumshirn wrote: >

Re: [PATCH v3 02/16] scsi: don't use fc_bsg_job::request and fc_bsg_job::reply directly

2016-11-15 Thread Johannes Thumshirn
On Tue, Nov 15, 2016 at 03:31:27PM +0100, Steffen Maier wrote: > Hi Johannes, > > On 11/15/2016 12:56 PM, Johannes Thumshirn wrote: > > On Tue, Oct 25, 2016 at 09:43:14AM +0200, Johannes Thumshirn wrote: > > > On Fri, Oct 14, 2016 at 09:38:21AM +0200, Johannes Thumshirn wr

Re: [PATCH] libfc: fix seconds_since_last_reset miscalculation

2016-11-15 Thread Johannes Thumshirn
On Tue, Nov 15, 2016 at 02:50:17PM +, Bart Van Assche wrote: > On Tue, 2016-11-15 at 10:18 +0100, Johannes Thumshirn wrote: > > On Tue, Nov 08, 2016 at 03:04:43PM +, Bart Van Assche wrote: > > > I think the above code will miscalculate seconds_since_last_reset > &

Re: [PATCH v3 02/16] scsi: don't use fc_bsg_job::request and fc_bsg_job::reply directly

2016-11-16 Thread Johannes Thumshirn
On Tue, Nov 15, 2016 at 04:39:33PM +0100, Johannes Thumshirn wrote: > On Tue, Nov 15, 2016 at 03:31:27PM +0100, Steffen Maier wrote: > > Hi Johannes, > > > > On 11/15/2016 12:56 PM, Johannes Thumshirn wrote: > > > On Tue, Oct 25, 2016 at 09:43:14AM +0200, Johannes T

Re: [PATCH] mvsas: fix command_active typo

2016-11-16 Thread Johannes Thumshirn
we check the > command bit before setting and printing it. > > Fixes: a4632aae8b66 ("[SCSI] mvsas: Add new macros and functions") > Signed-off-by: Arnd Bergmann <a...@arndb.de> > --- Looks reasonable, Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de>

Re: use PCI layer IRQ affinity in lpfc

2016-11-18 Thread Johannes Thumshirn
On Fri, Nov 18, 2016 at 05:22:11AM -0800, Christoph Hellwig wrote: > On Fri, Nov 18, 2016 at 02:13:12PM +0100, Johannes Thumshirn wrote: > > This is what /proc/interrupts looks like after booting from the lpfc HBA, > > with your patches: > > > > ettrick:~ # grep lpfc

Re: use PCI layer IRQ affinity in lpfc

2016-11-18 Thread Johannes Thumshirn
ffinity; done 44: 46: 48: 49: 51: 52: ettrick:~ # Anything else you want me to look at? Apart from that, for the whole series: Tested-by: Johannes Thumshirn <jthumsh...@suse.de> Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de> --

Re: [PATCH] bfa: turn bfa_mem_{kva,dma}_setup into inline functions

2016-11-18 Thread Johannes Thumshirn
ad [-Werror=int-in-bool-context] > > Using inline functions makes them much more readable and avoids > the warnings. > > Signed-off-by: Arnd Bergmann <a...@arndb.de> > --- Looks good, Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de> -- Johannes Thumshirn

Re: use PCI layer IRQ affinity in lpfc

2016-11-18 Thread Johannes Thumshirn
On Fri, Nov 18, 2016 at 05:22:11AM -0800, Christoph Hellwig wrote: > On Fri, Nov 18, 2016 at 02:13:12PM +0100, Johannes Thumshirn wrote: > > This is what /proc/interrupts looks like after booting from the lpfc HBA, > > with your patches: > > > > ettrick:~ # grep lpfc

[PATCH RESEND v4 00/15] Convert FibreChannel bsg code to use bsg-lib

2016-11-17 Thread Johannes Thumshirn
xed the hopefully last bisection breaking point * Fixed kernel panic on s390 with patch 2/15 * Fixed kernel panic on s390 with patch 5/15 * Fixed zfcp_show output on s390 with patch 4/15 Johannes Thumshirn (15): scsi: Get rid of struct fc_bsg_buffer scsi: don't use fc_bsg_job::request and fc_bsg_

[PATCH v2] libfc: fix seconds_since_last_reset miscalculation

2016-11-17 Thread Johannes Thumshirn
Commit 540eb1eef 'scsi: libfc: fix seconds_since_last_reset calculation' removed the use of 'struct timespec' from fc_get_host_stats(). This broke the output of 'fcoeadm -s' after kernel 4.8-rc1. Fixes: 540eb1eef ('scsi: libfc: fix seconds_since_last_reset calculation') Signed-off-by: Johannes

[PATCH RESEND v4 08/15] block: add reference counting for struct bsg_job

2016-11-17 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 <jthumsh...@suse.de> Reviewed-by: Hannes Reinecke <h...@suse.com> --- block/bsg-lib.c | 7 +-- inclu

[PATCH RESEND v4 15/15] block: unexport bsg_softirq_done() again

2016-11-17 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 <jthumsh...@suse.de> Reviewed-by: Hannes Reinecke <h...@suse.com> --- block/bsg-lib.c | 3 +-- include/lin

Re: [PATCH] mpt2sas: Fix secure erase premature termination.

2016-11-21 Thread Johannes Thumshirn
ix for stable kernels before the mpt{2,3}sas unification (a.k.a pre-4.4). Hope that helps. Byte, Johannes -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnber

Re: [PATCH 2/2] hpsa: destroy sas transport properties before scsi_host

2016-11-21 Thread Johannes Thumshirn
the fact that host device hostX is deleted before the > SAS transport devices hostX/port-a:b. > > This patch fixes this by reverting the order of device deletions. > > References: bsc#1010946 > Signed-off-by: Martin Wilck <mwi...@suse.de> > --- With the Reference

Re: [PATCH 1/2] hpsa: cleanup sas_phy structures in sysfs when unloading

2016-11-21 Thread Johannes Thumshirn
t;mwi...@suse.de> Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de> > --- > drivers/scsi/hpsa.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c > index efe2f36..8ec77c3 100644 > --- a/drivers/scsi/hpsa.c &

Re: SG does not ignore dxferp (direct io + mmap)

2016-11-21 Thread Johannes Thumshirn
On Mon, Nov 21, 2016 at 04:15:52PM +0100, Johannes Thumshirn wrote: > On Mon, Nov 21, 2016 at 04:55:29PM +0200, Eyal Ben David wrote: > > Thanks for your reply, > > > > On RHEL system it does not occur. > > > > So far I have seen the problem on Ubuntu 16.04 an

Re: SG does not ignore dxferp (direct io + mmap)

2016-11-21 Thread Johannes Thumshirn
look at it. Byte, Johannes -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg) Key

Re: [PATCH v3 02/16] scsi: don't use fc_bsg_job::request and fc_bsg_job::reply directly

2016-11-15 Thread Johannes Thumshirn
On Tue, Oct 25, 2016 at 09:43:14AM +0200, Johannes Thumshirn wrote: > On Fri, Oct 14, 2016 at 09:38:21AM +0200, Johannes Thumshirn wrote: > > On Thu, Oct 13, 2016 at 05:55:11PM +0200, Steffen Maier wrote: > > > Hm, still behaves for me like I reported for v2: > > > htt

Re: Need some pointers to debug a target hang

2016-10-30 Thread Johannes Thumshirn
On Sat, Oct 29, 2016 at 03:53:25PM -0700, Nicholas A. Bellinger wrote: > Hi Johannes & Zhu, > > On Tue, 2016-10-18 at 23:29 -0700, Nicholas A. Bellinger wrote: > > On Tue, 2016-10-18 at 19:35 +0200, Johannes Thumshirn wrote: > > > On Tue, Oct 18, 2016 at 09:01:34AM +02

Re: [PATCH 09/12] SRP transport: Move queuecommand() wait code to SCSI core

2016-10-27 Thread Johannes Thumshirn
ass...@sandisk.com> > Reviewed-by: Christoph Hellwig <h...@lst.de> Looks good, Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de> -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX Gm

Re: [PATCH 06/12] blk-mq: Add a kick_requeue_list argument to blk_mq_requeue_request()

2016-10-27 Thread Johannes Thumshirn
by Christoph Hellwig. > > Signed-off-by: Bart Van Assche <bart.vanass...@sandisk.com> > Cc: Christoph Hellwig <h...@lst.de> Looks good, Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de> -- Johannes Thumshirn

Re: [PATCH 1/4] hpsa: correct lockup detector pci_disable_device

2016-10-27 Thread Johannes Thumshirn
fail_all_outstanding_cmds(h); > > } > > > > > Meh. > Why is pci_disable_device() not checking for it? It does: 1607 void pci_disable_device(struct pci_dev *dev) 1608 { [...] 1615 dev_WARN_ONCE(>dev, atomic_read(>enable_cnt) <= 0, 1616

Re: [PATCH 03/12] blk-mq: Introduce blk_mq_queue_stopped()

2016-10-27 Thread Johannes Thumshirn
are contexts of a blk-mq queue have been stopped. > > Signed-off-by: Bart Van Assche <bart.vanass...@sandisk.com> > Reviewed-by: Hannes Reinecke <h...@suse.com> Looks good, Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de> -- Johannes Thumshirn

Re: [PATCH 07/12] dm: Use BLK_MQ_S_STOPPED instead of QUEUE_FLAG_STOPPED in blk-mq code

2016-10-27 Thread Johannes Thumshirn
> Signed-off-by: Bart Van Assche <bart.vanass...@sandisk.com> > Reviewed-by: Christoph Hellwig <h...@lst.de> Looks good, Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de> -- Johannes Thumshirn Storage jthumsh...@suse.de

Re: [PATCH 10/12] SRP transport, scsi-mq: Wait for .queue_rq() if necessary

2016-10-27 Thread Johannes Thumshirn
> Reviewed-by: Christoph Hellwig <h...@lst.de> Looks good, Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de> -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr.

Re: [PATCH 02/12] blk-mq: Introduce blk_mq_hctx_stopped()

2016-10-27 Thread Johannes Thumshirn
e> Looks good, Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de> -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smit

Re: [PATCH 04/12] blk-mq: Move more code into blk_mq_direct_issue_request()

2016-10-27 Thread Johannes Thumshirn
that function instead of looking it up a > second time. These changes avoid that code has to be duplicated > in the next patch. > > Signed-off-by: Bart Van Assche <bart.vanass...@sandisk.com> > Cc: Christoph Hellwig <h...@lst.de> Looks good, Reviewed-by: Johannes Thums

Re: [PATCH 04/12] blk-mq: Move more code into blk_mq_direct_issue_request()

2016-10-27 Thread Johannes Thumshirn
that function instead of looking it up a > second time. These changes avoid that code has to be duplicated > in the next patch. > > Signed-off-by: Bart Van Assche <bart.vanass...@sandisk.com> > Cc: Christoph Hellwig <h...@lst.de> Looks good, Reviewed-by: Johannes Thums

Re: [PATCH 01/12] blk-mq: Do not invoke .queue_rq() for a stopped queue

2016-10-27 Thread Johannes Thumshirn
ed-by: Ming Lei <tom.leim...@gmail.com> > Signed-off-by: Bart Van Assche <bart.vanass...@sandisk.com> > Reviewed-by: Christoph Hellwig <h...@lst.de> Looks good, Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de> -- Johannes Thumshirn

Re: [PATCH] Avoid that SCSI device removal through sysfs triggers a deadlock

2016-10-28 Thread Johannes Thumshirn
On Thu, Oct 27, 2016 at 08:38:03AM -0700, Bart Van Assche wrote: > On 10/27/2016 02:46 AM, Johannes Thumshirn wrote: > > On Wed, Oct 26, 2016 at 11:44:51AM -0700, Bart Van Assche wrote: > > > +static void scsi_remove_device_async(struct scsi_device *sdev) > > > +{ >

Re: [PATCH v2 02/16] scsi: don't use fc_bsg_job::request and fc_bsg_job::reply directly

2016-10-30 Thread Johannes Thumshirn
ere bsg_reply is NULL. > The assignment tries to write to memory at address NULL causing the kernel > page fault. > > Does your suggested change for [PATCH v3 02/16], shuffling the > job->request_len checks, address above kernel page fault? This is what I hope at least. I'm s

[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 <jthumsh...@suse

[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 <jthumsh...@suse.de> --- 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

[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 <jthumsh...@suse.de> --- drivers/scsi/scsi_transport_fc.c | 1 - include/scsi/scsi_transport_fc.h | 1 - 2 files changed, 2 del

[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 <jthumsh...@suse.de> --- 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/d

[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 <jthumsh...@suse.de> --- 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

[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 <jthumsh...@suse.de> --- 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

[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 <jthumsh...@suse.de> --- 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/d

[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 <jthumsh...@suse.de> --- 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/ib

[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 <jthu

[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 <jthumsh...@suse.de> --- 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

[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 <jthumsh...@suse.de> --- 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/d

[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 <jthumsh...@suse.de> --- 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/d

[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 <jthumsh...@suse.de> --- 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_transpor

[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 <jthumsh...@suse.de> --- drivers/scsi/scsi_transport_fc.c | 4 ++-- include/scsi/scsi_transport_fc.h | 1 + 2 files changed, 3 inse

[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 <jthumsh...@suse.de> --- 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/driver

[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 <jthumsh...@suse.de> --- include/scsi/scsi_transport_fc.h | 5 + 1 file changed, 5 insertions(+) diff --git a/includ

[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 <jthumsh...@suse.de> --- 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

[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 <jthumsh...@suse.de> --- 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

[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 <jthumsh...@suse.de> --- block/bsg-lib.c | 7 +-- include/linux/bsg-lib.h | 2 ++ 2 files changed, 7 inse

[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 <jthumsh...@suse.de> --- drivers/scsi/scsi_transport_fc.c | 20 ++-- 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/drivers/scsi/scsi_transport_

[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 <jthumsh...@suse.de> --- drivers/scsi/ibmvscsi/ibmvfc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ib

[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 <jthumsh...@suse.de> --- 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

[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 <jthumsh...@suse.de> --- drivers/scsi/lpfc/lpfc_bsg.c | 38 +++--- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/drivers/scs

[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 <jthumsh...@suse.de> --- include/scsi/scsi_transport_fc.h | 5 + 1 file changed, 5 insertions(+) diff --git a/includ

[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 <jthumsh...@suse.de> --- drivers/scsi/lpfc/lpfc_bsg.c | 3 ++- drivers/scsi/scsi_transport_fc.c | 2 +- include/scsi/scsi_transport_fc.h | 12 +++--

[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 <jthumsh...@suse.de> --- drivers/scsi/scsi_transport_fc.

[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 <jthumsh...@suse.de> --- drivers/scsi/qla2xxx/qla_bsg.c

[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 <jthumsh...@suse.de> --- drivers/scsi/ibmvscsi/ibmvfc.c | 22 --

[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 <jthumsh...@suse.de> --- drivers/s390/scsi/zfcp_fc.c | 9 ++--- 1 file chan

[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 <jthumsh...@suse.de> --- 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/zfc

[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 <jthumsh...@suse.de> --- 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/sc

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

2016-10-11 Thread Johannes Thumshirn
' and corresponding changes in order to get the series bisectable. The idea for this change arose when discussing racy sysfs handling the FC bsg code with Christoph and is a next step in moving all bsg clients to bsg-lib to eventually clean up the in kernel bsg API. Johannes Thumshirn (44): scsi: Get

[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 <jthumsh...@suse.de> --- drivers/scsi/bfa/bfad_bsg.

[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 <jthumsh...@suse.de> --- drivers/scsi/lpfc/lpfc_bsg.c

[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 <jthumsh...@suse.de> --- drivers/s390/scsi/zfcp_fc.c | 2 +- drivers/scsi/bfa/bfad_bsg.c

[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 <jthumsh...@suse.de> --- drivers/scsi/libfc/fc_lport.c | 23 +--

[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 <jthumsh...@suse.de> --- drivers/scsi/qla2xxx/qla_bsg.c | 44 +- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/d

[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 <jthumsh...@suse.de> --- block/bsg-lib.c | 3 +-- include/linux/bsg-lib.h | 1 - 2 files changed, 1 insertion

[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 <jthumsh...@suse.de> --- drivers/s390/scsi/zfcp_fc.c | 2 +- drivers/scsi/bfa/bfad_bsg.c | 4 ++-- drivers/scsi/ibmvscsi/ib

[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 <jthumsh...@suse.de> --- block/bsg-lib.c | 17 ++--- drivers/scsi/scsi_transport_fc.c | 2 +- include/linux/bsg-lib.h | 3 ++- 3

[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=131149780921009=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 <jthumsh...@suse.de> --- drivers/s390/scsi/zfcp_fc.c | 15 drivers/scsi/bfa/bfad_bsg.c

[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 <jthumsh...@suse.de> --- drivers/scsi/scsi_transport_fc.c | 16 ++-- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/driver

[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 <jthumsh...@suse.de> --- 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

[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 <jthumsh...@suse.de> --- 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

[PATCH v3 07/16] scsi: libfc: don't set FC_RQST_STATE_DONE before calling fc_bsg_jobdone()

2016-10-13 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 <jthumsh...@suse.de> Re

[PATCH v3 15/16] scsi: fc: move FC transport's bsg code to bsg-lib

2016-10-13 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=131149780921009=2 Signed-off-by: Johannes Thumshirn

[PATCH v3 16/16] block: unexport bsg_softirq_done() again

2016-10-13 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 <jthumsh...@suse.de> Reviewed-by: Hannes Reinecke <h...@suse.com> --- block/bsg-lib.c | 3 +-- include/lin

[PATCH v3 04/16] scsi: Unify interfaces of fc_bsg_jobdone and bsg_job_done

2016-10-13 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 <jthumsh...@suse.de> Reviewed-by: Hannes Reinecke <h...@suse.com> --- drivers/s390/sc

[PATCH v3 02/16] scsi: don't use fc_bsg_job::request and fc_bsg_job::reply directly

2016-10-13 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 <jthumsh...@suse.de> Reviewed-by: Hannes Reinecke <h...@suse.com> --- drive

[PATCH v3 03/16] scsi: fc: Export fc_bsg_jobdone and use it in FC drivers

2016-10-13 Thread Johannes Thumshirn
-by: Johannes Thumshirn <jthumsh...@suse.de> Reviewed-by: Hannes Reinecke <h...@suse.com> --- drivers/s390/scsi/zfcp_fc.c | 2 +- drivers/scsi/bfa/bfad_bsg.c | 4 ++-- drivers/scsi/ibmvscsi/ibmvfc.c | 2 +- drivers/scsi/libfc/fc_lport.c| 4 ++-- drivers/scsi/lpfc/lpfc_bs

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

2016-10-13 Thread Johannes Thumshirn
ero() and use it in scsi_transport_fc.c Changes to v2: * Add Hannes' Reviewd-by tags * Address Hannes' comment about kref handling in 8/16 * Move CONFIG_BLK_DEV_BSGLIB dependency to patch 12/16 as per 0day results Johannes Thumshirn (16): scsi: Get rid of struct fc_bsg_buffer scsi: don't

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

2016-10-13 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 <jthumsh...@suse.de> Reviewed-by: Hannes Reinecke <h...@suse.com> --- drivers/scsi/lpfc/lpfc_bsg.c | 3 ++- drivers/scsi/scsi_transport_fc.c | 2

Re: [PATCH 12/24] libfc: Clarify ramp-down messages

2016-10-13 Thread Johannes Thumshirn
On Thu, Oct 13, 2016 at 03:10:48PM +0200, Hannes Reinecke wrote: > When the queue depth is reduced we should print out the reason > for this; it might be due to a queue full condition. > > Signed-off-by: Hannes Reinecke <h...@suse.com> > --- Acked-by: Johannes Thums

[PATCH v3 06/16] scsi: fc: provide fc_bsg_to_rport() helper

2016-10-13 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. Also move all LLDDs to use the new helper. Signed-off-by: Johannes Thumshirn <jthumsh...@suse.de> Reviewed-by: Hannes Reinecke <h...@suse.com> --- drive

[PATCH v3 09/16] block: add reference counting for struct bsg_job

2016-10-13 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 <jthumsh...@suse.de> Reviewed-by: Hannes Reinecke <h...@suse.com> --- block/bsg-lib.c | 7 +-- inclu

[PATCH v3 11/16] scsi: fc: Use bsg_destroy_job

2016-10-13 Thread Johannes Thumshirn
fc_destroy_bsgjob() and bsg_destroy_job() are now 1:1 copies, so use the later. As bsg_destroy_job() comes from bsg-lib we need to select it in Kconfig once CONFOG_SCSI_FC_ATTRS is active. Signed-off-by: Johannes Thumshirn <jthumsh...@suse.de> Reviewed-by: Hannes Reinecke <h...

[PATCH v3 14/16] block: add bsg_job_put() and bsg_job_get()

2016-10-13 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 <jthumsh...@suse.de> Reviewed-by: Hannes Reinecke <h...@suse.com> --- block/bsg-lib.c | 17 ++--- drivers/scsi/scsi_transpo

Re: [PATCH v2 08/16] scsi: fc: implement kref backed reference counting

2016-10-13 Thread Johannes Thumshirn
On Thu, Oct 13, 2016 at 01:42:06PM +0200, Hannes Reinecke wrote: > On 10/12/2016 03:06 PM, Johannes Thumshirn wrote: > > Implement kref backed reference counting instead of rolling our own. This > > elimnates the need of the following fields in 'struct fc_bsg_job': > > * ref_

[PATCH v3 05/16] scsi: fc: provide fc_bsg_to_shost() helper

2016-10-13 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. Also use this little helper in the LLDDs. Signed-off-by: Johannes Thumshirn <jthumsh...@suse.de> Reviewed-by: Hannes Reinecke <h...@suse.com> --- drive

[PATCH v3 13/16] scsi: fc: use bsg_job_done

2016-10-13 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 <jthumsh...@suse.de> Reviewed-by: Hannes Reinecke <h...@suse.com> --- drivers/s390/scsi/zfcp_fc.c | 2 +- drivers/scsi/bf

[PATCH v3 08/16] scsi: fc: implement kref backed reference counting

2016-10-13 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 <jthu

[PATCH v3 10/16] scsi: change FC drivers to use 'struct bsg_job'

2016-10-13 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 <jthumsh...@suse.de> Reviewed-by: Hannes Reinecke <h...@suse.com> --- drivers/s390/scsi/zfcp_ex

[PATCH v3 12/16] scsi: fc: use bsg_softirq_done

2016-10-13 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 <jthumsh...@suse.de> Reviewed-by: Hannes Reinecke <h...@suse.com> --- block/bsg-lib.c | 3 ++- drivers/scsi/scsi_transpo

Re: [PATCH v2 02/16] scsi: don't use fc_bsg_job::request and fc_bsg_job::reply directly

2016-10-13 Thread Johannes Thumshirn
rid of struct > fc_bsg_buffer > > $ git bisect good > > 3087864ce3d7282f59021245d8a5f83ef1caef18 is the first bad commit > > commit 3087864ce3d7282f59021245d8a5f83ef1caef18 > > Author: Johannes Thumshirn <jthumsh...@suse.de> > > Date: Wed Oct 12 15:06:28 2016 +0200 > > > >

Re: [PATCH v3 02/16] scsi: don't use fc_bsg_job::request and fc_bsg_job::reply directly

2016-10-13 Thread Johannes Thumshirn
On Thu, Oct 13, 2016 at 05:55:11PM +0200, Steffen Maier wrote: > Hm, still behaves for me like I reported for v2: > http://marc.info/?l=linux-scsi=147637177902937=2 > Well given what you've wrote for v2 it's kinda expected. Byte, Johannes -- Johannes

[PATCH v2 05/16] scsi: fc: provide fc_bsg_to_shost() helper

2016-10-12 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. Also use this little helper in the LLDDs. Signed-off-by: Johannes Thumshirn <jthumsh...@suse.de> --- drivers/s390/scsi/zfcp_fc.c | 4 +-- drivers/scsi/bfa/bfad

[PATCH v2 09/16] block: add reference counting for struct bsg_job

2016-10-12 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 <jthumsh...@suse.de> --- block/bsg-lib.c | 7 +-- include/linux/bsg-lib.h | 2 ++ 2 files changed, 7 inse

<    3   4   5   6   7   8   9   10   11   12   >