diff options
author | Inaky Perez-Gonzalez <inaky@linux.intel.com> | 2009-04-30 17:39:21 -0400 |
---|---|---|
committer | Inaky Perez-Gonzalez <inaky@linux.intel.com> | 2009-05-28 21:02:11 -0400 |
commit | a0a4c4c9e54ee4255f46eedb572ad69ee34c77b6 (patch) | |
tree | bc71faf4b93433c4f9fac1b575de014f9d0b172b /drivers/net/wimax | |
parent | 52a8d9630890f2289354d03e8751bf0eba2b3376 (diff) |
wimax/i2400m: sdio: set the block size before enabling the function
From a fix by Cindy H Kao:
Block size has to be set before sending IOE enable because the
firmware reads the block size register before it reads IOE register.
Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Diffstat (limited to 'drivers/net/wimax')
-rw-r--r-- | drivers/net/wimax/i2400m/sdio.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/net/wimax/i2400m/sdio.c b/drivers/net/wimax/i2400m/sdio.c index 5ac5e76701cd..777c981676fc 100644 --- a/drivers/net/wimax/i2400m/sdio.c +++ b/drivers/net/wimax/i2400m/sdio.c | |||
@@ -409,19 +409,19 @@ int i2400ms_probe(struct sdio_func *func, | |||
409 | i2400m->bus_fw_names = i2400ms_bus_fw_names; | 409 | i2400m->bus_fw_names = i2400ms_bus_fw_names; |
410 | i2400m->bus_bm_mac_addr_impaired = 1; | 410 | i2400m->bus_bm_mac_addr_impaired = 1; |
411 | 411 | ||
412 | result = i2400ms_enable_function(i2400ms->func); | ||
413 | if (result < 0) { | ||
414 | dev_err(dev, "Cannot enable SDIO function: %d\n", result); | ||
415 | goto error_func_enable; | ||
416 | } | ||
417 | |||
418 | sdio_claim_host(func); | 412 | sdio_claim_host(func); |
419 | result = sdio_set_block_size(func, I2400MS_BLK_SIZE); | 413 | result = sdio_set_block_size(func, I2400MS_BLK_SIZE); |
414 | sdio_release_host(func); | ||
420 | if (result < 0) { | 415 | if (result < 0) { |
421 | dev_err(dev, "Failed to set block size: %d\n", result); | 416 | dev_err(dev, "Failed to set block size: %d\n", result); |
422 | goto error_set_blk_size; | 417 | goto error_set_blk_size; |
423 | } | 418 | } |
424 | sdio_release_host(func); | 419 | |
420 | result = i2400ms_enable_function(i2400ms->func); | ||
421 | if (result < 0) { | ||
422 | dev_err(dev, "Cannot enable SDIO function: %d\n", result); | ||
423 | goto error_func_enable; | ||
424 | } | ||
425 | 425 | ||
426 | result = i2400m_setup(i2400m, I2400M_BRI_NO_REBOOT); | 426 | result = i2400m_setup(i2400m, I2400M_BRI_NO_REBOOT); |
427 | if (result < 0) { | 427 | if (result < 0) { |
@@ -440,12 +440,12 @@ int i2400ms_probe(struct sdio_func *func, | |||
440 | error_debugfs_add: | 440 | error_debugfs_add: |
441 | i2400m_release(i2400m); | 441 | i2400m_release(i2400m); |
442 | error_setup: | 442 | error_setup: |
443 | sdio_set_drvdata(func, NULL); | ||
444 | sdio_claim_host(func); | 443 | sdio_claim_host(func); |
445 | error_set_blk_size: | ||
446 | sdio_disable_func(func); | 444 | sdio_disable_func(func); |
447 | sdio_release_host(func); | 445 | sdio_release_host(func); |
448 | error_func_enable: | 446 | error_func_enable: |
447 | error_set_blk_size: | ||
448 | sdio_set_drvdata(func, NULL); | ||
449 | free_netdev(net_dev); | 449 | free_netdev(net_dev); |
450 | error_alloc_netdev: | 450 | error_alloc_netdev: |
451 | return result; | 451 | return result; |