Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 323135
b: refs/heads/master
c: 0737c8d
h: refs/heads/master
i:
  323133: bb001c6
  323131: 1bf5c5f
  323127: 5e3deba
  323119: 3c57fea
  323103: df03cac
  323071: a69bee5
v: v3
  • Loading branch information
Linus Torvalds committed Sep 23, 2012
1 parent 3b43fed commit 61f6bc5
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 21 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5f0ecb907deb1e6f28071ee3bd568903b9da1be4
refs/heads/master: 0737c8d7aedfe590010e38c3e3bbdc87affa8c3d
57 changes: 39 additions & 18 deletions trunk/drivers/edac/edac_mc.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,36 @@ void *edac_align_ptr(void **p, unsigned size, int n_elems)
return (void *)(((unsigned long)ptr) + align - r);
}

static void _edac_mc_free(struct mem_ctl_info *mci)
{
int i, chn, row;
struct csrow_info *csr;
const unsigned int tot_dimms = mci->tot_dimms;
const unsigned int tot_channels = mci->num_cschannel;
const unsigned int tot_csrows = mci->nr_csrows;

if (mci->dimms) {
for (i = 0; i < tot_dimms; i++)
kfree(mci->dimms[i]);
kfree(mci->dimms);
}
if (mci->csrows) {
for (row = 0; row < tot_csrows; row++) {
csr = mci->csrows[row];
if (csr) {
if (csr->channels) {
for (chn = 0; chn < tot_channels; chn++)
kfree(csr->channels[chn]);
kfree(csr->channels);
}
kfree(csr);
}
}
kfree(mci->csrows);
}
kfree(mci);
}

/**
* edac_mc_alloc: Allocate and partially fill a struct mem_ctl_info structure
* @mc_num: Memory controller number
Expand Down Expand Up @@ -413,24 +443,7 @@ struct mem_ctl_info *edac_mc_alloc(unsigned mc_num,
return mci;

error:
if (mci->dimms) {
for (i = 0; i < tot_dimms; i++)
kfree(mci->dimms[i]);
kfree(mci->dimms);
}
if (mci->csrows) {
for (chn = 0; chn < tot_channels; chn++) {
csr = mci->csrows[chn];
if (csr) {
for (chn = 0; chn < tot_channels; chn++)
kfree(csr->channels[chn]);
kfree(csr);
}
kfree(mci->csrows[i]);
}
kfree(mci->csrows);
}
kfree(mci);
_edac_mc_free(mci);

return NULL;
}
Expand All @@ -445,6 +458,14 @@ void edac_mc_free(struct mem_ctl_info *mci)
{
edac_dbg(1, "\n");

/* If we're not yet registered with sysfs free only what was allocated
* in edac_mc_alloc().
*/
if (!device_is_registered(&mci->dev)) {
_edac_mc_free(mci);
return;
}

/* the mci instance is freed here, when the sysfs object is dropped */
edac_unregister_sysfs(mci);
}
Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/scsi/bnx2i/bnx2i_hwi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1264,6 +1264,9 @@ int bnx2i_send_fw_iscsi_init_msg(struct bnx2i_hba *hba)
int rc = 0;
u64 mask64;

memset(&iscsi_init, 0x00, sizeof(struct iscsi_kwqe_init1));
memset(&iscsi_init2, 0x00, sizeof(struct iscsi_kwqe_init2));

bnx2i_adjust_qp_size(hba);

iscsi_init.flags =
Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/scsi/hpsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -1315,8 +1315,9 @@ static void complete_scsi_command(struct CommandList *cp)
}
break;
case CMD_PROTOCOL_ERR:
cmd->result = DID_ERROR << 16;
dev_warn(&h->pdev->dev, "cp %p has "
"protocol error \n", cp);
"protocol error\n", cp);
break;
case CMD_HARDWARE_ERR:
cmd->result = DID_ERROR << 16;
Expand Down
7 changes: 7 additions & 0 deletions trunk/drivers/scsi/mpt2sas/mpt2sas_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -1209,6 +1209,13 @@ _base_check_enable_msix(struct MPT2SAS_ADAPTER *ioc)
u16 message_control;


/* Check whether controller SAS2008 B0 controller,
if it is SAS2008 B0 controller use IO-APIC instead of MSIX */
if (ioc->pdev->device == MPI2_MFGPAGE_DEVID_SAS2008 &&
ioc->pdev->revision == 0x01) {
return -EINVAL;
}

base = pci_find_capability(ioc->pdev, PCI_CAP_ID_MSIX);
if (!base) {
dfailprintk(ioc, printk(MPT2SAS_INFO_FMT "msix not "
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/scsi/virtio_scsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ static void virtscsi_map_sgl(struct scatterlist *sg, unsigned int *p_idx,
int i;

for_each_sg(table->sgl, sg_elem, table->nents, i)
sg_set_buf(&sg[idx++], sg_virt(sg_elem), sg_elem->length);
sg[idx++] = *sg_elem;

*p_idx = idx;
}
Expand Down

0 comments on commit 61f6bc5

Please sign in to comment.