Re: DEFINE_IDA causing memory leaks? (was Re: [PATCH 1/2] virtio: fix memory leak of virtio ida cache layers)

2015-09-17 Thread Hannes Reinecke
On 09/17/2015 07:33 AM, Michael S. Tsirkin wrote: > On Wed, Sep 16, 2015 at 07:29:17PM -0500, Suman Anna wrote: >> The virtio core uses a static ida named virtio_index_ida for >> assigning index numbers to virtio devices during registration. >> The ida core may allocate some internal idr cache

Re: [Bugfix 3/3] eata: Enhance eata driver to support PCI device hot-removal

2015-09-17 Thread Jiang Liu
On 2015/9/16 21:42, Christoph Hellwig wrote: > On Mon, Sep 14, 2015 at 10:21:14AM +0200, Hannes Reinecke wrote: >> Welll ... if you don't have hardware (and I strongly hope you refer to >> 'hardware able to do hotplugging', not 'hardware for the eata driver' >> ...) why add the code at all? >>

Re: [PATCH] target: Fix target_sense_desc_format NULL pointer dereference

2015-09-17 Thread Sagi Grimberg
How about the following to fix up TCM_WRITE_PROTECT + D_SENSE..? diff --git a/drivers/target/target_core_device.c b/drivers/target/target_core_device.c index abf2076..ba102c5 100644 --- a/drivers/target/target_core_device.c +++ b/drivers/target/target_core_device.c @@ -62,22 +62,13 @@

Re: [PATCH 04/10] scsi: ufs: add quirk not to allow reset of interrupt aggregation

2015-09-17 Thread Alim Akhtar
Hi Amit On 08/26/2015 11:46 AM, amit daniel kachhap wrote: Few comments below, On Fri, Aug 21, 2015 at 2:57 PM, Alim Akhtar wrote: From: Seungwon Jeon Some host controller supports interrupt aggregation, but doesn't allow to reset counter and

Re: [PATCH 07/10] scsi: ufs: add add specific callback for hibern8

2015-09-17 Thread Alim Akhtar
Hi Amit, On 08/26/2015 11:51 AM, amit daniel kachhap wrote: On Fri, Aug 21, 2015 at 2:57 PM, Alim Akhtar wrote: From: Seungwon Jeon Some host controller needs specific handling before/after (un)hibernation, This change adds specific callback

Re: [PATCH 09/10] scsi: ufs: return value of pwr_change_notify

2015-09-17 Thread Alim Akhtar
Hi Amit On 08/26/2015 11:55 AM, amit daniel kachhap wrote: On Fri, Aug 21, 2015 at 2:58 PM, Alim Akhtar wrote: From: Seungwon Jeon Behavior of the "powwer mode change" contains vendor specific s/powwer/power ok operation known as

Re: [PATCH 08/10] scsi: ufs: make ufshcd_config_pwr_mode of non-static func

2015-09-17 Thread Alim Akhtar
Hi Amit, On 08/26/2015 11:53 AM, amit daniel kachhap wrote: On Fri, Aug 21, 2015 at 2:57 PM, Alim Akhtar wrote: From: Seungwon Jeon It can be used in the vendor's driver for the specific purpose. more description of this log will be useful.

[PATCH v2 05/11] scsi: ufs: add quirk to enable host controller without hce

2015-09-17 Thread Alim Akhtar
From: Seungwon Jeon Some host controller doesn't support host controller enable via HCE. Signed-off-by: Seungwon Jeon Signed-off-by: Alim Akhtar --- drivers/scsi/ufs/ufshcd.c | 76 +++--

[PATCH v2 08/11] scsi: ufs: make ufshcd_config_pwr_mode of non-static func

2015-09-17 Thread Alim Akhtar
From: Seungwon Jeon This makes ufshcd_config_pwr_mode non-static so that other vendors like exynos can use the same. Signed-off-by: Seungwon Jeon Signed-off-by: Alim Akhtar --- drivers/scsi/ufs/ufshcd.c |5 ++---

[PATCH v2 11/11] scsi: ufs: Add exynos ufs platform data

