diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-18 14:25:31 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-18 14:25:31 -0400 |
commit | 2cca775baecbfede2fec20c99add709232311fe7 (patch) | |
tree | b0eefe80881d263ba7976174144ae4e9cf238425 /drivers/message/fusion/mptsas.c | |
parent | eddeb0e2d863e3941d8768e70cb50c6120e61fa0 (diff) | |
parent | 94795b61e84994a3b058f92d041d1fb3d869c7d5 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (137 commits)
[SCSI] iscsi: bidi support for iscsi_tcp
[SCSI] iscsi: bidi support at the generic libiscsi level
[SCSI] iscsi: extended cdb support
[SCSI] zfcp: Fix error handling for blocked unit for send FCP command
[SCSI] zfcp: Remove zfcp_erp_wait from slave destory handler to fix deadlock
[SCSI] zfcp: fix 31 bit compile warnings
[SCSI] bsg: no need to set BSG_F_BLOCK bit in bsg_complete_all_commands
[SCSI] bsg: remove minor in struct bsg_device
[SCSI] bsg: use better helper list functions
[SCSI] bsg: replace kobject_get with blk_get_queue
[SCSI] bsg: takes a ref to struct device in fops->open
[SCSI] qla1280: remove version check
[SCSI] libsas: fix endianness bug in sas_ata
[SCSI] zfcp: fix compiler warning caused by poking inside new semaphore (linux-next)
[SCSI] aacraid: Do not describe check_reset parameter with its value
[SCSI] aacraid: Fix down_interruptible() to check the return value
[SCSI] sun3_scsi_vme: add MODULE_LICENSE
[SCSI] st: rename flush_write_buffer()
[SCSI] tgt: use KMEM_CACHE macro
[SCSI] initio: fix big endian problems for auto request sense
...
Diffstat (limited to 'drivers/message/fusion/mptsas.c')
-rw-r--r-- | drivers/message/fusion/mptsas.c | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c index 78734e25edd5..468480771f13 100644 --- a/drivers/message/fusion/mptsas.c +++ b/drivers/message/fusion/mptsas.c | |||
@@ -230,6 +230,20 @@ static inline MPT_ADAPTER *rphy_to_ioc(struct sas_rphy *rphy) | |||
230 | return ((MPT_SCSI_HOST *)shost->hostdata)->ioc; | 230 | return ((MPT_SCSI_HOST *)shost->hostdata)->ioc; |
231 | } | 231 | } |
232 | 232 | ||
233 | static struct mptsas_portinfo * | ||
234 | mptsas_get_hba_portinfo(MPT_ADAPTER *ioc) | ||
235 | { | ||
236 | struct list_head *head = &ioc->sas_topology; | ||
237 | struct mptsas_portinfo *pi = NULL; | ||
238 | |||
239 | /* always the first entry on sas_topology list */ | ||
240 | |||
241 | if (!list_empty(head)) | ||
242 | pi = list_entry(head->next, struct mptsas_portinfo, list); | ||
243 | |||
244 | return pi; | ||
245 | } | ||
246 | |||
233 | /* | 247 | /* |
234 | * mptsas_find_portinfo_by_handle | 248 | * mptsas_find_portinfo_by_handle |
235 | * | 249 | * |
@@ -1290,7 +1304,7 @@ static int mptsas_smp_handler(struct Scsi_Host *shost, struct sas_rphy *rphy, | |||
1290 | struct mptsas_portinfo *port_info; | 1304 | struct mptsas_portinfo *port_info; |
1291 | 1305 | ||
1292 | mutex_lock(&ioc->sas_topology_mutex); | 1306 | mutex_lock(&ioc->sas_topology_mutex); |
1293 | port_info = mptsas_find_portinfo_by_handle(ioc, ioc->handle); | 1307 | port_info = mptsas_get_hba_portinfo(ioc); |
1294 | if (port_info && port_info->phy_info) | 1308 | if (port_info && port_info->phy_info) |
1295 | sas_address = | 1309 | sas_address = |
1296 | port_info->phy_info[0].phy->identify.sas_address; | 1310 | port_info->phy_info[0].phy->identify.sas_address; |
@@ -2028,8 +2042,7 @@ static int mptsas_probe_one_phy(struct device *dev, | |||
2028 | int i; | 2042 | int i; |
2029 | 2043 | ||
2030 | mutex_lock(&ioc->sas_topology_mutex); | 2044 | mutex_lock(&ioc->sas_topology_mutex); |
2031 | port_info = mptsas_find_portinfo_by_handle(ioc, | 2045 | port_info = mptsas_get_hba_portinfo(ioc); |
2032 | ioc->handle); | ||
2033 | mutex_unlock(&ioc->sas_topology_mutex); | 2046 | mutex_unlock(&ioc->sas_topology_mutex); |
2034 | 2047 | ||
2035 | for (i = 0; i < port_info->num_phys; i++) | 2048 | for (i = 0; i < port_info->num_phys; i++) |
@@ -2099,8 +2112,7 @@ mptsas_probe_hba_phys(MPT_ADAPTER *ioc) | |||
2099 | 2112 | ||
2100 | mptsas_sas_io_unit_pg1(ioc); | 2113 | mptsas_sas_io_unit_pg1(ioc); |
2101 | mutex_lock(&ioc->sas_topology_mutex); | 2114 | mutex_lock(&ioc->sas_topology_mutex); |
2102 | ioc->handle = hba->phy_info[0].handle; | 2115 | port_info = mptsas_get_hba_portinfo(ioc); |
2103 | port_info = mptsas_find_portinfo_by_handle(ioc, ioc->handle); | ||
2104 | if (!port_info) { | 2116 | if (!port_info) { |
2105 | port_info = hba; | 2117 | port_info = hba; |
2106 | list_add_tail(&port_info->list, &ioc->sas_topology); | 2118 | list_add_tail(&port_info->list, &ioc->sas_topology); |