diff options
author | Inaky Perez-Gonzalez <inaky@linux.intel.com> | 2009-09-16 21:33:26 -0400 |
---|---|---|
committer | Inaky Perez-Gonzalez <inaky@linux.intel.com> | 2009-10-19 02:56:09 -0400 |
commit | 2869da8587604e3fea5f85aeade486a08e8313bf (patch) | |
tree | e5894e5ffbc7eea4c3dc01406abfbbcfd8022467 /drivers/net/wimax/i2400m/sdio.c | |
parent | 0856ccf29dfbaf957e4be80dd3eb88d97810b633 (diff) |
wimax/i2400m: do bootmode buffer management in i2400m_setup/release()
After the introduction of i2400m->bus_setup/release, there is no more
race condition where the bootmode buffers are needed before
i2400m_setup() is called.
Before, the SDIO driver would setup RX before calling i2400m_setup()
and thus need those buffers; now RX setup is done in
i2400m->bus_setup(), which is called by i2400m_setup().
Thus, all the bootmode buffer management can now be done completely
inside i2400m_setup()/i2400m_release(), removing complexity from the
bus-specific drivers.
Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Diffstat (limited to 'drivers/net/wimax/i2400m/sdio.c')
-rw-r--r-- | drivers/net/wimax/i2400m/sdio.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/drivers/net/wimax/i2400m/sdio.c b/drivers/net/wimax/i2400m/sdio.c index 6e39665ecd89..14e66f06f235 100644 --- a/drivers/net/wimax/i2400m/sdio.c +++ b/drivers/net/wimax/i2400m/sdio.c | |||
@@ -519,18 +519,6 @@ int i2400ms_probe(struct sdio_func *func, | |||
519 | i2400m->bus_bm_mac_addr_impaired = 1; | 519 | i2400m->bus_bm_mac_addr_impaired = 1; |
520 | i2400m->bus_bm_pokes_table = &i2400ms_pokes[0]; | 520 | i2400m->bus_bm_pokes_table = &i2400ms_pokes[0]; |
521 | 521 | ||
522 | /* | ||
523 | * Before we are enabling the device interrupt register, make | ||
524 | * sure the buffer used during bootmode operation is setup so | ||
525 | * when the first D2H data interrupt comes, the memory is | ||
526 | * available for copying the D2H data. | ||
527 | */ | ||
528 | result = i2400m_bm_buf_alloc(i2400m); | ||
529 | if (result < 0) { | ||
530 | dev_err(dev, "cannot allocate SDIO bootmode buffer\n"); | ||
531 | goto error_bootmode_buf_setup; | ||
532 | } | ||
533 | |||
534 | result = i2400m_setup(i2400m, I2400M_BRI_NO_REBOOT); | 522 | result = i2400m_setup(i2400m, I2400M_BRI_NO_REBOOT); |
535 | if (result < 0) { | 523 | if (result < 0) { |
536 | dev_err(dev, "cannot setup device: %d\n", result); | 524 | dev_err(dev, "cannot setup device: %d\n", result); |
@@ -548,8 +536,6 @@ int i2400ms_probe(struct sdio_func *func, | |||
548 | error_debugfs_add: | 536 | error_debugfs_add: |
549 | i2400m_release(i2400m); | 537 | i2400m_release(i2400m); |
550 | error_setup: | 538 | error_setup: |
551 | i2400m_bm_buf_free(i2400m); | ||
552 | error_bootmode_buf_setup: | ||
553 | sdio_set_drvdata(func, NULL); | 539 | sdio_set_drvdata(func, NULL); |
554 | free_netdev(net_dev); | 540 | free_netdev(net_dev); |
555 | error_alloc_netdev: | 541 | error_alloc_netdev: |