Lines Matching refs:bytes

352 	const void *buf, unsigned int bytes, u64 *bytes_written)
358 ps3_mm_phys_to_lpar(__pa(buf)), bytes, bytes_written);
369 *bytes_written, bytes, priv->stats.bytes_written);
382 unsigned int bytes, u64 *bytes_read)
387 dev_dbg(&dev->core, "%s:%d: %xh\n", __func__, __LINE__, bytes);
390 ps3_mm_phys_to_lpar(__pa(buf)), bytes, bytes_read);
401 *bytes_read, bytes, priv->stats.bytes_read);
407 * ps3_vuart_clear_rx_bytes - Discard bytes received.
409 * @bytes: Max byte count to discard, zero = all pending.
415 unsigned int bytes)
426 bytes = bytes ? min(bytes, (unsigned int)bytes_waiting) : bytes_waiting;
428 dev_dbg(&dev->core, "%s:%d: %u\n", __func__, __LINE__, bytes);
430 if (!bytes)
435 bytes += 128;
437 tmp = kmalloc(bytes, GFP_KERNEL);
442 ps3_vuart_raw_read(dev, tmp, bytes, &bytes_waiting);
446 /* Don't include these bytes in the stats. */
475 unsigned int bytes)
483 dev_dbg(&dev->core, "%s:%d: %u(%xh) bytes\n", __func__, __LINE__,
484 bytes, bytes);
491 result = ps3_vuart_raw_write(dev, buf, bytes, &bytes_written);
502 if (bytes_written == bytes) {
503 dev_dbg(&dev->core, "%s:%d: wrote %xh bytes\n",
504 __func__, __LINE__, bytes);
508 bytes -= bytes_written;
513 lb = kmalloc(sizeof(struct list_buffer) + bytes, GFP_KERNEL);
518 memcpy(lb->data, buf, bytes);
520 lb->tail = lb->data + bytes;
528 dev_dbg(&dev->core, "%s:%d: queued buf_%lu, %xh bytes\n",
529 __func__, __LINE__, lb->dbg_number, bytes);
536 * ps3_vuart_queue_rx_bytes - Queue waiting bytes into the buffer list.
538 * @bytes_queued: Number of bytes queued to the buffer list.
550 u64 bytes;
554 result = ps3_vuart_get_rx_bytes_waiting(dev, &bytes);
560 if (!bytes)
565 bytes += 128;
567 lb = kmalloc(sizeof(struct list_buffer) + bytes, GFP_ATOMIC);
572 ps3_vuart_raw_read(dev, lb->data, bytes, &bytes);
575 lb->tail = lb->data + bytes;
579 priv->rx_list.bytes_held += bytes;
581 dev_dbg(&dev->core, "%s:%d: buf_%lu: queued %llxh bytes\n",
582 __func__, __LINE__, lb->dbg_number, bytes);
584 *bytes_queued = bytes;
592 * Queue data waiting at the port, and if enough bytes to satisfy the request
593 * are held in the buffer list those bytes are dequeued and copied to the
595 * be statified by bytes held in the list buffers -EAGAIN is returned.
599 unsigned int bytes)
607 dev_dbg(&dev->core, "%s:%d: %u(%xh) bytes\n", __func__, __LINE__,
608 bytes, bytes);
612 /* Queue rx bytes here for polled reads. */
614 while (priv->rx_list.bytes_held < bytes) {
619 dev_dbg(&dev->core, "%s:%d: starved for %lxh bytes\n",
621 bytes - priv->rx_list.bytes_held);
628 bytes_read = min((unsigned int)(lb->tail - lb->head), bytes);
632 bytes -= bytes_read;
638 "bytes\n", __func__, __LINE__, lb->dbg_number,
645 "bytes\n", __func__, __LINE__, lb->dbg_number,
672 int ps3_vuart_read_async(struct ps3_system_bus_device *dev, unsigned int bytes)
683 BUG_ON(!bytes);
686 if (priv->rx_list.bytes_held >= bytes) {
687 dev_dbg(&dev->core, "%s:%d: schedule_work %xh bytes\n",
688 __func__, __LINE__, bytes);
694 priv->rx_list.work.trigger = bytes;
697 dev_dbg(&dev->core, "%s:%d: waiting for %u(%xh) bytes\n", __func__,
698 __LINE__, bytes, bytes);
749 "%s:%d cleared buf_%lu, %llxh bytes\n",
765 dev_dbg(&dev->core, "%s:%d wrote %lxh bytes total\n",
783 u64 bytes;
788 result = ps3_vuart_queue_rx_bytes(dev, &bytes);
797 dev_dbg(&dev->core, "%s:%d: schedule_work %lxh bytes\n",