mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: John Garry <john.garry@huawei.com>
To: Jason Yan <yanaijie@huawei.com>, <jack.wang@profitbricks.com>,
	<lindar_liu@usish.com>
Cc: <martin.petersen@oracle.com>, <jejb@linux.vnet.ibm.com>,
	<linux-scsi@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<chenweilong@huawei.com>, <zhaohongjiang@huawei.com>,
	<hare@suse.com>, <dan.j.williams@intel.com>, <jthumshirn@suse.de>,
	<Raj.Dinesh@microsemi.com>, <hch@lst.de>,
	<huangdaode@hisilicon.com>, <chenxiang66@hisilicon.com>
Subject: Re: [PATCH v4 00/11] Enhance libsas hotplug feature
Date: Mon, 18 Sep 2017 13:54:47 +0100	[thread overview]
Message-ID: <f1698b1a-8d80-8ea2-868b-dd4c9b50ea61@huawei.com> (raw)
In-Reply-To: <1504689314-20072-1-git-send-email-yanaijie@huawei.com>

On 06/09/2017 10:15, Jason Yan wrote:
> Hello all, Yijing Wang handed over this topic to me. We are working
> on it the last two months. We have tested the patchset for a long
> time. Here is the new version.
>
> Now the libsas hotplug has some issues, Dan Williams report
> a similar bug here before
> https://www.mail-archive.com/linux-scsi@vger.kernel.org/msg39187.html
>
> The issues we have found
> 1. if LLDD burst reports lots of phy-up/phy-down sas events, some events
>    may lost because a same sas events is pending now, finally libsas topo
>    may different the hardware.
> 2. receive a phy down sas event, libsas call sas_deform_port to remove
>    devices, it would first delete the sas port, then put a destruction
>    discovery event in a new work, and queue it at the tail of workqueue,
>    once the sas port be deleted, its children device will be deleted too,
>    when the destruction work start, it will found the target device has
>    been removed, and report a sysfs warnning.
> 3. since a hotplug process will be divided into several works, if a phy up
>    sas event insert into phydown works, like
>    destruction work  ---> PORTE_BYTES_DMAED (sas_form_port) ---->PHYE_LOSS_OF_SIGNAL
>    the hot remove flow would broken by PORTE_BYTES_DMAED event, it's not
>    we expected, and issues would occur.
>

I have tried to verify PM suspend/resume feature with this patchset to 
ensure that it is not broken.

Since our hisi_sas driver does not support PM yet, I have got my hands 
on an adaptec card which uses pm8001 driver (it's vendor 9065, device 
8088) to test.

So in the PM resume, sometimes I find the console locks up with and 
without this patchset. In these cases, I find this log:
[   59.344266] pm80xx pm80xx_chip_init 1098:Firmware is not ready!

Is this a known issue? Should we have a chip reset in all cases in the 
resume code, marked ***:
static int pm8001_pci_resume(struct pci_dev *pdev)
{
...	

	rc = pci_go_44(pdev);
	if (rc)
		goto err_out_disable;

	/* chip soft rst only for spc */
	if (pm8001_ha->chip_id == chip_8001) { **** HERE
		PM8001_CHIP_DISP->chip_soft_rst(pm8001_ha);
		PM8001_INIT_DBG(pm8001_ha,
			pm8001_printk("chip soft reset successful\n"));
	}
	rc = PM8001_CHIP_DISP->chip_init(pm8001_ha);
	if (rc)
		goto err_out_disable;

...
}

John

