Re: dangling pointers and/or reentrancy in scmd_eh_abort_handler?

2014-05-20 Thread Bart Van Assche
On 05/19/14 18:43, Bart Van Assche wrote: > On 05/19/14 18:09, Paolo Bonzini wrote: >> Il 19/05/2014 17:08, Bart Van Assche ha scritto: >>> On 05/19/14 16:08, Paolo Bonzini wrote: 2) reentrancy: the softirq handler and scmd_eh_abort_handler can run concurrently, and call scsi_finish_comma

Re: dangling pointers and/or reentrancy in scmd_eh_abort_handler?

2014-05-20 Thread Bart Van Assche
On 05/20/14 09:32, Bart Van Assche wrote: > On 05/19/14 18:43, Bart Van Assche wrote: >> On 05/19/14 18:09, Paolo Bonzini wrote: >>> Il 19/05/2014 17:08, Bart Van Assche ha scritto: On 05/19/14 16:08, Paolo Bonzini wrote: > 2) reentrancy: the softirq handler and scmd_eh_abort_handler can r

Re: [PATCH 6/6] virtio-scsi: Enable DIF/DIX modes in SCSI host LLD

2014-05-20 Thread Paolo Bonzini
Il 19/05/2014 21:07, Nicholas A. Bellinger ha scritto: Hi MST, So I've finally got some cycles to get back to this code, and wanted to verify the outstanding items you had previously raised: - Convert vhost-scsi to be independent of IOV layout using memcpy_fromiovecend. (Does this effect exis

Re: [PATCH] virtio_scsi: don't call virtqueue_add_sgs(... GFP_NOIO) holding spinlock.

2014-05-20 Thread Paolo Bonzini
Il 20/05/2014 07:12, Rusty Russell ha scritto: This triggers every time we do a SCSI abort: virtscsi_tmf -> virtscsi_kick_cmd (grab lock and call) -> virtscsi_add_cmd -> virtqueue_add_sgs (GFP_NOIO) Logs look like this: sd 0:0:0:0: [sda] abort BUG: sleeping function called from invali

Re: dangling pointers and/or reentrancy in scmd_eh_abort_handler?

