Re: [PATCH 3/4] scsi: add missing get_device() return value checks

2017-12-15 Thread Hannes Reinecke
On 12/14/2017 11:03 PM, Bart Van Assche wrote: > On Tue, 2017-12-12 at 09:57 +0100, Hannes Reinecke wrote: >> sdev->sdev_gendev.parent = get_device(&starget->dev); >> +if (!sdev->sdev_gendev.parent) { >> +kfree(sdev); >> +return NULL; >> +} > > Are you sure tha

Re: [mainline] rcu stalls on CPU when unbinding mpt3sas driver

2017-12-15 Thread Hannes Reinecke
On 12/12/2017 11:38 AM, Abdul Haleem wrote: > Hi, > > Off late we are seeing cpu stalls messages while mpt3sas driver unbind > on powerpc machine for both mainline and linux-next kernels > > Machine Type: Power 8 Bare-metal > Kernel version: 4.15.0-rc2 > config: attached. > test: driver unbind >

Re: [PATCH v5 1/7] scsi: libsas: Use dynamic alloced work to avoid sas event lost

2017-12-15 Thread Hannes Reinecke
On 12/08/2017 10:42 AM, Jason Yan wrote: > Now libsas hotplug work is static, every sas event type has its own > static work, LLDD driver queues the hotplug work into shost->work_q. > If LLDD driver burst posts lots hotplug events to libsas, the hotplug > events may pending in the workqueue like >

Re: [PATCH v5 2/7] scsi: libsas: shut down the PHY if events reached the threshold

2017-12-15 Thread Hannes Reinecke
On 12/08/2017 10:42 AM, Jason Yan wrote: > If the PHY burst too many events, we will alloc a lot of events for the > worker. This may leads to memory exhaustion. > > Dan Williams suggested to shut down the PHY if the events reached the > threshold, because in this case the PHY may have gone into s

Re: [PATCH v5 3/7] scsi: libsas: make the event threshold configurable

2017-12-15 Thread Hannes Reinecke
On 12/08/2017 10:42 AM, Jason Yan wrote: > Add a sysfs attr that LLDD can configure it for every host. We made > a example in hisi_sas. Other LLDDs using libsas can implement it if > they want. > > Suggested-by: Hannes Reinecke > Signed-off-by: Jason Yan > CC: John Garry > CC: Johannes Thumshir

Re: [PATCH v5 4/7] scsi: libsas: Use new workqueue to run sas event and disco event

2017-12-15 Thread Hannes Reinecke
On 12/08/2017 10:42 AM, Jason Yan wrote: > Now all libsas works are queued to scsi host workqueue, > include sas event work post by LLDD and sas discovery > work, and a sas hotplug flow may be divided into several > works, e.g libsas receive a PORTE_BYTES_DMAED event, > currently we process it as f

Re: [PATCH v5 5/7] scsi: libsas: use flush_workqueue to process disco events synchronously

2017-12-15 Thread Hannes Reinecke
On 12/08/2017 10:42 AM, Jason Yan wrote: > Now we are processing sas event and discover event in different workqueues. > It's safe to wait the discover event done in the sas event work. Use > flush_workqueue() to insure the disco and revalidate events processed > synchronously so that the whole dis

Re: [PATCH v5 6/7] scsi: libsas: direct call probe and destruct

2017-12-15 Thread Hannes Reinecke
On 12/08/2017 10:42 AM, Jason Yan wrote: > In commit 87c8331fcf72 ("[SCSI] libsas: prevent domain rediscovery > competing with ata error handling") introduced disco mutex to prevent > rediscovery competing with ata error handling and put the whole > revalidation in the mutex. But the rphy add/remov

Re: [PATCH v5 7/7] scsi: libsas: notify event PORTE_BROADCAST_RCVD in sas_enable_revalidation()

2017-12-15 Thread Hannes Reinecke
On 12/08/2017 10:42 AM, Jason Yan wrote: > There are two places queuing the disco event DISCE_REVALIDATE_DOMAIN. > One is in sas_porte_broadcast_rcvd() and uses sas_chain_event() to queue > the event. The other is in sas_enable_revalidation() and uses > sas_queue_event() to queue the event. We have

Re: [PATCH 4/4] sd: use async_probe cookie to avoid deadlocks

