• Home
  • Raw
  • Download

Lines Matching refs:mq

118 			void (*callback) (struct mapleq *mq),  in maple_getcond_callback()
136 struct mapleq *mq; in maple_release_device() local
140 mq = mdev->mq; in maple_release_device()
141 if (mq) { in maple_release_device()
142 if (mq->recvbufdcsp) in maple_release_device()
143 kmem_cache_free(maple_queue_cache, mq->recvbufdcsp); in maple_release_device()
144 kfree(mq); in maple_release_device()
145 mq = NULL; in maple_release_device()
166 locking = mutex_is_locked(&mdev->mq->mutex); in maple_add_packet()
172 mutex_lock(&mdev->mq->mutex); in maple_add_packet()
177 mutex_unlock(&mdev->mq->mutex); in maple_add_packet()
184 mdev->mq->command = command; in maple_add_packet()
185 mdev->mq->length = length; in maple_add_packet()
188 mdev->mq->sendbuf = sendbuf; in maple_add_packet()
190 list_add(&mdev->mq->list, &maple_waitq); in maple_add_packet()
213 locking = mutex_lock_interruptible(&mdev->mq->mutex); in maple_add_packet_sleeps()
222 mutex_unlock(&mdev->mq->mutex); in maple_add_packet_sleeps()
229 mdev->mq->command = command; in maple_add_packet_sleeps()
230 mdev->mq->length = length; in maple_add_packet_sleeps()
233 mdev->mq->sendbuf = sendbuf; in maple_add_packet_sleeps()
236 list_add(&mdev->mq->list, &maple_waitq); in maple_add_packet_sleeps()
245 struct mapleq *mq; in maple_allocq() local
247 mq = kmalloc(sizeof(*mq), GFP_KERNEL); in maple_allocq()
248 if (!mq) in maple_allocq()
251 mq->dev = mdev; in maple_allocq()
252 mq->recvbufdcsp = kmem_cache_zalloc(maple_queue_cache, GFP_KERNEL); in maple_allocq()
253 mq->recvbuf = (void *) P2SEGADDR(mq->recvbufdcsp); in maple_allocq()
254 if (!mq->recvbuf) in maple_allocq()
261 mutex_init(&mq->mutex); in maple_allocq()
263 return mq; in maple_allocq()
266 kfree(mq); in maple_allocq()
281 mdev->mq = maple_allocq(mdev); in maple_alloc_dev()
283 if (!mdev->mq) { in maple_alloc_dev()
296 if (mdev->mq) { in maple_free_dev()
297 if (mdev->mq->recvbufdcsp) in maple_free_dev()
299 mdev->mq->recvbufdcsp); in maple_free_dev()
300 kfree(mdev->mq); in maple_free_dev()
308 static void maple_build_block(struct mapleq *mq) in maple_build_block() argument
311 unsigned long *lsendbuf = mq->sendbuf; in maple_build_block()
313 port = mq->dev->port & 3; in maple_build_block()
314 unit = mq->dev->unit; in maple_build_block()
315 len = mq->length; in maple_build_block()
323 *maple_sendptr++ = PHYSADDR(mq->recvbuf); in maple_build_block()
325 mq->command | (to << 8) | (from << 16) | (len << 24); in maple_build_block()
334 struct mapleq *mq, *nmq; in maple_send() local
347 list_for_each_entry_safe(mq, nmq, &maple_waitq, list) { in maple_send()
348 maple_build_block(mq); in maple_send()
349 list_move(&mq->list, &maple_sentq); in maple_send()
390 recvbuf = mdev->mq->recvbuf; in maple_attach_driver()
568 struct mapleq *mq) in maple_response_none() argument
571 list_del(&mq->list); in maple_response_none()
628 if (mutex_is_locked(&mdev->mq->mutex)) in maple_port_rescan()
629 mutex_unlock(&mdev->mq->mutex); in maple_port_rescan()
639 struct mapleq *mq, *nmq; in maple_dma_handler() local
648 list_for_each_entry_safe(mq, nmq, &maple_sentq, list) { in maple_dma_handler()
649 recvbuf = mq->recvbuf; in maple_dma_handler()
651 dev = mq->dev; in maple_dma_handler()
652 kfree(mq->sendbuf); in maple_dma_handler()
653 mutex_unlock(&mq->mutex); in maple_dma_handler()
654 list_del_init(&mq->list); in maple_dma_handler()
658 maple_response_none(dev, mq); in maple_dma_handler()
667 dev->callback(mq); in maple_dma_handler()