1. 11 1月, 2018 38 次提交
  2. 09 1月, 2018 2 次提交
    • J
      scsi: libsas: use flush_workqueue to process disco events synchronously · 517e5153
      Jason Yan 提交于
      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 discover and revalidate
      process will not be interrupted by other events.
      Signed-off-by: NJason Yan <yanaijie@huawei.com>
      CC: John Garry <john.garry@huawei.com>
      CC: Johannes Thumshirn <jthumshirn@suse.de>
      CC: Ewan Milne <emilne@redhat.com>
      CC: Christoph Hellwig <hch@lst.de>
      CC: Tomas Henzl <thenzl@redhat.com>
      CC: Dan Williams <dan.j.williams@intel.com>
      Reviewed-by: NHannes Reinecke <hare@suse.com>
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      517e5153
    • J
      scsi: libsas: Use new workqueue to run sas event and disco event · 93bdbd06
      Jason Yan 提交于
      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 following steps:
      
      sas_form_port  --- run in work in shost workq
      	sas_discover_domain  --- run in another work in shost workq
      		...
      		sas_probe_devices  --- run in new work in shost workq
      We found during hot-add a device, libsas may need run several
      works in same workqueue to add device in system, the process is
      not atomic, it may interrupt by other sas event works, like
      PHYE_LOSS_OF_SIGNAL.
      
      This patch is preparation of execute libsas sas event in sync. We need
      to use different workqueue to run sas event and disco event. Otherwise
      the work will be blocked for waiting another chained work in the same
      workqueue.
      Signed-off-by: NYijing Wang <wangyijing@huawei.com>
      CC: John Garry <john.garry@huawei.com>
      CC: Johannes Thumshirn <jthumshirn@suse.de>
      CC: Ewan Milne <emilne@redhat.com>
      CC: Christoph Hellwig <hch@lst.de>
      CC: Tomas Henzl <thenzl@redhat.com>
      CC: Dan Williams <dan.j.williams@intel.com>
      Signed-off-by: NJason Yan <yanaijie@huawei.com>
      Reviewed-by: NHannes Reinecke <hare@suse.com>
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      93bdbd06