2017-12-15 Thread Hannes Reinecke
On 12/14/2017 11:13 PM, Bart Van Assche wrote: > On Tue, 2017-12-12 at 09:57 +0100, Hannes Reinecke wrote: >> With the current design we're waiting for all async probes to >> finish when removing any sd device. >> This might lead to a livelock where the 'remove' call is blocking >> for any probe ca

[GIT PULL] SCSI fixes for 4.15-rc3

2017-12-15 Thread James Bottomley
The most important one is the bfa fix because it's easy to oops the kernel with this driver (this includes the commit that corrects the compiler warning in the original), a regression in the new timespec conversion in aacraid and a regression in the Fibre Channel ELS handling patch.  The other thre

Re: [PATCH][next] scsi: arcmsr: remove redundant check for secs < 0

2017-12-15 Thread walter harms
Am 09.12.2017 01:34, schrieb Colin King: > From: Colin Ian King > > The check for secs being less than zero is redundant for two reasons. > Firstly, secs is unsigned so the check is always going to be false. > Secondly, if secs was signed the proceeding calculation of secs is > never going to b

Re: [PATCH 1/3] virtio-scsi: implement target rescan

2017-12-15 Thread Steffen Maier
On 12/14/2017 11:11 AM, Hannes Reinecke wrote: Implement the 'rescan' virtio-scsi feature. Rescanning works by sending a 'rescan' virtio-scsi command with the next requested target id to the backend. The backend will respond with the next used target id or '-1' if no more targets are found. This

Re: [PATCH 2/3] virtio-scsi: Add FC transport class

2017-12-15 Thread Steffen Maier
On 12/14/2017 11:11 AM, Hannes Reinecke wrote: When a device announces an 'FC' protocol we should be pulling in the FC transport class to have the rports etc setup correctly. It took some time for me to understand what this does. It seems to mirror the topology of rports and sdevs that exist u

Re: [PATCH 3/3] virtio_scsi: Implement 'native LUN' feature

2017-12-15 Thread Steffen Maier
Just a few very early view-only review comments. Haven't run the code. On 12/14/2017 11:11 AM, Hannes Reinecke wrote: The 'native LUN' feature allows virtio-scsi to pass in the LUN numbers from the underlying storage directly, without having to modify the LUN number itself. It works by shifting

[PATCH v16 0/4] Replace PCI pool by DMA pool API

2017-12-15 Thread Romain Perier
by the dma pool API and remove the defines. Changes in v16: - Rebased series onto next-20171215 - I have fixed patch 04/04, so it can be applied - Added Acked-by for Bjorn Helgaas on patch 04/04 Changes in v15: - Rebased series onto next-20171120 - Added patch 04/05 for mpt3sas scsi driver Changes

[PATCH v16 1/4] block: DAC960: Replace PCI pool old API

2017-12-15 Thread Romain Perier
From: Romain Perier The PCI pool API is deprecated. This commit replaces the PCI pool old API by the appropriate function with the DMA pool API. Signed-off-by: Romain Perier Acked-by: Peter Senna Tschudin Tested-by: Peter Senna Tschudin --- drivers/block/DAC960.c | 38 ++-

[PATCH v16 3/4] hinic: Replace PCI pool old API

2017-12-15 Thread Romain Perier
From: Romain Perier The PCI pool API is deprecated. This commit replaces the PCI pool old API by the appropriate function with the DMA pool API. Signed-off-by: Romain Perier --- drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c | 10 +- drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.h

[PATCH v16 4/4] PCI: Remove PCI pool macro functions

2017-12-15 Thread Romain Perier
From: Romain Perier Now that all the drivers use dma pool API, we can remove the macro functions for PCI pool. Signed-off-by: Romain Perier Reviewed-by: Peter Senna Tschudin Acked-by: Bjorn Helgaas --- include/linux/pci.h | 9 - 1 file changed, 9 deletions(-) diff --git a/include/li

[PATCH v16 2/4] net: e100: Replace PCI pool old API

2017-12-15 Thread Romain Perier
From: Romain Perier The PCI pool API is deprecated. This commit replaces the PCI pool old API by the appropriate function with the DMA pool API. Signed-off-by: Romain Perier Acked-by: Peter Senna Tschudin Acked-by: Jeff Kirsher Tested-by: Peter Senna Tschudin --- drivers/net/ethernet/intel/