Re: [patch] tcm_loop: use after free on error

2016-03-04 Thread Nicholas A. Bellinger
On Wed, 2016-03-02 at 13:09 +0300, Dan Carpenter wrote: > We dereference "tl_nexus" to get the error code. > > Fixes: 1b418a8fcbc0 ('target: Convert demo-mode only drivers to > target_alloc_session') > Signed-off-by: Dan Carpenter > > diff --git a/drivers/target/loopback/tcm_loop.c > b/drivers

[PATCH-v2 1/2] target: Avoid DataIN transfers for non-GOOD SAM status

2016-03-04 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch modifies existing transport_complete_*() code to avoid invoking target_core_fabric_ops->queue_data_in() driver callbacks for I/O READs with non-GOOD SAM status. Some initiators expect GOOD status when a DATA-IN payload transfer is involved, so to be safe go ah

[PATCH-v2 2/2] target/iblock: Use -EAGAIN/-ENOMEM to propigate SAM BUSY/TASK_SET_FULL

2016-03-04 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch updates target/iblock backend driver code to check for bio completion status of -EAGAIN / -ENOMEM provided by raw block drivers and scsi devices, in order to generate the following SCSI status to initiators: - SAM_STAT_BUSY - SAM_STAT_TASK_SET_FULL Note t

Re: [PATCH] cxgbit: fix dma_addr_t printk format