> v3->v4: -get rid of unused ha event and do some cleanup
>         -use dynamic alloced work and support shutting down the phy if active event reached the threshold
> 		-use flush_workqueue instead of wait-completion to process discover events synchronously
> 		-direct call probe and destruct function
> 		-other small code improvements
> v2->v3: some code improvements suggested by Johannes and John,
> 	    split v2 patch 2 into several small patches.
> v1->v2: some code improvements suggested by John Garry
>
> Jason Yan (10):
>   libsas: kill useless ha_event and do some cleanup
>   libsas: remove the numbering for each event enum
>   libsas: remove unused port_gone_completion and DISCE_PORT_GONE
>   libsas: rename notify_port_event() for consistency
>   libsas: Use dynamic alloced work to avoid sas event lost
>   libsas: shut down the PHY if events reached the threshold
>   libsas: make the event threshold configurable
>   libsas: Use new workqueue to run sas event and disco event
>   libsas: libsas: use flush_workqueue to process disco events
>     synchronously
>   libsas: direct call probe and destruct
>
> chenxiang (1):
>   libsas: add event to defer list tail instead of head when draining
>
>  drivers/scsi/aic94xx/aic94xx_hwi.c    |   3 -
>  drivers/scsi/hisi_sas/hisi_sas_main.c |   7 ++-
>  drivers/scsi/libsas/sas_ata.c         |   1 -
>  drivers/scsi/libsas/sas_discover.c    |  36 +++++++-----
>  drivers/scsi/libsas/sas_dump.c        |  10 ----
>  drivers/scsi/libsas/sas_dump.h        |   1 -
>  drivers/scsi/libsas/sas_event.c       |  97 +++++++++++++++++++-------------
>  drivers/scsi/libsas/sas_expander.c    |   2 +-
>  drivers/scsi/libsas/sas_init.c        | 101 +++++++++++++++++++++++++++++-----
>  drivers/scsi/libsas/sas_internal.h    |   7 +++
>  drivers/scsi/libsas/sas_phy.c         |  73 ++++++++++++------------
>  drivers/scsi/libsas/sas_port.c        |  25 +++++----
>  include/scsi/libsas.h                 |  81 ++++++++++++---------------
>  include/scsi/scsi_transport_sas.h     |   1 +
>  14 files changed, 270 insertions(+), 175 deletions(-)
>

      parent reply	other threads:[~2017-09-18 12:55 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-06  9:15 Jason Yan
2017-09-06  9:15 ` [PATCH v4 01/11] libsas: kill useless ha_event and do some cleanup Jason Yan
2017-09-06 12:38   ` Johannes Thumshirn
2017-09-06 13:20   ` Christoph Hellwig
2017-09-06  9:15 ` [PATCH v4 02/11] libsas: remove the numbering for each event enum Jason Yan
2017-09-06 12:41   ` Johannes Thumshirn
2017-09-06 13:20   ` Christoph Hellwig
2017-09-06  9:15 ` [PATCH v4 03/11] libsas: remove unused port_gone_completion and DISCE_PORT_GONE Jason Yan
2017-09-06 12:43   ` Johannes Thumshirn
2017-09-06 13:21   ` Christoph Hellwig
2017-09-06  9:15 ` [PATCH v4 04/11] libsas: rename notify_port_event() for consistency Jason Yan
2017-09-06 12:44   ` Johannes Thumshirn
2017-09-06 13:21   ` Christoph Hellwig
2017-09-06  9:15 ` [PATCH v4 05/11] libsas: Use dynamic alloced work to avoid sas event lost Jason Yan
2017-09-07  8:22   ` Jack Wang
2017-09-06  9:15 ` [PATCH v4 06/11] libsas: shut down the PHY if events reached the threshold Jason Yan
2017-09-06  9:15 ` [PATCH v4 07/11] libsas: make the event threshold configurable Jason Yan
2017-09-07  8:15   ` Jack Wang
2017-09-06  9:15 ` [PATCH v4 08/11] libsas: Use new workqueue to run sas event and disco event Jason Yan
2017-09-06  9:15 ` [PATCH v4 09/11] libsas: libsas: use flush_workqueue to process disco events synchronously Jason Yan
2017-09-06  9:15 ` [PATCH v4 10/11] libsas: direct call probe and destruct Jason Yan
2017-09-06  9:15 ` [PATCH v4 11/11] libsas: add event to defer list tail instead of head when draining Jason Yan
2017-09-06 13:21   ` Christoph Hellwig
2017-09-06 13:07 ` [PATCH v4 00/11] Enhance libsas hotplug feature John Garry
2017-09-06 13:22   ` Christoph Hellwig
2017-09-07  1:15     ` Jason Yan
2017-09-16  1:43 ` Martin K. Petersen
2017-09-18 12:54 ` John Garry [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f1698b1a-8d80-8ea2-868b-dd4c9b50ea61@huawei.com \
    --to=john.garry@huawei.com \
    --cc=Raj.Dinesh@microsemi.com \
    --cc=chenweilong@huawei.com \
    --cc=chenxiang66@hisilicon.com \
    --cc=dan.j.williams@intel.com \
    --cc=hare@suse.com \
    --cc=hch@lst.de \
    --cc=huangdaode@hisilicon.com \
    --cc=jack.wang@profitbricks.com \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=jthumshirn@suse.de \
    --cc=lindar_liu@usish.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=yanaijie@huawei.com \
    --cc=zhaohongjiang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®