]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: libsas: shut down the PHY if events reached the threshold
authorJason Yan <yanaijie@huawei.com>
Fri, 8 Dec 2017 09:42:05 +0000 (17:42 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 9 Jan 2018 02:59:28 +0000 (21:59 -0500)
commitd0fc12c85f38c279b0ce50c8a8360a3e11e04a17
tree831a4dd957ced9acdff2349e03ae84fcaacad88e
parent4123c8b25424c3c7186b9354d86700c212c6484f
scsi: libsas: shut down the PHY if events reached the threshold

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 some
erroneous state. Users can re-enable the PHY by sysfs if they want.

We cannot use the fixed memory pool because if we run out of events, the
shut down event and loss of signal event will lost too. The events still
need to be allocated and processed in this case.

Suggested-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Jason 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>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/libsas/sas_init.c
drivers/scsi/libsas/sas_phy.c
include/scsi/libsas.h