* Re: [PATCH] net: Adjust softirq raising in __napi_schedule
From: Jarek Poplawski @ 2009-10-26 7:41 UTC (permalink / raw)
To: Johannes Berg
Cc: Tilman Schmidt, David Miller, hidave.darkstar, linux-kernel, tglx,
linux-wireless, linux-ppp, netdev, paulus, Michael Buesch,
Oliver Hartkopp
In-Reply-To: <1256309191.12174.51.camel@johannes.local>
On Fri, Oct 23, 2009 at 04:46:31PM +0200, Johannes Berg wrote:
> On Fri, 2009-10-23 at 16:39 +0200, Tilman Schmidt wrote:
>
> > Strange. Then what are the two separate functions netif_rx() and
> > netif_rx_ni() for?
>
> netif_rx_ni() disables preemption.
You wrote earlier:
> [...] the networking layer needs to have
> packets handed to it with softirqs disabled.
How disabling preemption can fix something which needs softirqs
disabled? Could you be more precise?
> > > This really should be obvious. You're fixing the warning at the source
> > > of the warning, rather than the source of the problem.
> >
> > Good idea. So please do tell us where the source of the problem is.
>
> You use netif_rx_ni() instead of netif_rx() at whatever place that
> causes this problem.
This isn't a very precise description either.
Jarek P.
^ permalink raw reply
* Re: about 802.11 scan and probe request
From: Kalle Valo @ 2009-10-26 7:19 UTC (permalink / raw)
To: belle.shi; +Cc: linux-wireless
In-Reply-To: <20091026103247.2ng5wbub4ow8ok4w@webmail.yy.com>
belle.shi@yy.com writes:
> there is one question: the scan have two mode:active or passive,but
> when i run the wpa_gui, there is only scan button
Passive scan is so slow that we want to use active scan always when
possible. No need to confuse users about this, so one scan button is
enough.
> i think the active scan is to send Probe Request frame, and the
> passive scan to receive the beacon frame, is it right?
Correct.
--
Kalle Valo
^ permalink raw reply
* libertas sdio firmware
From: Johannes Berg @ 2009-10-26 7:16 UTC (permalink / raw)
To: Andrey Yurovsky; +Cc: Dan Williams, linux-wireless
[-- Attachment #1: Type: text/plain, Size: 474 bytes --]
Hi,
Was just looking at the libertas driver and noticed that the SPI part
loads firmware as such:
snprintf(helper_fw, IF_SPI_FW_NAME_MAX, "libertas/gspi%d_hlp.bin", ...
etc.
while the SDIO part just uses
ret = request_firmware(&fw, card->helper, &card->func->dev);
which ends up requesting sd8686_helper.bin instead of
libertas/sd8686_helper.bin, as far as I can tell. That means the
linux-firmware git repo won't work out of the box, I think?
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply
* Re: Rate-setting problem with Broadcom 4315
From: Larry Finger @ 2009-10-26 5:39 UTC (permalink / raw)
To: Felix Fietkau; +Cc: wireless
In-Reply-To: <4AE520F1.2070704@openwrt.org>
Actually, the rate-setting mechanism is working. If I looked at the
iwconfig rate while a transmission was in progress, the rate toggled
between 48 and 54 Mb/s. When I checked between tests, it showed 1
Mb/s, which is what fooled me.
The rc_stats table is:
rate throughput ewma prob this prob this succ/attempt
success attempts
P 1 0.9 99.9 100.0 0( 0) 314
314
2 1.8 96.9 100.0 0( 0) 15
16
5.5 4.8 95.7 100.0 0( 0) 12
12
11 9.5 99.9 100.0 0( 0) 134
138
6 5.4 95.7 100.0 0( 0) 11
11
9 8.0 95.7 100.0 0( 0) 11
11
12 10.6 95.7 100.0 0( 0) 11
11
18 15.5 95.5 100.0 0( 0) 12
13
24 20.3 95.7 100.0 0( 0) 12
12
36 29.3 96.5 96.4 0( 0) 4118
4249
T 48 37.6 96.3 100.0 23( 23) 376174
414958
t 54 36.8 84.8 81.5 62( 76) 356248
427489
Total packet count:: ideal 6627 lookaround 348
The automatic throughput is about 13 Mb/s.
Larry
^ permalink raw reply
* Re: Rate-setting problem with Broadcom 4315
From: Felix Fietkau @ 2009-10-26 4:09 UTC (permalink / raw)
To: Larry Finger; +Cc: wireless
In-Reply-To: <4AE49F0F.1060901@lwfinger.net>
Larry Finger wrote:
> When my BCM4312 (ID 4315) runs in auto rate mode, the rate stays at
> 1Mb/s. If I manually set the rate, I see a tcpperf throughput ~1/2 the
> rate that I set through a rate of 12 Mb/s. At 36 Mb/s, the rate is
> best at 15.7 Mb/s. Why does mistrel not increase the rate?
>
> The output of /sys/..../rc_stats is:
>
> finger@larrylap:~> cat
> /sys/kernel/debug/ieee80211/phy0/stations/00:14:bf:85:49:fa/rc_stats
> rate throughput ewma prob this prob this succ/attempt
> success attempts
> 1 0.9 99.1 100.0 0( 0) 3244
> 3282
> 2 1.8 95.7 100.0 0( 0) 12
> 12
> 5.5 4.8 95.7 100.0 0( 0) 12
> 12
> 11 9.2 96.8 100.0 0( 0) 12
> 12
> P 6 5.6 99.9 100.0 0( 0) 58
> 58
> 9 8.0 95.7 100.0 0( 0) 11
> 11
> 12 10.6 95.7 100.0 0( 0) 12
> 12
> 18 15.7 96.6 100.0 0( 0) 14
> 15
> 24 20.3 95.7 100.0 0( 0) 11
> 11
> 36 29.0 95.4 94.5 0( 0) 1602
> 1670
> T 48 38.7 99.2 100.0 1( 1) 32147
> 37752
> t 54 32.9 75.9 100.0 0( 0) 8775
> 12788
>
> Total packet count:: ideal 2570 lookaround 135
Was this dump made after you played with manual rate settings? If so,
please make a new one that only contains stats of what it tried with
automatic rate setting enabled.
- Felix
^ permalink raw reply
* about 802.11 scan and probe request
From: belle.shi @ 2009-10-26 2:32 UTC (permalink / raw)
To: linux-wireless
dear all,
is there anyone who read the standard "Part 11: Wireless LAN Medium
Access Control (MAC) and Physical Layer (PHY) Specifications" ?
and i spend two month to read the stardard, and i read a few code of
wpa_suppliant and
wpa_gui,there is one question: the scan have two mode:active or
passive,but when i run
the wpa_gui, there is only scan button, in the standard the scan
request is like
MLME-SCAN.request (
BSSType,
BSSID,
SSID,
ScanType,
ProbeDelay,
ChannelList,
MinChannelTime,
MaxChannelTime
)
but there are only three MAC frame formats:data frame, control frame
and Management
frame, and there is no scan frame, there is only a Probe Request frame,
so i am
stumped, what's the relationship between MLME-SCAN.request and Probe
Request frame, is
the MLME-SCAN.request and Probe Request frame only in different layer?
but the items is
also different, the MLME-SCAN.request have:(
BSSType, BSSID, SSID, ScanType, ProbeDelay, ChannelList,
MinChannelTime, MaxChannelTime), but the Probe Request frame body
only have two parts: SSID
and Supported rates. and in my view, i think the active scan is to
send Probe Request
frame, and the passive scan to receive the beacon frame, is it right?
thanks very much for advance!!
belle
^ permalink raw reply
* RE: [ath9k-devel] mac80211/ath9k/hostapd: Some clients unable to associate with AP
From: Joerg Pommnitz @ 2009-10-25 20:36 UTC (permalink / raw)
To: Jouni Malinen, Björn Smedman
Cc: Will Dyson, Johannes Berg, ath9k-devel, linux-wireless
In-Reply-To: <20091023163001.GA4911@jm.kir.nu>
I'll test tomorrow. Something is bothering me here: I have a current wireless-testing kernel
with ath5k and ath9 driver. I have traces that show that Win Vista successfully associates
with ath5k running in AP mode but fails with ath9k. How is this difference possible if the bug
is in the common code? Might there be another offsetting bug in ath5k?
--
Regards
Joerg
----- Ursprüngliche Mail ----
Von: Jouni Malinen <j@w1.fi>
An: Björn Smedman <bjorn.smedman@venatech.se>
CC: Joerg Pommnitz <pommnitz@yahoo.com>; Will Dyson <will.dyson@gmail.com>; Johannes Berg <johannes@sipsolutions.net>; ath9k-devel@venema.h4ckr.net; linux-wireless@vger.kernel.org
Gesendet: Freitag, den 23. Oktober 2009, 18:30:01 Uhr
Betreff: Re: [ath9k-devel] mac80211/ath9k/hostapd: Some clients unable to associate with AP
On Fri, Oct 23, 2009 at 05:27:27PM +0200, Björn Smedman wrote:
> It seems the problem is a typo in net/mac80211/tx.c that causes
> injected frames from hostapd not to be associated with the correct ap
> interface before going into ieee80211_tx_h_sequence(). This tiny patch
> solves my problems (and looks reasonable to me in any case):
Thanks! Would you be able to make the same patch against the
wireless-testing.git repository and add a Signed-off-by line to meet the
kernel submission requirements?
> diff -urN compat-wireless-2009-10-21-before_seqnum_fix/net/mac80211/tx.c
> compat-wireless-2009-10-21/net/mac80211/tx.c
> @@ -1445,7 +1445,7 @@
> if (tmp_sdata->vif.type != NL80211_IFTYPE_AP)
> continue;
> if (compare_ether_addr(tmp_sdata->dev->dev_addr,
> - hdr->addr2)) {
> + hdr->addr2) == 0) {
> dev_hold(tmp_sdata->dev);
> dev_put(sdata->dev);
> sdata = tmp_sdata;
This does indeed look like a typo. Though, I'm not sure how this would
have caused a regression between compat-wireless-2009-06-02 and
compat-wireless-2.6.32-rc1. The incorrect compare_ether_addr() use seems
to be there in the original commit that added this code
(25d834e16294c8dfd923dae6bdb8a055391a99a5 from September 12, 2008)..
Johannes: Any idea why the sequence number allocation for injected
frames from hostapd would have changed between 2009-06-02 and now? This
bug seems to be too old to explain that ;-).
--
Jouni Malinen PGP id EFC895FA
^ permalink raw reply
* Re: ath5k AP kernel panic when client uses SCP
From: Bob Copeland @ 2009-10-25 20:19 UTC (permalink / raw)
To: Tomasz Chmielewski
Cc: Gábor Stefanik, linux-wireless, linux-net, linux-mips
In-Reply-To: <4AE3431C.2000201@wpkg.org>
On Sat, Oct 24, 2009 at 2:10 PM, Tomasz Chmielewski <mangoo@wpkg.org> wrote:
> Bob Copeland wrote:
> Here is everything the system said after being powered on, including all
> page allocation failures and the final oops:
>
> http://www1.wpkg.org/skb_gso_segment/minicom.txt
>
> (and it looks slightly different than the last time).
In this case an order-0 allocation failed inside ieee80211_skb_resize,
which then called dev_release_skb() on the original skb. Off the top
of my head, it's unclear why the subsequent put_page would cause a fault.
This is a little out of my area so take it with a grain of salt :) but
in general order-0 allocation failures are bad news -- it couldn't get
a single free page, and that happened in under 3 minutes. Maybe poke
around in /proc/slabinfo to see where the memory went?
--
Bob Copeland %% www.bobcopeland.com
^ permalink raw reply
* Re: [PATCH] mac80211: fix for incorrect sequence number on hostapd injected frames
From: Johannes Berg @ 2009-10-25 18:59 UTC (permalink / raw)
To: Björn Smedman
Cc: linville, linux-wireless, Jouni Malinen, Joerg Pommnitz,
Will Dyson
In-Reply-To: <133e8d7e0910241155x4496b156p3c5d03450a71936a@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1713 bytes --]
On Sat, 2009-10-24 at 20:55 +0200, Björn Smedman wrote:
> When hostapd injects a frame, e.g. an authentication or association
> response, mac80211 looks for a suitable access point virtual interface
> to associate the frame with based on its source address. This makes it
> possible e.g. to correctly assign sequence numbers to the frames.
>
> A small typo in the ethernet address comparison statement caused a
> failure to find a suitable ap interface. Sequence numbers on such
> frames where therefore left unassigned causing some clients
> (especially windows-based 11b/g clients) to reject them and fail to
> authenticate or associate with the access point. This patch fixes the
> typo in the address comparison statement.
>
> Signed-off-by: Björn Smedman <bjorn.smedman@venatech.se>
Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
and Cc: stable@kernel.org I think
> ---
> diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
> index db4bda6..eaa4118 100644
> --- a/net/mac80211/tx.c
> +++ b/net/mac80211/tx.c
> @@ -1445,7 +1445,7 @@ static void ieee80211_xmit(struct
> ieee80211_sub_if_data *sdata,
> if (tmp_sdata->vif.type != NL80211_IFTYPE_AP)
> continue;
> if (compare_ether_addr(tmp_sdata->dev->dev_addr,
> - hdr->addr2)) {
> + hdr->addr2) == 0) {
> dev_hold(tmp_sdata->dev);
> dev_put(sdata->dev);
> sdata = tmp_sdata;
>
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply
* Rate-setting problem with Broadcom 4315
From: Larry Finger @ 2009-10-25 18:55 UTC (permalink / raw)
To: wireless
When my BCM4312 (ID 4315) runs in auto rate mode, the rate stays at
1Mb/s. If I manually set the rate, I see a tcpperf throughput ~1/2 the
rate that I set through a rate of 12 Mb/s. At 36 Mb/s, the rate is
best at 15.7 Mb/s. Why does mistrel not increase the rate?
The output of /sys/..../rc_stats is:
finger@larrylap:~> cat
/sys/kernel/debug/ieee80211/phy0/stations/00:14:bf:85:49:fa/rc_stats
rate throughput ewma prob this prob this succ/attempt
success attempts
1 0.9 99.1 100.0 0( 0) 3244
3282
2 1.8 95.7 100.0 0( 0) 12
12
5.5 4.8 95.7 100.0 0( 0) 12
12
11 9.2 96.8 100.0 0( 0) 12
12
P 6 5.6 99.9 100.0 0( 0) 58
58
9 8.0 95.7 100.0 0( 0) 11
11
12 10.6 95.7 100.0 0( 0) 12
12
18 15.7 96.6 100.0 0( 0) 14
15
24 20.3 95.7 100.0 0( 0) 11
11
36 29.0 95.4 94.5 0( 0) 1602
1670
T 48 38.7 99.2 100.0 1( 1) 32147
37752
t 54 32.9 75.9 100.0 0( 0) 8775
12788
Total packet count:: ideal 2570 lookaround 135
^ permalink raw reply
* Re: [PATCH] b43: LP-PHY: Begin implementing calibration & software RFKILL support
From: Michael Buesch @ 2009-10-25 16:00 UTC (permalink / raw)
To: Gábor Stefanik
Cc: John Linville, Larry Finger, Mark Huijgen, Broadcom Wireless,
linux-wireless
In-Reply-To: <69e28c910910250857l341cc114w46224b94cda36f3e@mail.gmail.com>
On Sunday 25 October 2009 16:57:44 Gábor Stefanik wrote:
> 2009/10/25 Michael Buesch <mb@bu3sch.de>:
> > On Sunday 25 October 2009 16:26:36 Gábor Stefanik wrote:
> >> Michael, could you please do the PHY reset part? I can't seem to
> >> understand its relationship to wireless_core_reset... also, it's
> >> heavily ssb-speak, which I am not good at.
> >
> > Where are the specifications?
> >
> > --
> > Greetings, Michael.
> >
>
> They are @ http://bcm-v4.sipsolutions.net/802.11/PHY/Reset - it shows
> some similarity to wireless_core_reset, but it is not an exact match.
Well, I don't know. Just implement it in another function.
I don't have the time to dig into this.
--
Greetings, Michael.
^ permalink raw reply
* Re: [PATCH] b43: LP-PHY: Begin implementing calibration & software RFKILL support
From: Gábor Stefanik @ 2009-10-25 15:57 UTC (permalink / raw)
To: Michael Buesch
Cc: John Linville, Larry Finger, Mark Huijgen, Broadcom Wireless,
linux-wireless
In-Reply-To: <200910251654.17050.mb@bu3sch.de>
2009/10/25 Michael Buesch <mb@bu3sch.de>:
> On Sunday 25 October 2009 16:26:36 Gábor Stefanik wrote:
>> Michael, could you please do the PHY reset part? I can't seem to
>> understand its relationship to wireless_core_reset... also, it's
>> heavily ssb-speak, which I am not good at.
>
> Where are the specifications?
>
> --
> Greetings, Michael.
>
They are @ http://bcm-v4.sipsolutions.net/802.11/PHY/Reset - it shows
some similarity to wireless_core_reset, but it is not an exact match.
--
Vista: [V]iruses, [I]ntruders, [S]pyware, [T]rojans and [A]dware. :-)
^ permalink raw reply
* Re: [PATCH] b43: LP-PHY: Begin implementing calibration & software RFKILL support
From: Michael Buesch @ 2009-10-25 15:54 UTC (permalink / raw)
To: Gábor Stefanik
Cc: John Linville, Larry Finger, Mark Huijgen, Broadcom Wireless,
linux-wireless
In-Reply-To: <1256484396-31063-1-git-send-email-netrolller.3d@gmail.com>
On Sunday 25 October 2009 16:26:36 Gábor Stefanik wrote:
> Michael, could you please do the PHY reset part? I can't seem to
> understand its relationship to wireless_core_reset... also, it's
> heavily ssb-speak, which I am not good at.
Where are the specifications?
--
Greetings, Michael.
^ permalink raw reply
* [PATCH] b43: LP-PHY: Begin implementing calibration & software RFKILL support
From: Gábor Stefanik @ 2009-10-25 15:26 UTC (permalink / raw)
To: John Linville, Michael Buesch, Larry Finger, Mark Huijgen
Cc: Broadcom Wireless, linux-wireless, Gábor Stefanik
This implements the following calibration functions:
-Set TX IQCC
-Set TX Power by Index
-PR41573 workaround (incomplete, needs PHY reset)
-Calc RX IQ Comp
-PHY Cordic
-Run Samples
-Start/Stop TX Tone
-part of PAPD Cal TX Power
-RX I/Q Calibration
-The basic structure of the periodic calibration wrapper
Software RFKILL (required by calibration) is also implemented in
this round.
Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
---
(Mail re-sent as my mailer seems to have dropped it; apologies if
you receive it twice.)
Michael, could you please do the PHY reset part? I can't seem to
understand its relationship to wireless_core_reset... also, it's
heavily ssb-speak, which I am not good at.
drivers/net/wireless/b43/phy_lp.c | 783 ++++++++++++++++++++++++++++++-------
drivers/net/wireless/b43/phy_lp.h | 11 +-
2 files changed, 658 insertions(+), 136 deletions(-)
diff --git a/drivers/net/wireless/b43/phy_lp.c b/drivers/net/wireless/b43/phy_lp.c
index 07d9d03..9dcb39c 100644
--- a/drivers/net/wireless/b43/phy_lp.c
+++ b/drivers/net/wireless/b43/phy_lp.c
@@ -67,6 +67,7 @@ static void b43_lpphy_op_prepare_structs(struct b43_wldev *dev)
struct b43_phy_lp *lpphy = phy->lp;
memset(lpphy, 0, sizeof(*lpphy));
+ lpphy->antenna = B43_ANTENNA_DEFAULT;
//TODO
}
@@ -379,8 +380,6 @@ static void lpphy_save_dig_flt_state(struct b43_wldev *dev)
}
}
-/* lpphy_restore_dig_flt_state is unused but kept as a reference */
-#if 0
static void lpphy_restore_dig_flt_state(struct b43_wldev *dev)
{
static const u16 addr[] = {
@@ -401,7 +400,6 @@ static void lpphy_restore_dig_flt_state(struct b43_wldev *dev)
for (i = 0; i < ARRAY_SIZE(addr); i++)
b43_phy_write(dev, addr[i], lpphy->dig_flt_state[i]);
}
-#endif
static void lpphy_baseband_rev2plus_init(struct b43_wldev *dev)
{
@@ -754,11 +752,17 @@ static void lpphy_clear_deaf(struct b43_wldev *dev, bool user)
}
}
+static void lpphy_set_trsw_over(struct b43_wldev *dev, bool tx, bool rx)
+{
+ u16 trsw = (tx << 1) | rx;
+ b43_phy_maskset(dev, B43_LPPHY_RF_OVERRIDE_VAL_0, 0xFFFC, trsw);
+ b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_0, 0x3);
+}
+
static void lpphy_disable_crs(struct b43_wldev *dev, bool user)
{
lpphy_set_deaf(dev, user);
- b43_phy_maskset(dev, B43_LPPHY_RF_OVERRIDE_VAL_0, 0xFFFC, 0x1);
- b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_0, 0x3);
+ lpphy_set_trsw_over(dev, false, true);
b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_VAL_0, 0xFFFB);
b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_0, 0x4);
b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_VAL_0, 0xFFF7);
@@ -793,6 +797,60 @@ static void lpphy_restore_crs(struct b43_wldev *dev, bool user)
struct lpphy_tx_gains { u16 gm, pga, pad, dac; };
+static void lpphy_disable_rx_gain_override(struct b43_wldev *dev)
+{
+ b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_0, 0xFFFE);
+ b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_0, 0xFFEF);
+ b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_0, 0xFFBF);
+ if (dev->phy.rev >= 2) {
+ b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_2, 0xFEFF);
+ if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) {
+ b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_2, 0xFBFF);
+ b43_phy_mask(dev, B43_PHY_OFDM(0xE5), 0xFFF7);
+ }
+ } else {
+ b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_2, 0xFDFF);
+ }
+}
+
+static void lpphy_enable_rx_gain_override(struct b43_wldev *dev)
+{
+ b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_0, 0x1);
+ b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_0, 0x10);
+ b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_0, 0x40);
+ if (dev->phy.rev >= 2) {
+ b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_2, 0x100);
+ if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) {
+ b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_2, 0x400);
+ b43_phy_set(dev, B43_PHY_OFDM(0xE5), 0x8);
+ }
+ } else {
+ b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_2, 0x200);
+ }
+}
+
+static void lpphy_disable_tx_gain_override(struct b43_wldev *dev)
+{
+ if (dev->phy.rev < 2)
+ b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_2, 0xFEFF);
+ else {
+ b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_2, 0xFF7F);
+ b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_2, 0xBFFF);
+ }
+ b43_phy_mask(dev, B43_LPPHY_AFE_CTL_OVR, 0xFFBF);
+}
+
+static void lpphy_enable_tx_gain_override(struct b43_wldev *dev)
+{
+ if (dev->phy.rev < 2)
+ b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_2, 0x100);
+ else {
+ b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_2, 0x80);
+ b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_2, 0x4000);
+ }
+ b43_phy_set(dev, B43_LPPHY_AFE_CTL_OVR, 0x40);
+}
+
static struct lpphy_tx_gains lpphy_get_tx_gains(struct b43_wldev *dev)
{
struct lpphy_tx_gains gains;
@@ -822,6 +880,17 @@ static void lpphy_set_dac_gain(struct b43_wldev *dev, u16 dac)
b43_phy_maskset(dev, B43_LPPHY_AFE_DAC_CTL, 0xF000, ctl);
}
+static u16 lpphy_get_pa_gain(struct b43_wldev *dev)
+{
+ return b43_phy_read(dev, B43_PHY_OFDM(0xFB)) & 0x7F;
+}
+
+static void lpphy_set_pa_gain(struct b43_wldev *dev, u16 gain)
+{
+ b43_phy_maskset(dev, B43_PHY_OFDM(0xFB), 0xE03F, gain << 6);
+ b43_phy_maskset(dev, B43_PHY_OFDM(0xFD), 0x80FF, gain << 8);
+}
+
static void lpphy_set_tx_gains(struct b43_wldev *dev,
struct lpphy_tx_gains gains)
{
@@ -832,25 +901,22 @@ static void lpphy_set_tx_gains(struct b43_wldev *dev,
b43_phy_maskset(dev, B43_LPPHY_TX_GAIN_CTL_OVERRIDE_VAL,
0xF800, rf_gain);
} else {
- pa_gain = b43_phy_read(dev, B43_PHY_OFDM(0xFB)) & 0x1FC0;
- pa_gain <<= 2;
+ pa_gain = lpphy_get_pa_gain(dev);
b43_phy_write(dev, B43_LPPHY_TX_GAIN_CTL_OVERRIDE_VAL,
(gains.pga << 8) | gains.gm);
+ /*
+ * SPEC FIXME The spec calls for (pa_gain << 8) here, but that
+ * conflicts with the spec for set_pa_gain! Vendor driver bug?
+ */
b43_phy_maskset(dev, B43_PHY_OFDM(0xFB),
- 0x8000, gains.pad | pa_gain);
+ 0x8000, gains.pad | (pa_gain << 6));
b43_phy_write(dev, B43_PHY_OFDM(0xFC),
(gains.pga << 8) | gains.gm);
b43_phy_maskset(dev, B43_PHY_OFDM(0xFD),
- 0x8000, gains.pad | pa_gain);
+ 0x8000, gains.pad | (pa_gain << 8));
}
lpphy_set_dac_gain(dev, gains.dac);
- if (dev->phy.rev < 2) {
- b43_phy_maskset(dev, B43_LPPHY_RF_OVERRIDE_2, 0xFEFF, 1 << 8);
- } else {
- b43_phy_maskset(dev, B43_LPPHY_RF_OVERRIDE_2, 0xFF7F, 1 << 7);
- b43_phy_maskset(dev, B43_LPPHY_RF_OVERRIDE_2, 0xBFFF, 1 << 14);
- }
- b43_phy_maskset(dev, B43_LPPHY_AFE_CTL_OVR, 0xFFBF, 1 << 6);
+ lpphy_enable_tx_gain_override(dev);
}
static void lpphy_rev0_1_set_rx_gain(struct b43_wldev *dev, u32 gain)
@@ -890,41 +956,6 @@ static void lpphy_rev2plus_set_rx_gain(struct b43_wldev *dev, u32 gain)
}
}
-/* lpphy_disable_rx_gain_override is unused but kept as a reference */
-#if 0
-static void lpphy_disable_rx_gain_override(struct b43_wldev *dev)
-{
- b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_0, 0xFFFE);
- b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_0, 0xFFEF);
- b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_0, 0xFFBF);
- if (dev->phy.rev >= 2) {
- b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_2, 0xFEFF);
- if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) {
- b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_2, 0xFBFF);
- b43_phy_mask(dev, B43_PHY_OFDM(0xE5), 0xFFF7);
- }
- } else {
- b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_2, 0xFDFF);
- }
-}
-#endif
-
-static void lpphy_enable_rx_gain_override(struct b43_wldev *dev)
-{
- b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_0, 0x1);
- b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_0, 0x10);
- b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_0, 0x40);
- if (dev->phy.rev >= 2) {
- b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_2, 0x100);
- if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) {
- b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_2, 0x400);
- b43_phy_set(dev, B43_PHY_OFDM(0xE5), 0x8);
- }
- } else {
- b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_2, 0x200);
- }
-}
-
static void lpphy_set_rx_gain(struct b43_wldev *dev, u32 gain)
{
if (dev->phy.rev < 2)
@@ -1009,8 +1040,7 @@ static int lpphy_loopback(struct b43_wldev *dev)
memset(&iq_est, 0, sizeof(iq_est));
- b43_phy_maskset(dev, B43_LPPHY_RF_OVERRIDE_VAL_0, 0xFFFC, 0x3);
- b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_0, 0x3);
+ lpphy_set_trsw_over(dev, true, true);
b43_phy_set(dev, B43_LPPHY_AFE_CTL_OVR, 1);
b43_phy_mask(dev, B43_LPPHY_AFE_CTL_OVRVAL, 0xFFFE);
b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_0, 0x800);
@@ -1132,7 +1162,7 @@ static void lpphy_set_tx_power_control(struct b43_wldev *dev,
b43_phy_maskset(dev, B43_LPPHY_TX_PWR_CTL_NNUM,
0x8FFF, ((u16)lpphy->tssi_npt << 16));
//TODO Set "TSSI Transmit Count" variable to total transmitted frame count
- //TODO Disable TX gain override
+ lpphy_disable_tx_gain_override(dev);
lpphy->tx_pwr_idx_over = -1;
}
}
@@ -1318,15 +1348,73 @@ static void lpphy_calibrate_rc(struct b43_wldev *dev)
}
}
+static void b43_lpphy_op_set_rx_antenna(struct b43_wldev *dev, int antenna)
+{
+ if (dev->phy.rev >= 2)
+ return; // rev2+ doesn't support antenna diversity
+
+ if (B43_WARN_ON(antenna > B43_ANTENNA_AUTO1))
+ return;
+
+ b43_hf_write(dev, b43_hf_read(dev) & ~B43_HF_ANTDIVHELP);
+
+ b43_phy_maskset(dev, B43_LPPHY_CRSGAIN_CTL, 0xFFFD, antenna & 0x2);
+ b43_phy_maskset(dev, B43_LPPHY_CRSGAIN_CTL, 0xFFFE, antenna & 0x1);
+
+ b43_hf_write(dev, b43_hf_read(dev) | B43_HF_ANTDIVHELP);
+
+ dev->phy.lp->antenna = antenna;
+}
+
+static void lpphy_set_tx_iqcc(struct b43_wldev *dev, u16 a, u16 b)
+{
+ u16 tmp[2];
+
+ tmp[0] = a;
+ tmp[1] = b;
+ b43_lptab_write_bulk(dev, B43_LPTAB16(0, 80), 2, tmp);
+}
+
static void lpphy_set_tx_power_by_index(struct b43_wldev *dev, u8 index)
{
struct b43_phy_lp *lpphy = dev->phy.lp;
+ struct lpphy_tx_gains gains;
+ u32 iq_comp, tx_gain, coeff, rf_power;
lpphy->tx_pwr_idx_over = index;
+ lpphy_read_tx_pctl_mode_from_hardware(dev);
if (lpphy->txpctl_mode != B43_LPPHY_TXPCTL_OFF)
lpphy_set_tx_power_control(dev, B43_LPPHY_TXPCTL_SW);
-
- //TODO
+ if (dev->phy.rev >= 2) {
+ iq_comp = b43_lptab_read(dev, B43_LPTAB32(7, index + 320));
+ tx_gain = b43_lptab_read(dev, B43_LPTAB32(7, index + 192));
+ gains.pad = (tx_gain >> 16) & 0xFF;
+ gains.gm = tx_gain & 0xFF;
+ gains.pga = (tx_gain >> 8) & 0xFF;
+ gains.dac = (iq_comp >> 28) & 0xFF;
+ lpphy_set_tx_gains(dev, gains);
+ } else {
+ iq_comp = b43_lptab_read(dev, B43_LPTAB32(10, index + 320));
+ tx_gain = b43_lptab_read(dev, B43_LPTAB32(10, index + 192));
+ b43_phy_maskset(dev, B43_LPPHY_TX_GAIN_CTL_OVERRIDE_VAL,
+ 0xF800, (tx_gain >> 4) & 0x7FFF);
+ lpphy_set_dac_gain(dev, tx_gain & 0x7);
+ lpphy_set_pa_gain(dev, (tx_gain >> 24) & 0x7F);
+ }
+ lpphy_set_bb_mult(dev, (iq_comp >> 20) & 0xFF);
+ lpphy_set_tx_iqcc(dev, (iq_comp >> 10) & 0x3FF, iq_comp & 0x3FF);
+ if (dev->phy.rev >= 2) {
+ coeff = b43_lptab_read(dev, B43_LPTAB32(7, index + 448));
+ } else {
+ coeff = b43_lptab_read(dev, B43_LPTAB32(10, index + 448));
+ }
+ b43_lptab_write(dev, B43_LPTAB16(0, 85), coeff & 0xFFFF);
+ if (dev->phy.rev >= 2) {
+ rf_power = b43_lptab_read(dev, B43_LPTAB32(7, index + 576));
+ b43_phy_maskset(dev, B43_LPPHY_RF_PWR_OVERRIDE, 0xFF00,
+ rf_power & 0xFFFF);//SPEC FIXME mask & set != 0
+ }
+ lpphy_enable_tx_gain_override(dev);
}
static void lpphy_btcoex_override(struct b43_wldev *dev)
@@ -1335,58 +1423,45 @@ static void lpphy_btcoex_override(struct b43_wldev *dev)
b43_write16(dev, B43_MMIO_BTCOEX_TXCTL, 0xFF);
}
-static void lpphy_pr41573_workaround(struct b43_wldev *dev)
+static void b43_lpphy_op_software_rfkill(struct b43_wldev *dev,
+ bool blocked)
{
- struct b43_phy_lp *lpphy = dev->phy.lp;
- u32 *saved_tab;
- const unsigned int saved_tab_size = 256;
- enum b43_lpphy_txpctl_mode txpctl_mode;
- s8 tx_pwr_idx_over;
- u16 tssi_npt, tssi_idx;
-
- saved_tab = kcalloc(saved_tab_size, sizeof(saved_tab[0]), GFP_KERNEL);
- if (!saved_tab) {
- b43err(dev->wl, "PR41573 failed. Out of memory!\n");
- return;
- }
-
- lpphy_read_tx_pctl_mode_from_hardware(dev);
- txpctl_mode = lpphy->txpctl_mode;
- tx_pwr_idx_over = lpphy->tx_pwr_idx_over;
- tssi_npt = lpphy->tssi_npt;
- tssi_idx = lpphy->tssi_idx;
-
- if (dev->phy.rev < 2) {
- b43_lptab_read_bulk(dev, B43_LPTAB32(10, 0x140),
- saved_tab_size, saved_tab);
+ //TODO check MAC control register
+ if (blocked) {
+ if (dev->phy.rev >= 2) {
+ b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_VAL_0, 0x83FF);
+ b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_0, 0x1F00);
+ b43_phy_mask(dev, B43_LPPHY_AFE_DDFS, 0x80FF);
+ b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_2_VAL, 0xDFFF);
+ b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_2, 0x0808);
+ } else {
+ b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_VAL_0, 0xE0FF);
+ b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_0, 0x1F00);
+ b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_2_VAL, 0xFCFF);
+ b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_2, 0x0018);
+ }
} else {
- b43_lptab_read_bulk(dev, B43_LPTAB32(7, 0x140),
- saved_tab_size, saved_tab);
+ b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_0, 0xE0FF);
+ if (dev->phy.rev >= 2)
+ b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_2, 0xF7F7);
+ else
+ b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_2, 0xFFE7);
}
- //TODO
-
- kfree(saved_tab);
}
-static void lpphy_calibration(struct b43_wldev *dev)
+/* This was previously called lpphy_japan_filter */
+static void lpphy_set_analog_filter(struct b43_wldev *dev, int channel)
{
struct b43_phy_lp *lpphy = dev->phy.lp;
- enum b43_lpphy_txpctl_mode saved_pctl_mode;
-
- b43_mac_suspend(dev);
-
- lpphy_btcoex_override(dev);
- lpphy_read_tx_pctl_mode_from_hardware(dev);
- saved_pctl_mode = lpphy->txpctl_mode;
- lpphy_set_tx_power_control(dev, B43_LPPHY_TXPCTL_OFF);
- //TODO Perform transmit power table I/Q LO calibration
- if ((dev->phy.rev == 0) && (saved_pctl_mode != B43_LPPHY_TXPCTL_OFF))
- lpphy_pr41573_workaround(dev);
- //TODO If a full calibration has not been performed on this channel yet, perform PAPD TX-power calibration
- lpphy_set_tx_power_control(dev, saved_pctl_mode);
- //TODO Perform I/Q calibration with a single control value set
+ u16 tmp = (channel == 14); //SPEC FIXME check japanwidefilter!
- b43_mac_enable(dev);
+ if (dev->phy.rev < 2) { //SPEC FIXME Isn't this rev0/1-specific?
+ b43_phy_maskset(dev, B43_LPPHY_LP_PHY_CTL, 0xFCFF, tmp << 9);
+ if ((dev->phy.rev == 1) && (lpphy->rc_cap))
+ lpphy_set_rc_cap(dev);
+ } else {
+ b43_radio_write(dev, B2063_TX_BB_SP3, 0x3F);
+ }
}
static void lpphy_set_tssi_mux(struct b43_wldev *dev, enum tssi_mux_mode mode)
@@ -1495,6 +1570,473 @@ static void lpphy_tx_pctl_init(struct b43_wldev *dev)
}
}
+static void lpphy_pr41573_workaround(struct b43_wldev *dev)
+{
+ struct b43_phy_lp *lpphy = dev->phy.lp;
+ u32 *saved_tab;
+ const unsigned int saved_tab_size = 256;
+ enum b43_lpphy_txpctl_mode txpctl_mode;
+ s8 tx_pwr_idx_over;
+ u16 tssi_npt, tssi_idx;
+
+ saved_tab = kcalloc(saved_tab_size, sizeof(saved_tab[0]), GFP_KERNEL);
+ if (!saved_tab) {
+ b43err(dev->wl, "PR41573 failed. Out of memory!\n");
+ return;
+ }
+
+ lpphy_read_tx_pctl_mode_from_hardware(dev);
+ txpctl_mode = lpphy->txpctl_mode;
+ tx_pwr_idx_over = lpphy->tx_pwr_idx_over;
+ tssi_npt = lpphy->tssi_npt;
+ tssi_idx = lpphy->tssi_idx;
+
+ if (dev->phy.rev < 2) {
+ b43_lptab_read_bulk(dev, B43_LPTAB32(10, 0x140),
+ saved_tab_size, saved_tab);
+ } else {
+ b43_lptab_read_bulk(dev, B43_LPTAB32(7, 0x140),
+ saved_tab_size, saved_tab);
+ }
+ //FIXME PHY reset
+ lpphy_table_init(dev); //FIXME is table init needed?
+ lpphy_baseband_init(dev);
+ lpphy_tx_pctl_init(dev);
+ b43_lpphy_op_software_rfkill(dev, false);
+ lpphy_set_tx_power_control(dev, B43_LPPHY_TXPCTL_OFF);
+ if (dev->phy.rev < 2) {
+ b43_lptab_write_bulk(dev, B43_LPTAB32(10, 0x140),
+ saved_tab_size, saved_tab);
+ } else {
+ b43_lptab_write_bulk(dev, B43_LPTAB32(7, 0x140),
+ saved_tab_size, saved_tab);
+ }
+ b43_write16(dev, B43_MMIO_CHANNEL, lpphy->channel);
+ lpphy->tssi_npt = tssi_npt;
+ lpphy->tssi_idx = tssi_idx;
+ lpphy_set_analog_filter(dev, lpphy->channel);
+ if (tx_pwr_idx_over != -1)
+ lpphy_set_tx_power_by_index(dev, tx_pwr_idx_over);
+ if (lpphy->rc_cap)
+ lpphy_set_rc_cap(dev);
+ b43_lpphy_op_set_rx_antenna(dev, lpphy->antenna);
+ lpphy_set_tx_power_control(dev, txpctl_mode);
+ kfree(saved_tab);
+}
+
+struct lpphy_rx_iq_comp { u8 chan; s8 c1, c0; };
+
+static const struct lpphy_rx_iq_comp lpphy_5354_iq_table[] = {
+ { .chan = 1, .c1 = -66, .c0 = 15, },
+ { .chan = 2, .c1 = -66, .c0 = 15, },
+ { .chan = 3, .c1 = -66, .c0 = 15, },
+ { .chan = 4, .c1 = -66, .c0 = 15, },
+ { .chan = 5, .c1 = -66, .c0 = 15, },
+ { .chan = 6, .c1 = -66, .c0 = 15, },
+ { .chan = 7, .c1 = -66, .c0 = 14, },
+ { .chan = 8, .c1 = -66, .c0 = 14, },
+ { .chan = 9, .c1 = -66, .c0 = 14, },
+ { .chan = 10, .c1 = -66, .c0 = 14, },
+ { .chan = 11, .c1 = -66, .c0 = 14, },
+ { .chan = 12, .c1 = -66, .c0 = 13, },
+ { .chan = 13, .c1 = -66, .c0 = 13, },
+ { .chan = 14, .c1 = -66, .c0 = 13, },
+};
+
+static const struct lpphy_rx_iq_comp lpphy_rev0_1_iq_table[] = {
+ { .chan = 1, .c1 = -64, .c0 = 13, },
+ { .chan = 2, .c1 = -64, .c0 = 13, },
+ { .chan = 3, .c1 = -64, .c0 = 13, },
+ { .chan = 4, .c1 = -64, .c0 = 13, },
+ { .chan = 5, .c1 = -64, .c0 = 12, },
+ { .chan = 6, .c1 = -64, .c0 = 12, },
+ { .chan = 7, .c1 = -64, .c0 = 12, },
+ { .chan = 8, .c1 = -64, .c0 = 12, },
+ { .chan = 9, .c1 = -64, .c0 = 12, },
+ { .chan = 10, .c1 = -64, .c0 = 11, },
+ { .chan = 11, .c1 = -64, .c0 = 11, },
+ { .chan = 12, .c1 = -64, .c0 = 11, },
+ { .chan = 13, .c1 = -64, .c0 = 11, },
+ { .chan = 14, .c1 = -64, .c0 = 10, },
+ { .chan = 34, .c1 = -62, .c0 = 24, },
+ { .chan = 38, .c1 = -62, .c0 = 24, },
+ { .chan = 42, .c1 = -62, .c0 = 24, },
+ { .chan = 46, .c1 = -62, .c0 = 23, },
+ { .chan = 36, .c1 = -62, .c0 = 24, },
+ { .chan = 40, .c1 = -62, .c0 = 24, },
+ { .chan = 44, .c1 = -62, .c0 = 23, },
+ { .chan = 48, .c1 = -62, .c0 = 23, },
+ { .chan = 52, .c1 = -62, .c0 = 23, },
+ { .chan = 56, .c1 = -62, .c0 = 22, },
+ { .chan = 60, .c1 = -62, .c0 = 22, },
+ { .chan = 64, .c1 = -62, .c0 = 22, },
+ { .chan = 100, .c1 = -62, .c0 = 16, },
+ { .chan = 104, .c1 = -62, .c0 = 16, },
+ { .chan = 108, .c1 = -62, .c0 = 15, },
+ { .chan = 112, .c1 = -62, .c0 = 14, },
+ { .chan = 116, .c1 = -62, .c0 = 14, },
+ { .chan = 120, .c1 = -62, .c0 = 13, },
+ { .chan = 124, .c1 = -62, .c0 = 12, },
+ { .chan = 128, .c1 = -62, .c0 = 12, },
+ { .chan = 132, .c1 = -62, .c0 = 12, },
+ { .chan = 136, .c1 = -62, .c0 = 11, },
+ { .chan = 140, .c1 = -62, .c0 = 10, },
+ { .chan = 149, .c1 = -61, .c0 = 9, },
+ { .chan = 153, .c1 = -61, .c0 = 9, },
+ { .chan = 157, .c1 = -61, .c0 = 9, },
+ { .chan = 161, .c1 = -61, .c0 = 8, },
+ { .chan = 165, .c1 = -61, .c0 = 8, },
+ { .chan = 184, .c1 = -62, .c0 = 25, },
+ { .chan = 188, .c1 = -62, .c0 = 25, },
+ { .chan = 192, .c1 = -62, .c0 = 25, },
+ { .chan = 196, .c1 = -62, .c0 = 25, },
+ { .chan = 200, .c1 = -62, .c0 = 25, },
+ { .chan = 204, .c1 = -62, .c0 = 25, },
+ { .chan = 208, .c1 = -62, .c0 = 25, },
+ { .chan = 212, .c1 = -62, .c0 = 25, },
+ { .chan = 216, .c1 = -62, .c0 = 26, },
+};
+
+static const struct lpphy_rx_iq_comp lpphy_rev2plus_iq_comp = {
+ .chan = 0,
+ .c1 = -64,
+ .c0 = 0,
+};
+
+static u8 lpphy_nbits(s32 val)
+{
+ u32 tmp = abs(val);
+ u8 nbits = 0;
+
+ while (tmp != 0) {
+ nbits++;
+ tmp >>= 1;
+ }
+
+ return nbits;
+}
+
+static int lpphy_calc_rx_iq_comp(struct b43_wldev *dev, u16 samples)
+{
+ struct lpphy_iq_est iq_est;
+ u16 c0, c1;
+ int prod, ipwr, qpwr, prod_msb, q_msb, tmp1, tmp2, tmp3, tmp4, ret;
+
+ c1 = b43_phy_read(dev, B43_LPPHY_RX_COMP_COEFF_S);
+ c0 = c1 >> 8;
+ c1 |= 0xFF;
+
+ b43_phy_maskset(dev, B43_LPPHY_RX_COMP_COEFF_S, 0xFF00, 0x00C0);
+ b43_phy_mask(dev, B43_LPPHY_RX_COMP_COEFF_S, 0x00FF);
+
+ ret = lpphy_rx_iq_est(dev, samples, 32, &iq_est);
+ if (!ret)
+ goto out;
+
+ prod = iq_est.iq_prod;
+ ipwr = iq_est.i_pwr;
+ qpwr = iq_est.q_pwr;
+
+ if (ipwr + qpwr < 2) {
+ ret = 0;
+ goto out;
+ }
+
+ prod_msb = lpphy_nbits(prod);
+ q_msb = lpphy_nbits(qpwr);
+ tmp1 = prod_msb - 20;
+
+ if (tmp1 >= 0) {
+ tmp3 = ((prod << (30 - prod_msb)) + (ipwr >> (1 + tmp1))) /
+ (ipwr >> tmp1);
+ } else {
+ tmp3 = ((prod << (30 - prod_msb)) + (ipwr << (-1 - tmp1))) /
+ (ipwr << -tmp1);
+ }
+
+ tmp2 = q_msb - 11;
+
+ if (tmp2 >= 0)
+ tmp4 = (qpwr << (31 - q_msb)) / (ipwr >> tmp2);
+ else
+ tmp4 = (qpwr << (31 - q_msb)) / (ipwr << -tmp2);
+
+ tmp4 -= tmp3 * tmp3;
+ tmp4 = -int_sqrt(tmp4);
+
+ c0 = tmp3 >> 3;
+ c1 = tmp4 >> 4;
+
+out:
+ b43_phy_maskset(dev, B43_LPPHY_RX_COMP_COEFF_S, 0xFF00, c1);
+ b43_phy_maskset(dev, B43_LPPHY_RX_COMP_COEFF_S, 0x00FF, c0 << 8);
+ return ret;
+}
+
+/* Complex number using 2 32-bit signed integers */
+typedef struct {s32 i, q;} lpphy_c32;
+
+static lpphy_c32 lpphy_cordic(int theta)
+{
+ u32 arctg[] = { 2949120, 1740967, 919879, 466945, 234379, 117304,
+ 58666, 29335, 14668, 7334, 3667, 1833, 917, 458,
+ 229, 115, 57, 29, };
+ int i, tmp, signx = 1, angle = 0;
+ lpphy_c32 ret = { .i = 39797, .q = 0, };
+
+ theta = clamp_t(int, theta, -180, 180);
+
+ if (theta > 90) {
+ theta -= 180;
+ signx = -1;
+ } else if (theta < -90) {
+ theta += 180;
+ signx = -1;
+ }
+
+ for (i = 0; i <= 17; i++) {
+ if (theta > angle) {
+ tmp = ret.i - (ret.q >> i);
+ ret.q += ret.i >> i;
+ ret.i = tmp;
+ angle += arctg[i];
+ } else {
+ tmp = ret.i + (ret.q >> i);
+ ret.q -= ret.i >> i;
+ ret.i = tmp;
+ angle -= arctg[i];
+ }
+ }
+
+ ret.i *= signx;
+ ret.q *= signx;
+
+ return ret;
+}
+
+static void lpphy_run_samples(struct b43_wldev *dev, u16 samples, u16 loops,
+ u16 wait)
+{
+ b43_phy_maskset(dev, B43_LPPHY_SMPL_PLAY_BUFFER_CTL,
+ 0xFFC0, samples - 1);
+ if (loops != 0xFFFF)
+ loops--;
+ b43_phy_maskset(dev, B43_LPPHY_SMPL_PLAY_COUNT, 0xF000, loops);
+ b43_phy_maskset(dev, B43_LPPHY_SMPL_PLAY_BUFFER_CTL, 0x3F, wait << 6);
+ b43_phy_set(dev, B43_LPPHY_A_PHY_CTL_ADDR, 0x1);
+}
+
+//SPEC FIXME what does a negative freq mean?
+static void lpphy_start_tx_tone(struct b43_wldev *dev, s32 freq, u16 max)
+{
+ struct b43_phy_lp *lpphy = dev->phy.lp;
+ u16 buf[64];
+ int i, samples = 0, angle = 0, rotation = (9 * freq) / 500;
+ lpphy_c32 sample;
+
+ lpphy->tx_tone_freq = freq;
+
+ if (freq) {
+ /* Find i for which abs(freq) integrally divides 20000 * i */
+ for (i = 1; samples * abs(freq) != 20000 * i; i++) {
+ samples = (20000 * i) / abs(freq);
+ if(B43_WARN_ON(samples > 63))
+ return;
+ }
+ } else {
+ samples = 2;
+ }
+
+ for (i = 0; i < samples; i++) {
+ sample = lpphy_cordic(angle);
+ angle += rotation;
+ buf[i] = ((sample.i * max) & 0xFF) << 8;
+ buf[i] |= (sample.q * max) & 0xFF;
+ }
+
+ b43_lptab_write_bulk(dev, B43_LPTAB16(5, 0), samples, buf);
+
+ lpphy_run_samples(dev, samples, 0xFFFF, 0);
+}
+
+static void lpphy_stop_tx_tone(struct b43_wldev *dev)
+{
+ struct b43_phy_lp *lpphy = dev->phy.lp;
+ int i;
+
+ lpphy->tx_tone_freq = 0;
+
+ b43_phy_mask(dev, B43_LPPHY_SMPL_PLAY_COUNT, 0xF000);
+ for (i = 0; i < 31; i++) {
+ if (!(b43_phy_read(dev, B43_LPPHY_A_PHY_CTL_ADDR) & 0x1))
+ break;
+ udelay(100);
+ }
+}
+
+
+static void lpphy_papd_cal(struct b43_wldev *dev, struct lpphy_tx_gains gains,
+ int mode, bool useindex, u8 index)
+{
+ //TODO
+}
+
+static void lpphy_papd_cal_txpwr(struct b43_wldev *dev)
+{
+ struct b43_phy_lp *lpphy = dev->phy.lp;
+ struct ssb_bus *bus = dev->dev->bus;
+ struct lpphy_tx_gains gains, oldgains;
+ int old_txpctl, old_afe_ovr, old_rf, old_bbmult;
+
+ lpphy_read_tx_pctl_mode_from_hardware(dev);
+ old_txpctl = lpphy->txpctl_mode;
+ old_afe_ovr = b43_phy_read(dev, B43_LPPHY_AFE_CTL_OVR) & 0x40;
+ if (old_afe_ovr)
+ oldgains = lpphy_get_tx_gains(dev);
+ old_rf = b43_phy_read(dev, B43_LPPHY_RF_PWR_OVERRIDE) & 0xFF;
+ old_bbmult = lpphy_get_bb_mult(dev);
+
+ lpphy_set_tx_power_control(dev, B43_LPPHY_TXPCTL_OFF);
+
+ if (bus->chip_id == 0x4325 && bus->chip_rev == 0)
+ lpphy_papd_cal(dev, gains, 0, 1, 30);
+ else
+ lpphy_papd_cal(dev, gains, 0, 1, 65);
+
+ if (old_afe_ovr)
+ lpphy_set_tx_gains(dev, oldgains);
+ lpphy_set_bb_mult(dev, old_bbmult);
+ lpphy_set_tx_power_control(dev, old_txpctl);
+ b43_phy_maskset(dev, B43_LPPHY_RF_PWR_OVERRIDE, 0xFF00, old_rf);
+}
+
+static int lpphy_rx_iq_cal(struct b43_wldev *dev, bool noise, bool tx,
+ bool rx, bool pa, struct lpphy_tx_gains *gains)
+{
+ struct b43_phy_lp *lpphy = dev->phy.lp;
+ struct ssb_bus *bus = dev->dev->bus;
+ const struct lpphy_rx_iq_comp *iqcomp = NULL;
+ struct lpphy_tx_gains nogains, oldgains;
+ u16 tmp;
+ int i, ret;
+
+ memset(&nogains, 0, sizeof(nogains));
+ memset(&oldgains, 0, sizeof(oldgains));
+
+ if (bus->chip_id == 0x5354) {
+ for (i = 0; i < ARRAY_SIZE(lpphy_5354_iq_table); i++) {
+ if (lpphy_5354_iq_table[i].chan == lpphy->channel) {
+ iqcomp = &lpphy_5354_iq_table[i];
+ }
+ }
+ } else if (dev->phy.rev >= 2) {
+ iqcomp = &lpphy_rev2plus_iq_comp;
+ } else {
+ for (i = 0; i < ARRAY_SIZE(lpphy_rev0_1_iq_table); i++) {
+ if (lpphy_rev0_1_iq_table[i].chan == lpphy->channel) {
+ iqcomp = &lpphy_rev0_1_iq_table[i];
+ }
+ }
+ }
+
+ if (B43_WARN_ON(!iqcomp))
+ return 0;
+
+ b43_phy_maskset(dev, B43_LPPHY_RX_COMP_COEFF_S, 0xFF00, iqcomp->c1);
+ b43_phy_maskset(dev, B43_LPPHY_RX_COMP_COEFF_S,
+ 0x00FF, iqcomp->c0 << 8);
+
+ if (noise) {
+ tx = true;
+ rx = false;
+ pa = false;
+ }
+
+ lpphy_set_trsw_over(dev, tx, rx);
+
+ if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) {
+ b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_0, 0x8);
+ b43_phy_maskset(dev, B43_LPPHY_RF_OVERRIDE_VAL_0,
+ 0xFFF7, pa << 3);
+ } else {
+ b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_0, 0x20);
+ b43_phy_maskset(dev, B43_LPPHY_RF_OVERRIDE_VAL_0,
+ 0xFFDF, pa << 5);
+ }
+
+ tmp = b43_phy_read(dev, B43_LPPHY_AFE_CTL_OVR) & 0x40;
+
+ if (noise)
+ lpphy_set_rx_gain(dev, 0x2D5D);
+ else {
+ if (tmp)
+ oldgains = lpphy_get_tx_gains(dev);
+ if (!gains)
+ gains = &nogains;
+ lpphy_set_tx_gains(dev, *gains);
+ }
+
+ b43_phy_mask(dev, B43_LPPHY_AFE_CTL_OVR, 0xFFFE);
+ b43_phy_mask(dev, B43_LPPHY_AFE_CTL_OVRVAL, 0xFFFE);
+ b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_0, 0x800);
+ b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_VAL_0, 0x800);
+ lpphy_set_deaf(dev, false);
+ if (noise)
+ ret = lpphy_calc_rx_iq_comp(dev, 0xFFF0);
+ else {
+ lpphy_start_tx_tone(dev, 4000, 100);
+ ret = lpphy_calc_rx_iq_comp(dev, 0x4000);
+ lpphy_stop_tx_tone(dev);
+ }
+ lpphy_clear_deaf(dev, false);
+ b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_0, 0xFFFC);
+ b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_0, 0xFFF7);
+ b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_0, 0xFFDF);
+ if (!noise) {
+ if (tmp)
+ lpphy_set_tx_gains(dev, oldgains);
+ else
+ lpphy_disable_tx_gain_override(dev);
+ }
+ lpphy_disable_rx_gain_override(dev);
+ b43_phy_mask(dev, B43_LPPHY_AFE_CTL_OVR, 0xFFFE);
+ b43_phy_mask(dev, B43_LPPHY_AFE_CTL_OVRVAL, 0xF7FF);
+ return ret;
+}
+
+static void lpphy_calibration(struct b43_wldev *dev)
+{
+ struct b43_phy_lp *lpphy = dev->phy.lp;
+ enum b43_lpphy_txpctl_mode saved_pctl_mode;
+ bool full_cal = false;
+
+ if (lpphy->full_calib_chan != lpphy->channel) {
+ full_cal = true;
+ lpphy->full_calib_chan = lpphy->channel;
+ }
+
+ b43_mac_suspend(dev);
+
+ lpphy_btcoex_override(dev);
+ if (dev->phy.rev >= 2)
+ lpphy_save_dig_flt_state(dev);
+ lpphy_read_tx_pctl_mode_from_hardware(dev);
+ saved_pctl_mode = lpphy->txpctl_mode;
+ lpphy_set_tx_power_control(dev, B43_LPPHY_TXPCTL_OFF);
+ //TODO Perform transmit power table I/Q LO calibration
+ if ((dev->phy.rev == 0) && (saved_pctl_mode != B43_LPPHY_TXPCTL_OFF))
+ lpphy_pr41573_workaround(dev);
+ if ((dev->phy.rev >= 2) && full_cal) {
+ lpphy_papd_cal_txpwr(dev);
+ }
+ lpphy_set_tx_power_control(dev, saved_pctl_mode);
+ if (dev->phy.rev >= 2)
+ lpphy_restore_dig_flt_state(dev);
+ lpphy_rx_iq_cal(dev, true, true, false, false, NULL);
+
+ b43_mac_enable(dev);
+}
+
static u16 b43_lpphy_op_read(struct b43_wldev *dev, u16 reg)
{
b43_write16(dev, B43_MMIO_PHY_CONTROL, reg);
@@ -1539,12 +2081,6 @@ static void b43_lpphy_op_radio_write(struct b43_wldev *dev, u16 reg, u16 value)
b43_write16(dev, B43_MMIO_RADIO_DATA_LOW, value);
}
-static void b43_lpphy_op_software_rfkill(struct b43_wldev *dev,
- bool blocked)
-{
- //TODO
-}
-
struct b206x_channel {
u8 channel;
u16 freq;
@@ -2010,22 +2546,6 @@ static int lpphy_b2062_tune(struct b43_wldev *dev,
return err;
}
-
-/* This was previously called lpphy_japan_filter */
-static void lpphy_set_analog_filter(struct b43_wldev *dev, int channel)
-{
- struct b43_phy_lp *lpphy = dev->phy.lp;
- u16 tmp = (channel == 14); //SPEC FIXME check japanwidefilter!
-
- if (dev->phy.rev < 2) { //SPEC FIXME Isn't this rev0/1-specific?
- b43_phy_maskset(dev, B43_LPPHY_LP_PHY_CTL, 0xFCFF, tmp << 9);
- if ((dev->phy.rev == 1) && (lpphy->rc_cap))
- lpphy_set_rc_cap(dev);
- } else {
- b43_radio_write(dev, B2063_TX_BB_SP3, 0x3F);
- }
-}
-
static void lpphy_b2063_vco_calib(struct b43_wldev *dev)
{
u16 tmp;
@@ -2210,18 +2730,6 @@ static int b43_lpphy_op_init(struct b43_wldev *dev)
return 0;
}
-static void b43_lpphy_op_set_rx_antenna(struct b43_wldev *dev, int antenna)
-{
- if (dev->phy.rev >= 2)
- return; // rev2+ doesn't support antenna diversity
-
- if (B43_WARN_ON(antenna > B43_ANTENNA_AUTO1))
- return;
-
- b43_phy_maskset(dev, B43_LPPHY_CRSGAIN_CTL, 0xFFFD, antenna & 0x2);
- b43_phy_maskset(dev, B43_LPPHY_CRSGAIN_CTL, 0xFFFE, antenna & 0x1);
-}
-
static void b43_lpphy_op_adjust_txpower(struct b43_wldev *dev)
{
//TODO
@@ -2244,6 +2752,11 @@ void b43_lpphy_op_switch_analog(struct b43_wldev *dev, bool on)
}
}
+static void b43_lpphy_op_pwork_15sec(struct b43_wldev *dev)
+{
+ //TODO
+}
+
const struct b43_phy_operations b43_phyops_lp = {
.allocate = b43_lpphy_op_allocate,
.free = b43_lpphy_op_free,
@@ -2261,4 +2774,6 @@ const struct b43_phy_operations b43_phyops_lp = {
.set_rx_antenna = b43_lpphy_op_set_rx_antenna,
.recalc_txpower = b43_lpphy_op_recalc_txpower,
.adjust_txpower = b43_lpphy_op_adjust_txpower,
+ .pwork_15sec = b43_lpphy_op_pwork_15sec,
+ .pwork_60sec = lpphy_calibration,
};
diff --git a/drivers/net/wireless/b43/phy_lp.h b/drivers/net/wireless/b43/phy_lp.h
index c3232c1..62737f7 100644
--- a/drivers/net/wireless/b43/phy_lp.h
+++ b/drivers/net/wireless/b43/phy_lp.h
@@ -286,6 +286,7 @@
#define B43_LPPHY_TR_LOOKUP_6 B43_PHY_OFDM(0xC8) /* TR Lookup 6 */
#define B43_LPPHY_TR_LOOKUP_7 B43_PHY_OFDM(0xC9) /* TR Lookup 7 */
#define B43_LPPHY_TR_LOOKUP_8 B43_PHY_OFDM(0xCA) /* TR Lookup 8 */
+#define B43_LPPHY_RF_PWR_OVERRIDE B43_PHY_OFDM(0xD3) /* RF power override */
@@ -871,12 +872,12 @@ struct b43_phy_lp {
u8 rssi_gs;
/* RC cap */
- u8 rc_cap; /* FIXME initial value? */
+ u8 rc_cap;
/* BX arch */
u8 bx_arch;
/* Full calibration channel */
- u8 full_calib_chan; /* FIXME initial value? */
+ u8 full_calib_chan;
/* Transmit iqlocal best coeffs */
bool tx_iqloc_best_coeffs_valid;
@@ -891,6 +892,12 @@ struct b43_phy_lp {
/* The channel we are tuned to */
u8 channel;
+
+ /* The active antenna diversity mode */
+ int antenna;
+
+ /* Frequency of the active TX tone */
+ int tx_tone_freq;
};
enum tssi_mux_mode {
--
1.6.4.2
^ permalink raw reply related
* [PATCH] b43: LP-PHY: Begin implementing calibration & software RFKILL support
From: Gábor Stefanik @ 2009-10-25 15:22 UTC (permalink / raw)
To: John Linville, Michael Buesch, Larry Finger, Mark Huijgen
Cc: Broadcom Wireless, linux-wireless
This implements the following calibration functions:
-Set TX IQCC
-Set TX Power by Index
-PR41573 workaround (incomplete, needs PHY reset)
-Calc RX IQ Comp
-PHY Cordic
-Run Samples
-Start/Stop TX Tone
-part of PAPD Cal TX Power
-RX I/Q Calibration
-The basic structure of the periodic calibration wrapper
Software RFKILL (required by calibration) is also implemented in
this round.
Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
---
Michael, could you please do the PHY reset part? I can't seem to
understand its relationship to wireless_core_reset... also, it's
heavily ssb-speak, which I am not good at.
drivers/net/wireless/b43/phy_lp.c | 783 ++++++++++++++++++++++++++++++-------
drivers/net/wireless/b43/phy_lp.h | 11 +-
2 files changed, 658 insertions(+), 136 deletions(-)
diff --git a/drivers/net/wireless/b43/phy_lp.c b/drivers/net/wireless/b43/phy_lp.c
index 07d9d03..9dcb39c 100644
--- a/drivers/net/wireless/b43/phy_lp.c
+++ b/drivers/net/wireless/b43/phy_lp.c
@@ -67,6 +67,7 @@ static void b43_lpphy_op_prepare_structs(struct b43_wldev *dev)
struct b43_phy_lp *lpphy = phy->lp;
memset(lpphy, 0, sizeof(*lpphy));
+ lpphy->antenna = B43_ANTENNA_DEFAULT;
//TODO
}
@@ -379,8 +380,6 @@ static void lpphy_save_dig_flt_state(struct b43_wldev *dev)
}
}
-/* lpphy_restore_dig_flt_state is unused but kept as a reference */
-#if 0
static void lpphy_restore_dig_flt_state(struct b43_wldev *dev)
{
static const u16 addr[] = {
@@ -401,7 +400,6 @@ static void lpphy_restore_dig_flt_state(struct b43_wldev *dev)
for (i = 0; i < ARRAY_SIZE(addr); i++)
b43_phy_write(dev, addr[i], lpphy->dig_flt_state[i]);
}
-#endif
static void lpphy_baseband_rev2plus_init(struct b43_wldev *dev)
{
@@ -754,11 +752,17 @@ static void lpphy_clear_deaf(struct b43_wldev *dev, bool user)
}
}
+static void lpphy_set_trsw_over(struct b43_wldev *dev, bool tx, bool rx)
+{
+ u16 trsw = (tx << 1) | rx;
+ b43_phy_maskset(dev, B43_LPPHY_RF_OVERRIDE_VAL_0, 0xFFFC, trsw);
+ b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_0, 0x3);
+}
+
static void lpphy_disable_crs(struct b43_wldev *dev, bool user)
{
lpphy_set_deaf(dev, user);
- b43_phy_maskset(dev, B43_LPPHY_RF_OVERRIDE_VAL_0, 0xFFFC, 0x1);
- b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_0, 0x3);
+ lpphy_set_trsw_over(dev, false, true);
b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_VAL_0, 0xFFFB);
b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_0, 0x4);
b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_VAL_0, 0xFFF7);
@@ -793,6 +797,60 @@ static void lpphy_restore_crs(struct b43_wldev *dev, bool user)
struct lpphy_tx_gains { u16 gm, pga, pad, dac; };
+static void lpphy_disable_rx_gain_override(struct b43_wldev *dev)
+{
+ b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_0, 0xFFFE);
+ b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_0, 0xFFEF);
+ b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_0, 0xFFBF);
+ if (dev->phy.rev >= 2) {
+ b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_2, 0xFEFF);
+ if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) {
+ b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_2, 0xFBFF);
+ b43_phy_mask(dev, B43_PHY_OFDM(0xE5), 0xFFF7);
+ }
+ } else {
+ b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_2, 0xFDFF);
+ }
+}
+
+static void lpphy_enable_rx_gain_override(struct b43_wldev *dev)
+{
+ b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_0, 0x1);
+ b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_0, 0x10);
+ b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_0, 0x40);
+ if (dev->phy.rev >= 2) {
+ b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_2, 0x100);
+ if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) {
+ b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_2, 0x400);
+ b43_phy_set(dev, B43_PHY_OFDM(0xE5), 0x8);
+ }
+ } else {
+ b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_2, 0x200);
+ }
+}
+
+static void lpphy_disable_tx_gain_override(struct b43_wldev *dev)
+{
+ if (dev->phy.rev < 2)
+ b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_2, 0xFEFF);
+ else {
+ b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_2, 0xFF7F);
+ b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_2, 0xBFFF);
+ }
+ b43_phy_mask(dev, B43_LPPHY_AFE_CTL_OVR, 0xFFBF);
+}
+
+static void lpphy_enable_tx_gain_override(struct b43_wldev *dev)
+{
+ if (dev->phy.rev < 2)
+ b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_2, 0x100);
+ else {
+ b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_2, 0x80);
+ b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_2, 0x4000);
+ }
+ b43_phy_set(dev, B43_LPPHY_AFE_CTL_OVR, 0x40);
+}
+
static struct lpphy_tx_gains lpphy_get_tx_gains(struct b43_wldev *dev)
{
struct lpphy_tx_gains gains;
@@ -822,6 +880,17 @@ static void lpphy_set_dac_gain(struct b43_wldev *dev, u16 dac)
b43_phy_maskset(dev, B43_LPPHY_AFE_DAC_CTL, 0xF000, ctl);
}
+static u16 lpphy_get_pa_gain(struct b43_wldev *dev)
+{
+ return b43_phy_read(dev, B43_PHY_OFDM(0xFB)) & 0x7F;
+}
+
+static void lpphy_set_pa_gain(struct b43_wldev *dev, u16 gain)
+{
+ b43_phy_maskset(dev, B43_PHY_OFDM(0xFB), 0xE03F, gain << 6);
+ b43_phy_maskset(dev, B43_PHY_OFDM(0xFD), 0x80FF, gain << 8);
+}
+
static void lpphy_set_tx_gains(struct b43_wldev *dev,
struct lpphy_tx_gains gains)
{
@@ -832,25 +901,22 @@ static void lpphy_set_tx_gains(struct b43_wldev *dev,
b43_phy_maskset(dev, B43_LPPHY_TX_GAIN_CTL_OVERRIDE_VAL,
0xF800, rf_gain);
} else {
- pa_gain = b43_phy_read(dev, B43_PHY_OFDM(0xFB)) & 0x1FC0;
- pa_gain <<= 2;
+ pa_gain = lpphy_get_pa_gain(dev);
b43_phy_write(dev, B43_LPPHY_TX_GAIN_CTL_OVERRIDE_VAL,
(gains.pga << 8) | gains.gm);
+ /*
+ * SPEC FIXME The spec calls for (pa_gain << 8) here, but that
+ * conflicts with the spec for set_pa_gain! Vendor driver bug?
+ */
b43_phy_maskset(dev, B43_PHY_OFDM(0xFB),
- 0x8000, gains.pad | pa_gain);
+ 0x8000, gains.pad | (pa_gain << 6));
b43_phy_write(dev, B43_PHY_OFDM(0xFC),
(gains.pga << 8) | gains.gm);
b43_phy_maskset(dev, B43_PHY_OFDM(0xFD),
- 0x8000, gains.pad | pa_gain);
+ 0x8000, gains.pad | (pa_gain << 8));
}
lpphy_set_dac_gain(dev, gains.dac);
- if (dev->phy.rev < 2) {
- b43_phy_maskset(dev, B43_LPPHY_RF_OVERRIDE_2, 0xFEFF, 1 << 8);
- } else {
- b43_phy_maskset(dev, B43_LPPHY_RF_OVERRIDE_2, 0xFF7F, 1 << 7);
- b43_phy_maskset(dev, B43_LPPHY_RF_OVERRIDE_2, 0xBFFF, 1 << 14);
- }
- b43_phy_maskset(dev, B43_LPPHY_AFE_CTL_OVR, 0xFFBF, 1 << 6);
+ lpphy_enable_tx_gain_override(dev);
}
static void lpphy_rev0_1_set_rx_gain(struct b43_wldev *dev, u32 gain)
@@ -890,41 +956,6 @@ static void lpphy_rev2plus_set_rx_gain(struct b43_wldev *dev, u32 gain)
}
}
-/* lpphy_disable_rx_gain_override is unused but kept as a reference */
-#if 0
-static void lpphy_disable_rx_gain_override(struct b43_wldev *dev)
-{
- b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_0, 0xFFFE);
- b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_0, 0xFFEF);
- b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_0, 0xFFBF);
- if (dev->phy.rev >= 2) {
- b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_2, 0xFEFF);
- if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) {
- b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_2, 0xFBFF);
- b43_phy_mask(dev, B43_PHY_OFDM(0xE5), 0xFFF7);
- }
- } else {
- b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_2, 0xFDFF);
- }
-}
-#endif
-
-static void lpphy_enable_rx_gain_override(struct b43_wldev *dev)
-{
- b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_0, 0x1);
- b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_0, 0x10);
- b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_0, 0x40);
- if (dev->phy.rev >= 2) {
- b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_2, 0x100);
- if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) {
- b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_2, 0x400);
- b43_phy_set(dev, B43_PHY_OFDM(0xE5), 0x8);
- }
- } else {
- b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_2, 0x200);
- }
-}
-
static void lpphy_set_rx_gain(struct b43_wldev *dev, u32 gain)
{
if (dev->phy.rev < 2)
@@ -1009,8 +1040,7 @@ static int lpphy_loopback(struct b43_wldev *dev)
memset(&iq_est, 0, sizeof(iq_est));
- b43_phy_maskset(dev, B43_LPPHY_RF_OVERRIDE_VAL_0, 0xFFFC, 0x3);
- b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_0, 0x3);
+ lpphy_set_trsw_over(dev, true, true);
b43_phy_set(dev, B43_LPPHY_AFE_CTL_OVR, 1);
b43_phy_mask(dev, B43_LPPHY_AFE_CTL_OVRVAL, 0xFFFE);
b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_0, 0x800);
@@ -1132,7 +1162,7 @@ static void lpphy_set_tx_power_control(struct b43_wldev *dev,
b43_phy_maskset(dev, B43_LPPHY_TX_PWR_CTL_NNUM,
0x8FFF, ((u16)lpphy->tssi_npt << 16));
//TODO Set "TSSI Transmit Count" variable to total transmitted frame count
- //TODO Disable TX gain override
+ lpphy_disable_tx_gain_override(dev);
lpphy->tx_pwr_idx_over = -1;
}
}
@@ -1318,15 +1348,73 @@ static void lpphy_calibrate_rc(struct b43_wldev *dev)
}
}
+static void b43_lpphy_op_set_rx_antenna(struct b43_wldev *dev, int antenna)
+{
+ if (dev->phy.rev >= 2)
+ return; // rev2+ doesn't support antenna diversity
+
+ if (B43_WARN_ON(antenna > B43_ANTENNA_AUTO1))
+ return;
+
+ b43_hf_write(dev, b43_hf_read(dev) & ~B43_HF_ANTDIVHELP);
+
+ b43_phy_maskset(dev, B43_LPPHY_CRSGAIN_CTL, 0xFFFD, antenna & 0x2);
+ b43_phy_maskset(dev, B43_LPPHY_CRSGAIN_CTL, 0xFFFE, antenna & 0x1);
+
+ b43_hf_write(dev, b43_hf_read(dev) | B43_HF_ANTDIVHELP);
+
+ dev->phy.lp->antenna = antenna;
+}
+
+static void lpphy_set_tx_iqcc(struct b43_wldev *dev, u16 a, u16 b)
+{
+ u16 tmp[2];
+
+ tmp[0] = a;
+ tmp[1] = b;
+ b43_lptab_write_bulk(dev, B43_LPTAB16(0, 80), 2, tmp);
+}
+
static void lpphy_set_tx_power_by_index(struct b43_wldev *dev, u8 index)
{
struct b43_phy_lp *lpphy = dev->phy.lp;
+ struct lpphy_tx_gains gains;
+ u32 iq_comp, tx_gain, coeff, rf_power;
lpphy->tx_pwr_idx_over = index;
+ lpphy_read_tx_pctl_mode_from_hardware(dev);
if (lpphy->txpctl_mode != B43_LPPHY_TXPCTL_OFF)
lpphy_set_tx_power_control(dev, B43_LPPHY_TXPCTL_SW);
-
- //TODO
+ if (dev->phy.rev >= 2) {
+ iq_comp = b43_lptab_read(dev, B43_LPTAB32(7, index + 320));
+ tx_gain = b43_lptab_read(dev, B43_LPTAB32(7, index + 192));
+ gains.pad = (tx_gain >> 16) & 0xFF;
+ gains.gm = tx_gain & 0xFF;
+ gains.pga = (tx_gain >> 8) & 0xFF;
+ gains.dac = (iq_comp >> 28) & 0xFF;
+ lpphy_set_tx_gains(dev, gains);
+ } else {
+ iq_comp = b43_lptab_read(dev, B43_LPTAB32(10, index + 320));
+ tx_gain = b43_lptab_read(dev, B43_LPTAB32(10, index + 192));
+ b43_phy_maskset(dev, B43_LPPHY_TX_GAIN_CTL_OVERRIDE_VAL,
+ 0xF800, (tx_gain >> 4) & 0x7FFF);
+ lpphy_set_dac_gain(dev, tx_gain & 0x7);
+ lpphy_set_pa_gain(dev, (tx_gain >> 24) & 0x7F);
+ }
+ lpphy_set_bb_mult(dev, (iq_comp >> 20) & 0xFF);
+ lpphy_set_tx_iqcc(dev, (iq_comp >> 10) & 0x3FF, iq_comp & 0x3FF);
+ if (dev->phy.rev >= 2) {
+ coeff = b43_lptab_read(dev, B43_LPTAB32(7, index + 448));
+ } else {
+ coeff = b43_lptab_read(dev, B43_LPTAB32(10, index + 448));
+ }
+ b43_lptab_write(dev, B43_LPTAB16(0, 85), coeff & 0xFFFF);
+ if (dev->phy.rev >= 2) {
+ rf_power = b43_lptab_read(dev, B43_LPTAB32(7, index + 576));
+ b43_phy_maskset(dev, B43_LPPHY_RF_PWR_OVERRIDE, 0xFF00,
+ rf_power & 0xFFFF);//SPEC FIXME mask & set != 0
+ }
+ lpphy_enable_tx_gain_override(dev);
}
static void lpphy_btcoex_override(struct b43_wldev *dev)
@@ -1335,58 +1423,45 @@ static void lpphy_btcoex_override(struct b43_wldev *dev)
b43_write16(dev, B43_MMIO_BTCOEX_TXCTL, 0xFF);
}
-static void lpphy_pr41573_workaround(struct b43_wldev *dev)
+static void b43_lpphy_op_software_rfkill(struct b43_wldev *dev,
+ bool blocked)
{
- struct b43_phy_lp *lpphy = dev->phy.lp;
- u32 *saved_tab;
- const unsigned int saved_tab_size = 256;
- enum b43_lpphy_txpctl_mode txpctl_mode;
- s8 tx_pwr_idx_over;
- u16 tssi_npt, tssi_idx;
-
- saved_tab = kcalloc(saved_tab_size, sizeof(saved_tab[0]), GFP_KERNEL);
- if (!saved_tab) {
- b43err(dev->wl, "PR41573 failed. Out of memory!\n");
- return;
- }
-
- lpphy_read_tx_pctl_mode_from_hardware(dev);
- txpctl_mode = lpphy->txpctl_mode;
- tx_pwr_idx_over = lpphy->tx_pwr_idx_over;
- tssi_npt = lpphy->tssi_npt;
- tssi_idx = lpphy->tssi_idx;
-
- if (dev->phy.rev < 2) {
- b43_lptab_read_bulk(dev, B43_LPTAB32(10, 0x140),
- saved_tab_size, saved_tab);
+ //TODO check MAC control register
+ if (blocked) {
+ if (dev->phy.rev >= 2) {
+ b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_VAL_0, 0x83FF);
+ b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_0, 0x1F00);
+ b43_phy_mask(dev, B43_LPPHY_AFE_DDFS, 0x80FF);
+ b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_2_VAL, 0xDFFF);
+ b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_2, 0x0808);
+ } else {
+ b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_VAL_0, 0xE0FF);
+ b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_0, 0x1F00);
+ b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_2_VAL, 0xFCFF);
+ b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_2, 0x0018);
+ }
} else {
- b43_lptab_read_bulk(dev, B43_LPTAB32(7, 0x140),
- saved_tab_size, saved_tab);
+ b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_0, 0xE0FF);
+ if (dev->phy.rev >= 2)
+ b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_2, 0xF7F7);
+ else
+ b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_2, 0xFFE7);
}
- //TODO
-
- kfree(saved_tab);
}
-static void lpphy_calibration(struct b43_wldev *dev)
+/* This was previously called lpphy_japan_filter */
+static void lpphy_set_analog_filter(struct b43_wldev *dev, int channel)
{
struct b43_phy_lp *lpphy = dev->phy.lp;
- enum b43_lpphy_txpctl_mode saved_pctl_mode;
-
- b43_mac_suspend(dev);
-
- lpphy_btcoex_override(dev);
- lpphy_read_tx_pctl_mode_from_hardware(dev);
- saved_pctl_mode = lpphy->txpctl_mode;
- lpphy_set_tx_power_control(dev, B43_LPPHY_TXPCTL_OFF);
- //TODO Perform transmit power table I/Q LO calibration
- if ((dev->phy.rev == 0) && (saved_pctl_mode != B43_LPPHY_TXPCTL_OFF))
- lpphy_pr41573_workaround(dev);
- //TODO If a full calibration has not been performed on this channel yet, perform PAPD TX-power calibration
- lpphy_set_tx_power_control(dev, saved_pctl_mode);
- //TODO Perform I/Q calibration with a single control value set
+ u16 tmp = (channel == 14); //SPEC FIXME check japanwidefilter!
- b43_mac_enable(dev);
+ if (dev->phy.rev < 2) { //SPEC FIXME Isn't this rev0/1-specific?
+ b43_phy_maskset(dev, B43_LPPHY_LP_PHY_CTL, 0xFCFF, tmp << 9);
+ if ((dev->phy.rev == 1) && (lpphy->rc_cap))
+ lpphy_set_rc_cap(dev);
+ } else {
+ b43_radio_write(dev, B2063_TX_BB_SP3, 0x3F);
+ }
}
static void lpphy_set_tssi_mux(struct b43_wldev *dev, enum tssi_mux_mode mode)
@@ -1495,6 +1570,473 @@ static void lpphy_tx_pctl_init(struct b43_wldev *dev)
}
}
+static void lpphy_pr41573_workaround(struct b43_wldev *dev)
+{
+ struct b43_phy_lp *lpphy = dev->phy.lp;
+ u32 *saved_tab;
+ const unsigned int saved_tab_size = 256;
+ enum b43_lpphy_txpctl_mode txpctl_mode;
+ s8 tx_pwr_idx_over;
+ u16 tssi_npt, tssi_idx;
+
+ saved_tab = kcalloc(saved_tab_size, sizeof(saved_tab[0]), GFP_KERNEL);
+ if (!saved_tab) {
+ b43err(dev->wl, "PR41573 failed. Out of memory!\n");
+ return;
+ }
+
+ lpphy_read_tx_pctl_mode_from_hardware(dev);
+ txpctl_mode = lpphy->txpctl_mode;
+ tx_pwr_idx_over = lpphy->tx_pwr_idx_over;
+ tssi_npt = lpphy->tssi_npt;
+ tssi_idx = lpphy->tssi_idx;
+
+ if (dev->phy.rev < 2) {
+ b43_lptab_read_bulk(dev, B43_LPTAB32(10, 0x140),
+ saved_tab_size, saved_tab);
+ } else {
+ b43_lptab_read_bulk(dev, B43_LPTAB32(7, 0x140),
+ saved_tab_size, saved_tab);
+ }
+ //FIXME PHY reset
+ lpphy_table_init(dev); //FIXME is table init needed?
+ lpphy_baseband_init(dev);
+ lpphy_tx_pctl_init(dev);
+ b43_lpphy_op_software_rfkill(dev, false);
+ lpphy_set_tx_power_control(dev, B43_LPPHY_TXPCTL_OFF);
+ if (dev->phy.rev < 2) {
+ b43_lptab_write_bulk(dev, B43_LPTAB32(10, 0x140),
+ saved_tab_size, saved_tab);
+ } else {
+ b43_lptab_write_bulk(dev, B43_LPTAB32(7, 0x140),
+ saved_tab_size, saved_tab);
+ }
+ b43_write16(dev, B43_MMIO_CHANNEL, lpphy->channel);
+ lpphy->tssi_npt = tssi_npt;
+ lpphy->tssi_idx = tssi_idx;
+ lpphy_set_analog_filter(dev, lpphy->channel);
+ if (tx_pwr_idx_over != -1)
+ lpphy_set_tx_power_by_index(dev, tx_pwr_idx_over);
+ if (lpphy->rc_cap)
+ lpphy_set_rc_cap(dev);
+ b43_lpphy_op_set_rx_antenna(dev, lpphy->antenna);
+ lpphy_set_tx_power_control(dev, txpctl_mode);
+ kfree(saved_tab);
+}
+
+struct lpphy_rx_iq_comp { u8 chan; s8 c1, c0; };
+
+static const struct lpphy_rx_iq_comp lpphy_5354_iq_table[] = {
+ { .chan = 1, .c1 = -66, .c0 = 15, },
+ { .chan = 2, .c1 = -66, .c0 = 15, },
+ { .chan = 3, .c1 = -66, .c0 = 15, },
+ { .chan = 4, .c1 = -66, .c0 = 15, },
+ { .chan = 5, .c1 = -66, .c0 = 15, },
+ { .chan = 6, .c1 = -66, .c0 = 15, },
+ { .chan = 7, .c1 = -66, .c0 = 14, },
+ { .chan = 8, .c1 = -66, .c0 = 14, },
+ { .chan = 9, .c1 = -66, .c0 = 14, },
+ { .chan = 10, .c1 = -66, .c0 = 14, },
+ { .chan = 11, .c1 = -66, .c0 = 14, },
+ { .chan = 12, .c1 = -66, .c0 = 13, },
+ { .chan = 13, .c1 = -66, .c0 = 13, },
+ { .chan = 14, .c1 = -66, .c0 = 13, },
+};
+
+static const struct lpphy_rx_iq_comp lpphy_rev0_1_iq_table[] = {
+ { .chan = 1, .c1 = -64, .c0 = 13, },
+ { .chan = 2, .c1 = -64, .c0 = 13, },
+ { .chan = 3, .c1 = -64, .c0 = 13, },
+ { .chan = 4, .c1 = -64, .c0 = 13, },
+ { .chan = 5, .c1 = -64, .c0 = 12, },
+ { .chan = 6, .c1 = -64, .c0 = 12, },
+ { .chan = 7, .c1 = -64, .c0 = 12, },
+ { .chan = 8, .c1 = -64, .c0 = 12, },
+ { .chan = 9, .c1 = -64, .c0 = 12, },
+ { .chan = 10, .c1 = -64, .c0 = 11, },
+ { .chan = 11, .c1 = -64, .c0 = 11, },
+ { .chan = 12, .c1 = -64, .c0 = 11, },
+ { .chan = 13, .c1 = -64, .c0 = 11, },
+ { .chan = 14, .c1 = -64, .c0 = 10, },
+ { .chan = 34, .c1 = -62, .c0 = 24, },
+ { .chan = 38, .c1 = -62, .c0 = 24, },
+ { .chan = 42, .c1 = -62, .c0 = 24, },
+ { .chan = 46, .c1 = -62, .c0 = 23, },
+ { .chan = 36, .c1 = -62, .c0 = 24, },
+ { .chan = 40, .c1 = -62, .c0 = 24, },
+ { .chan = 44, .c1 = -62, .c0 = 23, },
+ { .chan = 48, .c1 = -62, .c0 = 23, },
+ { .chan = 52, .c1 = -62, .c0 = 23, },
+ { .chan = 56, .c1 = -62, .c0 = 22, },
+ { .chan = 60, .c1 = -62, .c0 = 22, },
+ { .chan = 64, .c1 = -62, .c0 = 22, },
+ { .chan = 100, .c1 = -62, .c0 = 16, },
+ { .chan = 104, .c1 = -62, .c0 = 16, },
+ { .chan = 108, .c1 = -62, .c0 = 15, },
+ { .chan = 112, .c1 = -62, .c0 = 14, },
+ { .chan = 116, .c1 = -62, .c0 = 14, },
+ { .chan = 120, .c1 = -62, .c0 = 13, },
+ { .chan = 124, .c1 = -62, .c0 = 12, },
+ { .chan = 128, .c1 = -62, .c0 = 12, },
+ { .chan = 132, .c1 = -62, .c0 = 12, },
+ { .chan = 136, .c1 = -62, .c0 = 11, },
+ { .chan = 140, .c1 = -62, .c0 = 10, },
+ { .chan = 149, .c1 = -61, .c0 = 9, },
+ { .chan = 153, .c1 = -61, .c0 = 9, },
+ { .chan = 157, .c1 = -61, .c0 = 9, },
+ { .chan = 161, .c1 = -61, .c0 = 8, },
+ { .chan = 165, .c1 = -61, .c0 = 8, },
+ { .chan = 184, .c1 = -62, .c0 = 25, },
+ { .chan = 188, .c1 = -62, .c0 = 25, },
+ { .chan = 192, .c1 = -62, .c0 = 25, },
+ { .chan = 196, .c1 = -62, .c0 = 25, },
+ { .chan = 200, .c1 = -62, .c0 = 25, },
+ { .chan = 204, .c1 = -62, .c0 = 25, },
+ { .chan = 208, .c1 = -62, .c0 = 25, },
+ { .chan = 212, .c1 = -62, .c0 = 25, },
+ { .chan = 216, .c1 = -62, .c0 = 26, },
+};
+
+static const struct lpphy_rx_iq_comp lpphy_rev2plus_iq_comp = {
+ .chan = 0,
+ .c1 = -64,
+ .c0 = 0,
+};
+
+static u8 lpphy_nbits(s32 val)
+{
+ u32 tmp = abs(val);
+ u8 nbits = 0;
+
+ while (tmp != 0) {
+ nbits++;
+ tmp >>= 1;
+ }
+
+ return nbits;
+}
+
+static int lpphy_calc_rx_iq_comp(struct b43_wldev *dev, u16 samples)
+{
+ struct lpphy_iq_est iq_est;
+ u16 c0, c1;
+ int prod, ipwr, qpwr, prod_msb, q_msb, tmp1, tmp2, tmp3, tmp4, ret;
+
+ c1 = b43_phy_read(dev, B43_LPPHY_RX_COMP_COEFF_S);
+ c0 = c1 >> 8;
+ c1 |= 0xFF;
+
+ b43_phy_maskset(dev, B43_LPPHY_RX_COMP_COEFF_S, 0xFF00, 0x00C0);
+ b43_phy_mask(dev, B43_LPPHY_RX_COMP_COEFF_S, 0x00FF);
+
+ ret = lpphy_rx_iq_est(dev, samples, 32, &iq_est);
+ if (!ret)
+ goto out;
+
+ prod = iq_est.iq_prod;
+ ipwr = iq_est.i_pwr;
+ qpwr = iq_est.q_pwr;
+
+ if (ipwr + qpwr < 2) {
+ ret = 0;
+ goto out;
+ }
+
+ prod_msb = lpphy_nbits(prod);
+ q_msb = lpphy_nbits(qpwr);
+ tmp1 = prod_msb - 20;
+
+ if (tmp1 >= 0) {
+ tmp3 = ((prod << (30 - prod_msb)) + (ipwr >> (1 + tmp1))) /
+ (ipwr >> tmp1);
+ } else {
+ tmp3 = ((prod << (30 - prod_msb)) + (ipwr << (-1 - tmp1))) /
+ (ipwr << -tmp1);
+ }
+
+ tmp2 = q_msb - 11;
+
+ if (tmp2 >= 0)
+ tmp4 = (qpwr << (31 - q_msb)) / (ipwr >> tmp2);
+ else
+ tmp4 = (qpwr << (31 - q_msb)) / (ipwr << -tmp2);
+
+ tmp4 -= tmp3 * tmp3;
+ tmp4 = -int_sqrt(tmp4);
+
+ c0 = tmp3 >> 3;
+ c1 = tmp4 >> 4;
+
+out:
+ b43_phy_maskset(dev, B43_LPPHY_RX_COMP_COEFF_S, 0xFF00, c1);
+ b43_phy_maskset(dev, B43_LPPHY_RX_COMP_COEFF_S, 0x00FF, c0 << 8);
+ return ret;
+}
+
+/* Complex number using 2 32-bit signed integers */
+typedef struct {s32 i, q;} lpphy_c32;
+
+static lpphy_c32 lpphy_cordic(int theta)
+{
+ u32 arctg[] = { 2949120, 1740967, 919879, 466945, 234379, 117304,
+ 58666, 29335, 14668, 7334, 3667, 1833, 917, 458,
+ 229, 115, 57, 29, };
+ int i, tmp, signx = 1, angle = 0;
+ lpphy_c32 ret = { .i = 39797, .q = 0, };
+
+ theta = clamp_t(int, theta, -180, 180);
+
+ if (theta > 90) {
+ theta -= 180;
+ signx = -1;
+ } else if (theta < -90) {
+ theta += 180;
+ signx = -1;
+ }
+
+ for (i = 0; i <= 17; i++) {
+ if (theta > angle) {
+ tmp = ret.i - (ret.q >> i);
+ ret.q += ret.i >> i;
+ ret.i = tmp;
+ angle += arctg[i];
+ } else {
+ tmp = ret.i + (ret.q >> i);
+ ret.q -= ret.i >> i;
+ ret.i = tmp;
+ angle -= arctg[i];
+ }
+ }
+
+ ret.i *= signx;
+ ret.q *= signx;
+
+ return ret;
+}
+
+static void lpphy_run_samples(struct b43_wldev *dev, u16 samples, u16 loops,
+ u16 wait)
+{
+ b43_phy_maskset(dev, B43_LPPHY_SMPL_PLAY_BUFFER_CTL,
+ 0xFFC0, samples - 1);
+ if (loops != 0xFFFF)
+ loops--;
+ b43_phy_maskset(dev, B43_LPPHY_SMPL_PLAY_COUNT, 0xF000, loops);
+ b43_phy_maskset(dev, B43_LPPHY_SMPL_PLAY_BUFFER_CTL, 0x3F, wait << 6);
+ b43_phy_set(dev, B43_LPPHY_A_PHY_CTL_ADDR, 0x1);
+}
+
+//SPEC FIXME what does a negative freq mean?
+static void lpphy_start_tx_tone(struct b43_wldev *dev, s32 freq, u16 max)
+{
+ struct b43_phy_lp *lpphy = dev->phy.lp;
+ u16 buf[64];
+ int i, samples = 0, angle = 0, rotation = (9 * freq) / 500;
+ lpphy_c32 sample;
+
+ lpphy->tx_tone_freq = freq;
+
+ if (freq) {
+ /* Find i for which abs(freq) integrally divides 20000 * i */
+ for (i = 1; samples * abs(freq) != 20000 * i; i++) {
+ samples = (20000 * i) / abs(freq);
+ if(B43_WARN_ON(samples > 63))
+ return;
+ }
+ } else {
+ samples = 2;
+ }
+
+ for (i = 0; i < samples; i++) {
+ sample = lpphy_cordic(angle);
+ angle += rotation;
+ buf[i] = ((sample.i * max) & 0xFF) << 8;
+ buf[i] |= (sample.q * max) & 0xFF;
+ }
+
+ b43_lptab_write_bulk(dev, B43_LPTAB16(5, 0), samples, buf);
+
+ lpphy_run_samples(dev, samples, 0xFFFF, 0);
+}
+
+static void lpphy_stop_tx_tone(struct b43_wldev *dev)
+{
+ struct b43_phy_lp *lpphy = dev->phy.lp;
+ int i;
+
+ lpphy->tx_tone_freq = 0;
+
+ b43_phy_mask(dev, B43_LPPHY_SMPL_PLAY_COUNT, 0xF000);
+ for (i = 0; i < 31; i++) {
+ if (!(b43_phy_read(dev, B43_LPPHY_A_PHY_CTL_ADDR) & 0x1))
+ break;
+ udelay(100);
+ }
+}
+
+
+static void lpphy_papd_cal(struct b43_wldev *dev, struct lpphy_tx_gains gains,
+ int mode, bool useindex, u8 index)
+{
+ //TODO
+}
+
+static void lpphy_papd_cal_txpwr(struct b43_wldev *dev)
+{
+ struct b43_phy_lp *lpphy = dev->phy.lp;
+ struct ssb_bus *bus = dev->dev->bus;
+ struct lpphy_tx_gains gains, oldgains;
+ int old_txpctl, old_afe_ovr, old_rf, old_bbmult;
+
+ lpphy_read_tx_pctl_mode_from_hardware(dev);
+ old_txpctl = lpphy->txpctl_mode;
+ old_afe_ovr = b43_phy_read(dev, B43_LPPHY_AFE_CTL_OVR) & 0x40;
+ if (old_afe_ovr)
+ oldgains = lpphy_get_tx_gains(dev);
+ old_rf = b43_phy_read(dev, B43_LPPHY_RF_PWR_OVERRIDE) & 0xFF;
+ old_bbmult = lpphy_get_bb_mult(dev);
+
+ lpphy_set_tx_power_control(dev, B43_LPPHY_TXPCTL_OFF);
+
+ if (bus->chip_id == 0x4325 && bus->chip_rev == 0)
+ lpphy_papd_cal(dev, gains, 0, 1, 30);
+ else
+ lpphy_papd_cal(dev, gains, 0, 1, 65);
+
+ if (old_afe_ovr)
+ lpphy_set_tx_gains(dev, oldgains);
+ lpphy_set_bb_mult(dev, old_bbmult);
+ lpphy_set_tx_power_control(dev, old_txpctl);
+ b43_phy_maskset(dev, B43_LPPHY_RF_PWR_OVERRIDE, 0xFF00, old_rf);
+}
+
+static int lpphy_rx_iq_cal(struct b43_wldev *dev, bool noise, bool tx,
+ bool rx, bool pa, struct lpphy_tx_gains *gains)
+{
+ struct b43_phy_lp *lpphy = dev->phy.lp;
+ struct ssb_bus *bus = dev->dev->bus;
+ const struct lpphy_rx_iq_comp *iqcomp = NULL;
+ struct lpphy_tx_gains nogains, oldgains;
+ u16 tmp;
+ int i, ret;
+
+ memset(&nogains, 0, sizeof(nogains));
+ memset(&oldgains, 0, sizeof(oldgains));
+
+ if (bus->chip_id == 0x5354) {
+ for (i = 0; i < ARRAY_SIZE(lpphy_5354_iq_table); i++) {
+ if (lpphy_5354_iq_table[i].chan == lpphy->channel) {
+ iqcomp = &lpphy_5354_iq_table[i];
+ }
+ }
+ } else if (dev->phy.rev >= 2) {
+ iqcomp = &lpphy_rev2plus_iq_comp;
+ } else {
+ for (i = 0; i < ARRAY_SIZE(lpphy_rev0_1_iq_table); i++) {
+ if (lpphy_rev0_1_iq_table[i].chan == lpphy->channel) {
+ iqcomp = &lpphy_rev0_1_iq_table[i];
+ }
+ }
+ }
+
+ if (B43_WARN_ON(!iqcomp))
+ return 0;
+
+ b43_phy_maskset(dev, B43_LPPHY_RX_COMP_COEFF_S, 0xFF00, iqcomp->c1);
+ b43_phy_maskset(dev, B43_LPPHY_RX_COMP_COEFF_S,
+ 0x00FF, iqcomp->c0 << 8);
+
+ if (noise) {
+ tx = true;
+ rx = false;
+ pa = false;
+ }
+
+ lpphy_set_trsw_over(dev, tx, rx);
+
+ if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) {
+ b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_0, 0x8);
+ b43_phy_maskset(dev, B43_LPPHY_RF_OVERRIDE_VAL_0,
+ 0xFFF7, pa << 3);
+ } else {
+ b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_0, 0x20);
+ b43_phy_maskset(dev, B43_LPPHY_RF_OVERRIDE_VAL_0,
+ 0xFFDF, pa << 5);
+ }
+
+ tmp = b43_phy_read(dev, B43_LPPHY_AFE_CTL_OVR) & 0x40;
+
+ if (noise)
+ lpphy_set_rx_gain(dev, 0x2D5D);
+ else {
+ if (tmp)
+ oldgains = lpphy_get_tx_gains(dev);
+ if (!gains)
+ gains = &nogains;
+ lpphy_set_tx_gains(dev, *gains);
+ }
+
+ b43_phy_mask(dev, B43_LPPHY_AFE_CTL_OVR, 0xFFFE);
+ b43_phy_mask(dev, B43_LPPHY_AFE_CTL_OVRVAL, 0xFFFE);
+ b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_0, 0x800);
+ b43_phy_set(dev, B43_LPPHY_RF_OVERRIDE_VAL_0, 0x800);
+ lpphy_set_deaf(dev, false);
+ if (noise)
+ ret = lpphy_calc_rx_iq_comp(dev, 0xFFF0);
+ else {
+ lpphy_start_tx_tone(dev, 4000, 100);
+ ret = lpphy_calc_rx_iq_comp(dev, 0x4000);
+ lpphy_stop_tx_tone(dev);
+ }
+ lpphy_clear_deaf(dev, false);
+ b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_0, 0xFFFC);
+ b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_0, 0xFFF7);
+ b43_phy_mask(dev, B43_LPPHY_RF_OVERRIDE_0, 0xFFDF);
+ if (!noise) {
+ if (tmp)
+ lpphy_set_tx_gains(dev, oldgains);
+ else
+ lpphy_disable_tx_gain_override(dev);
+ }
+ lpphy_disable_rx_gain_override(dev);
+ b43_phy_mask(dev, B43_LPPHY_AFE_CTL_OVR, 0xFFFE);
+ b43_phy_mask(dev, B43_LPPHY_AFE_CTL_OVRVAL, 0xF7FF);
+ return ret;
+}
+
+static void lpphy_calibration(struct b43_wldev *dev)
+{
+ struct b43_phy_lp *lpphy = dev->phy.lp;
+ enum b43_lpphy_txpctl_mode saved_pctl_mode;
+ bool full_cal = false;
+
+ if (lpphy->full_calib_chan != lpphy->channel) {
+ full_cal = true;
+ lpphy->full_calib_chan = lpphy->channel;
+ }
+
+ b43_mac_suspend(dev);
+
+ lpphy_btcoex_override(dev);
+ if (dev->phy.rev >= 2)
+ lpphy_save_dig_flt_state(dev);
+ lpphy_read_tx_pctl_mode_from_hardware(dev);
+ saved_pctl_mode = lpphy->txpctl_mode;
+ lpphy_set_tx_power_control(dev, B43_LPPHY_TXPCTL_OFF);
+ //TODO Perform transmit power table I/Q LO calibration
+ if ((dev->phy.rev == 0) && (saved_pctl_mode != B43_LPPHY_TXPCTL_OFF))
+ lpphy_pr41573_workaround(dev);
+ if ((dev->phy.rev >= 2) && full_cal) {
+ lpphy_papd_cal_txpwr(dev);
+ }
+ lpphy_set_tx_power_control(dev, saved_pctl_mode);
+ if (dev->phy.rev >= 2)
+ lpphy_restore_dig_flt_state(dev);
+ lpphy_rx_iq_cal(dev, true, true, false, false, NULL);
+
+ b43_mac_enable(dev);
+}
+
static u16 b43_lpphy_op_read(struct b43_wldev *dev, u16 reg)
{
b43_write16(dev, B43_MMIO_PHY_CONTROL, reg);
@@ -1539,12 +2081,6 @@ static void b43_lpphy_op_radio_write(struct b43_wldev *dev, u16 reg, u16 value)
b43_write16(dev, B43_MMIO_RADIO_DATA_LOW, value);
}
-static void b43_lpphy_op_software_rfkill(struct b43_wldev *dev,
- bool blocked)
-{
- //TODO
-}
-
struct b206x_channel {
u8 channel;
u16 freq;
@@ -2010,22 +2546,6 @@ static int lpphy_b2062_tune(struct b43_wldev *dev,
return err;
}
-
-/* This was previously called lpphy_japan_filter */
-static void lpphy_set_analog_filter(struct b43_wldev *dev, int channel)
-{
- struct b43_phy_lp *lpphy = dev->phy.lp;
- u16 tmp = (channel == 14); //SPEC FIXME check japanwidefilter!
-
- if (dev->phy.rev < 2) { //SPEC FIXME Isn't this rev0/1-specific?
- b43_phy_maskset(dev, B43_LPPHY_LP_PHY_CTL, 0xFCFF, tmp << 9);
- if ((dev->phy.rev == 1) && (lpphy->rc_cap))
- lpphy_set_rc_cap(dev);
- } else {
- b43_radio_write(dev, B2063_TX_BB_SP3, 0x3F);
- }
-}
-
static void lpphy_b2063_vco_calib(struct b43_wldev *dev)
{
u16 tmp;
@@ -2210,18 +2730,6 @@ static int b43_lpphy_op_init(struct b43_wldev *dev)
return 0;
}
-static void b43_lpphy_op_set_rx_antenna(struct b43_wldev *dev, int antenna)
-{
- if (dev->phy.rev >= 2)
- return; // rev2+ doesn't support antenna diversity
-
- if (B43_WARN_ON(antenna > B43_ANTENNA_AUTO1))
- return;
-
- b43_phy_maskset(dev, B43_LPPHY_CRSGAIN_CTL, 0xFFFD, antenna & 0x2);
- b43_phy_maskset(dev, B43_LPPHY_CRSGAIN_CTL, 0xFFFE, antenna & 0x1);
-}
-
static void b43_lpphy_op_adjust_txpower(struct b43_wldev *dev)
{
//TODO
@@ -2244,6 +2752,11 @@ void b43_lpphy_op_switch_analog(struct b43_wldev *dev, bool on)
}
}
+static void b43_lpphy_op_pwork_15sec(struct b43_wldev *dev)
+{
+ //TODO
+}
+
const struct b43_phy_operations b43_phyops_lp = {
.allocate = b43_lpphy_op_allocate,
.free = b43_lpphy_op_free,
@@ -2261,4 +2774,6 @@ const struct b43_phy_operations b43_phyops_lp = {
.set_rx_antenna = b43_lpphy_op_set_rx_antenna,
.recalc_txpower = b43_lpphy_op_recalc_txpower,
.adjust_txpower = b43_lpphy_op_adjust_txpower,
+ .pwork_15sec = b43_lpphy_op_pwork_15sec,
+ .pwork_60sec = lpphy_calibration,
};
diff --git a/drivers/net/wireless/b43/phy_lp.h b/drivers/net/wireless/b43/phy_lp.h
index c3232c1..62737f7 100644
--- a/drivers/net/wireless/b43/phy_lp.h
+++ b/drivers/net/wireless/b43/phy_lp.h
@@ -286,6 +286,7 @@
#define B43_LPPHY_TR_LOOKUP_6 B43_PHY_OFDM(0xC8) /* TR Lookup 6 */
#define B43_LPPHY_TR_LOOKUP_7 B43_PHY_OFDM(0xC9) /* TR Lookup 7 */
#define B43_LPPHY_TR_LOOKUP_8 B43_PHY_OFDM(0xCA) /* TR Lookup 8 */
+#define B43_LPPHY_RF_PWR_OVERRIDE B43_PHY_OFDM(0xD3) /* RF power override */
@@ -871,12 +872,12 @@ struct b43_phy_lp {
u8 rssi_gs;
/* RC cap */
- u8 rc_cap; /* FIXME initial value? */
+ u8 rc_cap;
/* BX arch */
u8 bx_arch;
/* Full calibration channel */
- u8 full_calib_chan; /* FIXME initial value? */
+ u8 full_calib_chan;
/* Transmit iqlocal best coeffs */
bool tx_iqloc_best_coeffs_valid;
@@ -891,6 +892,12 @@ struct b43_phy_lp {
/* The channel we are tuned to */
u8 channel;
+
+ /* The active antenna diversity mode */
+ int antenna;
+
+ /* Frequency of the active TX tone */
+ int tx_tone_freq;
};
enum tssi_mux_mode {
--
1.6.4.2
^ permalink raw reply related
* rt61pci bug
From: Tim Blechmann @ 2009-10-25 11:02 UTC (permalink / raw)
To: linux-wireless
[-- Attachment #1.1: Type: text/plain, Size: 4737 bytes --]
running the rt61pci module on 2.6.31.5 works fine, but using the recent
linus/master (2.6.32-rc5) results in this:
[ 2112.943630] phy0 -> rt2x00queue_write_tx_frame: Error - Arrived at non-free entry in the non-full queue 2.
[...]
[ 2827.646318] phy0 -> rt61pci_wait_bbp_ready: Error - BBP register access failed, aborting.
[ 2827.646323] phy0 -> rt61pci_set_device_state: Error - Device failed to enter state 4 (-5).
[ 2873.143407] BUG: unable to handle kernel NULL pointer dereference at 0000000000000020
[ 2873.143413] IP: [<ffffffffa01e7290>] rt2x00pci_free_queue_dma+0x20/0xd0 [rt2x00pci]
[ 2873.143421] PGD 2dec1a067 PUD 26c1bc067 PMD 0
[ 2873.143426] Oops: 0000 [#1] PREEMPT SMP
[ 2873.143429] last sysfs file: /sys/devices/platform/coretemp.3/temp1_input
[ 2873.143433] CPU 0
[ 2873.143434] Modules linked in: binfmt_misc ppdev nvidia(P) ipt_REJECT ipt_LOG xt_limit xt_tcpudp xt_state ipt_addrtype snd_hda_codec_realtek ip6table_filter ip6_tables nf_nat_irc coretemp arc4 snd_hda_intel nf_conntrack_irc snd_hda_codec snd_hdsp nf_nat_ftp nf_nat nf_conntrack_ipv4 nf_defrag_ipv4 snd_pcm_oss rt61pci(-) crc_itu_t snd_mixer_oss nf_conntrack_ftp lp snd_pcm nf_conntrack rt2x00pci snd_hwdep parport iptable_filter rt2x00lib snd_seq_dummy snd_seq_oss snd_seq_midi ip_tables x_tables led_class snd_rawmidi snd_seq_midi_event snd_seq mac80211 snd_timer snd_seq_device cfg80211 eeprom_93cx6 snd psmouse pcmcia soundcore snd_page_alloc serio_raw yenta_socket rsrc_nonstatic pcmcia_core xfs exportfs usbhid r8169 mii floppy
[ 2873.143487] Pid: 4677, comm: rmmod Tainted: P 2.6.32-rc5 #35 System Product Name
[ 2873.143490] RIP: 0010:[<ffffffffa01e7290>] [<ffffffffa01e7290>] rt2x00pci_free_queue_dma+0x20/0xd0 [rt2x00pci]
[ 2873.143496] RSP: 0018:ffff880305e53cf8 EFLAGS: 00010282
[ 2873.143499] RAX: 0000000000000000 RBX: ffff8803312e51e0 RCX: 0000000000000000
[ 2873.143501] RDX: 0000000000000150 RSI: ffff880331290c00 RDI: ffff8803312e51e0
[ 2873.143504] RBP: ffff880305e53d38 R08: 0000000000000000 R09: 0000000000000000
[ 2873.143506] R10: 0000000000000001 R11: 0000000000000000 R12: ffff880331290c38
[ 2873.143508] R13: ffff8803312e4340 R14: ffff8803312e51e0 R15: 0000000000000001
[ 2873.143511] FS: 00007f4e38e146f0(0000) GS:ffff880028200000(0000) knlGS:0000000000000000
[ 2873.143514] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[ 2873.143517] CR2: 0000000000000020 CR3: 00000002b2e66000 CR4: 00000000000006b0
[ 2873.143519] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 2873.143522] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[ 2873.143525] Process rmmod (pid: 4677, threadinfo ffff880305e52000, task ffff880305f50000)
[ 2873.143527] Stack:
[ 2873.143528] ffff8803312e51e0 0000000000000001 ffff880305e53d38 ffff8803312e51e0
[ 2873.143532] <0> ffff880331290c38 ffff8803312e4340 ffff8803312e51e0 0000000000000001
[ 2873.143537] <0> ffff880305e53d58 ffffffffa01e7378 ffff8803312e51e0 ffff880333afc080
[ 2873.143542] Call Trace:
[ 2873.143548] [<ffffffffa01e7378>] rt2x00pci_uninitialize+0x38/0x70 [rt2x00pci]
[ 2873.143554] [<ffffffffa01c8062>] rt2x00lib_uninitialize+0x32/0x60 [rt2x00lib]
[ 2873.143560] [<ffffffffa01c886d>] rt2x00lib_remove_dev+0x2d/0xc0 [rt2x00lib]
[ 2873.143565] [<ffffffffa01e718c>] rt2x00pci_remove+0x3c/0x120 [rt2x00pci]
[ 2873.143572] [<ffffffff81298fbf>] pci_device_remove+0x2f/0x60
[ 2873.143578] [<ffffffff8132eec3>] __device_release_driver+0x53/0xb0
[ 2873.143582] [<ffffffff8132efe0>] driver_detach+0xc0/0xd0
[ 2873.143587] [<ffffffff8132df44>] bus_remove_driver+0x94/0xc0
[ 2873.143591] [<ffffffff8132f5a9>] driver_unregister+0x59/0x90
[ 2873.143595] [<ffffffff8129925f>] pci_unregister_driver+0x3f/0xb0
[ 2873.143601] [<ffffffffa024f290>] rt61pci_exit+0x10/0x12 [rt61pci]
[ 2873.143608] [<ffffffff810923f3>] sys_delete_module+0x183/0x250
[ 2873.143613] [<ffffffff8107dbe9>] ? up_read+0x9/0x10
[ 2873.143618] [<ffffffff815351df>] ? do_page_fault+0x13f/0x3f0
[ 2873.143624] [<ffffffff81011f02>] system_call_fastpath+0x16/0x1b
[ 2873.143627] Code: b8 ea ff ff ff eb b3 0f 1f 40 00 55 48 89 e5 48 83 ec 40 48 89 5d d8 4c 89 65 e0 4c 89 6d e8 4c 89 75 f0 4c 89 7d f8 48 8b 46 08 <48> 8b 58 20 48 8b 13 48 85 d2 74 4c 4c 8b 27 48 8b 4b 08 44 0f
[ 2873.143663] RIP [<ffffffffa01e7290>] rt2x00pci_free_queue_dma+0x20/0xd0 [rt2x00pci]
[ 2873.143669] RSP <ffff880305e53cf8>
[ 2873.143670] CR2: 0000000000000020
[ 2873.143673] ---[ end trace af6b473a456cf4f3 ]---
full bootlog attached.
hth, tim
--
tim@klingt.org
http://tim.klingt.org
After one look at this planet any visitor from outer space would say
"I want to see the manager."
William S. Burroughs
[-- Attachment #1.2: rt61 --]
[-- Type: text/plain, Size: 70475 bytes --]
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Linux version 2.6.32-rc5 (tim@moka) (gcc version 4.4.1 (Ubuntu 4.4.1-4ubuntu8) ) #35 SMP PREEMPT Sat Oct 24 22:49:23 CEST 2009
[ 0.000000] Command line: root=UUID=f4e801b1-b54a-4002-a3e3-328308ad48fb ro splash vga=769
[ 0.000000] KERNEL supported cpus:
[ 0.000000] Intel GenuineIntel
[ 0.000000] AMD AuthenticAMD
[ 0.000000] Centaur CentaurHauls
[ 0.000000] BIOS-provided physical RAM map:
[ 0.000000] BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)
[ 0.000000] BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)
[ 0.000000] BIOS-e820: 00000000000e4c00 - 0000000000100000 (reserved)
[ 0.000000] BIOS-e820: 0000000000100000 - 00000000bf680000 (usable)
[ 0.000000] BIOS-e820: 00000000bf680000 - 00000000bf698000 (ACPI data)
[ 0.000000] BIOS-e820: 00000000bf698000 - 00000000bf6dc000 (ACPI NVS)
[ 0.000000] BIOS-e820: 00000000bf6dc000 - 00000000c0000000 (reserved)
[ 0.000000] BIOS-e820: 00000000fee00000 - 00000000fee01000 (reserved)
[ 0.000000] BIOS-e820: 00000000ffe00000 - 0000000100000000 (reserved)
[ 0.000000] BIOS-e820: 0000000100000000 - 0000000340000000 (usable)
[ 0.000000] DMI 2.5 present.
[ 0.000000] AMI BIOS detected: BIOS may corrupt low RAM, working around it.
[ 0.000000] e820 update range: 0000000000000000 - 0000000000010000 (usable) ==> (reserved)
[ 0.000000] last_pfn = 0x340000 max_arch_pfn = 0x400000000
[ 0.000000] MTRR default type: uncachable
[ 0.000000] MTRR fixed ranges enabled:
[ 0.000000] 00000-9FFFF write-back
[ 0.000000] A0000-BFFFF uncachable
[ 0.000000] C0000-E3FFF write-protect
[ 0.000000] E4000-EBFFF write-through
[ 0.000000] EC000-FFFFF write-protect
[ 0.000000] MTRR variable ranges enabled:
[ 0.000000] 0 base 000000000 mask E00000000 write-back
[ 0.000000] 1 base 200000000 mask F00000000 write-back
[ 0.000000] 2 base 300000000 mask FC0000000 write-back
[ 0.000000] 3 base 0C0000000 mask FC0000000 uncachable
[ 0.000000] 4 base 0BF700000 mask FFFF00000 uncachable
[ 0.000000] 5 base 0BF800000 mask FFF800000 uncachable
[ 0.000000] 6 disabled
[ 0.000000] 7 disabled
[ 0.000000] e820 update range: 00000000bf700000 - 0000000100000000 (usable) ==> (reserved)
[ 0.000000] last_pfn = 0xbf680 max_arch_pfn = 0x400000000
[ 0.000000] Scanning 0 areas for low memory corruption
[ 0.000000] modified physical RAM map:
[ 0.000000] modified: 0000000000000000 - 0000000000010000 (reserved)
[ 0.000000] modified: 0000000000010000 - 000000000009fc00 (usable)
[ 0.000000] modified: 000000000009fc00 - 00000000000a0000 (reserved)
[ 0.000000] modified: 00000000000e4c00 - 0000000000100000 (reserved)
[ 0.000000] modified: 0000000000100000 - 00000000bf680000 (usable)
[ 0.000000] modified: 00000000bf680000 - 00000000bf698000 (ACPI data)
[ 0.000000] modified: 00000000bf698000 - 00000000bf6dc000 (ACPI NVS)
[ 0.000000] modified: 00000000bf6dc000 - 00000000c0000000 (reserved)
[ 0.000000] modified: 00000000fee00000 - 00000000fee01000 (reserved)
[ 0.000000] modified: 00000000ffe00000 - 0000000100000000 (reserved)
[ 0.000000] modified: 0000000100000000 - 0000000340000000 (usable)
[ 0.000000] initial memory mapped : 0 - 20000000
[ 0.000000] init_memory_mapping: 0000000000000000-00000000bf680000
[ 0.000000] 0000000000 - 00bf600000 page 2M
[ 0.000000] 00bf600000 - 00bf680000 page 4k
[ 0.000000] kernel direct mapping tables up to bf680000 @ 10000-15000
[ 0.000000] init_memory_mapping: 0000000100000000-0000000340000000
[ 0.000000] 0100000000 - 0340000000 page 2M
[ 0.000000] kernel direct mapping tables up to 340000000 @ 13000-21000
[ 0.000000] RAMDISK: 37868000 - 37fef1a2
[ 0.000000] ACPI: RSDP 00000000000fabd0 00024 (v02 ACPIAM)
[ 0.000000] ACPI: XSDT 00000000bf680100 0005C (v01 022609 XSDT1156 20090226 MSFT 00000097)
[ 0.000000] ACPI: FACP 00000000bf680290 000F4 (v03 022609 FACP1156 20090226 MSFT 00000097)
[ 0.000000] ACPI: DSDT 00000000bf6804b0 0C3DD (v01 A1146 A1146001 00000001 INTL 20060113)
[ 0.000000] ACPI: FACS 00000000bf698000 00040
[ 0.000000] ACPI: APIC 00000000bf680390 000D8 (v01 022609 APIC1156 20090226 MSFT 00000097)
[ 0.000000] ACPI: MCFG 00000000bf680470 0003C (v01 022609 OEMMCFG 20090226 MSFT 00000097)
[ 0.000000] ACPI: OEMB 00000000bf698040 00072 (v01 022609 OEMB1156 20090226 MSFT 00000097)
[ 0.000000] ACPI: HPET 00000000bf68f4b0 00038 (v01 022609 OEMHPET 20090226 MSFT 00000097)
[ 0.000000] ACPI: OSFR 00000000bf68f4f0 000B0 (v01 022609 OEMOSFR 20090226 MSFT 00000097)
[ 0.000000] ACPI: SSDT 00000000bf69a8f0 0249F (v01 DpgPmm CpuPm 00000012 INTL 20060113)
[ 0.000000] ACPI: Local APIC address 0xfee00000
[ 0.000000] (8 early reservations) ==> bootmem [0000000000 - 0340000000]
[ 0.000000] #0 [0000000000 - 0000001000] BIOS data page ==> [0000000000 - 0000001000]
[ 0.000000] #1 [0000006000 - 0000008000] TRAMPOLINE ==> [0000006000 - 0000008000]
[ 0.000000] #2 [0001000000 - 00019a3d44] TEXT DATA BSS ==> [0001000000 - 00019a3d44]
[ 0.000000] #3 [0037868000 - 0037fef1a2] RAMDISK ==> [0037868000 - 0037fef1a2]
[ 0.000000] #4 [000009fc00 - 0000100000] BIOS reserved ==> [000009fc00 - 0000100000]
[ 0.000000] #5 [00019a4000 - 00019a4288] BRK ==> [00019a4000 - 00019a4288]
[ 0.000000] #6 [0000010000 - 0000013000] PGTABLE ==> [0000010000 - 0000013000]
[ 0.000000] #7 [0000013000 - 000001c000] PGTABLE ==> [0000013000 - 000001c000]
[ 0.000000] found SMP MP-table at [ffff8800000ff780] ff780
[ 0.000000] [ffffea0000000000-ffffea000b5fffff] PMD -> [ffff880028600000-ffff880032dfffff] on node 0
[ 0.000000] Zone PFN ranges:
[ 0.000000] DMA 0x00000010 -> 0x00001000
[ 0.000000] DMA32 0x00001000 -> 0x00100000
[ 0.000000] Normal 0x00100000 -> 0x00340000
[ 0.000000] Movable zone start PFN for each node
[ 0.000000] early_node_map[3] active PFN ranges
[ 0.000000] 0: 0x00000010 -> 0x0000009f
[ 0.000000] 0: 0x00000100 -> 0x000bf680
[ 0.000000] 0: 0x00100000 -> 0x00340000
[ 0.000000] On node 0 totalpages: 3143183
[ 0.000000] DMA zone: 56 pages used for memmap
[ 0.000000] DMA zone: 111 pages reserved
[ 0.000000] DMA zone: 3816 pages, LIFO batch:0
[ 0.000000] DMA32 zone: 14280 pages used for memmap
[ 0.000000] DMA32 zone: 765624 pages, LIFO batch:31
[ 0.000000] Normal zone: 32256 pages used for memmap
[ 0.000000] Normal zone: 2327040 pages, LIFO batch:31
[ 0.000000] ACPI: PM-Timer IO Port: 0x808
[ 0.000000] ACPI: Local APIC address 0xfee00000
[ 0.000000] ACPI: LAPIC (acpi_id[0x01] lapic_id[0x00] enabled)
[ 0.000000] ACPI: LAPIC (acpi_id[0x02] lapic_id[0x02] enabled)
[ 0.000000] ACPI: LAPIC (acpi_id[0x03] lapic_id[0x04] enabled)
[ 0.000000] ACPI: LAPIC (acpi_id[0x04] lapic_id[0x06] enabled)
[ 0.000000] ACPI: LAPIC (acpi_id[0x05] lapic_id[0x01] enabled)
[ 0.000000] ACPI: LAPIC (acpi_id[0x06] lapic_id[0x03] enabled)
[ 0.000000] ACPI: LAPIC (acpi_id[0x07] lapic_id[0x05] enabled)
[ 0.000000] ACPI: LAPIC (acpi_id[0x08] lapic_id[0x07] enabled)
[ 0.000000] ACPI: LAPIC (acpi_id[0x09] lapic_id[0x88] disabled)
[ 0.000000] ACPI: LAPIC (acpi_id[0x0a] lapic_id[0x89] disabled)
[ 0.000000] ACPI: LAPIC (acpi_id[0x0b] lapic_id[0x8a] disabled)
[ 0.000000] ACPI: LAPIC (acpi_id[0x0c] lapic_id[0x8b] disabled)
[ 0.000000] ACPI: LAPIC (acpi_id[0x0d] lapic_id[0x8c] disabled)
[ 0.000000] ACPI: LAPIC (acpi_id[0x0e] lapic_id[0x8d] disabled)
[ 0.000000] ACPI: LAPIC (acpi_id[0x0f] lapic_id[0x8e] disabled)
[ 0.000000] ACPI: LAPIC (acpi_id[0x10] lapic_id[0x8f] disabled)
[ 0.000000] ACPI: IOAPIC (id[0x08] address[0xfec00000] gsi_base[0])
[ 0.000000] IOAPIC[0]: apic_id 8, version 32, address 0xfec00000, GSI 0-23
[ 0.000000] ACPI: IOAPIC (id[0x09] address[0xfec8a000] gsi_base[24])
[ 0.000000] IOAPIC[1]: apic_id 9, version 32, address 0xfec8a000, GSI 24-47
[ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
[ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
[ 0.000000] ACPI: IRQ0 used by override.
[ 0.000000] ACPI: IRQ2 used by override.
[ 0.000000] ACPI: IRQ9 used by override.
[ 0.000000] Using ACPI (MADT) for SMP configuration information
[ 0.000000] ACPI: HPET id: 0x8086a301 base: 0xfed00000
[ 0.000000] 16 Processors exceeds NR_CPUS limit of 8
[ 0.000000] SMP: Allowing 8 CPUs, 0 hotplug CPUs
[ 0.000000] nr_irqs_gsi: 48
[ 0.000000] PM: Registered nosave memory: 000000000009f000 - 00000000000a0000
[ 0.000000] PM: Registered nosave memory: 00000000000a0000 - 00000000000e5000
[ 0.000000] PM: Registered nosave memory: 00000000000e5000 - 0000000000100000
[ 0.000000] PM: Registered nosave memory: 00000000bf680000 - 00000000bf698000
[ 0.000000] PM: Registered nosave memory: 00000000bf698000 - 00000000bf6dc000
[ 0.000000] PM: Registered nosave memory: 00000000bf6dc000 - 00000000c0000000
[ 0.000000] PM: Registered nosave memory: 00000000c0000000 - 00000000fee00000
[ 0.000000] PM: Registered nosave memory: 00000000fee00000 - 00000000fee01000
[ 0.000000] PM: Registered nosave memory: 00000000fee01000 - 00000000ffe00000
[ 0.000000] PM: Registered nosave memory: 00000000ffe00000 - 0000000100000000
[ 0.000000] Allocating PCI resources starting at c0000000 (gap: c0000000:3ee00000)
[ 0.000000] Booting paravirtualized kernel on bare hardware
[ 0.000000] NR_CPUS:8 nr_cpumask_bits:8 nr_cpu_ids:8 nr_node_ids:1
[ 0.000000] PERCPU: Embedded 30 pages/cpu @ffff880028200000 s90264 r8192 d24424 u262144
[ 0.000000] pcpu-alloc: s90264 r8192 d24424 u262144 alloc=1*2097152
[ 0.000000] pcpu-alloc: [0] 0 1 2 3 4 5 6 7
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 3096480
[ 0.000000] Kernel command line: root=UUID=f4e801b1-b54a-4002-a3e3-328308ad48fb ro splash vga=769
[ 0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes)
[ 0.000000] Dentry cache hash table entries: 2097152 (order: 12, 16777216 bytes)
[ 0.000000] Inode-cache hash table entries: 1048576 (order: 11, 8388608 bytes)
[ 0.000000] Initializing CPU#0
[ 0.000000] Checking aperture...
[ 0.000000] No AGP bridge found
[ 0.000000] Calgary: detecting Calgary via BIOS EBDA area
[ 0.000000] Calgary: Unable to locate Rio Grande table in EBDA - bailing!
[ 0.000000] PCI-DMA: Using software bounce buffering for IO (SWIOTLB)
[ 0.000000] Placing 64MB software IO TLB between ffff880020000000 - ffff880024000000
[ 0.000000] software IO TLB at phys 0x20000000 - 0x24000000
[ 0.000000] Memory: 12290392k/13631488k available (5350k kernel code, 1058756k absent, 281440k reserved, 2978k data, 536k init)
[ 0.000000] SLUB: Genslabs=13, HWalign=64, Order=0-3, MinObjects=0, CPUs=8, Nodes=1
[ 0.000000] Hierarchical RCU implementation.
[ 0.000000] NR_IRQS:512
[ 0.000000] Extended CMOS year: 2000
[ 0.000000] Console: colour VGA+ 80x25
[ 0.000000] console [tty0] enabled
[ 0.000000] allocated 125829120 bytes of page_cgroup
[ 0.000000] please try 'cgroup_disable=memory' option if you don't want memory cgroups
[ 0.000000] hpet clockevent registered
[ 0.000000] HPET: 4 timers in total, 0 timers will be used for per-cpu timer
[ 0.000000] Fast TSC calibration using PIT
[ 0.010000] Detected 2672.696 MHz processor.
[ 0.000002] Calibrating delay loop (skipped), value calculated using timer frequency.. 5345.39 BogoMIPS (lpj=26726960)
[ 0.000121] Security Framework initialized
[ 0.000174] SELinux: Disabled at boot.
[ 0.000228] Mount-cache hash table entries: 256
[ 0.000356] Initializing cgroup subsys ns
[ 0.000409] Initializing cgroup subsys cpuacct
[ 0.000462] Initializing cgroup subsys memory
[ 0.000516] Initializing cgroup subsys freezer
[ 0.000579] CPU: Physical Processor ID: 0
[ 0.000630] CPU: Processor Core ID: 0
[ 0.000683] CPU: L1 I cache: 32K, L1 D cache: 32K
[ 0.000766] CPU: L2 cache: 256K
[ 0.000816] CPU: L3 cache: 8192K
[ 0.000866] using mwait in idle threads.
[ 0.000917] Performance Events: Nehalem/Corei7 events, Intel PMU driver.
[ 0.001036] ... version: 3
[ 0.001087] ... bit width: 48
[ 0.001138] ... generic registers: 4
[ 0.001189] ... value mask: 0000ffffffffffff
[ 0.001242] ... max period: 000000007fffffff
[ 0.001295] ... fixed-purpose events: 3
[ 0.001346] ... event mask: 000000070000000f
[ 0.002091] ACPI: Core revision 20090903
[ 0.038173] Setting APIC routing to flat
[ 0.038669] ..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1
[ 0.140160] CPU0: Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz stepping 05
[ 0.308782] Booting processor 1 APIC 0x2 ip 0x6000
[ 0.322349] Initializing CPU#1
[ 0.468710] Calibrating delay using timer specific routine.. 5345.39 BogoMIPS (lpj=26726951)
[ 0.468716] CPU: Physical Processor ID: 0
[ 0.468717] CPU: Processor Core ID: 1
[ 0.468719] CPU: L1 I cache: 32K, L1 D cache: 32K
[ 0.468720] CPU: L2 cache: 256K
[ 0.468721] CPU: L3 cache: 8192K
[ 0.468801] CPU1: Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz stepping 05
[ 0.470036] Skipping synchronization checks as TSC is reliable.
[ 0.498718] Booting processor 2 APIC 0x4 ip 0x6000
[ 0.509131] Initializing CPU#2
[ 0.658647] Calibrating delay using timer specific routine.. 5345.37 BogoMIPS (lpj=26726889)
[ 0.658655] CPU: Physical Processor ID: 0
[ 0.658656] CPU: Processor Core ID: 2
[ 0.658658] CPU: L1 I cache: 32K, L1 D cache: 32K
[ 0.658660] CPU: L2 cache: 256K
[ 0.658660] CPU: L3 cache: 8192K
[ 0.658738] CPU2: Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz stepping 05
[ 0.688656] Booting processor 3 APIC 0x6 ip 0x6000
[ 0.699068] Initializing CPU#3
[ 0.848583] Calibrating delay using timer specific routine.. 5345.37 BogoMIPS (lpj=26726857)
[ 0.848591] CPU: Physical Processor ID: 0
[ 0.848592] CPU: Processor Core ID: 3
[ 0.848594] CPU: L1 I cache: 32K, L1 D cache: 32K
[ 0.848596] CPU: L2 cache: 256K
[ 0.848597] CPU: L3 cache: 8192K
[ 0.848636] CPU3: Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz stepping 05
[ 0.878593] Booting processor 4 APIC 0x1 ip 0x6000
[ 0.889006] Initializing CPU#4
[ 1.038518] Calibrating delay using timer specific routine.. 5345.37 BogoMIPS (lpj=26726859)
[ 1.038525] CPU: Physical Processor ID: 0
[ 1.038527] CPU: Processor Core ID: 0
[ 1.038529] CPU: L1 I cache: 32K, L1 D cache: 32K
[ 1.038531] CPU: L2 cache: 256K
[ 1.038532] CPU: L3 cache: 8192K
[ 1.038632] CPU4: Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz stepping 05
[ 1.068527] Booting processor 5 APIC 0x3 ip 0x6000
[ 1.078941] Initializing CPU#5
[ 1.228455] Calibrating delay using timer specific routine.. 5345.37 BogoMIPS (lpj=26726878)
[ 1.228462] CPU: Physical Processor ID: 0
[ 1.228463] CPU: Processor Core ID: 1
[ 1.228465] CPU: L1 I cache: 32K, L1 D cache: 32K
[ 1.228467] CPU: L2 cache: 256K
[ 1.228468] CPU: L3 cache: 8192K
[ 1.228485] CPU5: Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz stepping 05
[ 1.258464] Booting processor 6 APIC 0x5 ip 0x6000
[ 1.268779] Initializing CPU#6
[ 1.418391] Calibrating delay using timer specific routine.. 5345.26 BogoMIPS (lpj=26726328)
[ 1.418399] CPU: Physical Processor ID: 0
[ 1.418400] CPU: Processor Core ID: 2
[ 1.418402] CPU: L1 I cache: 32K, L1 D cache: 32K
[ 1.418403] CPU: L2 cache: 256K
[ 1.418404] CPU: L3 cache: 8192K
[ 1.418478] CPU6: Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz stepping 05
[ 1.448399] Booting processor 7 APIC 0x7 ip 0x6000
[ 1.458814] Initializing CPU#7
[ 1.608327] Calibrating delay using timer specific routine.. 5345.26 BogoMIPS (lpj=26726307)
[ 1.608335] CPU: Physical Processor ID: 0
[ 1.608336] CPU: Processor Core ID: 3
[ 1.608338] CPU: L1 I cache: 32K, L1 D cache: 32K
[ 1.608339] CPU: L2 cache: 256K
[ 1.608340] CPU: L3 cache: 8192K
[ 1.608365] CPU7: Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz stepping 05
[ 1.608870] Brought up 8 CPUs
[ 1.608919] Total of 8 processors activated (42762.80 BogoMIPS).
[ 1.612204] CPU0 attaching sched-domain:
[ 1.612207] domain 0: span 0,4 level SIBLING
[ 1.612209] groups: 0 (cpu_power = 589) 4 (cpu_power = 589)
[ 1.612213] domain 1: span 0-7 level MC
[ 1.612214] groups: 0,4 (cpu_power = 1178) 1,5 (cpu_power = 1178) 2,6 (cpu_power = 1178) 3,7 (cpu_power = 1178)
[ 1.612222] CPU1 attaching sched-domain:
[ 1.612223] domain 0: span 1,5 level SIBLING
[ 1.612224] groups: 1 (cpu_power = 589) 5 (cpu_power = 589)
[ 1.612228] domain 1: span 0-7 level MC
[ 1.612229] groups: 1,5 (cpu_power = 1178) 2,6 (cpu_power = 1178) 3,7 (cpu_power = 1178) 0,4 (cpu_power = 1178)
[ 1.612235] CPU2 attaching sched-domain:
[ 1.612236] domain 0: span 2,6 level SIBLING
[ 1.612238] groups: 2 (cpu_power = 589) 6 (cpu_power = 589)
[ 1.612241] domain 1: span 0-7 level MC
[ 1.612243] groups: 2,6 (cpu_power = 1178) 3,7 (cpu_power = 1178) 0,4 (cpu_power = 1178) 1,5 (cpu_power = 1178)
[ 1.612248] CPU3 attaching sched-domain:
[ 1.612250] domain 0: span 3,7 level SIBLING
[ 1.612251] groups: 3 (cpu_power = 589) 7 (cpu_power = 589)
[ 1.612254] domain 1: span 0-7 level MC
[ 1.612256] groups: 3,7 (cpu_power = 1178) 0,4 (cpu_power = 1178) 1,5 (cpu_power = 1178) 2,6 (cpu_power = 1178)
[ 1.612262] CPU4 attaching sched-domain:
[ 1.612263] domain 0: span 0,4 level SIBLING
[ 1.612264] groups: 4 (cpu_power = 589) 0 (cpu_power = 589)
[ 1.612268] domain 1: span 0-7 level MC
[ 1.612269] groups: 0,4 (cpu_power = 1178) 1,5 (cpu_power = 1178) 2,6 (cpu_power = 1178) 3,7 (cpu_power = 1178)
[ 1.612275] CPU5 attaching sched-domain:
[ 1.612276] domain 0: span 1,5 level SIBLING
[ 1.612278] groups: 5 (cpu_power = 589) 1 (cpu_power = 589)
[ 1.612281] domain 1: span 0-7 level MC
[ 1.612282] groups: 1,5 (cpu_power = 1178) 2,6 (cpu_power = 1178) 3,7 (cpu_power = 1178) 0,4 (cpu_power = 1178)
[ 1.612288] CPU6 attaching sched-domain:
[ 1.612289] domain 0: span 2,6 level SIBLING
[ 1.612291] groups: 6 (cpu_power = 589) 2 (cpu_power = 589)
[ 1.612294] domain 1: span 0-7 level MC
[ 1.612295] groups: 2,6 (cpu_power = 1178) 3,7 (cpu_power = 1178) 0,4 (cpu_power = 1178) 1,5 (cpu_power = 1178)
[ 1.612301] CPU7 attaching sched-domain:
[ 1.612303] domain 0: span 3,7 level SIBLING
[ 1.612304] groups: 7 (cpu_power = 589) 3 (cpu_power = 589)
[ 1.612307] domain 1: span 0-7 level MC
[ 1.612309] groups: 3,7 (cpu_power = 1178) 0,4 (cpu_power = 1178) 1,5 (cpu_power = 1178) 2,6 (cpu_power = 1178)
[ 1.612781] regulator: core version 0.5
[ 1.612854] Time: 9:30:28 Date: 10/25/09
[ 1.612933] NET: Registered protocol family 16
[ 1.613057] ACPI: bus type pci registered
[ 1.613154] PCI: MCFG configuration 0: base e0000000 segment 0 buses 0 - 255
[ 1.613211] PCI: Not using MMCONFIG.
[ 1.613261] PCI: Using configuration type 1 for base access
[ 1.613893] bio: create slab <bio-0> at 0
[ 1.614811] ACPI: EC: Look up EC in DSDT
[ 1.617184] ACPI: Executed 1 blocks of module-level executable AML code
[ 1.647165] ACPI: Interpreter enabled
[ 1.647220] ACPI: (supports S0 S1 S3 S4 S5)
[ 1.647443] ACPI: Using IOAPIC for interrupt routing
[ 1.647544] PCI: MCFG configuration 0: base e0000000 segment 0 buses 0 - 255
[ 1.649763] PCI: MCFG area at e0000000 reserved in ACPI motherboard resources
[ 1.653743] PCI: Using MMCONFIG at e0000000 - efffffff
[ 1.661959] ACPI Warning: Incorrect checksum in table [OEMB] - 8B, should be 83 (20090903/tbutils-314)
[ 1.662223] ACPI: No dock devices found.
[ 1.662401] ACPI: PCI Root Bridge [PCI0] (0000:00)
[ 1.662517] pci 0000:00:00.0: PME# supported from D0 D3hot D3cold
[ 1.662574] pci 0000:00:00.0: PME# disabled
[ 1.662680] pci 0000:00:01.0: PME# supported from D0 D3hot D3cold
[ 1.662736] pci 0000:00:01.0: PME# disabled
[ 1.662842] pci 0000:00:03.0: PME# supported from D0 D3hot D3cold
[ 1.662898] pci 0000:00:03.0: PME# disabled
[ 1.663006] pci 0000:00:07.0: PME# supported from D0 D3hot D3cold
[ 1.663062] pci 0000:00:07.0: PME# disabled
[ 1.663398] pci 0000:00:1a.0: reg 20 io port: [0xb800-0xb81f]
[ 1.663459] pci 0000:00:1a.1: reg 20 io port: [0xb880-0xb89f]
[ 1.663521] pci 0000:00:1a.2: reg 20 io port: [0xbc00-0xbc1f]
[ 1.663586] pci 0000:00:1a.7: reg 10 32bit mmio: [0xf7fff000-0xf7fff3ff]
[ 1.663635] pci 0000:00:1a.7: PME# supported from D0 D3hot D3cold
[ 1.663692] pci 0000:00:1a.7: PME# disabled
[ 1.663778] pci 0000:00:1b.0: reg 10 64bit mmio: [0xf7ff8000-0xf7ffbfff]
[ 1.663815] pci 0000:00:1b.0: PME# supported from D0 D3hot D3cold
[ 1.663871] pci 0000:00:1b.0: PME# disabled
[ 1.663975] pci 0000:00:1c.0: PME# supported from D0 D3hot D3cold
[ 1.664031] pci 0000:00:1c.0: PME# disabled
[ 1.664137] pci 0000:00:1c.2: PME# supported from D0 D3hot D3cold
[ 1.664193] pci 0000:00:1c.2: PME# disabled
[ 1.664293] pci 0000:00:1d.0: reg 20 io port: [0xb080-0xb09f]
[ 1.664355] pci 0000:00:1d.1: reg 20 io port: [0xb400-0xb41f]
[ 1.664416] pci 0000:00:1d.2: reg 20 io port: [0xb480-0xb49f]
[ 1.664482] pci 0000:00:1d.7: reg 10 32bit mmio: [0xf7ffe000-0xf7ffe3ff]
[ 1.664531] pci 0000:00:1d.7: PME# supported from D0 D3hot D3cold
[ 1.664588] pci 0000:00:1d.7: PME# disabled
[ 1.664748] pci 0000:00:1f.0: quirk: region 0800-087f claimed by ICH6 ACPI/GPIO/TCO
[ 1.664820] pci 0000:00:1f.0: quirk: region 0500-053f claimed by ICH6 GPIO
[ 1.664878] pci 0000:00:1f.0: ICH7 LPC Generic IO decode 1 PIO at 0294 (mask 0003)
[ 1.664951] pci 0000:00:1f.0: ICH7 LPC Generic IO decode 3 PIO at 4700 (mask 001f)
[ 1.665066] pci 0000:00:1f.2: reg 10 io port: [0xa000-0xa007]
[ 1.665071] pci 0000:00:1f.2: reg 14 io port: [0x9c00-0x9c03]
[ 1.665076] pci 0000:00:1f.2: reg 18 io port: [0x9880-0x9887]
[ 1.665080] pci 0000:00:1f.2: reg 1c io port: [0x9800-0x9803]
[ 1.665085] pci 0000:00:1f.2: reg 20 io port: [0x9480-0x948f]
[ 1.665089] pci 0000:00:1f.2: reg 24 io port: [0x9400-0x940f]
[ 1.665130] pci 0000:00:1f.3: reg 10 64bit mmio: [0xf7ffd000-0xf7ffd0ff]
[ 1.665141] pci 0000:00:1f.3: reg 20 io port: [0x400-0x41f]
[ 1.665179] pci 0000:00:1f.5: reg 10 io port: [0xb000-0xb007]
[ 1.665184] pci 0000:00:1f.5: reg 14 io port: [0xac00-0xac03]
[ 1.665188] pci 0000:00:1f.5: reg 18 io port: [0xa880-0xa887]
[ 1.665193] pci 0000:00:1f.5: reg 1c io port: [0xa800-0xa803]
[ 1.665197] pci 0000:00:1f.5: reg 20 io port: [0xa480-0xa48f]
[ 1.665202] pci 0000:00:1f.5: reg 24 io port: [0xa400-0xa40f]
[ 1.665278] pci 0000:02:00.0: reg 10 32bit mmio: [0xfa000000-0xfaffffff]
[ 1.665286] pci 0000:02:00.0: reg 14 64bit mmio pref: [0xd0000000-0xdfffffff]
[ 1.665294] pci 0000:02:00.0: reg 1c 64bit mmio: [0xf8000000-0xf9ffffff]
[ 1.665298] pci 0000:02:00.0: reg 24 io port: [0xcc00-0xcc7f]
[ 1.665303] pci 0000:02:00.0: reg 30 32bit mmio pref: [0xfb480000-0xfb4fffff]
[ 1.665348] pci 0000:00:03.0: bridge io port: [0xc000-0xcfff]
[ 1.665351] pci 0000:00:03.0: bridge 32bit mmio: [0xf8000000-0xfb4fffff]
[ 1.665355] pci 0000:00:03.0: bridge 64bit mmio pref: [0xd0000000-0xdfffffff]
[ 1.665420] pci 0000:00:1c.0: bridge 64bit mmio pref: [0xf4f00000-0xf4ffffff]
[ 1.665461] pci 0000:04:00.0: reg 10 io port: [0xd800-0xd8ff]
[ 1.665479] pci 0000:04:00.0: reg 18 64bit mmio: [0xfb5ff000-0xfb5fffff]
[ 1.665492] pci 0000:04:00.0: reg 20 64bit mmio pref: [0xf4ef0000-0xf4efffff]
[ 1.665499] pci 0000:04:00.0: reg 30 32bit mmio pref: [0xfb5c0000-0xfb5dffff]
[ 1.665536] pci 0000:04:00.0: supports D1 D2
[ 1.665537] pci 0000:04:00.0: PME# supported from D0 D1 D2 D3hot D3cold
[ 1.665595] pci 0000:04:00.0: PME# disabled
[ 1.665694] pci 0000:00:1c.2: bridge io port: [0xd000-0xdfff]
[ 1.665697] pci 0000:00:1c.2: bridge 32bit mmio: [0xfb500000-0xfb5fffff]
[ 1.665702] pci 0000:00:1c.2: bridge 64bit mmio pref: [0xf4e00000-0xf4efffff]
[ 1.665732] pci 0000:06:00.0: reg 10 32bit mmio: [0xfb6f8000-0xfb6fffff]
[ 1.665804] pci 0000:06:01.0: reg 10 32bit mmio: [0x000000-0x000fff]
[ 1.665822] pci 0000:06:01.0: supports D1 D2
[ 1.665823] pci 0000:06:01.0: PME# supported from D0 D1 D2 D3hot D3cold
[ 1.665881] pci 0000:06:01.0: PME# disabled
[ 1.665973] pci 0000:00:1e.0: transparent bridge
[ 1.666026] pci 0000:00:1e.0: bridge io port: [0xe000-0xefff]
[ 1.666029] pci 0000:00:1e.0: bridge 32bit mmio: [0xfb600000-0xfbefffff]
[ 1.666034] pci 0000:00:1e.0: bridge 64bit mmio pref: [0xf5000000-0xf6ffffff]
[ 1.666069] pci_bus 0000:00: on NUMA node 0
[ 1.666073] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]
[ 1.666316] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.P0P1._PRT]
[ 1.666411] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.P0P4._PRT]
[ 1.666464] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.P0P6._PRT]
[ 1.666523] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.NPE1._PRT]
[ 1.666571] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.NPE3._PRT]
[ 1.666620] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.NPE7._PRT]
[ 1.691476] ACPI: PCI Interrupt Link [LNKA] (IRQs 3 4 6 7 10 *11 12 14 15)
[ 1.691976] ACPI: PCI Interrupt Link [LNKB] (IRQs *5)
[ 1.692225] ACPI: PCI Interrupt Link [LNKC] (IRQs 3 4 6 7 *10 11 12 14 15)
[ 1.692722] ACPI: PCI Interrupt Link [LNKD] (IRQs 3 4 6 7 10 11 12 *14 15)
[ 1.693219] ACPI: PCI Interrupt Link [LNKE] (IRQs 3 4 6 7 10 11 12 14 *15)
[ 1.693718] ACPI: PCI Interrupt Link [LNKF] (IRQs *3 4 6 7 10 11 12 14 15)
[ 1.694216] ACPI: PCI Interrupt Link [LNKG] (IRQs 3 4 6 *7 10 11 12 14 15)
[ 1.694713] ACPI: PCI Interrupt Link [LNKH] (IRQs 3 *4 6 7 10 11 12 14 15)
[ 1.695183] vgaarb: device added: PCI:0000:02:00.0,decodes=io+mem,owns=io+mem,locks=none
[ 1.695256] vgaarb: loaded
[ 1.695365] SCSI subsystem initialized
[ 1.695523] libata version 3.00 loaded.
[ 1.695570] usbcore: registered new interface driver usbfs
[ 1.695633] usbcore: registered new interface driver hub
[ 1.695702] usbcore: registered new device driver usb
[ 1.695846] ACPI: WMI: Mapper loaded
[ 1.695897] PCI: Using ACPI for IRQ routing
[ 1.696078] Bluetooth: Core ver 2.15
[ 1.696147] NET: Registered protocol family 31
[ 1.696199] Bluetooth: HCI device and connection manager initialized
[ 1.696255] Bluetooth: HCI socket layer initialized
[ 1.696308] NET: Registered protocol family 8
[ 1.696360] NET: Registered protocol family 20
[ 1.696417] NetLabel: Initializing
[ 1.696467] NetLabel: domain hash size = 128
[ 1.696518] NetLabel: protocols = UNLABELED CIPSOv4
[ 1.696580] NetLabel: unlabeled traffic allowed by default
[ 1.696657] hpet0: at MMIO 0xfed00000, IRQs 2, 8, 0, 0
[ 1.696865] hpet0: 4 comparators, 64-bit 14.318180 MHz counter
[ 1.768314] Switching to clocksource tsc
[ 1.769558] pnp: PnP ACPI init
[ 1.769616] ACPI: bus type pnp registered
[ 1.772188] pnp: PnP ACPI: found 15 devices
[ 1.772241] ACPI: ACPI bus type pnp unregistered
[ 1.772299] system 00:01: iomem range 0xfbf00000-0xfbffffff has been reserved
[ 1.772356] system 00:01: iomem range 0xfc000000-0xfcffffff has been reserved
[ 1.772413] system 00:01: iomem range 0xfd000000-0xfdffffff has been reserved
[ 1.772470] system 00:01: iomem range 0xfe000000-0xfebfffff has been reserved
[ 1.772528] system 00:01: iomem range 0xfec8a000-0xfec8afff could not be reserved
[ 1.772598] system 00:01: iomem range 0xfed10000-0xfed10fff has been reserved
[ 1.772658] system 00:07: ioport range 0x290-0x29f has been reserved
[ 1.772716] system 00:08: ioport range 0x4d0-0x4d1 has been reserved
[ 1.772772] system 00:08: ioport range 0x800-0x87f has been reserved
[ 1.772827] system 00:08: ioport range 0x500-0x57f could not be reserved
[ 1.772884] system 00:08: iomem range 0xfed1c000-0xfed1ffff has been reserved
[ 1.772941] system 00:08: iomem range 0xfed20000-0xfed3ffff has been reserved
[ 1.772998] system 00:08: iomem range 0xfed40000-0xfed8ffff has been reserved
[ 1.773057] system 00:0b: iomem range 0xffc00000-0xffdfffff has been reserved
[ 1.773116] system 00:0c: iomem range 0xfec00000-0xfec00fff could not be reserved
[ 1.773187] system 00:0c: iomem range 0xfee00000-0xfee00fff has been reserved
[ 1.773245] system 00:0d: iomem range 0xe0000000-0xefffffff has been reserved
[ 1.773304] system 00:0e: iomem range 0x0-0x9ffff could not be reserved
[ 1.773360] system 00:0e: iomem range 0xc0000-0xcffff has been reserved
[ 1.773416] system 00:0e: iomem range 0xe0000-0xfffff could not be reserved
[ 1.773473] system 00:0e: iomem range 0x100000-0xbfefffff could not be reserved
[ 1.773543] system 00:0e: iomem range 0xfed90000-0xffffffff could not be reserved
[ 1.778265] pci 0000:00:01.0: PCI bridge, secondary bus 0000:01
[ 1.778325] pci 0000:00:01.0: IO window: disabled
[ 1.778380] pci 0000:00:01.0: MEM window: disabled
[ 1.778434] pci 0000:00:01.0: PREFETCH window: disabled
[ 1.778489] pci 0000:00:03.0: PCI bridge, secondary bus 0000:02
[ 1.778545] pci 0000:00:03.0: IO window: 0xc000-0xcfff
[ 1.778600] pci 0000:00:03.0: MEM window: 0xf8000000-0xfb4fffff
[ 1.779402] pci 0000:00:03.0: PREFETCH window: 0x000000d0000000-0x000000dfffffff
[ 1.779475] pci 0000:00:07.0: PCI bridge, secondary bus 0000:03
[ 1.779530] pci 0000:00:07.0: IO window: disabled
[ 1.779585] pci 0000:00:07.0: MEM window: disabled
[ 1.779639] pci 0000:00:07.0: PREFETCH window: disabled
[ 1.779694] pci 0000:00:1c.0: PCI bridge, secondary bus 0000:05
[ 1.779750] pci 0000:00:1c.0: IO window: 0x1000-0x1fff
[ 1.779806] pci 0000:00:1c.0: MEM window: 0xc4000000-0xc41fffff
[ 1.779863] pci 0000:00:1c.0: PREFETCH window: 0x000000c4200000-0x000000c43fffff
[ 1.779938] pci 0000:00:1c.2: PCI bridge, secondary bus 0000:04
[ 1.779994] pci 0000:00:1c.2: IO window: 0xd000-0xdfff
[ 1.780050] pci 0000:00:1c.2: MEM window: 0xfb500000-0xfb5fffff
[ 1.780107] pci 0000:00:1c.2: PREFETCH window: 0x000000f4e00000-0x000000f4efffff
[ 1.780185] pci 0000:06:01.0: CardBus bridge, secondary bus 0000:07
[ 1.780240] pci 0000:06:01.0: IO window: 0x002000-0x0020ff
[ 1.780296] pci 0000:06:01.0: IO window: 0x002400-0x0024ff
[ 1.780353] pci 0000:06:01.0: PREFETCH window: 0xc0000000-0xc3ffffff
[ 1.780411] pci 0000:06:01.0: MEM window: 0xc8000000-0xcbffffff
[ 1.780468] pci 0000:00:1e.0: PCI bridge, secondary bus 0000:06
[ 1.780524] pci 0000:00:1e.0: IO window: 0x2000-0x2fff
[ 1.780580] pci 0000:00:1e.0: MEM window: 0xfb600000-0xfbefffff
[ 1.780637] pci 0000:00:1e.0: PREFETCH window: 0xc0000000-0xc3ffffff
[ 1.780701] pci 0000:00:01.0: setting latency timer to 64
[ 1.780708] pci 0000:00:03.0: setting latency timer to 64
[ 1.780714] pci 0000:00:07.0: setting latency timer to 64
[ 1.780720] pci 0000:00:1c.0: enabling device (0106 -> 0107)
[ 1.780778] pci 0000:00:1c.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17
[ 1.780836] pci 0000:00:1c.0: setting latency timer to 64
[ 1.780843] pci 0000:00:1c.2: PCI INT C -> GSI 18 (level, low) -> IRQ 18
[ 1.780901] pci 0000:00:1c.2: setting latency timer to 64
[ 1.780905] pci 0000:00:1e.0: setting latency timer to 64
[ 1.780913] pci 0000:06:01.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17
[ 1.780972] pci_bus 0000:00: resource 0 io: [0x00-0xffff]
[ 1.780974] pci_bus 0000:00: resource 1 mem: [0x000000-0xffffffffffffffff]
[ 1.780976] pci_bus 0000:02: resource 0 io: [0xc000-0xcfff]
[ 1.780977] pci_bus 0000:02: resource 1 mem: [0xf8000000-0xfb4fffff]
[ 1.780979] pci_bus 0000:02: resource 2 pref mem [0xd0000000-0xdfffffff]
[ 1.780981] pci_bus 0000:05: resource 0 io: [0x1000-0x1fff]
[ 1.780982] pci_bus 0000:05: resource 1 mem: [0xc4000000-0xc41fffff]
[ 1.780984] pci_bus 0000:05: resource 2 pref mem [0xc4200000-0xc43fffff]
[ 1.780985] pci_bus 0000:04: resource 0 io: [0xd000-0xdfff]
[ 1.780987] pci_bus 0000:04: resource 1 mem: [0xfb500000-0xfb5fffff]
[ 1.780988] pci_bus 0000:04: resource 2 pref mem [0xf4e00000-0xf4efffff]
[ 1.780990] pci_bus 0000:06: resource 0 io: [0x2000-0x2fff]
[ 1.780992] pci_bus 0000:06: resource 1 mem: [0xfb600000-0xfbefffff]
[ 1.780993] pci_bus 0000:06: resource 2 pref mem [0xc0000000-0xc3ffffff]
[ 1.780995] pci_bus 0000:06: resource 3 io: [0x00-0xffff]
[ 1.780996] pci_bus 0000:06: resource 4 mem: [0x000000-0xffffffffffffffff]
[ 1.780998] pci_bus 0000:07: resource 0 io: [0x2000-0x20ff]
[ 1.780999] pci_bus 0000:07: resource 1 io: [0x2400-0x24ff]
[ 1.781001] pci_bus 0000:07: resource 2 pref mem [0xc0000000-0xc3ffffff]
[ 1.781002] pci_bus 0000:07: resource 3 mem: [0xc8000000-0xcbffffff]
[ 1.781025] NET: Registered protocol family 2
[ 1.781147] IP route cache hash table entries: 524288 (order: 10, 4194304 bytes)
[ 1.781738] TCP established hash table entries: 262144 (order: 10, 4194304 bytes)
[ 1.782392] TCP bind hash table entries: 65536 (order: 8, 1048576 bytes)
[ 1.782581] TCP: Hash tables configured (established 262144 bind 65536)
[ 1.782637] TCP reno registered
[ 1.782750] NET: Registered protocol family 1
[ 1.782949] pci 0000:02:00.0: Boot video device
[ 1.782987] Trying to unpack rootfs image as initramfs...
[ 1.910206] Freeing initrd memory: 7708k freed
[ 1.911618] Scanning for low memory corruption every 60 seconds
[ 1.911757] audit: initializing netlink socket (disabled)
[ 1.911819] type=2000 audit(1256463027.790:1): initialized
[ 1.915634] HugeTLB registered 2 MB page size, pre-allocated 0 pages
[ 1.916649] VFS: Disk quotas dquot_6.5.2
[ 1.916738] Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[ 1.917203] fuse init (API version 7.13)
[ 1.917306] msgmni has been set to 24021
[ 1.917549] alg: No test for stdrng (krng)
[ 1.917606] io scheduler noop registered
[ 1.917659] io scheduler anticipatory registered
[ 1.917711] io scheduler deadline registered
[ 1.917772] io scheduler cfq registered (default)
[ 1.917924] pcieport 0000:00:01.0: irq 48 for MSI/MSI-X
[ 1.917930] pcieport 0000:00:01.0: setting latency timer to 64
[ 1.918021] pcieport 0000:00:03.0: irq 49 for MSI/MSI-X
[ 1.918027] pcieport 0000:00:03.0: setting latency timer to 64
[ 1.918114] pcieport 0000:00:07.0: irq 50 for MSI/MSI-X
[ 1.918120] pcieport 0000:00:07.0: setting latency timer to 64
[ 1.918206] pcieport 0000:00:1c.0: irq 51 for MSI/MSI-X
[ 1.918212] pcieport 0000:00:1c.0: setting latency timer to 64
[ 1.918305] pcieport 0000:00:1c.2: irq 52 for MSI/MSI-X
[ 1.918312] pcieport 0000:00:1c.2: setting latency timer to 64
[ 1.918374] aer 0000:00:01.0:pcie02: AER service couldn't init device: no _OSC support
[ 1.918379] aer 0000:00:03.0:pcie02: AER service couldn't init device: no _OSC support
[ 1.918383] aer 0000:00:07.0:pcie02: AER service couldn't init device: no _OSC support
[ 1.918388] pci_hotplug: PCI Hot Plug PCI Core version: 0.5
[ 1.918500] pciehp: PCI Express Hot Plug Controller Driver version: 0.4
[ 1.918643] input: Power Button as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0C:00/input/input0
[ 1.918716] ACPI: Power Button [PWRB]
[ 1.918793] input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input1
[ 1.918863] ACPI: Power Button [PWRF]
[ 1.919601] ACPI: SSDT 00000000bf6980c0 00403 (v01 DpgPmm P001Ist 00000011 INTL 20060113)
[ 1.920135] ACPI: SSDT 00000000bf69a140 003B2 (v01 PmRef P001Cst 00003001 INTL 20060113)
[ 1.922757] Monitor-Mwait will be used to enter C-1 state
[ 1.922776] Monitor-Mwait will be used to enter C-2 state
[ 1.922795] Monitor-Mwait will be used to enter C-3 state
[ 1.922835] processor LNXCPU:00: registered as cooling_device0
[ 1.923280] ACPI: SSDT 00000000bf6984d0 00403 (v01 DpgPmm P002Ist 00000012 INTL 20060113)
[ 1.923746] ACPI: SSDT 00000000bf69a500 00085 (v01 PmRef P002Cst 00003000 INTL 20060113)
[ 1.926363] processor LNXCPU:01: registered as cooling_device1
[ 1.926817] ACPI: SSDT 00000000bf6988e0 00403 (v01 DpgPmm P003Ist 00000012 INTL 20060113)
[ 1.927291] ACPI: SSDT 00000000bf69a590 00085 (v01 PmRef P003Cst 00003000 INTL 20060113)
[ 1.929905] processor LNXCPU:02: registered as cooling_device2
[ 1.930364] ACPI: SSDT 00000000bf698cf0 00403 (v01 DpgPmm P004Ist 00000012 INTL 20060113)
[ 1.930841] ACPI: SSDT 00000000bf69a620 00085 (v01 PmRef P004Cst 00003000 INTL 20060113)
[ 1.933470] processor LNXCPU:03: registered as cooling_device3
[ 1.933919] ACPI: SSDT 00000000bf699100 00403 (v01 DpgPmm P005Ist 00000012 INTL 20060113)
[ 1.934387] ACPI: SSDT 00000000bf69a6b0 00085 (v01 PmRef P005Cst 00003000 INTL 20060113)
[ 1.937008] processor LNXCPU:04: registered as cooling_device4
[ 1.937465] ACPI: SSDT 00000000bf699510 00403 (v01 DpgPmm P006Ist 00000012 INTL 20060113)
[ 1.937944] ACPI: SSDT 00000000bf69a740 00085 (v01 PmRef P006Cst 00003000 INTL 20060113)
[ 1.940567] processor LNXCPU:05: registered as cooling_device5
[ 1.941029] ACPI: SSDT 00000000bf699920 00403 (v01 DpgPmm P007Ist 00000012 INTL 20060113)
[ 1.941510] ACPI: SSDT 00000000bf69a7d0 00085 (v01 PmRef P007Cst 00003000 INTL 20060113)
[ 1.944138] processor LNXCPU:06: registered as cooling_device6
[ 1.944587] ACPI: SSDT 00000000bf699d30 00403 (v01 DpgPmm P008Ist 00000012 INTL 20060113)
[ 1.945063] ACPI: SSDT 00000000bf69a860 00085 (v01 PmRef P008Cst 00003000 INTL 20060113)
[ 1.947693] processor LNXCPU:07: registered as cooling_device7
[ 1.950071] XENFS: not registering filesystem on non-xen platform
[ 1.950853] Linux agpgart interface v0.103
[ 1.950907] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[ 1.951754] brd: module loaded
[ 1.952076] loop: module loaded
[ 1.952170] input: Macintosh mouse button emulation as /devices/virtual/input/input2
[ 1.952326] ata_piix 0000:00:1f.2: version 2.13
[ 1.952340] ata_piix 0000:00:1f.2: PCI INT B -> GSI 20 (level, low) -> IRQ 20
[ 1.952399] ata_piix 0000:00:1f.2: MAP [ P0 P2 P1 P3 ]
[ 1.952630] ata_piix 0000:00:1f.2: setting latency timer to 64
[ 1.952668] scsi0 : ata_piix
[ 1.952762] scsi1 : ata_piix
[ 1.954017] ata1: SATA max UDMA/133 cmd 0xa000 ctl 0x9c00 bmdma 0x9480 irq 20
[ 1.954077] ata2: SATA max UDMA/133 cmd 0x9880 ctl 0x9800 bmdma 0x9488 irq 20
[ 1.954149] ata_piix 0000:00:1f.5: PCI INT B -> GSI 20 (level, low) -> IRQ 20
[ 1.954208] ata_piix 0000:00:1f.5: MAP [ P0 -- P1 -- ]
[ 1.954434] ata_piix 0000:00:1f.5: setting latency timer to 64
[ 1.954459] scsi2 : ata_piix
[ 1.954538] scsi3 : ata_piix
[ 1.955576] ata3: SATA max UDMA/133 cmd 0xb000 ctl 0xac00 bmdma 0xa480 irq 20
[ 1.955634] ata4: SATA max UDMA/133 cmd 0xa880 ctl 0xa800 bmdma 0xa488 irq 20
[ 1.956065] Fixed MDIO Bus: probed
[ 1.956117] PPP generic driver version 2.4.2
[ 1.956220] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 1.956288] ehci_hcd 0000:00:1a.7: PCI INT C -> GSI 18 (level, low) -> IRQ 18
[ 1.956356] ehci_hcd 0000:00:1a.7: setting latency timer to 64
[ 1.956358] ehci_hcd 0000:00:1a.7: EHCI Host Controller
[ 1.956438] ehci_hcd 0000:00:1a.7: new USB bus registered, assigned bus number 1
[ 1.956526] ehci_hcd 0000:00:1a.7: debug port 1
[ 1.960454] ehci_hcd 0000:00:1a.7: cache line size of 32 is not supported
[ 1.960464] ehci_hcd 0000:00:1a.7: irq 18, io mem 0xf7fff000
[ 1.982777] ehci_hcd 0000:00:1a.7: USB 2.0 started, EHCI 1.00
[ 1.982889] usb usb1: configuration #1 chosen from 1 choice
[ 1.982959] hub 1-0:1.0: USB hub found
[ 1.983013] hub 1-0:1.0: 6 ports detected
[ 1.983109] ehci_hcd 0000:00:1d.7: PCI INT A -> GSI 23 (level, low) -> IRQ 23
[ 1.983172] ehci_hcd 0000:00:1d.7: setting latency timer to 64
[ 1.983174] ehci_hcd 0000:00:1d.7: EHCI Host Controller
[ 1.983245] ehci_hcd 0000:00:1d.7: new USB bus registered, assigned bus number 2
[ 1.983331] ehci_hcd 0000:00:1d.7: debug port 1
[ 1.987268] ehci_hcd 0000:00:1d.7: cache line size of 32 is not supported
[ 1.987277] ehci_hcd 0000:00:1d.7: irq 23, io mem 0xf7ffe000
[ 2.012761] ehci_hcd 0000:00:1d.7: USB 2.0 started, EHCI 1.00
[ 2.012867] usb usb2: configuration #1 chosen from 1 choice
[ 2.012936] hub 2-0:1.0: USB hub found
[ 2.012989] hub 2-0:1.0: 6 ports detected
[ 2.013078] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 2.013142] uhci_hcd: USB Universal Host Controller Interface driver
[ 2.013233] uhci_hcd 0000:00:1a.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[ 2.013293] uhci_hcd 0000:00:1a.0: setting latency timer to 64
[ 2.013296] uhci_hcd 0000:00:1a.0: UHCI Host Controller
[ 2.013369] uhci_hcd 0000:00:1a.0: new USB bus registered, assigned bus number 3
[ 2.013464] uhci_hcd 0000:00:1a.0: irq 16, io base 0x0000b800
[ 2.013567] usb usb3: configuration #1 chosen from 1 choice
[ 2.013635] hub 3-0:1.0: USB hub found
[ 2.013689] hub 3-0:1.0: 2 ports detected
[ 2.013771] uhci_hcd 0000:00:1a.1: PCI INT B -> GSI 21 (level, low) -> IRQ 21
[ 2.013831] uhci_hcd 0000:00:1a.1: setting latency timer to 64
[ 2.013833] uhci_hcd 0000:00:1a.1: UHCI Host Controller
[ 2.013904] uhci_hcd 0000:00:1a.1: new USB bus registered, assigned bus number 4
[ 2.013998] uhci_hcd 0000:00:1a.1: irq 21, io base 0x0000b880
[ 2.014097] usb usb4: configuration #1 chosen from 1 choice
[ 2.014166] hub 4-0:1.0: USB hub found
[ 2.014219] hub 4-0:1.0: 2 ports detected
[ 2.014300] uhci_hcd 0000:00:1a.2: PCI INT D -> GSI 19 (level, low) -> IRQ 19
[ 2.014359] uhci_hcd 0000:00:1a.2: setting latency timer to 64
[ 2.014362] uhci_hcd 0000:00:1a.2: UHCI Host Controller
[ 2.014431] uhci_hcd 0000:00:1a.2: new USB bus registered, assigned bus number 5
[ 2.014525] uhci_hcd 0000:00:1a.2: irq 19, io base 0x0000bc00
[ 2.014625] usb usb5: configuration #1 chosen from 1 choice
[ 2.014693] hub 5-0:1.0: USB hub found
[ 2.014746] hub 5-0:1.0: 2 ports detected
[ 2.014828] uhci_hcd 0000:00:1d.0: PCI INT A -> GSI 23 (level, low) -> IRQ 23
[ 2.014887] uhci_hcd 0000:00:1d.0: setting latency timer to 64
[ 2.014890] uhci_hcd 0000:00:1d.0: UHCI Host Controller
[ 2.014959] uhci_hcd 0000:00:1d.0: new USB bus registered, assigned bus number 6
[ 2.015048] uhci_hcd 0000:00:1d.0: irq 23, io base 0x0000b080
[ 2.015148] usb usb6: configuration #1 chosen from 1 choice
[ 2.015216] hub 6-0:1.0: USB hub found
[ 2.015270] hub 6-0:1.0: 2 ports detected
[ 2.015350] uhci_hcd 0000:00:1d.1: PCI INT B -> GSI 19 (level, low) -> IRQ 19
[ 2.015409] uhci_hcd 0000:00:1d.1: setting latency timer to 64
[ 2.015412] uhci_hcd 0000:00:1d.1: UHCI Host Controller
[ 2.015481] uhci_hcd 0000:00:1d.1: new USB bus registered, assigned bus number 7
[ 2.016313] uhci_hcd 0000:00:1d.1: irq 19, io base 0x0000b400
[ 2.016414] usb usb7: configuration #1 chosen from 1 choice
[ 2.016481] hub 7-0:1.0: USB hub found
[ 2.016535] hub 7-0:1.0: 2 ports detected
[ 2.016616] uhci_hcd 0000:00:1d.2: PCI INT C -> GSI 18 (level, low) -> IRQ 18
[ 2.016676] uhci_hcd 0000:00:1d.2: setting latency timer to 64
[ 2.016678] uhci_hcd 0000:00:1d.2: UHCI Host Controller
[ 2.016751] uhci_hcd 0000:00:1d.2: new USB bus registered, assigned bus number 8
[ 2.016839] uhci_hcd 0000:00:1d.2: irq 18, io base 0x0000b480
[ 2.016941] usb usb8: configuration #1 chosen from 1 choice
[ 2.017010] hub 8-0:1.0: USB hub found
[ 2.017063] hub 8-0:1.0: 2 ports detected
[ 2.017174] PNP: No PS/2 controller found. Probing ports directly.
[ 2.019657] serio: i8042 KBD port at 0x60,0x64 irq 1
[ 2.019716] serio: i8042 AUX port at 0x60,0x64 irq 12
[ 2.019812] mice: PS/2 mouse device common for all mice
[ 2.019908] Driver 'rtc_cmos' needs updating - please use bus_type methods
[ 2.019978] rtc_cmos 00:03: RTC can wake from S4
[ 2.020049] rtc_cmos 00:03: rtc core: registered rtc_cmos as rtc0
[ 2.020125] rtc0: alarms up to one month, y3k, 114 bytes nvram, hpet irqs
[ 2.020264] device-mapper: uevent: version 1.0.3
[ 2.020365] device-mapper: ioctl: 4.15.0-ioctl (2009-04-01) initialised: dm-devel@redhat.com
[ 2.020528] device-mapper: multipath: version 1.1.0 loaded
[ 2.020592] device-mapper: multipath round-robin: version 1.0.0 loaded
[ 2.020986] cpuidle: using governor ladder
[ 2.021279] cpuidle: using governor menu
[ 2.021616] TCP cubic registered
[ 2.021747] NET: Registered protocol family 10
[ 2.022139] lo: Disabled Privacy Extensions
[ 2.022420] NET: Registered protocol family 17
[ 2.022485] Bluetooth: L2CAP ver 2.14
[ 2.022536] Bluetooth: L2CAP socket layer initialized
[ 2.022589] Bluetooth: SCO (Voice Link) ver 0.6
[ 2.022641] Bluetooth: SCO socket layer initialized
[ 2.022724] Bluetooth: RFCOMM TTY layer initialized
[ 2.022779] Bluetooth: RFCOMM socket layer initialized
[ 2.022832] Bluetooth: RFCOMM ver 1.11
[ 2.027721] PM: Resume from disk failed.
[ 2.027728] registered taskstats version 1
[ 2.028171] Magic number: 13:334:526
[ 2.028400] rtc_cmos 00:03: setting system clock to 2009-10-25 09:30:28 UTC (1256463028)
[ 2.028483] BIOS EDD facility v0.16 2004-Jun-25, 0 devices found
[ 2.028536] EDD information not available.
[ 2.309316] ata3: SATA link down (SStatus 0 SControl 300)
[ 2.458425] ata4: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[ 2.478769] ata4.00: ATA-7: SAMSUNG HD103UJ, 1AA01118, max UDMA7
[ 2.478831] ata4.00: 1953525168 sectors, multi 16: LBA48 NCQ (depth 0/32)
[ 2.498779] ata4.00: configured for UDMA/133
[ 2.518301] usb 3-2: new low speed USB device using uhci_hcd and address 2
[ 2.702445] usb 3-2: configuration #1 chosen from 1 choice
[ 2.808321] ata1.00: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
[ 2.808338] ata2.00: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[ 2.808352] ata2.01: SATA link down (SStatus 0 SControl 300)
[ 2.808501] ata1.01: SATA link down (SStatus 0 SControl 300)
[ 2.808566] ata1.01: link offline, clearing class 3 to NONE
[ 2.828530] ata1.00: ATAPI: TSSTcorp CDDVDW SH-S223B, SB01, max UDMA/100
[ 2.828714] ata2.00: ATA-7: SAMSUNG HD154UI, 1AG01118, max UDMA7
[ 2.828770] ata2.00: 2930277168 sectors, multi 16: LBA48 NCQ (depth 0/32)
[ 2.848672] ata2.00: configured for UDMA/133
[ 2.868467] ata1.00: configured for UDMA/100
[ 2.869759] scsi 0:0:0:0: CD-ROM TSSTcorp CDDVDW SH-S223B SB01 PQ: 0 ANSI: 5
[ 2.873772] sr0: scsi3-mmc drive: 48x/48x writer dvd-ram cd/rw xa/form2 cdda tray
[ 2.873851] Uniform CD-ROM driver Revision: 3.20
[ 2.873968] sr 0:0:0:0: Attached scsi CD-ROM sr0
[ 2.873995] sr 0:0:0:0: Attached scsi generic sg0 type 5
[ 2.874262] scsi 1:0:0:0: Direct-Access ATA SAMSUNG HD154UI 1AG0 PQ: 0 ANSI: 5
[ 2.874507] sd 1:0:0:0: Attached scsi generic sg1 type 0
[ 2.874662] sd 1:0:0:0: [sda] 2930277168 512-byte logical blocks: (1.50 TB/1.36 TiB)
[ 2.874705] scsi 3:0:0:0: Direct-Access ATA SAMSUNG HD103UJ 1AA0 PQ: 0 ANSI: 5
[ 2.874770] sd 3:0:0:0: [sdb] 1953525168 512-byte logical blocks: (1.00 TB/931 GiB)
[ 2.874797] sd 3:0:0:0: [sdb] Write Protect is off
[ 2.874799] sd 3:0:0:0: [sdb] Mode Sense: 00 3a 00 00
[ 2.874813] sd 3:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 2.874885] sdb:
[ 2.874984] sd 3:0:0:0: Attached scsi generic sg2 type 0
[ 2.875149] sd 1:0:0:0: [sda] Write Protect is off
[ 2.875204] sd 1:0:0:0: [sda] Mode Sense: 00 3a 00 00
[ 2.875218] sd 1:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 2.875362] sda: sdb1 sdb2 < unknown partition table
[ 2.890305] sd 1:0:0:0: [sda] Attached SCSI disk
[ 2.911729] sdb5 >
[ 2.912126] sd 3:0:0:0: [sdb] Attached SCSI disk
[ 2.912295] Freeing unused kernel memory: 536k freed
[ 2.912414] Write protecting the kernel read-only data: 7548k
[ 2.983362] Floppy drive(s): fd0 is 1.44M
[ 2.989132] r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
[ 2.989212] r8169 0000:04:00.0: PCI INT A -> GSI 18 (level, low) -> IRQ 18
[ 2.989313] r8169 0000:04:00.0: setting latency timer to 64
[ 2.989364] r8169 0000:04:00.0: irq 53 for MSI/MSI-X
[ 2.989991] eth0: RTL8168c/8111c at 0xffffc9000007e000, 00:24:8c:a7:6e:2d, XID 1c4000c0 IRQ 53
[ 2.993449] usbcore: registered new interface driver hiddev
[ 3.012461] input: Cherry GmbH Cherry TouchBoard as /devices/pci0000:00/0000:00:1a.0/usb3/3-2/3-2:1.0/input/input3
[ 3.012582] generic-usb 0003:046A:002F.0001: input,hidraw0: USB HID v1.11 Keyboard [Cherry GmbH Cherry TouchBoard] on usb-0000:00:1a.0-2/input0
[ 3.013307] FDC 0 is a post-1991 82077
[ 3.037401] input: Cherry GmbH Cherry TouchBoard as /devices/pci0000:00/0000:00:1a.0/usb3/3-2/3-2:1.1/input/input4
[ 3.037518] generic-usb 0003:046A:002F.0002: input,hidraw1: USB HID v1.11 Mouse [Cherry GmbH Cherry TouchBoard] on usb-0000:00:1a.0-2/input1
[ 3.037609] usbcore: registered new interface driver usbhid
[ 3.037663] usbhid: v2.6:USB HID core driver
[ 4.152480] PM: Starting manual resume from disk
[ 4.152482] PM: Resume from partition 8:21
[ 4.152483] PM: Checking hibernation image.
[ 4.152687] PM: Resume from disk failed.
[ 4.169257] EXT4-fs (sdb1): INFO: recovery required on readonly filesystem
[ 4.169261] EXT4-fs (sdb1): write access will be enabled during recovery
[ 7.160195] EXT4-fs (sdb1): orphan cleanup on readonly fs
[ 7.160202] EXT4-fs (sdb1): ext4_orphan_cleanup: deleting unreferenced inode 34402
[ 7.175370] EXT4-fs (sdb1): 1 orphan inode deleted
[ 7.175375] EXT4-fs (sdb1): recovery complete
[ 8.170524] EXT4-fs (sdb1): mounted filesystem with ordered data mode
[ 11.013501] Adding 2000052k swap on /dev/sdb5. Priority:-1 extents:1 across:2000052k
[ 11.863971] SGI XFS with ACLs, security attributes, realtime, large block/inode numbers, no debug enabled
[ 11.866385] SGI XFS Quota Management subsystem
[ 11.911085] XFS mounting filesystem sda
[ 12.120549] Ending clean XFS mount for filesystem: sda
[ 12.634114] udev: starting version 147
[ 13.407398] yenta_cardbus 0000:06:01.0: CardBus bridge found [1524:1410]
[ 13.407415] yenta_cardbus 0000:06:01.0: Using CSCINT to route CSC interrupts to PCI
[ 13.407416] yenta_cardbus 0000:06:01.0: Routing CardBus interrupts to PCI
[ 13.407420] yenta_cardbus 0000:06:01.0: TI: mfunc 0x00001002, devctl 0x44
[ 13.655179] yenta_cardbus 0000:06:01.0: ISA IRQ mask 0x0000, PCI irq 17
[ 13.655182] yenta_cardbus 0000:06:01.0: Socket status: 30000020
[ 13.655184] pci_bus 0000:06: Raising subordinate bus# of parent bus (#06) from #07 to #0a
[ 13.655190] yenta_cardbus 0000:06:01.0: pcmcia: parent PCI bridge I/O window: 0x2000 - 0x2fff
[ 13.655192] yenta_cardbus 0000:06:01.0: pcmcia: parent PCI bridge Memory window: 0xfb600000 - 0xfbefffff
[ 13.655194] yenta_cardbus 0000:06:01.0: pcmcia: parent PCI bridge Memory window: 0xc0000000 - 0xc3ffffff
[ 13.759239] cfg80211: Calling CRDA to update world regulatory domain
[ 14.137878] ip_tables: (C) 2000-2006 Netfilter Core Team
[ 14.317377] pcmcia_socket pcmcia_socket0: pccard: CardBus card inserted into slot 0
[ 14.317406] pci 0000:07:00.0: reg 10 32bit mmio: [0x000000-0x00ffff]
[ 14.317468] yenta_cardbus 0000:06:01.0: EnE: chaning testregister 0xC9, 0e -> 0c
[ 14.429475] nf_conntrack version 0.5.0 (16384 buckets, 65536 max)
[ 14.429712] CONFIG_NF_CT_ACCT is deprecated and will be removed soon. Please use
[ 14.429714] nf_conntrack.acct=1 kernel parameter, acct=1 nf_conntrack module option or
[ 14.429715] sysctl net.netfilter.nf_conntrack_acct=1 to enable it.
[ 14.503194] cfg80211: World regulatory domain updated:
[ 14.503196] (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[ 14.503198] (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[ 14.503200] (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[ 14.503201] (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[ 14.503203] (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[ 14.503204] (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[ 14.633928] rt61pci 0000:06:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
[ 14.925570] RME Hammerfall DSP 0000:07:00.0: enabling device (0000 -> 0002)
[ 14.925578] RME Hammerfall DSP 0000:07:00.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17
[ 14.939200] lp: driver loaded but no devices found
[ 15.029799] HDA Intel 0000:00:1b.0: PCI INT A -> GSI 22 (level, low) -> IRQ 22
[ 15.029936] HDA Intel 0000:00:1b.0: setting latency timer to 64
[ 15.054844] phy0: Selected rate control algorithm 'minstrel'
[ 15.055434] Registered led device: rt61pci-phy0::radio
[ 15.055447] Registered led device: rt61pci-phy0::assoc
[ 15.065491] coretemp coretemp.0: Unable to access MSR 0xEE, for Tjmax, left at default
[ 15.065580] coretemp coretemp.1: Unable to access MSR 0xEE, for Tjmax, left at default
[ 15.065615] coretemp coretemp.2: Unable to access MSR 0xEE, for Tjmax, left at default
[ 15.065666] coretemp coretemp.3: Unable to access MSR 0xEE, for Tjmax, left at default
[ 15.065692] coretemp coretemp.4: Unable to access MSR 0xEE, for Tjmax, left at default
[ 15.065739] coretemp coretemp.5: Unable to access MSR 0xEE, for Tjmax, left at default
[ 15.065766] coretemp coretemp.6: Unable to access MSR 0xEE, for Tjmax, left at default
[ 15.065795] coretemp coretemp.7: Unable to access MSR 0xEE, for Tjmax, left at default
[ 15.134375] ip6_tables: (C) 2000-2006 Netfilter Core Team
[ 15.255251] hda_codec: ALC1200: BIOS auto-probing.
[ 17.208229] Hammerfall-DSP: wait for FIFO status <= 0 failed after 30 iterations
[ 17.208335] RME Hammerfall DSP 0000:07:00.0: firmware: requesting multiface_firmware_rev11.bin
[ 17.574666] Hammerfall-DSP: loading firmware
[ 18.406131] r8169: eth0: link down
[ 18.407119] ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 18.687322] rt61pci 0000:06:00.0: firmware: requesting rt2561.bin
[ 19.454112] ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 20.883755] Hammerfall-DSP: finished firmware loading
[ 54.689899] nvidia: module license 'NVIDIA' taints kernel.
[ 54.689902] Disabling lock debugging due to kernel taint
[ 55.163792] nvidia 0000:02:00.0: PCI INT A -> GSI 24 (level, low) -> IRQ 24
[ 55.163798] nvidia 0000:02:00.0: setting latency timer to 64
[ 55.164172] NVRM: loading NVIDIA UNIX x86_64 Kernel Module 185.18.36 Fri Aug 14 17:35:21 PDT 2009
[ 57.995198] ppdev: user-space parallel port driver
[ 60.858557] CPU0 attaching NULL sched-domain.
[ 60.858560] CPU1 attaching NULL sched-domain.
[ 60.858562] CPU2 attaching NULL sched-domain.
[ 60.858563] CPU3 attaching NULL sched-domain.
[ 60.858565] CPU4 attaching NULL sched-domain.
[ 60.858566] CPU5 attaching NULL sched-domain.
[ 60.858568] CPU6 attaching NULL sched-domain.
[ 60.858569] CPU7 attaching NULL sched-domain.
[ 60.961797] CPU0 attaching sched-domain:
[ 60.961800] domain 0: span 0,4 level SIBLING
[ 60.961801] groups: 0 (cpu_power = 589) 4 (cpu_power = 589)
[ 60.961805] domain 1: span 0-7 level MC
[ 60.961806] groups: 0,4 (cpu_power = 1178) 1,5 (cpu_power = 1178) 2,6 (cpu_power = 1178) 3,7 (cpu_power = 1178)
[ 60.961813] CPU1 attaching sched-domain:
[ 60.961814] domain 0: span 1,5 level SIBLING
[ 60.961815] groups: 1 (cpu_power = 589) 5 (cpu_power = 589)
[ 60.961818] domain 1: span 0-7 level MC
[ 60.961819] groups: 1,5 (cpu_power = 1178) 2,6 (cpu_power = 1178) 3,7 (cpu_power = 1178) 0,4 (cpu_power = 1178)
[ 60.961825] CPU2 attaching sched-domain:
[ 60.961826] domain 0: span 2,6 level SIBLING
[ 60.961827] groups: 2 (cpu_power = 589) 6 (cpu_power = 589)
[ 60.961830] domain 1: span 0-7 level MC
[ 60.961831] groups: 2,6 (cpu_power = 1178) 3,7 (cpu_power = 1178) 0,4 (cpu_power = 1178) 1,5 (cpu_power = 1178)
[ 60.961837] CPU3 attaching sched-domain:
[ 60.961838] domain 0: span 3,7 level SIBLING
[ 60.961839] groups: 3 (cpu_power = 589) 7 (cpu_power = 589)
[ 60.961842] domain 1: span 0-7 level MC
[ 60.961843] groups: 3,7 (cpu_power = 1178) 0,4 (cpu_power = 1178) 1,5 (cpu_power = 1178) 2,6 (cpu_power = 1178)
[ 60.961849] CPU4 attaching sched-domain:
[ 60.961850] domain 0: span 0,4 level SIBLING
[ 60.961851] groups: 4 (cpu_power = 589) 0 (cpu_power = 589)
[ 60.961854] domain 1: span 0-7 level MC
[ 60.961855] groups: 0,4 (cpu_power = 1178) 1,5 (cpu_power = 1178) 2,6 (cpu_power = 1178) 3,7 (cpu_power = 1178)
[ 60.961861] CPU5 attaching sched-domain:
[ 60.961862] domain 0: span 1,5 level SIBLING
[ 60.961863] groups: 5 (cpu_power = 589) 1 (cpu_power = 589)
[ 60.961866] domain 1: span 0-7 level MC
[ 60.961867] groups: 1,5 (cpu_power = 1178) 2,6 (cpu_power = 1178) 3,7 (cpu_power = 1178) 0,4 (cpu_power = 1178)
[ 60.961872] CPU6 attaching sched-domain:
[ 60.961873] domain 0: span 2,6 level SIBLING
[ 60.961875] groups: 6 (cpu_power = 589) 2 (cpu_power = 589)
[ 60.961878] domain 1: span 0-7 level MC
[ 60.961879] groups: 2,6 (cpu_power = 1178) 3,7 (cpu_power = 1178) 0,4 (cpu_power = 1178) 1,5 (cpu_power = 1178)
[ 60.961884] CPU7 attaching sched-domain:
[ 60.961885] domain 0: span 3,7 level SIBLING
[ 60.961886] groups: 7 (cpu_power = 589) 3 (cpu_power = 589)
[ 60.961889] domain 1: span 0-7 level MC
[ 60.961891] groups: 3,7 (cpu_power = 1178) 0,4 (cpu_power = 1178) 1,5 (cpu_power = 1178) 2,6 (cpu_power = 1178)
[ 62.534294] CPU0 attaching NULL sched-domain.
[ 62.534298] CPU1 attaching NULL sched-domain.
[ 62.534299] CPU2 attaching NULL sched-domain.
[ 62.534301] CPU3 attaching NULL sched-domain.
[ 62.534302] CPU4 attaching NULL sched-domain.
[ 62.534303] CPU5 attaching NULL sched-domain.
[ 62.534305] CPU6 attaching NULL sched-domain.
[ 62.534306] CPU7 attaching NULL sched-domain.
[ 62.611769] CPU0 attaching sched-domain:
[ 62.611774] domain 0: span 0,4 level SIBLING
[ 62.611777] groups: 0 (cpu_power = 589) 4 (cpu_power = 589)
[ 62.611783] domain 1: span 0-7 level MC
[ 62.611786] groups: 0,4 (cpu_power = 1178) 1,5 (cpu_power = 1178) 2,6 (cpu_power = 1178) 3,7 (cpu_power = 1178)
[ 62.611796] CPU1 attaching sched-domain:
[ 62.611798] domain 0: span 1,5 level SIBLING
[ 62.611801] groups: 1 (cpu_power = 589) 5 (cpu_power = 589)
[ 62.611806] domain 1: span 0-7 level MC
[ 62.611809] groups: 1,5 (cpu_power = 1178) 2,6 (cpu_power = 1178) 3,7 (cpu_power = 1178) 0,4 (cpu_power = 1178)
[ 62.611820] CPU2 attaching sched-domain:
[ 62.611821] domain 0: span 2,6 level SIBLING
[ 62.611822] groups: 2 (cpu_power = 589) 6 (cpu_power = 589)
[ 62.611825] domain 1: span 0-7 level MC
[ 62.611826] groups: 2,6 (cpu_power = 1178) 3,7 (cpu_power = 1178) 0,4 (cpu_power = 1178) 1,5 (cpu_power = 1178)
[ 62.611831] CPU3 attaching sched-domain:
[ 62.611833] domain 0: span 3,7 level SIBLING
[ 62.611834] groups: 3 (cpu_power = 589) 7 (cpu_power = 589)
[ 62.611837] domain 1: span 0-7 level MC
[ 62.611838] groups: 3,7 (cpu_power = 1178) 0,4 (cpu_power = 1178) 1,5 (cpu_power = 1178) 2,6 (cpu_power = 1178)
[ 62.611843] CPU4 attaching sched-domain:
[ 62.611844] domain 0: span 0,4 level SIBLING
[ 62.611846] groups: 4 (cpu_power = 589) 0 (cpu_power = 589)
[ 62.611849] domain 1: span 0-7 level MC
[ 62.611850] groups: 0,4 (cpu_power = 1178) 1,5 (cpu_power = 1178) 2,6 (cpu_power = 1178) 3,7 (cpu_power = 1178)
[ 62.611855] CPU5 attaching sched-domain:
[ 62.611856] domain 0: span 1,5 level SIBLING
[ 62.611857] groups: 5 (cpu_power = 589) 1 (cpu_power = 589)
[ 62.611860] domain 1: span 0-7 level MC
[ 62.611862] groups: 1,5 (cpu_power = 1178) 2,6 (cpu_power = 1178) 3,7 (cpu_power = 1178) 0,4 (cpu_power = 1178)
[ 62.611867] CPU6 attaching sched-domain:
[ 62.611868] domain 0: span 2,6 level SIBLING
[ 62.611869] groups: 6 (cpu_power = 589) 2 (cpu_power = 589)
[ 62.611872] domain 1: span 0-7 level MC
[ 62.611873] groups: 2,6 (cpu_power = 1178) 3,7 (cpu_power = 1178) 0,4 (cpu_power = 1178) 1,5 (cpu_power = 1178)
[ 62.611879] CPU7 attaching sched-domain:
[ 62.611880] domain 0: span 3,7 level SIBLING
[ 62.611881] groups: 7 (cpu_power = 589) 3 (cpu_power = 589)
[ 62.611884] domain 1: span 0-7 level MC
[ 62.611885] groups: 3,7 (cpu_power = 1178) 0,4 (cpu_power = 1178) 1,5 (cpu_power = 1178) 2,6 (cpu_power = 1178)
[ 161.465997] wlan0: deauthenticating from 00:14:6c:5a:96:60 by local choice (reason=3)
[ 161.466091] wlan0: direct probe to AP 00:14:6c:5a:96:60 (try 1)
[ 161.662769] wlan0: direct probe to AP 00:14:6c:5a:96:60 (try 2)
[ 161.862701] wlan0: direct probe to AP 00:14:6c:5a:96:60 (try 3)
[ 162.062642] wlan0: direct probe to AP 00:14:6c:5a:96:60 timed out
[ 167.834049] wlan0: deauthenticating from 00:14:6c:5a:96:60 by local choice (reason=3)
[ 167.853756] wlan0: direct probe to AP 00:24:fe:09:94:18 (try 1)
[ 167.855736] wlan0: direct probe responded
[ 167.855740] wlan0: authenticate with AP 00:24:fe:09:94:18 (try 1)
[ 167.857694] wlan0: authenticated
[ 167.857713] wlan0: associate with AP 00:24:fe:09:94:18 (try 1)
[ 167.860555] wlan0: RX AssocResp from 00:24:fe:09:94:18 (capab=0x401 status=0 aid=1)
[ 167.860558] wlan0: associated
[ 167.863330] ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[ 178.436829] wlan0: no IPv6 routers present
[ 370.891613] phy0 -> rt2x00queue_write_tx_frame: Error - Arrived at non-free entry in the non-full queue 2.
[ 370.891615] Please file bug report to http://rt2x00.serialmonkey.com.
[ 1704.723736] wlan0: deauthenticating from 00:24:fe:09:94:18 by local choice (reason=3)
[ 1704.723777] wlan0: deauthenticating from 00:24:fe:09:94:18 by local choice (reason=3)
[ 1704.743717] wlan0: direct probe to AP 00:14:6c:5a:96:60 (try 1)
[ 1704.780772] wlan0: direct probe responded
[ 1704.780777] wlan0: authenticate with AP 00:14:6c:5a:96:60 (try 1)
[ 1704.782663] wlan0: authenticated
[ 1704.805416] wlan0: associate with AP 00:14:6c:5a:96:60 (try 1)
[ 1704.807591] wlan0: RX ReassocResp from 00:14:6c:5a:96:60 (capab=0x401 status=0 aid=2)
[ 1704.807594] wlan0: associated
[ 1728.527813] wlan0: deauthenticated from 00:14:6c:5a:96:60 (Reason: 7)
[ 1730.094888] wlan0: direct probe to AP 00:14:6c:5a:96:60 (try 1)
[ 1730.096494] wlan0: direct probe responded
[ 1730.096498] wlan0: authenticate with AP 00:14:6c:5a:96:60 (try 1)
[ 1730.098433] wlan0: authenticated
[ 1730.098454] wlan0: associate with AP 00:14:6c:5a:96:60 (try 1)
[ 1730.294810] wlan0: associate with AP 00:14:6c:5a:96:60 (try 2)
[ 1730.298806] wlan0: RX ReassocResp from 00:14:6c:5a:96:60 (capab=0x401 status=0 aid=2)
[ 1730.298809] wlan0: associated
[ 1787.505633] wlan0: deauthenticated from 00:14:6c:5a:96:60 (Reason: 7)
[ 1789.074288] wlan0: direct probe to AP 00:14:6c:5a:96:60 (try 1)
[ 1789.075897] wlan0: direct probe responded
[ 1789.075901] wlan0: authenticate with AP 00:14:6c:5a:96:60 (try 1)
[ 1789.077971] wlan0: authenticated
[ 1789.077990] wlan0: associate with AP 00:14:6c:5a:96:60 (try 1)
[ 1789.080117] wlan0: RX ReassocResp from 00:14:6c:5a:96:60 (capab=0x401 status=0 aid=2)
[ 1789.080121] wlan0: associated
[ 1824.712469] wlan0: deauthenticating from 00:14:6c:5a:96:60 by local choice (reason=3)
[ 1824.712512] wlan0: direct probe to AP 00:14:6c:5a:96:60 (try 1)
[ 1824.712526] wlan0: deauthenticating from 00:14:6c:5a:96:60 by local choice (reason=3)
[ 1824.732454] wlan0: direct probe to AP 00:24:fe:09:94:18 (try 1)
[ 1824.734953] wlan0: direct probe responded
[ 1824.734958] wlan0: authenticate with AP 00:24:fe:09:94:18 (try 1)
[ 1824.738308] wlan0: authenticated
[ 1824.814189] wlan0: associate with AP 00:24:fe:09:94:18 (try 1)
[ 1824.816959] wlan0: RX ReassocResp from 00:24:fe:09:94:18 (capab=0x401 status=0 aid=1)
[ 1824.816963] wlan0: associated
[ 2112.943630] phy0 -> rt2x00queue_write_tx_frame: Error - Arrived at non-free entry in the non-full queue 2.
[ 2112.943632] Please file bug report to http://rt2x00.serialmonkey.com.
[ 2596.790597] sr 0:0:0:0: [sr0] unaligned transfer
[ 2596.790663] sr 0:0:0:0: [sr0] unaligned transfer
[ 2596.790720] sr 0:0:0:0: [sr0] unaligned transfer
[ 2596.790742] sr 0:0:0:0: [sr0] unaligned transfer
[ 2596.792563] sr 0:0:0:0: [sr0] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 2596.792569] sr 0:0:0:0: [sr0] Sense Key : Illegal Request [current]
[ 2596.792574] sr 0:0:0:0: [sr0] Add. Sense: Illegal mode for this track
[ 2596.792580] sr 0:0:0:0: [sr0] CDB: Read(10): 28 00 00 00 00 00 00 00 02 00
[ 2596.792589] end_request: I/O error, dev sr0, sector 0
[ 2596.836252] sr 0:0:0:0: [sr0] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 2596.836264] sr 0:0:0:0: [sr0] Sense Key : Illegal Request [current]
[ 2596.836277] sr 0:0:0:0: [sr0] Add. Sense: Illegal mode for this track
[ 2596.836294] sr 0:0:0:0: [sr0] CDB: Read(10): 28 00 00 00 00 00 00 00 02 00
[ 2596.836320] end_request: I/O error, dev sr0, sector 0
[ 2596.837812] sr 0:0:0:0: [sr0] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[ 2596.837817] sr 0:0:0:0: [sr0] Sense Key : Illegal Request [current]
[ 2596.837822] sr 0:0:0:0: [sr0] Add. Sense: Illegal mode for this track
[ 2596.837827] sr 0:0:0:0: [sr0] CDB: Read(10): 28 00 00 00 00 00 00 00 02 00
[ 2596.837837] end_request: I/O error, dev sr0, sector 0
[ 2826.143822] wlan0: deauthenticating from 00:24:fe:09:94:18 by local choice (reason=3)
[ 2826.143939] wlan0: deauthenticating from 00:24:fe:09:94:18 by local choice (reason=3)
[ 2827.646318] phy0 -> rt61pci_wait_bbp_ready: Error - BBP register access failed, aborting.
[ 2827.646323] phy0 -> rt61pci_set_device_state: Error - Device failed to enter state 4 (-5).
[ 2873.143407] BUG: unable to handle kernel NULL pointer dereference at 0000000000000020
[ 2873.143413] IP: [<ffffffffa01e7290>] rt2x00pci_free_queue_dma+0x20/0xd0 [rt2x00pci]
[ 2873.143421] PGD 2dec1a067 PUD 26c1bc067 PMD 0
[ 2873.143426] Oops: 0000 [#1] PREEMPT SMP
[ 2873.143429] last sysfs file: /sys/devices/platform/coretemp.3/temp1_input
[ 2873.143433] CPU 0
[ 2873.143434] Modules linked in: binfmt_misc ppdev nvidia(P) ipt_REJECT ipt_LOG xt_limit xt_tcpudp xt_state ipt_addrtype snd_hda_codec_realtek ip6table_filter ip6_tables nf_nat_irc coretemp arc4 snd_hda_intel nf_conntrack_irc snd_hda_codec snd_hdsp nf_nat_ftp nf_nat nf_conntrack_ipv4 nf_defrag_ipv4 snd_pcm_oss rt61pci(-) crc_itu_t snd_mixer_oss nf_conntrack_ftp lp snd_pcm nf_conntrack rt2x00pci snd_hwdep parport iptable_filter rt2x00lib snd_seq_dummy snd_seq_oss snd_seq_midi ip_tables x_tables led_class snd_rawmidi snd_seq_midi_event snd_seq mac80211 snd_timer snd_seq_device cfg80211 eeprom_93cx6 snd psmouse pcmcia soundcore snd_page_alloc serio_raw yenta_socket rsrc_nonstatic pcmcia_core xfs exportfs usbhid r8169 mii floppy
[ 2873.143487] Pid: 4677, comm: rmmod Tainted: P 2.6.32-rc5 #35 System Product Name
[ 2873.143490] RIP: 0010:[<ffffffffa01e7290>] [<ffffffffa01e7290>] rt2x00pci_free_queue_dma+0x20/0xd0 [rt2x00pci]
[ 2873.143496] RSP: 0018:ffff880305e53cf8 EFLAGS: 00010282
[ 2873.143499] RAX: 0000000000000000 RBX: ffff8803312e51e0 RCX: 0000000000000000
[ 2873.143501] RDX: 0000000000000150 RSI: ffff880331290c00 RDI: ffff8803312e51e0
[ 2873.143504] RBP: ffff880305e53d38 R08: 0000000000000000 R09: 0000000000000000
[ 2873.143506] R10: 0000000000000001 R11: 0000000000000000 R12: ffff880331290c38
[ 2873.143508] R13: ffff8803312e4340 R14: ffff8803312e51e0 R15: 0000000000000001
[ 2873.143511] FS: 00007f4e38e146f0(0000) GS:ffff880028200000(0000) knlGS:0000000000000000
[ 2873.143514] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[ 2873.143517] CR2: 0000000000000020 CR3: 00000002b2e66000 CR4: 00000000000006b0
[ 2873.143519] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 2873.143522] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[ 2873.143525] Process rmmod (pid: 4677, threadinfo ffff880305e52000, task ffff880305f50000)
[ 2873.143527] Stack:
[ 2873.143528] ffff8803312e51e0 0000000000000001 ffff880305e53d38 ffff8803312e51e0
[ 2873.143532] <0> ffff880331290c38 ffff8803312e4340 ffff8803312e51e0 0000000000000001
[ 2873.143537] <0> ffff880305e53d58 ffffffffa01e7378 ffff8803312e51e0 ffff880333afc080
[ 2873.143542] Call Trace:
[ 2873.143548] [<ffffffffa01e7378>] rt2x00pci_uninitialize+0x38/0x70 [rt2x00pci]
[ 2873.143554] [<ffffffffa01c8062>] rt2x00lib_uninitialize+0x32/0x60 [rt2x00lib]
[ 2873.143560] [<ffffffffa01c886d>] rt2x00lib_remove_dev+0x2d/0xc0 [rt2x00lib]
[ 2873.143565] [<ffffffffa01e718c>] rt2x00pci_remove+0x3c/0x120 [rt2x00pci]
[ 2873.143572] [<ffffffff81298fbf>] pci_device_remove+0x2f/0x60
[ 2873.143578] [<ffffffff8132eec3>] __device_release_driver+0x53/0xb0
[ 2873.143582] [<ffffffff8132efe0>] driver_detach+0xc0/0xd0
[ 2873.143587] [<ffffffff8132df44>] bus_remove_driver+0x94/0xc0
[ 2873.143591] [<ffffffff8132f5a9>] driver_unregister+0x59/0x90
[ 2873.143595] [<ffffffff8129925f>] pci_unregister_driver+0x3f/0xb0
[ 2873.143601] [<ffffffffa024f290>] rt61pci_exit+0x10/0x12 [rt61pci]
[ 2873.143608] [<ffffffff810923f3>] sys_delete_module+0x183/0x250
[ 2873.143613] [<ffffffff8107dbe9>] ? up_read+0x9/0x10
[ 2873.143618] [<ffffffff815351df>] ? do_page_fault+0x13f/0x3f0
[ 2873.143624] [<ffffffff81011f02>] system_call_fastpath+0x16/0x1b
[ 2873.143627] Code: b8 ea ff ff ff eb b3 0f 1f 40 00 55 48 89 e5 48 83 ec 40 48 89 5d d8 4c 89 65 e0 4c 89 6d e8 4c 89 75 f0 4c 89 7d f8 48 8b 46 08 <48> 8b 58 20 48 8b 13 48 85 d2 74 4c 4c 8b 27 48 8b 4b 08 44 0f
[ 2873.143663] RIP [<ffffffffa01e7290>] rt2x00pci_free_queue_dma+0x20/0xd0 [rt2x00pci]
[ 2873.143669] RSP <ffff880305e53cf8>
[ 2873.143670] CR2: 0000000000000020
[ 2873.143673] ---[ end trace af6b473a456cf4f3 ]---
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply
* Re: [PATCH 17/19] [RFC, v2] libertas: Kconfig entry for libertas+cfg80211
From: Christoph Hellwig @ 2009-10-25 3:38 UTC (permalink / raw)
To: Dan Williams; +Cc: Holger Schurig, Johannes Berg, linux-wireless, John Linville
In-Reply-To: <1256315415.2164.46.camel@localhost.localdomain>
How much does mesh actually get used? AFAICS it's a OLPC-specific one
off. So unless OLPC people come up and fix it why do people even bother
with it?
^ permalink raw reply
* Re: Wrong BSSID generation in IBSS mode with ath5k
From: X Xiao @ 2009-10-25 0:18 UTC (permalink / raw)
To: Karol Pucyński, Nick Kossifidis; +Cc: linux-wireless
In-Reply-To: <40f31dec0910241627i5dec6d33g57af6a1104bce91c@mail.gmail.com>
there was a patch fixed that, it's on the list a few days back.
--- On Sat, 10/24/09, Nick Kossifidis <mickflemm@gmail.com> wrote:
> From: Nick Kossifidis <mickflemm@gmail.com>
> Subject: Re: Wrong BSSID generation in IBSS mode with ath5k
> To: "Karol Pucyński" <kpucynski@7bulls.com>
> Cc: linux-wireless@vger.kernel.org
> Date: Saturday, October 24, 2009, 6:27 PM
> 2009/10/20 Karol Pucyński <kpucynski@7bulls.com>:
> > Hi
> >
> > I have IBSS network (based on ath5k cards).
> > With the same channel/essid set cards often can't
> "negotiate" the
> > same BSSID. Two nodes beside each other both create
> new IBSS networks
> > and they are not trying to merge.
> > Workaround: forcing BSSID with iw does work.
> >
> > Do you know what can be the reason of this problem?
> >
> > Tested on 2.6.31 kernel. May be related to my earlier
> problem 'ath5k
> > IBSS fixed rate'...
> >
> > Best regards
> > --
> > Karol Pucyński
> > 7bulls.com Sp. z o.o.
> > kpucynski@7bulls.com
> >
>
> In my tests i had to force a scan on one of the cards (so
> that it
> knows what cells are active) and then set the essid. Does
> that work
> for you ?
>
> --
> GPG ID: 0xD21DB2DB
> As you read this post global entropy rises. Have Fun ;-)
> Nick
> --
> To unsubscribe from this list: send the line "unsubscribe
> linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply
* Re: Wrong BSSID generation in IBSS mode with ath5k
From: Nick Kossifidis @ 2009-10-24 23:27 UTC (permalink / raw)
To: Karol Pucyński; +Cc: linux-wireless
In-Reply-To: <1256052469.6550.7.camel@kpucynski-laptop>
2009/10/20 Karol Pucyński <kpucynski@7bulls.com>:
> Hi
>
> I have IBSS network (based on ath5k cards).
> With the same channel/essid set cards often can't "negotiate" the
> same BSSID. Two nodes beside each other both create new IBSS networks
> and they are not trying to merge.
> Workaround: forcing BSSID with iw does work.
>
> Do you know what can be the reason of this problem?
>
> Tested on 2.6.31 kernel. May be related to my earlier problem 'ath5k
> IBSS fixed rate'...
>
> Best regards
> --
> Karol Pucyński
> 7bulls.com Sp. z o.o.
> kpucynski@7bulls.com
>
In my tests i had to force a scan on one of the cards (so that it
knows what cells are active) and then set the essid. Does that work
for you ?
--
GPG ID: 0xD21DB2DB
As you read this post global entropy rises. Have Fun ;-)
Nick
^ permalink raw reply
* Re: "Reserved instruction in kernel code" on ath9k insertion
From: Tomasz Chmielewski @ 2009-10-24 20:58 UTC (permalink / raw)
To: Larry Finger; +Cc: linux-wireless
In-Reply-To: <4AE36884.6060806@lwfinger.net>
Larry Finger schrieb:
>> # modprobe ath9k
>> [ 165.440000] Reserved instruction in kernel code[#1]:
(...)
>> [ 165.440000] Code: 00000000 00000000 00000000 <00003009> 005196a8
>> 005196a8 00000002 00000000 005166b0
>> [ 165.440000] Disabling lock debugging due to kernel taint
>> Segmentation fault
>> #
>
> Is that the start of the error dump?
Yes - as I do "modprobe", it starts to print the dump.
Then, modprobe segfaults.
> A BUG() statement places an
> illegal instruction in the code. Is that the case here?
I have no idea.
--
Tomasz Chmielewski
http://wpkg.org
^ permalink raw reply
* Re: "Reserved instruction in kernel code" on ath9k insertion
From: Larry Finger @ 2009-10-24 20:50 UTC (permalink / raw)
To: Tomasz Chmielewski; +Cc: linux-wireless
In-Reply-To: <4AE35A9E.8000507@wpkg.org>
On 10/24/2009 02:50 PM, Tomasz Chmielewski wrote:
> When I do "modprobe ath9k" on ASUS-WL-500gP (MIPS) with _ath5k_ card
> (so, no ath9k hardware), it says "Reserved instruction in kernel code" -
> is it expected?
>
> The kernel is 2.6.31.1.
>
>
> # modprobe ath9k
> [ 165.440000] Reserved instruction in kernel code[#1]:
> [ 165.440000] Cpu 0
> [ 165.440000] $ 0 : 00000000 1000dc00 00000000 00000000
> [ 165.440000] $ 4 : c1135b20 00000001 c044e69c ffffffff
> [ 165.440000] $ 8 : 0000000a 8101f6d8 ffffffe0 0000002b
> [ 165.440000] $12 : 00000e44 00000006 80333ae8 5f657361
> [ 165.440000] $16 : 00000001 c1135ca4 80370000 81418000
> [ 165.440000] $20 : 00000000 00000000 00000000 004fe008
> [ 165.440000] $24 : 00000010 c1115118
> [ 165.440000] $28 : 81da6000 81da7ea8 7febead8 81418014
> [ 165.440000] Hi : 00000000
> [ 165.440000] Lo : 00000000
> [ 165.440000] epc : c044e694 0xc044e694
> [ 165.440000] Not tainted
> [ 165.440000] ra : 81418014 ath9k_init+0x14/0xa4 [ath9k]
> [ 165.440000] Status: 1000dc03 KERNEL EXL IE
> [ 165.440000] Cause : 80800028
> [ 165.440000] PrId : 00029006 (Broadcom BCM3302)
> [ 165.440000] Modules linked in: ath9k(+) aes_generic tun sch_sfq
> cls_fw sch_htb ipt_MASQUERADE iptable_nat nf_nat xt_MARK iptable_mangle
> ipt_ULOG xt_recent nf_conntrack_ipv4 nf_defrag_ipv4 xt_state
> nf_conntrack xt_tcpudp iptable_filter ip_tables x_tables arc4 ecb ath5k
> mac80211 ath ohci_hcd cfg80211 uhci_hcd
> [ 165.440000] Process modprobe (pid: 1285, threadinfo=81da6000,
> task=81dc0048, tls=2aad96f0)
> [ 165.440000] Stack : 00000000 00000000 c1049988 000002a0 00000001
> 8000cda4 80330000 c1135ca4
> [ 165.440000] 0041ee08 2ac50000 005021a8 00000000 8004d59c
> 0029e597 0041ee08 2ac50000
> [ 165.440000] 00000001 c1135ca4 0041ee08 2ac50000 005021a8
> 8005fc84 0029f000 00000002
> [ 165.440000] 00408228 00400de0 004f1400 2aad8f08 00408228
> 00400de0 004f1400 2aad8f08
> [ 165.440000] 800035f0 800035f0 005021a8 004ff648 004fe008
> 00000000 00401090 00000000
> [ 165.440000] ...
> [ 165.440000] Call Trace:
> [ 165.440000] [<8000cda4>] do_one_initcall+0x6c/0x204
> [ 165.440000] [<8004d59c>] blocking_notifier_call_chain+0x14/0x20
> [ 165.440000] [<8005fc84>] sys_init_module+0xe8/0x214
> [ 165.440000] [<800035f0>] stack_done+0x20/0x3c
> [ 165.440000] [<800035f0>] stack_done+0x20/0x3c
> [ 165.440000]
> [ 165.440000]
> [ 165.440000] Code: 00000000 00000000 00000000 <00003009> 005196a8
> 005196a8 00000002 00000000 005166b0
> [ 165.440000] Disabling lock debugging due to kernel taint
> Segmentation fault
> #
Is that the start of the error dump? A BUG() statement places an
illegal instruction in the code. Is that the case here?
^ permalink raw reply
* "Reserved instruction in kernel code" on ath9k insertion
From: Tomasz Chmielewski @ 2009-10-24 19:50 UTC (permalink / raw)
To: linux-wireless
When I do "modprobe ath9k" on ASUS-WL-500gP (MIPS) with _ath5k_ card (so, no ath9k hardware), it says "Reserved instruction in kernel code" - is it expected?
The kernel is 2.6.31.1.
# modprobe ath9k
[ 165.440000] Reserved instruction in kernel code[#1]:
[ 165.440000] Cpu 0
[ 165.440000] $ 0 : 00000000 1000dc00 00000000 00000000
[ 165.440000] $ 4 : c1135b20 00000001 c044e69c ffffffff
[ 165.440000] $ 8 : 0000000a 8101f6d8 ffffffe0 0000002b
[ 165.440000] $12 : 00000e44 00000006 80333ae8 5f657361
[ 165.440000] $16 : 00000001 c1135ca4 80370000 81418000
[ 165.440000] $20 : 00000000 00000000 00000000 004fe008
[ 165.440000] $24 : 00000010 c1115118
[ 165.440000] $28 : 81da6000 81da7ea8 7febead8 81418014
[ 165.440000] Hi : 00000000
[ 165.440000] Lo : 00000000
[ 165.440000] epc : c044e694 0xc044e694
[ 165.440000] Not tainted
[ 165.440000] ra : 81418014 ath9k_init+0x14/0xa4 [ath9k]
[ 165.440000] Status: 1000dc03 KERNEL EXL IE
[ 165.440000] Cause : 80800028
[ 165.440000] PrId : 00029006 (Broadcom BCM3302)
[ 165.440000] Modules linked in: ath9k(+) aes_generic tun sch_sfq cls_fw sch_htb ipt_MASQUERADE iptable_nat nf_nat xt_MARK iptable_mangle ipt_ULOG xt_recent nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack xt_tcpudp iptable_filter ip_tables x_tables arc4 ecb ath5k mac80211 ath ohci_hcd cfg80211 uhci_hcd
[ 165.440000] Process modprobe (pid: 1285, threadinfo=81da6000, task=81dc0048, tls=2aad96f0)
[ 165.440000] Stack : 00000000 00000000 c1049988 000002a0 00000001 8000cda4 80330000 c1135ca4
[ 165.440000] 0041ee08 2ac50000 005021a8 00000000 8004d59c 0029e597 0041ee08 2ac50000
[ 165.440000] 00000001 c1135ca4 0041ee08 2ac50000 005021a8 8005fc84 0029f000 00000002
[ 165.440000] 00408228 00400de0 004f1400 2aad8f08 00408228 00400de0 004f1400 2aad8f08
[ 165.440000] 800035f0 800035f0 005021a8 004ff648 004fe008 00000000 00401090 00000000
[ 165.440000] ...
[ 165.440000] Call Trace:
[ 165.440000] [<8000cda4>] do_one_initcall+0x6c/0x204
[ 165.440000] [<8004d59c>] blocking_notifier_call_chain+0x14/0x20
[ 165.440000] [<8005fc84>] sys_init_module+0xe8/0x214
[ 165.440000] [<800035f0>] stack_done+0x20/0x3c
[ 165.440000] [<800035f0>] stack_done+0x20/0x3c
[ 165.440000]
[ 165.440000]
[ 165.440000] Code: 00000000 00000000 00000000 <00003009> 005196a8 005196a8 00000002 00000000 005166b0
[ 165.440000] Disabling lock debugging due to kernel taint
Segmentation fault
#
--
Tomasz Chmielewski
http://wpkg.org
^ permalink raw reply
* [RFC] more PCMCIA cleanup patches for 2.6.33
From: Dominik Brodowski @ 2009-10-24 19:42 UTC (permalink / raw)
To: linux-pcmcia; +Cc: netdev, linux-wireless, linux-serial, linux-ide
Hej,
In addition to the patches already submitted as RFC on Oct 19th, I'm
interested in your input to this patch series. They'll be sent to the
PCMCIA list shortly, with CC to other lists if deemed appropriate. If
all goes well, I'll ask Linus to pull both patch series once 2.6.32
is released.
pcmcia: use dynamic debug instead of custom infrastructure
pcmcia: use dynamic debug in PCMCIA socket drivers
pcmcia: extend error reporting and debug messages in core
pcmcia: use dynamic debug infrastructure, deprecate CS_CHECK (ide)
pcmcia: deprecate CS_CHECK (bluetooth)
pcmcia: use dynamic debug infrastructure, deprecate CS_CHECK (char)
pcmcia: use dynamic debug infrastructure, deprecate CS_CHECK (isdn)
pcmcia: use dynamic debug infrastructure, deprecate CS_CHECK (net)
pcmcia: use dynamic debug infrastructure, deprecate CS_CHECK (ray-cs.c)
pcmcia: use dynamic debug infrastructure, deprecate CS_CHECK (wireless)
pcmcia: use dynamic debug infrastructure, deprecate CS_CHECK (scsi)
pcmcia: use dynamic debug infrastructure, deprecate CS_CHECK (serial_cs)
pcmcia: use dynamic debug infrastructure, deprecate CS_CHECK (sound)
pcmcia: use dynamic debug infrastructure, deprecate CS_CHECK (misc drivers)
pcmcia: remove now-defunct cs_error, pcmcia_error_{func,ret}
pcmcia: use dev_dbg and dev_print in pd6729.c
Documentation/pcmcia/driver-changes.txt | 5 +
drivers/ata/pata_pcmcia.c | 16 +-
drivers/bluetooth/bluecard_cs.c | 12 +-
drivers/bluetooth/bt3c_cs.c | 9 +-
drivers/bluetooth/btuart_cs.c | 9 +-
drivers/bluetooth/dtl1_cs.c | 8 +-
drivers/char/pcmcia/cm4000_cs.c | 69 ++----
drivers/char/pcmcia/cm4040_cs.c | 42 ++--
drivers/char/pcmcia/ipwireless/main.c | 34 +--
drivers/char/pcmcia/synclink_cs.c | 23 +-
drivers/ide/ide-cs.c | 32 +--
drivers/isdn/hardware/avm/avm_cs.c | 2 -
drivers/isdn/hisax/avma1_cs.c | 26 +--
drivers/isdn/hisax/elsa_cs.c | 45 +---
drivers/isdn/hisax/sedlbauer_cs.c | 58 ++---
drivers/isdn/hisax/teles_cs.c | 37 +---
drivers/mtd/maps/pcmciamtd.c | 14 +-
drivers/net/pcmcia/3c574_cs.c | 66 +++---
drivers/net/pcmcia/3c589_cs.c | 75 ++----
drivers/net/pcmcia/axnet_cs.c | 53 ++---
drivers/net/pcmcia/com20020_cs.c | 55 ++---
drivers/net/pcmcia/fmvj18x_cs.c | 109 +++------
drivers/net/pcmcia/ibmtr_cs.c | 54 ++---
drivers/net/pcmcia/nmclan_cs.c | 148 +++++-------
drivers/net/pcmcia/pcnet_cs.c | 67 ++----
drivers/net/pcmcia/smc91c92_cs.c | 85 +++-----
drivers/net/pcmcia/xirc2ps_cs.c | 111 ++++------
drivers/net/wireless/airo_cs.c | 48 ++---
drivers/net/wireless/atmel_cs.c | 46 ++---
drivers/net/wireless/hostap/hostap_cs.c | 23 +--
drivers/net/wireless/netwave_cs.c | 88 +++----
drivers/net/wireless/orinoco/orinoco_cs.c | 27 +--
drivers/net/wireless/orinoco/spectrum_cs.c | 54 +++---
drivers/net/wireless/ray_cs.c | 347 ++++++++++++++--------------
drivers/net/wireless/wavelan_cs.c | 24 --
drivers/net/wireless/wl3501_cs.c | 67 ++----
drivers/parport/parport_cs.c | 37 +--
drivers/pcmcia/Kconfig | 36 ++--
drivers/pcmcia/cardbus.c | 4 +-
drivers/pcmcia/cistpl.c | 10 +-
drivers/pcmcia/cs.c | 60 +++---
drivers/pcmcia/cs_internal.h | 22 --
drivers/pcmcia/ds.c | 188 +++------------
drivers/pcmcia/i82365.c | 37 +--
drivers/pcmcia/m32r_cfc.c | 105 ++++-----
drivers/pcmcia/m32r_pcc.c | 51 ++---
drivers/pcmcia/m8xx_pcmcia.c | 40 ++--
drivers/pcmcia/pcmcia_ioctl.c | 31 +--
drivers/pcmcia/pcmcia_resource.c | 126 ++++++-----
drivers/pcmcia/pd6729.c | 69 +++---
drivers/pcmcia/pd6729.h | 7 -
drivers/pcmcia/tcic.c | 29 +--
drivers/scsi/pcmcia/aha152x_stub.c | 40 ++--
drivers/scsi/pcmcia/fdomain_stub.c | 43 ++---
drivers/scsi/pcmcia/qlogic_stub.c | 44 ++---
drivers/scsi/pcmcia/sym53c500_cs.c | 41 ++---
drivers/serial/serial_cs.c | 53 ++---
drivers/telephony/ixj_pcmcia.c | 36 +--
drivers/usb/host/sl811_cs.c | 46 +---
include/pcmcia/ds.h | 36 ---
sound/pcmcia/pdaudiocf/pdaudiocf.c | 21 +-
sound/pcmcia/vx/vxpocket.c | 21 +-
62 files changed, 1204 insertions(+), 2017 deletions(-)
Best,
Dominik
^ permalink raw reply
* [PATCH 09/16] pcmcia: use dynamic debug infrastructure, deprecate CS_CHECK (ray-cs.c)
From: Dominik Brodowski @ 2009-10-24 19:42 UTC (permalink / raw)
To: linux-pcmcia; +Cc: Dominik Brodowski, linux-wireless, netdev
In-Reply-To: <20091024194219.GA19546@comet.dominikbrodowski.net>
Convert PCMCIA drivers to use the dynamic debug infrastructure, instead of
requiring manual settings of PCMCIA_DEBUG.
Also, remove all usages of the CS_CHECK macro and replace them with proper
Linux style calling and return value checking. The extra error reporting may
be dropped, as the PCMCIA core already complains about any (non-driver-author)
errors.
CC: linux-wireless@vger.kernel.org
CC: netdev@vger.kernel.org
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
---
drivers/net/wireless/ray_cs.c | 347 ++++++++++++++++++++---------------------
1 files changed, 169 insertions(+), 178 deletions(-)
diff --git a/drivers/net/wireless/ray_cs.c b/drivers/net/wireless/ray_cs.c
index 88cd58e..28db791 100644
--- a/drivers/net/wireless/ray_cs.c
+++ b/drivers/net/wireless/ray_cs.c
@@ -71,25 +71,7 @@ typedef u_char mac_addr[ETH_ALEN]; /* Hardware address */
#include "rayctl.h"
#include "ray_cs.h"
-/* All the PCMCIA modules use PCMCIA_DEBUG to control debugging. If
- you do not define PCMCIA_DEBUG at all, all the debug code will be
- left out. If you compile with PCMCIA_DEBUG=0, the debug code will
- be present but disabled -- but it can then be enabled for specific
- modules at load time with a 'pc_debug=#' option to insmod.
-*/
-#ifdef RAYLINK_DEBUG
-#define PCMCIA_DEBUG RAYLINK_DEBUG
-#endif
-#ifdef PCMCIA_DEBUG
-static int ray_debug;
-static int pc_debug = PCMCIA_DEBUG;
-module_param(pc_debug, int, 0);
-/* #define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args); */
-#define DEBUG(n, args...) if (pc_debug > (n)) printk(args);
-#else
-#define DEBUG(n, args...)
-#endif
/** Prototypes based on PCMCIA skeleton driver *******************************/
static int ray_config(struct pcmcia_device *link);
static void ray_release(struct pcmcia_device *link);
@@ -325,7 +307,7 @@ static int ray_probe(struct pcmcia_device *p_dev)
ray_dev_t *local;
struct net_device *dev;
- DEBUG(1, "ray_attach()\n");
+ dev_dbg(&p_dev->dev, "ray_attach()\n");
/* Allocate space for private device-specific data */
dev = alloc_etherdev(sizeof(ray_dev_t));
@@ -357,7 +339,7 @@ static int ray_probe(struct pcmcia_device *p_dev)
local->card_status = CARD_INSERTED;
local->authentication_state = UNAUTHENTICATED;
local->num_multi = 0;
- DEBUG(2, "ray_attach p_dev = %p, dev = %p, local = %p, intr = %p\n",
+ dev_dbg(&p_dev->dev, "ray_attach p_dev = %p, dev = %p, local = %p, intr = %p\n",
p_dev, dev, local, &ray_interrupt);
/* Raylink entries in the device structure */
@@ -370,7 +352,7 @@ static int ray_probe(struct pcmcia_device *p_dev)
#endif /* WIRELESS_SPY */
- DEBUG(2, "ray_cs ray_attach calling ether_setup.)\n");
+ dev_dbg(&p_dev->dev, "ray_cs ray_attach calling ether_setup.)\n");
netif_stop_queue(dev);
init_timer(&local->timer);
@@ -393,7 +375,7 @@ static void ray_detach(struct pcmcia_device *link)
struct net_device *dev;
ray_dev_t *local;
- DEBUG(1, "ray_detach(0x%p)\n", link);
+ dev_dbg(&link->dev, "ray_detach\n");
this_device = NULL;
dev = link->priv;
@@ -408,7 +390,7 @@ static void ray_detach(struct pcmcia_device *link)
unregister_netdev(dev);
free_netdev(dev);
}
- DEBUG(2, "ray_cs ray_detach ending\n");
+ dev_dbg(&link->dev, "ray_cs ray_detach ending\n");
} /* ray_detach */
/*=============================================================================
@@ -416,19 +398,17 @@ static void ray_detach(struct pcmcia_device *link)
is received, to configure the PCMCIA socket, and to make the
ethernet device available to the system.
=============================================================================*/
-#define CS_CHECK(fn, ret) \
-do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0)
#define MAX_TUPLE_SIZE 128
static int ray_config(struct pcmcia_device *link)
{
- int last_fn = 0, last_ret = 0;
+ int ret = 0;
int i;
win_req_t req;
memreq_t mem;
struct net_device *dev = (struct net_device *)link->priv;
ray_dev_t *local = netdev_priv(dev);
- DEBUG(1, "ray_config(0x%p)\n", link);
+ dev_dbg(&link->dev, "ray_config\n");
/* Determine card type and firmware version */
printk(KERN_INFO "ray_cs Detected: %s%s%s%s\n",
@@ -440,14 +420,17 @@ static int ray_config(struct pcmcia_device *link)
/* Now allocate an interrupt line. Note that this does not
actually assign a handler to the interrupt.
*/
- CS_CHECK(RequestIRQ, pcmcia_request_irq(link, &link->irq));
+ ret = pcmcia_request_irq(link, &link->irq);
+ if (ret)
+ goto failed;
dev->irq = link->irq.AssignedIRQ;
/* This actually configures the PCMCIA socket -- setting up
the I/O windows and the interrupt mapping.
*/
- CS_CHECK(RequestConfiguration,
- pcmcia_request_configuration(link, &link->conf));
+ ret = pcmcia_request_configuration(link, &link->conf);
+ if (ret)
+ goto failed;
/*** Set up 32k window for shared memory (transmit and control) ************/
req.Attributes =
@@ -455,10 +438,14 @@ static int ray_config(struct pcmcia_device *link)
req.Base = 0;
req.Size = 0x8000;
req.AccessSpeed = ray_mem_speed;
- CS_CHECK(RequestWindow, pcmcia_request_window(&link, &req, &link->win));
+ ret = pcmcia_request_window(&link, &req, &link->win);
+ if (ret)
+ goto failed;
mem.CardOffset = 0x0000;
mem.Page = 0;
- CS_CHECK(MapMemPage, pcmcia_map_mem_page(link->win, &mem));
+ ret = pcmcia_map_mem_page(link->win, &mem);
+ if (ret)
+ goto failed;
local->sram = ioremap(req.Base, req.Size);
/*** Set up 16k window for shared memory (receive buffer) ***************/
@@ -467,11 +454,14 @@ static int ray_config(struct pcmcia_device *link)
req.Base = 0;
req.Size = 0x4000;
req.AccessSpeed = ray_mem_speed;
- CS_CHECK(RequestWindow,
- pcmcia_request_window(&link, &req, &local->rmem_handle));
+ ret = pcmcia_request_window(&link, &req, &local->rmem_handle);
+ if (ret)
+ goto failed;
mem.CardOffset = 0x8000;
mem.Page = 0;
- CS_CHECK(MapMemPage, pcmcia_map_mem_page(local->rmem_handle, &mem));
+ ret = pcmcia_map_mem_page(local->rmem_handle, &mem);
+ if (ret)
+ goto failed;
local->rmem = ioremap(req.Base, req.Size);
/*** Set up window for attribute memory ***********************************/
@@ -480,16 +470,19 @@ static int ray_config(struct pcmcia_device *link)
req.Base = 0;
req.Size = 0x1000;
req.AccessSpeed = ray_mem_speed;
- CS_CHECK(RequestWindow,
- pcmcia_request_window(&link, &req, &local->amem_handle));
+ ret = pcmcia_request_window(&link, &req, &local->amem_handle);
+ if (ret)
+ goto failed;
mem.CardOffset = 0x0000;
mem.Page = 0;
- CS_CHECK(MapMemPage, pcmcia_map_mem_page(local->amem_handle, &mem));
+ ret = pcmcia_map_mem_page(local->amem_handle, &mem);
+ if (ret)
+ goto failed;
local->amem = ioremap(req.Base, req.Size);
- DEBUG(3, "ray_config sram=%p\n", local->sram);
- DEBUG(3, "ray_config rmem=%p\n", local->rmem);
- DEBUG(3, "ray_config amem=%p\n", local->amem);
+ dev_dbg(&link->dev, "ray_config sram=%p\n", local->sram);
+ dev_dbg(&link->dev, "ray_config rmem=%p\n", local->rmem);
+ dev_dbg(&link->dev, "ray_config amem=%p\n", local->amem);
if (ray_init(dev) < 0) {
ray_release(link);
return -ENODEV;
@@ -511,9 +504,7 @@ static int ray_config(struct pcmcia_device *link)
return 0;
-cs_failed:
- cs_error(link, last_fn, last_ret);
-
+failed:
ray_release(link);
return -ENODEV;
} /* ray_config */
@@ -543,9 +534,9 @@ static int ray_init(struct net_device *dev)
struct ccs __iomem *pccs;
ray_dev_t *local = netdev_priv(dev);
struct pcmcia_device *link = local->finder;
- DEBUG(1, "ray_init(0x%p)\n", dev);
+ dev_dbg(&link->dev, "ray_init(0x%p)\n", dev);
if (!(pcmcia_dev_present(link))) {
- DEBUG(0, "ray_init - device not present\n");
+ dev_dbg(&link->dev, "ray_init - device not present\n");
return -1;
}
@@ -567,13 +558,13 @@ static int ray_init(struct net_device *dev)
local->fw_ver = local->startup_res.firmware_version[0];
local->fw_bld = local->startup_res.firmware_version[1];
local->fw_var = local->startup_res.firmware_version[2];
- DEBUG(1, "ray_init firmware version %d.%d \n", local->fw_ver,
+ dev_dbg(&link->dev, "ray_init firmware version %d.%d \n", local->fw_ver,
local->fw_bld);
local->tib_length = 0x20;
if ((local->fw_ver == 5) && (local->fw_bld >= 30))
local->tib_length = local->startup_res.tib_length;
- DEBUG(2, "ray_init tib_length = 0x%02x\n", local->tib_length);
+ dev_dbg(&link->dev, "ray_init tib_length = 0x%02x\n", local->tib_length);
/* Initialize CCS's to buffer free state */
pccs = ccs_base(local);
for (i = 0; i < NUMBER_OF_CCS; i++) {
@@ -592,7 +583,7 @@ static int ray_init(struct net_device *dev)
clear_interrupt(local); /* Clear any interrupt from the card */
local->card_status = CARD_AWAITING_PARAM;
- DEBUG(2, "ray_init ending\n");
+ dev_dbg(&link->dev, "ray_init ending\n");
return 0;
} /* ray_init */
@@ -605,9 +596,9 @@ static int dl_startup_params(struct net_device *dev)
struct ccs __iomem *pccs;
struct pcmcia_device *link = local->finder;
- DEBUG(1, "dl_startup_params entered\n");
+ dev_dbg(&link->dev, "dl_startup_params entered\n");
if (!(pcmcia_dev_present(link))) {
- DEBUG(2, "ray_cs dl_startup_params - device not present\n");
+ dev_dbg(&link->dev, "ray_cs dl_startup_params - device not present\n");
return -1;
}
@@ -625,7 +616,7 @@ static int dl_startup_params(struct net_device *dev)
local->dl_param_ccs = ccsindex;
pccs = ccs_base(local) + ccsindex;
writeb(CCS_DOWNLOAD_STARTUP_PARAMS, &pccs->cmd);
- DEBUG(2, "dl_startup_params start ccsindex = %d\n",
+ dev_dbg(&link->dev, "dl_startup_params start ccsindex = %d\n",
local->dl_param_ccs);
/* Interrupt the firmware to process the command */
if (interrupt_ecf(local, ccsindex)) {
@@ -641,7 +632,7 @@ static int dl_startup_params(struct net_device *dev)
local->timer.data = (long)local;
local->timer.function = &verify_dl_startup;
add_timer(&local->timer);
- DEBUG(2,
+ dev_dbg(&link->dev,
"ray_cs dl_startup_params started timer for verify_dl_startup\n");
return 0;
} /* dl_startup_params */
@@ -717,11 +708,11 @@ static void verify_dl_startup(u_long data)
struct pcmcia_device *link = local->finder;
if (!(pcmcia_dev_present(link))) {
- DEBUG(2, "ray_cs verify_dl_startup - device not present\n");
+ dev_dbg(&link->dev, "ray_cs verify_dl_startup - device not present\n");
return;
}
-#ifdef PCMCIA_DEBUG
- if (pc_debug > 2) {
+#if 0
+ {
int i;
printk(KERN_DEBUG
"verify_dl_startup parameters sent via ccs %d:\n",
@@ -760,7 +751,7 @@ static void start_net(u_long data)
int ccsindex;
struct pcmcia_device *link = local->finder;
if (!(pcmcia_dev_present(link))) {
- DEBUG(2, "ray_cs start_net - device not present\n");
+ dev_dbg(&link->dev, "ray_cs start_net - device not present\n");
return;
}
/* Fill in the CCS fields for the ECF */
@@ -771,7 +762,7 @@ static void start_net(u_long data)
writeb(0, &pccs->var.start_network.update_param);
/* Interrupt the firmware to process the command */
if (interrupt_ecf(local, ccsindex)) {
- DEBUG(1, "ray start net failed - card not ready for intr\n");
+ dev_dbg(&link->dev, "ray start net failed - card not ready for intr\n");
writeb(CCS_BUFFER_FREE, &(pccs++)->buffer_status);
return;
}
@@ -790,7 +781,7 @@ static void join_net(u_long data)
struct pcmcia_device *link = local->finder;
if (!(pcmcia_dev_present(link))) {
- DEBUG(2, "ray_cs join_net - device not present\n");
+ dev_dbg(&link->dev, "ray_cs join_net - device not present\n");
return;
}
/* Fill in the CCS fields for the ECF */
@@ -802,7 +793,7 @@ static void join_net(u_long data)
writeb(0, &pccs->var.join_network.net_initiated);
/* Interrupt the firmware to process the command */
if (interrupt_ecf(local, ccsindex)) {
- DEBUG(1, "ray join net failed - card not ready for intr\n");
+ dev_dbg(&link->dev, "ray join net failed - card not ready for intr\n");
writeb(CCS_BUFFER_FREE, &(pccs++)->buffer_status);
return;
}
@@ -821,7 +812,7 @@ static void ray_release(struct pcmcia_device *link)
ray_dev_t *local = netdev_priv(dev);
int i;
- DEBUG(1, "ray_release(0x%p)\n", link);
+ dev_dbg(&link->dev, "ray_release\n");
del_timer(&local->timer);
@@ -831,13 +822,13 @@ static void ray_release(struct pcmcia_device *link)
/* Do bother checking to see if these succeed or not */
i = pcmcia_release_window(local->amem_handle);
if (i != 0)
- DEBUG(0, "ReleaseWindow(local->amem) ret = %x\n", i);
+ dev_dbg(&link->dev, "ReleaseWindow(local->amem) ret = %x\n", i);
i = pcmcia_release_window(local->rmem_handle);
if (i != 0)
- DEBUG(0, "ReleaseWindow(local->rmem) ret = %x\n", i);
+ dev_dbg(&link->dev, "ReleaseWindow(local->rmem) ret = %x\n", i);
pcmcia_disable_device(link);
- DEBUG(2, "ray_release ending\n");
+ dev_dbg(&link->dev, "ray_release ending\n");
}
static int ray_suspend(struct pcmcia_device *link)
@@ -871,9 +862,9 @@ static int ray_dev_init(struct net_device *dev)
ray_dev_t *local = netdev_priv(dev);
struct pcmcia_device *link = local->finder;
- DEBUG(1, "ray_dev_init(dev=%p)\n", dev);
+ dev_dbg(&link->dev, "ray_dev_init(dev=%p)\n", dev);
if (!(pcmcia_dev_present(link))) {
- DEBUG(2, "ray_dev_init - device not present\n");
+ dev_dbg(&link->dev, "ray_dev_init - device not present\n");
return -1;
}
#ifdef RAY_IMMEDIATE_INIT
@@ -887,7 +878,7 @@ static int ray_dev_init(struct net_device *dev)
/* Postpone the card init so that we can still configure the card,
* for example using the Wireless Extensions. The init will happen
* in ray_open() - Jean II */
- DEBUG(1,
+ dev_dbg(&link->dev,
"ray_dev_init: postponing card init to ray_open() ; Status = %d\n",
local->card_status);
#endif /* RAY_IMMEDIATE_INIT */
@@ -896,7 +887,7 @@ static int ray_dev_init(struct net_device *dev)
memcpy(dev->dev_addr, &local->sparm.b4.a_mac_addr, ADDRLEN);
memset(dev->broadcast, 0xff, ETH_ALEN);
- DEBUG(2, "ray_dev_init ending\n");
+ dev_dbg(&link->dev, "ray_dev_init ending\n");
return 0;
}
@@ -906,9 +897,9 @@ static int ray_dev_config(struct net_device *dev, struct ifmap *map)
ray_dev_t *local = netdev_priv(dev);
struct pcmcia_device *link = local->finder;
/* Dummy routine to satisfy device structure */
- DEBUG(1, "ray_dev_config(dev=%p,ifmap=%p)\n", dev, map);
+ dev_dbg(&link->dev, "ray_dev_config(dev=%p,ifmap=%p)\n", dev, map);
if (!(pcmcia_dev_present(link))) {
- DEBUG(2, "ray_dev_config - device not present\n");
+ dev_dbg(&link->dev, "ray_dev_config - device not present\n");
return -1;
}
@@ -924,14 +915,14 @@ static netdev_tx_t ray_dev_start_xmit(struct sk_buff *skb,
short length = skb->len;
if (!pcmcia_dev_present(link)) {
- DEBUG(2, "ray_dev_start_xmit - device not present\n");
+ dev_dbg(&link->dev, "ray_dev_start_xmit - device not present\n");
dev_kfree_skb(skb);
return NETDEV_TX_OK;
}
- DEBUG(3, "ray_dev_start_xmit(skb=%p, dev=%p)\n", skb, dev);
+ dev_dbg(&link->dev, "ray_dev_start_xmit(skb=%p, dev=%p)\n", skb, dev);
if (local->authentication_state == NEED_TO_AUTH) {
- DEBUG(0, "ray_cs Sending authentication request.\n");
+ dev_dbg(&link->dev, "ray_cs Sending authentication request.\n");
if (!build_auth_frame(local, local->auth_id, OPEN_AUTH_REQUEST)) {
local->authentication_state = AUTHENTICATED;
netif_stop_queue(dev);
@@ -971,7 +962,7 @@ static int ray_hw_xmit(unsigned char *data, int len, struct net_device *dev,
struct tx_msg __iomem *ptx; /* Address of xmit buffer in PC space */
short int addr; /* Address of xmit buffer in card space */
- DEBUG(3, "ray_hw_xmit(data=%p, len=%d, dev=%p)\n", data, len, dev);
+ pr_debug("ray_hw_xmit(data=%p, len=%d, dev=%p)\n", data, len, dev);
if (len + TX_HEADER_LENGTH > TX_BUF_SIZE) {
printk(KERN_INFO "ray_hw_xmit packet too large: %d bytes\n",
len);
@@ -979,9 +970,9 @@ static int ray_hw_xmit(unsigned char *data, int len, struct net_device *dev,
}
switch (ccsindex = get_free_tx_ccs(local)) {
case ECCSBUSY:
- DEBUG(2, "ray_hw_xmit tx_ccs table busy\n");
+ pr_debug("ray_hw_xmit tx_ccs table busy\n");
case ECCSFULL:
- DEBUG(2, "ray_hw_xmit No free tx ccs\n");
+ pr_debug("ray_hw_xmit No free tx ccs\n");
case ECARDGONE:
netif_stop_queue(dev);
return XMIT_NO_CCS;
@@ -1018,12 +1009,12 @@ static int ray_hw_xmit(unsigned char *data, int len, struct net_device *dev,
writeb(PSM_CAM, &pccs->var.tx_request.pow_sav_mode);
writeb(local->net_default_tx_rate, &pccs->var.tx_request.tx_rate);
writeb(0, &pccs->var.tx_request.antenna);
- DEBUG(3, "ray_hw_xmit default_tx_rate = 0x%x\n",
+ pr_debug("ray_hw_xmit default_tx_rate = 0x%x\n",
local->net_default_tx_rate);
/* Interrupt the firmware to process the command */
if (interrupt_ecf(local, ccsindex)) {
- DEBUG(2, "ray_hw_xmit failed - ECF not ready for intr\n");
+ pr_debug("ray_hw_xmit failed - ECF not ready for intr\n");
/* TBD very inefficient to copy packet to buffer, and then not
send it, but the alternative is to queue the messages and that
won't be done for a while. Maybe set tbusy until a CCS is free?
@@ -1040,7 +1031,7 @@ static int translate_frame(ray_dev_t *local, struct tx_msg __iomem *ptx,
{
__be16 proto = ((struct ethhdr *)data)->h_proto;
if (ntohs(proto) >= 1536) { /* DIX II ethernet frame */
- DEBUG(3, "ray_cs translate_frame DIX II\n");
+ pr_debug("ray_cs translate_frame DIX II\n");
/* Copy LLC header to card buffer */
memcpy_toio(&ptx->var, eth2_llc, sizeof(eth2_llc));
memcpy_toio(((void __iomem *)&ptx->var) + sizeof(eth2_llc),
@@ -1056,9 +1047,9 @@ static int translate_frame(ray_dev_t *local, struct tx_msg __iomem *ptx,
len - ETH_HLEN);
return (int)sizeof(struct snaphdr_t) - ETH_HLEN;
} else { /* already 802 type, and proto is length */
- DEBUG(3, "ray_cs translate_frame 802\n");
+ pr_debug("ray_cs translate_frame 802\n");
if (proto == htons(0xffff)) { /* evil netware IPX 802.3 without LLC */
- DEBUG(3, "ray_cs translate_frame evil IPX\n");
+ pr_debug("ray_cs translate_frame evil IPX\n");
memcpy_toio(&ptx->var, data + ETH_HLEN, len - ETH_HLEN);
return 0 - ETH_HLEN;
}
@@ -1603,7 +1594,7 @@ static int ray_open(struct net_device *dev)
struct pcmcia_device *link;
link = local->finder;
- DEBUG(1, "ray_open('%s')\n", dev->name);
+ dev_dbg(&link->dev, "ray_open('%s')\n", dev->name);
if (link->open == 0)
local->num_multi = 0;
@@ -1613,7 +1604,7 @@ static int ray_open(struct net_device *dev)
if (local->card_status == CARD_AWAITING_PARAM) {
int i;
- DEBUG(1, "ray_open: doing init now !\n");
+ dev_dbg(&link->dev, "ray_open: doing init now !\n");
/* Download startup parameters */
if ((i = dl_startup_params(dev)) < 0) {
@@ -1629,7 +1620,7 @@ static int ray_open(struct net_device *dev)
else
netif_start_queue(dev);
- DEBUG(2, "ray_open ending\n");
+ dev_dbg(&link->dev, "ray_open ending\n");
return 0;
} /* end ray_open */
@@ -1640,7 +1631,7 @@ static int ray_dev_close(struct net_device *dev)
struct pcmcia_device *link;
link = local->finder;
- DEBUG(1, "ray_dev_close('%s')\n", dev->name);
+ dev_dbg(&link->dev, "ray_dev_close('%s')\n", dev->name);
link->open--;
netif_stop_queue(dev);
@@ -1656,7 +1647,7 @@ static int ray_dev_close(struct net_device *dev)
/*===========================================================================*/
static void ray_reset(struct net_device *dev)
{
- DEBUG(1, "ray_reset entered\n");
+ pr_debug("ray_reset entered\n");
return;
}
@@ -1669,17 +1660,17 @@ static int interrupt_ecf(ray_dev_t *local, int ccs)
struct pcmcia_device *link = local->finder;
if (!(pcmcia_dev_present(link))) {
- DEBUG(2, "ray_cs interrupt_ecf - device not present\n");
+ dev_dbg(&link->dev, "ray_cs interrupt_ecf - device not present\n");
return -1;
}
- DEBUG(2, "interrupt_ecf(local=%p, ccs = 0x%x\n", local, ccs);
+ dev_dbg(&link->dev, "interrupt_ecf(local=%p, ccs = 0x%x\n", local, ccs);
while (i &&
(readb(local->amem + CIS_OFFSET + ECF_INTR_OFFSET) &
ECF_INTR_SET))
i--;
if (i == 0) {
- DEBUG(2, "ray_cs interrupt_ecf card not ready for interrupt\n");
+ dev_dbg(&link->dev, "ray_cs interrupt_ecf card not ready for interrupt\n");
return -1;
}
/* Fill the mailbox, then kick the card */
@@ -1698,12 +1689,12 @@ static int get_free_tx_ccs(ray_dev_t *local)
struct pcmcia_device *link = local->finder;
if (!(pcmcia_dev_present(link))) {
- DEBUG(2, "ray_cs get_free_tx_ccs - device not present\n");
+ dev_dbg(&link->dev, "ray_cs get_free_tx_ccs - device not present\n");
return ECARDGONE;
}
if (test_and_set_bit(0, &local->tx_ccs_lock)) {
- DEBUG(1, "ray_cs tx_ccs_lock busy\n");
+ dev_dbg(&link->dev, "ray_cs tx_ccs_lock busy\n");
return ECCSBUSY;
}
@@ -1716,7 +1707,7 @@ static int get_free_tx_ccs(ray_dev_t *local)
}
}
local->tx_ccs_lock = 0;
- DEBUG(2, "ray_cs ERROR no free tx CCS for raylink card\n");
+ dev_dbg(&link->dev, "ray_cs ERROR no free tx CCS for raylink card\n");
return ECCSFULL;
} /* get_free_tx_ccs */
@@ -1730,11 +1721,11 @@ static int get_free_ccs(ray_dev_t *local)
struct pcmcia_device *link = local->finder;
if (!(pcmcia_dev_present(link))) {
- DEBUG(2, "ray_cs get_free_ccs - device not present\n");
+ dev_dbg(&link->dev, "ray_cs get_free_ccs - device not present\n");
return ECARDGONE;
}
if (test_and_set_bit(0, &local->ccs_lock)) {
- DEBUG(1, "ray_cs ccs_lock busy\n");
+ dev_dbg(&link->dev, "ray_cs ccs_lock busy\n");
return ECCSBUSY;
}
@@ -1747,7 +1738,7 @@ static int get_free_ccs(ray_dev_t *local)
}
}
local->ccs_lock = 0;
- DEBUG(1, "ray_cs ERROR no free CCS for raylink card\n");
+ dev_dbg(&link->dev, "ray_cs ERROR no free CCS for raylink card\n");
return ECCSFULL;
} /* get_free_ccs */
@@ -1823,7 +1814,7 @@ static struct net_device_stats *ray_get_stats(struct net_device *dev)
struct pcmcia_device *link = local->finder;
struct status __iomem *p = local->sram + STATUS_BASE;
if (!(pcmcia_dev_present(link))) {
- DEBUG(2, "ray_cs net_device_stats - device not present\n");
+ dev_dbg(&link->dev, "ray_cs net_device_stats - device not present\n");
return &local->stats;
}
if (readb(&p->mrx_overflow_for_host)) {
@@ -1856,12 +1847,12 @@ static void ray_update_parm(struct net_device *dev, UCHAR objid, UCHAR *value,
struct ccs __iomem *pccs;
if (!(pcmcia_dev_present(link))) {
- DEBUG(2, "ray_update_parm - device not present\n");
+ dev_dbg(&link->dev, "ray_update_parm - device not present\n");
return;
}
if ((ccsindex = get_free_ccs(local)) < 0) {
- DEBUG(0, "ray_update_parm - No free ccs\n");
+ dev_dbg(&link->dev, "ray_update_parm - No free ccs\n");
return;
}
pccs = ccs_base(local) + ccsindex;
@@ -1874,7 +1865,7 @@ static void ray_update_parm(struct net_device *dev, UCHAR objid, UCHAR *value,
}
/* Interrupt the firmware to process the command */
if (interrupt_ecf(local, ccsindex)) {
- DEBUG(0, "ray_cs associate failed - ECF not ready for intr\n");
+ dev_dbg(&link->dev, "ray_cs associate failed - ECF not ready for intr\n");
writeb(CCS_BUFFER_FREE, &(pccs++)->buffer_status);
}
}
@@ -1891,12 +1882,12 @@ static void ray_update_multi_list(struct net_device *dev, int all)
void __iomem *p = local->sram + HOST_TO_ECF_BASE;
if (!(pcmcia_dev_present(link))) {
- DEBUG(2, "ray_update_multi_list - device not present\n");
+ dev_dbg(&link->dev, "ray_update_multi_list - device not present\n");
return;
} else
- DEBUG(2, "ray_update_multi_list(%p)\n", dev);
+ dev_dbg(&link->dev, "ray_update_multi_list(%p)\n", dev);
if ((ccsindex = get_free_ccs(local)) < 0) {
- DEBUG(1, "ray_update_multi - No free ccs\n");
+ dev_dbg(&link->dev, "ray_update_multi - No free ccs\n");
return;
}
pccs = ccs_base(local) + ccsindex;
@@ -1910,7 +1901,7 @@ static void ray_update_multi_list(struct net_device *dev, int all)
for (dmip = &dev->mc_list; (dmi = *dmip) != NULL;
dmip = &dmi->next) {
memcpy_toio(p, dmi->dmi_addr, ETH_ALEN);
- DEBUG(1,
+ dev_dbg(&link->dev,
"ray_update_multi add addr %02x%02x%02x%02x%02x%02x\n",
dmi->dmi_addr[0], dmi->dmi_addr[1],
dmi->dmi_addr[2], dmi->dmi_addr[3],
@@ -1921,12 +1912,12 @@ static void ray_update_multi_list(struct net_device *dev, int all)
if (i > 256 / ADDRLEN)
i = 256 / ADDRLEN;
writeb((UCHAR) i, &pccs->var);
- DEBUG(1, "ray_cs update_multi %d addresses in list\n", i);
+ dev_dbg(&link->dev, "ray_cs update_multi %d addresses in list\n", i);
/* Interrupt the firmware to process the command */
local->num_multi = i;
}
if (interrupt_ecf(local, ccsindex)) {
- DEBUG(1,
+ dev_dbg(&link->dev,
"ray_cs update_multi failed - ECF not ready for intr\n");
writeb(CCS_BUFFER_FREE, &(pccs++)->buffer_status);
}
@@ -1938,11 +1929,11 @@ static void set_multicast_list(struct net_device *dev)
ray_dev_t *local = netdev_priv(dev);
UCHAR promisc;
- DEBUG(2, "ray_cs set_multicast_list(%p)\n", dev);
+ pr_debug("ray_cs set_multicast_list(%p)\n", dev);
if (dev->flags & IFF_PROMISC) {
if (local->sparm.b5.a_promiscuous_mode == 0) {
- DEBUG(1, "ray_cs set_multicast_list promisc on\n");
+ pr_debug("ray_cs set_multicast_list promisc on\n");
local->sparm.b5.a_promiscuous_mode = 1;
promisc = 1;
ray_update_parm(dev, OBJID_promiscuous_mode,
@@ -1950,7 +1941,7 @@ static void set_multicast_list(struct net_device *dev)
}
} else {
if (local->sparm.b5.a_promiscuous_mode == 1) {
- DEBUG(1, "ray_cs set_multicast_list promisc off\n");
+ pr_debug("ray_cs set_multicast_list promisc off\n");
local->sparm.b5.a_promiscuous_mode = 0;
promisc = 0;
ray_update_parm(dev, OBJID_promiscuous_mode,
@@ -1984,19 +1975,19 @@ static irqreturn_t ray_interrupt(int irq, void *dev_id)
if (dev == NULL) /* Note that we want interrupts with dev->start == 0 */
return IRQ_NONE;
- DEBUG(4, "ray_cs: interrupt for *dev=%p\n", dev);
+ pr_debug("ray_cs: interrupt for *dev=%p\n", dev);
local = netdev_priv(dev);
link = (struct pcmcia_device *)local->finder;
if (!pcmcia_dev_present(link)) {
- DEBUG(2,
- "ray_cs interrupt from device not present or suspended.\n");
+ pr_debug(
+ "ray_cs interrupt from device not present or suspended.\n");
return IRQ_NONE;
}
rcsindex = readb(&((struct scb __iomem *)(local->sram))->rcs_index);
if (rcsindex >= (NUMBER_OF_CCS + NUMBER_OF_RCS)) {
- DEBUG(1, "ray_cs interrupt bad rcsindex = 0x%x\n", rcsindex);
+ dev_dbg(&link->dev, "ray_cs interrupt bad rcsindex = 0x%x\n", rcsindex);
clear_interrupt(local);
return IRQ_HANDLED;
}
@@ -2008,33 +1999,33 @@ static irqreturn_t ray_interrupt(int irq, void *dev_id)
case CCS_DOWNLOAD_STARTUP_PARAMS: /* Happens in firmware someday */
del_timer(&local->timer);
if (status == CCS_COMMAND_COMPLETE) {
- DEBUG(1,
+ dev_dbg(&link->dev,
"ray_cs interrupt download_startup_parameters OK\n");
} else {
- DEBUG(1,
+ dev_dbg(&link->dev,
"ray_cs interrupt download_startup_parameters fail\n");
}
break;
case CCS_UPDATE_PARAMS:
- DEBUG(1, "ray_cs interrupt update params done\n");
+ dev_dbg(&link->dev, "ray_cs interrupt update params done\n");
if (status != CCS_COMMAND_COMPLETE) {
tmp =
readb(&pccs->var.update_param.
failure_cause);
- DEBUG(0,
+ dev_dbg(&link->dev,
"ray_cs interrupt update params failed - reason %d\n",
tmp);
}
break;
case CCS_REPORT_PARAMS:
- DEBUG(1, "ray_cs interrupt report params done\n");
+ dev_dbg(&link->dev, "ray_cs interrupt report params done\n");
break;
case CCS_UPDATE_MULTICAST_LIST: /* Note that this CCS isn't returned */
- DEBUG(1,
+ dev_dbg(&link->dev,
"ray_cs interrupt CCS Update Multicast List done\n");
break;
case CCS_UPDATE_POWER_SAVINGS_MODE:
- DEBUG(1,
+ dev_dbg(&link->dev,
"ray_cs interrupt update power save mode done\n");
break;
case CCS_START_NETWORK:
@@ -2043,11 +2034,11 @@ static irqreturn_t ray_interrupt(int irq, void *dev_id)
if (readb
(&pccs->var.start_network.net_initiated) ==
1) {
- DEBUG(0,
+ dev_dbg(&link->dev,
"ray_cs interrupt network \"%s\" started\n",
local->sparm.b4.a_current_ess_id);
} else {
- DEBUG(0,
+ dev_dbg(&link->dev,
"ray_cs interrupt network \"%s\" joined\n",
local->sparm.b4.a_current_ess_id);
}
@@ -2075,12 +2066,12 @@ static irqreturn_t ray_interrupt(int irq, void *dev_id)
local->timer.expires = jiffies + HZ * 5;
local->timer.data = (long)local;
if (status == CCS_START_NETWORK) {
- DEBUG(0,
+ dev_dbg(&link->dev,
"ray_cs interrupt network \"%s\" start failed\n",
local->sparm.b4.a_current_ess_id);
local->timer.function = &start_net;
} else {
- DEBUG(0,
+ dev_dbg(&link->dev,
"ray_cs interrupt network \"%s\" join failed\n",
local->sparm.b4.a_current_ess_id);
local->timer.function = &join_net;
@@ -2091,19 +2082,19 @@ static irqreturn_t ray_interrupt(int irq, void *dev_id)
case CCS_START_ASSOCIATION:
if (status == CCS_COMMAND_COMPLETE) {
local->card_status = CARD_ASSOC_COMPLETE;
- DEBUG(0, "ray_cs association successful\n");
+ dev_dbg(&link->dev, "ray_cs association successful\n");
} else {
- DEBUG(0, "ray_cs association failed,\n");
+ dev_dbg(&link->dev, "ray_cs association failed,\n");
local->card_status = CARD_ASSOC_FAILED;
join_net((u_long) local);
}
break;
case CCS_TX_REQUEST:
if (status == CCS_COMMAND_COMPLETE) {
- DEBUG(3,
+ dev_dbg(&link->dev,
"ray_cs interrupt tx request complete\n");
} else {
- DEBUG(1,
+ dev_dbg(&link->dev,
"ray_cs interrupt tx request failed\n");
}
if (!sniffer)
@@ -2111,21 +2102,21 @@ static irqreturn_t ray_interrupt(int irq, void *dev_id)
netif_wake_queue(dev);
break;
case CCS_TEST_MEMORY:
- DEBUG(1, "ray_cs interrupt mem test done\n");
+ dev_dbg(&link->dev, "ray_cs interrupt mem test done\n");
break;
case CCS_SHUTDOWN:
- DEBUG(1,
+ dev_dbg(&link->dev,
"ray_cs interrupt Unexpected CCS returned - Shutdown\n");
break;
case CCS_DUMP_MEMORY:
- DEBUG(1, "ray_cs interrupt dump memory done\n");
+ dev_dbg(&link->dev, "ray_cs interrupt dump memory done\n");
break;
case CCS_START_TIMER:
- DEBUG(2,
+ dev_dbg(&link->dev,
"ray_cs interrupt DING - raylink timer expired\n");
break;
default:
- DEBUG(1,
+ dev_dbg(&link->dev,
"ray_cs interrupt Unexpected CCS 0x%x returned 0x%x\n",
rcsindex, cmd);
}
@@ -2139,7 +2130,7 @@ static irqreturn_t ray_interrupt(int irq, void *dev_id)
ray_rx(dev, local, prcs);
break;
case REJOIN_NET_COMPLETE:
- DEBUG(1, "ray_cs interrupt rejoin net complete\n");
+ dev_dbg(&link->dev, "ray_cs interrupt rejoin net complete\n");
local->card_status = CARD_ACQ_COMPLETE;
/* do we need to clear tx buffers CCS's? */
if (local->sparm.b4.a_network_type == ADHOC) {
@@ -2149,7 +2140,7 @@ static irqreturn_t ray_interrupt(int irq, void *dev_id)
memcpy_fromio(&local->bss_id,
prcs->var.rejoin_net_complete.
bssid, ADDRLEN);
- DEBUG(1,
+ dev_dbg(&link->dev,
"ray_cs new BSSID = %02x%02x%02x%02x%02x%02x\n",
local->bss_id[0], local->bss_id[1],
local->bss_id[2], local->bss_id[3],
@@ -2159,15 +2150,15 @@ static irqreturn_t ray_interrupt(int irq, void *dev_id)
}
break;
case ROAMING_INITIATED:
- DEBUG(1, "ray_cs interrupt roaming initiated\n");
+ dev_dbg(&link->dev, "ray_cs interrupt roaming initiated\n");
netif_stop_queue(dev);
local->card_status = CARD_DOING_ACQ;
break;
case JAPAN_CALL_SIGN_RXD:
- DEBUG(1, "ray_cs interrupt japan call sign rx\n");
+ dev_dbg(&link->dev, "ray_cs interrupt japan call sign rx\n");
break;
default:
- DEBUG(1,
+ dev_dbg(&link->dev,
"ray_cs Unexpected interrupt for RCS 0x%x cmd = 0x%x\n",
rcsindex,
(unsigned int)readb(&prcs->interrupt_id));
@@ -2186,7 +2177,7 @@ static void ray_rx(struct net_device *dev, ray_dev_t *local,
int rx_len;
unsigned int pkt_addr;
void __iomem *pmsg;
- DEBUG(4, "ray_rx process rx packet\n");
+ pr_debug("ray_rx process rx packet\n");
/* Calculate address of packet within Rx buffer */
pkt_addr = ((readb(&prcs->var.rx_packet.rx_data_ptr[0]) << 8)
@@ -2199,28 +2190,28 @@ static void ray_rx(struct net_device *dev, ray_dev_t *local,
pmsg = local->rmem + pkt_addr;
switch (readb(pmsg)) {
case DATA_TYPE:
- DEBUG(4, "ray_rx data type\n");
+ pr_debug("ray_rx data type\n");
rx_data(dev, prcs, pkt_addr, rx_len);
break;
case AUTHENTIC_TYPE:
- DEBUG(4, "ray_rx authentic type\n");
+ pr_debug("ray_rx authentic type\n");
if (sniffer)
rx_data(dev, prcs, pkt_addr, rx_len);
else
rx_authenticate(local, prcs, pkt_addr, rx_len);
break;
case DEAUTHENTIC_TYPE:
- DEBUG(4, "ray_rx deauth type\n");
+ pr_debug("ray_rx deauth type\n");
if (sniffer)
rx_data(dev, prcs, pkt_addr, rx_len);
else
rx_deauthenticate(local, prcs, pkt_addr, rx_len);
break;
case NULL_MSG_TYPE:
- DEBUG(3, "ray_cs rx NULL msg\n");
+ pr_debug("ray_cs rx NULL msg\n");
break;
case BEACON_TYPE:
- DEBUG(4, "ray_rx beacon type\n");
+ pr_debug("ray_rx beacon type\n");
if (sniffer)
rx_data(dev, prcs, pkt_addr, rx_len);
@@ -2233,7 +2224,7 @@ static void ray_rx(struct net_device *dev, ray_dev_t *local,
ray_get_stats(dev);
break;
default:
- DEBUG(0, "ray_cs unknown pkt type %2x\n",
+ pr_debug("ray_cs unknown pkt type %2x\n",
(unsigned int)readb(pmsg));
break;
}
@@ -2262,7 +2253,7 @@ static void rx_data(struct net_device *dev, struct rcs __iomem *prcs,
rx_len >
(dev->mtu + RX_MAC_HEADER_LENGTH + ETH_HLEN +
FCS_LEN)) {
- DEBUG(0,
+ pr_debug(
"ray_cs invalid packet length %d received \n",
rx_len);
return;
@@ -2273,17 +2264,17 @@ static void rx_data(struct net_device *dev, struct rcs __iomem *prcs,
rx_len >
(dev->mtu + RX_MAC_HEADER_LENGTH + ETH_HLEN +
FCS_LEN)) {
- DEBUG(0,
+ pr_debug(
"ray_cs invalid packet length %d received \n",
rx_len);
return;
}
}
}
- DEBUG(4, "ray_cs rx_data packet\n");
+ pr_debug("ray_cs rx_data packet\n");
/* If fragmented packet, verify sizes of fragments add up */
if (readb(&prcs->var.rx_packet.next_frag_rcs_index) != 0xFF) {
- DEBUG(1, "ray_cs rx'ed fragment\n");
+ pr_debug("ray_cs rx'ed fragment\n");
tmp = (readb(&prcs->var.rx_packet.totalpacketlength[0]) << 8)
+ readb(&prcs->var.rx_packet.totalpacketlength[1]);
total_len = tmp;
@@ -2301,7 +2292,7 @@ static void rx_data(struct net_device *dev, struct rcs __iomem *prcs,
} while (1);
if (tmp < 0) {
- DEBUG(0,
+ pr_debug(
"ray_cs rx_data fragment lengths don't add up\n");
local->stats.rx_dropped++;
release_frag_chain(local, prcs);
@@ -2313,7 +2304,7 @@ static void rx_data(struct net_device *dev, struct rcs __iomem *prcs,
skb = dev_alloc_skb(total_len + 5);
if (skb == NULL) {
- DEBUG(0, "ray_cs rx_data could not allocate skb\n");
+ pr_debug("ray_cs rx_data could not allocate skb\n");
local->stats.rx_dropped++;
if (readb(&prcs->var.rx_packet.next_frag_rcs_index) != 0xFF)
release_frag_chain(local, prcs);
@@ -2321,7 +2312,7 @@ static void rx_data(struct net_device *dev, struct rcs __iomem *prcs,
}
skb_reserve(skb, 2); /* Align IP on 16 byte (TBD check this) */
- DEBUG(4, "ray_cs rx_data total_len = %x, rx_len = %x\n", total_len,
+ pr_debug("ray_cs rx_data total_len = %x, rx_len = %x\n", total_len,
rx_len);
/************************/
@@ -2354,7 +2345,7 @@ static void rx_data(struct net_device *dev, struct rcs __iomem *prcs,
tmp = 17;
if (readb(&prcs->var.rx_packet.next_frag_rcs_index) != 0xFF) {
prcslink = prcs;
- DEBUG(1, "ray_cs rx_data in fragment loop\n");
+ pr_debug("ray_cs rx_data in fragment loop\n");
do {
prcslink = rcs_base(local)
+
@@ -2426,8 +2417,8 @@ static void untranslate(ray_dev_t *local, struct sk_buff *skb, int len)
memcpy(destaddr, ieee80211_get_DA(pmac), ADDRLEN);
memcpy(srcaddr, ieee80211_get_SA(pmac), ADDRLEN);
-#ifdef PCMCIA_DEBUG
- if (pc_debug > 3) {
+#if 0
+ if {
print_hex_dump(KERN_DEBUG, "skb->data before untranslate: ",
DUMP_PREFIX_NONE, 16, 1,
skb->data, 64, true);
@@ -2441,7 +2432,7 @@ static void untranslate(ray_dev_t *local, struct sk_buff *skb, int len)
if (psnap->dsap != 0xaa || psnap->ssap != 0xaa || psnap->ctrl != 3) {
/* not a snap type so leave it alone */
- DEBUG(3, "ray_cs untranslate NOT SNAP %02x %02x %02x\n",
+ pr_debug("ray_cs untranslate NOT SNAP %02x %02x %02x\n",
psnap->dsap, psnap->ssap, psnap->ctrl);
delta = RX_MAC_HEADER_LENGTH - ETH_HLEN;
@@ -2450,7 +2441,7 @@ static void untranslate(ray_dev_t *local, struct sk_buff *skb, int len)
} else { /* Its a SNAP */
if (memcmp(psnap->org, org_bridge, 3) == 0) {
/* EtherII and nuke the LLC */
- DEBUG(3, "ray_cs untranslate Bridge encap\n");
+ pr_debug("ray_cs untranslate Bridge encap\n");
delta = RX_MAC_HEADER_LENGTH
+ sizeof(struct snaphdr_t) - ETH_HLEN;
peth = (struct ethhdr *)(skb->data + delta);
@@ -2459,14 +2450,14 @@ static void untranslate(ray_dev_t *local, struct sk_buff *skb, int len)
switch (ntohs(type)) {
case ETH_P_IPX:
case ETH_P_AARP:
- DEBUG(3, "ray_cs untranslate RFC IPX/AARP\n");
+ pr_debug("ray_cs untranslate RFC IPX/AARP\n");
delta = RX_MAC_HEADER_LENGTH - ETH_HLEN;
peth = (struct ethhdr *)(skb->data + delta);
peth->h_proto =
htons(len - RX_MAC_HEADER_LENGTH);
break;
default:
- DEBUG(3, "ray_cs untranslate RFC default\n");
+ pr_debug("ray_cs untranslate RFC default\n");
delta = RX_MAC_HEADER_LENGTH +
sizeof(struct snaphdr_t) - ETH_HLEN;
peth = (struct ethhdr *)(skb->data + delta);
@@ -2482,12 +2473,12 @@ static void untranslate(ray_dev_t *local, struct sk_buff *skb, int len)
}
/* TBD reserve skb_reserve(skb, delta); */
skb_pull(skb, delta);
- DEBUG(3, "untranslate after skb_pull(%d), skb->data = %p\n", delta,
+ pr_debug("untranslate after skb_pull(%d), skb->data = %p\n", delta,
skb->data);
memcpy(peth->h_dest, destaddr, ADDRLEN);
memcpy(peth->h_source, srcaddr, ADDRLEN);
-#ifdef PCMCIA_DEBUG
- if (pc_debug > 3) {
+#if 0
+ {
int i;
printk(KERN_DEBUG "skb->data after untranslate:");
for (i = 0; i < 64; i++)
@@ -2529,7 +2520,7 @@ static void release_frag_chain(ray_dev_t *local, struct rcs __iomem *prcs)
while (tmp--) {
writeb(CCS_BUFFER_FREE, &prcslink->buffer_status);
if (rcsindex >= (NUMBER_OF_CCS + NUMBER_OF_RCS)) {
- DEBUG(1, "ray_cs interrupt bad rcsindex = 0x%x\n",
+ pr_debug("ray_cs interrupt bad rcsindex = 0x%x\n",
rcsindex);
break;
}
@@ -2543,9 +2534,9 @@ static void release_frag_chain(ray_dev_t *local, struct rcs __iomem *prcs)
static void authenticate(ray_dev_t *local)
{
struct pcmcia_device *link = local->finder;
- DEBUG(0, "ray_cs Starting authentication.\n");
+ dev_dbg(&link->dev, "ray_cs Starting authentication.\n");
if (!(pcmcia_dev_present(link))) {
- DEBUG(2, "ray_cs authenticate - device not present\n");
+ dev_dbg(&link->dev, "ray_cs authenticate - device not present\n");
return;
}
@@ -2573,11 +2564,11 @@ static void rx_authenticate(ray_dev_t *local, struct rcs __iomem *prcs,
copy_from_rx_buff(local, buff, pkt_addr, rx_len & 0xff);
/* if we are trying to get authenticated */
if (local->sparm.b4.a_network_type == ADHOC) {
- DEBUG(1, "ray_cs rx_auth var= %02x %02x %02x %02x %02x %02x\n",
+ pr_debug("ray_cs rx_auth var= %02x %02x %02x %02x %02x %02x\n",
msg->var[0], msg->var[1], msg->var[2], msg->var[3],
msg->var[4], msg->var[5]);
if (msg->var[2] == 1) {
- DEBUG(0, "ray_cs Sending authentication response.\n");
+ pr_debug("ray_cs Sending authentication response.\n");
if (!build_auth_frame
(local, msg->mac.addr_2, OPEN_AUTH_RESPONSE)) {
local->authentication_state = NEED_TO_AUTH;
@@ -2591,13 +2582,13 @@ static void rx_authenticate(ray_dev_t *local, struct rcs __iomem *prcs,
/* Verify authentication sequence #2 and success */
if (msg->var[2] == 2) {
if ((msg->var[3] | msg->var[4]) == 0) {
- DEBUG(1, "Authentication successful\n");
+ pr_debug("Authentication successful\n");
local->card_status = CARD_AUTH_COMPLETE;
associate(local);
local->authentication_state =
AUTHENTICATED;
} else {
- DEBUG(0, "Authentication refused\n");
+ pr_debug("Authentication refused\n");
local->card_status = CARD_AUTH_REFUSED;
join_net((u_long) local);
local->authentication_state =
@@ -2617,22 +2608,22 @@ static void associate(ray_dev_t *local)
struct net_device *dev = link->priv;
int ccsindex;
if (!(pcmcia_dev_present(link))) {
- DEBUG(2, "ray_cs associate - device not present\n");
+ dev_dbg(&link->dev, "ray_cs associate - device not present\n");
return;
}
/* If no tx buffers available, return */
if ((ccsindex = get_free_ccs(local)) < 0) {
/* TBD should never be here but... what if we are? */
- DEBUG(1, "ray_cs associate - No free ccs\n");
+ dev_dbg(&link->dev, "ray_cs associate - No free ccs\n");
return;
}
- DEBUG(1, "ray_cs Starting association with access point\n");
+ dev_dbg(&link->dev, "ray_cs Starting association with access point\n");
pccs = ccs_base(local) + ccsindex;
/* fill in the CCS */
writeb(CCS_START_ASSOCIATION, &pccs->cmd);
/* Interrupt the firmware to process the command */
if (interrupt_ecf(local, ccsindex)) {
- DEBUG(1, "ray_cs associate failed - ECF not ready for intr\n");
+ dev_dbg(&link->dev, "ray_cs associate failed - ECF not ready for intr\n");
writeb(CCS_BUFFER_FREE, &(pccs++)->buffer_status);
del_timer(&local->timer);
@@ -2655,7 +2646,7 @@ static void rx_deauthenticate(ray_dev_t *local, struct rcs __iomem *prcs,
/* UCHAR buff[256];
struct rx_msg *msg = (struct rx_msg *)buff;
*/
- DEBUG(0, "Deauthentication frame received\n");
+ pr_debug("Deauthentication frame received\n");
local->authentication_state = UNAUTHENTICATED;
/* Need to reauthenticate or rejoin depending on reason code */
/* copy_from_rx_buff(local, buff, pkt_addr, rx_len & 0xff);
@@ -2823,7 +2814,7 @@ static int build_auth_frame(ray_dev_t *local, UCHAR *dest, int auth_type)
/* If no tx buffers available, return */
if ((ccsindex = get_free_tx_ccs(local)) < 0) {
- DEBUG(1, "ray_cs send authenticate - No free tx ccs\n");
+ pr_debug("ray_cs send authenticate - No free tx ccs\n");
return -1;
}
@@ -2855,7 +2846,7 @@ static int build_auth_frame(ray_dev_t *local, UCHAR *dest, int auth_type)
/* Interrupt the firmware to process the command */
if (interrupt_ecf(local, ccsindex)) {
- DEBUG(1,
+ pr_debug(
"ray_cs send authentication request failed - ECF not ready for intr\n");
writeb(CCS_BUFFER_FREE, &(pccs++)->buffer_status);
return -1;
@@ -2942,9 +2933,9 @@ static int __init init_ray_cs(void)
{
int rc;
- DEBUG(1, "%s\n", rcsid);
+ pr_debug("%s\n", rcsid);
rc = pcmcia_register_driver(&ray_driver);
- DEBUG(1, "raylink init_module register_pcmcia_driver returns 0x%x\n",
+ pr_debug("raylink init_module register_pcmcia_driver returns 0x%x\n",
rc);
#ifdef CONFIG_PROC_FS
@@ -2964,7 +2955,7 @@ static int __init init_ray_cs(void)
static void __exit exit_ray_cs(void)
{
- DEBUG(0, "ray_cs: cleanup_module\n");
+ pr_debug("ray_cs: cleanup_module\n");
#ifdef CONFIG_PROC_FS
remove_proc_entry("driver/ray_cs/ray_cs", NULL);
--
1.6.0.4
^ permalink raw reply related
* [PATCH 10/16] pcmcia: use dynamic debug infrastructure, deprecate CS_CHECK (wireless)
From: Dominik Brodowski @ 2009-10-24 19:43 UTC (permalink / raw)
To: linux-pcmcia; +Cc: Dominik Brodowski, linux-wireless, netdev
In-Reply-To: <20091024194219.GA19546@comet.dominikbrodowski.net>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 38802 bytes --]
Convert PCMCIA drivers to use the dynamic debug infrastructure, instead of
requiring manual settings of PCMCIA_DEBUG.
Also, remove all usages of the CS_CHECK macro and replace them with proper
Linux style calling and return value checking. The extra error reporting may
be dropped, as the PCMCIA core already complains about any (non-driver-author)
errors.
CC: linux-wireless@vger.kernel.org
CC: netdev@vger.kernel.org
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
---
drivers/net/wireless/airo_cs.c | 48 +++++----------
drivers/net/wireless/atmel_cs.c | 46 +++++----------
drivers/net/wireless/hostap/hostap_cs.c | 23 +++-----
drivers/net/wireless/netwave_cs.c | 88 +++++++++++----------------
drivers/net/wireless/orinoco/orinoco_cs.c | 27 +++-----
drivers/net/wireless/orinoco/spectrum_cs.c | 54 +++++++++---------
drivers/net/wireless/wavelan_cs.c | 24 --------
drivers/net/wireless/wl3501_cs.c | 67 ++++++++--------------
8 files changed, 136 insertions(+), 241 deletions(-)
diff --git a/drivers/net/wireless/airo_cs.c b/drivers/net/wireless/airo_cs.c
index d0593ed..a1b84fc 100644
--- a/drivers/net/wireless/airo_cs.c
+++ b/drivers/net/wireless/airo_cs.c
@@ -43,21 +43,6 @@
#include "airo.h"
-/*
- All the PCMCIA modules use PCMCIA_DEBUG to control debugging. If
- you do not define PCMCIA_DEBUG at all, all the debug code will be
- left out. If you compile with PCMCIA_DEBUG=0, the debug code will
- be present but disabled -- but it can then be enabled for specific
- modules at load time with a 'pc_debug=#' option to insmod.
-*/
-#ifdef PCMCIA_DEBUG
-static int pc_debug = PCMCIA_DEBUG;
-module_param(pc_debug, int, 0);
-static char *version = "$Revision: 1.2 $";
-#define DEBUG(n, args...) if (pc_debug > (n)) printk(KERN_DEBUG args);
-#else
-#define DEBUG(n, args...)
-#endif
/*====================================================================*/
@@ -145,7 +130,7 @@ static int airo_probe(struct pcmcia_device *p_dev)
{
local_info_t *local;
- DEBUG(0, "airo_attach()\n");
+ dev_dbg(&p_dev->dev, "airo_attach()\n");
/* Interrupt setup */
p_dev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
@@ -184,7 +169,7 @@ static int airo_probe(struct pcmcia_device *p_dev)
static void airo_detach(struct pcmcia_device *link)
{
- DEBUG(0, "airo_detach(0x%p)\n", link);
+ dev_dbg(&link->dev, "airo_detach\n");
airo_release(link);
@@ -204,9 +189,6 @@ static void airo_detach(struct pcmcia_device *link)
======================================================================*/
-#define CS_CHECK(fn, ret) \
-do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0)
-
static int airo_cs_config_check(struct pcmcia_device *p_dev,
cistpl_cftable_entry_t *cfg,
cistpl_cftable_entry_t *dflt,
@@ -291,11 +273,11 @@ static int airo_config(struct pcmcia_device *link)
{
local_info_t *dev;
win_req_t *req;
- int last_fn, last_ret;
+ int ret;
dev = link->priv;
- DEBUG(0, "airo_config(0x%p)\n", link);
+ dev_dbg(&link->dev, "airo_config\n");
req = kzalloc(sizeof(win_req_t), GFP_KERNEL);
if (!req)
@@ -315,8 +297,8 @@ static int airo_config(struct pcmcia_device *link)
* and most client drivers will only use the CIS to fill in
* implementation-defined details.
*/
- last_ret = pcmcia_loop_config(link, airo_cs_config_check, req);
- if (last_ret)
+ ret = pcmcia_loop_config(link, airo_cs_config_check, req);
+ if (ret)
goto failed;
/*
@@ -324,21 +306,25 @@ static int airo_config(struct pcmcia_device *link)
handler to the interrupt, unless the 'Handler' member of the
irq structure is initialized.
*/
- if (link->conf.Attributes & CONF_ENABLE_IRQ)
- CS_CHECK(RequestIRQ, pcmcia_request_irq(link, &link->irq));
+ if (link->conf.Attributes & CONF_ENABLE_IRQ) {
+ ret = pcmcia_request_irq(link, &link->irq);
+ if (ret)
+ goto failed;
+ }
/*
This actually configures the PCMCIA socket -- setting up
the I/O windows and the interrupt mapping, and putting the
card and host interface into "Memory and IO" mode.
*/
- CS_CHECK(RequestConfiguration,
- pcmcia_request_configuration(link, &link->conf));
+ ret = pcmcia_request_configuration(link, &link->conf);
+ if (ret)
+ goto failed;
((local_info_t *)link->priv)->eth_dev =
init_airo_card(link->irq.AssignedIRQ,
link->io.BasePort1, 1, &handle_to_dev(link));
if (!((local_info_t *)link->priv)->eth_dev)
- goto cs_failed;
+ goto failed;
/*
At this point, the dev_node_t structure(s) need to be
@@ -368,8 +354,6 @@ static int airo_config(struct pcmcia_device *link)
kfree(req);
return 0;
- cs_failed:
- cs_error(link, last_fn, last_ret);
failed:
airo_release(link);
kfree(req);
@@ -386,7 +370,7 @@ static int airo_config(struct pcmcia_device *link)
static void airo_release(struct pcmcia_device *link)
{
- DEBUG(0, "airo_release(0x%p)\n", link);
+ dev_dbg(&link->dev, "airo_release\n");
pcmcia_disable_device(link);
}
diff --git a/drivers/net/wireless/atmel_cs.c b/drivers/net/wireless/atmel_cs.c
index ddaa859..7838572 100644
--- a/drivers/net/wireless/atmel_cs.c
+++ b/drivers/net/wireless/atmel_cs.c
@@ -55,22 +55,6 @@
#include "atmel.h"
-/*
- All the PCMCIA modules use PCMCIA_DEBUG to control debugging. If
- you do not define PCMCIA_DEBUG at all, all the debug code will be
- left out. If you compile with PCMCIA_DEBUG=0, the debug code will
- be present but disabled -- but it can then be enabled for specific
- modules at load time with a 'pc_debug=#' option to insmod.
-*/
-
-#ifdef PCMCIA_DEBUG
-static int pc_debug = PCMCIA_DEBUG;
-module_param(pc_debug, int, 0);
-static char *version = "$Revision: 1.2 $";
-#define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args);
-#else
-#define DEBUG(n, args...)
-#endif
/*====================================================================*/
@@ -155,7 +139,7 @@ static int atmel_probe(struct pcmcia_device *p_dev)
{
local_info_t *local;
- DEBUG(0, "atmel_attach()\n");
+ dev_dbg(&p_dev->dev, "atmel_attach()\n");
/* Interrupt setup */
p_dev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
@@ -194,7 +178,7 @@ static int atmel_probe(struct pcmcia_device *p_dev)
static void atmel_detach(struct pcmcia_device *link)
{
- DEBUG(0, "atmel_detach(0x%p)\n", link);
+ dev_dbg(&link->dev, "atmel_detach\n");
atmel_release(link);
@@ -209,9 +193,6 @@ static void atmel_detach(struct pcmcia_device *link)
======================================================================*/
-#define CS_CHECK(fn, ret) \
-do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0)
-
/* Call-back function to interrogate PCMCIA-specific information
about the current existance of the card */
static int card_present(void *arg)
@@ -275,13 +256,13 @@ static int atmel_config_check(struct pcmcia_device *p_dev,
static int atmel_config(struct pcmcia_device *link)
{
local_info_t *dev;
- int last_fn, last_ret;
+ int ret;
struct pcmcia_device_id *did;
dev = link->priv;
did = dev_get_drvdata(&handle_to_dev(link));
- DEBUG(0, "atmel_config(0x%p)\n", link);
+ dev_dbg(&link->dev, "atmel_config\n");
/*
In this loop, we scan the CIS for configuration table entries,
@@ -303,20 +284,25 @@ static int atmel_config(struct pcmcia_device *link)
handler to the interrupt, unless the 'Handler' member of the
irq structure is initialized.
*/
- if (link->conf.Attributes & CONF_ENABLE_IRQ)
- CS_CHECK(RequestIRQ, pcmcia_request_irq(link, &link->irq));
+ if (link->conf.Attributes & CONF_ENABLE_IRQ) {
+ ret = pcmcia_request_irq(link, &link->irq);
+ if (ret)
+ goto failed;
+ }
/*
This actually configures the PCMCIA socket -- setting up
the I/O windows and the interrupt mapping, and putting the
card and host interface into "Memory and IO" mode.
*/
- CS_CHECK(RequestConfiguration, pcmcia_request_configuration(link, &link->conf));
+ ret = pcmcia_request_configuration(link, &link->conf);
+ if (ret)
+ goto failed;
if (link->irq.AssignedIRQ == 0) {
printk(KERN_ALERT
"atmel: cannot assign IRQ: check that CONFIG_ISA is set in kernel config.");
- goto cs_failed;
+ goto failed;
}
((local_info_t*)link->priv)->eth_dev =
@@ -327,7 +313,7 @@ static int atmel_config(struct pcmcia_device *link)
card_present,
link);
if (!((local_info_t*)link->priv)->eth_dev)
- goto cs_failed;
+ goto failed;
/*
@@ -340,8 +326,6 @@ static int atmel_config(struct pcmcia_device *link)
return 0;
- cs_failed:
- cs_error(link, last_fn, last_ret);
failed:
atmel_release(link);
return -ENODEV;
@@ -359,7 +343,7 @@ static void atmel_release(struct pcmcia_device *link)
{
struct net_device *dev = ((local_info_t*)link->priv)->eth_dev;
- DEBUG(0, "atmel_release(0x%p)\n", link);
+ dev_dbg(&link->dev, "atmel_release\n");
if (dev)
stop_atmel_card(dev);
diff --git a/drivers/net/wireless/hostap/hostap_cs.c b/drivers/net/wireless/hostap/hostap_cs.c
index 31b60dd..ca3ab84 100644
--- a/drivers/net/wireless/hostap/hostap_cs.c
+++ b/drivers/net/wireless/hostap/hostap_cs.c
@@ -510,10 +510,6 @@ static void prism2_detach(struct pcmcia_device *link)
}
-#define CS_CHECK(fn, ret) \
-do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0)
-
-
/* run after a CARD_INSERTION event is received to configure the PCMCIA
* socket and make the device available to the system */
@@ -605,7 +601,6 @@ static int prism2_config(struct pcmcia_device *link)
struct hostap_interface *iface;
local_info_t *local;
int ret = 1;
- int last_fn, last_ret;
struct hostap_cs_priv *hw_priv;
PDEBUG(DEBUG_FLOW, "prism2_config()\n");
@@ -617,13 +612,12 @@ static int prism2_config(struct pcmcia_device *link)
}
/* Look for an appropriate configuration table entry in the CIS */
- last_ret = pcmcia_loop_config(link, prism2_config_check, NULL);
- if (last_ret) {
+ ret = pcmcia_loop_config(link, prism2_config_check, NULL);
+ if (ret) {
if (!ignore_cis_vcc)
printk(KERN_ERR "GetNextTuple(): No matching "
"CIS configuration. Maybe you need the "
"ignore_cis_vcc=1 parameter.\n");
- cs_error(link, RequestIO, last_ret);
goto failed;
}
@@ -652,8 +646,9 @@ static int prism2_config(struct pcmcia_device *link)
link->irq.IRQInfo1 = IRQ_LEVEL_ID;
link->irq.Handler = prism2_interrupt;
link->irq.Instance = dev;
- CS_CHECK(RequestIRQ,
- pcmcia_request_irq(link, &link->irq));
+ ret = pcmcia_request_irq(link, &link->irq);
+ if (ret)
+ goto failed;
}
/*
@@ -661,8 +656,9 @@ static int prism2_config(struct pcmcia_device *link)
* the I/O windows and the interrupt mapping, and putting the
* card and host interface into "Memory and IO" mode.
*/
- CS_CHECK(RequestConfiguration,
- pcmcia_request_configuration(link, &link->conf));
+ ret = pcmcia_request_configuration(link, &link->conf);
+ if (ret)
+ goto failed;
dev->irq = link->irq.AssignedIRQ;
dev->base_addr = link->io.BasePort1;
@@ -695,9 +691,6 @@ static int prism2_config(struct pcmcia_device *link)
}
return ret;
- cs_failed:
- cs_error(link, last_fn, last_ret);
-
failed:
kfree(hw_priv);
prism2_release((u_long)link);
diff --git a/drivers/net/wireless/netwave_cs.c b/drivers/net/wireless/netwave_cs.c
index 9498b46..cbd85de 100644
--- a/drivers/net/wireless/netwave_cs.c
+++ b/drivers/net/wireless/netwave_cs.c
@@ -145,23 +145,6 @@ static const unsigned int txConfEUD = 0x10; /* Enable Uni-Data packets */
static const unsigned int txConfKey = 0x02; /* Scramble data packets */
static const unsigned int txConfLoop = 0x01; /* Loopback mode */
-/*
- All the PCMCIA modules use PCMCIA_DEBUG to control debugging. If
- you do not define PCMCIA_DEBUG at all, all the debug code will be
- left out. If you compile with PCMCIA_DEBUG=0, the debug code will
- be present but disabled -- but it can then be enabled for specific
- modules at load time with a 'pc_debug=#' option to insmod.
-*/
-
-#ifdef PCMCIA_DEBUG
-static int pc_debug = PCMCIA_DEBUG;
-module_param(pc_debug, int, 0);
-#define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args)
-static char *version =
-"netwave_cs.c 0.3.0 Thu Jul 17 14:36:02 1997 (John Markus Bjørndalen)\n";
-#else
-#define DEBUG(n, args...)
-#endif
/*====================================================================*/
@@ -383,7 +366,7 @@ static int netwave_probe(struct pcmcia_device *link)
struct net_device *dev;
netwave_private *priv;
- DEBUG(0, "netwave_attach()\n");
+ dev_dbg(&link->dev, "netwave_attach()\n");
/* Initialize the struct pcmcia_device structure */
dev = alloc_etherdev(sizeof(netwave_private));
@@ -438,7 +421,7 @@ static void netwave_detach(struct pcmcia_device *link)
{
struct net_device *dev = link->priv;
- DEBUG(0, "netwave_detach(0x%p)\n", link);
+ dev_dbg(&link->dev, "netwave_detach\n");
netwave_release(link);
@@ -725,18 +708,15 @@ static const struct iw_handler_def netwave_handler_def =
*
*/
-#define CS_CHECK(fn, ret) \
-do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0)
-
static int netwave_pcmcia_config(struct pcmcia_device *link) {
struct net_device *dev = link->priv;
netwave_private *priv = netdev_priv(dev);
- int i, j, last_ret, last_fn;
+ int i, j, ret;
win_req_t req;
memreq_t mem;
u_char __iomem *ramBase = NULL;
- DEBUG(0, "netwave_pcmcia_config(0x%p)\n", link);
+ dev_dbg(&link->dev, "netwave_pcmcia_config\n");
/*
* Try allocating IO ports. This tries a few fixed addresses.
@@ -749,22 +729,24 @@ static int netwave_pcmcia_config(struct pcmcia_device *link) {
if (i == 0)
break;
}
- if (i != 0) {
- cs_error(link, RequestIO, i);
+ if (i != 0)
goto failed;
- }
/*
* Now allocate an interrupt line. Note that this does not
* actually assign a handler to the interrupt.
*/
- CS_CHECK(RequestIRQ, pcmcia_request_irq(link, &link->irq));
+ ret = pcmcia_request_irq(link, &link->irq);
+ if (ret)
+ goto failed;
/*
* This actually configures the PCMCIA socket -- setting up
* the I/O windows and the interrupt mapping.
*/
- CS_CHECK(RequestConfiguration, pcmcia_request_configuration(link, &link->conf));
+ ret = pcmcia_request_configuration(link, &link->conf);
+ if (ret)
+ goto failed;
/*
* Allocate a 32K memory window. Note that the struct pcmcia_device
@@ -772,14 +754,18 @@ static int netwave_pcmcia_config(struct pcmcia_device *link) {
* device needs several windows, you'll need to keep track of
* the handles in your private data structure, dev->priv.
*/
- DEBUG(1, "Setting mem speed of %d\n", mem_speed);
+ dev_dbg(&link->dev, "Setting mem speed of %d\n", mem_speed);
req.Attributes = WIN_DATA_WIDTH_8|WIN_MEMORY_TYPE_CM|WIN_ENABLE;
req.Base = 0; req.Size = 0x8000;
req.AccessSpeed = mem_speed;
- CS_CHECK(RequestWindow, pcmcia_request_window(&link, &req, &link->win));
+ ret = pcmcia_request_window(&link, &req, &link->win);
+ if (ret)
+ goto failed;
mem.CardOffset = 0x20000; mem.Page = 0;
- CS_CHECK(MapMemPage, pcmcia_map_mem_page(link->win, &mem));
+ ret = pcmcia_map_mem_page(link->win, &mem);
+ if (ret)
+ goto failed;
/* Store base address of the common window frame */
ramBase = ioremap(req.Base, 0x8000);
@@ -818,8 +804,6 @@ static int netwave_pcmcia_config(struct pcmcia_device *link) {
get_uint16(ramBase + NETWAVE_EREG_ARW+2));
return 0;
-cs_failed:
- cs_error(link, last_fn, last_ret);
failed:
netwave_release(link);
return -ENODEV;
@@ -837,7 +821,7 @@ static void netwave_release(struct pcmcia_device *link)
struct net_device *dev = link->priv;
netwave_private *priv = netdev_priv(dev);
- DEBUG(0, "netwave_release(0x%p)\n", link);
+ dev_dbg(&link->dev, "netwave_release\n");
pcmcia_disable_device(link);
if (link->win)
@@ -892,7 +876,7 @@ static void netwave_reset(struct net_device *dev) {
u_char __iomem *ramBase = priv->ramBase;
unsigned int iobase = dev->base_addr;
- DEBUG(0, "netwave_reset: Done with hardware reset\n");
+ pr_debug("netwave_reset: Done with hardware reset\n");
priv->timeoutCounter = 0;
@@ -988,7 +972,7 @@ static int netwave_hw_xmit(unsigned char* data, int len,
dev->stats.tx_bytes += len;
- DEBUG(3, "Transmitting with SPCQ %x SPU %x LIF %x ISPLQ %x\n",
+ pr_debug("Transmitting with SPCQ %x SPU %x LIF %x ISPLQ %x\n",
readb(ramBase + NETWAVE_EREG_SPCQ),
readb(ramBase + NETWAVE_EREG_SPU),
readb(ramBase + NETWAVE_EREG_LIF),
@@ -1000,7 +984,7 @@ static int netwave_hw_xmit(unsigned char* data, int len,
MaxData = get_uint16(ramBase + NETWAVE_EREG_TDP+2);
DataOffset = get_uint16(ramBase + NETWAVE_EREG_TDP+4);
- DEBUG(3, "TxFreeList %x, MaxData %x, DataOffset %x\n",
+ pr_debug("TxFreeList %x, MaxData %x, DataOffset %x\n",
TxFreeList, MaxData, DataOffset);
/* Copy packet to the adapter fragment buffers */
@@ -1088,7 +1072,7 @@ static irqreturn_t netwave_interrupt(int irq, void* dev_id)
status = inb(iobase + NETWAVE_REG_ASR);
if (!pcmcia_dev_present(link)) {
- DEBUG(1, "netwave_interrupt: Interrupt with status 0x%x "
+ pr_debug("netwave_interrupt: Interrupt with status 0x%x "
"from removed or suspended card!\n", status);
break;
}
@@ -1132,7 +1116,7 @@ static irqreturn_t netwave_interrupt(int irq, void* dev_id)
int txStatus;
txStatus = readb(ramBase + NETWAVE_EREG_TSER);
- DEBUG(3, "Transmit done. TSER = %x id %x\n",
+ pr_debug("Transmit done. TSER = %x id %x\n",
txStatus, readb(ramBase + NETWAVE_EREG_TSER + 1));
if (txStatus & 0x20) {
@@ -1156,7 +1140,7 @@ static irqreturn_t netwave_interrupt(int irq, void* dev_id)
* TxGU and TxNOAP is set. (Those are the only ones
* to set TxErr).
*/
- DEBUG(3, "netwave_interrupt: TxDN with error status %x\n",
+ pr_debug("netwave_interrupt: TxDN with error status %x\n",
txStatus);
/* Clear out TxGU, TxNOAP, TxErr and TxTrys */
@@ -1164,7 +1148,7 @@ static irqreturn_t netwave_interrupt(int irq, void* dev_id)
writeb(0xdf & txStatus, ramBase+NETWAVE_EREG_TSER+4);
++dev->stats.tx_errors;
}
- DEBUG(3, "New status is TSER %x ASR %x\n",
+ pr_debug("New status is TSER %x ASR %x\n",
readb(ramBase + NETWAVE_EREG_TSER),
inb(iobase + NETWAVE_REG_ASR));
@@ -1172,7 +1156,7 @@ static irqreturn_t netwave_interrupt(int irq, void* dev_id)
}
/* TxBA, this would trigger on all error packets received */
/* if (status & 0x01) {
- DEBUG(4, "Transmit buffers available, %x\n", status);
+ pr_debug("Transmit buffers available, %x\n", status);
}
*/
}
@@ -1190,7 +1174,7 @@ static irqreturn_t netwave_interrupt(int irq, void* dev_id)
*/
static void netwave_watchdog(struct net_device *dev) {
- DEBUG(1, "%s: netwave_watchdog: watchdog timer expired\n", dev->name);
+ pr_debug("%s: netwave_watchdog: watchdog timer expired\n", dev->name);
netwave_reset(dev);
dev->trans_start = jiffies;
netif_wake_queue(dev);
@@ -1211,7 +1195,7 @@ static int netwave_rx(struct net_device *dev)
int i;
u_char *ptr;
- DEBUG(3, "xinw_rx: Receiving ... \n");
+ pr_debug("xinw_rx: Receiving ... \n");
/* Receive max 10 packets for now. */
for (i = 0; i < 10; i++) {
@@ -1237,7 +1221,7 @@ static int netwave_rx(struct net_device *dev)
skb = dev_alloc_skb(rcvLen+5);
if (skb == NULL) {
- DEBUG(1, "netwave_rx: Could not allocate an sk_buff of "
+ pr_debug("netwave_rx: Could not allocate an sk_buff of "
"length %d\n", rcvLen);
++dev->stats.rx_dropped;
/* Tell the adapter to skip the packet */
@@ -1279,7 +1263,7 @@ static int netwave_rx(struct net_device *dev)
wait_WOC(iobase);
writeb(NETWAVE_CMD_SRP, ramBase + NETWAVE_EREG_CB + 0);
writeb(NETWAVE_CMD_EOC, ramBase + NETWAVE_EREG_CB + 1);
- DEBUG(3, "Packet reception ok\n");
+ pr_debug("Packet reception ok\n");
}
return 0;
}
@@ -1288,7 +1272,7 @@ static int netwave_open(struct net_device *dev) {
netwave_private *priv = netdev_priv(dev);
struct pcmcia_device *link = priv->p_dev;
- DEBUG(1, "netwave_open: starting.\n");
+ dev_dbg(&link->dev, "netwave_open: starting.\n");
if (!pcmcia_dev_present(link))
return -ENODEV;
@@ -1305,7 +1289,7 @@ static int netwave_close(struct net_device *dev) {
netwave_private *priv = netdev_priv(dev);
struct pcmcia_device *link = priv->p_dev;
- DEBUG(1, "netwave_close: finishing.\n");
+ dev_dbg(&link->dev, "netwave_close: finishing.\n");
link->open--;
netif_stop_queue(dev);
@@ -1358,11 +1342,11 @@ static void set_multicast_list(struct net_device *dev)
u_char rcvMode = 0;
#ifdef PCMCIA_DEBUG
- if (pc_debug > 2) {
- static int old;
+ {
+ xstatic int old;
if (old != dev->mc_count) {
old = dev->mc_count;
- DEBUG(0, "%s: setting Rx mode to %d addresses.\n",
+ pr_debug("%s: setting Rx mode to %d addresses.\n",
dev->name, dev->mc_count);
}
}
diff --git a/drivers/net/wireless/orinoco/orinoco_cs.c b/drivers/net/wireless/orinoco/orinoco_cs.c
index 38c1c9d..da626ec 100644
--- a/drivers/net/wireless/orinoco/orinoco_cs.c
+++ b/drivers/net/wireless/orinoco/orinoco_cs.c
@@ -160,12 +160,6 @@ static void orinoco_cs_detach(struct pcmcia_device *link)
* device available to the system.
*/
-#define CS_CHECK(fn, ret) do { \
- last_fn = (fn); \
- if ((last_ret = (ret)) != 0) \
- goto cs_failed; \
-} while (0)
-
static int orinoco_cs_config_check(struct pcmcia_device *p_dev,
cistpl_cftable_entry_t *cfg,
cistpl_cftable_entry_t *dflt,
@@ -240,7 +234,7 @@ orinoco_cs_config(struct pcmcia_device *link)
struct orinoco_private *priv = link->priv;
struct orinoco_pccard *card = priv->card;
hermes_t *hw = &priv->hw;
- int last_fn, last_ret;
+ int ret;
void __iomem *mem;
/*
@@ -257,13 +251,12 @@ orinoco_cs_config(struct pcmcia_device *link)
* and most client drivers will only use the CIS to fill in
* implementation-defined details.
*/
- last_ret = pcmcia_loop_config(link, orinoco_cs_config_check, NULL);
- if (last_ret) {
+ ret = pcmcia_loop_config(link, orinoco_cs_config_check, NULL);
+ if (ret) {
if (!ignore_cis_vcc)
printk(KERN_ERR PFX "GetNextTuple(): No matching "
"CIS configuration. Maybe you need the "
"ignore_cis_vcc=1 parameter.\n");
- cs_error(link, RequestIO, last_ret);
goto failed;
}
@@ -272,14 +265,16 @@ orinoco_cs_config(struct pcmcia_device *link)
* a handler to the interrupt, unless the 'Handler' member of
* the irq structure is initialized.
*/
- CS_CHECK(RequestIRQ, pcmcia_request_irq(link, &link->irq));
+ ret = pcmcia_request_irq(link, &link->irq);
+ if (ret)
+ goto failed;
/* We initialize the hermes structure before completing PCMCIA
* configuration just in case the interrupt handler gets
* called. */
mem = ioport_map(link->io.BasePort1, link->io.NumPorts1);
if (!mem)
- goto cs_failed;
+ goto failed;
hermes_struct_init(hw, mem, HERMES_16BIT_REGSPACING);
@@ -288,8 +283,9 @@ orinoco_cs_config(struct pcmcia_device *link)
* the I/O windows and the interrupt mapping, and putting the
* card and host interface into "Memory and IO" mode.
*/
- CS_CHECK(RequestConfiguration,
- pcmcia_request_configuration(link, &link->conf));
+ ret = pcmcia_request_configuration(link, &link->conf);
+ if (ret)
+ goto failed;
/* Ok, we have the configuration, prepare to register the netdev */
card->node.major = card->node.minor = 0;
@@ -315,9 +311,6 @@ orinoco_cs_config(struct pcmcia_device *link)
* net_device has been registered */
return 0;
- cs_failed:
- cs_error(link, last_fn, last_ret);
-
failed:
orinoco_cs_release(link);
return -ENODEV;
diff --git a/drivers/net/wireless/orinoco/spectrum_cs.c b/drivers/net/wireless/orinoco/spectrum_cs.c
index c361310..700010e 100644
--- a/drivers/net/wireless/orinoco/spectrum_cs.c
+++ b/drivers/net/wireless/orinoco/spectrum_cs.c
@@ -73,9 +73,6 @@ static void spectrum_cs_release(struct pcmcia_device *link);
#define HCR_MEM16 0x10 /* memory width bit, should be preserved */
-#define CS_CHECK(fn, ret) \
- do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0)
-
/*
* Reset the card using configuration registers COR and CCSR.
* If IDLE is 1, stop the firmware, so that it can be safely rewritten.
@@ -83,7 +80,7 @@ static void spectrum_cs_release(struct pcmcia_device *link);
static int
spectrum_reset(struct pcmcia_device *link, int idle)
{
- int last_ret, last_fn;
+ int ret;
conf_reg_t reg;
u_int save_cor;
@@ -95,23 +92,26 @@ spectrum_reset(struct pcmcia_device *link, int idle)
reg.Function = 0;
reg.Action = CS_READ;
reg.Offset = CISREG_COR;
- CS_CHECK(AccessConfigurationRegister,
- pcmcia_access_configuration_register(link, ®));
+ ret = pcmcia_access_configuration_register(link, ®);
+ if (ret)
+ goto failed;
save_cor = reg.Value;
/* Soft-Reset card */
reg.Action = CS_WRITE;
reg.Offset = CISREG_COR;
reg.Value = (save_cor | COR_SOFT_RESET);
- CS_CHECK(AccessConfigurationRegister,
- pcmcia_access_configuration_register(link, ®));
+ ret = pcmcia_access_configuration_register(link, ®);
+ if (ret)
+ goto failed;
udelay(1000);
/* Read CCSR */
reg.Action = CS_READ;
reg.Offset = CISREG_CCSR;
- CS_CHECK(AccessConfigurationRegister,
- pcmcia_access_configuration_register(link, ®));
+ ret = pcmcia_access_configuration_register(link, ®);
+ if (ret)
+ goto failed;
/*
* Start or stop the firmware. Memory width bit should be
@@ -120,21 +120,22 @@ spectrum_reset(struct pcmcia_device *link, int idle)
reg.Action = CS_WRITE;
reg.Offset = CISREG_CCSR;
reg.Value = (idle ? HCR_IDLE : HCR_RUN) | (reg.Value & HCR_MEM16);
- CS_CHECK(AccessConfigurationRegister,
- pcmcia_access_configuration_register(link, ®));
+ ret = pcmcia_access_configuration_register(link, ®);
+ if (ret)
+ goto failed;
udelay(1000);
/* Restore original COR configuration index */
reg.Action = CS_WRITE;
reg.Offset = CISREG_COR;
reg.Value = (save_cor & ~COR_SOFT_RESET);
- CS_CHECK(AccessConfigurationRegister,
- pcmcia_access_configuration_register(link, ®));
+ ret = pcmcia_access_configuration_register(link, ®);
+ if (ret)
+ goto failed;
udelay(1000);
return 0;
-cs_failed:
- cs_error(link, last_fn, last_ret);
+failed:
return -ENODEV;
}
@@ -307,7 +308,7 @@ spectrum_cs_config(struct pcmcia_device *link)
struct orinoco_private *priv = link->priv;
struct orinoco_pccard *card = priv->card;
hermes_t *hw = &priv->hw;
- int last_fn, last_ret;
+ int ret;
void __iomem *mem;
/*
@@ -324,13 +325,12 @@ spectrum_cs_config(struct pcmcia_device *link)
* and most client drivers will only use the CIS to fill in
* implementation-defined details.
*/
- last_ret = pcmcia_loop_config(link, spectrum_cs_config_check, NULL);
- if (last_ret) {
+ ret = pcmcia_loop_config(link, spectrum_cs_config_check, NULL);
+ if (ret) {
if (!ignore_cis_vcc)
printk(KERN_ERR PFX "GetNextTuple(): No matching "
"CIS configuration. Maybe you need the "
"ignore_cis_vcc=1 parameter.\n");
- cs_error(link, RequestIO, last_ret);
goto failed;
}
@@ -339,14 +339,16 @@ spectrum_cs_config(struct pcmcia_device *link)
* a handler to the interrupt, unless the 'Handler' member of
* the irq structure is initialized.
*/
- CS_CHECK(RequestIRQ, pcmcia_request_irq(link, &link->irq));
+ ret = pcmcia_request_irq(link, &link->irq);
+ if (ret)
+ goto failed;
/* We initialize the hermes structure before completing PCMCIA
* configuration just in case the interrupt handler gets
* called. */
mem = ioport_map(link->io.BasePort1, link->io.NumPorts1);
if (!mem)
- goto cs_failed;
+ goto failed;
hermes_struct_init(hw, mem, HERMES_16BIT_REGSPACING);
@@ -355,8 +357,9 @@ spectrum_cs_config(struct pcmcia_device *link)
* the I/O windows and the interrupt mapping, and putting the
* card and host interface into "Memory and IO" mode.
*/
- CS_CHECK(RequestConfiguration,
- pcmcia_request_configuration(link, &link->conf));
+ ret = pcmcia_request_configuration(link, &link->conf);
+ if (ret)
+ goto failed;
/* Ok, we have the configuration, prepare to register the netdev */
card->node.major = card->node.minor = 0;
@@ -386,9 +389,6 @@ spectrum_cs_config(struct pcmcia_device *link)
* net_device has been registered */
return 0;
- cs_failed:
- cs_error(link, last_fn, last_ret);
-
failed:
spectrum_cs_release(link);
return -ENODEV;
diff --git a/drivers/net/wireless/wavelan_cs.c b/drivers/net/wireless/wavelan_cs.c
index 431a20e..2fad4ac 100644
--- a/drivers/net/wireless/wavelan_cs.c
+++ b/drivers/net/wireless/wavelan_cs.c
@@ -3656,10 +3656,7 @@ wv_pcmcia_reset(struct net_device * dev)
i = pcmcia_access_configuration_register(link, ®);
if (i != 0)
- {
- cs_error(link, AccessConfigurationRegister, i);
return FALSE;
- }
#ifdef DEBUG_CONFIG_INFO
printk(KERN_DEBUG "%s: wavelan_pcmcia_reset(): Config reg is 0x%x\n",
@@ -3670,19 +3667,13 @@ wv_pcmcia_reset(struct net_device * dev)
reg.Value = reg.Value | COR_SW_RESET;
i = pcmcia_access_configuration_register(link, ®);
if (i != 0)
- {
- cs_error(link, AccessConfigurationRegister, i);
return FALSE;
- }
reg.Action = CS_WRITE;
reg.Value = COR_LEVEL_IRQ | COR_CONFIG;
i = pcmcia_access_configuration_register(link, ®);
if (i != 0)
- {
- cs_error(link, AccessConfigurationRegister, i);
return FALSE;
- }
#ifdef DEBUG_CONFIG_TRACE
printk(KERN_DEBUG "%s: <-wv_pcmcia_reset()\n", dev->name);
@@ -3857,10 +3848,7 @@ wv_pcmcia_config(struct pcmcia_device * link)
{
i = pcmcia_request_io(link, &link->io);
if (i != 0)
- {
- cs_error(link, RequestIO, i);
break;
- }
/*
* Now allocate an interrupt line. Note that this does not
@@ -3868,10 +3856,7 @@ wv_pcmcia_config(struct pcmcia_device * link)
*/
i = pcmcia_request_irq(link, &link->irq);
if (i != 0)
- {
- cs_error(link, RequestIRQ, i);
break;
- }
/*
* This actually configures the PCMCIA socket -- setting up
@@ -3880,10 +3865,7 @@ wv_pcmcia_config(struct pcmcia_device * link)
link->conf.ConfigIndex = 1;
i = pcmcia_request_configuration(link, &link->conf);
if (i != 0)
- {
- cs_error(link, RequestConfiguration, i);
break;
- }
/*
* Allocate a small memory window. Note that the struct pcmcia_device
@@ -3896,10 +3878,7 @@ wv_pcmcia_config(struct pcmcia_device * link)
req.AccessSpeed = mem_speed;
i = pcmcia_request_window(&link, &req, &link->win);
if (i != 0)
- {
- cs_error(link, RequestWindow, i);
break;
- }
lp->mem = ioremap(req.Base, req.Size);
dev->mem_start = (u_long)lp->mem;
@@ -3908,10 +3887,7 @@ wv_pcmcia_config(struct pcmcia_device * link)
mem.CardOffset = 0; mem.Page = 0;
i = pcmcia_map_mem_page(link->win, &mem);
if (i != 0)
- {
- cs_error(link, MapMemPage, i);
break;
- }
/* Feed device with this info... */
dev->irq = link->irq.AssignedIRQ;
diff --git a/drivers/net/wireless/wl3501_cs.c b/drivers/net/wireless/wl3501_cs.c
index 4f1e0cf..7e8e269 100644
--- a/drivers/net/wireless/wl3501_cs.c
+++ b/drivers/net/wireless/wl3501_cs.c
@@ -67,23 +67,7 @@
/* For rough constant delay */
#define WL3501_NOPLOOP(n) { int x = 0; while (x++ < n) slow_down_io(); }
-/*
- * All the PCMCIA modules use PCMCIA_DEBUG to control debugging. If you do not
- * define PCMCIA_DEBUG at all, all the debug code will be left out. If you
- * compile with PCMCIA_DEBUG=0, the debug code will be present but disabled --
- * but it can then be enabled for specific modules at load time with a
- * 'pc_debug=#' option to insmod.
- */
-#define PCMCIA_DEBUG 0
-#ifdef PCMCIA_DEBUG
-static int pc_debug = PCMCIA_DEBUG;
-module_param(pc_debug, int, 0);
-#define dprintk(n, format, args...) \
- { if (pc_debug > (n)) \
- printk(KERN_INFO "%s: " format "\n", __func__ , ##args); }
-#else
-#define dprintk(n, format, args...)
-#endif
+
#define wl3501_outb(a, b) { outb(a, b); slow_down_io(); }
#define wl3501_outb_p(a, b) { outb_p(a, b); slow_down_io(); }
@@ -684,10 +668,10 @@ static void wl3501_mgmt_scan_confirm(struct wl3501_card *this, u16 addr)
int matchflag = 0;
struct wl3501_scan_confirm sig;
- dprintk(3, "entry");
+ pr_debug("entry");
wl3501_get_from_wla(this, addr, &sig, sizeof(sig));
if (sig.status == WL3501_STATUS_SUCCESS) {
- dprintk(3, "success");
+ pr_debug("success");
if ((this->net_type == IW_MODE_INFRA &&
(sig.cap_info & WL3501_MGMT_CAPABILITY_ESS)) ||
(this->net_type == IW_MODE_ADHOC &&
@@ -722,7 +706,7 @@ static void wl3501_mgmt_scan_confirm(struct wl3501_card *this, u16 addr)
}
}
} else if (sig.status == WL3501_STATUS_TIMEOUT) {
- dprintk(3, "timeout");
+ pr_debug("timeout");
this->join_sta_bss = 0;
for (i = this->join_sta_bss; i < this->bss_cnt; i++)
if (!wl3501_mgmt_join(this, i))
@@ -879,7 +863,7 @@ static int wl3501_mgmt_auth(struct wl3501_card *this)
.timeout = 1000,
};
- dprintk(3, "entry");
+ pr_debug("entry");
memcpy(sig.mac_addr, this->bssid, ETH_ALEN);
return wl3501_esbq_exec(this, &sig, sizeof(sig));
}
@@ -893,7 +877,7 @@ static int wl3501_mgmt_association(struct wl3501_card *this)
.cap_info = this->cap_info,
};
- dprintk(3, "entry");
+ pr_debug("entry");
memcpy(sig.mac_addr, this->bssid, ETH_ALEN);
return wl3501_esbq_exec(this, &sig, sizeof(sig));
}
@@ -903,7 +887,7 @@ static void wl3501_mgmt_join_confirm(struct net_device *dev, u16 addr)
struct wl3501_card *this = netdev_priv(dev);
struct wl3501_join_confirm sig;
- dprintk(3, "entry");
+ pr_debug("entry");
wl3501_get_from_wla(this, addr, &sig, sizeof(sig));
if (sig.status == WL3501_STATUS_SUCCESS) {
if (this->net_type == IW_MODE_INFRA) {
@@ -962,7 +946,7 @@ static inline void wl3501_md_confirm_interrupt(struct net_device *dev,
{
struct wl3501_md_confirm sig;
- dprintk(3, "entry");
+ pr_debug("entry");
wl3501_get_from_wla(this, addr, &sig, sizeof(sig));
wl3501_free_tx_buffer(this, sig.data);
if (netif_queue_stopped(dev))
@@ -1017,7 +1001,7 @@ static inline void wl3501_md_ind_interrupt(struct net_device *dev,
static inline void wl3501_get_confirm_interrupt(struct wl3501_card *this,
u16 addr, void *sig, int size)
{
- dprintk(3, "entry");
+ pr_debug("entry");
wl3501_get_from_wla(this, addr, &this->sig_get_confirm,
sizeof(this->sig_get_confirm));
wake_up(&this->wait);
@@ -1029,7 +1013,7 @@ static inline void wl3501_start_confirm_interrupt(struct net_device *dev,
{
struct wl3501_start_confirm sig;
- dprintk(3, "entry");
+ pr_debug("entry");
wl3501_get_from_wla(this, addr, &sig, sizeof(sig));
if (sig.status == WL3501_STATUS_SUCCESS)
netif_wake_queue(dev);
@@ -1041,7 +1025,7 @@ static inline void wl3501_assoc_confirm_interrupt(struct net_device *dev,
struct wl3501_card *this = netdev_priv(dev);
struct wl3501_assoc_confirm sig;
- dprintk(3, "entry");
+ pr_debug("entry");
wl3501_get_from_wla(this, addr, &sig, sizeof(sig));
if (sig.status == WL3501_STATUS_SUCCESS)
@@ -1053,7 +1037,7 @@ static inline void wl3501_auth_confirm_interrupt(struct wl3501_card *this,
{
struct wl3501_auth_confirm sig;
- dprintk(3, "entry");
+ pr_debug("entry");
wl3501_get_from_wla(this, addr, &sig, sizeof(sig));
if (sig.status == WL3501_STATUS_SUCCESS)
@@ -1069,7 +1053,7 @@ static inline void wl3501_rx_interrupt(struct net_device *dev)
u8 sig_id;
struct wl3501_card *this = netdev_priv(dev);
- dprintk(3, "entry");
+ pr_debug("entry");
loop:
morepkts = 0;
if (!wl3501_esbq_confirm(this))
@@ -1302,7 +1286,7 @@ static int wl3501_reset(struct net_device *dev)
wl3501_ack_interrupt(this);
wl3501_unblock_interrupt(this);
wl3501_mgmt_scan(this, 100);
- dprintk(1, "%s: device reset", dev->name);
+ pr_debug("%s: device reset", dev->name);
rc = 0;
out:
return rc;
@@ -1376,7 +1360,7 @@ static int wl3501_open(struct net_device *dev)
link->open++;
/* Initial WL3501 firmware */
- dprintk(1, "%s: Initialize WL3501 firmware...", dev->name);
+ pr_debug("%s: Initialize WL3501 firmware...", dev->name);
if (wl3501_init_firmware(this))
goto fail;
/* Initial device variables */
@@ -1388,7 +1372,7 @@ static int wl3501_open(struct net_device *dev)
wl3501_unblock_interrupt(this);
wl3501_mgmt_scan(this, 100);
rc = 0;
- dprintk(1, "%s: WL3501 opened", dev->name);
+ pr_debug("%s: WL3501 opened", dev->name);
printk(KERN_INFO "%s: Card Name: %s\n"
"%s: Firmware Date: %s\n",
dev->name, this->card_name,
@@ -1945,9 +1929,6 @@ out_link:
return -ENOMEM;
}
-#define CS_CHECK(fn, ret) \
-do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0)
-
/**
* wl3501_config - configure the PCMCIA socket and make eth device available
* @link - FILL_IN
@@ -1959,7 +1940,7 @@ do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0)
static int wl3501_config(struct pcmcia_device *link)
{
struct net_device *dev = link->priv;
- int i = 0, j, last_fn, last_ret;
+ int i = 0, j, ret;
struct wl3501_card *this;
/* Try allocating IO ports. This tries a few fixed addresses. If you
@@ -1975,20 +1956,22 @@ static int wl3501_config(struct pcmcia_device *link)
if (i == 0)
break;
}
- if (i != 0) {
- cs_error(link, RequestIO, i);
+ if (i != 0)
goto failed;
- }
/* Now allocate an interrupt line. Note that this does not actually
* assign a handler to the interrupt. */
- CS_CHECK(RequestIRQ, pcmcia_request_irq(link, &link->irq));
+ ret = pcmcia_request_irq(link, &link->irq);
+ if (ret)
+ goto failed;
/* This actually configures the PCMCIA socket -- setting up the I/O
* windows and the interrupt mapping. */
- CS_CHECK(RequestConfiguration, pcmcia_request_configuration(link, &link->conf));
+ ret = pcmcia_request_configuration(link, &link->conf);
+ if (ret)
+ goto failed;
dev->irq = link->irq.AssignedIRQ;
dev->base_addr = link->io.BasePort1;
@@ -2041,8 +2024,6 @@ static int wl3501_config(struct pcmcia_device *link)
netif_start_queue(dev);
return 0;
-cs_failed:
- cs_error(link, last_fn, last_ret);
failed:
wl3501_release(link);
return -ENODEV;
--
1.6.0.4
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox