Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 199362
b: refs/heads/master
c: 7e3a1f4
h: refs/heads/master
v: v3
  • Loading branch information
Ralph Campbell authored and Roland Dreier committed May 26, 2010
1 parent 10a3f56 commit b01e9b7
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 16 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: e642df6a0be93316c0a886766057c4cc510c123d
refs/heads/master: 7e3a1f4ab1a550dd6cf62a23aabedbad0d23e2d7
11 changes: 8 additions & 3 deletions trunk/drivers/infiniband/core/ucm.c
Original file line number Diff line number Diff line change
Expand Up @@ -706,9 +706,14 @@ static int ib_ucm_alloc_data(const void **dest, u64 src, u32 len)
if (!len)
return 0;

data = memdup_user((void __user *)(unsigned long)src, len);
if (IS_ERR(data))
return PTR_ERR(data);
data = kmalloc(len, GFP_KERNEL);
if (!data)
return -ENOMEM;

if (copy_from_user(data, (void __user *)(unsigned long)src, len)) {
kfree(data);
return -EFAULT;
}

*dest = data;
return 0;
Expand Down
12 changes: 0 additions & 12 deletions trunk/drivers/infiniband/hw/qib/qib_iba6120.c
Original file line number Diff line number Diff line change
Expand Up @@ -3475,14 +3475,6 @@ struct qib_devdata *qib_init_iba6120_funcs(struct pci_dev *pdev,
struct qib_devdata *dd;
int ret;

#ifndef CONFIG_PCI_MSI
qib_early_err(&pdev->dev, "QLogic PCIE device 0x%x cannot "
"work if CONFIG_PCI_MSI is not enabled\n",
ent->device);
dd = ERR_PTR(-ENODEV);
goto bail;
#endif

dd = qib_alloc_devdata(pdev, sizeof(struct qib_pportdata) +
sizeof(struct qib_chip_specific));
if (IS_ERR(dd))
Expand Down Expand Up @@ -3554,10 +3546,6 @@ struct qib_devdata *qib_init_iba6120_funcs(struct pci_dev *pdev,
if (qib_mini_init)
goto bail;

#ifndef CONFIG_PCI_MSI
qib_dev_err(dd, "PCI_MSI not configured, NO interrupts\n");
#endif

if (qib_pcie_params(dd, 8, NULL, NULL))
qib_dev_err(dd, "Failed to setup PCIe or interrupts; "
"continuing anyway\n");
Expand Down
6 changes: 6 additions & 0 deletions trunk/drivers/infiniband/hw/qib/qib_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -1237,7 +1237,13 @@ static int __devinit qib_init_one(struct pci_dev *pdev,
*/
switch (ent->device) {
case PCI_DEVICE_ID_QLOGIC_IB_6120:
#ifdef CONFIG_PCI_MSI
dd = qib_init_iba6120_funcs(pdev, ent);
#else
qib_early_err(&pdev->dev, "QLogic PCIE device 0x%x cannot "
"work if CONFIG_PCI_MSI is not enabled\n",
ent->device);
#endif
break;

case PCI_DEVICE_ID_QLOGIC_IB_7220:
Expand Down

0 comments on commit b01e9b7

Please sign in to comment.