Skip to contentSkip to conversation

dev-serial: report when data are ready to be read

PATCH New Jean-Christophe PLAGNIOL-VILLARD 1 participant 1 message Dec 18, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dev-serial: report when data are ready to be read

So we can pull it on software without IRQ support

---
 hw/usb/dev-serial.c | 2 ++
 1 file changed, 2 insertions(+)
hw/usb/dev-serial.c +2 -0
index 500fbb0..4c14126 100644
@@ -321,6 +321,8 @@ static void usb_serial_handle_control(USBDevice *dev, USBPacket *p,
     case DeviceInVendor | FTDI_GET_MDM_ST:
         data[0] = usb_get_modem_lines(s) | 1;
         data[1] = 0;
+	if (s->recv_used)
+		data[1] |= FTDI_DR;
         p->actual_length = 2;
         break;
     case DeviceOutVendor | FTDI_SET_EVENT_CHR:
Signature · 1 line
2.1.3