]> git.karo-electronics.de Git - karo-tx-linux.git/commit
libsas: fix ata_eh clobbering ex_phys via smp_ata_check_ready
authorDan Williams <dan.j.williams@intel.com>
Tue, 20 Mar 2012 20:24:29 +0000 (13:24 -0700)
committerDan Williams <dan.j.williams@intel.com>
Wed, 11 Apr 2012 02:15:23 +0000 (19:15 -0700)
commit6ec4dacc7c11b5999abe78f9a7e0125062b1d660
tree7b1fd1a0a685a1334030d12436ec093ab2407aa6
parentdb25a56d901cfc259240d6b6cf999170d7f35fff
libsas: fix ata_eh clobbering ex_phys via smp_ata_check_ready

The check_ready implementation in the expander-attached ata device case
polls on sas_ex_phy_discover().  The effect is that the ex_phy fields
(critically ->attached_sas_addr) can change.  When ata_eh ends and
libsas comes along to revalidate the domain
sas_unregister_devs_sas_addr() can fail to lookup devices to remove, or
fail to re-add an ata device that ata_eh marked as disabled.  So change
the code to skip the sas_address and change count updates when ata_eh is
active.

Cc: Jack Wang <jack_wang@usish.com>
Tested-by: Maciej Patelczyk <maciej.patelczyk@intel.com>
Tested-by: Bartek Nowakowski <bartek.nowakowski@intel.com>
Tested-by: Jacek Danecki <jacek.danecki@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/scsi/libsas/sas_expander.c