Searched refs:usbatm (Results 1 - 6 of 6) sorted by relevance

/linux-4.4.14/drivers/usb/atm/
H A Dspeedtch.c40 #include "usbatm.h"
137 struct usbatm_data *usbatm; member in struct:speedtch_instance_data
161 struct usbatm_data *usbatm = instance->usbatm; speedtch_set_swbuff() local
162 struct usb_device *usb_dev = usbatm->usb_dev; speedtch_set_swbuff()
168 usb_warn(usbatm, speedtch_set_swbuff()
172 usb_dbg(usbatm, "speedtch_set_swbuff: %sbled SW buffering\n", state ? "En" : "Dis"); speedtch_set_swbuff()
177 struct usbatm_data *usbatm = instance->usbatm; speedtch_test_sequence() local
178 struct usb_device *usb_dev = usbatm->usb_dev; speedtch_test_sequence()
188 usb_warn(usbatm, "%s failed on URB147: %d\n", __func__, ret); speedtch_test_sequence()
196 usb_warn(usbatm, "%s failed on URB148: %d\n", __func__, ret); speedtch_test_sequence()
205 usb_warn(usbatm, "%s failed on URB149: %d\n", __func__, ret); speedtch_test_sequence()
214 usb_warn(usbatm, "%s failed on URB150: %d\n", __func__, ret); speedtch_test_sequence()
223 usb_warn(usbatm, "%s failed on URBext1: %d\n", __func__, ret); speedtch_test_sequence()
234 usb_warn(usbatm, "%s failed on URBext2: %d\n", __func__, ret); speedtch_test_sequence()
242 usb_warn(usbatm, "%s failed on URBext3: %d\n", __func__, ret); speedtch_test_sequence()
250 struct usbatm_data *usbatm = instance->usbatm; speedtch_upload_firmware() local
251 struct usb_device *usb_dev = usbatm->usb_dev; speedtch_upload_firmware()
256 usb_dbg(usbatm, "%s entered\n", __func__); speedtch_upload_firmware()
261 usb_dbg(usbatm, "%s: no memory for buffer!\n", __func__); speedtch_upload_firmware()
267 usb_dbg(usbatm, "%s: interface not found!\n", __func__); speedtch_upload_firmware()
277 usb_warn(usbatm, "%s: read BLOCK0 from modem failed (%d)!\n", __func__, ret); speedtch_upload_firmware()
279 usb_dbg(usbatm, "%s: BLOCK0 downloaded (%d bytes)\n", __func__, ret); speedtch_upload_firmware()
291 usb_err(usbatm, "%s: write BLOCK1 to modem failed (%d)!\n", __func__, ret); speedtch_upload_firmware()
294 usb_dbg(usbatm, "%s: BLOCK1 uploaded (%zu bytes)\n", __func__, fw1->size); speedtch_upload_firmware()
304 usb_err(usbatm, "%s: read BLOCK2 from modem failed (%d)!\n", __func__, ret); speedtch_upload_firmware()
307 usb_dbg(usbatm, "%s: BLOCK2 downloaded (%d bytes)\n", __func__, actual_length); speedtch_upload_firmware()
318 usb_err(usbatm, "%s: write BLOCK3 to modem failed (%d)!\n", __func__, ret); speedtch_upload_firmware()
322 usb_dbg(usbatm, "%s: BLOCK3 uploaded (%zu bytes)\n", __func__, fw2->size); speedtch_upload_firmware()
331 usb_err(usbatm, "%s: read BLOCK4 from modem failed (%d)!\n", __func__, ret); speedtch_upload_firmware()
336 usb_dbg(usbatm, "%s: BLOCK4 downloaded (%d bytes)\n", __func__, actual_length); speedtch_upload_firmware()
343 usb_err(usbatm, "%s: setting interface to %d failed (%d)!\n", __func__, instance->params.altsetting, ret); speedtch_upload_firmware()
362 static int speedtch_find_firmware(struct usbatm_data *usbatm, struct usb_interface *intf, speedtch_find_firmware() argument
372 usb_dbg(usbatm, "%s: looking for %s\n", __func__, buf); speedtch_find_firmware()
376 usb_dbg(usbatm, "%s: looking for %s\n", __func__, buf); speedtch_find_firmware()
380 usb_dbg(usbatm, "%s: looking for %s\n", __func__, buf); speedtch_find_firmware()
383 usb_err(usbatm, "%s: no stage %d firmware found!\n", __func__, phase); speedtch_find_firmware()
389 usb_info(usbatm, "found stage %d firmware %s\n", phase, buf); speedtch_find_firmware()
394 static int speedtch_heavy_init(struct usbatm_data *usbatm, struct usb_interface *intf) speedtch_heavy_init() argument
397 struct speedtch_instance_data *instance = usbatm->driver_data; speedtch_heavy_init()
400 if ((ret = speedtch_find_firmware(usbatm, intf, 1, &fw1)) < 0) speedtch_heavy_init()
403 if ((ret = speedtch_find_firmware(usbatm, intf, 2, &fw2)) < 0) { speedtch_heavy_init()
409 usb_err(usbatm, "%s: firmware upload failed (%d)!\n", __func__, ret); speedtch_heavy_init()
424 struct usbatm_data *usbatm = instance->usbatm; speedtch_read_status() local
425 struct usb_device *usb_dev = usbatm->usb_dev; speedtch_read_status()
435 atm_dbg(usbatm, "%s: MSG 7 failed\n", __func__); speedtch_read_status()
443 atm_dbg(usbatm, "%s: MSG B failed\n", __func__); speedtch_read_status()
451 atm_dbg(usbatm, "%s: MSG D failed\n", __func__); speedtch_read_status()
459 atm_dbg(usbatm, "%s: MSG E failed\n", __func__); speedtch_read_status()
467 atm_dbg(usbatm, "%s: MSG F failed\n", __func__); speedtch_read_status()
476 struct usbatm_data *usbatm = instance->usbatm; speedtch_start_synchro() local
477 struct usb_device *usb_dev = usbatm->usb_dev; speedtch_start_synchro()
481 atm_dbg(usbatm, "%s entered\n", __func__); speedtch_start_synchro()
490 atm_warn(usbatm, "failed to start ADSL synchronisation: %d\n", ret); speedtch_start_synchro()
492 atm_dbg(usbatm, "%s: modem prodded. %d bytes returned: %02x %02x\n", speedtch_start_synchro()
503 struct usbatm_data *usbatm = instance->usbatm; speedtch_check_status() local
504 struct atm_dev *atm_dev = usbatm->atm_dev; speedtch_check_status()
510 atm_dbg(usbatm, "%s entered\n", __func__); speedtch_check_status()
515 atm_warn(usbatm, "error %d fetching device status\n", ret); speedtch_check_status()
525 atm_dbg(usbatm, "%s: line state 0x%02x\n", __func__, status); speedtch_check_status()
531 atm_info(usbatm, "ADSL line is down\n"); speedtch_check_status()
538 atm_info(usbatm, "ADSL line is blocked?\n"); speedtch_check_status()
543 atm_info(usbatm, "ADSL line is synchronising\n"); speedtch_check_status()
560 atm_info(usbatm, speedtch_check_status()
567 atm_info(usbatm, "unknown line state %02x\n", status); speedtch_check_status()
585 atm_warn(instance->usbatm, "Too many failures - disabling line status polling\n"); speedtch_status_poll()
594 atm_dbg(instance->usbatm, "%s entered\n", __func__); speedtch_resubmit_int()
601 atm_dbg(instance->usbatm, "%s: usb_submit_urb failed with result %d\n", __func__, ret); speedtch_resubmit_int()
610 struct usbatm_data *usbatm = instance->usbatm; speedtch_handle_int() local
620 atm_dbg(usbatm, "%s entered\n", __func__); speedtch_handle_int()
623 atm_dbg(usbatm, "%s: nonzero urb status %d!\n", __func__, status); speedtch_handle_int()
629 atm_info(usbatm, "DSL line goes up\n"); speedtch_handle_int()
631 atm_info(usbatm, "DSL line goes down\n"); speedtch_handle_int()
635 atm_dbg(usbatm, "%s: unknown interrupt packet of length %d:", __func__, count); speedtch_handle_int()
647 atm_dbg(usbatm, "%s: usb_submit_urb failed with result %d\n", __func__, ret); speedtch_handle_int()
660 static int speedtch_atm_start(struct usbatm_data *usbatm, struct atm_dev *atm_dev) speedtch_atm_start() argument
662 struct usb_device *usb_dev = usbatm->usb_dev; speedtch_atm_start()
663 struct speedtch_instance_data *instance = usbatm->driver_data; speedtch_atm_start()
667 atm_dbg(usbatm, "%s entered\n", __func__); speedtch_atm_start()
685 atm_dbg(usbatm, "%s: submission of interrupt URB failed (%d)!\n", __func__, ret); speedtch_atm_start()
697 static void speedtch_atm_stop(struct usbatm_data *usbatm, struct atm_dev *atm_dev) speedtch_atm_stop() argument
699 struct speedtch_instance_data *instance = usbatm->driver_data; speedtch_atm_stop()
702 atm_dbg(usbatm, "%s entered\n", __func__); speedtch_atm_stop()
774 static int speedtch_bind(struct usbatm_data *usbatm, speedtch_bind() argument
786 usb_dbg(usbatm, "%s entered\n", __func__); speedtch_bind()
791 usb_err(usbatm, "%s: wrong device class %d\n", __func__, usb_dev->descriptor.bDeviceClass); speedtch_bind()
797 usb_err(usbatm, "%s: data interface not found!\n", __func__); speedtch_bind()
807 ret = usb_driver_claim_interface(&speedtch_usb_driver, cur_intf, usbatm); speedtch_bind()
810 usb_err(usbatm, "%s: failed to claim interface %2d (%d)!\n", __func__, i, ret); speedtch_bind()
820 usb_err(usbatm, "%s: no memory for instance data!\n", __func__); speedtch_bind()
825 instance->usbatm = usbatm; speedtch_bind()
837 usb_err(usbatm, "%s: setting interface to %2d failed (%d)!\n", __func__, instance->params.altsetting, ret); speedtch_bind()
843 usb_dbg(usbatm, "%s: setting interface to %2d failed (%d)!\n", __func__, DEFAULT_ISOC_ALTSETTING, ret); speedtch_bind()
849 const __u8 target_address = USB_DIR_IN | usbatm->driver->isoc_in; speedtch_bind()
864 usb_info(usbatm, "isochronous transfer not supported - using bulk\n"); speedtch_bind()
869 usb_err(usbatm, "%s: setting interface to %2d failed (%d)!\n", __func__, DEFAULT_BULK_ALTSETTING, ret); speedtch_bind()
876 usbatm->flags |= (use_isoc ? UDSL_USE_ISOC : 0); speedtch_bind()
898 usb_dbg(usbatm, "%s: no memory for interrupt urb!\n", __func__); speedtch_bind()
905 usbatm->flags |= (ret == SIZE_7 ? UDSL_SKIP_HEAVY_INIT : 0); speedtch_bind()
907 usb_dbg(usbatm, "%s: firmware %s loaded\n", __func__, usbatm->flags & UDSL_SKIP_HEAVY_INIT ? "already" : "not"); speedtch_bind()
909 if (!(usbatm->flags & UDSL_SKIP_HEAVY_INIT)) speedtch_bind()
911 usb_err(usbatm, "%s: device reset failed (%d)!\n", __func__, ret); speedtch_bind()
915 usbatm->driver_data = instance; speedtch_bind()
927 static void speedtch_unbind(struct usbatm_data *usbatm, struct usb_interface *intf) speedtch_unbind() argument
930 struct speedtch_instance_data *instance = usbatm->driver_data; speedtch_unbind()
932 usb_dbg(usbatm, "%s entered\n", __func__); speedtch_unbind()
H A Dxusbatm.c2 * xusbatm.c - dumb usbatm-based driver for modems initialized in userspace
25 #include "usbatm.h"
66 static int xusbatm_capture_intf(struct usbatm_data *usbatm, struct usb_device *usb_dev, xusbatm_capture_intf() argument
72 if (claim && (ret = usb_driver_claim_interface(&xusbatm_usb_driver, intf, usbatm))) { xusbatm_capture_intf()
73 usb_err(usbatm, "%s: failed to claim interface %2d (%d)!\n", __func__, ifnum, ret); xusbatm_capture_intf()
78 usb_err(usbatm, "%s: altsetting %2d for interface %2d failed (%d)!\n", __func__, altsetting, ifnum, ret); xusbatm_capture_intf()
92 static int xusbatm_bind(struct usbatm_data *usbatm, xusbatm_bind() argument
103 usb_dbg(usbatm, "%s: binding driver %d: vendor %04x product %04x" xusbatm_bind()
111 usb_dbg(usbatm, "%s: no interface contains endpoint %02x in altsetting %2d\n", xusbatm_bind()
114 usb_dbg(usbatm, "%s: no interface contains endpoint %02x in altsetting %2d\n", xusbatm_bind()
123 usb_err(usbatm, "%s: altsettings clash on interface %2d (%2d vs %2d)!\n", __func__, xusbatm_bind()
128 usb_dbg(usbatm, "%s: rx If#=%2d; tx If#=%2d\n", __func__, xusbatm_bind()
132 ret = xusbatm_capture_intf(usbatm, usb_dev, rx_intf, rx_alt, rx_intf != intf); xusbatm_bind()
136 if ((tx_intf != rx_intf) && (ret = xusbatm_capture_intf(usbatm, usb_dev, tx_intf, tx_alt, tx_intf != intf))) { xusbatm_bind()
144 static void xusbatm_unbind(struct usbatm_data *usbatm, xusbatm_unbind() argument
150 usb_dbg(usbatm, "%s entered\n", __func__); xusbatm_unbind()
155 if (cur_intf && (usb_get_intfdata(cur_intf) == usbatm)) { xusbatm_unbind()
162 static int xusbatm_atm_start(struct usbatm_data *usbatm, xusbatm_atm_start() argument
165 atm_dbg(usbatm, "%s entered\n", __func__); xusbatm_atm_start()
H A Dcxacru.c29 * into usbatm), and the userspace firmware loading utility.
43 #include "usbatm.h"
186 struct usbatm_data *usbatm; member in struct:cxacru_data
326 if (instance == NULL || instance->usbatm->atm_dev == NULL) cxacru_sysfs_show_mac_address()
330 instance->usbatm->atm_dev->esi); cxacru_sysfs_show_mac_address()
377 atm_err(instance->usbatm, "change adsl state:" cxacru_sysfs_store_adsl_state()
397 atm_err(instance->usbatm, "change adsl state:" cxacru_sysfs_store_adsl_state()
499 atm_err(instance->usbatm, cxacru_sysfs_store_adsl_config()
508 atm_info(instance->usbatm, "config%s\n", log); cxacru_sysfs_store_adsl_config()
598 usb_err(instance->usbatm, "requested transfer size too large (%d, %d)\n", cxacru_cm()
611 usb_err(instance->usbatm, "submit of read urb for cm %#x failed (%d)\n", cxacru_cm()
629 usb_err(instance->usbatm, "submit of write urb for cm %#x failed (%d)\n", cxacru_cm()
637 usb_err(instance->usbatm, "send of cm %#x failed (%d)\n", cm, ret); cxacru_cm()
644 usb_err(instance->usbatm, "receive of cm %#x failed (%d)\n", cm, ret); cxacru_cm()
649 usb_err(instance->usbatm, "invalid response length to cm %#x: %d\n", cxacru_cm()
659 usb_err(instance->usbatm, "wrong cm %#x in response to cm %#x\n", cxacru_cm()
666 usb_err(instance->usbatm, "response to cm %#x failed: %#x\n", cxacru_cm()
678 usb_dbg(instance->usbatm, "cm %#x\n", cm); cxacru_cm()
710 usb_err(instance->usbatm, "invalid data length from cm %#x: %d\n", cxacru_cm_get_array()
719 usb_err(instance->usbatm, "wrong index %#x in response to cm %#x\n", cxacru_cm_get_array()
740 usb_dbg(instance->usbatm, "cxacru_adsl_start: CARD_GET_STATUS returned %d\n", ret); cxacru_card_status()
825 struct usbatm_data *usbatm = instance->usbatm; cxacru_poll_status() local
826 struct atm_dev *atm_dev = usbatm->atm_dev; cxacru_poll_status()
833 atm_warn(usbatm, "poll status: error %d\n", ret); cxacru_poll_status()
840 atm_warn(usbatm, "polling disabled, set adsl_state" cxacru_poll_status()
854 atm_printk(KERN_INFO, usbatm, "ADSL state: running\n"); cxacru_poll_status()
858 atm_printk(KERN_INFO, usbatm, "ADSL state: stopped\n"); cxacru_poll_status()
862 atm_printk(KERN_INFO, usbatm, "Unknown adsl status %02x\n", instance->adsl_status); cxacru_poll_status()
874 atm_info(usbatm, "ADSL line: down\n"); cxacru_poll_status()
879 atm_info(usbatm, "ADSL line: attempting to activate\n"); cxacru_poll_status()
884 atm_info(usbatm, "ADSL line: training\n"); cxacru_poll_status()
889 atm_info(usbatm, "ADSL line: channel analysis\n"); cxacru_poll_status()
894 atm_info(usbatm, "ADSL line: exchange\n"); cxacru_poll_status()
901 atm_info(usbatm, "ADSL line: up (%d kb/s down | %d kb/s up)\n", cxacru_poll_status()
907 atm_info(usbatm, "ADSL line: waiting\n"); cxacru_poll_status()
912 atm_info(usbatm, "ADSL line: initializing\n"); cxacru_poll_status()
917 atm_info(usbatm, "Unknown line state %02x\n", instance->line_status); cxacru_poll_status()
990 struct usbatm_data *usbatm = instance->usbatm; cxacru_upload_firmware() local
991 struct usb_device *usb_dev = usbatm->usb_dev; cxacru_upload_firmware()
996 usb_dbg(usbatm, "%s\n", __func__); cxacru_upload_firmware()
1002 usb_err(usbatm, "FirmwarePllFClkValue failed: %d\n", ret); cxacru_upload_firmware()
1010 usb_err(usbatm, "FirmwarePllBClkValue failed: %d\n", ret); cxacru_upload_firmware()
1018 usb_err(usbatm, "Enable SDRAM failed: %d\n", ret); cxacru_upload_firmware()
1023 usb_info(usbatm, "loading firmware\n"); cxacru_upload_firmware()
1026 usb_err(usbatm, "Firmware upload failed: %d\n", ret); cxacru_upload_firmware()
1032 usb_info(usbatm, "loading boot ROM patch\n"); cxacru_upload_firmware()
1035 usb_err(usbatm, "Boot ROM patching failed: %d\n", ret); cxacru_upload_firmware()
1043 usb_err(usbatm, "Signature storing failed: %d\n", ret); cxacru_upload_firmware()
1047 usb_info(usbatm, "starting device\n"); cxacru_upload_firmware()
1055 usb_err(usbatm, "Passing control to firmware failed: %d\n", ret); cxacru_upload_firmware()
1069 usb_err(usbatm, "modem failed to initialize: %d\n", ret); cxacru_upload_firmware()
1077 struct usbatm_data *usbatm = instance->usbatm; cxacru_find_firmware() local
1078 struct device *dev = &usbatm->usb_intf->dev; cxacru_find_firmware()
1082 usb_dbg(usbatm, "cxacru_find_firmware: looking for %s\n", buf); cxacru_find_firmware()
1085 usb_dbg(usbatm, "no stage %s firmware found\n", phase); cxacru_find_firmware()
1089 usb_info(usbatm, "found firmware %s\n", buf); cxacru_find_firmware()
1145 instance->usbatm = usbatm_instance; cxacru_bind()
H A Dusbatm.h2 * usbatm.h - Generic USB xDSL driver core
128 struct usbatm_data *usbatm; member in struct:usbatm_channel
H A Dueagle-atm.c73 #include "usbatm.h"
149 struct usbatm_data *usbatm; member in struct:uea_softc
601 if (sc->usbatm->atm_dev) \
602 sc->usbatm->atm_dev->type = val; \
607 if (sc->usbatm->atm_dev) \
608 atm_dev_signal_change(sc->usbatm->atm_dev, val); \
2225 * all usbatm generic initialization is done. uea_boot()
2274 struct usbatm_data *usbatm; dev_to_uea() local
2280 usbatm = usb_get_intfdata(intf); dev_to_uea()
2281 if (!usbatm) dev_to_uea()
2284 return usbatm->driver_data; dev_to_uea()
2474 static int uea_atm_open(struct usbatm_data *usbatm, struct atm_dev *atm_dev) uea_atm_open() argument
2476 struct uea_softc *sc = usbatm->driver_data; uea_atm_open()
2481 static int uea_heavy(struct usbatm_data *usbatm, struct usb_interface *intf) uea_heavy() argument
2483 struct uea_softc *sc = usbatm->driver_data; uea_heavy()
2492 struct usbatm_data *usbatm, int ifnum) claim_interface()
2502 ret = usb_driver_claim_interface(&uea_driver, intf, usbatm); claim_interface()
2534 static int uea_bind(struct usbatm_data *usbatm, struct usb_interface *intf, uea_bind() argument
2548 usbatm->flags = (sync_wait[modem_index] ? 0 : UDSL_SKIP_HEAVY_INIT); uea_bind()
2551 ret = claim_interface(usb, usbatm, UEA_US_IFACE_NO); uea_bind()
2558 ret = claim_interface(usb, usbatm, UEA_DS_IFACE_NO); uea_bind()
2570 usbatm->driver_data = sc; uea_bind()
2571 sc->usbatm = usbatm; uea_bind()
2596 usbatm->flags |= UDSL_USE_ISOC | UDSL_IGNORE_EILSEQ; uea_bind()
2620 static void uea_unbind(struct usbatm_data *usbatm, struct usb_interface *intf) uea_unbind() argument
2622 struct uea_softc *sc = usbatm->driver_data; uea_unbind()
2659 struct usbatm_data *usbatm = usb_get_intfdata(intf); uea_probe() local
2660 struct uea_softc *sc = usbatm->driver_data; uea_probe()
2491 claim_interface(struct usb_device *usb_dev, struct usbatm_data *usbatm, int ifnum) claim_interface() argument
H A Dusbatm.c2 * usbatm.c - Generic USB xDSL driver core
65 #include "usbatm.h"
99 static const char usbatm_driver_name[] = "usbatm";
239 atm_warn(channel->usbatm, "%s: urb 0x%p submission failed (%d)!\n", usbatm_submit_urb()
276 (!(channel->usbatm->flags & UDSL_IGNORE_EILSEQ) || usbatm_complete()
282 atm_warn(channel->usbatm, "%s: urb 0x%p failed (%d)!\n", usbatm_complete()
1094 instance->rx_channel.usbatm = instance->tx_channel.usbatm = instance; usbatm_usb_probe()

Completed in 117 milliseconds