diff options
author | Dirk Brandewie <dirk.j.brandewie@intel.com> | 2009-08-18 08:51:52 -0700 |
---|---|---|
committer | Inaky Perez-Gonzalez <inaky@linux.intel.com> | 2009-10-19 15:55:39 +0900 |
commit | a134fd6b103b78378e3beb6af94d8d8c2abdd19d (patch) | |
tree | 4a747fdeda7afce7d690c869bb6194f9a400f503 /drivers/net/wimax/i2400m/sdio.c | |
parent | 81b182a7542c4282191fa0b1e8d9fcb022c03e68 (diff) |
wimax/i2400m: Ensure boot mode cmd and ack buffers are alloc'd before first message
The change to the SDIO boot mode RX chain could try to use the cmd and
ack buffers befor they were allocated. USB does not have the problem
but both were changed for consistency's sake.
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
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, 14 insertions, 0 deletions
diff --git a/drivers/net/wimax/i2400m/sdio.c b/drivers/net/wimax/i2400m/sdio.c index c67b0264a28..a68232aa291 100644 --- a/drivers/net/wimax/i2400m/sdio.c +++ b/drivers/net/wimax/i2400m/sdio.c @@ -451,6 +451,18 @@ int i2400ms_probe(struct sdio_func *func, goto error_func_enable; } + /* + * Before we are enabling the device interrupt register, make + * sure the buffer used during bootmode operation is setup so + * when the first D2H data interrupt comes, the memory is + * available for copying the D2H data. + */ + result = i2400m_bm_buf_alloc(i2400m); + if (result < 0) { + dev_err(dev, "cannot allocate SDIO bootmode buffer\n"); + goto error_bootmode_buf_setup; + } + result = i2400ms_rx_setup(i2400ms); if (result < 0) goto error_rx_setup; @@ -474,6 +486,8 @@ error_debugfs_add: error_setup: i2400ms_rx_release(i2400ms); error_rx_setup: + i2400m_bm_buf_free(i2400m); +error_bootmode_buf_setup: sdio_claim_host(func); sdio_disable_func(func); sdio_release_host(func); |