Lines Matching refs:circularQ
1275 * @circularQ: the inbound queue we want to transfer to HBA.
1279 int pm8001_mpi_msg_free_get(struct inbound_queue_table *circularQ,
1293 consumer_index = pm8001_read_32(circularQ->ci_virt);
1294 circularQ->consumer_index = cpu_to_le32(consumer_index);
1295 if (((circularQ->producer_idx + bcCount) % PM8001_MPI_QUEUE) ==
1296 le32_to_cpu(circularQ->consumer_index)) {
1301 offset = circularQ->producer_idx * messageSize;
1303 circularQ->producer_idx = (circularQ->producer_idx + bcCount)
1307 msgHeader = (struct mpi_msg_hdr *)(circularQ->base_virt + offset);
1329 struct inbound_queue_table *circularQ = &pm8001_ha->inbnd_q_tbl[q_index];
1334 circularQ->producer_idx, le32_to_cpu(circularQ->consumer_index));
1339 spin_lock_irqsave(&circularQ->iq_lock, flags);
1340 rv = pm8001_mpi_msg_free_get(circularQ, pm8001_ha->iomb_size,
1362 pm8001_cw32(pm8001_ha, circularQ->pi_pci_bar,
1363 circularQ->pi_offset, circularQ->producer_idx);
1366 responseQueue, opCode, circularQ->producer_idx,
1367 circularQ->consumer_index);
1369 spin_unlock_irqrestore(&circularQ->iq_lock, flags);
1374 struct outbound_queue_table *circularQ, u8 bc)
1381 pOutBoundMsgHeader = (struct mpi_msg_hdr *)(circularQ->base_virt +
1382 circularQ->consumer_idx * pm8001_ha->iomb_size);
1386 circularQ->consumer_idx, msgHeader);
1389 producer_index = pm8001_read_32(circularQ->pi_virt);
1390 circularQ->producer_index = cpu_to_le32(producer_index);
1393 circularQ->consumer_idx,
1394 circularQ->producer_index, msgHeader);
1398 circularQ->consumer_idx = (circularQ->consumer_idx + bc)
1401 pm8001_cw32(pm8001_ha, circularQ->ci_pci_bar, circularQ->ci_offset,
1402 circularQ->consumer_idx);
1404 producer_index = pm8001_read_32(circularQ->pi_virt);
1405 circularQ->producer_index = cpu_to_le32(producer_index);
1407 circularQ->consumer_idx, circularQ->producer_index);
1415 * @circularQ: the outbound queue table.
1420 struct outbound_queue_table *circularQ,
1428 if (le32_to_cpu(circularQ->producer_index)
1429 != circularQ->consumer_idx) {
1432 (circularQ->base_virt +
1433 circularQ->consumer_idx * pm8001_ha->iomb_size);
1439 msgHeader_tmp, circularQ->consumer_idx,
1440 circularQ->producer_index);
1451 circularQ->consumer_idx,
1452 circularQ->producer_index,
1456 circularQ->consumer_idx =
1457 (circularQ->consumer_idx +
1465 circularQ->ci_pci_bar,
1466 circularQ->ci_offset,
1467 circularQ->consumer_idx);
1470 circularQ->consumer_idx =
1471 (circularQ->consumer_idx +
1477 pm8001_cw32(pm8001_ha, circularQ->ci_pci_bar,
1478 circularQ->ci_offset,
1479 circularQ->consumer_idx);
1484 void *pi_virt = circularQ->pi_virt;
1493 circularQ->producer_index = cpu_to_le32(producer_index);
1495 } while (le32_to_cpu(circularQ->producer_index) !=
1496 circularQ->consumer_idx);
3906 struct outbound_queue_table *circularQ;
3913 circularQ = &pm8001_ha->outbnd_q_tbl[vec];
3915 ret = pm8001_mpi_msg_consume(pm8001_ha, circularQ, &pMsg1, &bc);
3921 circularQ, bc);
3925 circularQ->producer_index =
3926 cpu_to_le32(pm8001_read_32(circularQ->pi_virt));
3927 if (le32_to_cpu(circularQ->producer_index) ==
3928 circularQ->consumer_idx)