1 /****************************************************************
3 Siano Mobile Silicon, Inc.
4 MDTV receiver kernel modules.
5 Copyright (C) 2005-2009, Uri Shkolnik, Anatoly Greenblat
7 This program is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 2 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>.
20 ****************************************************************/
22 #include "smscoreapi.h"
24 #include <linux/kernel.h>
25 #include <linux/init.h>
26 #include <linux/usb.h>
27 #include <linux/firmware.h>
28 #include <linux/slab.h>
29 #include <linux/module.h>
30 #include <media/media-device.h>
32 #include "sms-cards.h"
33 #include "smsendian.h"
35 #define USB1_BUFFER_SIZE 0x1000
36 #define USB2_BUFFER_SIZE 0x2000
38 #define MAX_BUFFERS 50
41 struct smsusb_device_t
;
50 struct list_head entry
;
51 struct smscore_buffer_t
*cb
;
52 struct smsusb_device_t
*dev
;
56 /* For the bottom half */
57 struct work_struct wq
;
60 struct smsusb_device_t
{
61 struct usb_device
*udev
;
62 struct smscore_device_t
*coredev
;
64 struct smsusb_urb_t surbs
[MAX_URBS
];
66 int response_alignment
;
71 enum smsusb_state state
;
74 static int smsusb_submit_urb(struct smsusb_device_t
*dev
,
75 struct smsusb_urb_t
*surb
);
78 * Completing URB's callback handler - bottom half (proccess context)
79 * submits the URB prepared on smsusb_onresponse()
81 static void do_submit_urb(struct work_struct
*work
)
83 struct smsusb_urb_t
*surb
= container_of(work
, struct smsusb_urb_t
, wq
);
84 struct smsusb_device_t
*dev
= surb
->dev
;
86 smsusb_submit_urb(dev
, surb
);
90 * Completing URB's callback handler - top half (interrupt context)
91 * adds completing sms urb to the global surbs list and activtes the worker
93 * IMPORTANT - blocking functions must not be called from here !!!
95 * @param urb pointer to a completing urb object
97 static void smsusb_onresponse(struct urb
*urb
)
99 struct smsusb_urb_t
*surb
= (struct smsusb_urb_t
*) urb
->context
;
100 struct smsusb_device_t
*dev
= surb
->dev
;
102 if (urb
->status
== -ESHUTDOWN
) {
103 pr_err("error, urb status %d (-ESHUTDOWN), %d bytes\n",
104 urb
->status
, urb
->actual_length
);
108 if ((urb
->actual_length
> 0) && (urb
->status
== 0)) {
109 struct sms_msg_hdr
*phdr
= (struct sms_msg_hdr
*)surb
->cb
->p
;
111 smsendian_handle_message_header(phdr
);
112 if (urb
->actual_length
>= phdr
->msg_length
) {
113 surb
->cb
->size
= phdr
->msg_length
;
115 if (dev
->response_alignment
&&
116 (phdr
->msg_flags
& MSG_HDR_FLAG_SPLIT_MSG
)) {
119 dev
->response_alignment
+
120 ((phdr
->msg_flags
>> 8) & 3);
123 if (((int) phdr
->msg_length
+
124 surb
->cb
->offset
) > urb
->actual_length
) {
125 pr_err("invalid response msglen %d offset %d size %d\n",
129 goto exit_and_resubmit
;
132 /* move buffer pointer and
133 * copy header to its new location */
134 memcpy((char *) phdr
+ surb
->cb
->offset
,
135 phdr
, sizeof(struct sms_msg_hdr
));
137 surb
->cb
->offset
= 0;
139 pr_debug("received %s(%d) size: %d\n",
140 smscore_translate_msg(phdr
->msg_type
),
141 phdr
->msg_type
, phdr
->msg_length
);
143 smsendian_handle_rx_message((struct sms_msg_data
*) phdr
);
145 smscore_onresponse(dev
->coredev
, surb
->cb
);
148 pr_err("invalid response msglen %d actual %d\n",
149 phdr
->msg_length
, urb
->actual_length
);
152 pr_err("error, urb status %d, %d bytes\n",
153 urb
->status
, urb
->actual_length
);
157 INIT_WORK(&surb
->wq
, do_submit_urb
);
158 schedule_work(&surb
->wq
);
161 static int smsusb_submit_urb(struct smsusb_device_t
*dev
,
162 struct smsusb_urb_t
*surb
)
165 /* This function can sleep */
166 surb
->cb
= smscore_getbuffer(dev
->coredev
);
168 pr_err("smscore_getbuffer(...) returned NULL\n");
176 usb_rcvbulkpipe(dev
->udev
, dev
->in_ep
),
182 surb
->urb
.transfer_flags
|= URB_FREE_BUFFER
;
184 return usb_submit_urb(&surb
->urb
, GFP_ATOMIC
);
187 static void smsusb_stop_streaming(struct smsusb_device_t
*dev
)
191 for (i
= 0; i
< MAX_URBS
; i
++) {
192 usb_kill_urb(&dev
->surbs
[i
].urb
);
194 if (dev
->surbs
[i
].cb
) {
195 smscore_putbuffer(dev
->coredev
, dev
->surbs
[i
].cb
);
196 dev
->surbs
[i
].cb
= NULL
;
201 static int smsusb_start_streaming(struct smsusb_device_t
*dev
)
205 for (i
= 0; i
< MAX_URBS
; i
++) {
206 rc
= smsusb_submit_urb(dev
, &dev
->surbs
[i
]);
208 pr_err("smsusb_submit_urb(...) failed\n");
209 smsusb_stop_streaming(dev
);
217 static int smsusb_sendrequest(void *context
, void *buffer
, size_t size
)
219 struct smsusb_device_t
*dev
= (struct smsusb_device_t
*) context
;
220 struct sms_msg_hdr
*phdr
;
223 if (dev
->state
!= SMSUSB_ACTIVE
) {
224 pr_debug("Device not active yet\n");
228 phdr
= kmalloc(size
, GFP_KERNEL
);
231 memcpy(phdr
, buffer
, size
);
233 pr_debug("sending %s(%d) size: %d\n",
234 smscore_translate_msg(phdr
->msg_type
), phdr
->msg_type
,
237 smsendian_handle_tx_message((struct sms_msg_data
*) phdr
);
238 smsendian_handle_message_header((struct sms_msg_hdr
*)phdr
);
239 ret
= usb_bulk_msg(dev
->udev
, usb_sndbulkpipe(dev
->udev
, 2),
240 phdr
, size
, &dummy
, 1000);
246 static char *smsusb1_fw_lkup
[] = {
247 "dvbt_stellar_usb.inp",
248 "dvbh_stellar_usb.inp",
249 "tdmb_stellar_usb.inp",
251 "dvbt_bda_stellar_usb.inp",
254 static inline char *sms_get_fw_name(int mode
, int board_id
)
256 char **fw
= sms_get_board(board_id
)->fw
;
257 return (fw
&& fw
[mode
]) ? fw
[mode
] : smsusb1_fw_lkup
[mode
];
260 static int smsusb1_load_firmware(struct usb_device
*udev
, int id
, int board_id
)
262 const struct firmware
*fw
;
268 id
= sms_get_board(board_id
)->default_mode
;
270 if (id
< DEVICE_MODE_DVBT
|| id
> DEVICE_MODE_DVBT_BDA
) {
271 pr_err("invalid firmware id specified %d\n", id
);
275 fw_filename
= sms_get_fw_name(id
, board_id
);
277 rc
= request_firmware(&fw
, fw_filename
, &udev
->dev
);
279 pr_warn("failed to open '%s' mode %d, trying again with default firmware\n",
282 fw_filename
= smsusb1_fw_lkup
[id
];
283 rc
= request_firmware(&fw
, fw_filename
, &udev
->dev
);
285 pr_warn("failed to open '%s' mode %d\n",
292 fw_buffer
= kmalloc(fw
->size
, GFP_KERNEL
);
294 memcpy(fw_buffer
, fw
->data
, fw
->size
);
296 rc
= usb_bulk_msg(udev
, usb_sndbulkpipe(udev
, 2),
297 fw_buffer
, fw
->size
, &dummy
, 1000);
299 pr_debug("sent %zu(%d) bytes, rc %d\n", fw
->size
, dummy
, rc
);
303 pr_err("failed to allocate firmware buffer\n");
306 pr_debug("read FW %s, size=%zu\n", fw_filename
, fw
->size
);
308 release_firmware(fw
);
313 static void smsusb1_detectmode(void *context
, int *mode
)
315 char *product_string
=
316 ((struct smsusb_device_t
*) context
)->udev
->product
;
318 *mode
= DEVICE_MODE_NONE
;
320 if (!product_string
) {
321 product_string
= "none";
322 pr_err("product string not found\n");
323 } else if (strstr(product_string
, "DVBH"))
325 else if (strstr(product_string
, "BDA"))
327 else if (strstr(product_string
, "DVBT"))
329 else if (strstr(product_string
, "TDMB"))
332 pr_debug("%d \"%s\"\n", *mode
, product_string
);
335 static int smsusb1_setmode(void *context
, int mode
)
337 struct sms_msg_hdr msg
= { MSG_SW_RELOAD_REQ
, 0, HIF_TASK
,
338 sizeof(struct sms_msg_hdr
), 0 };
340 if (mode
< DEVICE_MODE_DVBT
|| mode
> DEVICE_MODE_DVBT_BDA
) {
341 pr_err("invalid firmware id specified %d\n", mode
);
345 return smsusb_sendrequest(context
, &msg
, sizeof(msg
));
348 static void smsusb_term_device(struct usb_interface
*intf
)
350 struct smsusb_device_t
*dev
= usb_get_intfdata(intf
);
353 dev
->state
= SMSUSB_DISCONNECTED
;
355 smsusb_stop_streaming(dev
);
357 /* unregister from smscore */
359 smscore_unregister_device(dev
->coredev
);
361 pr_debug("device 0x%p destroyed\n", dev
);
365 usb_set_intfdata(intf
, NULL
);
368 static void *siano_media_device_register(struct smsusb_device_t
*dev
,
371 #ifdef CONFIG_MEDIA_CONTROLLER_DVB
372 struct media_device
*mdev
;
373 struct usb_device
*udev
= dev
->udev
;
374 struct sms_board
*board
= sms_get_board(board_id
);
377 mdev
= kzalloc(sizeof(*mdev
), GFP_KERNEL
);
381 media_device_usb_init(mdev
, udev
, board
->name
);
383 ret
= media_device_register(mdev
);
385 media_device_cleanup(mdev
);
390 pr_info("media controller created\n");
398 static int smsusb_init_device(struct usb_interface
*intf
, int board_id
)
400 struct smsdevice_params_t params
;
401 struct smsusb_device_t
*dev
;
406 /* create device object */
407 dev
= kzalloc(sizeof(struct smsusb_device_t
), GFP_KERNEL
);
411 memset(¶ms
, 0, sizeof(params
));
412 usb_set_intfdata(intf
, dev
);
413 dev
->udev
= interface_to_usbdev(intf
);
414 dev
->state
= SMSUSB_DISCONNECTED
;
416 for (i
= 0; i
< intf
->cur_altsetting
->desc
.bNumEndpoints
; i
++) {
417 struct usb_endpoint_descriptor
*desc
=
418 &intf
->cur_altsetting
->endpoint
[i
].desc
;
420 if (desc
->bEndpointAddress
& USB_DIR_IN
) {
421 dev
->in_ep
= desc
->bEndpointAddress
;
422 align
= usb_endpoint_maxp(desc
) - sizeof(struct sms_msg_hdr
);
424 dev
->out_ep
= desc
->bEndpointAddress
;
428 pr_debug("in_ep = %02x, out_ep = %02x\n", dev
->in_ep
, dev
->out_ep
);
429 if (!dev
->in_ep
|| !dev
->out_ep
|| align
< 0) { /* Missing endpoints? */
430 smsusb_term_device(intf
);
434 params
.device_type
= sms_get_board(board_id
)->type
;
436 switch (params
.device_type
) {
438 dev
->buffer_size
= USB1_BUFFER_SIZE
;
440 params
.setmode_handler
= smsusb1_setmode
;
441 params
.detectmode_handler
= smsusb1_detectmode
;
443 case SMS_UNKNOWN_TYPE
:
444 pr_err("Unspecified sms device type!\n");
447 dev
->buffer_size
= USB2_BUFFER_SIZE
;
448 dev
->response_alignment
= align
;
450 params
.flags
|= SMS_DEVICE_FAMILY2
;
454 params
.device
= &dev
->udev
->dev
;
455 params
.usb_device
= dev
->udev
;
456 params
.buffer_size
= dev
->buffer_size
;
457 params
.num_buffers
= MAX_BUFFERS
;
458 params
.sendrequest_handler
= smsusb_sendrequest
;
459 params
.context
= dev
;
460 usb_make_path(dev
->udev
, params
.devpath
, sizeof(params
.devpath
));
462 mdev
= siano_media_device_register(dev
, board_id
);
464 /* register in smscore */
465 rc
= smscore_register_device(¶ms
, &dev
->coredev
, 0, mdev
);
467 pr_err("smscore_register_device(...) failed, rc %d\n", rc
);
468 smsusb_term_device(intf
);
469 #ifdef CONFIG_MEDIA_CONTROLLER_DVB
470 media_device_unregister(mdev
);
476 smscore_set_board_id(dev
->coredev
, board_id
);
478 dev
->coredev
->is_usb_device
= true;
480 /* initialize urbs */
481 for (i
= 0; i
< MAX_URBS
; i
++) {
482 dev
->surbs
[i
].dev
= dev
;
483 usb_init_urb(&dev
->surbs
[i
].urb
);
486 pr_debug("smsusb_start_streaming(...).\n");
487 rc
= smsusb_start_streaming(dev
);
489 pr_err("smsusb_start_streaming(...) failed\n");
490 smsusb_term_device(intf
);
494 dev
->state
= SMSUSB_ACTIVE
;
496 rc
= smscore_start_device(dev
->coredev
);
498 pr_err("smscore_start_device(...) failed\n");
499 smsusb_term_device(intf
);
503 pr_debug("device 0x%p created\n", dev
);
508 static int smsusb_probe(struct usb_interface
*intf
,
509 const struct usb_device_id
*id
)
511 struct usb_device
*udev
= interface_to_usbdev(intf
);
515 pr_info("board id=%lu, interface number %d\n",
517 intf
->cur_altsetting
->desc
.bInterfaceNumber
);
519 if (sms_get_board(id
->driver_info
)->intf_num
!=
520 intf
->cur_altsetting
->desc
.bInterfaceNumber
) {
521 pr_debug("interface %d won't be used. Expecting interface %d to popup\n",
522 intf
->cur_altsetting
->desc
.bInterfaceNumber
,
523 sms_get_board(id
->driver_info
)->intf_num
);
527 if (intf
->num_altsetting
> 1) {
528 rc
= usb_set_interface(udev
,
529 intf
->cur_altsetting
->desc
.bInterfaceNumber
,
532 pr_err("usb_set_interface failed, rc %d\n", rc
);
537 pr_debug("smsusb_probe %d\n",
538 intf
->cur_altsetting
->desc
.bInterfaceNumber
);
539 for (i
= 0; i
< intf
->cur_altsetting
->desc
.bNumEndpoints
; i
++) {
540 pr_debug("endpoint %d %02x %02x %d\n", i
,
541 intf
->cur_altsetting
->endpoint
[i
].desc
.bEndpointAddress
,
542 intf
->cur_altsetting
->endpoint
[i
].desc
.bmAttributes
,
543 intf
->cur_altsetting
->endpoint
[i
].desc
.wMaxPacketSize
);
544 if (intf
->cur_altsetting
->endpoint
[i
].desc
.bEndpointAddress
&
546 rc
= usb_clear_halt(udev
, usb_rcvbulkpipe(udev
,
547 intf
->cur_altsetting
->endpoint
[i
].desc
.bEndpointAddress
));
549 rc
= usb_clear_halt(udev
, usb_sndbulkpipe(udev
,
550 intf
->cur_altsetting
->endpoint
[i
].desc
.bEndpointAddress
));
552 if ((udev
->actconfig
->desc
.bNumInterfaces
== 2) &&
553 (intf
->cur_altsetting
->desc
.bInterfaceNumber
== 0)) {
554 pr_debug("rom interface 0 is not used\n");
558 if (id
->driver_info
== SMS1XXX_BOARD_SIANO_STELLAR_ROM
) {
559 /* Detected a Siano Stellar uninitialized */
561 snprintf(devpath
, sizeof(devpath
), "usb\\%d-%s",
562 udev
->bus
->busnum
, udev
->devpath
);
563 pr_info("stellar device in cold state was found at %s.\n",
565 rc
= smsusb1_load_firmware(
566 udev
, smscore_registry_getmode(devpath
),
569 /* This device will reset and gain another USB ID */
571 pr_info("stellar device now in warm state\n");
573 pr_err("Failed to put stellar in warm state. Error: %d\n",
578 rc
= smsusb_init_device(intf
, id
->driver_info
);
581 pr_info("Device initialized with return code %d\n", rc
);
582 sms_board_load_modules(id
->driver_info
);
586 static void smsusb_disconnect(struct usb_interface
*intf
)
588 smsusb_term_device(intf
);
591 static int smsusb_suspend(struct usb_interface
*intf
, pm_message_t msg
)
593 struct smsusb_device_t
*dev
= usb_get_intfdata(intf
);
594 printk(KERN_INFO
"%s Entering status %d.\n", __func__
, msg
.event
);
595 dev
->state
= SMSUSB_SUSPENDED
;
596 /*smscore_set_power_mode(dev, SMS_POWER_MODE_SUSPENDED);*/
597 smsusb_stop_streaming(dev
);
601 static int smsusb_resume(struct usb_interface
*intf
)
604 struct smsusb_device_t
*dev
= usb_get_intfdata(intf
);
605 struct usb_device
*udev
= interface_to_usbdev(intf
);
607 printk(KERN_INFO
"%s Entering.\n", __func__
);
608 usb_clear_halt(udev
, usb_rcvbulkpipe(udev
, dev
->in_ep
));
609 usb_clear_halt(udev
, usb_sndbulkpipe(udev
, dev
->out_ep
));
611 for (i
= 0; i
< intf
->cur_altsetting
->desc
.bNumEndpoints
; i
++)
612 printk(KERN_INFO
"endpoint %d %02x %02x %d\n", i
,
613 intf
->cur_altsetting
->endpoint
[i
].desc
.bEndpointAddress
,
614 intf
->cur_altsetting
->endpoint
[i
].desc
.bmAttributes
,
615 intf
->cur_altsetting
->endpoint
[i
].desc
.wMaxPacketSize
);
617 if (intf
->num_altsetting
> 0) {
618 rc
= usb_set_interface(udev
,
619 intf
->cur_altsetting
->desc
.
620 bInterfaceNumber
, 0);
622 printk(KERN_INFO
"%s usb_set_interface failed, rc %d\n",
628 smsusb_start_streaming(dev
);
632 static const struct usb_device_id smsusb_id_table
[] = {
633 /* This device is only present before firmware load */
634 { USB_DEVICE(0x187f, 0x0010),
635 .driver_info
= SMS1XXX_BOARD_SIANO_STELLAR_ROM
},
636 /* This device pops up after firmware load */
637 { USB_DEVICE(0x187f, 0x0100),
638 .driver_info
= SMS1XXX_BOARD_SIANO_STELLAR
},
640 { USB_DEVICE(0x187f, 0x0200),
641 .driver_info
= SMS1XXX_BOARD_SIANO_NOVA_A
},
642 { USB_DEVICE(0x187f, 0x0201),
643 .driver_info
= SMS1XXX_BOARD_SIANO_NOVA_B
},
644 { USB_DEVICE(0x187f, 0x0300),
645 .driver_info
= SMS1XXX_BOARD_SIANO_VEGA
},
646 { USB_DEVICE(0x2040, 0x1700),
647 .driver_info
= SMS1XXX_BOARD_HAUPPAUGE_CATAMOUNT
},
648 { USB_DEVICE(0x2040, 0x1800),
649 .driver_info
= SMS1XXX_BOARD_HAUPPAUGE_OKEMO_A
},
650 { USB_DEVICE(0x2040, 0x1801),
651 .driver_info
= SMS1XXX_BOARD_HAUPPAUGE_OKEMO_B
},
652 { USB_DEVICE(0x2040, 0x2000),
653 .driver_info
= SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD
},
654 { USB_DEVICE(0x2040, 0x2009),
655 .driver_info
= SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD_R2
},
656 { USB_DEVICE(0x2040, 0x200a),
657 .driver_info
= SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD
},
658 { USB_DEVICE(0x2040, 0x2010),
659 .driver_info
= SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD
},
660 { USB_DEVICE(0x2040, 0x2011),
661 .driver_info
= SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD
},
662 { USB_DEVICE(0x2040, 0x2019),
663 .driver_info
= SMS1XXX_BOARD_HAUPPAUGE_TIGER_MINICARD
},
664 { USB_DEVICE(0x2040, 0x5500),
665 .driver_info
= SMS1XXX_BOARD_HAUPPAUGE_WINDHAM
},
666 { USB_DEVICE(0x2040, 0x5510),
667 .driver_info
= SMS1XXX_BOARD_HAUPPAUGE_WINDHAM
},
668 { USB_DEVICE(0x2040, 0x5520),
669 .driver_info
= SMS1XXX_BOARD_HAUPPAUGE_WINDHAM
},
670 { USB_DEVICE(0x2040, 0x5530),
671 .driver_info
= SMS1XXX_BOARD_HAUPPAUGE_WINDHAM
},
672 { USB_DEVICE(0x2040, 0x5580),
673 .driver_info
= SMS1XXX_BOARD_HAUPPAUGE_WINDHAM
},
674 { USB_DEVICE(0x2040, 0x5590),
675 .driver_info
= SMS1XXX_BOARD_HAUPPAUGE_WINDHAM
},
676 { USB_DEVICE(0x187f, 0x0202),
677 .driver_info
= SMS1XXX_BOARD_SIANO_NICE
},
678 { USB_DEVICE(0x187f, 0x0301),
679 .driver_info
= SMS1XXX_BOARD_SIANO_VENICE
},
680 { USB_DEVICE(0x2040, 0xb900),
681 .driver_info
= SMS1XXX_BOARD_HAUPPAUGE_WINDHAM
},
682 { USB_DEVICE(0x2040, 0xb910),
683 .driver_info
= SMS1XXX_BOARD_HAUPPAUGE_WINDHAM
},
684 { USB_DEVICE(0x2040, 0xb980),
685 .driver_info
= SMS1XXX_BOARD_HAUPPAUGE_WINDHAM
},
686 { USB_DEVICE(0x2040, 0xb990),
687 .driver_info
= SMS1XXX_BOARD_HAUPPAUGE_WINDHAM
},
688 { USB_DEVICE(0x2040, 0xc000),
689 .driver_info
= SMS1XXX_BOARD_HAUPPAUGE_WINDHAM
},
690 { USB_DEVICE(0x2040, 0xc010),
691 .driver_info
= SMS1XXX_BOARD_HAUPPAUGE_WINDHAM
},
692 { USB_DEVICE(0x2040, 0xc080),
693 .driver_info
= SMS1XXX_BOARD_HAUPPAUGE_WINDHAM
},
694 { USB_DEVICE(0x2040, 0xc090),
695 .driver_info
= SMS1XXX_BOARD_HAUPPAUGE_WINDHAM
},
696 { USB_DEVICE(0x2040, 0xc0a0),
697 .driver_info
= SMS1XXX_BOARD_HAUPPAUGE_WINDHAM
},
698 { USB_DEVICE(0x2040, 0xf5a0),
699 .driver_info
= SMS1XXX_BOARD_HAUPPAUGE_WINDHAM
},
700 { USB_DEVICE(0x187f, 0x0202),
701 .driver_info
= SMS1XXX_BOARD_SIANO_NICE
},
702 { USB_DEVICE(0x187f, 0x0301),
703 .driver_info
= SMS1XXX_BOARD_SIANO_VENICE
},
704 { USB_DEVICE(0x187f, 0x0302),
705 .driver_info
= SMS1XXX_BOARD_SIANO_VENICE
},
706 { USB_DEVICE(0x187f, 0x0310),
707 .driver_info
= SMS1XXX_BOARD_SIANO_MING
},
708 { USB_DEVICE(0x187f, 0x0500),
709 .driver_info
= SMS1XXX_BOARD_SIANO_PELE
},
710 { USB_DEVICE(0x187f, 0x0600),
711 .driver_info
= SMS1XXX_BOARD_SIANO_RIO
},
712 { USB_DEVICE(0x187f, 0x0700),
713 .driver_info
= SMS1XXX_BOARD_SIANO_DENVER_2160
},
714 { USB_DEVICE(0x187f, 0x0800),
715 .driver_info
= SMS1XXX_BOARD_SIANO_DENVER_1530
},
716 { USB_DEVICE(0x19D2, 0x0086),
717 .driver_info
= SMS1XXX_BOARD_ZTE_DVB_DATA_CARD
},
718 { USB_DEVICE(0x19D2, 0x0078),
719 .driver_info
= SMS1XXX_BOARD_ONDA_MDTV_DATA_CARD
},
720 { USB_DEVICE(0x3275, 0x0080),
721 .driver_info
= SMS1XXX_BOARD_SIANO_RIO
},
722 { USB_DEVICE(0x2013, 0x0257),
723 .driver_info
= SMS1XXX_BOARD_PCTV_77E
},
724 { } /* Terminating entry */
727 MODULE_DEVICE_TABLE(usb
, smsusb_id_table
);
729 static struct usb_driver smsusb_driver
= {
731 .probe
= smsusb_probe
,
732 .disconnect
= smsusb_disconnect
,
733 .id_table
= smsusb_id_table
,
735 .suspend
= smsusb_suspend
,
736 .resume
= smsusb_resume
,
739 module_usb_driver(smsusb_driver
);
741 MODULE_DESCRIPTION("Driver for the Siano SMS1xxx USB dongle");
742 MODULE_AUTHOR("Siano Mobile Silicon, INC. (uris@siano-ms.com)");
743 MODULE_LICENSE("GPL");