diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-05 12:16:11 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-05 12:16:11 -0400 |
commit | 71277a6635890ab401f0a9dd7d5d9e652eea44ef (patch) | |
tree | 21d05aee3942fafcf3fe8931bdd05185c6e7eec1 /drivers | |
parent | 976d167615b64e14bc1491ca51d424e2ba9a5e84 (diff) | |
parent | a73914c35b05d80f8ce78288e10056c91090b666 (diff) |
Merge git://bedivere.hansenpartnership.com/git/scsi-rc-fixes-2.6
* git://bedivere.hansenpartnership.com/git/scsi-rc-fixes-2.6:
[SCSI] libsas: fix panic when single phy is disabled on a wide port
[SCSI] qla2xxx: Fix crash in qla2x00_abort_all_cmds() on unload
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/libsas/sas_expander.c | 10 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_os.c | 9 |
2 files changed, 11 insertions, 8 deletions
diff --git a/drivers/scsi/libsas/sas_expander.c b/drivers/scsi/libsas/sas_expander.c index c9e3dc024bc3..16ad97df5ba6 100644 --- a/drivers/scsi/libsas/sas_expander.c +++ b/drivers/scsi/libsas/sas_expander.c | |||
@@ -1769,10 +1769,12 @@ static void sas_unregister_devs_sas_addr(struct domain_device *parent, | |||
1769 | sas_disable_routing(parent, phy->attached_sas_addr); | 1769 | sas_disable_routing(parent, phy->attached_sas_addr); |
1770 | } | 1770 | } |
1771 | memset(phy->attached_sas_addr, 0, SAS_ADDR_SIZE); | 1771 | memset(phy->attached_sas_addr, 0, SAS_ADDR_SIZE); |
1772 | sas_port_delete_phy(phy->port, phy->phy); | 1772 | if (phy->port) { |
1773 | if (phy->port->num_phys == 0) | 1773 | sas_port_delete_phy(phy->port, phy->phy); |
1774 | sas_port_delete(phy->port); | 1774 | if (phy->port->num_phys == 0) |
1775 | phy->port = NULL; | 1775 | sas_port_delete(phy->port); |
1776 | phy->port = NULL; | ||
1777 | } | ||
1776 | } | 1778 | } |
1777 | 1779 | ||
1778 | static int sas_discover_bfs_by_root_level(struct domain_device *root, | 1780 | static int sas_discover_bfs_by_root_level(struct domain_device *root, |
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 4cace3f20c04..1e69527f1e4e 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c | |||
@@ -1328,10 +1328,9 @@ qla2x00_abort_all_cmds(scsi_qla_host_t *vha, int res) | |||
1328 | qla2x00_sp_compl(ha, sp); | 1328 | qla2x00_sp_compl(ha, sp); |
1329 | } else { | 1329 | } else { |
1330 | ctx = sp->ctx; | 1330 | ctx = sp->ctx; |
1331 | if (ctx->type == SRB_LOGIN_CMD || | 1331 | if (ctx->type == SRB_ELS_CMD_RPT || |
1332 | ctx->type == SRB_LOGOUT_CMD) { | 1332 | ctx->type == SRB_ELS_CMD_HST || |
1333 | ctx->u.iocb_cmd->free(sp); | 1333 | ctx->type == SRB_CT_CMD) { |
1334 | } else { | ||
1335 | struct fc_bsg_job *bsg_job = | 1334 | struct fc_bsg_job *bsg_job = |
1336 | ctx->u.bsg_job; | 1335 | ctx->u.bsg_job; |
1337 | if (bsg_job->request->msgcode | 1336 | if (bsg_job->request->msgcode |
@@ -1343,6 +1342,8 @@ qla2x00_abort_all_cmds(scsi_qla_host_t *vha, int res) | |||
1343 | kfree(sp->ctx); | 1342 | kfree(sp->ctx); |
1344 | mempool_free(sp, | 1343 | mempool_free(sp, |
1345 | ha->srb_mempool); | 1344 | ha->srb_mempool); |
1345 | } else { | ||
1346 | ctx->u.iocb_cmd->free(sp); | ||
1346 | } | 1347 | } |
1347 | } | 1348 | } |
1348 | } | 1349 | } |