Commit 4f9d515b authored by Jens Korinth's avatar Jens Korinth

Fix VC709 Platform

* fixed bug in bit_reload.sh
* fixed compile bug in newer kernel versions
* IRQs do not work! need to port MSI-X controller
parent 66e29471
......@@ -25,6 +25,7 @@
# init paths
DRIVER=ffLink
DRIVERPATH="$TAPASCO_HOME/platform/vc709/module"
BITLOAD_SCRIPT="$TAPASCO_HOME/platform/vc709/module/program_vc709.tcl"
LOG_ID=$DRIVER"|""pci"
......@@ -108,7 +109,7 @@ then
# reload driver?
if [ $RELOADD -gt 0 ]; then
sudo insmod $driver_path$driver_name".ko"
sudo insmod $DRIVERPATH/${DRIVER}.ko
sudo chown $USER /dev/FFLINK*
fi
......
......@@ -197,8 +197,7 @@ static int claim_msi(struct pci_dev *pdev)
int err = 0, i;
/* set up MSI interrupt vector to max size */
fflink_info("Have %d MSI vectors\n", pci_msi_vec_count(pdev));
err = pci_enable_msi_range(pdev, 1, pci_msi_vec_count(pdev));
err = pci_alloc_irq_vectors(pdev, 1, pci_msi_vec_count(pdev), PCI_IRQ_MSI);
if (err <= 0) {
fflink_warn("Cannot set MSI vector (%d)\n", err);
......@@ -223,7 +222,7 @@ static int claim_msi(struct pci_dev *pdev)
error_pci_req_irq:
for(i = i-1; i >= 0; i--)
free_irq(pci_data.irq_first + i, &pci_data);
pci_disable_msi(pci_data.pdev);
pci_free_irq_vectors(pci_data.pdev);
error_no_msi:
return -ENOSPC;
}
......@@ -361,7 +360,7 @@ static void fflink_pci_remove(struct pci_dev *pdev)
for(i = 0; i < pci_data.irq_assigned; i++)
free_irq(pci_data.irq_first + i, &pci_data);
pci_disable_msi(pci_data.pdev);
pci_free_irq_vectors(pci_data.pdev);
iounmap(pci_data.kvirt_addr_bar0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment