[09051_50] Siano: smscore - Add big endian support
PATCH 1/1 [09051_50] Siano: smscore - Add big endian support
# HG changeset patch
# User Uri Shkolnik <[email protected]>
# Date 1242748399 -10800
# Node ID a93ebe0069b3d7d8d791ccb620a7797508cf724c # Parent 4d75f9d1c4f96d65a8ad312c21e488a212ee58a3 [09051_50] Siano: smscore - Add big endian support
From: Uri Shkolnik <[email protected]>
Add support for big endian target, to the smscore module.
Priority: normal
linux/drivers/media/dvb/siano/smscoreapi.c +15 -1
@@ -34,8 +34,10 @@#include <asm/byteorder.h> #include "smscoreapi.h" +#include "smsendian.h" #include "sms-cards.h" #include "smsir.h" +#define MAX_GPIO_PIN_NUMBER 31#if LINUX_VERSION_CODE >=KERNEL_VERSION (2 ,6 ,10 )
@@ -465,6 +467,8 @@ static int smscore_init_ir(struct smscor msg->msgData[0 ] = coredev->ir.controller; msg->msgData[1 ] = coredev->ir.timeout; +smsendian_handle_tx_message ( + (struct SmsMsgHdr_ST2 *)msg); rc =smscore_sendrequest_and_wait (coredev, msg, msg->xMsgHeader. msgLength, &coredev->ir_init_done);
@@ -545,6 +549,7 @@ static int smscore_load_firmware_family2sms_debug ("sending reload command." );SMS_INIT_MSG (msg,MSG_SW_RELOAD_START_REQ ,sizeof (struct SmsMsgHdr_ST )); +smsendian_handle_tx_message ((struct SmsMsgHdr_ST *)msg); rc =smscore_sendrequest_and_wait (coredev, msg, msg->msgLength, &coredev->reload_start_done);
@@ -563,6 +568,7 @@ static int smscore_load_firmware_family2 DataMsg->MemAddr = mem_address;memcpy (DataMsg->Payload, payload, payload_size); +smsendian_handle_tx_message ((struct SmsMsgHdr_ST *)msg);if ((coredev->device_flags &SMS_ROM_NO_RESPONSE ) && (coredev->mode ==DEVICE_MODE_NONE )) rc = coredev->sendrequest_handler(
@@ -595,6 +601,7 @@ static int smscore_load_firmware_family2 TriggerMsg->msgData[3 ] =0 ;/* Parameter */ TriggerMsg->msgData[4 ] =4 ;/* Task ID */ +smsendian_handle_tx_message ((struct SmsMsgHdr_ST *)msg);if (coredev->device_flags &SMS_ROM_NO_RESPONSE ) { rc = coredev->sendrequest_handler( coredev->context, TriggerMsg,
@@ -608,7 +615,7 @@ static int smscore_load_firmware_family2 }else {SMS_INIT_MSG (msg,MSG_SW_RELOAD_EXEC_REQ ,sizeof (struct SmsMsgHdr_ST )); - +smsendian_handle_tx_message ((struct SmsMsgHdr_ST *)msg); rc = coredev->sendrequest_handler (coredev->context, msg, msg->msgLength); }
@@ -767,6 +774,7 @@ static int smscore_detect_mode(struct smSMS_INIT_MSG (msg,MSG_SMS_GET_VERSION_EX_REQ ,sizeof (struct SmsMsgHdr_ST )); +smsendian_handle_tx_message ((struct SmsMsgHdr_ST *)msg); rc =smscore_sendrequest_and_wait (coredev, msg, msg->msgLength, &coredev->version_ex_done);if (rc == -ETIME ) {
@@ -895,6 +903,7 @@ int smscore_set_device_mode(struct smsco sizeof(struct SmsMsgData_ST)); msg->msgData[0 ] = mode; +smsendian_handle_tx_message ((struct SmsMsgHdr_ST *)msg); rc =smscore_sendrequest_and_wait ( coredev, msg, msg->xMsgHeader.msgLength, &coredev->init_device_done);
@@ -1102,6 +1111,8 @@ void smscore_onresponse(struct smscore_d rc = client->onresponse_handler (client->context, cb);if (rc <0 ) { +smsendian_handle_rx_message ((struct SmsMsgData_ST *)phdr); +switch (phdr->msgType) {case MSG_SMS_GET_VERSION_EX_RES : {
@@ -1604,6 +1615,7 @@ int smscore_gpio_configure(struct smscor pMsg->msgData[5 ] =0 ; } +smsendian_handle_tx_message ((struct SmsMsgHdr_ST *)pMsg); rc =smscore_sendrequest_and_wait (coredev, pMsg, totalLen, &coredev->gpio_configuration_done);
@@ -1653,6 +1665,7 @@ int smscore_gpio_set_level(struct smscor pMsg->msgData[1 ] = NewLevel;/* Send message to SMS */ +smsendian_handle_tx_message ((struct SmsMsgHdr_ST *)pMsg); rc =smscore_sendrequest_and_wait (coredev, pMsg, totalLen, &coredev->gpio_set_level_done);
@@ -1701,6 +1714,7 @@ int smscore_gpio_get_level(struct smscor pMsg->msgData[1 ] =0 ;/* Send message to SMS */ +smsendian_handle_tx_message ((struct SmsMsgHdr_ST *)pMsg); rc =smscore_sendrequest_and_wait (coredev, pMsg, totalLen, &coredev->gpio_get_level_done);
Em Tue, 19 May 2009 08:48:47 -0700 (PDT)
Uri Shkolnik <[email protected]> escreveu:
Quoted 8 lines
# HG changeset patch
# User Uri Shkolnik <[email protected]>
# Date 1242748399 -10800
# Node IDa93ebe0069b3d7d8d791ccb620a7797508cf724c# Parent4d75f9d1c4f96d65a8ad312c21e488a212ee58a3[09051_50] Siano: smscore - Add big endian support
Quoted 5 lines
From: Uri Shkolnik <[email protected]>
Add support for big endian target, to the smscore module.
Priority: normal
This patch didn't apply:
$ patch -p1 -i /home/v4l/in_patches/lmml_24749_09051_50_siano_smscore_add_big_endian_support.patch patching file linux/drivers/media/dvb/siano/smscoreapi.c Hunk #1 FAILED at 34. Hunk #2 FAILED at 467. Hunk #3 succeeded at 541 (offset -8 lines). Hunk #5 succeeded at 593 (offset -8 lines). Hunk #7 succeeded at 753 (offset -21 lines). Hunk #9 succeeded at 1022 (offset -89 lines). Hunk #10 FAILED at 1526. Hunk #11 FAILED at 1576. Hunk #12 FAILED at 1625. 5 out of 12 hunks FAILED -- saving rejects to file linux/drivers/media/dvb/siano/smscoreapi.c.rej
Maybe this patch depends on one of the patches where changes are requested
Cheers,
Mauro