Lines Matching refs:bytes
364 const void *buf, unsigned int bytes, u64 *bytes_written) in ps3_vuart_raw_write() argument
370 ps3_mm_phys_to_lpar(__pa(buf)), bytes, bytes_written); in ps3_vuart_raw_write()
381 *bytes_written, bytes, priv->stats.bytes_written); in ps3_vuart_raw_write()
394 unsigned int bytes, u64 *bytes_read) in ps3_vuart_raw_read() argument
399 dev_dbg(&dev->core, "%s:%d: %xh\n", __func__, __LINE__, bytes); in ps3_vuart_raw_read()
402 ps3_mm_phys_to_lpar(__pa(buf)), bytes, bytes_read); in ps3_vuart_raw_read()
413 *bytes_read, bytes, priv->stats.bytes_read); in ps3_vuart_raw_read()
427 unsigned int bytes) in ps3_vuart_clear_rx_bytes() argument
438 bytes = bytes ? min(bytes, (unsigned int)bytes_waiting) : bytes_waiting; in ps3_vuart_clear_rx_bytes()
440 dev_dbg(&dev->core, "%s:%d: %u\n", __func__, __LINE__, bytes); in ps3_vuart_clear_rx_bytes()
442 if (!bytes) in ps3_vuart_clear_rx_bytes()
447 bytes += 128; in ps3_vuart_clear_rx_bytes()
449 tmp = kmalloc(bytes, GFP_KERNEL); in ps3_vuart_clear_rx_bytes()
454 ps3_vuart_raw_read(dev, tmp, bytes, &bytes_waiting); in ps3_vuart_clear_rx_bytes()
487 unsigned int bytes) in ps3_vuart_write() argument
496 bytes, bytes); in ps3_vuart_write()
503 result = ps3_vuart_raw_write(dev, buf, bytes, &bytes_written); in ps3_vuart_write()
514 if (bytes_written == bytes) { in ps3_vuart_write()
516 __func__, __LINE__, bytes); in ps3_vuart_write()
520 bytes -= bytes_written; in ps3_vuart_write()
525 lb = kmalloc(sizeof(struct list_buffer) + bytes, GFP_KERNEL); in ps3_vuart_write()
530 memcpy(lb->data, buf, bytes); in ps3_vuart_write()
532 lb->tail = lb->data + bytes; in ps3_vuart_write()
541 __func__, __LINE__, lb->dbg_number, bytes); in ps3_vuart_write()
562 u64 bytes; in ps3_vuart_queue_rx_bytes() local
566 result = ps3_vuart_get_rx_bytes_waiting(dev, &bytes); in ps3_vuart_queue_rx_bytes()
572 if (!bytes) in ps3_vuart_queue_rx_bytes()
577 bytes += 128; in ps3_vuart_queue_rx_bytes()
579 lb = kmalloc(sizeof(struct list_buffer) + bytes, GFP_ATOMIC); in ps3_vuart_queue_rx_bytes()
584 ps3_vuart_raw_read(dev, lb->data, bytes, &bytes); in ps3_vuart_queue_rx_bytes()
587 lb->tail = lb->data + bytes; in ps3_vuart_queue_rx_bytes()
591 priv->rx_list.bytes_held += bytes; in ps3_vuart_queue_rx_bytes()
594 __func__, __LINE__, lb->dbg_number, bytes); in ps3_vuart_queue_rx_bytes()
596 *bytes_queued = bytes; in ps3_vuart_queue_rx_bytes()
611 unsigned int bytes) in ps3_vuart_read() argument
620 bytes, bytes); in ps3_vuart_read()
626 while (priv->rx_list.bytes_held < bytes) { in ps3_vuart_read()
633 bytes - priv->rx_list.bytes_held); in ps3_vuart_read()
640 bytes_read = min((unsigned int)(lb->tail - lb->head), bytes); in ps3_vuart_read()
644 bytes -= bytes_read; in ps3_vuart_read()
684 int ps3_vuart_read_async(struct ps3_system_bus_device *dev, unsigned int bytes) in ps3_vuart_read_async() argument
695 BUG_ON(!bytes); in ps3_vuart_read_async()
698 if (priv->rx_list.bytes_held >= bytes) { in ps3_vuart_read_async()
700 __func__, __LINE__, bytes); in ps3_vuart_read_async()
706 priv->rx_list.work.trigger = bytes; in ps3_vuart_read_async()
710 __LINE__, bytes, bytes); in ps3_vuart_read_async()
795 u64 bytes; in ps3_vuart_handle_interrupt_rx() local
800 result = ps3_vuart_queue_rx_bytes(dev, &bytes); in ps3_vuart_handle_interrupt_rx()