-
由 Jason Yan 提交于
euler inclusion category: bugfix bugzilla: 5457 CVE: NA The ata device do not have a real sas address. If a ata device is replaced with another one, the sas address is the same. Now libsas treat this senario as flutter and do not delete the old one and discover the new one. This will cause the data read from or write to the wrong device. And also when hotplugging a sata device, libsas entered to the flutter case and sometimes found the phy attached address is abnormal. The log is like this: sas: ex 500e004aaaaaaa1f phy6 originated BROADCAST(CHANGE) sas: ex 500e004aaaaaaa1f phy06:U:0 attached: 0000000000000000 (no device) sas: ex 500e004aaaaaaa1f phy 0x6 broadcast flutter Fix this issue by checking the phy attached address and the ata device's class and id if they are the same as the origin. The ata class and id is readed in ata EH process. When ata EH is scheduled, revalidate will be deferred and a new bcast will be raised. Signed-off-by: NJason Yan <yanaijie@huawei.com> Reviewed-by: NJohn Garry <john.garry@huawei.com> CC: chenxiang <chenxiang66@hisilicon.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> CC: Tejun Heo <tj@kernel.org> CC: Hannes Reinecke <hare@suse.com> Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
d856ec50