2015-09-17 Thread Alim Akhtar
This adds ufs_hba_exynos_ops{} to platform data, so that exynos ufs driver can be probed. Signed-off-by: Alim Akhtar --- drivers/scsi/ufs/ufshcd-pltfrm.c |2 ++ drivers/scsi/ufs/ufshcd.h|1 + 2 files changed, 3 insertions(+) diff --git

[PATCH v2 04/11] scsi: ufs: add quirk not to allow reset of interrupt aggregation

2015-09-17 Thread Alim Akhtar
From: Seungwon Jeon Some host controller supports interrupt aggregation, but doesn't allow to reset counter and timer by s/w. Signed-off-by: Seungwon Jeon Signed-off-by: Alim Akhtar --- drivers/scsi/ufs/ufshcd.c |3 ++-

[PATCH v2 09/11] scsi: ufs: return value of pwr_change_notify

2015-09-17 Thread Alim Akhtar
From: Seungwon Jeon Behavior of the "power mode change" contains vendor specific operation known as pwr_change_notify. This change adds return for pwr_change_notify to find success or failure. Signed-off-by: Seungwon Jeon Signed-off-by: Alim Akhtar

[PATCH v2 10/11] scsi: ufs-exynos: add UFS host support for Exynos SoCs

2015-09-17 Thread Alim Akhtar
From: Seungwon Jeon This patch introduces Exynos UFS host controller driver, which mainly handles vendor-specific operations including link startup, power mode change and hibernation/unhibernation. Signed-off-by: Seungwon Jeon Signed-off-by: Alim Akhtar

[PATCH v2 03/11] scsi: ufs: add quirk to fix mishandling utrlclr/utmrlclr

2015-09-17 Thread Alim Akhtar
From: Seungwon Jeon In the right behavior, setting the bit to '0' indicates clear and '1' indicates no change. If host contoller handles this the other way, UFSHCI_QUIRK_BROKEN_REQ_LIST_CLR can be used. Signed-off-by: Seungwon Jeon Signed-off-by: Alim Akhtar

[PATCH v2 07/11] scsi: ufs: add add specific callback for hibern8

2015-09-17 Thread Alim Akhtar
From: Seungwon Jeon Some host controller needs specific handling before/after (un)hibernation, This change adds specific callback function to support vendor's implementation. Signed-off-by: Seungwon Jeon Signed-off-by: Alim Akhtar

[PATCH v2 06/11] scsi: ufs: add specific callback for nexus type

2015-09-17 Thread Alim Akhtar
From: Seungwon Jeon Some host controller needs nexus type information for handling command. This change adds specific callback function to support vendor's implementation. Signed-off-by: Seungwon Jeon Signed-off-by: Alim Akhtar ---

[PATCH v2 02/11] scsi: ufs: add quirk to contain unconformable utrd field

2015-09-17 Thread Alim Akhtar
From: Seungwon Jeon UTRD(UTP Transfer Request Descriptor)'s field such as offset/length, especially response's has DWORD expression. This quirk can be specified for host controller not to conform standard. Signed-off-by: Seungwon Jeon Signed-off-by: Alim

[PATCH v2 01/11] phy: exynos-ufs: add UFS PHY driver for EXYNOS SoC

2015-09-17 Thread Alim Akhtar
From: Seungwon Jeon This patch introduces Exynos UFS PHY driver. This driver supports to deal with phy calibration and power control according to UFS host driver's behavior. Signed-off-by: Seungwon Jeon Signed-off-by: Alim Akhtar

[PATCH v2 00/11] exynos-ufs: add support for Exynos

2015-09-17 Thread Alim Akhtar
This patch-set introduces UFS (Universal Flash Storage) host support for Samsung Exynos SoC. Mostly, it consists of UFS PHY and host specific driver. And it also contains some quirks handling for Exynos. -Changes since v1: * Addressed review comments from Alexey[1] and various review comments

RE: [PATCH v2 09/30] cxlflash: Fix to stop interrupt processing on remove

2015-09-17 Thread David Laight
From: Linuxppc-dev Matthew R. Ochs > Sent: 16 September 2015 22:28 > Interrupt processing can run in parallel to a remove operation. This > can lead to a condition where the interrupt handler is processing with > memory that has been freed. > > To avoid processing an interrupt while memory may be