2016-03-04 Thread Joe Perches
On Sat, 2016-03-05 at 01:34 +0100, Arnd Bergmann wrote: > On Friday 04 March 2016 16:25:07 Joe Perches wrote: > > > diff --git a/drivers/target/iscsi/cxgbit/cxgbit_ddp.c > > > b/drivers/target/iscsi/cxgbit/cxgbit_ddp.c [] > > > @@ -179,7 +179,7 @@ cxgbit_dump_sgl(const char *cap, struct scatterlis

Re: [PATCH] cxgbit: fix dma_addr_t printk format

2016-03-04 Thread Arnd Bergmann
On Friday 04 March 2016 16:25:07 Joe Perches wrote: > > > > diff --git a/drivers/target/iscsi/cxgbit/cxgbit_ddp.c > > b/drivers/target/iscsi/cxgbit/cxgbit_ddp.c > > index 07e2bc86d0df..d667bc88e21d 100644 > > --- a/drivers/target/iscsi/cxgbit/cxgbit_ddp.c > > +++ b/drivers/target/iscsi/cxgbit/cxg

Re: [PATCH] cxgbit: fix dma_addr_t printk format

2016-03-04 Thread Joe Perches
On Sat, 2016-03-05 at 01:04 +0100, Arnd Bergmann wrote: > The newly added driver prints a dma_addr_t using the %llx format string, > but that is wrong on most 32-bit architectures: > > drivers/target/iscsi/cxgbit/cxgbit_ddp.c: In function 'cxgbit_dump_sgl': > drivers/target/iscsi/cxgbit/cxgbit_ddp

[PATCH] cxgbit: fix dma_addr_t printk format

2016-03-04 Thread Arnd Bergmann
The newly added driver prints a dma_addr_t using the %llx format string, but that is wrong on most 32-bit architectures: drivers/target/iscsi/cxgbit/cxgbit_ddp.c: In function 'cxgbit_dump_sgl': drivers/target/iscsi/cxgbit/cxgbit_ddp.c:180:10: error: format '%llx' expects argument of type 'long lo

[GIT PULL] SCSI fixes for 4.5-rc6

2016-03-04 Thread James Bottomley
Two fairly simple fixes. One is a regression with ipr firmware loading caused by one of the trivial patches in the last merge window which failed to strip the \n from the file name string, so now the firmware loader no longer works leading to a lot of unhappy ipr users; fix by stripping the \n. T

[PATCH 5/7] cxlflash: Reorder user context initialization

2016-03-04 Thread Uma Krishnan
In order to support cxlflash in the PowerVM environment, underlying hypervisor APIs have imposed a kernel API ordering change. For the superpipe access to LUN, user applications need a context. The cxlflash module creates this context by making a sequence of cxl calls. In the current code, a conte

[PATCH 3/7] cxlflash: Split out context initialization

2016-03-04 Thread Uma Krishnan
From: "Matthew R. Ochs" Presently, context information structures are allocated and initialized in the same routine, create_context(). This imposes an ordering restriction such that all pieces of information needed to initialize a context must be known before the context is even allocated. This

[PATCH 6/7] cxlflash: Fix to avoid unnecessary scan with internal LUNs

2016-03-04 Thread Uma Krishnan
From: "Manoj N. Kumar" When switching to the internal LUN defined on the IBM CXL flash adapter, there is an unnecessary scan occurring on the second port. This scan leads to the following extra lines in the log: Dec 17 10:09:00 tul83p1 kernel: [ 3708.561134] cxlflash 0008:00:00.0: cxlflash_queu

[PATCH 1/7] cxlflash: Simplify PCI registration

2016-03-04 Thread Uma Krishnan
From: "Manoj N. Kumar" The calls to pci_request_regions(), pci_resource_start(), pci_set_dma_mask(), pci_set_master() and pci_save_state() are all unnecessary for the IBM CXL flash adapter since data buffers are not required to be mapped to the device's memory. The use of services such as pci_se

[PATCH 7/7] cxlflash: Increase cmd_per_lun for better throughput

2016-03-04 Thread Uma Krishnan
From: "Manoj N. Kumar" With the current value of cmd_per_lun at 16, the throughput over a single adapter is limited to around 150kIOPS. Increase the value of cmd_per_lun to 256 to improve throughput. With this change a single adapter is able to attain close to the maximum throughput (380kIOPS).

[PATCH 2/7] cxlflash: Unmap problem state area before detaching master context

2016-03-04 Thread Uma Krishnan
When operating in the PowerVM environment, the cxlflash module can receive an error from the hypervisor indicating that there are existing mappings in the page table for the process MMIO space. This issue exists because term_afu() currently invokes term_mc() before stop_afu(), allowing for the mas

[PATCH 4/7] cxlflash: Simplify attach path error cleanup

2016-03-04 Thread Uma Krishnan
From: "Matthew R. Ochs" The cxlflash_disk_attach() routine currently uses a cascading error gate strategy for its error cleanup path. While this strategy is commonly used to handle cleanup scenarios, it is too restrictive when function callouts need to be restructured. Problems range from inserti

[PATCH 0/7] Miscellaneous patches to support cxlflash in PowerVM

2016-03-04 Thread Uma Krishnan
The first 5 patches of this series contain fixes to support the cxlflash driver in a PowerVM guest. For the cxlflash driver to be functional in a PowerVM guest, a corresponding set of cxl patches (currently being upstreamed) is required. Note that this cxlflash patch series does not have any build

Re: [PATCH net-next v3 3/4] drm/vmwgfx: remove userland definition of DIV_ROUND_UP

2016-03-04 Thread Emil Velikov
Hi Nicolas, On 4 March 2016 at 10:52, Nicolas Dichtel wrote: > Let's use __KERNEL_DIV_ROUND_UP, which is defined in uapi/linux/kernel.h. > > Signed-off-by: Nicolas Dichtel > --- > .../drm/vmwgfx/device_include/svga3d_surfacedefs.h | 20 > +++- > 1 file changed, 11 insertions(

Re: [PATCH v10 1/6] fixed typo in ufshcd-pltfrm

2016-03-04 Thread Arnd Bergmann
On Friday 04 March 2016 17:22:14 Joao Pinto wrote: > Fixed typo in ufshcd-pltfrm. > > Signed-off-by: Joao Pinto Acked-by: Arnd Bergmann -- 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://v

Re: [PATCH v10 6/6] add TC G210 pci driver

2016-03-04 Thread Arnd Bergmann
On Friday 04 March 2016 17:22:19 Joao Pinto wrote: > This patch adds a glue pci driver for the Synopsys G210 Test Chip. > > Signed-off-by: Joao Pinto Mostly ok, just a few suggestions: > + > +/* Test Chip type expected values */ > +#define TC_G210_20BIT 20 > +#define TC_G210_40BIT 40 > +#define

Re: [PATCH v10 5/6] add TC G210 platform driver

2016-03-04 Thread Arnd Bergmann
On Friday 04 March 2016 17:22:18 Joao Pinto wrote: > This patch adds a glue platform driver for the Synopsys G210 Test Chip. > > Signed-off-by: Joao Pinto Looks basically ok, but I think it can be simplified a little: > +/** > + * struct ufs_hba_dwc_vops - UFS DWC specific variant operations >

Re: [PATCH net-next v3 0/4] uapi: consolidate DIV_ROUND_UP definition

2016-03-04 Thread David Miller
From: Nicolas Dichtel Date: Fri, 4 Mar 2016 11:52:15 +0100 > The inital goal was to consolidate ethtool.h uapi header. But I took the > opportunity to remove all duplicate definitions of DIV_ROUND_UP. > > v3: add patch #2 and #3 > > v2: split the patch > define DIV_ROUND_UP in uapi Series

Re: [PATCH v10 4/6] added support for Synopsys G210 Test Chip

2016-03-04 Thread Arnd Bergmann
On Friday 04 March 2016 17:22:17 Joao Pinto wrote: > This patch adds support for Synopsys G210 Test Chip. > > Signed-off-by: Joao Pinto > Acked-by: Arnd Bergmann -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More

Re: [PATCH v10 3/6] added support for DesignWare Controller

2016-03-04 Thread Arnd Bergmann
On Friday 04 March 2016 17:22:16 Joao Pinto wrote: > This patch has the goal to add support for DesignWare UFS Controller > specific operations. > > Signed-off-by: Joao Pinto > Acked-by: Arnd Bergmann -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a mes

Re: [PATCH v10 2/6] added UFS 2.0 capabilities

2016-03-04 Thread Arnd Bergmann
On Friday 04 March 2016 17:22:15 Joao Pinto wrote: > Adding UFS 2.0 support to the UFS core driver. > > Signed-off-by: Joao Pinto > Acked-by: Arnd Bergmann -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majord

Re: [PATCHv2 6/6] scsi_sysfs: call 'device_add' after attaching device handler

2016-03-04 Thread Bart Van Assche
On 03/02/2016 10:54 PM, Hannes Reinecke wrote: 'device_add' will be evaluating the 'is_visible' callback when creating the sysfs attributes. As by this time the device handler has not been attached the 'access_state' attribute will never be visible. This patch moves the code around so that the d

Re: [PATCH v6 19/20] cxlflash: Use new cxl_pci_read_adapter_vpd() API

2016-03-04 Thread Manoj Kumar
Fred: Thanks for submitting this. Including linux-scsi. Acked-by: Manoj N. Kumar - Manoj On 3/4/2016 5:26 AM, Frederic Barrat wrote: To read the adapter VPD, drivers can't rely on pci config APIs, as it wouldn't work on powerVM. cxl introduced a new kernel API especially for this, so start

[PATCH v10 1/6] fixed typo in ufshcd-pltfrm

2016-03-04 Thread Joao Pinto
Fixed typo in ufshcd-pltfrm. Signed-off-by: Joao Pinto --- Changes v0->v10: - Nothing changed (just to keep up with patch set version). drivers/scsi/ufs/ufshcd-pltfrm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/ufs/ufshcd-pltfrm.c b/drivers/scsi/ufs/ufshcd

[PATCH v10 3/6] added support for DesignWare Controller

2016-03-04 Thread Joao Pinto
This patch has the goal to add support for DesignWare UFS Controller specific operations. Signed-off-by: Joao Pinto --- Changes v9->v10 (Arnd Bergmann): - Patch now only has DWC controller specific code - Added custom_phy_initialization callback for PHY specific code Changes v8->v9 (Robert Herrin

[PATCH v10 2/6] added UFS 2.0 capabilities

2016-03-04 Thread Joao Pinto
Adding UFS 2.0 support to the UFS core driver. Signed-off-by: Joao Pinto --- Changes v8->v10: - Nothing changed (just to keep up with patch set version). Changes v7->v8: - Added "jedec, ufs-2.0" to the ufschd-platform compatibility strings Changes v0->v7: - Nothing changed (just to keep up with p

[PATCH v10 6/6] add TC G210 pci driver

2016-03-04 Thread Joao Pinto
This patch adds a glue pci driver for the Synopsys G210 Test Chip. Signed-off-by: Joao Pinto --- Changes v0->v10: - This patch only appeared in v10 drivers/scsi/ufs/Kconfig | 9 ++ drivers/scsi/ufs/Makefile | 1 + drivers/scsi/ufs/tc-dwc-g210-pci.c | 178 +

[PATCH v10 5/6] add TC G210 platform driver

2016-03-04 Thread Joao Pinto
This patch adds a glue platform driver for the Synopsys G210 Test Chip. Signed-off-by: Joao Pinto --- Changes v0->v10: - This patch only appeared in v10 .../devicetree/bindings/ufs/tc-dwc-g210-pltfrm.txt | 26 + drivers/scsi/ufs/Kconfig | 9 ++ drivers/scsi/ufs/

[PATCH v10 4/6] added support for Synopsys G210 Test Chip

2016-03-04 Thread Joao Pinto
This patch adds support for Synopsys G210 Test Chip. Signed-off-by: Joao Pinto --- Changes v0->v10: - This patch only appeared in v10 drivers/scsi/ufs/Kconfig | 4 + drivers/scsi/ufs/Makefile | 1 + drivers/scsi/ufs/tc-dwc-g210.c | 315 + d

[PATCH v10 0/6] add support for DWC UFS Controller

2016-03-04 Thread Joao Pinto
The work consisted of: - Fixed typo in ufshcd-pltfrm.c - Tweak ufshcd.c for UFS 2.0 support - Implement ufshcd-dwc which contains all DWC HW specific code - Unipro attributes were added and new registers were added to the driver - Implement a tc-dwc-g210 containing G210 MPHY specific code - Impleme

Re: [PATCH v6 19/20] cxlflash: Use new cxl_pci_read_adapter_vpd() API

2016-03-04 Thread Matthew R. Ochs
This patch should have also been sent to the SCSI list (included now). Changes look fine. Acked-by: Matthew R. Ochs > On Mar 4, 2016, at 5:26 AM, Frederic Barrat > wrote: > > To read the adapter VPD, drivers can't rely on pci config APIs, as it > wouldn't work on powerVM. cxl introduced a ne

Re: scsi-debug regression with 4.5-rc?

2016-03-04 Thread Mike Snitzer
On Wed, Jan 20 2016 at 10:57am -0500, Martin K. Petersen wrote: > > "Ewan" == Ewan Milne writes: > > Ewan> So I have a report from our test people that the optimal_io_size > Ewan> sysfs value is now different by a factor of 512 from what it used > Ewan> to be... > > Yes, just prepared a pa

Re: Page allocation failure (order 7) in UAS code

2016-03-04 Thread Yves-Alexis Perez
On ven., 2016-03-04 at 08:18 +0100, Hans de Goede wrote: > Thanks for testing, there shouldn't be any side-effects, I'll turn this into > a proper patch, add a: > > Reported-and-tested-by: Yves-Alexis Perez > > line to the comit msg and submit this upstream. > > Thanks, I guess it can also be

Re: [PATCH net-next v3 4/4] ethtool.h: define INT_MAX for userland

2016-03-04 Thread Nikolay Aleksandrov
On 03/04/2016 11:52 AM, Nicolas Dichtel wrote: > INT_MAX needs limits.h in userland. > When ethtool.h is included by a userland app, we got the following error: > > .../usr/include/linux/ethtool.h: In function 'ethtool_validate_speed': > .../usr/include/linux/ethtool.h:1471:18: error: 'INT_MAX' un

Re: [PATCH] be2iscsi: set the boot_kset pointer to NULL in case of failure

2016-03-04 Thread Johannes Thumshirn
On Fri, Mar 04, 2016 at 10:41:49AM +0100, Maurizio Lombardi wrote: > In beiscsi_setup_boot_info(), the boot_kset pointer should be set > to NULL in case of failure otherwise an invalid pointer dereference > may occur later. > > Signed-off-by: Maurizio Lombardi Reviewed-by: Johannes Thumshirn B

[PATCH net-next v3 2/4] cxgb4i: don't redefine DIV_ROUND_UP

2016-03-04 Thread Nicolas Dichtel
let's use the common definition to avoid the following warning during the compilation: drivers/scsi/cxgbi/cxgb4i/cxgb4i.c:161:0: warning: "DIV_ROUND_UP" redefined #define DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)) ^ In file included from include/linux/list.h:8:0, from include/li

[PATCH net-next v3 3/4] drm/vmwgfx: remove userland definition of DIV_ROUND_UP

2016-03-04 Thread Nicolas Dichtel
Let's use __KERNEL_DIV_ROUND_UP, which is defined in uapi/linux/kernel.h. Signed-off-by: Nicolas Dichtel --- .../drm/vmwgfx/device_include/svga3d_surfacedefs.h | 20 +++- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/vmwgfx/device_include/svga3d

[PATCH net-next v3 1/4] uapi: define DIV_ROUND_UP for userland

2016-03-04 Thread Nicolas Dichtel
DIV_ROUND_UP is defined in linux/kernel.h only for the kernel. When ethtool.h is included by a userland app, we got the following error: include/linux/ethtool.h:1218:8: error: variably modified 'queue_mask' at file scope __u32 queue_mask[DIV_ROUND_UP(MAX_NUM_QUEUE, 32)]; ^ Let's add a

[PATCH net-next v3 0/4] uapi: consolidate DIV_ROUND_UP definition

2016-03-04 Thread Nicolas Dichtel
The inital goal was to consolidate ethtool.h uapi header. But I took the opportunity to remove all duplicate definitions of DIV_ROUND_UP. v3: add patch #2 and #3 v2: split the patch define DIV_ROUND_UP in uapi .../drm/vmwgfx/device_include/svga3d_surfacedefs.h | 20 +++-

[PATCH net-next v3 4/4] ethtool.h: define INT_MAX for userland

2016-03-04 Thread Nicolas Dichtel
INT_MAX needs limits.h in userland. When ethtool.h is included by a userland app, we got the following error: .../usr/include/linux/ethtool.h: In function 'ethtool_validate_speed': .../usr/include/linux/ethtool.h:1471:18: error: 'INT_MAX' undeclared (first use in this function) return speed <=

[PATCH resend 2/2] mpt3sas: Remove unnecessary synchronize_irq() before free_irq()

2016-03-04 Thread Lars-Peter Clausen
Calling synchronize_irq() right before free_irq() is quite useless. On one hand the IRQ can easily fire again before free_irq() is entered, on the other hand free_irq() itself calls synchronize_irq() internally (in a race condition free way), before any state associated with the IRQ is freed. Patc

[PATCH resend 1/2] be2iscsi: Remove unnecessary synchronize_irq() before free_irq()

2016-03-04 Thread Lars-Peter Clausen
Calling synchronize_irq() right before free_irq() is quite useless. On one hand the IRQ can easily fire again before free_irq() is entered, on the other hand free_irq() itself calls synchronize_irq() internally (in a race condition free way), before any state associated with the IRQ is freed. Patc

[PATCH] be2iscsi: set the boot_kset pointer to NULL in case of failure

2016-03-04 Thread Maurizio Lombardi
In beiscsi_setup_boot_info(), the boot_kset pointer should be set to NULL in case of failure otherwise an invalid pointer dereference may occur later. Signed-off-by: Maurizio Lombardi --- drivers/scsi/be2iscsi/be_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/scsi/be2iscsi/be