diff options
author | Simon Arlott <simon@fire.lp0.eu> | 2009-11-21 10:12:56 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-03-02 17:53:00 -0500 |
commit | 885582c48e5fbf47ccc4273aaa5f2f56ad513253 (patch) | |
tree | efcebf08914aef7b186cc360e3508a68d1e07a08 /drivers/usb | |
parent | c68bb0d738897ed39b90c7ccb22e01c938117051 (diff) |
USB: cxacru: firmware writes on OHCI are slow, log progress
Firmware writing takes 256ms per 4KB with OHCI, which
is very slow compared to 7ms per 4KB with UHCI.
Until I have access to a hardware USB analyser it may
not be possible to determine why this happens.
Instead of appearing to do nothing, log progress when
writing firmware and then log the ATM device information
when finished. Remove an unnecessary 4 second delay.
Signed-off-by: Simon Arlott <simon@fire.lp0.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/atm/cxacru.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/usb/atm/cxacru.c b/drivers/usb/atm/cxacru.c index 5dc21383aa83..5e3d7b9a78a7 100644 --- a/drivers/usb/atm/cxacru.c +++ b/drivers/usb/atm/cxacru.c | |||
@@ -725,6 +725,9 @@ static int cxacru_atm_start(struct usbatm_data *usbatm_instance, | |||
725 | mutex_unlock(&instance->poll_state_serialize); | 725 | mutex_unlock(&instance->poll_state_serialize); |
726 | mutex_unlock(&instance->adsl_state_serialize); | 726 | mutex_unlock(&instance->adsl_state_serialize); |
727 | 727 | ||
728 | printk(KERN_INFO "%s%d: %s %pM\n", atm_dev->type, atm_dev->number, | ||
729 | usbatm_instance->description, atm_dev->esi); | ||
730 | |||
728 | if (start_polling) | 731 | if (start_polling) |
729 | cxacru_poll_status(&instance->poll_work.work); | 732 | cxacru_poll_status(&instance->poll_work.work); |
730 | return 0; | 733 | return 0; |
@@ -939,6 +942,7 @@ static void cxacru_upload_firmware(struct cxacru_data *instance, | |||
939 | } | 942 | } |
940 | 943 | ||
941 | /* Firmware */ | 944 | /* Firmware */ |
945 | usb_info(usbatm, "loading firmware\n"); | ||
942 | ret = cxacru_fw(usb_dev, FW_WRITE_MEM, 0x2, 0x0, FW_ADDR, fw->data, fw->size); | 946 | ret = cxacru_fw(usb_dev, FW_WRITE_MEM, 0x2, 0x0, FW_ADDR, fw->data, fw->size); |
943 | if (ret) { | 947 | if (ret) { |
944 | usb_err(usbatm, "Firmware upload failed: %d\n", ret); | 948 | usb_err(usbatm, "Firmware upload failed: %d\n", ret); |
@@ -947,6 +951,7 @@ static void cxacru_upload_firmware(struct cxacru_data *instance, | |||
947 | 951 | ||
948 | /* Boot ROM patch */ | 952 | /* Boot ROM patch */ |
949 | if (instance->modem_type->boot_rom_patch) { | 953 | if (instance->modem_type->boot_rom_patch) { |
954 | usb_info(usbatm, "loading boot ROM patch\n"); | ||
950 | ret = cxacru_fw(usb_dev, FW_WRITE_MEM, 0x2, 0x0, BR_ADDR, bp->data, bp->size); | 955 | ret = cxacru_fw(usb_dev, FW_WRITE_MEM, 0x2, 0x0, BR_ADDR, bp->data, bp->size); |
951 | if (ret) { | 956 | if (ret) { |
952 | usb_err(usbatm, "Boot ROM patching failed: %d\n", ret); | 957 | usb_err(usbatm, "Boot ROM patching failed: %d\n", ret); |
@@ -961,6 +966,7 @@ static void cxacru_upload_firmware(struct cxacru_data *instance, | |||
961 | return; | 966 | return; |
962 | } | 967 | } |
963 | 968 | ||
969 | usb_info(usbatm, "starting device\n"); | ||
964 | if (instance->modem_type->boot_rom_patch) { | 970 | if (instance->modem_type->boot_rom_patch) { |
965 | val = cpu_to_le32(BR_ADDR); | 971 | val = cpu_to_le32(BR_ADDR); |
966 | ret = cxacru_fw(usb_dev, FW_WRITE_MEM, 0x2, 0x0, BR_STACK_ADDR, (u8 *) &val, 4); | 972 | ret = cxacru_fw(usb_dev, FW_WRITE_MEM, 0x2, 0x0, BR_STACK_ADDR, (u8 *) &val, 4); |
@@ -1004,8 +1010,6 @@ static void cxacru_upload_firmware(struct cxacru_data *instance, | |||
1004 | return; | 1010 | return; |
1005 | } | 1011 | } |
1006 | } | 1012 | } |
1007 | |||
1008 | msleep_interruptible(4000); | ||
1009 | } | 1013 | } |
1010 | 1014 | ||
1011 | static int cxacru_find_firmware(struct cxacru_data *instance, | 1015 | static int cxacru_find_firmware(struct cxacru_data *instance, |