Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 186521
b: refs/heads/master
c: a5c2524
h: refs/heads/master
i:
  186519: cf4972e
v: v3
  • Loading branch information
kirjanov@gmail.com authored and Greg Kroah-Hartman committed Mar 4, 2010
1 parent 0df0f9a commit 6d5ce66
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 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: 30ae835f89cac13156fdef84412870f3179f3f22
refs/heads/master: a5c252411f16dce1f9586090ffa8210273a4c8fb
23 changes: 18 additions & 5 deletions trunk/drivers/staging/slicoss/slicoss.c
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,7 @@ static int __devinit slic_entry_probe(struct pci_dev *pcidev,
ulong mmio_start = 0;
ulong mmio_len = 0;
struct sliccard *card = NULL;
int pci_using_dac = 0;

slic_global.dynamic_intagg = dynamic_intagg;

Expand All @@ -379,16 +380,26 @@ static int __devinit slic_entry_probe(struct pci_dev *pcidev,
printk(KERN_DEBUG "%s\n", slic_proc_version);
}

err = pci_set_dma_mask(pcidev, DMA_BIT_MASK(64));
if (err) {
err = pci_set_dma_mask(pcidev, DMA_BIT_MASK(32));
if (err)
if (!pci_set_dma_mask(pcidev, DMA_BIT_MASK(64))) {
pci_using_dac = 1;
if (pci_set_consistent_dma_mask(pcidev, DMA_BIT_MASK(64))) {
dev_err(&pcidev->dev, "unable to obtain 64-bit DMA for "
"consistent allocations\n");
goto err_out_disable_pci;
}
} else if (pci_set_dma_mask(pcidev, DMA_BIT_MASK(32))) {
pci_using_dac = 0;
pci_set_consistent_dma_mask(pcidev, DMA_BIT_MASK(32));
} else {
dev_err(&pcidev->dev, "no usable DMA configuration\n");
goto err_out_disable_pci;
}

err = pci_request_regions(pcidev, DRV_NAME);
if (err)
if (err) {
dev_err(&pcidev->dev, "can't obtain PCI resources\n");
goto err_out_disable_pci;
}

pci_set_master(pcidev);

Expand All @@ -404,6 +415,8 @@ static int __devinit slic_entry_probe(struct pci_dev *pcidev,
adapter = netdev_priv(netdev);
adapter->netdev = netdev;
adapter->pcidev = pcidev;
if (pci_using_dac)
netdev->features |= NETIF_F_HIGHDMA;

mmio_start = pci_resource_start(pcidev, 0);
mmio_len = pci_resource_len(pcidev, 0);
Expand Down

0 comments on commit 6d5ce66

Please sign in to comment.