Re: [PATCH] scsi: t10-pi: Return correct ref tag when queue has no integrity profile

2018-12-05 Thread Bart Van Assche
On 12/5/18 6:04 AM, Martin K. Petersen wrote: Since the return value of this function is 'u32', can the ' & 0x' be left out? Absolutely, and I almost zapped it. However, I decided to leave it to emphasize the point that the reference tag is truncated to a 32-bit value. To me, this is

Re: [PATCH] scsi: t10-pi: Return correct ref tag when queue has no integrity profile

2018-12-04 Thread Bart Van Assche
On 12/4/18 6:31 PM, Martin K. Petersen wrote: Commit ddd0bc756983 ("block: move ref_tag calculation func to the block layer") moved ref tag calculation from SCSI to a library function. However, this change broke returning the correct ref tag for devices operating in DIF mode since these do not

Re: [PATCH v6 3/5] target: add device vendor_id configfs attribute

2018-12-04 Thread Bart Van Assche
On Tue, 2018-12-04 at 16:26 +0300, Roman Bolshakov wrote: > wrt PATCH 5 in the series. Should we allow to set vendor_id for for > pscsi? I think we should allow that. Bart.

Re: [PATCH v5 5/5] target: perform t10_wwn ID initialisation in target_alloc_device()

2018-12-03 Thread Bart Van Assche
On Sat, 2018-12-01 at 15:59 +0100, Hannes Reinecke wrote: > On 12/1/18 12:34 AM, David Disseldorp wrote: > > Initialise the t10_wwn vendor, model and revision defaults when a > > device is allocated instead of when it's enabled. This ensures that > > custom vendor or model strings set prior to

Re: [PATCH v4 6/7] target: remove hardcoded T10 Vendor ID in INQUIRY response

2018-11-30 Thread Bart Van Assche
On Fri, 2018-11-30 at 15:41 +0100, David Disseldorp wrote: > On Fri, 30 Nov 2018 14:17:49 +0100, David Disseldorp wrote: > > > > Where is the code that initializes dev->t10_wwn.vendor to "LIO-ORG"? Did I > > > perhaps overlook something? > > > > This is done in target_configure_device() . > >

Re: [PATCH v4 3/7] target: consistently null-terminate t10_wwn.model

2018-11-29 Thread Bart Van Assche
On Thu, 2018-11-29 at 21:31 +0100, David Disseldorp wrote: > On Thu, 29 Nov 2018 08:24:38 -0800, Bart Van Assche wrote: > > On Thu, 2018-11-29 at 02:01 +0100, David Disseldorp wrote: > > > [ ... ] > > Additionally, have you considered to use strlcpy() > > ins

[PATCH v2] qla2xxx: Split the __qla2x00_abort_all_cmds() function

2018-11-29 Thread Bart Van Assche
Nesting in __qla2x00_abort_all_cmds() is way too deep. Reduce the nesting level by introducing a helper function. This patch does not change any functionality. Reviewed-by: Laurence Oberman Acked-by: Himanshu Madhani Signed-off-by: Bart Van Assche --- Changes in v2 compared to v1: rebased

Re: [PATCH v4 7/7] target: use printf width specifier for t10_wwn field dumps

2018-11-29 Thread Bart Van Assche
On Thu, 2018-11-29 at 02:01 +0100, David Disseldorp wrote: > The existing for loops step over null-terminators for right-padding. > Padding can be achieved in a much simpler way using printf width > specifiers. How about squashing patches 2, 3, 4 and 7 into a single patch? I think that would make

Re: [PATCH v4 6/7] target: remove hardcoded T10 Vendor ID in INQUIRY response

2018-11-29 Thread Bart Van Assche
On Thu, 2018-11-29 at 02:01 +0100, David Disseldorp wrote: > Use the value stored in t10_wwn.vendor, which defaults to "LIO-ORG", but > can be reconfigured via the vendor_id ConfigFS attribute. > > Signed-off-by: David Disseldorp > --- > drivers/target/target_core_spc.c | 8 +--- > 1 file

Re: [PATCH v4 5/7] target: add device vendor_id configfs attribute

2018-11-29 Thread Bart Van Assche
On Thu, 2018-11-29 at 02:01 +0100, David Disseldorp wrote: > +static ssize_t target_wwn_vendor_id_show(struct config_item *item, > + char *page) > +{ > + return sprintf(page, "%s\n", _t10_wwn(item)->vendor[0]); > +} The "&" and "[0]" are superfluous in the above sprintf()

Re: [PATCH v4 4/7] target: consistently null-terminate t10_wwn.revision

2018-11-29 Thread Bart Van Assche
On Thu, 2018-11-29 at 02:01 +0100, David Disseldorp wrote: > strncpy(>t10_wwn.revision[0], > - dev->transport->inquiry_rev, 4); > + dev->transport->inquiry_rev, INQUIRY_REVISION_LEN); > + dev->t10_wwn.revision[INQUIRY_REVISION_LEN]

Re: [PATCH v4 3/7] target: consistently null-terminate t10_wwn.model

2018-11-29 Thread Bart Van Assche
On Thu, 2018-11-29 at 02:01 +0100, David Disseldorp wrote: > diff --git a/drivers/target/target_core_configfs.c > b/drivers/target/target_core_configfs.c > index f6b1549f4142..9f49b1afd685 100644 > --- a/drivers/target/target_core_configfs.c > +++ b/drivers/target/target_core_configfs.c > @@

Re: [PATCH v4 2/7] target: consistently null-terminate t10_wwn.vendor

