diff options
author | Kashyap, Desai <kashyap.desai@lsi.com> | 2010-06-17 13:25:13 +0530 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-07-27 12:02:06 -0500 |
commit | ab6ce92541ea24c6a92be8498d7d1b26c14ec62d (patch) | |
tree | f56c00fede2575053251c402dad1583b63b26822 /drivers/scsi | |
parent | 593d5720745658a4a973952fb74f6d863c531e97 (diff) | |
download | kernel_samsung_smdk4412-ab6ce92541ea24c6a92be8498d7d1b26c14ec62d.zip kernel_samsung_smdk4412-ab6ce92541ea24c6a92be8498d7d1b26c14ec62d.tar.gz kernel_samsung_smdk4412-ab6ce92541ea24c6a92be8498d7d1b26c14ec62d.tar.bz2 |
[SCSI] mpt2sas: Fix to use sas device list instead of enclosure list for _transpor_get_enclosure_identifier.
Enclosure_identifier not being returned by mpt2sas
The driver exports callback function to the sas transport layer
for obtaining the enclosure logical id. This function is called
_transport_get_enclosure_identifier. The driver was searching
the wrong list for the enclosure_identifier. The driver should be
searching the sas device list instead of enclosure list. The
sas address that is passed to the driver is for the end device, not
enclosure.
Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/mpt2sas/mpt2sas_transport.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/scsi/mpt2sas/mpt2sas_transport.c b/drivers/scsi/mpt2sas/mpt2sas_transport.c index 2727c3b..778e149 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_transport.c +++ b/drivers/scsi/mpt2sas/mpt2sas_transport.c @@ -1007,18 +1007,18 @@ static int _transport_get_enclosure_identifier(struct sas_rphy *rphy, u64 *identifier) { struct MPT2SAS_ADAPTER *ioc = rphy_to_ioc(rphy); - struct _sas_node *sas_expander; + struct _sas_device *sas_device; unsigned long flags; - spin_lock_irqsave(&ioc->sas_node_lock, flags); - sas_expander = mpt2sas_scsih_expander_find_by_sas_address(ioc, + spin_lock_irqsave(&ioc->sas_device_lock, flags); + sas_device = mpt2sas_scsih_sas_device_find_by_sas_address(ioc, rphy->identify.sas_address); - spin_unlock_irqrestore(&ioc->sas_node_lock, flags); + spin_unlock_irqrestore(&ioc->sas_device_lock, flags); - if (!sas_expander) + if (!sas_device) return -ENXIO; - *identifier = sas_expander->enclosure_logical_id; + *identifier = sas_device->enclosure_logical_id; return 0; } |