diff options
author | Inaky Perez-Gonzalez <inaky@linux.intel.com> | 2009-10-19 03:24:56 -0400 |
---|---|---|
committer | Inaky Perez-Gonzalez <inaky@linux.intel.com> | 2009-11-03 15:49:36 -0500 |
commit | c931ceeb780560ff652a8f9875f88778439ee87e (patch) | |
tree | ca754722967ff1b9a4660ef38b0eae3d36f38a58 /drivers/net/wimax/i2400m/rx.c | |
parent | 55a662d6468005ec3cd799fbd8d0ad03dfae6d2a (diff) |
wimax/i2400m: introduce i2400m_reset(), stopping TX and carrier
Currently the i2400m driver was resetting by just calling
i2400m->bus_reset(). However, this was missing stopping the TX queue
and downing the carrier. This was causing, for the corner case of the
driver reseting a device that refuses to go out of idle mode, that a
few packets would be queued and more than one reset would go through,
making the recovery a wee bit messy.
To avoid introducing the same cleanup in all the bus-specific driver,
introduced a i2400m_reset() function that takes care of house cleaning
and then calling the bus-level reset implementation.
The bulk of the changes in all files are just to rename the call from
i2400m->bus_reset() to i2400m_reset().
Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
Diffstat (limited to 'drivers/net/wimax/i2400m/rx.c')
-rw-r--r-- | drivers/net/wimax/i2400m/rx.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wimax/i2400m/rx.c b/drivers/net/wimax/i2400m/rx.c index 64a44ca00675..e3d2a9de023c 100644 --- a/drivers/net/wimax/i2400m/rx.c +++ b/drivers/net/wimax/i2400m/rx.c | |||
@@ -828,7 +828,7 @@ void i2400m_roq_queue(struct i2400m *i2400m, struct i2400m_roq *roq, | |||
828 | dev_err(dev, "SW BUG? queue nsn %d (lbn %u ws %u)\n", | 828 | dev_err(dev, "SW BUG? queue nsn %d (lbn %u ws %u)\n", |
829 | nsn, lbn, roq->ws); | 829 | nsn, lbn, roq->ws); |
830 | i2400m_roq_log_dump(i2400m, roq); | 830 | i2400m_roq_log_dump(i2400m, roq); |
831 | i2400m->bus_reset(i2400m, I2400M_RT_WARM); | 831 | i2400m_reset(i2400m, I2400M_RT_WARM); |
832 | } else { | 832 | } else { |
833 | __i2400m_roq_queue(i2400m, roq, skb, lbn, nsn); | 833 | __i2400m_roq_queue(i2400m, roq, skb, lbn, nsn); |
834 | i2400m_roq_log_add(i2400m, roq, I2400M_RO_TYPE_PACKET, | 834 | i2400m_roq_log_add(i2400m, roq, I2400M_RO_TYPE_PACKET, |
@@ -894,7 +894,7 @@ void i2400m_roq_queue_update_ws(struct i2400m *i2400m, struct i2400m_roq *roq, | |||
894 | dev_err(dev, "SW BUG? queue_update_ws nsn %u (sn %u ws %u)\n", | 894 | dev_err(dev, "SW BUG? queue_update_ws nsn %u (sn %u ws %u)\n", |
895 | nsn, sn, roq->ws); | 895 | nsn, sn, roq->ws); |
896 | i2400m_roq_log_dump(i2400m, roq); | 896 | i2400m_roq_log_dump(i2400m, roq); |
897 | i2400m->bus_reset(i2400m, I2400M_RT_WARM); | 897 | i2400m_reset(i2400m, I2400M_RT_WARM); |
898 | } else { | 898 | } else { |
899 | /* if the queue is empty, don't bother as we'd queue | 899 | /* if the queue is empty, don't bother as we'd queue |
900 | * it and inmediately unqueue it -- just deliver it */ | 900 | * it and inmediately unqueue it -- just deliver it */ |