aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rapidio
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/rapidio')
-rw-r--r--drivers/rapidio/devices/tsi721.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/rapidio/devices/tsi721.c b/drivers/rapidio/devices/tsi721.c
index fc22b93e0924..d5e1625bbac2 100644
--- a/drivers/rapidio/devices/tsi721.c
+++ b/drivers/rapidio/devices/tsi721.c
@@ -435,6 +435,9 @@ static void tsi721_db_dpc(struct work_struct *work)
435 " info %4.4x\n", DBELL_SID(idb.bytes), 435 " info %4.4x\n", DBELL_SID(idb.bytes),
436 DBELL_TID(idb.bytes), DBELL_INF(idb.bytes)); 436 DBELL_TID(idb.bytes), DBELL_INF(idb.bytes));
437 } 437 }
438
439 wr_ptr = ioread32(priv->regs +
440 TSI721_IDQ_WP(IDB_QUEUE)) % IDB_QSIZE;
438 } 441 }
439 442
440 iowrite32(rd_ptr & (IDB_QSIZE - 1), 443 iowrite32(rd_ptr & (IDB_QSIZE - 1),
@@ -445,6 +448,10 @@ static void tsi721_db_dpc(struct work_struct *work)
445 regval |= TSI721_SR_CHINT_IDBQRCV; 448 regval |= TSI721_SR_CHINT_IDBQRCV;
446 iowrite32(regval, 449 iowrite32(regval,
447 priv->regs + TSI721_SR_CHINTE(IDB_QUEUE)); 450 priv->regs + TSI721_SR_CHINTE(IDB_QUEUE));
451
452 wr_ptr = ioread32(priv->regs + TSI721_IDQ_WP(IDB_QUEUE)) % IDB_QSIZE;
453 if (wr_ptr != rd_ptr)
454 schedule_work(&priv->idb_work);
448} 455}
449 456
450/** 457/**
@@ -2212,7 +2219,6 @@ static int __devinit tsi721_probe(struct pci_dev *pdev,
2212 const struct pci_device_id *id) 2219 const struct pci_device_id *id)
2213{ 2220{
2214 struct tsi721_device *priv; 2221 struct tsi721_device *priv;
2215 int i;
2216 int err; 2222 int err;
2217 2223
2218 priv = kzalloc(sizeof(struct tsi721_device), GFP_KERNEL); 2224 priv = kzalloc(sizeof(struct tsi721_device), GFP_KERNEL);
@@ -2231,12 +2237,15 @@ static int __devinit tsi721_probe(struct pci_dev *pdev,
2231 priv->pdev = pdev; 2237 priv->pdev = pdev;
2232 2238
2233#ifdef DEBUG 2239#ifdef DEBUG
2240 {
2241 int i;
2234 for (i = 0; i <= PCI_STD_RESOURCE_END; i++) { 2242 for (i = 0; i <= PCI_STD_RESOURCE_END; i++) {
2235 dev_dbg(&pdev->dev, "res[%d] @ 0x%llx (0x%lx, 0x%lx)\n", 2243 dev_dbg(&pdev->dev, "res[%d] @ 0x%llx (0x%lx, 0x%lx)\n",
2236 i, (unsigned long long)pci_resource_start(pdev, i), 2244 i, (unsigned long long)pci_resource_start(pdev, i),
2237 (unsigned long)pci_resource_len(pdev, i), 2245 (unsigned long)pci_resource_len(pdev, i),
2238 pci_resource_flags(pdev, i)); 2246 pci_resource_flags(pdev, i));
2239 } 2247 }
2248 }
2240#endif 2249#endif
2241 /* 2250 /*
2242 * Verify BAR configuration 2251 * Verify BAR configuration