Re: [PATCH v2 09/30] cxlflash: Fix to stop interrupt processing on remove

2015-09-17 Thread Tomas Henzl
On 16.9.2015 18:53, Matthew R. Ochs wrote: > Interrupt processing can run in parallel to a remove operation. This > can lead to a condition where the interrupt handler is processing with > memory that has been freed. > > To avoid processing an interrupt while memory may be yanked, check for >

Re: [PATCH RESEND] scsi: Fix sense information setting in fixed sized format

2015-09-17 Thread Sagi Grimberg
On 9/3/2015 10:02 PM, Ewan Milne wrote: On Thu, 2015-09-03 at 19:49 +0300, Sagi Grimberg wrote: In fixed size sense format the information field is a four byte field. Signed-off-by: Sagi Grimberg Reviewed-by: Martin K. Petersen Reviewed-by:

Re: [PATCH v2 1/4] scsi: remove old-style type names from sg.h

2015-09-17 Thread Bart Van Assche
On 09/17/2015 06:42 AM, Paolo Bonzini wrote: These will not be exported by the new linux/sg.h header, and scsi/sg.h will not have any user API after linux/sg.h is created. Since they have no user in the kernel, they can be zapped. Signed-off-by: Paolo Bonzini

Re: [PATCH v2 4/4] scsi: provide UAPI version of scsi/sg.h and scsi/scsi_ioctl.h

2015-09-17 Thread Bart Van Assche
On 09/17/2015 06:47 AM, Paolo Bonzini wrote: + +#ifndef __KERNEL__ +/* Keep in sync with SG_DEFAULT_TIMEOUT of scsi/sg.h */ #define SG_DEFAULT_TIMEOUT(60*HZ) /* HZ == 'jiffies in 1 second' */ #endif Is it useful and/or necessary to export this constant ? To me this looks like an

Re: DEFINE_IDA causing memory leaks? (was Re: [PATCH 1/2] virtio: fix memory leak of virtio ida cache layers)

2015-09-17 Thread Michael S. Tsirkin
On Thu, Sep 17, 2015 at 07:15:44AM -0700, James Bottomley wrote: > On Thu, 2015-09-17 at 08:33 +0300, Michael S. Tsirkin wrote: > > On Wed, Sep 16, 2015 at 07:29:17PM -0500, Suman Anna wrote: > > > The virtio core uses a static ida named virtio_index_ida for > > > assigning index numbers to virtio

[PATCH v2 4/4] scsi: provide UAPI version of scsi/sg.h and scsi/scsi_ioctl.h

2015-09-17 Thread Paolo Bonzini
Provide a UAPI version of the header in the kernel, making it easier for interested projects to use an up-to-date version of the header. The new headers are placed under uapi/linux/ so as not to conflict with the glibc-provided headers in /usr/include/scsi. struct scsi_ioctl_command and struct

[PATCH v2 2/4] scsi: cleanup scsi/scsi_ioctl.h

