Lines Matching refs:TW_Q_LENGTH
178 if (queue_depth > TW_Q_LENGTH-2)
179 queue_depth = TW_Q_LENGTH-2;
403 if ((tw_dev->error_index + 1) == TW_Q_LENGTH)
405 tw_dev->error_index = (tw_dev->error_index + 1 ) % TW_Q_LENGTH;
508 cpu_addr = pci_alloc_consistent(tw_dev->tw_pci_dev, size*TW_Q_LENGTH, &dma_handle);
516 pci_free_consistent(tw_dev->tw_pci_dev, size*TW_Q_LENGTH, cpu_addr, dma_handle);
520 memset(cpu_addr, 0, size*TW_Q_LENGTH);
522 for (i = 0; i < TW_Q_LENGTH; i++) {
740 event_index = (tw_dev->error_index - 1 + TW_Q_LENGTH) % TW_Q_LENGTH;
781 event_index = (start_index + sequence_id - tw_dev->event_queue[start_index]->sequence_id + 1) % TW_Q_LENGTH;
810 event_index = (start_index + sequence_id - tw_dev->event_queue[start_index]->sequence_id - 1) % TW_Q_LENGTH;
1007 sizeof(TW_Command_Full)*TW_Q_LENGTH,
1013 TW_SECTOR_SIZE*TW_Q_LENGTH,
1025 tw_dev->free_tail = (tw_dev->free_tail + 1) % TW_Q_LENGTH;
1077 tw_dev->free_head = (tw_dev->free_head + 1) % TW_Q_LENGTH;
1163 tw_dev->event_queue[0] = kmalloc(sizeof(TW_Event) * TW_Q_LENGTH, GFP_KERNEL);
1169 memset(tw_dev->event_queue[0], 0, sizeof(TW_Event) * TW_Q_LENGTH);
1171 for (i = 0; i < TW_Q_LENGTH; i++) {
1258 tw_dev->pending_head = (tw_dev->pending_head + 1) % TW_Q_LENGTH;
1564 tw_dev->pending_tail = (tw_dev->pending_tail + 1) % TW_Q_LENGTH;
1605 for (i = 0; i < TW_Q_LENGTH; i++) {
1618 for (i = 0; i < TW_Q_LENGTH; i++) {
2040 .can_queue = TW_Q_LENGTH-2,