2014-05-20 Thread Bart Van Assche
On 05/19/14 16:08, Paolo Bonzini wrote: > 1) dangling pointers: scsi_put_command calls cancel_delayed_work(), but > that doesn't mean that the scmd_eh_abort_handler couldn't be already > running. If the scmd_eh_abort_handler starts while the softirq handler > is calling scsi_put_command (e.g. scsi

Re: dangling pointers and/or reentrancy in scmd_eh_abort_handler?

2014-05-20 Thread Paolo Bonzini
Il 20/05/2014 10:10, Bart Van Assche ha scritto: REQ_ATOM_COMPLETE is already set before scsi_eh_scmd_add() is called since that function is only invoked after the block layer has marked a request as "complete". The only callers of scsi_eh_scmd_add() are scsi_softirq_done(), scsi_times_out() and

[PATCH 3/5] qla2xxx: Restrict max_lun to 16-bit for older HBAs

2014-05-20 Thread Hannes Reinecke
Older HBAs are only capable of supporting 16-bit LUNs, so we need to make sure to adjust max_lun accordingly. Signed-off-by: Hannes Reinecke Acked-by: Chad Dupuis --- drivers/scsi/qla2xxx/qla_os.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/qla2xxx/qla

[PATCH 2/5] scsi_scan: Restrict sequential scan to 256 LUNs

2014-05-20 Thread Hannes Reinecke
Sequential scan for more than 256 LUNs is very fragile as LUNs might not be numbered sequentially after that point. SAM revisions later than SCSI-3 impose a structure on LUNs larger than 256, making LUN numbers between 256 and 16384 illegal. SCSI-3, however allows for plain 64-bit numbers with no

[PATCH 1/5] scsi: Remove CONFIG_SCSI_MULTI_LUN

2014-05-20 Thread Hannes Reinecke
Obsolete; either use 'max_lun' if the host supports only a limited number of LUNs or BLIST_NOLUN if the target has problems addressing more than one LUN. Signed-off-by: Hannes Reinecke --- drivers/scsi/Kconfig | 14 -- drivers/scsi/dc395x.c| 9 + drivers/scsi/ncr53c8

[PATCH 5/5] scsi: use 64-bit value for 'max_luns'

2014-05-20 Thread Hannes Reinecke
Now that we're using 64-bit LUNs internally we need to increase the size of max_luns to 64 bits, too. Signed-off-by: Hannes Reinecke --- drivers/message/i2o/i2o_scsi.c | 2 +- drivers/scsi/cxgbi/libcxgbi.c| 2 +- drivers/scsi/cxgbi/libcxgbi.h| 2 +- drivers/scsi/dc395x.c

[PATCHv2 0/5] Support 64-bit LUNs

2014-05-20 Thread Hannes Reinecke
Hi all, this patchset updates the SCSI stack to support full 64-bit LUNs. The first patch is a simple fix; the next patch updates the sequential scan logic to be compliant with SPC. The third patch addresses a firmware issue with earlier qla2xxx HBAs. The last two patches update the SCSI stack and

[Bug 76241] USB Device Not Recognised

2014-05-20 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=76241 Alan changed: What|Removed |Added Status|REOPENED|RESOLVED Resolution|---

Re: [PATCH 3/5] qla2xxx: Restrict max_lun to 16-bit for older HBAs

2014-05-20 Thread Chad Dupuis
On Tue, 20 May 2014, Hannes Reinecke wrote: Older HBAs are only capable of supporting 16-bit LUNs, so we need to make sure to adjust max_lun accordingly. Signed-off-by: Hannes Reinecke Acked-by: Chad Dupuis --- drivers/scsi/qla2xxx/qla_os.c | 7 ++- 1 file changed, 6 insertions(+), 1 dele

Re: [PATCH 2/13 v2] [SCSI] qla2xxx: make return of 0 explicit

2014-05-20 Thread Saurav Kashyap
Acked-by: Saurav Kashyap >On Tue, May 20, 2014 at 07:36:48AM +0800, Julia Lawall wrote: >> >> >> On Mon, 19 May 2014, Dan Carpenter wrote: >> >> > On Mon, May 19, 2014 at 04:07:52PM +, Saurav Kashyap wrote: >> > > Hi Julia, >> > > >> > > Status is already set to 0 at the beginning of the f

[PATCH 1/3] ipr: Add support for async scanning to speed up boot

2014-05-20 Thread Brian King
Switch device scanning logic in the ipr driver to use the async scan API. This speeds up boot times, particularly on large systems. Signed-off-by: Brian King --- drivers/scsi/ipr.c | 88 + drivers/scsi/ipr.h |4 -- 2 files changed, 44 i

[PATCH 3/3] ipr: kexec boot speed improvements

2014-05-20 Thread Brian King
Currently when performing a kexec boot with an ipr adapter, the adapter gets shutdown completely, flushing all write cache, as well as performing a full hardware reset of the card during the shutdown phase of the old kernel. This forces the new kernel to then wait for the adapter firmware to reini

[PATCH 2/3] kexec: Export kexec_in_progress

2014-05-20 Thread Brian King
Export kexec_in_progress for use by device drivers and other modules to optimize kexec boot. Signed-off-by: Brian King --- kernel/kexec.c |2 ++ 1 file changed, 2 insertions(+) diff -puN kernel/kexec.c~kexec_export_in_prog kernel/kexec.c --- linux/kernel/kexec.c~kexec_export_in_prog 201

Re: [PATCH 6/6] virtio-scsi: Enable DIF/DIX modes in SCSI host LLD

2014-05-20 Thread Nicholas A. Bellinger
On Tue, 2014-05-20 at 10:35 +0200, Paolo Bonzini wrote: > Il 19/05/2014 21:07, Nicholas A. Bellinger ha scritto: > > Hi MST, > > > > So I've finally got some cycles to get back to this code, and wanted to > > verify the outstanding items you had previously raised: > > > > - Convert vhost-scsi to be

Re: [PATCH] scsi: dc395x.c: Fix for possible null pointer dereference

2014-05-20 Thread Rickard Strandqvist
Okay, good! Or, do I need to do anything else :-) Best regards Rickard Strandqvist 2014-05-19 13:39 GMT+02:00 Oliver Neukum : > On Sun, 2014-05-18 at 21:50 +0200, Guennadi Liakhovetski wrote: >> On Sun, 18 May 2014, Rickard Strandqvist wrote: >> >> > There is otherwise a risk of a possible null

