OpenCloudOS-Kernel/drivers/scsi/libsas
chenxiang affc67788f scsi: libsas: initialize sas_phy status according to response of DISCOVER
The status of SAS PHY is in sas_phy->enabled. There is an issue that the
status of a remote SAS PHY may be initialized incorrectly: if disable
remote SAS PHY through sysfs interface (such as echo 0 >
/sys/class/sas_phy/phy-1:0:0/enable), then reboot the system, and we
will find the status of remote SAS PHY which is disabled before is
1 (cat /sys/class/sas_phy/phy-1:0:0/enable). But actually the status of
remote SAS PHY is disabled and the device attached is not found.

In SAS protocol, NEGOTIATED LOGICAL LINK RATE field of DISCOVER response
is 0x1 when remote SAS PHY is disabled. So initialize sas_phy->enabled
according to the value of NEGOTIATED LOGICAL LINK RATE field.

Signed-off-by: chenxiang <chenxiang66@hisilicon.com>
Reviewed-by: John Garry <john.garry@huawei.com>
Signed-off-by: Jason Yan <yanaijie@huawei.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2018-01-08 21:43:05 -05:00
..
Kconfig scsi: scsi_transport_sas: switch to bsg-lib for SMP passthrough 2017-08-29 21:51:45 -04:00
Makefile Merge branch 'trivial' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6 2011-03-20 18:14:55 -07:00
sas_ata.c scsi: libsas: Annotate fall-through in a switch statement 2017-08-25 17:08:08 -04:00
sas_discover.c libsas: Fix Kernel Crash in smp_execute_task 2015-03-06 20:51:29 -08:00
sas_dump.c scsi: libsas: kill useless ha_event and do some cleanup 2017-09-15 21:32:58 -04:00
sas_dump.h scsi: libsas: kill useless ha_event and do some cleanup 2017-09-15 21:32:58 -04:00
sas_event.c scsi: libsas: add event to defer list tail instead of head when draining 2017-09-15 21:38:30 -04:00
sas_expander.c scsi: libsas: initialize sas_phy status according to response of DISCOVER 2018-01-08 21:43:05 -05:00
sas_host_smp.c scsi: scsi_transport_sas: switch to bsg-lib for SMP passthrough 2017-08-29 21:51:45 -04:00
sas_init.c SCSI misc on 20171114 2017-11-14 16:23:44 -08:00
sas_internal.h scsi: scsi_transport_sas: switch to bsg-lib for SMP passthrough 2017-08-29 21:51:45 -04:00
sas_phy.c [SCSI] libsas: suspend / resume support 2012-08-24 13:10:23 +04:00
sas_port.c [SCSI] sas: unify the pointlessly separated enums sas_dev_type and sas_device_type 2013-05-10 07:47:52 -07:00
sas_scsi_host.c scsi: libsas: remove private hex2bin() implementation 2018-01-03 22:40:52 -05:00
sas_task.c scsi: Add export.h for EXPORT_SYMBOL/THIS_MODULE as required 2011-10-31 19:31:23 -04:00