Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 71277a66 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 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
parents 976d1676 a73914c3
Loading
Loading
Loading
Loading
+6 −4
Original line number Original line Diff line number Diff line
@@ -1769,11 +1769,13 @@ static void sas_unregister_devs_sas_addr(struct domain_device *parent,
		sas_disable_routing(parent, phy->attached_sas_addr);
		sas_disable_routing(parent, phy->attached_sas_addr);
	}
	}
	memset(phy->attached_sas_addr, 0, SAS_ADDR_SIZE);
	memset(phy->attached_sas_addr, 0, SAS_ADDR_SIZE);
	if (phy->port) {
		sas_port_delete_phy(phy->port, phy->phy);
		sas_port_delete_phy(phy->port, phy->phy);
		if (phy->port->num_phys == 0)
		if (phy->port->num_phys == 0)
			sas_port_delete(phy->port);
			sas_port_delete(phy->port);
		phy->port = NULL;
		phy->port = NULL;
	}
	}
}


static int sas_discover_bfs_by_root_level(struct domain_device *root,
static int sas_discover_bfs_by_root_level(struct domain_device *root,
					  const int level)
					  const int level)
+5 −4
Original line number Original line Diff line number Diff line
@@ -1328,10 +1328,9 @@ qla2x00_abort_all_cmds(scsi_qla_host_t *vha, int res)
					qla2x00_sp_compl(ha, sp);
					qla2x00_sp_compl(ha, sp);
				} else {
				} else {
					ctx = sp->ctx;
					ctx = sp->ctx;
					if (ctx->type == SRB_LOGIN_CMD ||
					if (ctx->type == SRB_ELS_CMD_RPT ||
					    ctx->type == SRB_LOGOUT_CMD) {
					    ctx->type == SRB_ELS_CMD_HST ||
						ctx->u.iocb_cmd->free(sp);
					    ctx->type == SRB_CT_CMD) {
					} else {
						struct fc_bsg_job *bsg_job =
						struct fc_bsg_job *bsg_job =
						    ctx->u.bsg_job;
						    ctx->u.bsg_job;
						if (bsg_job->request->msgcode
						if (bsg_job->request->msgcode
@@ -1343,6 +1342,8 @@ qla2x00_abort_all_cmds(scsi_qla_host_t *vha, int res)
						kfree(sp->ctx);
						kfree(sp->ctx);
						mempool_free(sp,
						mempool_free(sp,
							ha->srb_mempool);
							ha->srb_mempool);
					} else {
						ctx->u.iocb_cmd->free(sp);
					}
					}
				}
				}
			}
			}