Lines Matching refs:TW_Q_LENGTH
422 if ((tw_dev->error_index + 1) == TW_Q_LENGTH) in twa_aen_queue_event()
424 tw_dev->error_index = (tw_dev->error_index + 1 ) % TW_Q_LENGTH; in twa_aen_queue_event()
527 cpu_addr = pci_alloc_consistent(tw_dev->tw_pci_dev, size*TW_Q_LENGTH, &dma_handle); in twa_allocate_memory()
535 pci_free_consistent(tw_dev->tw_pci_dev, size*TW_Q_LENGTH, cpu_addr, dma_handle); in twa_allocate_memory()
539 memset(cpu_addr, 0, size*TW_Q_LENGTH); in twa_allocate_memory()
541 for (i = 0; i < TW_Q_LENGTH; i++) { in twa_allocate_memory()
763 event_index = (tw_dev->error_index - 1 + TW_Q_LENGTH) % TW_Q_LENGTH; in twa_chrdev_ioctl()
804 …ex = (start_index + sequence_id - tw_dev->event_queue[start_index]->sequence_id + 1) % TW_Q_LENGTH; in twa_chrdev_ioctl()
833 …ex = (start_index + sequence_id - tw_dev->event_queue[start_index]->sequence_id - 1) % TW_Q_LENGTH; in twa_chrdev_ioctl()
1033 sizeof(TW_Command_Full)*TW_Q_LENGTH, in twa_free_device_extension()
1039 TW_SECTOR_SIZE*TW_Q_LENGTH, in twa_free_device_extension()
1051 tw_dev->free_tail = (tw_dev->free_tail + 1) % TW_Q_LENGTH; in twa_free_request_id()
1101 tw_dev->free_head = (tw_dev->free_head + 1) % TW_Q_LENGTH; in twa_get_request_id()
1187 tw_dev->event_queue[0] = kcalloc(TW_Q_LENGTH, sizeof(TW_Event), GFP_KERNEL); in twa_initialize_device_extension()
1194 for (i = 0; i < TW_Q_LENGTH; i++) { in twa_initialize_device_extension()
1280 tw_dev->pending_head = (tw_dev->pending_head + 1) % TW_Q_LENGTH; in twa_interrupt()
1547 tw_dev->pending_tail = (tw_dev->pending_tail + 1) % TW_Q_LENGTH; in twa_post_command_packet()
1589 for (i = 0; i < TW_Q_LENGTH; i++) { in twa_reset_device_extension()
1605 for (i = 0; i < TW_Q_LENGTH; i++) { in twa_reset_device_extension()
1991 .can_queue = TW_Q_LENGTH-2,