diff options
Diffstat (limited to 'drivers/net/usb/hso.c')
-rw-r--r-- | drivers/net/usb/hso.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c index eb930b2e67c7..aba90e77e077 100644 --- a/drivers/net/usb/hso.c +++ b/drivers/net/usb/hso.c | |||
@@ -1028,7 +1028,8 @@ static void read_bulk_callback(struct urb *urb) | |||
1028 | if (odev->parent->port_spec & HSO_INFO_CRC_BUG) { | 1028 | if (odev->parent->port_spec & HSO_INFO_CRC_BUG) { |
1029 | u32 rest; | 1029 | u32 rest; |
1030 | u8 crc_check[4] = { 0xDE, 0xAD, 0xBE, 0xEF }; | 1030 | u8 crc_check[4] = { 0xDE, 0xAD, 0xBE, 0xEF }; |
1031 | rest = urb->actual_length % odev->in_endp->wMaxPacketSize; | 1031 | rest = urb->actual_length % |
1032 | le16_to_cpu(odev->in_endp->wMaxPacketSize); | ||
1032 | if (((rest == 5) || (rest == 6)) && | 1033 | if (((rest == 5) || (rest == 6)) && |
1033 | !memcmp(((u8 *) urb->transfer_buffer) + | 1034 | !memcmp(((u8 *) urb->transfer_buffer) + |
1034 | urb->actual_length - 4, crc_check, 4)) { | 1035 | urb->actual_length - 4, crc_check, 4)) { |
@@ -1234,7 +1235,7 @@ static void hso_std_serial_read_bulk_callback(struct urb *urb) | |||
1234 | u8 crc_check[4] = { 0xDE, 0xAD, 0xBE, 0xEF }; | 1235 | u8 crc_check[4] = { 0xDE, 0xAD, 0xBE, 0xEF }; |
1235 | rest = | 1236 | rest = |
1236 | urb->actual_length % | 1237 | urb->actual_length % |
1237 | serial->in_endp->wMaxPacketSize; | 1238 | le16_to_cpu(serial->in_endp->wMaxPacketSize); |
1238 | if (((rest == 5) || (rest == 6)) && | 1239 | if (((rest == 5) || (rest == 6)) && |
1239 | !memcmp(((u8 *) urb->transfer_buffer) + | 1240 | !memcmp(((u8 *) urb->transfer_buffer) + |
1240 | urb->actual_length - 4, crc_check, 4)) { | 1241 | urb->actual_length - 4, crc_check, 4)) { |
@@ -2843,8 +2844,9 @@ struct hso_shared_int *hso_create_shared_int(struct usb_interface *interface) | |||
2843 | dev_err(&interface->dev, "Could not allocate intr urb?"); | 2844 | dev_err(&interface->dev, "Could not allocate intr urb?"); |
2844 | goto exit; | 2845 | goto exit; |
2845 | } | 2846 | } |
2846 | mux->shared_intr_buf = kzalloc(mux->intr_endp->wMaxPacketSize, | 2847 | mux->shared_intr_buf = |
2847 | GFP_KERNEL); | 2848 | kzalloc(le16_to_cpu(mux->intr_endp->wMaxPacketSize), |
2849 | GFP_KERNEL); | ||
2848 | if (!mux->shared_intr_buf) { | 2850 | if (!mux->shared_intr_buf) { |
2849 | dev_err(&interface->dev, "Could not allocate intr buf?"); | 2851 | dev_err(&interface->dev, "Could not allocate intr buf?"); |
2850 | goto exit; | 2852 | goto exit; |
@@ -3241,7 +3243,7 @@ static int hso_mux_submit_intr_urb(struct hso_shared_int *shared_int, | |||
3241 | usb_rcvintpipe(usb, | 3243 | usb_rcvintpipe(usb, |
3242 | shared_int->intr_endp->bEndpointAddress & 0x7F), | 3244 | shared_int->intr_endp->bEndpointAddress & 0x7F), |
3243 | shared_int->shared_intr_buf, | 3245 | shared_int->shared_intr_buf, |
3244 | shared_int->intr_endp->wMaxPacketSize, | 3246 | 1, |
3245 | intr_callback, shared_int, | 3247 | intr_callback, shared_int, |
3246 | shared_int->intr_endp->bInterval); | 3248 | shared_int->intr_endp->bInterval); |
3247 | 3249 | ||