Re: Regression 4.17-rc1: SSD doesn properly resume causing system hang (NULL pointer dereference)

2018-04-24 Thread Paul Menzel
Dear Bart, Am 24.04.2018 um 23:17 schrieb Bart Van Assche: On Tue, 2018-04-24 at 23:04 +0200, Paul Menzel wrote: I applied your change, and rebuilt the Linux kernel. Unfortunately, it looks like, it didn’t make a difference. In that case I don't know what is causing the failure. Can you run

Re: [PATCH 2/5] ide: kill ide_toggle_bounce

2018-04-24 Thread Jens Axboe
On 4/24/18 12:16 PM, Christoph Hellwig wrote: > ide_toggle_bounce did select various strange block bounce limits, including > not bouncing at all as soon as an iommu is present in the system. Given > that the dma_map routines now handle any required bounce buffering except > for ISA DMA, and the

Re: [PATCH blktests] scsi/004: add regression test for false BLK_STS_OK with non good SAM status

2018-04-24 Thread Omar Sandoval
On Mon, Apr 23, 2018 at 02:25:03PM +0200, Steffen Maier wrote: > > On 04/19/2018 10:18 PM, Omar Sandoval wrote: > > On Thu, Apr 19, 2018 at 01:44:41PM -0600, Jens Axboe wrote: > >> On 4/19/18 1:41 PM, Bart Van Assche wrote: > >>> On Thu, 2018-04-19 at 12:13 -0700, Omar Sandoval wrote: > On

Re: [PATCH 3/3] scsi: ufs: Use freq table with devfreq

