aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rapidio/devices/tsi721.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/rapidio/devices/tsi721.c')
-rw-r--r--drivers/rapidio/devices/tsi721.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/rapidio/devices/tsi721.c b/drivers/rapidio/devices/tsi721.c
index 722246cf20ab..5d44252b7342 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,7 @@ 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, cap; 2222 int cap;
2216 int err; 2223 int err;
2217 u32 regval; 2224 u32 regval;
2218 2225
@@ -2232,12 +2239,15 @@ static int __devinit tsi721_probe(struct pci_dev *pdev,
2232 priv->pdev = pdev; 2239 priv->pdev = pdev;
2233 2240
2234#ifdef DEBUG 2241#ifdef DEBUG
2242 {
2243 int i;
2235 for (i = 0; i <= PCI_STD_RESOURCE_END; i++) { 2244 for (i = 0; i <= PCI_STD_RESOURCE_END; i++) {
2236 dev_dbg(&pdev->dev, "res[%d] @ 0x%llx (0x%lx, 0x%lx)\n", 2245 dev_dbg(&pdev->dev, "res[%d] @ 0x%llx (0x%lx, 0x%lx)\n",
2237 i, (unsigned long long)pci_resource_start(pdev, i), 2246 i, (unsigned long long)pci_resource_start(pdev, i),
2238 (unsigned long)pci_resource_len(pdev, i), 2247 (unsigned long)pci_resource_len(pdev, i),
2239 pci_resource_flags(pdev, i)); 2248 pci_resource_flags(pdev, i));
2240 } 2249 }
2250 }
2241#endif 2251#endif
2242 /* 2252 /*
2243 * Verify BAR configuration 2253 * Verify BAR configuration