Lines Matching defs:index
351 * @index: Index return
359 static int aac_get_entry (struct aac_dev * dev, u32 qid, struct aac_entry **entry, u32 * index, unsigned long *nonotify)
367 * set the index back to zero. This is a wrap. You could or off
373 idx = *index = le32_to_cpu(*(q->headers.producer));
387 if (*index >= ADAP_NORM_CMD_ENTRIES)
388 *index = 0; /* Wrap to front of the Producer Queue. */
390 if (*index >= ADAP_NORM_RESP_ENTRIES)
391 *index = 0; /* Wrap to front of the Producer Queue. */
395 if ((*index + 1) == le32_to_cpu(*(q->headers.consumer))) {
400 *entry = q->base + *index;
408 * @index: Returned index
417 * index is ready to insert on the queue when this routine returns
421 int aac_queue_get(struct aac_dev * dev, u32 * index, u32 qid, struct hw_fib * hw_fib, int wait, struct fib * fibptr, unsigned long *nonotify)
428 while (!aac_get_entry(dev, qid, &entry, index, nonotify)) {
437 while (!aac_get_entry(dev, qid, &entry, index, nonotify)) {
802 u32 index;
808 * The consumer index must be wrapped if we have reached
810 * pointed to by the header index
813 index = 0;
815 index = le32_to_cpu(*q->headers.consumer);
816 *entry = q->base + index;
912 u32 index;
922 aac_queue_get(dev, &index, AdapNormRespQueue, hw_fib, 1, NULL, &nointr);
923 *(q->headers.producer) = cpu_to_le32(index + 1);
1027 static inline int aac_aif_data(struct aac_aifcmd *aifcmd, uint32_t index)
1029 return le32_to_cpu(((__le32 *)aifcmd->data)[index]);
1477 int index, quirks;
1518 for (index = 0; index < num_of_fibs; index++) {
1520 struct fib *fib = &aac->fibs[index];
1541 index = aac->cardtype;
1563 quirks = aac_get_driver_ident(index)->quirks;
1579 if ((retval = (*(aac_get_driver_ident(index)->init))(aac)))