From: Greg Kroah-Hartman Date: Tue, 20 Nov 2007 17:23:09 +0000 (-0800) Subject: more .23 patches X-Git-Tag: v2.6.22.14~3 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=3e383632148c6bf5657fcb7b242cc0e336c4fc75;p=thirdparty%2Fkernel%2Fstable-queue.git more .23 patches --- diff --git a/queue-2.6.23/ipw2200-batch-non-user-requested-scan-result-notifications.patch b/queue-2.6.23/ipw2200-batch-non-user-requested-scan-result-notifications.patch new file mode 100644 index 00000000000..83a5e9bab0e --- /dev/null +++ b/queue-2.6.23/ipw2200-batch-non-user-requested-scan-result-notifications.patch @@ -0,0 +1,169 @@ +From 0b5316769774d1dc2fdd702e095f9e6992af269a Mon Sep 17 00:00:00 2001 +From: Dan Williams +Date: Tue, 9 Oct 2007 13:55:24 -0400 +Subject: ipw2200: batch non-user-requested scan result notifications + +From: Dan Williams + +patch 0b5316769774d1dc2fdd702e095f9e6992af269a in mainline. + +ipw2200 makes extensive use of background scanning when unassociated or +down. Unfortunately, the firmware sends scan completed events many +times per second, which the driver pushes directly up to userspace. +This needlessly wakes up processes listening for wireless events many +times per second. Batch together scan completed events for +non-user-requested scans and send them up to userspace every 4 seconds. +Scan completed events resulting from an SIOCSIWSCAN call are pushed up +without delay. + +Signed-off-by: Dan Williams +Signed-off-by: John W. Linville +Cc: Tobias Powalowski +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/wireless/ipw2200.c | 56 +++++++++++++++++++++++++++++++++-------- + drivers/net/wireless/ipw2200.h | 3 ++ + 2 files changed, 49 insertions(+), 10 deletions(-) + +--- a/drivers/net/wireless/ipw2200.c ++++ b/drivers/net/wireless/ipw2200.c +@@ -1740,8 +1740,10 @@ static int ipw_radio_kill_sw(struct ipw_ + if (disable_radio) { + priv->status |= STATUS_RF_KILL_SW; + +- if (priv->workqueue) ++ if (priv->workqueue) { + cancel_delayed_work(&priv->request_scan); ++ cancel_delayed_work(&priv->scan_event); ++ } + queue_work(priv->workqueue, &priv->down); + } else { + priv->status &= ~STATUS_RF_KILL_SW; +@@ -1992,6 +1994,7 @@ static void ipw_irq_tasklet(struct ipw_p + wake_up_interruptible(&priv->wait_command_queue); + priv->status &= ~(STATUS_ASSOCIATED | STATUS_ASSOCIATING); + cancel_delayed_work(&priv->request_scan); ++ cancel_delayed_work(&priv->scan_event); + schedule_work(&priv->link_down); + queue_delayed_work(priv->workqueue, &priv->rf_kill, 2 * HZ); + handled |= IPW_INTA_BIT_RF_KILL_DONE; +@@ -4341,6 +4344,37 @@ static void ipw_handle_missed_beacon(str + IPW_DEBUG_NOTIF("Missed beacon: %d\n", missed_count); + } + ++static void ipw_scan_event(struct work_struct *work) ++{ ++ union iwreq_data wrqu; ++ ++ struct ipw_priv *priv = ++ container_of(work, struct ipw_priv, scan_event.work); ++ ++ wrqu.data.length = 0; ++ wrqu.data.flags = 0; ++ wireless_send_event(priv->net_dev, SIOCGIWSCAN, &wrqu, NULL); ++} ++ ++static void handle_scan_event(struct ipw_priv *priv) ++{ ++ /* Only userspace-requested scan completion events go out immediately */ ++ if (!priv->user_requested_scan) { ++ if (!delayed_work_pending(&priv->scan_event)) ++ queue_delayed_work(priv->workqueue, &priv->scan_event, ++ round_jiffies(msecs_to_jiffies(4000))); ++ } else { ++ union iwreq_data wrqu; ++ ++ priv->user_requested_scan = 0; ++ cancel_delayed_work(&priv->scan_event); ++ ++ wrqu.data.length = 0; ++ wrqu.data.flags = 0; ++ wireless_send_event(priv->net_dev, SIOCGIWSCAN, &wrqu, NULL); ++ } ++} ++ + /** + * Handle host notification packet. + * Called from interrupt routine +@@ -4702,14 +4736,8 @@ static void ipw_rx_notification(struct i + * on how the scan was initiated. User space can just + * sync on periodic scan to get fresh data... + * Jean II */ +- if (x->status == SCAN_COMPLETED_STATUS_COMPLETE) { +- union iwreq_data wrqu; +- +- wrqu.data.length = 0; +- wrqu.data.flags = 0; +- wireless_send_event(priv->net_dev, SIOCGIWSCAN, +- &wrqu, NULL); +- } ++ if (x->status == SCAN_COMPLETED_STATUS_COMPLETE) ++ handle_scan_event(priv); + break; + } + +@@ -9472,6 +9500,10 @@ static int ipw_wx_set_scan(struct net_de + struct ipw_priv *priv = ieee80211_priv(dev); + struct iw_scan_req *req = (struct iw_scan_req *)extra; + ++ mutex_lock(&priv->mutex); ++ priv->user_requested_scan = 1; ++ mutex_unlock(&priv->mutex); ++ + if (wrqu->data.length == sizeof(struct iw_scan_req)) { + if (wrqu->data.flags & IW_SCAN_THIS_ESSID) { + ipw_request_direct_scan(priv, req->essid, +@@ -10647,6 +10679,7 @@ static void ipw_link_up(struct ipw_priv + } + + cancel_delayed_work(&priv->request_scan); ++ cancel_delayed_work(&priv->scan_event); + ipw_reset_stats(priv); + /* Ensure the rate is updated immediately */ + priv->last_rate = ipw_get_current_rate(priv); +@@ -10684,7 +10717,8 @@ static void ipw_link_down(struct ipw_pri + if (!(priv->status & STATUS_EXIT_PENDING)) { + /* Queue up another scan... */ + queue_delayed_work(priv->workqueue, &priv->request_scan, 0); +- } ++ } else ++ cancel_delayed_work(&priv->scan_event); + } + + static void ipw_bg_link_down(struct work_struct *work) +@@ -10714,6 +10748,7 @@ static int ipw_setup_deferred_work(struc + INIT_WORK(&priv->up, ipw_bg_up); + INIT_WORK(&priv->down, ipw_bg_down); + INIT_DELAYED_WORK(&priv->request_scan, ipw_request_scan); ++ INIT_DELAYED_WORK(&priv->scan_event, ipw_scan_event); + INIT_WORK(&priv->request_passive_scan, ipw_request_passive_scan); + INIT_DELAYED_WORK(&priv->gather_stats, ipw_bg_gather_stats); + INIT_WORK(&priv->abort_scan, ipw_bg_abort_scan); +@@ -11746,6 +11781,7 @@ static void ipw_pci_remove(struct pci_de + cancel_delayed_work(&priv->adhoc_check); + cancel_delayed_work(&priv->gather_stats); + cancel_delayed_work(&priv->request_scan); ++ cancel_delayed_work(&priv->scan_event); + cancel_delayed_work(&priv->rf_kill); + cancel_delayed_work(&priv->scan_check); + destroy_workqueue(priv->workqueue); +--- a/drivers/net/wireless/ipw2200.h ++++ b/drivers/net/wireless/ipw2200.h +@@ -1288,6 +1288,8 @@ struct ipw_priv { + + struct iw_public_data wireless_data; + ++ int user_requested_scan; ++ + struct workqueue_struct *workqueue; + + struct delayed_work adhoc_check; +@@ -1296,6 +1298,7 @@ struct ipw_priv { + struct work_struct system_config; + struct work_struct rx_replenish; + struct delayed_work request_scan; ++ struct delayed_work scan_event; + struct work_struct request_passive_scan; + struct work_struct adapter_restart; + struct delayed_work rf_kill; diff --git a/queue-2.6.23/series b/queue-2.6.23/series index 61824216d6e..28f47f9c88d 100644 --- a/queue-2.6.23/series +++ b/queue-2.6.23/series @@ -24,3 +24,6 @@ ntp-fix-sync-cmos-clock-typo.patch x86-fix-rtc-locking.patch softlockup-watchdog-fixes-and-cleanups.patch softlockup-use-cpu_clock-instead-of-sched_clock.patch +usb-unusual_devs-modification-for-nikon-d200.patch +usb-nikon-d40x-unusual_devs-entry.patch +ipw2200-batch-non-user-requested-scan-result-notifications.patch diff --git a/queue-2.6.23/usb-nikon-d40x-unusual_devs-entry.patch b/queue-2.6.23/usb-nikon-d40x-unusual_devs-entry.patch new file mode 100644 index 00000000000..1a6e0dcca5e --- /dev/null +++ b/queue-2.6.23/usb-nikon-d40x-unusual_devs-entry.patch @@ -0,0 +1,40 @@ +From d466a9190ff1ceddfee50686e61d63590fc820d9 Mon Sep 17 00:00:00 2001 +From: Ortwin Glück +Date: Thu, 11 Oct 2007 17:29:43 +0200 +Subject: [PATCH] USB: Nikon D40X unusual_devs entry +MIME-Version: 1.0 +Content-Type: text/plain; charset=utf-8 +Content-Transfer-Encoding: 8bit + +From: Ortwin Glück + +patch d466a9190ff1ceddfee50686e61d63590fc820d9 in mainline. + +Not surprisingly the Nikon D40X DSC needs the same quirks as the D40, +but it has a separate ID. +See http://bugs.gentoo.org/show_bug.cgi?id=191431 + +From: Ortwin Glück +Cc: Tobias Powalowski +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/storage/unusual_devs.h | 7 +++++++ + 1 file changed, 7 insertions(+) + +--- a/drivers/usb/storage/unusual_devs.h ++++ b/drivers/usb/storage/unusual_devs.h +@@ -362,6 +362,13 @@ UNUSUAL_DEV( 0x04b0, 0x0413, 0x0110, 0x + US_SC_DEVICE, US_PR_DEVICE, NULL, + US_FL_FIX_CAPACITY), + ++/* Reported by Shan Destromp (shansan@gmail.com) */ ++UNUSUAL_DEV( 0x04b0, 0x0417, 0x0100, 0x0100, ++ "NIKON", ++ "NIKON DSC D40X", ++ US_SC_DEVICE, US_PR_DEVICE, NULL, ++ US_FL_FIX_CAPACITY), ++ + /* BENQ DC5330 + * Reported by Manuel Fombuena and + * Frank Copeland */ diff --git a/queue-2.6.23/usb-unusual_devs-modification-for-nikon-d200.patch b/queue-2.6.23/usb-unusual_devs-modification-for-nikon-d200.patch new file mode 100644 index 00000000000..e809bb39de8 --- /dev/null +++ b/queue-2.6.23/usb-unusual_devs-modification-for-nikon-d200.patch @@ -0,0 +1,36 @@ +From 16eb345f4d9189b59bae576ae63cba7ca77817b2 Mon Sep 17 00:00:00 2001 +From: Phil Dibowitz +Date: Sat, 22 Sep 2007 20:58:12 -0700 +Subject: [PATCH] USB: unusual_devs modification for Nikon D200 + +From: Phil Dibowitz + +patch 16eb345f4d9189b59bae576ae63cba7ca77817b2 in mainline. + +Upgrade the unusual_devs.h file to support the Nikon D200 + +Signed-off-by: Mike Pagano +Signed-off-by: Phil Dibowitz +Cc: Tobias Powalowski +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/usb/storage/unusual_devs.h | 7 +++++++ + 1 file changed, 7 insertions(+) + +--- a/drivers/usb/storage/unusual_devs.h ++++ b/drivers/usb/storage/unusual_devs.h +@@ -341,6 +341,13 @@ UNUSUAL_DEV( 0x04b0, 0x040d, 0x0100, 0x + US_SC_DEVICE, US_PR_DEVICE, NULL, + US_FL_FIX_CAPACITY), + ++/* Reported by Graber and Mike Pagano */ ++UNUSUAL_DEV( 0x04b0, 0x040f, 0x0200, 0x0200, ++ "NIKON", ++ "NIKON DSC D200", ++ US_SC_DEVICE, US_PR_DEVICE, NULL, ++ US_FL_FIX_CAPACITY), ++ + /* Reported by Emil Larsson */ + UNUSUAL_DEV( 0x04b0, 0x0411, 0x0100, 0x0101, + "NIKON",