Lines Matching refs:bytes
352 const void *buf, unsigned int bytes, u64 *bytes_written) in ps3_vuart_raw_write() argument
358 ps3_mm_phys_to_lpar(__pa(buf)), bytes, bytes_written); in ps3_vuart_raw_write()
369 *bytes_written, bytes, priv->stats.bytes_written); in ps3_vuart_raw_write()
382 unsigned int bytes, u64 *bytes_read) in ps3_vuart_raw_read() argument
387 dev_dbg(&dev->core, "%s:%d: %xh\n", __func__, __LINE__, bytes); in ps3_vuart_raw_read()
390 ps3_mm_phys_to_lpar(__pa(buf)), bytes, bytes_read); in ps3_vuart_raw_read()
401 *bytes_read, bytes, priv->stats.bytes_read); in ps3_vuart_raw_read()
415 unsigned int bytes) in ps3_vuart_clear_rx_bytes() argument
426 bytes = bytes ? min(bytes, (unsigned int)bytes_waiting) : bytes_waiting; in ps3_vuart_clear_rx_bytes()
428 dev_dbg(&dev->core, "%s:%d: %u\n", __func__, __LINE__, bytes); in ps3_vuart_clear_rx_bytes()
430 if (!bytes) in ps3_vuart_clear_rx_bytes()
435 bytes += 128; in ps3_vuart_clear_rx_bytes()
437 tmp = kmalloc(bytes, GFP_KERNEL); in ps3_vuart_clear_rx_bytes()
442 ps3_vuart_raw_read(dev, tmp, bytes, &bytes_waiting); in ps3_vuart_clear_rx_bytes()
475 unsigned int bytes) in ps3_vuart_write() argument
484 bytes, bytes); in ps3_vuart_write()
491 result = ps3_vuart_raw_write(dev, buf, bytes, &bytes_written); in ps3_vuart_write()
502 if (bytes_written == bytes) { in ps3_vuart_write()
504 __func__, __LINE__, bytes); in ps3_vuart_write()
508 bytes -= bytes_written; in ps3_vuart_write()
513 lb = kmalloc(sizeof(struct list_buffer) + bytes, GFP_KERNEL); in ps3_vuart_write()
518 memcpy(lb->data, buf, bytes); in ps3_vuart_write()
520 lb->tail = lb->data + bytes; in ps3_vuart_write()
529 __func__, __LINE__, lb->dbg_number, bytes); in ps3_vuart_write()
550 u64 bytes; in ps3_vuart_queue_rx_bytes() local
554 result = ps3_vuart_get_rx_bytes_waiting(dev, &bytes); in ps3_vuart_queue_rx_bytes()
560 if (!bytes) in ps3_vuart_queue_rx_bytes()
565 bytes += 128; in ps3_vuart_queue_rx_bytes()
567 lb = kmalloc(sizeof(struct list_buffer) + bytes, GFP_ATOMIC); in ps3_vuart_queue_rx_bytes()
572 ps3_vuart_raw_read(dev, lb->data, bytes, &bytes); in ps3_vuart_queue_rx_bytes()
575 lb->tail = lb->data + bytes; in ps3_vuart_queue_rx_bytes()
579 priv->rx_list.bytes_held += bytes; in ps3_vuart_queue_rx_bytes()
582 __func__, __LINE__, lb->dbg_number, bytes); in ps3_vuart_queue_rx_bytes()
584 *bytes_queued = bytes; in ps3_vuart_queue_rx_bytes()
599 unsigned int bytes) in ps3_vuart_read() argument
608 bytes, bytes); in ps3_vuart_read()
614 while (priv->rx_list.bytes_held < bytes) { in ps3_vuart_read()
621 bytes - priv->rx_list.bytes_held); in ps3_vuart_read()
628 bytes_read = min((unsigned int)(lb->tail - lb->head), bytes); in ps3_vuart_read()
632 bytes -= bytes_read; in ps3_vuart_read()
672 int ps3_vuart_read_async(struct ps3_system_bus_device *dev, unsigned int bytes) in ps3_vuart_read_async() argument
683 BUG_ON(!bytes); in ps3_vuart_read_async()
686 if (priv->rx_list.bytes_held >= bytes) { in ps3_vuart_read_async()
688 __func__, __LINE__, bytes); in ps3_vuart_read_async()
694 priv->rx_list.work.trigger = bytes; in ps3_vuart_read_async()
698 __LINE__, bytes, bytes); in ps3_vuart_read_async()
783 u64 bytes; in ps3_vuart_handle_interrupt_rx() local
788 result = ps3_vuart_queue_rx_bytes(dev, &bytes); in ps3_vuart_handle_interrupt_rx()