Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 179096
b: refs/heads/master
c: d9ced80
h: refs/heads/master
v: v3
  • Loading branch information
Jan Dumon authored and David S. Miller committed Jan 7, 2010
1 parent bd5711d commit d27251c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ec157937d9799cf30c9a19bd18be33721242c64f
refs/heads/master: d9ced80d1084758772d350ac66b1ad0eeefc7f95
12 changes: 7 additions & 5 deletions trunk/drivers/net/usb/hso.c
Original file line number Diff line number Diff line change
Expand Up @@ -1028,7 +1028,8 @@ static void read_bulk_callback(struct urb *urb)
if (odev->parent->port_spec & HSO_INFO_CRC_BUG) {
u32 rest;
u8 crc_check[4] = { 0xDE, 0xAD, 0xBE, 0xEF };
rest = urb->actual_length % odev->in_endp->wMaxPacketSize;
rest = urb->actual_length %
le16_to_cpu(odev->in_endp->wMaxPacketSize);
if (((rest == 5) || (rest == 6)) &&
!memcmp(((u8 *) urb->transfer_buffer) +
urb->actual_length - 4, crc_check, 4)) {
Expand Down Expand Up @@ -1234,7 +1235,7 @@ static void hso_std_serial_read_bulk_callback(struct urb *urb)
u8 crc_check[4] = { 0xDE, 0xAD, 0xBE, 0xEF };
rest =
urb->actual_length %
serial->in_endp->wMaxPacketSize;
le16_to_cpu(serial->in_endp->wMaxPacketSize);
if (((rest == 5) || (rest == 6)) &&
!memcmp(((u8 *) urb->transfer_buffer) +
urb->actual_length - 4, crc_check, 4)) {
Expand Down Expand Up @@ -2843,8 +2844,9 @@ struct hso_shared_int *hso_create_shared_int(struct usb_interface *interface)
dev_err(&interface->dev, "Could not allocate intr urb?");
goto exit;
}
mux->shared_intr_buf = kzalloc(mux->intr_endp->wMaxPacketSize,
GFP_KERNEL);
mux->shared_intr_buf =
kzalloc(le16_to_cpu(mux->intr_endp->wMaxPacketSize),
GFP_KERNEL);
if (!mux->shared_intr_buf) {
dev_err(&interface->dev, "Could not allocate intr buf?");
goto exit;
Expand Down Expand Up @@ -3241,7 +3243,7 @@ static int hso_mux_submit_intr_urb(struct hso_shared_int *shared_int,
usb_rcvintpipe(usb,
shared_int->intr_endp->bEndpointAddress & 0x7F),
shared_int->shared_intr_buf,
shared_int->intr_endp->wMaxPacketSize,
1,
intr_callback, shared_int,
shared_int->intr_endp->bInterval);

Expand Down

0 comments on commit d27251c

Please sign in to comment.