2018-11-29 Thread Bart Van Assche
On Thu, 2018-11-29 at 02:01 +0100, David Disseldorp wrote: > - strncpy(>t10_wwn.vendor[0], "LIO-ORG", 8); > + strncpy(>t10_wwn.vendor[0], "LIO-ORG", INQUIRY_VENDOR_LEN); > + dev->t10_wwn.vendor[INQUIRY_VENDOR_LEN] = '\0'; This looks weird to me. Have you

Re: [PATCH v3 3/4] target: add device vendor_id configfs attribute

2018-11-28 Thread Bart Van Assche
On Wed, 2018-11-28 at 17:44 +0100, David Disseldorp wrote: > Hi Bart, > > On Wed, 28 Nov 2018 08:36:19 -0800, Bart Van Assche wrote: > > > Maybe I'm missing something, but why is zeroing of unused bytes in these > > functions > > necessary? Would the follo

Re: [PATCH v3 3/4] target: add device vendor_id configfs attribute

2018-11-28 Thread Bart Van Assche
On Wed, 2018-11-28 at 17:28 +0100, David Disseldorp wrote: > On Wed, 28 Nov 2018 08:08:30 -0800, Bart Van Assche wrote: > > > > Just a follow up here. I think it's safer to retain strncpy() in this > > > function for the purpose of zero fi

Re: [PATCH v3 3/4] target: add device vendor_id configfs attribute

2018-11-28 Thread Bart Van Assche
On Wed, 2018-11-28 at 16:37 +0100, David Disseldorp wrote: > On Tue, 20 Nov 2018 19:00:57 +0100, David Disseldorp wrote: > > > > > + strncpy(buf, page, sizeof(buf)); > > > > > > Isn't strncpy() deprecated? How about using strlcpy() instead? > > > > Will change to use strlcpy in the

[PATCH 0/2] Two refactoring patches for the qla2xxx driver

2018-11-27 Thread Bart Van Assche
Hi Martin, The two patches in this series make the qla2xxx driver source code easier to read without changing the driver functionality. Please consider these patches for kernel v4.21. Thanks, Bart. Bart Van Assche (2): qla2xxx: Introduce a switch/case statement in qlt_xmit_tm_rsp() qla2xxx

[PATCH 1/2] qla2xxx: Introduce a switch/case statement in qlt_xmit_tm_rsp()

2018-11-27 Thread Bart Van Assche
This patch improves code readability but does not change any functionality. Cc: Himanshu Madhani Signed-off-by: Bart Van Assche --- drivers/scsi/qla2xxx/qla_target.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers

[PATCH 2/2] qla2xxx: Split the __qla2x00_abort_all_cmds() function

2018-11-27 Thread Bart Van Assche
Nesting in __qla2x00_abort_all_cmds() is way too deep. Reduce the nesting level by introducing a helper function. This patch does not change any functionality. Cc: Himanshu Madhani Signed-off-by: Bart Van Assche --- drivers/scsi/qla2xxx/qla_os.c | 89 +-- 1 file

Re: [PATCH v3 3/4] target: add device vendor_id configfs attribute

2018-11-20 Thread Bart Van Assche
On Tue, 2018-11-20 at 19:00 +0100, David Disseldorp wrote: > I tend to agree that it's dangerous, but chose to stay somewhat > consistent with the other t10_wwn strings that are treated as though > they may not be NULL terminated. > > If you're in favour adding an extra terminator byte here, then

Re: [PATCH v3 3/4] target: add device vendor_id configfs attribute