Re: [ANNOUNCE] scsi patch queue tree

2014-05-20 Thread Stephen Rothwell
Hi Christoph, On Mon, 19 May 2014 22:39:28 -0700 Christoph Hellwig wrote: > > On Tue, May 20, 2014 at 10:03:43AM +1000, Stephen Rothwell wrote: > > Is this a request for inclusion of those branches into linux-next > > separately from the scsi tree itself? > > James said he wants to include it in

Re: [PATCH RESEND] scsi: Output error messages using structured printk in single line

2014-05-20 Thread James Bottomley
On Thu, 2014-02-27 at 13:17 +0900, Yoshihiro YUNOMAE wrote: > +/* Maximum size of a local buffer for structured printk */ > +#define SCSI_LOG_LINE_MAX 512 > + > +/* Local buffer for structured printk */ > +struct scsi_log_line { > + int offset; > + char buf[SCSI_LOG_LINE_MAX]; > +}; This p

Re: [ANNOUNCE] scsi patch queue tree

2014-05-20 Thread James Bottomley
On Wed, 2014-05-21 at 09:46 +1000, Stephen Rothwell wrote: > Hi Christoph, > > On Mon, 19 May 2014 22:39:28 -0700 Christoph Hellwig > wrote: > > > > On Tue, May 20, 2014 at 10:03:43AM +1000, Stephen Rothwell wrote: > > > Is this a request for inclusion of those branches into linux-next > > > sep

RE: [PATCH RESEND] scsi: Output error messages using structured printk in single line

2014-05-20 Thread Elliott, Robert (Server Storage)
> -Original Message- > From: linux-scsi-ow...@vger.kernel.org [mailto:linux-scsi- > ow...@vger.kernel.org] On Behalf Of James Bottomley > Sent: Tuesday, May 20, 2014 9:22 PM > To: Yoshihiro YUNOMAE > Cc: Hannes Reinecke; Prarit Bhargava; linux-scsi@vger.kernel.org; Kay > Sievers; linux-ke

RE: [PATCH] scsi: bfa: bfa_fcs_lport.c: Fix for possible null pointer dereference

2014-05-20 Thread Anil Gurumurthy
Thanks for the patch. Acked-by: Anil Gurumurthy -Original Message- From: Rickard Strandqvist [mailto:rickard_strandqv...@spectrumdigital.se] Sent: 18 May 2014 21:36 To: Anil Gurumurthy; Sudarsana Kalluru Cc: Rickard Strandqvist; James E.J. Bottomley; linux-scsi; linux-kernel Subject: [PAT

Re: [PATCH RESEND] scsi: Output error messages using structured printk in single line

2014-05-20 Thread Hannes Reinecke
On 05/21/2014 05:18 AM, Elliott, Robert (Server Storage) wrote: -Original Message- From: linux-scsi-ow...@vger.kernel.org [mailto:linux-scsi- ow...@vger.kernel.org] On Behalf Of James Bottomley Sent: Tuesday, May 20, 2014 9:22 PM To: Yoshihiro YUNOMAE Cc: Hannes Reinecke; Prarit Bharga