2015-09-17 Thread Paolo Bonzini
SCSI_REMOVAL_* goes together with other SCSI command constants in include/scsi/scsi.h. It is also used outside the implementation of the ioctls (and it is not part of the user API). scsi_fctargaddress/Scsi_FCTargAddress has had no in-tree use since commit ca61f10ab2b8 ("[SCSI] remove broken

Re: [PATCH RESEND] scsi: Fix sense information setting in fixed sized format

2015-09-17 Thread James Bottomley
On Thu, 2015-09-17 at 15:42 +0300, Sagi Grimberg wrote: > On 9/3/2015 10:02 PM, Ewan Milne wrote: > > On Thu, 2015-09-03 at 19:49 +0300, Sagi Grimberg wrote: > >> In fixed size sense format the information field is a four byte > >> field. > >> > >> Signed-off-by: Sagi Grimberg

[PATCH v2 3/4] scsi: move all obsolete ioctls to scsi/scsi_ioctl.h

2015-09-17 Thread Paolo Bonzini
Some are in scsi/scsi.h. Keep them together in preparation for exposing them in UAPI headers. Suggested-by: Christoph Hellwig Signed-off-by: Paolo Bonzini --- include/scsi/scsi.h | 20 include/scsi/scsi_ioctl.h | 20

[PATCH v2 0/4] scsi: cleanup ioctl headers and provide UAPI versions

2015-09-17 Thread Paolo Bonzini
This is v2 of the series I sent a few days ago. A bit heavier on the cleanups: - export the structs for obsolete SCSI_IOCTL_SEND_COMMAND in uapi/linux/scsi_ioctl.h - reduce the kernel's scsi/scsi_ioctl.h even more - remove obsolete types from uapi/linux/sg.h - place all obsolete ioctls in

[PATCH v2 1/4] scsi: remove old-style type names from sg.h

2015-09-17 Thread Paolo Bonzini
These will not be exported by the new linux/sg.h header, and scsi/sg.h will not have any user API after linux/sg.h is created. Since they have no user in the kernel, they can be zapped. Signed-off-by: Paolo Bonzini --- include/scsi/sg.h | 6 -- 1 file changed, 6

Re: DEFINE_IDA causing memory leaks? (was Re: [PATCH 1/2] virtio: fix memory leak of virtio ida cache layers)

2015-09-17 Thread James Bottomley
On Thu, 2015-09-17 at 08:33 +0300, Michael S. Tsirkin wrote: > On Wed, Sep 16, 2015 at 07:29:17PM -0500, Suman Anna wrote: > > The virtio core uses a static ida named virtio_index_ida for > > assigning index numbers to virtio devices during registration. > > The ida core may allocate some internal

Re: DEFINE_IDA causing memory leaks? (was Re: [PATCH 1/2] virtio: fix memory leak of virtio ida cache layers)

2015-09-17 Thread James Bottomley
On Thu, 2015-09-17 at 13:15 -0400, Tejun Heo wrote: > Hello, > > On Thu, Sep 17, 2015 at 09:48:37AM -0700, James Bottomley wrote: > > Well, there's an easy fix for that. We could have ida_remove() actually > > free the bitmap and not cache it if it's the last layer. That way ida > > would

Re: DEFINE_IDA causing memory leaks? (was Re: [PATCH 1/2] virtio: fix memory leak of virtio ida cache layers)

2015-09-17 Thread James Bottomley
On Thu, 2015-09-17 at 19:06 +0300, Michael S. Tsirkin wrote: > On Thu, Sep 17, 2015 at 07:15:44AM -0700, James Bottomley wrote: > > On Thu, 2015-09-17 at 08:33 +0300, Michael S. Tsirkin wrote: > > > On Wed, Sep 16, 2015 at 07:29:17PM -0500, Suman Anna wrote: > > > > The virtio core uses a static

Re: DEFINE_IDA causing memory leaks? (was Re: [PATCH 1/2] virtio: fix memory leak of virtio ida cache layers)

2015-09-17 Thread Tejun Heo
Hello, On Thu, Sep 17, 2015 at 09:48:37AM -0700, James Bottomley wrote: > Well, there's an easy fix for that. We could have ida_remove() actually > free the bitmap and not cache it if it's the last layer. That way ida > would naturally empty and we wouldn't need a destructor. Tejun, would >

[PATCH] iscsi: make mutex for target scanning and unbinding per-session

2015-09-17 Thread Chris Leech
Currently the iSCSI transport class synchronises target scanning and unbinding with a host level mutex. For multi-session hosts (offloading iSCSI HBAs) connecting to storage arrays that may implement one target-per-lun, this can result in the target scan work for hundreds of sessions being

Re: [PATCH v2 09/30] cxlflash: Fix to stop interrupt processing on remove

2015-09-17 Thread Matthew R. Ochs
> On Sep 17, 2015, at 6:58 AM, David Laight wrote: > > From: Linuxppc-dev Matthew R. Ochs >> Sent: 16 September 2015 22:28 >> Interrupt processing can run in parallel to a remove operation. This >> can lead to a condition where the interrupt handler is processing with >>

Re: DEFINE_IDA causing memory leaks? (was Re: [PATCH 1/2] virtio: fix memory leak of virtio ida cache layers)

2015-09-17 Thread Tejun Heo
Hello, James. On Thu, Sep 17, 2015 at 10:58:29AM -0700, James Bottomley wrote: > The argument is that we shouldn't have to explicitly destroy a > statically initialized object, so > > DEFINE_IDA(someida); > > Should just work without having to explicitly do > > ida_destory(someida); > >

Re: [PATCH v2 09/30] cxlflash: Fix to stop interrupt processing on remove

2015-09-17 Thread Matthew R. Ochs
> On Sep 17, 2015, at 7:38 AM, Tomas Henzl wrote: > > On 16.9.2015 18:53, Matthew R. Ochs wrote: >> Interrupt processing can run in parallel to a remove operation. This >> can lead to a condition where the interrupt handler is processing with >> memory that has been freed. >>

Re: [PATCH] iscsi: make mutex for target scanning and unbinding per-session

2015-09-17 Thread Mike Christie
On 9/17/15, 1:16 PM, Chris Leech wrote: Currently the iSCSI transport class synchronises target scanning and unbinding with a host level mutex. For multi-session hosts (offloading iSCSI HBAs) connecting to storage arrays that may implement one target-per-lun, this can result in the target scan

Re: Fwd: [lkp] [dma] 6894258eda: mpt2sas0: reply_post_free pool: pci_pool_alloc failed

2015-09-17 Thread Christoph Hellwig
On Thu, Sep 17, 2015 at 11:38:01AM -0700, Linus Torvalds wrote: > This was missing the rest of the sign-off chain, and the scsi/mpt > people who might have more ideas about why that change causes problems > for mpt2sas. This was caused by my commit, and I already acked a patch from Junichi Nomura

Re: Fwd: [lkp] [dma] 6894258eda: mpt2sas0: reply_post_free pool: pci_pool_alloc failed

2015-09-17 Thread Linus Torvalds
On Thu, Sep 17, 2015 at 1:06 PM, Christoph Hellwig wrote: > > This was caused by my commit, and I already acked a patch from Junichi > Nomura to fix which should land in your inbox ASAP. Thanks, Linus -- To unsubscribe from this list: send the line

Re: DEFINE_IDA causing memory leaks? (was Re: [PATCH 1/2] virtio: fix memory leak of virtio ida cache layers)

2015-09-17 Thread Suman Anna
On 09/17/2015 01:51 AM, Hannes Reinecke wrote: > On 09/17/2015 07:33 AM, Michael S. Tsirkin wrote: >> On Wed, Sep 16, 2015 at 07:29:17PM -0500, Suman Anna wrote: >>> The virtio core uses a static ida named virtio_index_ida for >>> assigning index numbers to virtio devices during registration. >>>

[PATCH 2/3] scsi: introduce short_inquiry flag for broken host adapters

2015-09-17 Thread K. Y. Srinivasan
From: Vitaly Kuznetsov Some host adapters (e.g. Hyper-V storvsc) are known for not respecting the SPC-2/3/4 requirement for 'INQUIRY data (see table ...) shall contain at least 36 bytes'. As a result we get tons on 'scsi 0:7:1:1: scsi scan: INQUIRY result too short (5),

Re: [PATCH 05/17] Update the md driver to use idr helper functions.

2015-09-17 Thread Lee Duncan
On 09/15/2015 11:05 AM, Mike Snitzer wrote: > Subject should really be: > "dm: update to use idr helper functions" Yes, I grabbed the wrong part of the driver pathname. Would it be better to resubmit just this patch, or to resubmit the series? -- To unsubscribe from this list: send the line

[PATCH 1/3] scsi_scan: don't dump trace when scsi_prep_async_scan() is called twice

2015-09-17 Thread K. Y. Srinivasan
From: Vitaly Kuznetsov The only user of scsi_prep_async_scan() is scsi_scan_host() and it handles the situation correctly. Move 'called twice' reporting to debug level as well. The issue is observed on Hyper-V: on any device add/remove event storvsc driver calls

[PATCH 0/3] scsi: Some miscellaneous fixes

2015-09-17 Thread K. Y. Srinivasan
Some miscellaneous fixes. K. Y. Srinivasan (1): storvsc: Don't set the SRB_FLAGS_QUEUE_ACTION_ENABLE flag Vitaly Kuznetsov (2): scsi_scan: don't dump trace when scsi_prep_async_scan() is called twice scsi: introduce short_inquiry flag for broken host adapters drivers/scsi/scsi_scan.c

[PATCH RESEND 3/3] storvsc: Don't set the SRB_FLAGS_QUEUE_ACTION_ENABLE flag

2015-09-17 Thread K. Y. Srinivasan
Don't set the SRB_FLAGS_QUEUE_ACTION_ENABLE flag since we are not specifying tags. Qlogic driver does not work correctly if the SRB_FLAGS_QUEUE_ACTION_ENABLE is set and no action tag is specified. Signed-off-by: K. Y. Srinivasan Tested-by: Vivek Yadav

Re: Fwd: [lkp] [dma] 6894258eda: mpt2sas0: reply_post_free pool: pci_pool_alloc failed

2015-09-17 Thread Thomas Gleixner
On Thu, 17 Sep 2015, Linus Torvalds wrote: > On Thu, Sep 17, 2015 at 1:06 PM, Christoph Hellwig wrote: > > > > This was caused by my commit, and I already acked a patch from Junichi > > Nomura to fix which should land in your inbox ASAP. I'll send a pull request tomorrow.

Re: [PATCH v2 02/30] cxlflash: Replace magic numbers with literals

2015-09-17 Thread Brian King
Reviewed-by: Brian King -- Brian King Power Linux I/O IBM Linux Technology Center -- 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

Re: [PATCH v2 03/30] cxlflash: Fix read capacity timeout

2015-09-17 Thread Brian King
On 09/16/2015 04:26 PM, Matthew R. Ochs wrote: > @@ -296,7 +296,7 @@ static int read_cap16(struct scsi_device *sdev, struct > llun_info *lli) > int rc = 0; > int result = 0; > int retry_cnt = 0; > - u32 tout = (MC_DISCOVERY_TIMEOUT * HZ); > + u32 to = (CMD_TIMEOUT * HZ);

Re: [PATCH v2 06/30] cxlflash: Fix to avoid sizeof(bool)

2015-09-17 Thread Brian King
Reviewed-by: Brian King -- Brian King Power Linux I/O IBM Linux Technology Center -- 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

Re: [PATCH v2 05/30] cxlflash: Fix data corruption when vLUN used over multiple cards

2015-09-17 Thread Brian King
Reviewed-by: Brian King -- Brian King Power Linux I/O IBM Linux Technology Center -- 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

Re: [PATCH v2 07/30] cxlflash: Fix context encode mask width

2015-09-17 Thread Brian King
Reviewed-by: Brian King -- Brian King Power Linux I/O IBM Linux Technology Center -- 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

Re: [PATCH v2 01/30] cxlflash: Fix to avoid invalid port_sel value

2015-09-17 Thread Brian King
Reviewed-by: Brian King -- Brian King Power Linux I/O IBM Linux Technology Center -- 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

Re: [PATCH v2 04/30] cxlflash: Fix potential oops following LUN removal

2015-09-17 Thread Brian King
On 09/16/2015 04:27 PM, Matthew R. Ochs wrote: > When a LUN is removed, the sdev that is associated with the LUN > remains intact until its reference count drops to 0. In order > to prevent an sdev from being removed while a context is still > associated with it, obtain an additional reference

Re: Fwd: [lkp] [dma] 6894258eda: mpt2sas0: reply_post_free pool: pci_pool_alloc failed

2015-09-17 Thread Huang Ying
On Thu, 2015-09-17 at 11:38 -0700, Linus Torvalds wrote: > This was missing the rest of the sign-off chain, and the scsi/mpt > people who might have more ideas about why that change causes > problems > for mpt2sas. > > Ying Huang - can you make the test robot reports add at least the > sign-off

Re: [PATCH 01/10] phy: exynos-ufs: add UFS PHY driver for EXYNOS SoC

2015-09-17 Thread Kishon Vijay Abraham I
Hi, On Friday 21 August 2015 02:57 PM, Alim Akhtar wrote: > From: Seungwon Jeon > > This patch introduces Exynos UFS PHY driver. This driver > supports to deal with phy calibration and power control > according to UFS host driver's behavior. > > Signed-off-by: Seungwon