2018-11-20 Thread Bart Van Assche
On Mon, 2018-11-19 at 22:06 +0100, David Disseldorp wrote: > /* > + * STANDARD and VPD page 0x80 T10 Vendor Identification > + */ > +static ssize_t target_wwn_vendor_id_show(struct config_item *item, > + char *page) > +{ > + return sprintf(page, "T10 Vendor Identification: %." > +

Re: [PATCH v3 1/4] target: use consistent left-aligned ASCII INQUIRY data

2018-11-20 Thread Bart Van Assche
On Mon, 2018-11-19 at 22:06 +0100, David Disseldorp wrote: > diff --git a/drivers/target/target_core_spc.c > b/drivers/target/target_core_spc.c > index f459118bc11b..c37dd36ec77d 100644 > --- a/drivers/target/target_core_spc.c > +++ b/drivers/target/target_core_spc.c > @@ -108,12 +108,17 @@

Re: [PATCH] qla2xxx: Add SysFS hook for FC-NVMe autoconnect

2018-11-13 Thread Bart Van Assche
On Tue, 2018-11-13 at 17:38 +, Madhani, Himanshu wrote: > On Nov 13, 2018, at 6:23 AM, Bart Van Assche wrote: > > On Tue, 2018-11-13 at 01:02 +, Madhani, Himanshu wrote: > > > I see other drivers also use similar information populated for NVMe > > > Connectio

Re: [PATCH] qla2xxx: Add SysFS hook for FC-NVMe autoconnect

2018-11-13 Thread Bart Van Assche
On Tue, 2018-11-13 at 01:02 +, Madhani, Himanshu wrote: > I see other drivers also use similar information populated for NVMe > Connection at boot time. Hi Himanshu, Which other drivers are you referring to? Thanks, Bart.

Re: [PATCH] qla2xxx: Add SysFS hook for FC-NVMe autoconnect

2018-11-12 Thread Bart Van Assche
On Mon, 2018-11-12 at 13:40 -0800, Himanshu Madhani wrote: > diff --git a/drivers/scsi/qla2xxx/qla_attr.c > b/drivers/scsi/qla2xxx/qla_attr.c > index 678aff5ca947..323a4aa35f16 100644 > --- a/drivers/scsi/qla2xxx/qla_attr.c > +++ b/drivers/scsi/qla2xxx/qla_attr.c > @@ -1665,6 +1665,125 @@

Re: [PATCH 0/3] sd: Rely on the driver core for asynchronous probing

2018-10-28 Thread Bart Van Assche
On 10/28/18 7:04 AM, Laurence Oberman wrote: I ran multiple tests for two days using the series from Bart's tree on the SRP test bed here. Multiple disconnects/reconnects during heavy IO activity on 32 SRP 64 LUNS/ 32 mpaths with no issues seen with probes and reconnects. For the series.

Re: [PATCH 0/3] sd: Rely on the driver core for asynchronous probing

2018-10-26 Thread Bart Van Assche
On Fri, 2018-10-26 at 15:58 +0200, Hannes Reinecke wrote: > On 10/2/18 11:52 PM, Bart Van Assche wrote: > > Hello Martin, > > > > During the 2018 edition of LSF/MM there was a session about increasing SCSI > > disk probing concurrency. This patch series implements

Re: [PATCH 5/8] sg: add free list, rework locking

2018-10-19 Thread Bart Van Assche
On Fri, 2018-10-19 at 15:55 -0400, Douglas Gilbert wrote: > On 2018-10-19 11:22 a.m., Bart Van Assche wrote: > > On Fri, 2018-10-19 at 02:24 -0400, Douglas Gilbert wrote: > > > static void > > > -sg_fill_request_table(struct sg_fd *sfp, struct sg_req_info *rinfo) &

Re: [PATCH 1/5] ips: use lower_32_bits and upper_32_bits instead of reinventing them

2018-10-19 Thread Bart Van Assche
#define __iomem > #endif > > - #define pci_dma_hi32(a) ((a >> 16) >> 16) > - #define pci_dma_lo32(a) (a & 0xffff) > - > #if (BITS_PER_LONG > 32) || defined(CONFIG_HIGHMEM64G) >#define IPS_ENABLE_DMA64(1) > #else Reviewed-by: Bart Van Assche

Re: [PATCH 5/8] sg: add free list, rework locking

2018-10-19 Thread Bart Van Assche
On Fri, 2018-10-19 at 10:38 -0400, Tony Battersby wrote: > Incidentally, I have been using my own home-grown target-mode SCSI > system for the past 16 years, but now I am starting to look into > switching to SCST. I was just reading about their "SGV cache": > >

Re: [PATCH 5/8] sg: add free list, rework locking

2018-10-19 Thread Bart Van Assche
On Fri, 2018-10-19 at 02:24 -0400, Douglas Gilbert wrote: > static void > -sg_fill_request_table(struct sg_fd *sfp, struct sg_req_info *rinfo) > +sg_fill_request_table(struct sg_fd *sfp, struct sg_req_info *rinfo, > + int max_num) > { > struct sg_request *srp; >

Re: [PATCH 4/8] sg: expand request states

2018-10-19 Thread Bart Van Assche
On Fri, 2018-10-19 at 02:24 -0400, Douglas Gilbert wrote: > +/* Following defines are states of sg_request::rq_state */ > +#define SG_RQ_INACTIVE 0/* request not in use (e.g. on fl) */ > +#define SG_RQ_INFLIGHT 1/* SCSI request issued, no response yet */ > +#define

Re: [PATCH 3/5] qla1280: use lower_32_bits and upper_32_bits instead of reinventing them

2018-10-18 Thread Bart Van Assche
On 10/18/18 9:47 PM, Bart Van Assche wrote: On 10/18/18 6:03 AM, Christoph Hellwig wrote: @@ -1790,8 +1783,8 @@ qla1280_load_firmware_dma(struct scsi_qla_host *ha)   mb[4] = cnt;   mb[3] = ha->request_dma & 0x;   mb[2] = (ha->request_dma >> 16) &

Re: [PATCH 3/5] qla1280: use lower_32_bits and upper_32_bits instead of reinventing them

2018-10-18 Thread Bart Van Assche
On 10/18/18 6:03 AM, Christoph Hellwig wrote: @@ -1790,8 +1783,8 @@ qla1280_load_firmware_dma(struct scsi_qla_host *ha) mb[4] = cnt; mb[3] = ha->request_dma & 0x; mb[2] = (ha->request_dma >> 16) & 0x; - mb[7] =

Re: [PATCH 5/5] qla2xxx: use lower_32_bits and upper_32_bits instead of reinventing them

2018-10-18 Thread Bart Van Assche
On 10/18/18 6:03 AM, Christoph Hellwig wrote: This also moves the optimization for builds with 32-bit dma_addr_t to the compiler (where it belongs) instead of opencoding it based on incorrect assumptions. Signed-off-by: Christoph Hellwig --- drivers/scsi/qla2xxx/qla_target.c | 8

[PATCH 5/7] qla2xxx: Remove a set-but-not-used variable

2018-10-18 Thread Bart Van Assche
This patch does not change any functionality. Cc: Himanshu Madhani Signed-off-by: Bart Van Assche --- drivers/scsi/qla2xxx/qla_os.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index dba672f87cb2

[PATCH 6/7] qla2xxx: Make sure that qlafx00_ioctl_iosb_entry() initializes 'res'

2018-10-18 Thread Bart Van Assche
Only one of the two code paths in qlafx00_ioctl_iosb_entry() initializes the variable 'res'. Make sure that 'res' is initialized before sp->done(sp, res) is called. Cc: Himanshu Madhani Signed-off-by: Bart Van Assche --- drivers/scsi/qla2xxx/qla_mr.c | 2 +- 1 file changed, 1 insertion(+)

[PATCH 4/7] qla2xxx: Make qla2x00_sysfs_write_nvram() easier to analyze

2018-10-18 Thread Bart Van Assche
Modify the unlock statement such that it becomes easier for static analyzers to analyze it. This patch does not change any functionality. Cc: Himanshu Madhani Signed-off-by: Bart Van Assche --- drivers/scsi/qla2xxx/qla_attr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 7/7] qla2xxx: Remove two arguments from qlafx00_error_entry()

2018-10-18 Thread Bart Van Assche
Move a debug statement from qlafx00_error_entry() into its caller. Remove one unused argument from that function. This patch does not change the behavior of the qla2xxx driver. Cc: Himanshu Madhani Signed-off-by: Bart Van Assche --- drivers/scsi/qla2xxx/qla_mr.c | 13 + 1 file

[PATCH 1/7] qla2xxx: Modify fall-through annotations

2018-10-18 Thread Bart Van Assche
This patch avoids that the compiler complains about missing fall-through annotations when building with W=1. Cc: Himanshu Madhani Signed-off-by: Bart Van Assche --- drivers/scsi/qla2xxx/qla_init.c | 2 +- drivers/scsi/qla2xxx/qla_target.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions

[PATCH 3/7] qla2xxx: Declare local functions 'static'

2018-10-18 Thread Bart Van Assche
This patch avoids that the compiler complains about missing declarations when building with W=1. Cc: Himanshu Madhani Signed-off-by: Bart Van Assche --- drivers/scsi/qla2xxx/qla_init.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_init.c b

[PATCH 2/7] qla2xxx: Improve several kernel-doc headers

2018-10-18 Thread Bart Van Assche
This patch avoids that complaints about kernel-doc headers are reported when building with W=1. Cc: Himanshu Madhani Signed-off-by: Bart Van Assche --- drivers/scsi/qla2xxx/qla_iocb.c | 4 ++-- drivers/scsi/qla2xxx/qla_isr.c| 6 +++--- drivers/scsi/qla2xxx/qla_mbx.c| 6

[PATCH 0/7] qla2xxx patches for kernel v4.20

2018-10-18 Thread Bart Van Assche
Hi Martin, This is a series with mostly trivial patches for the qla2xxx driver. These patches address warnings reported by gcc and by the smatch and sparse static analyzers. Please consider these patches for kernel v4.20. Thanks, Bart. Bart Van Assche (7): qla2xxx: Modify fall-through

Re: [PATCH v2 1/7] drivers/base: Fix a race condition in the device probing code

2018-10-18 Thread Bart Van Assche
On Thu, 2018-10-18 at 07:10 +0200, Greg Kroah-Hartman wrote: > > diff --git a/drivers/base/dd.c b/drivers/base/dd.c > > index edfc9f0b1180..b4212154a94b 100644 > > --- a/drivers/base/dd.c > > +++ b/drivers/base/dd.c > > @@ -645,6 +645,14 @@ int driver_probe_device(struct device_driver *drv, > >

Re: [PATCH v2 3/7] drivers/base: Probe devices concurrently if requested by the driver

2018-10-18 Thread Bart Van Assche
On Thu, 2018-10-18 at 08:25 -0700, Alexander Duyck wrote: > On 10/17/2018 5:54 PM, Dan Williams wrote: > > On Wed, Oct 17, 2018 at 4:41 PM Bart Van Assche wrote: > > > > > > Instead of probing devices sequentially in the PROBE_PREFER_ASYNCHRONOUS > > > mode, s

Re: [PATCH v2 2/7] drivers/base: Verify struct device locking requirements at runtime

2018-10-18 Thread Bart Van Assche
On Thu, 2018-10-18 at 07:11 +0200, Greg Kroah-Hartman wrote: > On Wed, Oct 17, 2018 at 04:40:01PM -0700, Bart Van Assche wrote: > > Make sure that a complaint appears in the kernel log if the driver core > > locking assumptions are violated. > > > > Cc: Lee Duncan >

[PATCH v2 6/7] sd: Rely on the driver core for asynchronous probing

2018-10-17 Thread Bart Van Assche
nc sd resume"). Cc: Lee Duncan Cc: Hannes Reinecke Cc: Luis Chamberlain Cc: Johannes Thumshirn Cc: Christoph Hellwig Cc: Greg Kroah-Hartman Cc: Dan Williams Signed-off-by: Bart Van Assche --- drivers/scsi/scsi.c | 14 -- drivers/scsi/scsi_pm.c | 22 ++---

[PATCH v2 3/7] drivers/base: Probe devices concurrently if requested by the driver

2018-10-17 Thread Bart Van Assche
: Hannes Reinecke Cc: Luis Chamberlain Cc: Johannes Thumshirn Cc: Christoph Hellwig Cc: Greg Kroah-Hartman Cc: Dan Williams Signed-off-by: Bart Van Assche --- drivers/base/bus.c | 3 +-- drivers/base/dd.c | 49 ++ 2 files changed, 50 insertions

[PATCH v2 7/7] sd: Inline sd_probe_part2()

2018-10-17 Thread Bart Van Assche
This patch does not change any functionality. Cc: Lee Duncan Cc: Hannes Reinecke Cc: Luis Chamberlain Cc: Johannes Thumshirn Cc: Christoph Hellwig Cc: Greg Kroah-Hartman Signed-off-by: Bart Van Assche --- drivers/scsi/sd.c | 101 -- 1 file

[PATCH v2 2/7] drivers/base: Verify struct device locking requirements at runtime

2018-10-17 Thread Bart Van Assche
Make sure that a complaint appears in the kernel log if the driver core locking assumptions are violated. Cc: Lee Duncan Cc: Hannes Reinecke Cc: Luis Chamberlain Cc: Johannes Thumshirn Cc: Christoph Hellwig Cc: Greg Kroah-Hartman Signed-off-by: Bart Van Assche --- drivers/base/dd.c

[PATCH v2 4/7] drivers/base, __device_release_driver(): Do not wait for asynchronous probing

2018-10-17 Thread Bart Van Assche
: Johannes Thumshirn Cc: Christoph Hellwig Cc: Greg Kroah-Hartman Signed-off-by: Bart Van Assche --- drivers/base/dd.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/base/dd.c b/drivers/base/dd.c index f8d645aa09be..0a3c9f8702de 100644 --- a/drivers/base/dd.c +++ b/drivers/base/dd.c

[PATCH v2 5/7] sd: Avoid that hibernation triggers a kernel warning

2018-10-17 Thread Bart Van Assche
scsi: Change the preempt-only flag into a counter") Cc: Lee Duncan Cc: Hannes Reinecke Cc: Luis Chamberlain Cc: Johannes Thumshirn Cc: Christoph Hellwig Cc: Greg Kroah-Hartman Cc: Dan Williams Cc: sta...@vger.kernel.org Signed-off-by: Bart Van Assche --- drivers/scsi/scsi_lib

[PATCH v2 1/7] drivers/base: Fix a race condition in the device probing code

2018-10-17 Thread Bart Van Assche
Cc: Greg Kroah-Hartman Signed-off-by: Bart Van Assche --- drivers/base/dd.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/base/dd.c b/drivers/base/dd.c index edfc9f0b1180..b4212154a94b 100644 --- a/drivers/base/dd.c +++ b/drivers/base/dd.c @@ -645,6 +645,14 @@ int

[PATCH v2 0/7] Increase SCSI disk probing concurrency

2018-10-17 Thread Bart Van Assche
concurrently instead of sequentially. - Added several patches that fix bugs discovered while testing v1 of this patch series. - Included performance results in patch 6/7. Bart Van Assche (7): drivers/base: Fix a race condition in the device probing code drivers/base: Verify struct device locking

Re: [PATCH] scsi/sd: Avoid that hibernation triggers a kernel warning

2018-10-17 Thread Bart Van Assche
On Wed, 2018-10-17 at 13:27 -0700, Bart Van Assche wrote: > Although the power management code never calls the system-wide and runtime > suspend callbacks concurrently, runtime power state changes can happen > while the system is being suspended or resumed. See also the dp

[PATCH] scsi/sd: Avoid that hibernation triggers a kernel warning

2018-10-17 Thread Bart Van Assche
scsi: Change the preempt-only flag into a counter") Cc: Lee Duncan Cc: Hannes Reinecke Cc: Luis Chamberlain Cc: Johannes Thumshirn Cc: Christoph Hellwig Cc: Greg Kroah-Hartman Cc: Dan Williams Cc: sta...@vger.kernel.org Signed-off-by: Bart Van Assche --- drivers/scsi/scsi_lib

Re: [PATCHv2] ib_srp: Remove WARN_ON in srp_terminate_io()

2018-10-17 Thread Bart Van Assche
acy block layer is going away. Anyway: Acked-by: Bart Van Assche

Re: [PATCH 0/3] sd: Rely on the driver core for asynchronous probing

2018-10-16 Thread Bart Van Assche
On Tue, 2018-10-16 at 01:19 -0400, Martin K. Petersen wrote: > Bart, > > > During the 2018 edition of LSF/MM there was a session about increasing > > SCSI disk probing concurrency. This patch series implements what has > > been proposed during that session, namely: - Make sure that the driver > >

Re: [PATCH] IB/srp: remove old request_fn_active check

2018-10-16 Thread Bart Van Assche
On Tue, 2018-10-16 at 08:31 -0600, Jens Axboe wrote: > This check is only viable for non scsi-mq. Since that is going away, > kill this legacy check. > > Cc: Bart Van Assche > Cc: Parav Pandit > Cc: linux-scsi@vger.kernel.org > Signed-off-by: Jens Axboe > --- >

Re: [PATCH 0/3] sd: Rely on the driver core for asynchronous probing

2018-10-14 Thread Bart Van Assche
On 10/2/18 2:52 PM, Bart Van Assche wrote: During the 2018 edition of LSF/MM there was a session about increasing SCSI disk probing concurrency. This patch series implements what has been proposed during that session, namely: - Make sure that the driver core is aware of asynchronous SCSI LUN

Re: SCSI qla2xxx: tcm_qla2xxx server code seems to have regressed quite badly with latest testing

2018-10-12 Thread Bart Van Assche
On 10/12/18 1:36 PM, Laurence Oberman wrote: > While I have for the longest time used 4.5 as a base for my F/C jammer > that I use every day here in our lab I recently added more jammer code > so I decided to test this all on latest upstream. > > Booting the target server on my 4.5 kernel with

Re: [PATCH v2 4/5] target: split out helper for cxn timeout error stashing

2018-10-12 Thread Bart Van Assche
On Fri, 2018-10-12 at 12:01 +0200, David Disseldorp wrote: > +void iscsit_fill_cxn_timeout_err_stats(struct iscsi_session *sess) > +{ > + struct iscsi_portal_group *tpg = sess->tpg; > + struct iscsi_tiqn *tiqn = tpg->tpg_tiqn; > + > + if (!tiqn) > + return; > + > +

[PATCH 0/3] sd: Rely on the driver core for asynchronous probing

2018-10-02 Thread Bart Van Assche
serialization between sd_probe() and sd_remove() because this could lead to a deadlock. Please consider this patch series for kernel v4.20. Thanks, Bart. Bart Van Assche (3): sd: Rely on the driver core for asynchronous probing sd: Inline sd_probe_part2() __device_release_driver(): Do

[PATCH 3/3] __device_release_driver(): Do not wait for asynchronous probing

2018-10-02 Thread Bart Van Assche
(). Remove the async_synchronize_full() call from __device_release_driver() to avoid that a deadlock is triggered. See also commit 765230b5f084 ("driver-core: add asynchronous probing support for drivers"). Signed-off-by: Bart Van Assche Cc: Dmitry Torokhov Cc: Lee Duncan Cc: Hannes Re

[PATCH 1/3] sd: Rely on the driver core for asynchronous probing

2018-10-02 Thread Bart Van Assche
superfluous due to this change are removed. See also commit 3c31b52f96f7 ("scsi: async sd resume"). Signed-off-by: Bart Van Assche Cc: Lee Duncan Cc: Hannes Reinecke Cc: Luis R. Rodriguez Cc: Johannes Thumshirn Cc: Christoph Hellwig Cc: Greg Kroah-Hartman Cc: Dan Williams --

[PATCH 2/3] sd: Inline sd_probe_part2()

2018-10-02 Thread Bart Van Assche
This patch does not change any functionality. Signed-off-by: Bart Van Assche Cc: Lee Duncan Cc: Hannes Reinecke Cc: Luis R. Rodriguez Cc: Johannes Thumshirn Cc: Christoph Hellwig Cc: Greg Kroah-Hartman --- drivers/scsi/sd.c | 101 -- 1 file

Re: [PATCH v7 3/8] uapi: ufs: Make utp_upiu_req visible to user space

2018-09-30 Thread Bart Van Assche
On Sun, 2018-09-30 at 08:45 +0300, Avri Altman wrote: > +++ b/include/uapi/scsi/scsi_bsg_ufs.h > @@ -0,0 +1,74 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ > +/* > + * TBD - UFS Transport SGIO v4 BSG Message Support > + * > + * Copyright (C) 2011-2013 Samsung India Software Operations > + */ >

Re: aacraid: latest driver results in Host adapter abort request. / Outstanding commands on (0,0,0,0):

2018-09-22 Thread Bart Van Assche
On 9/18/18 11:10 PM, Stefan Priebe - Profihost AG wrote: after upgrading the aacraid driver / kernel from aacraid 50792 to aacraid 50877. The aacraid driver version was updated to 50792 in commit 0662cc968ace ("scsi: aacraid: Update driver version") and to 50877 in commit 1cdb74b80f93

Re: [PATCH] ib_srp: Remove WARN_ON in srp_terminate_io()

2018-09-21 Thread Bart Van Assche
On 9/21/18 5:15 AM, Hannes Reinecke wrote: The WARN_ON() is pointless as the rport is placed in SDEV_TRANSPORT_OFFLINE at that time, so no new commands can be submitted via srp_queuecomment() Signed-off-by: Hannes Reinecke --- drivers/infiniband/ulp/srp/ib_srp.c | 7 --- 1 file changed,

Re: [PATCH v5 3/6] scsi: ufs: Add ufs-bsg module

2018-09-18 Thread Bart Van Assche
On 9/17/18 9:08 AM, Avri Altman wrote: +*Caveat emptor*: The driver makes no further input validations and sends the +UPIU to the device as it is. Open the bsg device in /dev/ufs-bsg-%0:0 and +send SG_IO with the applicable sg_io_v4: It's not clear to me what %0:0 stands for. Otherwise this

Re: [PATCH 2/6] qla2xxx_nvmet: Added Makefile and Kconfig changes

2018-09-17 Thread Bart Van Assche
On 9/17/18 12:07 PM, Madhani, Himanshu wrote: On Sep 15, 2018, at 9:53 PM, Bart Van Assche wrote: External Email On 09/14/18 14:28, Himanshu Madhani wrote: diff --git a/drivers/scsi/qla2xxx/Kconfig b/drivers/scsi/qla2xxx/Kconfig index 036cc3f217b1..f1539d8b68ef 100644 --- a/drivers/scsi

Re: [PATCH v4 0/7] scsi: ufs bsg endpoint

2018-09-16 Thread Bart Van Assche
On 09/15/18 23:41, Avri Altman wrote: Since this patch series does not touch any include/uapi header and since no uapi UFS header files already exist, how is user space software expected to know which message format it should use for communicating over the UFS BSG endpoint? I don't think that

Re: [PATCH 5/6] qla2xxx_nvmet: Add SysFS node for FC-NVMe Target

2018-09-16 Thread Bart Van Assche
On 09/14/18 14:28, Himanshu Madhani wrote: From: Anil Gurumurthy This patch adds SysFS node for NVMe Target configuration Please elaborate the description of this patch. Are NVMe initiator and target mode mutually exclusive or can both be enabled at the same time? What is the impact of

Re: [PATCH 3/6] qla2xxx_nvmet: Add FC-NVMe Target LS request handling

2018-09-16 Thread Bart Van Assche
On 09/14/18 14:28, Himanshu Madhani wrote: From: Anil Gurumurthy This patch adds LS handling into driver Please make the patch description more clear. What does "LS" stand for? What is the relationship between LS and NVMe target support? Thanks, Bart.

Re: [PATCH 5/6] qla2xxx_nvmet: Add SysFS node for FC-NVMe Target

2018-09-15 Thread Bart Van Assche
On 09/14/18 14:28, Himanshu Madhani wrote: @@ -686,7 +686,7 @@ static void qla_nvmet_send_resp_ctio(struct qla_qpair *qpair, ctio->u.nvme_status_mode1.transfer_len = cpu_to_be32(ersp->xfrd_len); - ql_log(ql_log_info,

Re: [PATCH 2/6] qla2xxx_nvmet: Added Makefile and Kconfig changes

2018-09-15 Thread Bart Van Assche
On 09/14/18 14:28, Himanshu Madhani wrote: diff --git a/drivers/scsi/qla2xxx/Kconfig b/drivers/scsi/qla2xxx/Kconfig index 036cc3f217b1..f1539d8b68ef 100644 --- a/drivers/scsi/qla2xxx/Kconfig +++ b/drivers/scsi/qla2xxx/Kconfig @@ -3,6 +3,7 @@ config SCSI_QLA_FC depends on PCI && SCSI

Re: [PATCH 1/6] qla2xxx_nvmet: Add files for FC-NVMe Target support

2018-09-15 Thread Bart Van Assche
On 09/14/18 14:28, Himanshu Madhani wrote: diff --git a/drivers/scsi/qla2xxx/qla_nvmet.c b/drivers/scsi/qla2xxx/qla_nvmet.c new file mode 100644 [ ... ] +#ifIS_ENABLED(CONFIG_NVME_TARGET_FC) [ ... ] +#endif This style of using #if / #endif is not acceptable. Instead,

Re: [PATCH v3 1/7] scsi: ufs: Add ufs-bsg module

2018-09-04 Thread Bart Van Assche
On Mon, 2018-09-03 at 13:33 +0300, Avri Altman wrote: > [ ... ] > +++ b/include/uapi/scsi/scsi_bsg_ufs.h > @@ -0,0 +1,56 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ > +/* > + * UFS Transport SGIO v4 BSG Message Support > + * > + * Copyright (C) 2018 Western Digital Corporation > + */ > +#ifndef

Re: [PATCH v2 1/8] scsi: Add ufs transport class

2018-08-20 Thread Bart Van Assche
On Tue, 2018-08-14 at 11:42 +, Stanislav Nijnikov wrote: > From: Bart Van Assche > > Are you perhaps referring to the transport_class_register() calls in SCSI > > transport drivers? From what I see in existing SCSI transport drivers the > > transport_class_regist

Re: BUG in slab_free after iSCSI login timeout

2018-08-11 Thread Bart Van Assche
On Sat, 2018-08-11 at 09:36 +, Vincent Pelletier wrote: > What can I try to help debug this further ? Can you try to reproduce this with KASAN enabled in the kernel config? Thanks, Bart.

Re: [PATCH v2 1/8] scsi: Add ufs transport class

2018-08-09 Thread Bart Van Assche
On Thu, 2018-08-09 at 23:32 +, Avri Altman wrote: > And as I said before, we think that maintaining the flexibility to have > more-than-one > bsg device nodes, will be useful serving as a testing and validation > environment. That is a very vague statement. Please clarify. > >> "... > >>

Re: [PATCH v2 1/8] scsi: Add ufs transport class

2018-08-09 Thread Bart Van Assche
On Thu, 2018-08-09 at 16:22 +, Avri Altman wrote: > > -Original Message- > > From: Bart Van Assche > > Sent: Wednesday, August 08, 2018 7:58 PM > > To: h...@lst.de; Avri Altman ; linux-scsi@vger.kernel.org; > > jthumsh...@suse.de; h...@suse.com; mar

Re: [PATCH v2 1/8] scsi: Add ufs transport class

2018-08-08 Thread Bart Van Assche
On Sun, 2018-08-05 at 14:39 +0300, Avri Altman wrote: > A “ufs-port” is purely a software object. Evidently, the function > template takes no port as an argument, as the driver has no concept > of "port". We only need it as a hanging point in the bsg device tree, > so maybe a more appropriate

Re: [PATCH v2 7/8] scsi: ufs-bsg: Add support for raw upiu in ufs_bsg_request()

2018-08-08 Thread Bart Van Assche
On Sun, 2018-08-05 at 14:39 +0300, Avri Altman wrote: > + if (ret || !(*desc_len)) > + return -EINVAL; No parentheses around *desc_len please. Thanks, Bart.

Re: [PATCH v2 6/8] scsi: ufs: Add API to execute raw upiu commands

2018-08-08 Thread Bart Van Assche
On Sun, 2018-08-05 at 14:39 +0300, Avri Altman wrote: > + lrbp->command_type = (hba->ufs_version == UFSHCI_VERSION_10 || > + hba->ufs_version == UFSHCI_VERSION_11) ? > + UTP_CMD_TYPE_DEV_MANAGE : > +

Re: [PATCH v2 2/8] scsi: ufs: Add ufs-bsg module

2018-08-08 Thread Bart Van Assche
On Sun, 2018-08-05 at 14:39 +0300, Avri Altman wrote: > A LLD companion for the ufs scsi transport. This description is misleading. How about changing this into "Add a bsg endpoint that supports UPIUs"? diff --git a/drivers/scsi/ufs/ufs_bsg.c b/drivers/scsi/ufs/ufs_bsg.c > new file mode 100644 >

Re: [PATCH] qla2xxx: Fix issue reported by static checker for qla2x00_els_dcmd2_sp_done()

2018-08-08 Thread Bart Van Assche
On Tue, 2018-08-07 at 20:39 -0700, Himanshu Madhani wrote: > From: Quinn Tran To me this seems to be a real bug fix rather than a patch that only suppresses a static checker complaint. If that is the case, please mention this in the patch subject. Thanks, Bart.

Re: [PATCH] mpt3sas: correct reset of smid while clearing scsi tracker

2018-08-08 Thread Bart Van Assche
; > st->cb_idx = 0xFF; > st->direct_io = 0; > - st->smid = 0; > atomic_set(>chain_lookup[st->smid - 1].chain_offset, 0); > + st->smid = 0; > } > > /** Reviewed-by: Bart Van Assche

Re: [PATCH v3] mpt3sas: correct reset of smid while clearing scsi tracker

2018-08-07 Thread Bart Van Assche
On Tue, 2018-08-07 at 21:46 +0530, Sreekanth Reddy wrote: > [Sreekanth] In the patch description I mentioned that I have done a > manual mistake and I am correcting with this patch. > > Hope I have answered all of your quires. Not yet unfortunately. Why do you consider the current implementation

Re: [PATCH v3] mpt3sas: correct reset of smid while clearing scsi tracker

2018-08-07 Thread Bart Van Assche
On Tue, 2018-08-07 at 20:03 +0530, Sreekanth Reddy wrote: > The main intention of this patch to reset the smid to zero after > resetting the corresponding smid entry's chain_offset to zero. While > posting "mpt3sas: Fix calltrace observed while running IO & reset" > patch I have done manual

Re: [PATCH v3] mpt3sas: correct reset of smid while clearing scsi tracker

2018-08-07 Thread Bart Van Assche
On Tue, 2018-08-07 at 12:10 +0530, Sreekanth Reddy wrote: > This function _base_get_chain_buffer_tracker() is called only during > the IO submission time and mpt3sas_base_clear_st() is called during IO > completion time and hence I don't see any race condition here. > > Currently this patch is

Re: [PATCH v2] target: fix tcm_loop build errors when SCSI=m

2018-08-06 Thread Bart Van Assche
On Mon, 2018-08-06 at 16:29 -0700, Randy Dunlap wrote: > On 08/06/2018 04:26 PM, Bart Van Assche wrote: > > On Mon, 2018-08-06 at 16:20 -0700, Randy Dunlap wrote: > > > Fixes: 3703b2c5d041 ("[SCSI] tcm_loop: Add multi-fabric Linux/SCSI LLD > > >fabric modul

Re: [PATCH v2] target: fix tcm_loop build errors when SCSI=m

2018-08-06 Thread Bart Van Assche
On Mon, 2018-08-06 at 16:20 -0700, Randy Dunlap wrote: > Fixes: 3703b2c5d041 ("[SCSI] tcm_loop: Add multi-fabric Linux/SCSI LLD >fabric module") >From drivers/target/Kconfig on Linus' master branch: menuconfig TARGET_CORE tristate "Generic Target Core Mod (TCM) and ConfigFS

Re: [PATCH v3] mpt3sas: correct reset of smid while clearing scsi tracker

2018-08-06 Thread Bart Van Assche
On Sat, 2018-08-04 at 18:56 +0530, Sreekanth Reddy wrote: > No Bart, their is no race condition here. Since chain lookup table > entry is uniquely accessed using smid value. And this smid (which is > scmd->request->tag +1) is unique for each IO request. And > _base_get_chain_buffer_tracker()

Re: [PATCH v3] mpt3sas: correct reset of smid while clearing scsi tracker

2018-08-03 Thread Bart Van Assche
e that smid is set to zero > + * only after resetting corresponding smid pool's chain_offset to zero > + * in chain lookup table. > + */ > + smp_mb(); > + st->smid = 0; > } Thanks for having addressed previous review comments. Hence: Reviewed-by: Bart Va

Re: [PATCH v2] mpt3sas: correct reset of smid while clearing scsi tracker

2018-08-03 Thread Bart Van Assche
On Fri, 2018-08-03 at 18:55 +0300, Andy Shevchenko wrote: > On Fri, Aug 3, 2018 at 5:06 PM, Bart Van Assche > wrote: > > On Fri, 2018-08-03 at 06:31 -0400, Sreekanth Reddy wrote: > > > + /* Added memory barrier to make sure that correct chain tracker > > >

Re: [PATCH v2] mpt3sas: correct reset of smid while clearing scsi tracker

2018-08-03 Thread Bart Van Assche
On Fri, 2018-08-03 at 06:31 -0400, Sreekanth Reddy wrote: > In mpt3sas_base_clear_st() function smid value is reseted in ^^^ That's not an English word. Please read

Re: [PATCH v1] mpt3sas: correct reset of smid while clearing scsi tracker

2018-08-02 Thread Bart Van Assche
On Tue, 2018-07-31 at 01:35 -0400, Sreekanth Reddy wrote: > In mpt3sas_base_clear_st() function smid value is reseted in wrong line, > i.e. driver should reset smid value to zero after decrementing chain_offset > counter in chain_lookup table but in current code, driver is resetting smid > value

Re: [PATCH v1] mpt3sas: correct reset of smid while clearing scsi tracker

2018-08-02 Thread Bart Van Assche
On Thu, 2018-08-02 at 16:11 -0400, Martin K. Petersen wrote: > > In mpt3sas_base_clear_st() function smid value is reseted in wrong > > line, i.e. driver should reset smid value to zero after decrementing > > chain_offset counter in chain_lookup table but in current code, driver > > is resetting

[PATCH 2/2] Avoid that SCSI device removal through sysfs triggers a deadlock

2018-08-02 Thread Bart Van Assche
sg54525.html. Fixes: ac0ece9174ac ("scsi: use device_remove_file_self() instead of device_schedule_callback()") Signed-off-by: Bart Van Assche Cc: Greg Kroah-Hartman Acked-by: Tejun Heo Cc: Johannes Thumshirn Cc: --- drivers/scsi/scsi_sysfs.c | 20 ++-- 1 file changed, 18

  1   2   3   4   5   6   7   8   9   10   >