# HG changeset patch # User Uri Shkolnik <uris@xxxxxxxxxxxx> # Date 1242127626 -10800 # Node ID 26c02c133d7e1f9932c1968f669ab0bfaf2761fa # Parent 766d02fa7c5c42cc6480eaefb14c7dd6f9c0d370 [0905_02] Siano: smsusb - handle byte ordering and big endianity From: Uri Shkolnik <uris@xxxxxxxxxxxx> This patch adds support for byte ordering and big endianity handling for the USB interface driver Priority: normal Signed-off-by: Uri Shkolnik <uris@xxxxxxxxxxxx> diff -r 766d02fa7c5c -r 26c02c133d7e linux/drivers/media/dvb/siano/smsusb.c --- a/linux/drivers/media/dvb/siano/smsusb.c Tue May 12 14:00:57 2009 +0300 +++ b/linux/drivers/media/dvb/siano/smsusb.c Tue May 12 14:27:06 2009 +0300 @@ -26,6 +26,7 @@ along with this program. If not, see <h #include "smscoreapi.h" #include "sms-cards.h" +#include "smsendian.h" static int sms_dbg; module_param_named(debug, sms_dbg, int, 0644); @@ -180,6 +181,7 @@ static int smsusb_sendrequest(void *cont struct smsusb_device_t *dev = (struct smsusb_device_t *) context; int dummy; + smsendian_handle_message_header((struct SmsMsgHdr_ST *)buffer); return usb_bulk_msg(dev->udev, usb_sndbulkpipe(dev->udev, 2), buffer, size, &dummy, 1000); } @@ -337,8 +339,8 @@ static int smsusb_init_device(struct usb case SMS_VEGA: dev->buffer_size = USB2_BUFFER_SIZE; dev->response_alignment = - dev->udev->ep_in[1]->desc.wMaxPacketSize - - sizeof(struct SmsMsgHdr_ST); + le16_to_cpu(dev->udev->ep_in[1]->desc.wMaxPacketSize) - + sizeof(struct SmsMsgHdr_ST); params.flags |= SMS_DEVICE_FAMILY2; break; -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html