Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (34 commits) net/fsl_pq_mdio: add module license GPL can: fix WARN_ON dump in net/core/rtnetlink.c:rtmsg_ifinfo() can: should not use __dev_get_by_index() without locks hisax: remove bad udelay call to fix build error on ARM ipip: Fix handling of DF packets when pmtudisc is OFF qlge: Set PCIe reset type for EEH to fundamental. qlge: Fix early exit from mbox cmd complete wait. ixgbe: fix traffic hangs on Tx with ioatdma loaded ixgbe: Fix checking TFCS register for TXOFF status when DCB is enabled ixgbe: Fix gso_max_size for 82599 when DCB is enabled macsonic: fix crash on PowerBook 520 NET: cassini, fix lock imbalance ems_usb: Fix byte order issues on big endian machines be2net: Bug fix to send config commands to hardware after netdev_register be2net: fix to set proper flow control on resume netfilter: xt_connlimit: fix regression caused by zero family value rt2x00: Don't queue ieee80211 work after USB removal Revert "ipw2200: fix oops on missing firmware" decnet: netdevice refcount leak netfilter: nf_nat: fix NAT issue in 2.6.30.4+ ...
This commit is contained in:
@@ -815,6 +815,8 @@ int rt2x00lib_probe_dev(struct rt2x00_dev *rt2x00dev)
|
||||
|
||||
mutex_init(&rt2x00dev->csr_mutex);
|
||||
|
||||
set_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags);
|
||||
|
||||
/*
|
||||
* Make room for rt2x00_intf inside the per-interface
|
||||
* structure ieee80211_vif.
|
||||
@@ -871,8 +873,6 @@ int rt2x00lib_probe_dev(struct rt2x00_dev *rt2x00dev)
|
||||
rt2x00leds_register(rt2x00dev);
|
||||
rt2x00debug_register(rt2x00dev);
|
||||
|
||||
set_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags);
|
||||
|
||||
return 0;
|
||||
|
||||
exit:
|
||||
|
@@ -362,8 +362,9 @@ void rt2x00link_start_tuner(struct rt2x00_dev *rt2x00dev)
|
||||
|
||||
rt2x00link_reset_tuner(rt2x00dev, false);
|
||||
|
||||
ieee80211_queue_delayed_work(rt2x00dev->hw,
|
||||
&link->work, LINK_TUNE_INTERVAL);
|
||||
if (test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags))
|
||||
ieee80211_queue_delayed_work(rt2x00dev->hw,
|
||||
&link->work, LINK_TUNE_INTERVAL);
|
||||
}
|
||||
|
||||
void rt2x00link_stop_tuner(struct rt2x00_dev *rt2x00dev)
|
||||
@@ -469,8 +470,10 @@ static void rt2x00link_tuner(struct work_struct *work)
|
||||
* Increase tuner counter, and reschedule the next link tuner run.
|
||||
*/
|
||||
link->count++;
|
||||
ieee80211_queue_delayed_work(rt2x00dev->hw,
|
||||
&link->work, LINK_TUNE_INTERVAL);
|
||||
|
||||
if (test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags))
|
||||
ieee80211_queue_delayed_work(rt2x00dev->hw,
|
||||
&link->work, LINK_TUNE_INTERVAL);
|
||||
}
|
||||
|
||||
void rt2x00link_register(struct rt2x00_dev *rt2x00dev)
|
||||
|
@@ -47,6 +47,8 @@ int rt2x00usb_vendor_request(struct rt2x00_dev *rt2x00dev,
|
||||
(requesttype == USB_VENDOR_REQUEST_IN) ?
|
||||
usb_rcvctrlpipe(usb_dev, 0) : usb_sndctrlpipe(usb_dev, 0);
|
||||
|
||||
if (!test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags))
|
||||
return -ENODEV;
|
||||
|
||||
for (i = 0; i < REGISTER_BUSY_COUNT; i++) {
|
||||
status = usb_control_msg(usb_dev, pipe, request, requesttype,
|
||||
@@ -60,8 +62,10 @@ int rt2x00usb_vendor_request(struct rt2x00_dev *rt2x00dev,
|
||||
* -ENODEV: Device has disappeared, no point continuing.
|
||||
* All other errors: Try again.
|
||||
*/
|
||||
else if (status == -ENODEV)
|
||||
else if (status == -ENODEV) {
|
||||
clear_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
ERROR(rt2x00dev,
|
||||
@@ -161,6 +165,9 @@ int rt2x00usb_regbusy_read(struct rt2x00_dev *rt2x00dev,
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
if (!test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags))
|
||||
return -ENODEV;
|
||||
|
||||
for (i = 0; i < REGISTER_BUSY_COUNT; i++) {
|
||||
rt2x00usb_register_read_lock(rt2x00dev, offset, reg);
|
||||
if (!rt2x00_get_field32(*reg, field))
|
||||
|
Reference in New Issue
Block a user