diff options
author | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2013-09-12 16:00:00 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2013-10-14 05:40:56 -0400 |
commit | 811a4f6d11ab5f0b7b1c130407c9120c0ee954b2 (patch) | |
tree | 4c8a14a50fe3d6c365dafc2069df4ff3796e8a63 /drivers/media/usb/siano | |
parent | f43b396c71193a6f5f77863ca12e9bf7cf9914b4 (diff) |
[media] siano: Fix initialization for Stellar models
Since kernel 3.8, the initialization for Stellar (sms1000)
devices are broken.
Those devices have a behaviour different than usual sms1100
and sms2270: they start with one USB ID (devices in cold state),
but after firmware load, they get a different USB ID.
This weren't docummented at the driver. So, the patches that added
support for sms2270 broke it.
Properly documment it, and provide a debug log that allows to
follow all phases of the device initialization:
smsusb_probe: board id=13, interface number 0
smsusb_probe: interface 0 won't be used. Expecting interface 1 to popup
smsusb_probe: board id=13, interface number 1
smsusb_probe: smsusb_probe 1
smsusb_probe: endpoint 0 81 02 64
smsusb_probe: endpoint 1 02 02 64
smsusb_probe: stellar device in cold state was found at usb\4-2.
smsusb1_load_firmware: sent 38144(38144) bytes, rc 0
smsusb1_load_firmware: read FW dvbt_bda_stellar_usb.inp, size=38144
smsusb_probe: stellar device now in warm state
usbcore: registered new interface driver smsusb
usb 4-2: USB disconnect, device number 52
usb 4-2: new full-speed USB device number 53 using uhci_hcd
usb 4-2: New USB device found, idVendor=187f, idProduct=0100
usb 4-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 4-2: Product: SMS DVBT-BDA Receiver
usb 4-2: Manufacturer: Siano Mobile Silicon
smsusb_probe: board id=1, interface number 0
smsusb_probe: smsusb_probe 0
smsusb_probe: endpoint 0 81 02 64
smsusb_probe: endpoint 1 02 02 64
smsusb_init_device: in_ep = 81, out_ep = 02
smscore_register_device: allocated 50 buffers
smscore_register_device: device ffff88012a00bc00 created
smsusb_init_device: smsusb_start_streaming(...).
smscore_set_device_mode: set device mode to 4
smsusb1_detectmode: 4 "SMS DVBT-BDA Receiver"
smsusb_sendrequest: sending MSG_SMS_INIT_DEVICE_REQ(578) size: 12
smsusb_onresponse: received MSG_SMS_INIT_DEVICE_RES(579) size: 12
smscore_set_device_mode: Success setting device mode.
smscore_init_ir: IR port has not been detected
smscore_start_device: device ffff88012a00bc00 started, rc 0
smsusb_init_device: device 0xffff88002cfa6000 created
smsusb_probe: Device initialized with return code 0
DVB: registering new adapter (Siano Stellar Digital Receiver)
usb 4-2: DVB: registering adapter 0 frontend 0 (Siano Mobile Digital MDTV Receiver)...
smscore_register_client: ffff88012174a000 693 1
sms_board_dvb3_event: DVB3_EVENT_HOTPLUG
smsdvb_hotplug: success
smsdvb_module_init:
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Tested-by: André Roth <neolynx@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/usb/siano')
-rw-r--r-- | drivers/media/usb/siano/smsusb.c | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/drivers/media/usb/siano/smsusb.c b/drivers/media/usb/siano/smsusb.c index 74236b8007c7..33f357510194 100644 --- a/drivers/media/usb/siano/smsusb.c +++ b/drivers/media/usb/siano/smsusb.c | |||
@@ -491,15 +491,26 @@ static int smsusb_probe(struct usb_interface *intf, | |||
491 | } | 491 | } |
492 | 492 | ||
493 | if (id->driver_info == SMS1XXX_BOARD_SIANO_STELLAR_ROM) { | 493 | if (id->driver_info == SMS1XXX_BOARD_SIANO_STELLAR_ROM) { |
494 | /* Detected a Siano Stellar uninitialized */ | ||
495 | |||
494 | snprintf(devpath, sizeof(devpath), "usb\\%d-%s", | 496 | snprintf(devpath, sizeof(devpath), "usb\\%d-%s", |
495 | udev->bus->busnum, udev->devpath); | 497 | udev->bus->busnum, udev->devpath); |
496 | sms_info("stellar device was found."); | 498 | sms_info("stellar device in cold state was found at %s.", devpath); |
497 | return smsusb1_load_firmware( | 499 | rc = smsusb1_load_firmware( |
498 | udev, smscore_registry_getmode(devpath), | 500 | udev, smscore_registry_getmode(devpath), |
499 | id->driver_info); | 501 | id->driver_info); |
502 | |||
503 | /* This device will reset and gain another USB ID */ | ||
504 | if (!rc) | ||
505 | sms_info("stellar device now in warm state"); | ||
506 | else | ||
507 | sms_err("Failed to put stellar in warm state. Error: %d", rc); | ||
508 | |||
509 | return rc; | ||
510 | } else { | ||
511 | rc = smsusb_init_device(intf, id->driver_info); | ||
500 | } | 512 | } |
501 | 513 | ||
502 | rc = smsusb_init_device(intf, id->driver_info); | ||
503 | sms_info("Device initialized with return code %d", rc); | 514 | sms_info("Device initialized with return code %d", rc); |
504 | sms_board_load_modules(id->driver_info); | 515 | sms_board_load_modules(id->driver_info); |
505 | return rc; | 516 | return rc; |
@@ -552,10 +563,13 @@ static int smsusb_resume(struct usb_interface *intf) | |||
552 | } | 563 | } |
553 | 564 | ||
554 | static const struct usb_device_id smsusb_id_table[] = { | 565 | static const struct usb_device_id smsusb_id_table[] = { |
566 | /* This device is only present before firmware load */ | ||
555 | { USB_DEVICE(0x187f, 0x0010), | 567 | { USB_DEVICE(0x187f, 0x0010), |
556 | .driver_info = SMS1XXX_BOARD_SIANO_STELLAR }, | 568 | .driver_info = SMS1XXX_BOARD_SIANO_STELLAR_ROM }, |
569 | /* This device pops up after firmware load */ | ||
557 | { USB_DEVICE(0x187f, 0x0100), | 570 | { USB_DEVICE(0x187f, 0x0100), |
558 | .driver_info = SMS1XXX_BOARD_SIANO_STELLAR }, | 571 | .driver_info = SMS1XXX_BOARD_SIANO_STELLAR }, |
572 | |||
559 | { USB_DEVICE(0x187f, 0x0200), | 573 | { USB_DEVICE(0x187f, 0x0200), |
560 | .driver_info = SMS1XXX_BOARD_SIANO_NOVA_A }, | 574 | .driver_info = SMS1XXX_BOARD_SIANO_NOVA_A }, |
561 | { USB_DEVICE(0x187f, 0x0201), | 575 | { USB_DEVICE(0x187f, 0x0201), |