Skip to contentSkip to conversation

usb:ohci-hcd: submit_common_msg: report actual_length properly

PATCH Superseded Mateusz Kulikowski 2 participants 4 messages Oct 22, 2013 – Oct 28, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 usb:ohci-hcd: submit_common_msg: report actual_length properly

submit_common_msg should report amount of data passed from/to device. Instead, it always returned size requested by Host.

---
  drivers/usb/host/ohci-hcd.c |    2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/host/ohci-hcd.c +1 -1
index c33c487..8a9e5f4 100644
@@ -1548,7 +1548,7 @@ int submit_common_msg(struct usb_device *dev, unsigned long pipe, void *buffer,
         }
  
         dev->status = stat;
-       dev->act_len = transfer_len;
+       dev->act_len = urb->actual_length;
  
  #ifdef DEBUG
         pkt_print(urb, dev, pipe, buffer, transfer_len,
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/1 usb:ohci-hcd: submit_common_msg: report actual_length properly

Dear Mateusz Kulikowski,

Quoted 13 lines

submit_common_msg should report amount of data passed from/to device. Instead, it always returned size requested by Host.

---
  drivers/usb/host/ohci-hcd.c |    2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/host/ohci-hcd.c +0 -0
index c33c487..8a9e5f4 100644

drivers/usb/host/ohci-hcd.c int submit_common_msg(struct usb_device *dev, · line 1554

Quoted 8 lines
drivers/usb/host/ohci-hcd.c +1 -1
@@ -1548,7 +1548,7 @@ int submit_common_msg(struct usb_device *dev,
 unsigned long pipe, void *buffer, }
 
         dev->status = stat;
-       dev->act_len = transfer_len;
+       dev->act_len = urb->actual_length;
 
  #ifdef DEBUG
         pkt_print(urb, dev, pipe, buffer, transfer_len,

The patch is malformed somehow and cannot be applied. For one, I see spaces instead of tabs. Fix and repost please.

NOTE: I will be N/A until the end of this week.

Best regards,
Marek Vasut

#2 lore raw

PATCH v2 1/1 usb: ohci-hcd: submit_common_msg: report actual_length properly

submit_common_msg should report amount of data passed from/to device. Instead, it always returned size requested by Host.

---
 drivers/usb/host/ohci-hcd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/host/ohci-hcd.c +1 -1
index c33c487..8a9e5f4 100644
@@ -1548,7 +1548,7 @@ int submit_common_msg(struct usb_device *dev, unsigned long pipe, void *buffer,
 	}
 
 	dev->status = stat;
-	dev->act_len = transfer_len;
+	dev->act_len = urb->actual_length;
 
 #ifdef DEBUG
 	pkt_print(urb, dev, pipe, buffer, transfer_len,
Signature · 1 line
1.8.4.1
Applied
#3 lore raw

PATCH v2 1/1 usb: ohci-hcd: submit_common_msg: report actual_length properly

Dear Mateusz Kulikowski,

Quoted 13 lines

submit_common_msg should report amount of data passed from/to device. Instead, it always returned size requested by Host.

---
 drivers/usb/host/ohci-hcd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/host/ohci-hcd.c +0 -0
index c33c487..8a9e5f4 100644

drivers/usb/host/ohci-hcd.c int submit_common_msg(struct usb_device *dev, · line 1554

Quoted 8 lines
drivers/usb/host/ohci-hcd.c +1 -1
@@ -1548,7 +1548,7 @@ int submit_common_msg(struct usb_device *dev,
 unsigned long pipe, void *buffer, }
 
 	dev->status = stat;
-	dev->act_len = transfer_len;
+	dev->act_len = urb->actual_length;
 
 #ifdef DEBUG
 	pkt_print(urb, dev, pipe, buffer, transfer_len,

Applied, thanks!

Best regards,
Marek Vasut