提交 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;
#define SMS_ROM_NO_RESPONSE 2
#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_client smscore_client_t;
typedef struct _smscore_buffer smscore_buffer_t;
......@@ -102,6 +110,7 @@ typedef struct _smsdevice_params
postload_t postload_handler;
void *context;
sms_device_type_st device_type;
} smsdevice_params_t;
typedef struct _smsclient_params
......@@ -506,6 +515,8 @@ extern int smscore_start_device(smscore_device_t *coredev);
extern int smscore_load_firmware(smscore_device_t *coredev, char *filename,
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_get_device_mode(smscore_device_t *coredev);
......
......@@ -300,9 +300,8 @@ int smsdvb_hotplug(smscore_device_t *coredev, struct device *device,
if (smscore_get_device_mode(coredev) != 4)
{
rc = smscore_set_device_mode(coredev, 4);
if (rc < 0)
return rc;
printk(KERN_ERR "%sSMS Device mode is not set for DVB operation.\n", __func__);
return 0;
}
client = kzalloc(sizeof(smsdvb_client_t), GFP_KERNEL);
......@@ -356,7 +355,7 @@ int smsdvb_hotplug(smscore_device_t *coredev, struct device *device,
goto frontend_error;
}
params.initial_id = 0;
params.initial_id = 1;
params.data_type = MSG_SMS_DVBT_BDA_DATA;
params.onresponse_handler = smsdvb_onresponse;
params.onremove_handler = smsdvb_onremove;
......
......@@ -301,16 +301,27 @@ int smsusb_init_device(struct usb_interface *intf)
usb_set_intfdata(intf, dev);
dev->udev = interface_to_usbdev(intf);
switch (dev->udev->descriptor.idProduct)
{
switch (dev->udev->descriptor.idProduct) {
case 0x100:
dev->buffer_size = USB1_BUFFER_SIZE;
params.setmode_handler = smsusb1_setmode;
params.detectmode_handler = smsusb1_detectmode;
params.device_type = SMS_STELLAR;
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__);
}
dev->buffer_size = USB2_BUFFER_SIZE;
dev->response_alignment = dev->udev->ep_in[1]->desc.wMaxPacketSize - sizeof(SmsMsgHdr_ST);
......@@ -341,6 +352,7 @@ int smsusb_init_device(struct usb_interface *intf)
usb_init_urb(&dev->surbs[i].urb);
}
printk(KERN_INFO "%s smsusb_start_streaming(...).\n", __func__);
rc = smsusb_start_streaming(dev);
if (rc < 0)
{
......@@ -368,6 +380,9 @@ int smsusb_probe(struct usb_interface *intf, const struct usb_device_id *id)
char devpath[32];
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)
{
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)
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 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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册