]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: hpsa: cleanup sas_phy structures in sysfs when unloading
authorMartin Wilck <mwilck@suse.de>
Fri, 20 Oct 2017 21:51:14 +0000 (16:51 -0500)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 25 Oct 2017 08:55:04 +0000 (04:55 -0400)
commit7a03355aeba7683c80b7b8e34dc4eae4f84c38d2
tree546c3096d5d51da28c137f02df668ca16e24c0dc
parentab78d8298dc78071a35bc157d7300218a37e0ad3
scsi: hpsa: cleanup sas_phy structures in sysfs when unloading

I am resubmitting this patch on behalf of Martin Wilck with his
permission.

The original patch can be found here:
https://www.spinics.net/lists/linux-scsi/msg102083.html

This patch did not help until Hannes's
commit 9441284fbc39 ("scsi-fixup-kernel-warning-during-rmmod")
was applied to the kernel.

--------------------------------------
Original patch description from Martin:
--------------------------------------

When the hpsa module is unloaded using rmmod, dangling
symlinks remain under /sys/class/sas_phy. Fix this by
calling sas_phy_delete() rather than sas_phy_free (which,
according to comments, should not be called for PHYs that
have been set up successfully, anyway).

Tested-by: Don Brace <don.brace@microsemi.com>
Reviewed-by: Don Brace <don.brace@microsemi.com>
Signed-off-by: Martin Wilck <mwilck@suse.de>
Signed-off-by: Don Brace <don.brace@microsemi.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/hpsa.c