Lines Matching defs:buffer

222 		 * Note: we have allocated the buffer with GFP_DMA, so
277 * Note: we have allocated the buffer with GFP_DMA, so
581 * Get empty buffer.
603 struct lcs_buffer *buffer;
608 buffer = __lcs_get_buffer(channel);
610 return buffer;
640 * Make a buffer ready for processing.
649 /* Check if we may clear the suspend bit of this buffer. */
653 /* Suspend bit of the previous buffer is not set. */
655 /* Suspend bit of the next buffer is set. */
661 lcs_ready_buffer(struct lcs_channel *channel, struct lcs_buffer *buffer)
667 BUG_ON(buffer->state != LCS_BUF_STATE_LOCKED &&
668 buffer->state != LCS_BUF_STATE_PROCESSED);
670 buffer->state = LCS_BUF_STATE_READY;
671 index = buffer - channel->iob;
673 channel->ccws[index].count = buffer->count;
682 * Mark the buffer as processed. Take care of the suspend bit
683 * of the previous buffer. This function is called from
687 __lcs_processed_buffer(struct lcs_channel *channel, struct lcs_buffer *buffer)
692 BUG_ON(buffer->state != LCS_BUF_STATE_READY);
693 buffer->state = LCS_BUF_STATE_PROCESSED;
694 index = buffer - channel->iob;
697 /* Set the suspend bit and clear the PCI bit of this buffer. */
700 /* Check the suspend bit of the previous buffer. */
703 * Previous buffer is in state ready. It might have
710 /* Clear PCI bit of next buffer. */
716 * Put a processed buffer back to state empty.
719 lcs_release_buffer(struct lcs_channel *channel, struct lcs_buffer *buffer)
724 BUG_ON(buffer->state != LCS_BUF_STATE_LOCKED &&
725 buffer->state != LCS_BUF_STATE_PROCESSED);
727 buffer->state = LCS_BUF_STATE_EMPTY;
732 * Get buffer for a lan command.
737 struct lcs_buffer *buffer;
741 /* Get buffer and wait if none is available. */
743 ((buffer = lcs_get_buffer(&card->write)) != NULL));
745 *(__u16 *)(buffer->data + count) = 0;
746 buffer->count = count + sizeof(__u16);
747 buffer->callback = lcs_release_buffer;
748 cmd = (struct lcs_cmd *) buffer->data;
752 return buffer;
817 * Emit buffer of a lan command.
845 lcs_send_lancmd(struct lcs_card *card, struct lcs_buffer *buffer,
854 cmd = (struct lcs_cmd *) buffer->data;
866 buffer->callback = lcs_release_buffer;
867 rc = lcs_ready_buffer(&card->write, buffer);
886 struct lcs_buffer *buffer;
890 buffer = lcs_get_lancmd(card, LCS_STD_CMD_SIZE);
891 cmd = (struct lcs_cmd *) buffer->data;
895 return lcs_send_lancmd(card, buffer, NULL);
904 struct lcs_buffer *buffer;
908 buffer = lcs_get_lancmd(card, LCS_STD_CMD_SIZE);
909 cmd = (struct lcs_cmd *) buffer->data;
912 return lcs_send_lancmd(card, buffer, NULL);
928 struct lcs_buffer *buffer;
932 buffer = lcs_get_lancmd(card, LCS_STD_CMD_SIZE);
933 cmd = (struct lcs_cmd *) buffer->data;
939 return lcs_send_lancmd(card, buffer, __lcs_lanstat_cb);
948 struct lcs_buffer *buffer;
952 buffer = lcs_get_lancmd(card, LCS_STD_CMD_SIZE);
953 cmd = (struct lcs_cmd *) buffer->data;
958 return lcs_send_lancmd(card, buffer, NULL);
975 struct lcs_buffer *buffer;
979 buffer = lcs_get_lancmd(card, LCS_STD_CMD_SIZE);
980 cmd = (struct lcs_cmd *) buffer->data;
985 return lcs_send_lancmd(card, buffer, __lcs_send_startlan_cb);
995 struct lcs_buffer *buffer;
999 buffer = lcs_get_lancmd(card, LCS_MULTICAST_CMD_SIZE);
1000 cmd = (struct lcs_cmd *) buffer->data;
1010 return lcs_send_lancmd(card, buffer, NULL);
1019 struct lcs_buffer *buffer;
1023 buffer = lcs_get_lancmd(card, LCS_MULTICAST_CMD_SIZE);
1024 cmd = (struct lcs_cmd *) buffer->data;
1034 return lcs_send_lancmd(card, buffer, NULL);
1053 struct lcs_buffer *buffer;
1059 buffer = lcs_get_lancmd(card, LCS_STD_CMD_SIZE);
1060 cmd = (struct lcs_cmd *) buffer->data;
1067 rc = lcs_send_lancmd(card, buffer, __lcs_check_multicast_cb);
1480 * Finish current tx buffer and make it ready for transmit.
1497 lcs_txbuffer_cb(struct lcs_channel *channel, struct lcs_buffer *buffer)
1502 /* Put buffer back to pool. */
1503 lcs_release_buffer(channel, buffer);
1511 * Last running tx buffer has finished. Submit partially
1512 * filled current buffer.
1549 /* skb too big for current tx buffer. */
1552 /* Get new tx buffer */
1576 /* If this is the first tx buffer emit it immediately. */
1767 " Allocating a socket buffer to interface %s failed\n",
1785 lcs_get_frames_cb(struct lcs_channel *channel, struct lcs_buffer *buffer)
1792 lcs_hdr = (struct lcs_header *) buffer->data;
1825 lcs_hdr = (struct lcs_header *) (buffer->data + offset);
1827 /* The buffer is now empty. Make it ready again. */
1828 lcs_ready_buffer(&card->read, buffer);