Lines Matching refs:usbatm
138 struct usbatm_data *usbatm; member
162 struct usbatm_data *usbatm = instance->usbatm; in speedtch_set_swbuff() local
163 struct usb_device *usb_dev = usbatm->usb_dev; in speedtch_set_swbuff()
169 usb_warn(usbatm, in speedtch_set_swbuff()
178 struct usbatm_data *usbatm = instance->usbatm; in speedtch_test_sequence() local
179 struct usb_device *usb_dev = usbatm->usb_dev; in speedtch_test_sequence()
189 usb_warn(usbatm, "%s failed on URB147: %d\n", __func__, ret); in speedtch_test_sequence()
197 usb_warn(usbatm, "%s failed on URB148: %d\n", __func__, ret); in speedtch_test_sequence()
206 usb_warn(usbatm, "%s failed on URB149: %d\n", __func__, ret); in speedtch_test_sequence()
215 usb_warn(usbatm, "%s failed on URB150: %d\n", __func__, ret); in speedtch_test_sequence()
224 usb_warn(usbatm, "%s failed on URBext1: %d\n", __func__, ret); in speedtch_test_sequence()
235 usb_warn(usbatm, "%s failed on URBext2: %d\n", __func__, ret); in speedtch_test_sequence()
243 usb_warn(usbatm, "%s failed on URBext3: %d\n", __func__, ret); in speedtch_test_sequence()
251 struct usbatm_data *usbatm = instance->usbatm; in speedtch_upload_firmware() local
252 struct usb_device *usb_dev = usbatm->usb_dev; in speedtch_upload_firmware()
257 usb_dbg(usbatm, "%s entered\n", __func__); in speedtch_upload_firmware()
261 usb_dbg(usbatm, "%s: no memory for buffer!\n", __func__); in speedtch_upload_firmware()
267 usb_dbg(usbatm, "%s: interface not found!\n", __func__); in speedtch_upload_firmware()
277 usb_warn(usbatm, "%s: read BLOCK0 from modem failed (%d)!\n", __func__, ret); in speedtch_upload_firmware()
279 usb_dbg(usbatm, "%s: BLOCK0 downloaded (%d bytes)\n", __func__, ret); in speedtch_upload_firmware()
291 usb_err(usbatm, "%s: write BLOCK1 to modem failed (%d)!\n", __func__, ret); in speedtch_upload_firmware()
294 usb_dbg(usbatm, "%s: BLOCK1 uploaded (%zu bytes)\n", __func__, fw1->size); in speedtch_upload_firmware()
304 usb_err(usbatm, "%s: read BLOCK2 from modem failed (%d)!\n", __func__, ret); in speedtch_upload_firmware()
307 usb_dbg(usbatm, "%s: BLOCK2 downloaded (%d bytes)\n", __func__, actual_length); in speedtch_upload_firmware()
318 usb_err(usbatm, "%s: write BLOCK3 to modem failed (%d)!\n", __func__, ret); in speedtch_upload_firmware()
322 usb_dbg(usbatm, "%s: BLOCK3 uploaded (%zu bytes)\n", __func__, fw2->size); in speedtch_upload_firmware()
331 usb_err(usbatm, "%s: read BLOCK4 from modem failed (%d)!\n", __func__, ret); in speedtch_upload_firmware()
336 usb_dbg(usbatm, "%s: BLOCK4 downloaded (%d bytes)\n", __func__, actual_length); in speedtch_upload_firmware()
343 …usb_err(usbatm, "%s: setting interface to %d failed (%d)!\n", __func__, instance->params.altsettin… in speedtch_upload_firmware()
362 static int speedtch_find_firmware(struct usbatm_data *usbatm, struct usb_interface *intf, in speedtch_find_firmware() argument
372 usb_dbg(usbatm, "%s: looking for %s\n", __func__, buf); in speedtch_find_firmware()
376 usb_dbg(usbatm, "%s: looking for %s\n", __func__, buf); in speedtch_find_firmware()
380 usb_dbg(usbatm, "%s: looking for %s\n", __func__, buf); in speedtch_find_firmware()
383 usb_err(usbatm, "%s: no stage %d firmware found!\n", __func__, phase); in speedtch_find_firmware()
389 usb_info(usbatm, "found stage %d firmware %s\n", phase, buf); in speedtch_find_firmware()
394 static int speedtch_heavy_init(struct usbatm_data *usbatm, struct usb_interface *intf) in speedtch_heavy_init() argument
397 struct speedtch_instance_data *instance = usbatm->driver_data; in speedtch_heavy_init()
400 if ((ret = speedtch_find_firmware(usbatm, intf, 1, &fw1)) < 0) in speedtch_heavy_init()
403 if ((ret = speedtch_find_firmware(usbatm, intf, 2, &fw2)) < 0) { in speedtch_heavy_init()
409 usb_err(usbatm, "%s: firmware upload failed (%d)!\n", __func__, ret); in speedtch_heavy_init()
424 struct usbatm_data *usbatm = instance->usbatm; in speedtch_read_status() local
425 struct usb_device *usb_dev = usbatm->usb_dev; in speedtch_read_status()
435 atm_dbg(usbatm, "%s: MSG 7 failed\n", __func__); in speedtch_read_status()
443 atm_dbg(usbatm, "%s: MSG B failed\n", __func__); in speedtch_read_status()
451 atm_dbg(usbatm, "%s: MSG D failed\n", __func__); in speedtch_read_status()
459 atm_dbg(usbatm, "%s: MSG E failed\n", __func__); in speedtch_read_status()
467 atm_dbg(usbatm, "%s: MSG F failed\n", __func__); in speedtch_read_status()
476 struct usbatm_data *usbatm = instance->usbatm; in speedtch_start_synchro() local
477 struct usb_device *usb_dev = usbatm->usb_dev; in speedtch_start_synchro()
481 atm_dbg(usbatm, "%s entered\n", __func__); in speedtch_start_synchro()
490 atm_warn(usbatm, "failed to start ADSL synchronisation: %d\n", ret); in speedtch_start_synchro()
492 atm_dbg(usbatm, "%s: modem prodded. %d bytes returned: %02x %02x\n", in speedtch_start_synchro()
503 struct usbatm_data *usbatm = instance->usbatm; in speedtch_check_status() local
504 struct atm_dev *atm_dev = usbatm->atm_dev; in speedtch_check_status()
510 atm_dbg(usbatm, "%s entered\n", __func__); in speedtch_check_status()
515 atm_warn(usbatm, "error %d fetching device status\n", ret); in speedtch_check_status()
525 atm_dbg(usbatm, "%s: line state 0x%02x\n", __func__, status); in speedtch_check_status()
531 atm_info(usbatm, "ADSL line is down\n"); in speedtch_check_status()
538 atm_info(usbatm, "ADSL line is blocked?\n"); in speedtch_check_status()
543 atm_info(usbatm, "ADSL line is synchronising\n"); in speedtch_check_status()
560 atm_info(usbatm, in speedtch_check_status()
567 atm_info(usbatm, "unknown line state %02x\n", status); in speedtch_check_status()
585 atm_warn(instance->usbatm, "Too many failures - disabling line status polling\n"); in speedtch_status_poll()
594 atm_dbg(instance->usbatm, "%s entered\n", __func__); in speedtch_resubmit_int()
601 atm_dbg(instance->usbatm, "%s: usb_submit_urb failed with result %d\n", __func__, ret); in speedtch_resubmit_int()
610 struct usbatm_data *usbatm = instance->usbatm; in speedtch_handle_int() local
620 atm_dbg(usbatm, "%s entered\n", __func__); in speedtch_handle_int()
623 atm_dbg(usbatm, "%s: nonzero urb status %d!\n", __func__, status); in speedtch_handle_int()
629 atm_info(usbatm, "DSL line goes up\n"); in speedtch_handle_int()
631 atm_info(usbatm, "DSL line goes down\n"); in speedtch_handle_int()
635 atm_dbg(usbatm, "%s: unknown interrupt packet of length %d:", __func__, count); in speedtch_handle_int()
646 atm_dbg(usbatm, "%s: usb_submit_urb failed with result %d\n", __func__, ret); in speedtch_handle_int()
658 static int speedtch_atm_start(struct usbatm_data *usbatm, struct atm_dev *atm_dev) in speedtch_atm_start() argument
660 struct usb_device *usb_dev = usbatm->usb_dev; in speedtch_atm_start()
661 struct speedtch_instance_data *instance = usbatm->driver_data; in speedtch_atm_start()
665 atm_dbg(usbatm, "%s entered\n", __func__); in speedtch_atm_start()
683 atm_dbg(usbatm, "%s: submission of interrupt URB failed (%d)!\n", __func__, ret); in speedtch_atm_start()
695 static void speedtch_atm_stop(struct usbatm_data *usbatm, struct atm_dev *atm_dev) in speedtch_atm_stop() argument
697 struct speedtch_instance_data *instance = usbatm->driver_data; in speedtch_atm_stop()
700 atm_dbg(usbatm, "%s entered\n", __func__); in speedtch_atm_stop()
770 static int speedtch_bind(struct usbatm_data *usbatm, in speedtch_bind() argument
782 usb_dbg(usbatm, "%s entered\n", __func__); in speedtch_bind()
787 usb_err(usbatm, "%s: wrong device class %d\n", __func__, usb_dev->descriptor.bDeviceClass); in speedtch_bind()
792 usb_err(usbatm, "%s: data interface not found!\n", __func__); in speedtch_bind()
802 ret = usb_driver_claim_interface(&speedtch_usb_driver, cur_intf, usbatm); in speedtch_bind()
805 usb_err(usbatm, "%s: failed to claim interface %2d (%d)!\n", __func__, i, ret); in speedtch_bind()
815 usb_err(usbatm, "%s: no memory for instance data!\n", __func__); in speedtch_bind()
820 instance->usbatm = usbatm; in speedtch_bind()
832 …usb_err(usbatm, "%s: setting interface to %2d failed (%d)!\n", __func__, instance->params.altsetti… in speedtch_bind()
838 …usb_dbg(usbatm, "%s: setting interface to %2d failed (%d)!\n", __func__, DEFAULT_ISOC_ALTSETTING, … in speedtch_bind()
844 const __u8 target_address = USB_DIR_IN | usbatm->driver->isoc_in; in speedtch_bind()
859 usb_info(usbatm, "isochronous transfer not supported - using bulk\n"); in speedtch_bind()
864 …usb_err(usbatm, "%s: setting interface to %2d failed (%d)!\n", __func__, DEFAULT_BULK_ALTSETTING, … in speedtch_bind()
871 usbatm->flags |= (use_isoc ? UDSL_USE_ISOC : 0); in speedtch_bind()
893 usb_dbg(usbatm, "%s: no memory for interrupt urb!\n", __func__); in speedtch_bind()
900 usbatm->flags |= (ret == SIZE_7 ? UDSL_SKIP_HEAVY_INIT : 0); in speedtch_bind()
902 …usb_dbg(usbatm, "%s: firmware %s loaded\n", __func__, usbatm->flags & UDSL_SKIP_HEAVY_INIT ? "alre… in speedtch_bind()
904 if (!(usbatm->flags & UDSL_SKIP_HEAVY_INIT)) in speedtch_bind()
906 usb_err(usbatm, "%s: device reset failed (%d)!\n", __func__, ret); in speedtch_bind()
910 usbatm->driver_data = instance; in speedtch_bind()
922 static void speedtch_unbind(struct usbatm_data *usbatm, struct usb_interface *intf) in speedtch_unbind() argument
925 struct speedtch_instance_data *instance = usbatm->driver_data; in speedtch_unbind()
927 usb_dbg(usbatm, "%s entered\n", __func__); in speedtch_unbind()