2018-04-24 Thread Bjorn Andersson
On Tue 24 Apr 15:08 PDT 2018, Subhash Jadavani wrote: > On 2018-04-23 17:20, Bjorn Andersson wrote: > > devfreq requires that the client operates on actual frequencies, not > > only 0 and UMAX_INT and as such UFS brok with the introduction of > > f1d981eaecf8 ("PM / devfreq: Use the available

Re: [PATCH 3/3] scsi: ufs: Use freq table with devfreq

2018-04-24 Thread Subhash Jadavani
On 2018-04-23 17:20, Bjorn Andersson wrote: devfreq requires that the client operates on actual frequencies, not only 0 and UMAX_INT and as such UFS brok with the introduction of f1d981eaecf8 ("PM / devfreq: Use the available min/max frequency"). This patch registers the frequencies of the

Re: Regression 4.17-rc1: SSD doesn properly resume causing system hang (NULL pointer dereference)

2018-04-24 Thread Bart Van Assche
On Tue, 2018-04-24 at 23:04 +0200, Paul Menzel wrote: > I applied your change, and rebuilt the Linux kernel. Unfortunately, it > looks like, it didn’t make a difference. In that case I don't know what is causing the failure. Can you run a bisect to determine which commit introduced this

Re: [PATCH 2/3] scsi: ufs: Extract devfreq registration

2018-04-24 Thread Subhash Jadavani
On 2018-04-23 17:20, Bjorn Andersson wrote: Failing to register with devfreq leaves hba->devfreq assigned, which causes the error path to dereference the ERR_PTR(). Rather than bolting on more conditionals, move the call of devm_devfreq_add_device() into it's own function and only update

Re: [PATCH 1/3] PM / devfreq: Actually support providing freq_table

2018-04-24 Thread Bjorn Andersson
On Mon 23 Apr 23:09 PDT 2018, MyungJoo Ham wrote: > >On Mon 23 Apr 19:48 PDT 2018, Chanwoo Choi wrote: > > > >> Hi, > >> > >> On 2018??? 04??? 24??? 09:20, Bjorn Andersson wrote: > >> > The code in devfreq_add_device() handles the case where a freq_table is > >> > passed by the client, but then

Re: [PATCH 1/3] PM / devfreq: Actually support providing freq_table

2018-04-24 Thread Bjorn Andersson
On Tue 24 Apr 00:26 PDT 2018, Chanwoo Choi wrote: > Hi, > > On 2018??? 04??? 24??? 14:29, Bjorn Andersson wrote: > > On Mon 23 Apr 19:48 PDT 2018, Chanwoo Choi wrote: > > > >> Hi, > >> > >> On 2018??? 04??? 24??? 09:20, Bjorn Andersson wrote: > >>> The code in devfreq_add_device() handles the

Re: Regression 4.17-rc1: SSD doesn properly resume causing system hang (NULL pointer dereference)

2018-04-24 Thread Bart Van Assche
On Tue, 2018-04-24 at 19:37 +0200, Paul Menzel wrote: > On 04/24/18 19:31, Bart Van Assche wrote: > Here it is, pasted as citation, as otherwise Thunderbird would wrap the > line. > > > (gdb) disas blk_set_runtime_active > > Dump of assembler code for function blk_set_runtime_active: > >

Re: [PATCH 5/5] PCI: remove PCI_DMA_BUS_IS_PHYS

2018-04-24 Thread Palmer Dabbelt
On Tue, 24 Apr 2018 11:16:25 PDT (-0700), Christoph Hellwig wrote: This was used by the ide, scsi and networking code in the past to determine if they should bounce payloads. Now that the dma mapping always have to support dma to all physical memory (thanks to swiotlb for non-iommu systems)

[PATCH 2/5] ide: kill ide_toggle_bounce

2018-04-24 Thread Christoph Hellwig
ide_toggle_bounce did select various strange block bounce limits, including not bouncing at all as soon as an iommu is present in the system. Given that the dma_map routines now handle any required bounce buffering except for ISA DMA, and the ide code already must handle either ISA DMA or highmem

remove PCI_DMA_BUS_IS_PHYS V2

2018-04-24 Thread Christoph Hellwig
Hi all, this series tries to get rid of the global and PCI_DMA_BUS_IS_PHYS flag, which causes the block layer and networking code to bounce buffer memory above the dma mask in some cases. It is a leftover from i386 + highmem days and is obsolete now that we have swiotlb or iommus so that the dma

[PATCH 1/5] scsi: reduce use of block bounce buffers

2018-04-24 Thread Christoph Hellwig
We can rely on the dma-mapping code to handle any DMA limits that is bigger than the ISA DMA mask for us (either using an iommu or swiotlb), so remove setting the block layer bounce limit for anything but the unchecked_isa_dma case, or the bouncing for highmem pages. Signed-off-by: Christoph

[PATCH 5/5] PCI: remove PCI_DMA_BUS_IS_PHYS

2018-04-24 Thread Christoph Hellwig
This was used by the ide, scsi and networking code in the past to determine if they should bounce payloads. Now that the dma mapping always have to support dma to all physical memory (thanks to swiotlb for non-iommu systems) there is no need to this crude hack any more. Signed-off-by: Christoph

[PATCH 4/5] net: remove the PCI_DMA_BUS_IS_PHYS check in illegal_highdma

2018-04-24 Thread Christoph Hellwig
These days the dma mapping routines must be able to handle any address supported by the device, be that using an iommu, or swiotlb if none is supported. With that the PCI_DMA_BUS_IS_PHYS check in illegal_highdma is not needed and can be removed. Signed-off-by: Christoph Hellwig ---

[PATCH 3/5] ide: remove the PCI_DMA_BUS_IS_PHYS check

2018-04-24 Thread Christoph Hellwig
We now have ways to deal with drainage in the block layer, and libata has been using it for ages. We also want to get rid of PCI_DMA_BUS_IS_PHYS now, so just reduce the PCI transfer size for ide - anyone who cares for performance on PCI controllers should have switched to libata long ago.

Re: Regression 4.17-rc1: SSD doesn properly resume causing system hang (NULL pointer dereference)

2018-04-24 Thread Paul Menzel
Dear Bart, On 04/24/18 19:31, Bart Van Assche wrote: On Tue, 2018-04-24 at 19:10 +0200, Paul Menzel wrote: Please find the configuration file attached. The log only has `initcall_debug no_console_suspend` added. What I was looking for in the .config is the following:

Re: Regression 4.17-rc1: SSD doesn properly resume causing system hang (NULL pointer dereference)

2018-04-24 Thread Bart Van Assche
On Tue, 2018-04-24 at 19:10 +0200, Paul Menzel wrote: > Please find the configuration file attached. The log only has > `initcall_debug no_console_suspend` added. What I was looking for in the .config is the following: CONFIG_SCSI_MQ_DEFAULT=y Can you also provide the disassembly output for

Re: Regression 4.17-rc1: SSD doesnʼt properly resume causing system hang (NULL pointer dereference)

2018-04-24 Thread Bart Van Assche
On Tue, 2018-04-24 at 18:14 +0200, Paul Menzel wrote: > Since Linux 4.17-rc1, resume from ACPI on the Lenovo X60 fails because > of a NULL pointer dereference. As the drive doesn’t come back, messages > can be seen on the display, but the system cannot be controlled anymore, > and has to be

Re: simplify procfs code for seq_file instances

2018-04-24 Thread Christoph Hellwig
On Tue, Apr 24, 2018 at 08:19:16AM -0700, Andrew Morton wrote: > > > I want to ask if it is time to start using poorman function overloading > > > with _b_c_e(). There are millions of allocation functions for example, > > > all slightly difference, and people will add more. Seeing /proc interfaces

Re: simplify procfs code for seq_file instances

2018-04-24 Thread Andrew Morton
On Tue, 24 Apr 2018 16:23:04 +0200 Christoph Hellwig wrote: > On Thu, Apr 19, 2018 at 09:57:50PM +0300, Alexey Dobriyan wrote: > > > git://git.infradead.org/users/hch/misc.git proc_create > > > > > > I want to ask if it is time to start using poorman function overloading > >

Re: [PATCH 02/39] proc: introduce proc_create_seq{,_data}

2018-04-24 Thread Christoph Hellwig
On Thu, Apr 19, 2018 at 09:41:06PM +0300, Alexey Dobriyan wrote: > Should be oopsable. > Once proc_create_data() returns, entry is live, ->open can be called. Ok, switching to opencoding proc_create_data instead.

Re: [PATCH 03/39] proc: introduce proc_create_seq_private

2018-04-24 Thread Christoph Hellwig
On Thu, Apr 19, 2018 at 09:50:27PM +0300, Alexey Dobriyan wrote: > On Thu, Apr 19, 2018 at 02:41:04PM +0200, Christoph Hellwig wrote: > > Variant of proc_create_data that directly take a struct seq_operations > > > --- a/fs/proc/internal.h > > +++ b/fs/proc/internal.h > > @@ -45,6 +45,7 @@ struct

Re: simplify procfs code for seq_file instances

2018-04-24 Thread Christoph Hellwig
On Thu, Apr 19, 2018 at 09:57:50PM +0300, Alexey Dobriyan wrote: > > git://git.infradead.org/users/hch/misc.git proc_create > > > I want to ask if it is time to start using poorman function overloading > with _b_c_e(). There are millions of allocation functions for example, > all slightly

Re: [PATCH 03/39] proc: introduce proc_create_seq_private

2018-04-24 Thread Christoph Hellwig
On Thu, Apr 19, 2018 at 05:18:18PM +0300, Dan Carpenter wrote: > > -static const struct file_operations cio_ignore_proc_fops = { > > - .open= cio_ignore_proc_open, > > - .read= seq_read, > > - .llseek = seq_lseek, > > - .release = seq_release_private, > > - .write =

Re: [PATCH 16/39] ipmi: simplify procfs code

2018-04-24 Thread Christoph Hellwig
On Thu, Apr 19, 2018 at 10:29:29AM -0500, Corey Minyard wrote: > On 04/19/2018 07:41 AM, Christoph Hellwig wrote: >> Use remove_proc_subtree to remove the whole subtree on cleanup instead >> of a hand rolled list of proc entries, unwind the registration loop into >> individual calls. Switch to

Re: [PATCH 26/39] rtc/proc: switch to proc_create_single_data

2018-04-24 Thread Christoph Hellwig
On Thu, Apr 19, 2018 at 03:10:27PM +0200, Alexandre Belloni wrote: > On 19/04/2018 14:41:27+0200, Christoph Hellwig wrote: > > And stop trying to get a reference on the submodule, procfs code deals > > with release after and unloaded module and thus removed proc entry. > > > > Are you sure about

[PATCH] mptlan: fix mpt_lan_sdu_send()'s return type

2018-04-24 Thread Luc Van Oostenryck
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', which is a typedef for an enum type, but the implementation in this driver returns an 'int'. Fix this by returning 'netdev_tx_t' in this driver too. Signed-off-by: Luc Van Oostenryck ---

Re: [PATCH v9 2/5] dt-bindings: scsi: ufs: add document for hisi-ufs

2018-04-24 Thread Rob Herring
On Tue, Apr 17, 2018 at 10:08:11PM +0800, Li Wei wrote: > add ufs node document for Hisilicon. > > Signed-off-by: Li Wei > --- > Documentation/devicetree/bindings/ufs/ufs-hisi.txt | 29 > ++ > .../devicetree/bindings/ufs/ufshcd-pltfrm.txt | 10

Re: [PATCH] [SCSI] mpt3sas: Fix secure erase premature termination (v2)

2018-04-24 Thread Hannes Reinecke
On 04/24/2018 11:09 AM, Steffen Maier wrote: On 11/04/2016 05:35 PM, Martin K. Petersen wrote: "Hannes" == Hannes Reinecke writes: Hannes> Checking with SAT-3 (section 6.2.4: Commands the SATL queues Hannes> internally) the implemented behaviour is standards conformant,

[PATCH v3 07/14] mpt3sas: Increase event log buffer to support 24 port HBA's.

2018-04-24 Thread Chaitra P B
For 24 port HBA's events generated by IOC are more in certain cases and the current circular buffer may be overwritten.Hence increased the event log buffer to accommodate more events. Signed-off-by: Chaitra P B Signed-off-by: Suganath Prabu S

[PATCH v3 00/14] mpt3sas: Enhancements and Defect fixes.

2018-04-24 Thread Chaitra P B
Chaitra P B (14): mpt3sas: Bug fix for big endian systems. mpt3sas: Pre-allocate RDPQ Array at driver boot time. mpt3sas: Lockless access for chain buffers. mpt3sas: Optimize I/O memory consumption in driver. mpt3sas: Enhanced handling of Sense Buffer. mpt3sas: Added support for SAS

[PATCH v3 10/14] mpt3sas: Report Firmware Package Version from HBA Driver.

2018-04-24 Thread Chaitra P B
Added function _base_display_fwpkg_version, which sends FWUpload request to pull FW package version from FW Image Header. Now driver prints FW package version in addition to FW version if the PackageVersion is valid. Signed-off-by: Chaitra P B Signed-off-by:

[PATCH v3 13/14] mpt3sas: fix possible memory leak.

2018-04-24 Thread Chaitra P B
In ioctl exit path driver refers ioc_list to free memory associated with diag buffers and event_log pointer used to save events by driver. If ctl_exit() func is called after unregistering driver, then ioc_list will be empty and hence driver will not be able to free the allocated memory which in

[PATCH v3 14/14] mpt3sas: Update driver version "25.100.00.00"

2018-04-24 Thread Chaitra P B
Update driver version to match OOB/internal driver version. Signed-off-by: Chaitra P B Signed-off-by: Suganath Prabu S --- drivers/scsi/mpt3sas/mpt3sas_base.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

[PATCH v3 02/14] mpt3sas: Pre-allocate RDPQ Array at driver boot time.

2018-04-24 Thread Chaitra P B
Instead of allocating RDPQ array (This stores the address's of each RDPQ pools) at run time, now it will be allocated once during driver load time and same will be reused during host reset operation also (instead of allocating & freeing this buffer on the fly during every host reset operation) and

[PATCH v3 04/14] mpt3sas: Optimize I/O memory consumption in driver.

2018-04-24 Thread Chaitra P B
For every IO, memory of PAGE size is allocated for handling NVMe native PRPS. And in addition to that for every IO (chains need per IO * chain buffer size, e.g. 38 * 128byte) amount of memory is allocated for chain buffers. However, at any point of time; the IO request can be for NVMe target

[PATCH v3 06/14] mpt3sas: Added support for SAS Device Discovery Error Event.

2018-04-24 Thread Chaitra P B
The SAS Device Discovery Error Event is sent to the host when discovery for a particular device is failed during discovery, even after maximum retries by the IOC. Signed-off-by: Chaitra P B Signed-off-by: Suganath Prabu S ---

[PATCH v3 05/14] mpt3sas: Enhanced handling of Sense Buffer.

2018-04-24 Thread Chaitra P B
Enhanced DMA allocation for Sense Buffer, if the allocation does not fit within same 4GB.Introduced is_MSB_are_same function to check if allocted buffer within 4GB range or not. Signed-off-by: Chaitra P B Signed-off-by: Suganath Prabu S

[PATCH v3 01/14] mpt3sas: Bug fix for big endian systems.

2018-04-24 Thread Chaitra P B
This patch fixes bug for big endian systems. Signed-off-by: Chaitra P B Signed-off-by: Suganath Prabu S --- drivers/scsi/mpt3sas/mpi/mpi2_init.h | 2 +- drivers/scsi/mpt3sas/mpt3sas_base.c | 55

[PATCH v3 12/14] mpt3sas: For NVME device, issue a protocol level reset instead of hot reset and use TM timeout value exposed in PCIe Device Page 2.

2018-04-24 Thread Chaitra P B
1)Manufacturing Page 11 contains parameters to control internal firmware behavior. Based on AddlFlags2 field FW/Driver behaviour can be changed, (flag tm_custom_handling is used for this) a) For PCIe device, protocol level reset should be used if flag tm_custom_handling is 0. Since Abort Task

[PATCH v3 09/14] mpt3sas: Cache enclosure pages during enclosure add.

2018-04-24 Thread Chaitra P B
In function _scsih_add_device, for each device connected to an enclosure, driver reads the enclosure page(To get details like enclosure handle, enclosure logical ID, enclosure level etc.) With this patch, instead of reading enclosure page everytime, driver maintains a list for enclosure

[PATCH v3 03/14] mpt3sas: Lockless access for chain buffers.

2018-04-24 Thread Chaitra P B
Introduces Chain lookup table/tracker and implements accessing chain buffer using smid. Removed link list based access of chain buffer which requires lock and allocated as many chains needed. Signed-off-by: Chaitra P B Signed-off-by: Suganath Prabu S

[PATCH v3 11/14] mpt3sas: Update MPI Headers

2018-04-24 Thread Chaitra P B
Update MPI Files to support protocol level reset for NVMe device. Signed-off-by: Chaitra P B Signed-off-by: Suganath Prabu S --- drivers/scsi/mpt3sas/mpi/mpi2.h | 9 ++--- drivers/scsi/mpt3sas/mpi/mpi2_cnfg.h | 30

[PATCH v3 08/14] mpt3sas: Allow processing of events during driver unload.

2018-04-24 Thread Chaitra P B
Events were not processed during driver unload, hence unloading of driver doesn't complete when drives are disconnected while unloading of driver. So don't block events in ISR path, i,e., remove the flag ioc->remove_host so that events are getting processed during driver unload. Thus allowing

Re: [PATCH] [SCSI] mpt3sas: Fix secure erase premature termination (v2)

2018-04-24 Thread Steffen Maier
On 11/04/2016 05:35 PM, Martin K. Petersen wrote: "Hannes" == Hannes Reinecke writes: Hannes> Checking with SAT-3 (section 6.2.4: Commands the SATL queues Hannes> internally) the implemented behaviour is standards conformant, Hannes> although the standard also allows for

Re: [PATCH 1/3] PM / devfreq: Actually support providing freq_table

2018-04-24 Thread Chanwoo Choi
Hi, On 2018년 04월 24일 14:29, Bjorn Andersson wrote: > On Mon 23 Apr 19:48 PDT 2018, Chanwoo Choi wrote: > >> Hi, >> >> On 2018??? 04??? 24??? 09:20, Bjorn Andersson wrote: >>> The code in devfreq_add_device() handles the case where a freq_table is >>> passed by the client, but then requests min

Re: [PATCH] [SCSI] mpt3sas: Fix secure erase premature termination (v4)

2018-04-24 Thread Greg KH
On Mon, Apr 23, 2018 at 06:28:03PM +, Igor Rybak wrote: > Hi, > > We are running kernel 4.4.0-22 and the patch below does not seem to be > present in the mpt3sas driver. Can you please confirm? Please update your kernel, this patch was in the 4.4.36 kernel release which came out December 2,

RE: Re: [PATCH 1/3] PM / devfreq: Actually support providing freq_table

2018-04-24 Thread MyungJoo Ham
>On Mon 23 Apr 19:48 PDT 2018, Chanwoo Choi wrote: > >> Hi, >> >> On 2018??? 04??? 24??? 09:20, Bjorn Andersson wrote: >> > The code in devfreq_add_device() handles the case where a freq_table is >> > passed by the client, but then requests min and max frequences from >> > the, in this case