From patchwork Tue May 12 14:37:09 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Uri Shkolnik X-Patchwork-Id: 23254 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n4CEbF1x024896 for ; Tue, 12 May 2009 14:37:15 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751318AbZELOhJ (ORCPT ); Tue, 12 May 2009 10:37:09 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751889AbZELOhJ (ORCPT ); Tue, 12 May 2009 10:37:09 -0400 Received: from web110811.mail.gq1.yahoo.com ([67.195.13.234]:20248 "HELO web110811.mail.gq1.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1751318AbZELOhI (ORCPT ); Tue, 12 May 2009 10:37:08 -0400 Received: (qmail 23457 invoked by uid 60001); 12 May 2009 14:37:09 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1242139029; bh=tCOy6uxhG8w1E+zaVfOcP/Cxm6ey/1ABUtoOwKEHaik=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=AzyLUoi444Pe9XDBemSqKaoXhsmkyROiLeKB58P26WnSAkJkESUZSCOou1Jyr5WgrUBErHjyHpjPskHMywsxSN4IdSU8e6FXUJ0wnBmPSkzVZvNmlUK8FIJ5EtbuebOvjPhXUZ498U2WLO+feyaYJw3E4XP1cgspjnBgUWHZuO8= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type; b=wLsYZ5imm/Wp9mBg8ID6j+KNj2j8k2DKfajgXmRpqM1LqKnIFDIVyzQb3tAnbD81CFrOJoG9wfZOoracJAvD0lAX862G9JlIWGRT222k8+ALVqp6iX6CnOJE9jHdYfeTVm0/m2pUMAhWf46wgi1CpSkCT6sSszUCdeeB1xskIng=; Message-ID: <169456.23379.qm@web110811.mail.gq1.yahoo.com> X-YMail-OSG: o9hgVigVM1npJw3EtYBHpRANuNPYxu2fSE1TgyETFhCCZQAO4SIvnR.g.oXYOHFZlZ9RGwNHdqNlYmfVWLHcDnNNWED.b8tS_tu4uxna_YpP8jBUFBheOfH18bUpDJxFcD8gkBXV9wDThs7r6diuwIp1pepEpCw7yO7q6vxBMl3My2qki14I4ZQUEKHfIox7ZLLs2QWyvtGjCVnQ8_52Q.ZGR_kIt3FE4vdZRxkXtW9apio94xzhvmwD3NGXLi9zcTQqNDYDPC3M15QL0173omf74R.6Wfd8qUOAt0Dwt2HDLxmuba5CKS65_YCE8AweW7wQJmRFIGgI8E_7P8BQsijks5hAwfCcuV3j4WzkNviUUO9ZsvworRhc3Q-- Received: from [199.203.99.233] by web110811.mail.gq1.yahoo.com via HTTP; Tue, 12 May 2009 07:37:09 PDT X-Mailer: YahooMailClassic/5.3.9 YahooMailWebService/0.7.289.10 Date: Tue, 12 May 2009 07:37:09 -0700 (PDT) From: Uri Shkolnik Subject: [PATCH] [0905_06] Siano: smsdvb - add big endian support To: LinuxML MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org # HG changeset patch # User Uri Shkolnik # Date 1242139255 -10800 # Node ID 291604c1821496dd4acd1d5411f8ea3ae955fd2c # Parent ae0f17b305e7762643a9bc7f43c302c11f7b55b5 [0905_06] Siano: smsdvb - add big endian support From: Uri Shkolnik Add support for Siano protocol messages with big endian systems. Priority: normal Signed-off-by: Uri Shkolnik --- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff -r ae0f17b305e7 -r 291604c18214 linux/drivers/media/dvb/siano/smsdvb.c --- a/linux/drivers/media/dvb/siano/smsdvb.c Tue May 12 17:32:21 2009 +0300 +++ b/linux/drivers/media/dvb/siano/smsdvb.c Tue May 12 17:40:55 2009 +0300 @@ -23,6 +23,7 @@ along with this program. If not, see #include "smscoreapi.h" +#include "smsendian.h" #include "sms-cards.h" DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr); @@ -59,6 +60,8 @@ static int smsdvb_onresponse(void *conte struct smsdvb_client_t *client = (struct smsdvb_client_t *) context; struct SmsMsgHdr_ST *phdr = (struct SmsMsgHdr_ST *)(((u8 *) cb->p) + cb->offset); + + smsendian_handle_rx_message((struct SmsMsgData_ST *) phdr); switch (phdr->msgType) { case MSG_SMS_DVBT_BDA_DATA: @@ -149,6 +152,7 @@ static int smsdvb_start_feed(struct dvb_ PidMsg.xMsgHeader.msgLength = sizeof(PidMsg); PidMsg.msgData[0] = feed->pid; + smsendian_handle_tx_message((struct SmsMsgHdr_ST *)&PidMsg); return smsclient_sendrequest(client->smsclient, &PidMsg, sizeof(PidMsg)); } @@ -169,6 +173,7 @@ static int smsdvb_stop_feed(struct dvb_d PidMsg.xMsgHeader.msgLength = sizeof(PidMsg); PidMsg.msgData[0] = feed->pid; + smsendian_handle_tx_message((struct SmsMsgHdr_ST *)&PidMsg); return smsclient_sendrequest(client->smsclient, &PidMsg, sizeof(PidMsg)); } @@ -177,7 +182,10 @@ static int smsdvb_sendrequest_and_wait(s void *buffer, size_t size, struct completion *completion) { - int rc = smsclient_sendrequest(client->smsclient, buffer, size); + int rc; + + smsendian_handle_tx_message((struct SmsMsgHdr_ST *)buffer); + rc = smsclient_sendrequest(client->smsclient, buffer, size); if (rc < 0) return rc;