Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 150872
b: refs/heads/master
c: 10b1de6
h: refs/heads/master
v: v3
  • Loading branch information
Dirk Brandewie authored and Inaky Perez-Gonzalez committed Jun 11, 2009
1 parent 9e569e2 commit 7d8e8be
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ead68239913cb9c19150facf1656517f81d66fcb
refs/heads/master: 10b1de6b774a531c9054ee01e734a85ffbab179e
2 changes: 2 additions & 0 deletions trunk/drivers/net/wimax/i2400m/i2400m-sdio.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ enum {
/* The number of ticks to wait for the device to signal that
* it is ready */
I2400MS_INIT_SLEEP_INTERVAL = 10,
/* How long to wait for the device to settle after reset */
I2400MS_SETTLE_TIME = 40,
};


Expand Down
20 changes: 17 additions & 3 deletions trunk/drivers/net/wimax/i2400m/sdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ int __i2400ms_send_barker(struct i2400ms *i2400ms,
static
int i2400ms_bus_reset(struct i2400m *i2400m, enum i2400m_reset_type rt)
{
int result;
int result = 0;
struct i2400ms *i2400ms =
container_of(i2400m, struct i2400ms, i2400m);
struct device *dev = i2400m_dev(i2400m);
Expand All @@ -280,8 +280,22 @@ int i2400ms_bus_reset(struct i2400m *i2400m, enum i2400m_reset_type rt)
sizeof(i2400m_COLD_BOOT_BARKER));
else if (rt == I2400M_RT_BUS) {
do_bus_reset:
dev_err(dev, "FIXME: SDIO bus reset not implemented\n");
result = rt == I2400M_RT_WARM ? -ENODEV : -ENOSYS;
/* call netif_tx_disable() before sending IOE disable,
* so that all the tx from network layer are stopped
* while IOE is being reset. Make sure it is called
* only after register_netdev() was issued.
*/
if (i2400m->wimax_dev.net_dev->reg_state == NETREG_REGISTERED)
netif_tx_disable(i2400m->wimax_dev.net_dev);

sdio_claim_host(i2400ms->func);
sdio_disable_func(i2400ms->func);
sdio_release_host(i2400ms->func);

/* Wait for the device to settle */
msleep(40);

result = i2400ms_enable_function(i2400ms->func);
} else
BUG();
if (result < 0 && rt != I2400M_RT_BUS) {
Expand Down

0 comments on commit 7d8e8be

Please sign in to comment.