提交 f17407a8 编写于 作者: M Michael Krufky 提交者: Mauro Carvalho Chehab

V4L/DVB (8277): sms1xxx: update latest siano drop to 1.2.17

Signed-off-by: NMichael Krufky <mkrufky@linuxtv.org>
Signed-off-by: NMauro Carvalho Chehab <mchehab@infradead.org>
上级 55ad310c
...@@ -56,6 +56,14 @@ typedef struct mutex kmutex_t; ...@@ -56,6 +56,14 @@ typedef struct mutex kmutex_t;
#define SMS_ROM_NO_RESPONSE 2 #define SMS_ROM_NO_RESPONSE 2
#define SMS_DEVICE_NOT_READY 0x8000000 #define SMS_DEVICE_NOT_READY 0x8000000
typedef enum {
SMS_STELLAR= 0,
SMS_NOVA_A0,
SMS_NOVA_B0,
SMS_VEGA,
SMS_NUM_OF_DEVICE_TYPES
} sms_device_type_st;
typedef struct _smscore_device smscore_device_t; typedef struct _smscore_device smscore_device_t;
typedef struct _smscore_client smscore_client_t; typedef struct _smscore_client smscore_client_t;
typedef struct _smscore_buffer smscore_buffer_t; typedef struct _smscore_buffer smscore_buffer_t;
...@@ -102,6 +110,7 @@ typedef struct _smsdevice_params ...@@ -102,6 +110,7 @@ typedef struct _smsdevice_params
postload_t postload_handler; postload_t postload_handler;
void *context; void *context;
sms_device_type_st device_type;
} smsdevice_params_t; } smsdevice_params_t;
typedef struct _smsclient_params typedef struct _smsclient_params
...@@ -506,6 +515,8 @@ extern int smscore_start_device(smscore_device_t *coredev); ...@@ -506,6 +515,8 @@ extern int smscore_start_device(smscore_device_t *coredev);
extern int smscore_load_firmware(smscore_device_t *coredev, char *filename, extern int smscore_load_firmware(smscore_device_t *coredev, char *filename,
loadfirmware_t loadfirmware_handler); loadfirmware_t loadfirmware_handler);
extern int smscore_load_firmware_from_buffer(smscore_device_t *coredev, u8* buffer, int size, int new_mode);
extern int smscore_set_device_mode(smscore_device_t *coredev, int mode); extern int smscore_set_device_mode(smscore_device_t *coredev, int mode);
extern int smscore_get_device_mode(smscore_device_t *coredev); extern int smscore_get_device_mode(smscore_device_t *coredev);
......
...@@ -300,9 +300,8 @@ int smsdvb_hotplug(smscore_device_t *coredev, struct device *device, ...@@ -300,9 +300,8 @@ int smsdvb_hotplug(smscore_device_t *coredev, struct device *device,
if (smscore_get_device_mode(coredev) != 4) if (smscore_get_device_mode(coredev) != 4)
{ {
rc = smscore_set_device_mode(coredev, 4); printk(KERN_ERR "%sSMS Device mode is not set for DVB operation.\n", __func__);
if (rc < 0) return 0;
return rc;
} }
client = kzalloc(sizeof(smsdvb_client_t), GFP_KERNEL); client = kzalloc(sizeof(smsdvb_client_t), GFP_KERNEL);
...@@ -356,7 +355,7 @@ int smsdvb_hotplug(smscore_device_t *coredev, struct device *device, ...@@ -356,7 +355,7 @@ int smsdvb_hotplug(smscore_device_t *coredev, struct device *device,
goto frontend_error; goto frontend_error;
} }
params.initial_id = 0; params.initial_id = 1;
params.data_type = MSG_SMS_DVBT_BDA_DATA; params.data_type = MSG_SMS_DVBT_BDA_DATA;
params.onresponse_handler = smsdvb_onresponse; params.onresponse_handler = smsdvb_onresponse;
params.onremove_handler = smsdvb_onremove; params.onremove_handler = smsdvb_onremove;
......
...@@ -301,21 +301,32 @@ int smsusb_init_device(struct usb_interface *intf) ...@@ -301,21 +301,32 @@ int smsusb_init_device(struct usb_interface *intf)
usb_set_intfdata(intf, dev); usb_set_intfdata(intf, dev);
dev->udev = interface_to_usbdev(intf); dev->udev = interface_to_usbdev(intf);
switch (dev->udev->descriptor.idProduct) switch (dev->udev->descriptor.idProduct) {
{ case 0x100:
case 0x100: dev->buffer_size = USB1_BUFFER_SIZE;
dev->buffer_size = USB1_BUFFER_SIZE;
params.setmode_handler = smsusb1_setmode;
params.setmode_handler = smsusb1_setmode; params.detectmode_handler = smsusb1_detectmode;
params.detectmode_handler = smsusb1_detectmode; params.device_type = SMS_STELLAR;
break; printk(KERN_INFO "%s stellar device found\n", __func__ );
break;
default:
if (dev->udev->descriptor.idProduct == 0x200) {
params.device_type = SMS_NOVA_A0;
printk(KERN_INFO "%s nova A0 found\n", __FUNCTION__ );
} else if (dev->udev->descriptor.idProduct == 0x201) {
params.device_type = SMS_NOVA_B0;
printk(KERN_INFO "%s nova B0 found\n", __FUNCTION__);
} else {
params.device_type = SMS_VEGA;
printk(KERN_INFO "%s Vega found\n", __FUNCTION__);
}
default: dev->buffer_size = USB2_BUFFER_SIZE;
dev->buffer_size = USB2_BUFFER_SIZE; dev->response_alignment = dev->udev->ep_in[1]->desc.wMaxPacketSize - sizeof(SmsMsgHdr_ST);
dev->response_alignment = dev->udev->ep_in[1]->desc.wMaxPacketSize - sizeof(SmsMsgHdr_ST);
params.flags |= SMS_DEVICE_FAMILY2; params.flags |= SMS_DEVICE_FAMILY2;
break; break;
} }
params.device = &dev->udev->dev; params.device = &dev->udev->dev;
...@@ -341,6 +352,7 @@ int smsusb_init_device(struct usb_interface *intf) ...@@ -341,6 +352,7 @@ int smsusb_init_device(struct usb_interface *intf)
usb_init_urb(&dev->surbs[i].urb); usb_init_urb(&dev->surbs[i].urb);
} }
printk(KERN_INFO "%s smsusb_start_streaming(...).\n", __func__);
rc = smsusb_start_streaming(dev); rc = smsusb_start_streaming(dev);
if (rc < 0) if (rc < 0)
{ {
...@@ -368,6 +380,9 @@ int smsusb_probe(struct usb_interface *intf, const struct usb_device_id *id) ...@@ -368,6 +380,9 @@ int smsusb_probe(struct usb_interface *intf, const struct usb_device_id *id)
char devpath[32]; char devpath[32];
int i, rc; int i, rc;
rc = usb_clear_halt(udev, usb_rcvbulkpipe(udev, 0x81));
rc = usb_clear_halt(udev, usb_rcvbulkpipe(udev, 0x02));
if (intf->num_altsetting > 0) if (intf->num_altsetting > 0)
{ {
rc = usb_set_interface(udev, intf->cur_altsetting->desc.bInterfaceNumber, 0); rc = usb_set_interface(udev, intf->cur_altsetting->desc.bInterfaceNumber, 0);
...@@ -390,11 +405,14 @@ int smsusb_probe(struct usb_interface *intf, const struct usb_device_id *id) ...@@ -390,11 +405,14 @@ int smsusb_probe(struct usb_interface *intf, const struct usb_device_id *id)
if (intf->cur_altsetting->desc.bInterfaceNumber == 1) if (intf->cur_altsetting->desc.bInterfaceNumber == 1)
{ {
snprintf(devpath, 32, "%d:%s", udev->bus->busnum, udev->devpath); snprintf(devpath, sizeof(devpath), "usb\\%d-%s", udev->bus->busnum, udev->devpath);
printk(KERN_INFO "stellar device was found.\n");
return smsusb1_load_firmware(udev, smscore_registry_getmode(devpath)); return smsusb1_load_firmware(udev, smscore_registry_getmode(devpath));
} }
return smsusb_init_device(intf); rc = smsusb_init_device(intf);
printk(KERN_INFO "%s rc %d\n", __FUNCTION__, rc);
return rc;
} }
void smsusb_disconnect(struct usb_interface *intf) void smsusb_disconnect(struct usb_interface *intf)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册