* [PATCH 2/3] ARM: Kirkwood: Convert NSA310 to use gpio-poweroff driver
From: Andrew Lunn @ 2012-12-28 14:08 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1356703730-4926-1-git-send-email-andrew@lunn.ch>
Remove the C code and add a Device Tree node for gpio-poweroff.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
arch/arm/boot/dts/kirkwood-nsa310.dts | 5 +++++
arch/arm/mach-kirkwood/board-nsa310.c | 33 ---------------------------------
2 files changed, 5 insertions(+), 33 deletions(-)
diff --git a/arch/arm/boot/dts/kirkwood-nsa310.dts b/arch/arm/boot/dts/kirkwood-nsa310.dts
index 2dc1d09..85cce36 100644
--- a/arch/arm/boot/dts/kirkwood-nsa310.dts
+++ b/arch/arm/boot/dts/kirkwood-nsa310.dts
@@ -142,6 +142,11 @@
};
};
+ gpio_poweroff {
+ compatible = "gpio-poweroff";
+ gpios = <&gpio1 16 0>;
+ };
+
regulators {
compatible = "simple-bus";
#address-cells = <1>;
diff --git a/arch/arm/mach-kirkwood/board-nsa310.c b/arch/arm/mach-kirkwood/board-nsa310.c
index d04184d..7a56273 100644
--- a/arch/arm/mach-kirkwood/board-nsa310.c
+++ b/arch/arm/mach-kirkwood/board-nsa310.c
@@ -11,7 +11,6 @@
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/i2c.h>
-#include <linux/gpio.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
@@ -19,8 +18,6 @@
#include "common.h"
#include "mpp.h"
-#define NSA310_GPIO_POWER_OFF 48
-
static unsigned int nsa310_mpp_config[] __initdata = {
MPP12_GPIO, /* led esata green */
MPP13_GPIO, /* led esata red */
@@ -45,42 +42,12 @@ static struct i2c_board_info __initdata nsa310_i2c_info[] = {
{ I2C_BOARD_INFO("adt7476", 0x2e) },
};
-static void nsa310_power_off(void)
-{
- gpio_set_value(NSA310_GPIO_POWER_OFF, 1);
-}
-
-static int __init nsa310_gpio_request(unsigned int gpio, unsigned long flags,
- const char *label)
-{
- int err;
-
- err = gpio_request_one(gpio, flags, label);
- if (err)
- pr_err("NSA-310: can't setup GPIO%u (%s), err=%d\n",
- gpio, label, err);
-
- return err;
-}
-
-static void __init nsa310_gpio_init(void)
-{
- int err;
-
- err = nsa310_gpio_request(NSA310_GPIO_POWER_OFF, GPIOF_OUT_INIT_LOW,
- "Power Off");
- if (!err)
- pm_power_off = nsa310_power_off;
-}
-
void __init nsa310_init(void)
{
u32 dev, rev;
kirkwood_mpp_conf(nsa310_mpp_config);
- nsa310_gpio_init();
-
kirkwood_pcie_id(&dev, &rev);
i2c_register_board_info(0, ARRAY_AND_SIZE(nsa310_i2c_info));
--
1.7.10.4
^ permalink raw reply related
* [PATCH 1/3] ARM: Kirkwood: Convert NSA310 to DT based regulators.
From: Andrew Lunn @ 2012-12-28 14:08 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1356703730-4926-1-git-send-email-andrew@lunn.ch>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
arch/arm/boot/dts/kirkwood-nsa310.dts | 17 +++++++++++++++++
arch/arm/mach-kirkwood/board-nsa310.c | 4 ----
2 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/arch/arm/boot/dts/kirkwood-nsa310.dts b/arch/arm/boot/dts/kirkwood-nsa310.dts
index 5509f96..2dc1d09 100644
--- a/arch/arm/boot/dts/kirkwood-nsa310.dts
+++ b/arch/arm/boot/dts/kirkwood-nsa310.dts
@@ -141,4 +141,21 @@
gpios = <&gpio1 8 0>;
};
};
+
+ regulators {
+ compatible = "simple-bus";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ usb0_power_off: regulator at 1 {
+ compatible = "regulator-fixed";
+ reg = <1>;
+ regulator-name = "USB Power Off";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ regulator-always-on;
+ regulator-boot-on;
+ gpio = <&gpio0 21 0>;
+ };
+ };
};
diff --git a/arch/arm/mach-kirkwood/board-nsa310.c b/arch/arm/mach-kirkwood/board-nsa310.c
index f58d2e1..d04184d 100644
--- a/arch/arm/mach-kirkwood/board-nsa310.c
+++ b/arch/arm/mach-kirkwood/board-nsa310.c
@@ -19,7 +19,6 @@
#include "common.h"
#include "mpp.h"
-#define NSA310_GPIO_USB_POWER_OFF 21
#define NSA310_GPIO_POWER_OFF 48
static unsigned int nsa310_mpp_config[] __initdata = {
@@ -72,9 +71,6 @@ static void __init nsa310_gpio_init(void)
"Power Off");
if (!err)
pm_power_off = nsa310_power_off;
-
- nsa310_gpio_request(NSA310_GPIO_USB_POWER_OFF, GPIOF_OUT_INIT_LOW,
- "USB Power Off");
}
void __init nsa310_init(void)
--
1.7.10.4
^ permalink raw reply related
* [PATCH 0/3] Convert more of NSA310 to DT.
From: Andrew Lunn @ 2012-12-28 14:08 UTC (permalink / raw)
To: linux-arm-kernel
This patchset converts more of the NSA310 into device tree.
Currently untested.
Andrew Lunn (3):
ARM: Kirkwood: Convert NSA310 to DT based regulators.
ARM: Kirkwood: Convert NSA310 to use gpio-poweroff driver
ARM: Kirkwood: Convert NSA310 I2C to device tree
arch/arm/boot/dts/kirkwood-nsa310.dts | 27 +++++++++++++++++++++
arch/arm/mach-kirkwood/board-nsa310.c | 43 ---------------------------------
2 files changed, 27 insertions(+), 43 deletions(-)
--
1.7.10.4
^ permalink raw reply
* [U-Boot] configuring u-boot for custom board based on beaglebone(am335xx_evm)
From: Tom Rini @ 2012-12-28 14:06 UTC (permalink / raw)
To: u-boot
In-Reply-To: <1356002118356-143311.post@n7.nabble.com>
On Thu, Dec 20, 2012 at 03:15:18AM -0800, Pavan wrote:
> Hi all,
>
> i am using u-boot-2013.02.rc2 and cross-compiling for target
> am335x_evm_uart2_config target its creating MLO and u-boot.img for my
> target.buts its not booting on uart2.
>
> is there any configuration i need to change in u-boot source code?
Nope. And that configuration has been tested on the full EVM and I
belive a beaglebone with a UART cape.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20121228/251fbed8/attachment.pgp>
^ permalink raw reply
* Re: [PATCH v2] wt-status: Show ignored files in untracked dirs
From: Antoine Pelisse @ 2012-12-28 14:05 UTC (permalink / raw)
To: Jeff King; +Cc: Junio C Hamano, git
In-Reply-To: <CALWbr2xmtvchR4G37-FzzgScKe4p4RjLc7=Pg8d4K6SWO7tGAQ@mail.gmail.com>
Hey Peff,
I actually have an issue with the behavior we discussed (referenced as 1.A.)
Using the example from Michael's mail, I end up having this:
$ git status --porcelain --ignored
?? .gitignore
?? x
?? y/
!! x.ignore-me
!! y/
y/ is referred as untracked, because it contains untracked files, and
then as ignored because it
contains ignored files.
Showing it twice doesn't feel right though, so I guess we should only
show "?? y/" with untracked=normal,
and "!! y/foo.ignore-me" when using untracked=all
What do you think ?
On Thu, Dec 27, 2012 at 6:35 PM, Antoine Pelisse <apelisse@gmail.com> wrote:
>> By "committed", I assume you meat that you have "dirA/unco" as an
>> untracked file, and "dirA/committed" as a file in the index?
>
> Of course,
>
>> Thanks for putting this together. I agree with the expected output in
>> each case, and I think this covers the cases we have seen (case 1 is
>> Michael's original report, case 2 is what I wrote in my mail, and case 3
>> is the one you just came up with). I can't think offhand of any others.
>
> Great, so I can build some tests reflecting those behaviors while
> waiting more inputs
^ permalink raw reply
* [U-Boot] [PATCH v2 2/2] mx53loco: Improve error handling on power_init()
From: Fabio Estevam @ 2012-12-28 14:05 UTC (permalink / raw)
To: u-boot
In-Reply-To: <1356703529-31737-1-git-send-email-festevam@gmail.com>
From: Fabio Estevam <fabio.estevam@freescale.com>
Make the error handling more robust.
Check if each one of the PMIC writes fail and if they do, just return
immediately.
Also, print the cause for the failures.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
Changes since v2:
- Newly introduced here.
board/freescale/mx53loco/mx53loco.c | 61 +++++++++++++++++++++++++++++------
1 file changed, 51 insertions(+), 10 deletions(-)
diff --git a/board/freescale/mx53loco/mx53loco.c b/board/freescale/mx53loco/mx53loco.c
index b1bfb90..60cd4f0 100644
--- a/board/freescale/mx53loco/mx53loco.c
+++ b/board/freescale/mx53loco/mx53loco.c
@@ -343,7 +343,7 @@ static void setup_iomux_i2c(void)
static int power_init(void)
{
unsigned int val;
- int ret = -1;
+ int ret;
struct pmic *p;
if (!i2c_probe(CONFIG_SYS_DIALOG_PMIC_I2C_ADDR)) {
@@ -358,14 +358,33 @@ static int power_init(void)
/* Set VDDA to 1.25V */
val = DA9052_BUCKCORE_BCOREEN | DA_BUCKCORE_VBCORE_1_250V;
ret = pmic_reg_write(p, DA9053_BUCKCORE_REG, val);
+ if (ret) {
+ printf("Writing to BUCKCORE_REG failed: %d\n", ret);
+ return ret;
+ }
- ret |= pmic_reg_read(p, DA9053_SUPPLY_REG, &val);
+ pmic_reg_read(p, DA9053_SUPPLY_REG, &val);
val |= DA9052_SUPPLY_VBCOREGO;
- ret |= pmic_reg_write(p, DA9053_SUPPLY_REG, val);
+ ret = pmic_reg_write(p, DA9053_SUPPLY_REG, val);
+ if (ret) {
+ printf("Writing to SUPPLY_REG failed: %d\n", ret);
+ return ret;
+ }
/* Set Vcc peripheral to 1.30V */
- ret |= pmic_reg_write(p, DA9053_BUCKPRO_REG, 0x62);
- ret |= pmic_reg_write(p, DA9053_SUPPLY_REG, 0x62);
+ ret = pmic_reg_write(p, DA9053_BUCKPRO_REG, 0x62);
+ if (ret) {
+ printf("Writing to BUCKPRO_REG failed: %d\n", ret);
+ return ret;
+ }
+
+ ret = pmic_reg_write(p, DA9053_SUPPLY_REG, 0x62);
+ if (ret) {
+ printf("Writing to SUPPLY_REG failed: %d\n", ret);
+ return ret;
+ }
+
+ return ret;
}
if (!i2c_probe(CONFIG_SYS_FSL_PMIC_I2C_ADDR)) {
@@ -381,28 +400,50 @@ static int power_init(void)
pmic_reg_read(p, REG_SW_0, &val);
val = (val & ~SWx_VOLT_MASK_MC34708) | SWx_1_250V_MC34708;
ret = pmic_reg_write(p, REG_SW_0, val);
+ if (ret) {
+ printf("Writing to REG_SW_0 failed: %d\n", ret);
+ return ret;
+ }
/* Set VCC as 1.30V on SW2 */
pmic_reg_read(p, REG_SW_1, &val);
val = (val & ~SWx_VOLT_MASK_MC34708) | SWx_1_300V_MC34708;
- ret |= pmic_reg_write(p, REG_SW_1, val);
+ ret = pmic_reg_write(p, REG_SW_1, val);
+ if (ret) {
+ printf("Writing to REG_SW_1 failed: %d\n", ret);
+ return ret;
+ }
/* Set global reset timer to 4s */
pmic_reg_read(p, REG_POWER_CTL2, &val);
val = (val & ~TIMER_MASK_MC34708) | TIMER_4S_MC34708;
- ret |= pmic_reg_write(p, REG_POWER_CTL2, val);
+ ret = pmic_reg_write(p, REG_POWER_CTL2, val);
+ if (ret) {
+ printf("Writing to REG_POWER_CTL2 failed: %d\n", ret);
+ return ret;
+ }
/* Set VUSBSEL and VUSBEN for USB PHY supply*/
pmic_reg_read(p, REG_MODE_0, &val);
val |= (VUSBSEL_MC34708 | VUSBEN_MC34708);
- ret |= pmic_reg_write(p, REG_MODE_0, val);
+ ret = pmic_reg_write(p, REG_MODE_0, val);
+ if (ret) {
+ printf("Writing to REG_MODE_0 failed: %d\n", ret);
+ return ret;
+ }
/* Set SWBST to 5V in auto mode */
val = SWBST_AUTO;
- ret |= pmic_reg_write(p, SWBST_CTRL, val);
+ ret = pmic_reg_write(p, SWBST_CTRL, val);
+ if (ret) {
+ printf("Writing to SWBST_CTRL failed: %d\n", ret);
+ return ret;
+ }
+
+ return ret;
}
- return ret;
+ return -1;
}
static void clock_1GHz(void)
--
1.7.9.5
^ permalink raw reply related
* [U-Boot] [PATCH v2 1/2] mx53loco: Remove unneeded 'retval' variable
From: Fabio Estevam @ 2012-12-28 14:05 UTC (permalink / raw)
To: u-boot
From: Fabio Estevam <fabio.estevam@freescale.com>
commit c73368150 (pmic: Extend PMIC framework to support multiple instances
of PMIC devices) introduced an extra 'retval' variable, but this is not
necessary since we have already the variable 'ret' in place.
So use 'ret' to store the return values from the pmic related calls and remove
'retval'.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
Changes since v1:
- No changes
board/freescale/mx53loco/mx53loco.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/board/freescale/mx53loco/mx53loco.c b/board/freescale/mx53loco/mx53loco.c
index 63a4f8b..b1bfb90 100644
--- a/board/freescale/mx53loco/mx53loco.c
+++ b/board/freescale/mx53loco/mx53loco.c
@@ -345,12 +345,11 @@ static int power_init(void)
unsigned int val;
int ret = -1;
struct pmic *p;
- int retval;
if (!i2c_probe(CONFIG_SYS_DIALOG_PMIC_I2C_ADDR)) {
- retval = pmic_dialog_init(I2C_PMIC);
- if (retval)
- return retval;
+ ret = pmic_dialog_init(I2C_PMIC);
+ if (ret)
+ return ret;
p = pmic_get("DIALOG_PMIC");
if (!p)
@@ -370,9 +369,9 @@ static int power_init(void)
}
if (!i2c_probe(CONFIG_SYS_FSL_PMIC_I2C_ADDR)) {
- retval = pmic_init(I2C_PMIC);
- if (retval)
- return retval;
+ ret = pmic_init(I2C_PMIC);
+ if (ret)
+ return ret;
p = pmic_get("FSL_PMIC");
if (!p)
--
1.7.9.5
^ permalink raw reply related
* Re: Installation Plan
From: Enrico Weigelt @ 2012-12-28 13:54 UTC (permalink / raw)
To: Dennis Putnam; +Cc: git
In-Reply-To: <50D475A9.9020407@bellsouth.net>
> 7) Clone new repository for development and testing on Windows. (Do I
> need the shared drive any more?)
Not necessarily, depending on how to connect your local repo to the
remote one (your central repo). I'd suggest using ssh protocol: in this
case your windows box will connect to the linux box via ssh and do all
operations via ssh - no network filesystem required.
> 8) When a new version is ready for release, push commit to remote
> repository after which builds will use new code (I'm assuming the
> file copies happen automagically).
Yes, see post-update hook (on the central repo side).
It is executed right after objects have been transfered and refs updated.
(IOW: when your changes made finally it into the cental repo).
Note that the 'git push' operation will wait until that hook is finished.
So, if the build takes a while, you most likely want to do it asychronously.
A nice way is letting the hook just add the new refs to some queue
(you can even use git refs for that) and have another process (in a loop
or via cron) polling for new queue entries and run the build.
cu
--
Mit freundlichen Grüßen / Kind regards
Enrico Weigelt
VNC - Virtual Network Consult GmbH
Head Of Development
Pariser Platz 4a, D-10117 Berlin
Tel.: +49 (30) 3464615-20
Mobile: +49 (151) 27565287
Fax: +49 (30) 3464615-59
enrico.weigelt@vnc.biz; www.vnc.de
^ permalink raw reply
* [PATCH] mac80211: unset peer's HT 40 MHz support if not usable
From: Johannes Berg @ 2012-12-28 14:04 UTC (permalink / raw)
To: linux-wireless; +Cc: Johannes Berg
From: Johannes Berg <johannes.berg@intel.com>
When an interface is configured to a 20 MHz channel
and the device as well as the peer are 40 MHz capable
the HT capabilities of the peer are not restricted to
20 MHz, even though they're supposed to be restricted
to the currently possible capabilities.
Unset the 40 MHz HT capability bits in this case.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
net/mac80211/ht.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/net/mac80211/ht.c b/net/mac80211/ht.c
index df46cd8..61ac7c4 100644
--- a/net/mac80211/ht.c
+++ b/net/mac80211/ht.c
@@ -120,6 +120,21 @@ void ieee80211_ht_cap_ie_to_sta_ht_cap(struct ieee80211_sub_if_data *sdata,
IEEE80211_HT_CAP_SGI_20 |
IEEE80211_HT_CAP_SGI_40 |
IEEE80211_HT_CAP_DSSSCCK40));
+
+ /* Unset 40 MHz if we're not using a 40 MHz channel */
+ switch (sdata->vif.bss_conf.chandef.width) {
+ case NL80211_CHAN_WIDTH_20_NOHT:
+ case NL80211_CHAN_WIDTH_20:
+ ht_cap->cap &= ~IEEE80211_HT_CAP_SGI_40;
+ ht_cap->cap &= ~IEEE80211_HT_CAP_SUP_WIDTH_20_40;
+ break;
+ case NL80211_CHAN_WIDTH_40:
+ case NL80211_CHAN_WIDTH_80:
+ case NL80211_CHAN_WIDTH_80P80:
+ case NL80211_CHAN_WIDTH_160:
+ break;
+ }
+
/*
* The STBC bits are asymmetric -- if we don't have
* TX then mask out the peer's RX and vice versa.
--
1.8.0
^ permalink raw reply related
* [U-Boot] [PULL] u-boot-usb/master
From: Stefan Schmidt @ 2012-12-28 14:03 UTC (permalink / raw)
To: u-boot
In-Reply-To: <20121227085249.7a226ba3@amdc308.digital.local>
Hello.
On Thu, 2012-12-27 at 08:52, Lukasz Majewski wrote:
>
> > I wonder where you actually got such an old version of dfu-util.
> I use the stable debian repository:
> http://ftp.se.debian.org stable
>
> And it is still there (version:
> dfu-util version 0.1+svnexported)
Well, Debian stable is nothing we can change. They don't update
packages. The unstable and testing versions have 0.5 and I filled a
bug for an update to 0.7 just some minutes ago.
regards
Stefan Schmidt
^ permalink raw reply
* [U-Boot] [RFC][PULL-REQ] MTD update
From: Tom Rini @ 2012-12-28 13:59 UTC (permalink / raw)
To: u-boot
In-Reply-To: <20121228121741.GA29289@build.ihdev.net>
On Fri, Dec 28, 2012 at 07:17:42AM -0500, Sergey Lapin wrote:
> Hi, all!
>
> As I failed to submit 250KB patch to the list
> I will send this pull request
>
> This patch is not for inclusion yet.
> This patch is just update of u-boot MTD with
> Linux kernel's MTD v3.8-rc.
First, while I appreciate the effort, I'd rather us sync with v3.7
release rather than the in-flux v3.8. Second, can you please look at
the archives about how we've done these re-syncs before? I really don't
want to take a single giant patch and we're usually able to break this
up into chunks. Thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20121228/6fc03dcd/attachment.pgp>
^ permalink raw reply
* Re: How to pair device from CLI?
From: Johan Hedberg @ 2012-12-28 13:54 UTC (permalink / raw)
To: Kamil Jońca; +Cc: linux-bluetooth
In-Reply-To: <87wqw2s3qm.fsf@alfa.kjonca>
Hi Kamil,
> > HCI Event: IO Capability Request (0x31) plen 6
> bdaddr D4:E8:B2:AA:15:FA
> < HCI Command: IO Capability Request Reply (0x01|0x002b) plen 9
> bdaddr D4:E8:B2:AA:15:FA capability 0x04 oob 0x00 auth 0x03
> Capability: Reserved (OOB data not present)
> Authentication: Dedicated Bonding (MITM Protection)
Here's the problem. The kernel is respoding with an invalid IO
capability value. The same issue was discussed here just a week ago:
http://marc.info/?l=linux-bluetooth&m=135599627517032&w=2
The quick fix is to change "KeyboardDisplay" to "DisplayYesNo" in the
simple-agent script.
Johan
^ permalink raw reply
* HDA regression on Fujitsu S7020 laptop (ALC260 codec)
From: Jonathan Woithe @ 2012-12-28 13:52 UTC (permalink / raw)
To: alsa-devel; +Cc: jwoithe
Having been running kernel 3.3.5 for a while, I decided to upgrade to 3.7.1
tonight. Unfortunately there have been a number of HDA-related regressions
between these two kernels when running on a Fujitsu S7020 laptop which are
clearly related to the HDA rewrite which has been going on recently. This
laptop utilises the Realtek ALC260 codec.
Testing was initially done with alsa-lib 1.0.24 and alsa-utils 1.0.24. I
upgraded to version 1.0.26 of both but the behaviour remained the same under
3.3.5 and 3.7.1.
Under 3.3.5, sound works perfectly.
Under 3.7.1 there are a number of regressions:
- there is no alsamixer control for the internal speaker. I have a "PCM"
volume control which appears to do nothing. Previously there was a
speaker control, the PCM control affected every output (from memory), as
did the master volume.
- no audio comes out of the internal speaker regardless of the "auto mute"
setting.
- there are no pin mode (re-tasking) controls for the mic or headphone jack
in alsamixer. On this laptop the mic jack should have various bias
options as well as line-in. The headphone jack should include headphone
(aka output amplifier on), line-out (output amplifier off), line-in and
mic options.
The second ADC does show up in alsamixer as a second capture device, but
probably due to the lack of retasking support it is not possible to select
the headphone jack as an input option.
Audio does come out of the headphone jack. However, as noted above it is
not possible to switch this from headphone to line-out. The volume of the
headphone output is affected by the "master" and "headphone" volume
controls.
The inability to set the pin modes is a showstopper for me - I need to be
able to do this and thus will be stuck on older kernels until this is fixed.
At the end of this post I have included the /proc/asound/card0/codec#0
output under 3.3.5 (which works well) and 3.7.1 (which is broken as
described above).
What needs to be done to restore the functionality for the S7020 that has
been working for years? It seems that some form of model quirk needs to be
ported into the new HDA framework from earlier kernels, but since this sort
of thing appears to have been removed with the rewrite (at least for realtek
codecs) it's difficult to see where to begin.
Regards
jonathan
Output from /proc/asound/card0/codec#0 under kernel 3.3.5:
Codec: Realtek ALC260
Address: 0
AFG Function Id: 0x1 (unsol 1)
Vendor Id: 0x10ec0260
Subsystem Id: 0x10cf0000
Revision Id: 0x100400
No Modem Function Group found
Default PCM:
rates [0x560]: 44100 48000 96000 192000
bits [0xe]: 16 20 24
formats [0x1]: PCM
Default Amp-In caps: N/A
Default Amp-Out caps: N/A
GPIO: io=4, o=0, i=0, unsolicited=1, wake=0
IO[0]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[1]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[2]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[3]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
Node 0x02 [Audio Output] wcaps 0x11: Stereo
Device: name="ALC260 Analog", type="Audio", device=0
Converter: stream=0, channel=0
PCM:
rates [0x560]: 44100 48000 96000 192000
bits [0xe]: 16 20 24
formats [0x1]: PCM
Node 0x03 [Audio Output] wcaps 0x211: Stereo Digital
Converter: stream=0, channel=0
Digital:
Digital category: 0x0
PCM:
rates [0x560]: 44100 48000 96000 192000
bits [0x1e]: 16 20 24 32
formats [0x1]: PCM
Node 0x04 [Audio Input] wcaps 0x10011b: Stereo Amp-In
Control: name="Input Source", index=0, device=0
Control: name="Capture Switch", index=0, device=0
Control: name="Capture Volume", index=0, device=0
Device: name="ALC260 Analog", type="Audio", device=0
Amp-In caps: ofs=0x00, nsteps=0x23, stepsize=0x03, mute=1
Amp-In vals: [0x0c 0x0c] [0x0c 0x0c] [0x0c 0x0c] [0x0c 0x0c] [0x0c 0x0c] [0x0c 0x0c] [0x0c 0x0c]
Converter: stream=0, channel=0
SDI-Select: 0
PCM:
rates [0x160]: 44100 48000 96000
bits [0x6]: 16 20
formats [0x1]: PCM
Connection: 7
0x12* 0x13 0x14 0x15 0x16 0x0f 0x10
Node 0x05 [Audio Input] wcaps 0x10011b: Stereo Amp-In
Control: name="Input Source", index=1, device=0
Control: name="Capture Switch", index=1, device=0
Control: name="Capture Volume", index=1, device=0
Device: name="ALC260 Analog", type="Audio", device=2
Amp-In caps: ofs=0x00, nsteps=0x23, stepsize=0x03, mute=1
Amp-In vals: [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80]
Converter: stream=0, channel=0
SDI-Select: 0
PCM:
rates [0x160]: 44100 48000 96000
bits [0x6]: 16 20
formats [0x1]: PCM
Connection: 8
0x12* 0x13 0x14 0x15 0x16 0x07 0x0f 0x10
Node 0x06 [Audio Input] wcaps 0x100391: Stereo Digital
Converter: stream=0, channel=0
SDI-Select: 0
Digital:
Digital category: 0x0
PCM:
rates [0x160]: 44100 48000 96000
bits [0x1e]: 16 20 24 32
formats [0x1]: PCM
Unsolicited: tag=00, enabled=0
Connection: 1
0x19
Node 0x07 [Audio Mixer] wcaps 0x20010b: Stereo Amp-In
Control: name="CD Playback Volume", index=0, device=0
ControlAmp: chs=3, dir=In, idx=4, ofs=0
Control: name="CD Playback Switch", index=0, device=0
ControlAmp: chs=3, dir=In, idx=4, ofs=0
Control: name="Mic/Line Playback Volume", index=0, device=0
ControlAmp: chs=3, dir=In, idx=0, ofs=0
Control: name="Mic/Line Playback Switch", index=0, device=0
ControlAmp: chs=3, dir=In, idx=0, ofs=0
Amp-In caps: ofs=0x23, nsteps=0x41, stepsize=0x03, mute=1
Amp-In vals: [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x03 0x03] [0x80 0x80] [0x80 0x80] [0x80 0x80]
Connection: 8
0x12 0x13 0x14 0x15 0x16 0x17 0x0f 0x10
Node 0x08 [Audio Mixer] wcaps 0x20010f: Stereo Amp-In Amp-Out
Control: name="Headphone Playback Volume", index=0, device=0
ControlAmp: chs=3, dir=Out, idx=0, ofs=0
Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-In vals: [0x00 0x00] [0x00 0x00]
Amp-Out caps: ofs=0x40, nsteps=0x40, stepsize=0x03, mute=0
Amp-Out vals: [0x27 0x27]
Connection: 2
0x02 0x07
Node 0x09 [Audio Mixer] wcaps 0x20010f: Stereo Amp-In Amp-Out
Control: name="Speaker Playback Volume", index=0, device=0
ControlAmp: chs=3, dir=Out, idx=0, ofs=0
Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-In vals: [0x80 0x80] [0x80 0x80]
Amp-Out caps: ofs=0x40, nsteps=0x40, stepsize=0x03, mute=0
Amp-Out vals: [0x00 0x00]
Connection: 2
0x02 0x07
Node 0x0a [Audio Mixer] wcaps 0x20010e: Mono Amp-In Amp-Out
Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-In vals: [0x80] [0x80]
Amp-Out caps: ofs=0x23, nsteps=0x41, stepsize=0x03, mute=0
Amp-Out vals: [0x00]
Connection: 2
0x02 0x07
Node 0x0b [Audio Selector] wcaps 0x300101: Stereo
Connection: 2
0x08* 0x09
Node 0x0c [Audio Selector] wcaps 0x300101: Stereo
Connection: 2
0x08* 0x09
Node 0x0d [Audio Selector] wcaps 0x300101: Stereo
Connection: 2
0x08* 0x09
Node 0x0e [Audio Selector] wcaps 0x300101: Stereo
Connection: 2
0x08* 0x09
Node 0x0f [Pin Complex] wcaps 0x40018d: Stereo Amp-Out
Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-Out vals: [0x80 0x80]
Pincap 0x0001003f: IN OUT HP EAPD Detect Trigger ImpSense
EAPD 0x2: EAPD
Pin Default 0x411111f0: [N/A] Speaker at Ext Rear
Conn = 1/8, Color = Black
DefAssociation = 0xf, Sequence = 0x0
Misc = NO_PRESENCE
Pin-ctls: 0x00:
Unsolicited: tag=00, enabled=0
Connection: 1
0x08
Node 0x10 [Pin Complex] wcaps 0x40018d: Stereo Amp-Out
Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-Out vals: [0x00 0x00]
Pincap 0x0001003f: IN OUT HP EAPD Detect Trigger ImpSense
EAPD 0x2: EAPD
Pin Default 0xe4011110: [Both] Line Out at Sep Right
Conn = 1/8, Color = Black
DefAssociation = 0x1, Sequence = 0x0
Misc = NO_PRESENCE
Pin-ctls: 0xc0: OUT HP
Unsolicited: tag=00, enabled=0
Connection: 1
0x09
Node 0x11 [Pin Complex] wcaps 0x40010c: Mono Amp-Out
Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-Out vals: [0x80]
Pincap 0x00000010: OUT
Pin Default 0x411111f0: [N/A] Speaker at Ext Rear
Conn = 1/8, Color = Black
DefAssociation = 0xf, Sequence = 0x0
Misc = NO_PRESENCE
Pin-ctls: 0x00:
Connection: 1
0x0a
Node 0x12 [Pin Complex] wcaps 0x40018d: Stereo Amp-Out
Control: name="Mic/Line Jack Mode", index=0, device=0
Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-Out vals: [0x80 0x80]
Pincap 0x0000133f: IN OUT HP Detect Trigger ImpSense
Vref caps: HIZ 50 80
Pin Default 0x03a11820: [Jack] Mic at Ext Left
Conn = 1/8, Color = Black
DefAssociation = 0x2, Sequence = 0x0
Pin-ctls: 0x20: IN VREF_HIZ
Unsolicited: tag=00, enabled=0
Connection: 1
0x0b
Node 0x13 [Pin Complex] wcaps 0x40018d: Stereo Amp-Out
Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-Out vals: [0x80 0x80]
Pincap 0x0000133f: IN OUT HP Detect Trigger ImpSense
Vref caps: HIZ 50 80
Pin Default 0x24811121: [Jack] Line In at Sep Right
Conn = 1/8, Color = Black
DefAssociation = 0x2, Sequence = 0x1
Misc = NO_PRESENCE
Pin-ctls: 0x00: VREF_HIZ
Unsolicited: tag=00, enabled=0
Connection: 1
0x0c
Node 0x14 [Pin Complex] wcaps 0x40018d: Stereo Amp-Out
Control: name="Headphone Jack Mode", index=0, device=0
Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-Out vals: [0x00 0x00]
Pincap 0x0000133f: IN OUT HP Detect Trigger ImpSense
Vref caps: HIZ 50 80
Pin Default 0x0321101f: [Jack] HP Out at Ext Left
Conn = 1/8, Color = Black
DefAssociation = 0x1, Sequence = 0xf
Pin-ctls: 0x40: OUT VREF_HIZ
Unsolicited: tag=00, enabled=0
Connection: 1
0x0d
Node 0x15 [Pin Complex] wcaps 0x40018d: Stereo Amp-Out
Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-Out vals: [0x80 0x80]
Pincap 0x0000133f: IN OUT HP Detect Trigger ImpSense
Vref caps: HIZ 50 80
Pin Default 0x411111f0: [N/A] Speaker at Ext Rear
Conn = 1/8, Color = Black
DefAssociation = 0xf, Sequence = 0x0
Misc = NO_PRESENCE
Pin-ctls: 0x00: VREF_HIZ
Unsolicited: tag=00, enabled=0
Connection: 1
0x0e
Node 0x16 [Pin Complex] wcaps 0x400001: Stereo
Pincap 0x00000020: IN
Pin Default 0x88331122: [Fixed] CD at Ext Drive Bar
Conn = ATAPI, Color = Black
DefAssociation = 0x2, Sequence = 0x2
Misc = NO_PRESENCE
Pin-ctls: 0x00:
Node 0x17 [Pin Complex] wcaps 0x400000: Mono
Pincap 0x00000020: IN
Pin Default 0xb7931123: [Fixed] Aux at Oth Mobile-In
Conn = ATAPI, Color = Black
DefAssociation = 0x2, Sequence = 0x3
Misc = NO_PRESENCE
Pin-ctls: 0x00:
Node 0x18 [Pin Complex] wcaps 0x400380: Mono Digital
Pincap 0x00000014: OUT Detect
Pin Default 0x411111f0: [N/A] Speaker at Ext Rear
Conn = 1/8, Color = Black
DefAssociation = 0xf, Sequence = 0x0
Misc = NO_PRESENCE
Pin-ctls: 0x00:
Unsolicited: tag=00, enabled=0
Connection: 1
0x03
Node 0x19 [Pin Complex] wcaps 0x400280: Mono Digital
Pincap 0x00000024: IN Detect
Pin Default 0x411111f0: [N/A] Speaker at Ext Rear
Conn = 1/8, Color = Black
DefAssociation = 0xf, Sequence = 0x0
Misc = NO_PRESENCE
Pin-ctls: 0x00:
Unsolicited: tag=00, enabled=0
Node 0x1a [Vendor Defined Widget] wcaps 0xf00040: Mono
Processing caps: benign=0, ncoeff=13
Node 0x1b [Volume Knob Widget] wcaps 0x600080: Mono
Volume-Knob: delta=0, steps=64, direct=0, val=0
Unsolicited: tag=00, enabled=0
Connection: 0
Output from /proc/asound/card0/codec#0 under kernel 3.7.1:
Codec: Realtek ALC260
Address: 0
AFG Function Id: 0x1 (unsol 1)
Vendor Id: 0x10ec0260
Subsystem Id: 0x10cf0000
Revision Id: 0x100400
No Modem Function Group found
Default PCM:
rates [0x560]: 44100 48000 96000 192000
bits [0xe]: 16 20 24
formats [0x1]: PCM
Default Amp-In caps: N/A
Default Amp-Out caps: N/A
GPIO: io=4, o=0, i=0, unsolicited=1, wake=0
IO[0]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[1]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[2]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
IO[3]: enable=0, dir=0, wake=0, sticky=0, data=0, unsol=0
Node 0x02 [Audio Output] wcaps 0x11: Stereo
Device: name="ALC260 Analog", type="Audio", device=0
Converter: stream=0, channel=0
PCM:
rates [0x560]: 44100 48000 96000 192000
bits [0xe]: 16 20 24
formats [0x1]: PCM
Node 0x03 [Audio Output] wcaps 0x211: Stereo Digital
Converter: stream=0, channel=0
Digital:
Digital category: 0x0
IEC Coding Type: 0x0
PCM:
rates [0x560]: 44100 48000 96000 192000
bits [0x1e]: 16 20 24 32
formats [0x1]: PCM
Node 0x04 [Audio Input] wcaps 0x10011b: Stereo Amp-In
Control: name="Input Source", index=0, device=0
Control: name="Capture Switch", index=0, device=0
Control: name="Capture Volume", index=0, device=0
Device: name="ALC260 Analog", type="Audio", device=0
Amp-In caps: ofs=0x00, nsteps=0x23, stepsize=0x03, mute=1
Amp-In vals: [0x0c 0x0c] [0x0c 0x0c] [0x0c 0x0c] [0x0c 0x0c] [0x0c 0x0c] [0x0c 0x0c] [0x0c 0x0c]
Converter: stream=0, channel=0
SDI-Select: 0
PCM:
rates [0x160]: 44100 48000 96000
bits [0x6]: 16 20
formats [0x1]: PCM
Connection: 7
0x12* 0x13 0x14 0x15 0x16 0x0f 0x10
Node 0x05 [Audio Input] wcaps 0x10011b: Stereo Amp-In
Control: name="Input Source", index=1, device=0
Control: name="Capture Switch", index=1, device=0
Control: name="Capture Volume", index=1, device=0
Device: name="ALC260 Analog", type="Audio", device=2
Amp-In caps: ofs=0x00, nsteps=0x23, stepsize=0x03, mute=1
Amp-In vals: [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80]
Converter: stream=0, channel=0
SDI-Select: 0
PCM:
rates [0x160]: 44100 48000 96000
bits [0x6]: 16 20
formats [0x1]: PCM
Connection: 8
0x12* 0x13 0x14 0x15 0x16 0x07 0x0f 0x10
Node 0x06 [Audio Input] wcaps 0x100391: Stereo Digital
Converter: stream=0, channel=0
SDI-Select: 0
Digital:
Digital category: 0x0
IEC Coding Type: 0x0
PCM:
rates [0x160]: 44100 48000 96000
bits [0x1e]: 16 20 24 32
formats [0x1]: PCM
Unsolicited: tag=00, enabled=0
Connection: 1
0x19
Node 0x07 [Audio Mixer] wcaps 0x20010b: Stereo Amp-In
Control: name="Mic Playback Volume", index=0, device=0
ControlAmp: chs=3, dir=In, idx=0, ofs=0
Control: name="Mic Playback Switch", index=0, device=0
ControlAmp: chs=3, dir=In, idx=0, ofs=0
Control: name="Line Playback Volume", index=0, device=0
ControlAmp: chs=3, dir=In, idx=1, ofs=0
Control: name="Line Playback Switch", index=0, device=0
ControlAmp: chs=3, dir=In, idx=1, ofs=0
Control: name="CD Playback Volume", index=0, device=0
ControlAmp: chs=3, dir=In, idx=4, ofs=0
Control: name="CD Playback Switch", index=0, device=0
ControlAmp: chs=3, dir=In, idx=4, ofs=0
Amp-In caps: ofs=0x23, nsteps=0x41, stepsize=0x03, mute=1
Amp-In vals: [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x80 0x80] [0x03 0x03] [0x80 0x80] [0x80 0x80] [0x80 0x80]
Connection: 8
0x12 0x13 0x14 0x15 0x16 0x17 0x0f 0x10
Node 0x08 [Audio Mixer] wcaps 0x20010f: Stereo Amp-In Amp-Out
Control: name="Headphone Playback Volume", index=0, device=0
ControlAmp: chs=3, dir=Out, idx=0, ofs=0
Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-In vals: [0x00 0x00] [0x00 0x00]
Amp-Out caps: ofs=0x40, nsteps=0x40, stepsize=0x03, mute=0
Amp-Out vals: [0x27 0x27]
Connection: 2
0x02 0x07
Node 0x09 [Audio Mixer] wcaps 0x20010f: Stereo Amp-In Amp-Out
Control: name="PCM Playback Volume", index=0, device=0
ControlAmp: chs=3, dir=Out, idx=0, ofs=0
Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-In vals: [0x00 0x00] [0x00 0x00]
Amp-Out caps: ofs=0x40, nsteps=0x40, stepsize=0x03, mute=0
Amp-Out vals: [0x33 0x33]
Connection: 2
0x02 0x07
Node 0x0a [Audio Mixer] wcaps 0x20010e: Mono Amp-In Amp-Out
Amp-In caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-In vals: [0x00] [0x80]
Amp-Out caps: ofs=0x23, nsteps=0x41, stepsize=0x03, mute=0
Amp-Out vals: [0x23]
Connection: 2
0x02 0x07
Node 0x0b [Audio Selector] wcaps 0x300101: Stereo
Connection: 2
0x08* 0x09
Node 0x0c [Audio Selector] wcaps 0x300101: Stereo
Connection: 2
0x08* 0x09
Node 0x0d [Audio Selector] wcaps 0x300101: Stereo
Connection: 2
0x08* 0x09
Node 0x0e [Audio Selector] wcaps 0x300101: Stereo
Connection: 2
0x08* 0x09
Node 0x0f [Pin Complex] wcaps 0x40018d: Stereo Amp-Out
Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-Out vals: [0x80 0x80]
Pincap 0x0001003f: IN OUT HP EAPD Detect Trigger ImpSense
EAPD 0x2: EAPD
Pin Default 0x411111f0: [N/A] Speaker at Ext Rear
Conn = 1/8, Color = Black
DefAssociation = 0xf, Sequence = 0x0
Misc = NO_PRESENCE
Pin-ctls: 0x20: IN
Unsolicited: tag=00, enabled=0
Connection: 1
0x08
Node 0x10 [Pin Complex] wcaps 0x40018d: Stereo Amp-Out
Control: name="PCM Playback Switch", index=0, device=0
ControlAmp: chs=3, dir=Out, idx=0, ofs=0
Control: name="Speaker Phantom Jack", index=0, device=0
Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-Out vals: [0x00 0x00]
Pincap 0x0001003f: IN OUT HP EAPD Detect Trigger ImpSense
EAPD 0x2: EAPD
Pin Default 0xe4011110: [Both] Line Out at Sep Right
Conn = 1/8, Color = Black
DefAssociation = 0x1, Sequence = 0x0
Misc = NO_PRESENCE
Pin-ctls: 0x40: OUT
Unsolicited: tag=00, enabled=0
Connection: 1
0x09
Node 0x11 [Pin Complex] wcaps 0x40010c: Mono Amp-Out
Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-Out vals: [0x80]
Pincap 0x00000010: OUT
Pin Default 0x411111f0: [N/A] Speaker at Ext Rear
Conn = 1/8, Color = Black
DefAssociation = 0xf, Sequence = 0x0
Misc = NO_PRESENCE
Pin-ctls: 0x40: OUT
Connection: 1
0x0a
Node 0x12 [Pin Complex] wcaps 0x40018d: Stereo Amp-Out
Control: name="Mic Jack", index=0, device=0
Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-Out vals: [0x80 0x80]
Pincap 0x0000133f: IN OUT HP Detect Trigger ImpSense
Vref caps: HIZ 50 80
Pin Default 0x03a11820: [Jack] Mic at Ext Left
Conn = 1/8, Color = Black
DefAssociation = 0x2, Sequence = 0x0
Pin-ctls: 0x21: IN VREF_50
Unsolicited: tag=03, enabled=1
Connection: 1
0x0b
Node 0x13 [Pin Complex] wcaps 0x40018d: Stereo Amp-Out
Control: name="Line Phantom Jack", index=0, device=0
Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-Out vals: [0x80 0x80]
Pincap 0x0000133f: IN OUT HP Detect Trigger ImpSense
Vref caps: HIZ 50 80
Pin Default 0x24811121: [Jack] Line In at Sep Right
Conn = 1/8, Color = Black
DefAssociation = 0x2, Sequence = 0x1
Misc = NO_PRESENCE
Pin-ctls: 0x20: IN VREF_HIZ
Unsolicited: tag=00, enabled=0
Connection: 1
0x0c
Node 0x14 [Pin Complex] wcaps 0x40018d: Stereo Amp-Out
Control: name="Headphone Playback Switch", index=0, device=0
ControlAmp: chs=3, dir=Out, idx=0, ofs=0
Control: name="Headphone Jack", index=0, device=0
Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-Out vals: [0x00 0x00]
Pincap 0x0000133f: IN OUT HP Detect Trigger ImpSense
Vref caps: HIZ 50 80
Pin Default 0x0321101f: [Jack] HP Out at Ext Left
Conn = 1/8, Color = Black
DefAssociation = 0x1, Sequence = 0xf
Pin-ctls: 0xc0: OUT HP VREF_HIZ
Unsolicited: tag=01, enabled=1
Connection: 1
0x0d
Node 0x15 [Pin Complex] wcaps 0x40018d: Stereo Amp-Out
Amp-Out caps: ofs=0x00, nsteps=0x00, stepsize=0x00, mute=1
Amp-Out vals: [0x80 0x80]
Pincap 0x0000133f: IN OUT HP Detect Trigger ImpSense
Vref caps: HIZ 50 80
Pin Default 0x411111f0: [N/A] Speaker at Ext Rear
Conn = 1/8, Color = Black
DefAssociation = 0xf, Sequence = 0x0
Misc = NO_PRESENCE
Pin-ctls: 0x20: IN VREF_HIZ
Unsolicited: tag=00, enabled=0
Connection: 1
0x0e
Node 0x16 [Pin Complex] wcaps 0x400001: Stereo
Control: name="CD Phantom Jack", index=0, device=0
Pincap 0x00000020: IN
Pin Default 0x88331122: [Fixed] CD at Ext Drive Bar
Conn = ATAPI, Color = Black
DefAssociation = 0x2, Sequence = 0x2
Misc = NO_PRESENCE
Pin-ctls: 0x00:
Node 0x17 [Pin Complex] wcaps 0x400000: Mono
Pincap 0x00000020: IN
Pin Default 0xb7931123: [Fixed] Aux at Oth Mobile-In
Conn = ATAPI, Color = Black
DefAssociation = 0x2, Sequence = 0x3
Misc = NO_PRESENCE
Pin-ctls: 0x00:
Node 0x18 [Pin Complex] wcaps 0x400380: Mono Digital
Pincap 0x00000014: OUT Detect
Pin Default 0x411111f0: [N/A] Speaker at Ext Rear
Conn = 1/8, Color = Black
DefAssociation = 0xf, Sequence = 0x0
Misc = NO_PRESENCE
Pin-ctls: 0x00:
Unsolicited: tag=00, enabled=0
Connection: 1
0x03
Node 0x19 [Pin Complex] wcaps 0x400280: Mono Digital
Pincap 0x00000024: IN Detect
Pin Default 0x411111f0: [N/A] Speaker at Ext Rear
Conn = 1/8, Color = Black
DefAssociation = 0xf, Sequence = 0x0
Misc = NO_PRESENCE
Pin-ctls: 0x00:
Unsolicited: tag=00, enabled=0
Node 0x1a [Vendor Defined Widget] wcaps 0xf00040: Mono
Processing caps: benign=0, ncoeff=13
Node 0x1b [Volume Knob Widget] wcaps 0x600080: Mono
Volume-Knob: delta=0, steps=64, direct=0, val=0
Unsolicited: tag=00, enabled=0
Connection: 0
^ permalink raw reply
* [U-Boot] [RFC][PULL-REQ] MTD update
From: Wolfgang Denk @ 2012-12-28 13:51 UTC (permalink / raw)
To: u-boot
In-Reply-To: <20121228121741.GA29289@build.ihdev.net>
Dear Sergey Lapin,
In message <20121228121741.GA29289@build.ihdev.net> you wrote:
>
> As I failed to submit 250KB patch to the list
You did not fail. You just have to be patient until a moderator finds
time to review and acknowledge your posting. Given that this is
vacation time, you should even allow for more time.
> I will send this pull request
This will not work. All patches have to be posted here, so they are
logged in patchwork.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The human race is faced with a cruel choice: work or daytime tele-
vision.
^ permalink raw reply
* [Patch RFC] ndisc: Fix skb allocation size for link layer options.
From: Stephan Gatzka @ 2012-12-28 13:46 UTC (permalink / raw)
To: netdev; +Cc: yoshfuji, Stephan Gatzka
Signed-off-by: Stephan Gatzka <stephan.gatzka@gmail.com>
---
net/ipv6/ndisc.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
index 6574175..b12b94c 100644
--- a/net/ipv6/ndisc.c
+++ b/net/ipv6/ndisc.c
@@ -392,7 +392,7 @@ static struct sk_buff *ndisc_build_skb(struct net_device *dev,
len = sizeof(struct icmp6hdr) + (target ? sizeof(*target) : 0);
if (llinfo)
- len += ndisc_opt_addr_space(dev);
+ len += sizeof(struct nd_opt_hdr) + ndisc_opt_addr_space(dev);
skb = sock_alloc_send_skb(sk,
(MAX_HEADER + sizeof(struct ipv6hdr) +
@@ -1424,7 +1424,8 @@ void ndisc_send_redirect(struct sk_buff *skb, const struct in6_addr *target)
memcpy(ha_buf, neigh->ha, dev->addr_len);
read_unlock_bh(&neigh->lock);
ha = ha_buf;
- len += ndisc_opt_addr_space(dev);
+ len += sizeof(struct nd_opt_hdr) +
+ ndisc_opt_addr_space(dev);
} else
read_unlock_bh(&neigh->lock);
--
1.7.9.5
^ permalink raw reply related
* Re: [Bridge] Update to RSTP lib
From: Christopher Merck @ 2012-12-28 13:47 UTC (permalink / raw)
To: bridge@lists.linux-foundation.org
[-- Attachment #1.1: Type: text/plain, Size: 1124 bytes --]
> > On Mon, Jan 12, 2009 at 1:22 PM, Manish Talreja <mtalreja at crestron.com> wrote:
> > > We have been using the RSTP implementation posted at this location:
> > >
> > > https://lists.linux-foundation.org/pipermail/bridge/2008-May/00585
> > > 9.html
> > >
> > >
> > >
> > > We have modified rstp.c and rstp.h to work with compilers other than gcc.
> > > Attached are two patch files that show our changes. Currently, we
> > > have tested this code with the Diab compiler (v 4.4a) and with IAR
> > > compiler (v 5.11).
> > >
We have further modified rstp.c and rstp.h to work with more compilers. The attached unified diff shows the changes. This has currently been tested with VC++ 2008.
Regards,
Chris Merck
This e-mail message and all attachments transmitted with it may contain legally privileged and confidential information intended solely for the use of the addressee. If you are not the intended recipient, you are hereby notified that any reading, dissemination, distribution, copying, or other use of this message or its attachments is strictly prohibited.
[-- Attachment #1.2: Type: text/html, Size: 2987 bytes --]
[-- Attachment #2: rstp.patch --]
[-- Type: application/octet-stream, Size: 16333 bytes --]
--- rstp.h.orig 2012-12-21 09:24:35.492806900 -0500
+++ rstp.h 2012-12-21 09:24:45.710741400 -0500
@@ -222,6 +222,7 @@
void *STP_OUT_mem_zalloc(unsigned int size);
void STP_OUT_mem_free(void *);
+int STP_OUT_topologychanged(int setOrRead);
@@ -232,6 +233,10 @@
#define COMPILER_INLINE_PACK __packed__
#elif defined (__ICCARM__)
#define COMPILER_INLINE_PACK
+#elif defined WIN32
+#define COMPILER_INLINE_PACK
+#elif defined WINCE
+#define COMPILER_INLINE_PACK
#else
DEFINE PACKING FOR YOUR COMPILER
#endif
--- rstp.c.orig 2012-12-21 09:27:38.374409000 -0500
+++ rstp.c 2012-12-21 09:27:53.053914900 -0500
@@ -28,11 +28,21 @@
Section references in the code refer to those parts of the standard.
*********************************************************************/
+/* Changes:
+23 MAY 12:
+ renamed WINCE_BUILD, STP_DEBUG_PRINT, STP_ERROR_PRINT, and STP_ABORT macros
+ added STP_ERROR_PRINT_NO_REFS macro to avoid dereference of uninitialized pointers (bug in original code)
+*/
+
#include "rstp.h"
#include <string.h>
-/* Macros to be used in the later parts */
+#ifdef WINCE_BUILD
+ #pragma warning(disable: 4127 4244 4100 4389 4245 4700)
+ #define inline
+#endif
+/* Macros to be used in the later parts */
#ifndef NULL
#define NULL ((void *)0)
@@ -107,19 +117,21 @@
/* Logging macros */
#ifndef __GNUC__
-#define DEBUG(...) \
+#define STP_DEBUG_PRINT(...) \
STP_OUT_logmsg(BRIDGE->user_ref, PORT->user_ref, STP_LOG_LEVEL_DEBUG, __VA_ARGS__)
-#define ERROR(...) \
+#define STP_ERROR_PRINT(...) \
STP_OUT_logmsg(BRIDGE->user_ref, PORT->user_ref, STP_LOG_LEVEL_ERROR, __VA_ARGS__)
-#define ABORT(...) \
- { ERROR(__VA_ARGS__);}
+#define STP_ERROR_PRINT_NO_REFS(...) \
+ STP_OUT_logmsg(NULL, NULL, STP_LOG_LEVEL_ERROR, __VA_ARGS__)
+#define STP_ABORT(...) \
+ { STP_ERROR_PRINT(__VA_ARGS__);}
#else
-#define DEBUG(fmt...) \
+#define STP_DEBUG_PRINT(fmt...) \
STP_OUT_logmsg(BRIDGE->user_ref, PORT->user_ref, STP_LOG_LEVEL_DEBUG, fmt)
-#define ERROR(fmt...) \
+#define STP_ERROR_PRINT(fmt...) \
STP_OUT_logmsg(BRIDGE->user_ref, PORT->user_ref, STP_LOG_LEVEL_ERROR, fmt)
-#define ABORT(fmt...) \
- ({ ERROR(fmt); *(int *)0 = 1; })
+#define STP_ABORT(fmt...) \
+ ({ STP_ERROR_PRINT(fmt); *(int *)0 = 1; })
#endif
/***************** Macros for state machine descriptions ********************/
@@ -151,7 +163,7 @@
{ \
if (_cond) { \
new_state = STN(_new_state); \
- DEBUG("%s: Transition to state %s\n", _STR(STM_NAME), #_new_state); \
+ STP_DEBUG_PRINT("%s: Transition to state %s\n", _STR(STM_NAME), #_new_state); \
goto STM_LABEL(_new_state); \
} \
}
@@ -160,7 +172,7 @@
({ \
if (_cond) { \
new_state = STN(_new_state); \
- DEBUG("%s: Transition to state %s\n", _STR(STM_NAME), #_new_state); \
+ STP_DEBUG_PRINT("%s: Transition to state %s\n", _STR(STM_NAME), #_new_state); \
goto STM_LABEL(_new_state); \
} \
})
@@ -189,13 +201,13 @@
#define BG(...) \
case STN(BEGIN): \
__VA_ARGS__ \
- ABORT("%s: No where to go from BEGIN\n", _STR(STM_NAME)); \
+ STP_ABORT("%s: No where to go from BEGIN\n", _STR(STM_NAME)); \
return -1
#else
#define BG(_transitions...) \
case STN(BEGIN): \
_transitions \
- ABORT("%s: No where to go from BEGIN\n", _STR(STM_NAME)); \
+ STP_ABORT("%s: No where to go from BEGIN\n", _STR(STM_NAME)); \
return -1
#endif
@@ -221,6 +233,12 @@
/* This just barely works. _args expansion includes commas */
//int STM_FUNC(STM_NAME)(int state, int single_step, _args)
+#ifdef WINCE_BUILD
+ #define FUNC __FUNCTION__
+#else
+ #define FUNC __func__
+#endif
+
#ifndef __GNUC__
#define STM(_args, ...) \
static STM_FUNC_DECL(STM_FUNC(STM_NAME), _args) \
@@ -229,7 +247,7 @@
switch (state) { \
__VA_ARGS__ \
default: \
- ABORT("%s: Got unknown state %d\n", __func__, state); \
+ STP_ABORT("%s: Got unknown state %d\n", FUNC, state); \
return -1; \
} \
}
@@ -241,7 +259,7 @@
switch (state) { \
_contents \
default: \
- ABORT("%s: Got unknown state %d\n", __func__, state); \
+ STP_ABORT("%s: Got unknown state %d\n", FUNC, state); \
return -1; \
} \
}
@@ -295,32 +313,31 @@
typedef uint bool;
-#ifdef __ICCARM__
-#pragma pack(1)
-#endif
+#if defined(__ICCARM__) || defined(WINCE_BUILD)
+#pragma pack(1)
+#endif
typedef COMPILER_INLINE_PACK struct _BridgeId {
uchar bridge_identifier_priority[2];
uchar bridge_address[6];
} __attribute__((packed)) BridgeId;
-#ifdef __ICCARM__
-#pragma pack()
-#endif
-
-#ifdef __ICCARM__
-#pragma pack(1)
-#endif
+#if defined(__ICCARM__) || defined(WINCE_BUILD)
+#pragma pack()
+#endif
+
+#if defined(__ICCARM__) || defined(WINCE_BUILD)
+#pragma pack(1)
+#endif
typedef COMPILER_INLINE_PACK struct _PathCost{
uchar cost[4];
} __attribute__((packed)) PathCost;
-#ifdef __ICCARM__
-#pragma pack()
-#endif
+#if defined(__ICCARM__) || defined(WINCE_BUILD)
+#pragma pack()
+#endif
static inline uint path_cost_to_uint(PathCost x)
{
return
(x.cost[0] << 24) + (x.cost[1] << 16) + (x.cost[2] << 8) + (x.cost[3]);
-
}
#ifndef __GNUC__
@@ -355,24 +372,24 @@
#endif
-#ifdef __ICCARM__
-#pragma pack(1)
-#endif
+#if defined(__ICCARM__) || defined(WINCE_BUILD)
+#pragma pack(1)
+#endif
typedef COMPILER_INLINE_PACK struct _PortId {
uchar port_id[2]; /* 4 high bits of priority and 12 for Id */
} __attribute__((packed)) PortId;
-#ifdef __ICCARM__
-#pragma pack()
-#endif
+#if defined(__ICCARM__) || defined(WINCE_BUILD)
+#pragma pack()
+#endif
static inline uint port_id_to_uint(PortId p)
{
return (p.port_id[0] << 8) + p.port_id[1];
}
-#ifdef __ICCARM__
-#pragma pack(1)
-#endif
+#if defined(__ICCARM__) || defined(WINCE_BUILD)
+#pragma pack(1)
+#endif
typedef COMPILER_INLINE_PACK struct _PriorityVector
{
BridgeId root_bridge_id;
@@ -381,13 +398,13 @@
PortId designated_port_id;
PortId bridge_port_id;
} __attribute__((packed)) PriorityVector;
-#ifdef __ICCARM__
-#pragma pack()
-#endif
-
-#ifdef __ICCARM__
-#pragma pack(1)
-#endif
+#if defined(__ICCARM__) || defined(WINCE_BUILD)
+#pragma pack()
+#endif
+
+#if defined(__ICCARM__) || defined(WINCE_BUILD)
+#pragma pack(1)
+#endif
/* First 4 components of priority vector */
typedef COMPILER_INLINE_PACK struct _PriorityVector4
{
@@ -396,9 +413,9 @@
BridgeId designated_bridge_id;
PortId designated_port_id;
} __attribute__((packed)) PriorityVector4;
-#ifdef __ICCARM__
-#pragma pack()
-#endif
+#if defined(__ICCARM__) || defined(WINCE_BUILD)
+#pragma pack()
+#endif
typedef struct _Times
{
@@ -467,9 +484,9 @@
#define STP_PROTOCOL_ID 0
-#ifdef __ICCARM__
-#pragma pack(1)
-#endif
+#if defined(__ICCARM__) || defined(WINCE_BUILD)
+#pragma pack(1)
+#endif
typedef COMPILER_INLINE_PACK struct _RawBPDU
{
uint16 protocol_id;
@@ -506,9 +523,9 @@
uchar RST_END[0];
#endif
} __attribute__((packed)) RawBPDU;
-#ifdef __ICCARM__
-#pragma pack()
-#endif
+#if defined(__ICCARM__) || defined(WINCE_BUILD)
+#pragma pack()
+#endif
#ifndef __GNU_C
@@ -1156,6 +1173,7 @@
/* Becoming nonzero from zero */
BRIDGE->tc_count++;
BRIDGE->time_since_tc = 0;
+ STP_OUT_topologychanged(1);
}
BRIDGE->tcWhile_count+= change;
@@ -1382,7 +1400,7 @@
set_bpdu_times(&b, &designatedTimes);
- DEBUG("Sending Config BPDU\n");
+ STP_DEBUG_PRINT("Sending Config BPDU\n");
#ifndef __GNUC__
STP_OUT_tx_bpdu(PORT->user_ref, &b, CONFIG_END_SIZE_BYTES);
#else
@@ -1424,7 +1442,7 @@
b.version1_len = 0;
- DEBUG("Sending RST BPDU\n");
+ STP_DEBUG_PRINT("Sending RST BPDU\n");
#ifndef __GNUC__
STP_OUT_tx_bpdu(PORT->user_ref, &b, RST_END_SIZE_BYTES);
#else
@@ -1441,7 +1459,7 @@
b.version = 0;
b.type = BPDUTypeTCN;
- DEBUG("Sending TCN BPDU\n");
+ STP_DEBUG_PRINT("Sending TCN BPDU\n");
#ifndef __GNUC__
STP_OUT_tx_bpdu(PORT->user_ref, &b, TCN_END_SIZE_BYTES);
#else
@@ -1594,9 +1612,9 @@
}
break;
default:
- ERROR("Unknown value for infoIs: %d\n", infoIs);
+ STP_ERROR_PRINT("Unknown value for infoIs: %d\n", infoIs);
}
- DEBUG("Selected Role Set to: %d\n", selectedRole);
+ STP_DEBUG_PRINT("Selected Role Set to: %d\n", selectedRole);
);
}
@@ -2642,7 +2660,7 @@
return; // No action - else we might fail the next test
if (rcvdBpdu) {
- ABORT("Port hasn't processed old BPDU\n");
+ STP_ABORT("Port hasn't processed old BPDU\n");
return;
}
@@ -2652,7 +2670,7 @@
if (p->protocol_id != STP_PROTOCOL_ID)
return;
- DEBUG("Received BPDU of type %d\n", p->type);
+ STP_DEBUG_PRINT("Received BPDU of type %d\n", p->type);
if (// 9.3.4 a)
(p->type == BPDUTypeConfig &&
@@ -2673,7 +2691,7 @@
/* BPDU has been validated */
}
else {
- DEBUG("BPDU validation failed\n");
+ STP_DEBUG_PRINT("BPDU validation failed\n");
return;
}
@@ -2723,7 +2741,7 @@
static int check_times(BRIDGE_ARGS_PROTO, int max_age, int fwd_delay)
{
if (2*(fwd_delay - 1) < max_age) {
- ERROR("Configured BridgeTimes doesn't meet "
+ STP_ERROR_PRINT("Configured BridgeTimes doesn't meet "
"2 * (Bridge Foward Delay - 1) >= Bridge Max Age\n");
return -1;
}
@@ -2731,7 +2749,7 @@
// This condition never fails, with hello_time == 2 && max_age >= 6.
// So no need to check.
//if (max_age < 2*(BridgeHelloTime + 1)) {
- // ERROR("Doesn't meet Bridge Max Age >= 2 * (Bridge Hello Time + 1) ");
+ // STP_ERROR_PRINT("Doesn't meet Bridge Max Age >= 2 * (Bridge Hello Time + 1) ");
// return -1;
//}
@@ -2750,7 +2768,7 @@
if (cfg->set_bridge_protocol_version) {
if (cfg->bridge_protocol_version != 0 && cfg->bridge_protocol_version != 2) {
- ERROR("Protocol version must be 0 or 2\n");
+ STP_ERROR_PRINT("Protocol version must be 0 or 2\n");
r = -1;
}
}
@@ -2760,7 +2778,7 @@
if (cfg->set_bridge_priority) {
// 17.14 - Table 17-2
if (cfg->bridge_priority & ~0xf000) {
- ERROR("Bridge Priority restricted to 0-61440 in steps of 4096\n");
+ STP_ERROR_PRINT("Bridge Priority restricted to 0-61440 in steps of 4096\n");
r = -1;
}
}
@@ -2771,7 +2789,7 @@
if (cfg->set_bridge_hello_time) {
// 17.14 - Table 17-1
if (cfg->bridge_hello_time != BridgeHelloTime) {
- ERROR("Hello Time cannot be changed from 2s in RSTP\n");
+ STP_ERROR_PRINT("Hello Time cannot be changed from 2s in RSTP\n");
r = -1;
}
new_times.hello_time = cfg->bridge_hello_time;
@@ -2781,7 +2799,7 @@
if (cfg->set_bridge_max_age) {
// 17.14 - Table 17-1
if (cfg->bridge_max_age < 6 || cfg->bridge_max_age > 40) {
- ERROR("Bridge Max Age must be between 6 and 40\n");
+ STP_ERROR_PRINT("Bridge Max Age must be between 6 and 40\n");
r = -1;
}
new_times.max_age = cfg->bridge_max_age;
@@ -2791,7 +2809,7 @@
if (cfg->set_bridge_forward_delay) {
// 17.14 - Table 17-1
if (cfg->bridge_forward_delay < 4 || cfg->bridge_forward_delay > 30) {
- ERROR("Bridge Forward Delay must be between 4 and 30\n");
+ STP_ERROR_PRINT("Bridge Forward Delay must be between 4 and 30\n");
r = -1;
}
new_times.forward_delay = cfg->bridge_forward_delay;
@@ -2804,7 +2822,7 @@
if (cfg->set_bridge_tx_hold_count) {
// 17.14 - Table 17-1
if (cfg->bridge_tx_hold_count < 1 || cfg->bridge_tx_hold_count > 10) {
- ERROR("Transmit Hold Count must be between 1 and 10\n");
+ STP_ERROR_PRINT("Transmit Hold Count must be between 1 and 10\n");
r = -1;
}
}
@@ -2906,7 +2924,7 @@
if (cfg->set_port_priority) {
// 17.14 - Table 17-2
if (cfg->port_priority & ~0xf0) {
- ERROR("Port Priority restricted to 0-240 in steps of 16\n");
+ STP_ERROR_PRINT("Port Priority restricted to 0-240 in steps of 16\n");
r = -1;
}
}
@@ -2914,28 +2932,28 @@
if (cfg->set_port_pathcost) {
// 17.14 - Note 3 and Table 17-3
if (cfg->port_pathcost > 200000000) {
- ERROR("Port path cost restricted to 1-200,000,000 or 0 for auto\n");
+ STP_ERROR_PRINT("Port path cost restricted to 1-200,000,000 or 0 for auto\n");
r = -1;
}
}
if (cfg->set_port_admin_edge) {
if (cfg->port_admin_edge != 0 && cfg->port_admin_edge != 1) {
- ERROR("Admin Edge must be 0 or 1\n");
+ STP_ERROR_PRINT("Admin Edge must be 0 or 1\n");
r = -1;
}
}
if (cfg->set_port_auto_edge) {
if (cfg->port_auto_edge != 0 && cfg->port_auto_edge != 1) {
- ERROR("Auto Edge must be 0 or 1\n");
+ STP_ERROR_PRINT("Auto Edge must be 0 or 1\n");
r = -1;
}
}
if (cfg->set_port_admin_p2p) {
if (cfg->port_admin_p2p < 0 || cfg->port_admin_p2p > 2) {
- ERROR("Admin P2P must be "
+ STP_ERROR_PRINT("Admin P2P must be "
"0 (force false), 1 (force true), or 2 (auto)\n");
r = -1;
}
@@ -3126,7 +3144,7 @@
Bridge *BRIDGE = PORT->bridge;
if (!BRIDGE->stp_on) {
- ERROR("Bridge is down\n");
+ STP_ERROR_PRINT("Bridge is down\n");
return -1;
}
@@ -3221,7 +3239,7 @@
Bridge *b = STP_OUT_mem_zalloc(sizeof(Bridge));
if (!b) {
- ERROR("Couldn't allocate memory for bridge\n");
+ STP_ERROR_PRINT_NO_REFS("Couldn't allocate memory for bridge\n");
return NULL;
}
@@ -3268,14 +3286,14 @@
Port *PORT;
if (port_number == 0 || (port_number & ~0x0fff)) {
- ERROR("Port id should be in the range 1 - 1023\n");
+ STP_ERROR_PRINT_NO_REFS("Port id should be in the range 1 - 1023\n");
return NULL;
}
p = STP_OUT_mem_zalloc(sizeof(Port));
if (!p) {
- ERROR("Couldn't allocate memory for port\n");
+ STP_ERROR_PRINT_NO_REFS("Couldn't allocate memory for port\n");
return NULL;
}
@@ -3312,7 +3330,7 @@
void STP_IN_port_delete(Port *PORT)
{
Bridge *BRIDGE = PORT->bridge;
- Port **prev;
+ Port **prev;
/* Disable */
if (portEnabled) {
@@ -3326,7 +3344,7 @@
prev = &(*prev)->port_next;
if (*prev == NULL)
- ABORT("port not in its bridge's list\n");
+ STP_ABORT("port not in its bridge's list\n");
/* Remove from list */
*prev = PORT->port_next;
^ permalink raw reply
* Re: [patch 00/03 v2] driver for Masterkit MA901 usb radio
From: Alexey Klimov @ 2012-12-28 13:23 UTC (permalink / raw)
To: Hans Verkuil; +Cc: linux-media, dougsland
In-Reply-To: <201212281124.51772.hverkuil@xs4all.nl>
Hi Hans,
On Fri, Dec 28, 2012 at 2:24 PM, Hans Verkuil <hverkuil@xs4all.nl> wrote:
> On Mon November 12 2012 07:56:06 Alexey Klimov wrote:
>> Hi all,
>>
>> This is second version of small patch series for ma901 usb radio driver.
>> Initial letter about this usb radio was sent on October 29 and can be
>> found here: http://www.spinics.net/lists/linux-media/msg55779.html
>>
>> Changes:
>> - removed f->type check and set in vidioc_g_frequency()
>> - added maintainers entry patch
>
> For the whole patch series:
>
> Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
>
> PS: Sorry for the late reply. The 'Date:' line of these emails was November 12, but
> they were sent on November 27! So my email client sorted them way down in the list,
> out of sight. You might want to check the date in the future...
Sorry!..
It looks like i sent them from odroid-x arm board that i use to play
with and test usb radio devices that i have.
This arm board doesn't have battery to save RTC time and gentoo in
current configuration doesn't use NTP to update time from internet.
BTW, thanks!
--
Best regards, Klimov Alexey
^ permalink raw reply
* Re: BUG: unable to handle kernel NULL pointer dereference at 0000000000000500
From: Zlatko Calusic @ 2012-12-28 13:43 UTC (permalink / raw)
To: Zhouping Liu
Cc: linux-mm, linux-kernel, Ingo Molnar, Johannes Weiner, mgorman,
hughd, Andrea Arcangeli, Hillf Danton, sedat.dilek
In-Reply-To: <50DD5FD9.2080303@redhat.com>
On 28.12.2012 10:01, Zhouping Liu wrote:
> On 12/28/2012 10:45 AM, Zhouping Liu wrote:
>>> Thank you for the report Zhouping!
>>>
>>> Would you be so kind to test the following patch and report results?
>>> Apply the patch to the latest mainline.
>> Hello Zlatko,
>>
>> I have tested the below patch(applied it on mainline directly),
>> but IMO, I'd like to say it maybe don't fix the issue completely.
>
> Hi Zlatko,
>
> I re-tested it on another machine, which has 60+ Gb RAM and 4 numa nodes,
> without your patch, it's easy to reproduce the 'NULL pointer' error,
> after applying your patch, I couldn't reproduce the issue any more.
>
> depending on the above, it implied that your patch fixed the issue.
>
Yes, that's exactly what I expected. Just wanted to doublecheck this
time. Live and learn. ;)
> but in my last mail, I tested it on two machines, which caused hung task
> with your patch,
> so I'm confusing is it your patch block some oom-killer performance? if
> it's not, your patch is good for me.
>
From what I know, the patch shouldn't have much influence on the oom
killer, if any. But, as all those subsystems are closely interconnected,
both oom & vmscan code is mm after all, there could be some
interference. Is the hung-task issue repeatable?
--
Zlatko
^ permalink raw reply
* Re: BUG: unable to handle kernel NULL pointer dereference at 0000000000000500
From: Zlatko Calusic @ 2012-12-28 13:43 UTC (permalink / raw)
To: Zhouping Liu
Cc: linux-mm, linux-kernel, Ingo Molnar, Johannes Weiner, mgorman,
hughd, Andrea Arcangeli, Hillf Danton, sedat.dilek
In-Reply-To: <50DD5FD9.2080303@redhat.com>
On 28.12.2012 10:01, Zhouping Liu wrote:
> On 12/28/2012 10:45 AM, Zhouping Liu wrote:
>>> Thank you for the report Zhouping!
>>>
>>> Would you be so kind to test the following patch and report results?
>>> Apply the patch to the latest mainline.
>> Hello Zlatko,
>>
>> I have tested the below patch(applied it on mainline directly),
>> but IMO, I'd like to say it maybe don't fix the issue completely.
>
> Hi Zlatko,
>
> I re-tested it on another machine, which has 60+ Gb RAM and 4 numa nodes,
> without your patch, it's easy to reproduce the 'NULL pointer' error,
> after applying your patch, I couldn't reproduce the issue any more.
>
> depending on the above, it implied that your patch fixed the issue.
>
Yes, that's exactly what I expected. Just wanted to doublecheck this
time. Live and learn. ;)
> but in my last mail, I tested it on two machines, which caused hung task
> with your patch,
> so I'm confusing is it your patch block some oom-killer performance? if
> it's not, your patch is good for me.
>
From what I know, the patch shouldn't have much influence on the oom
killer, if any. But, as all those subsystems are closely interconnected,
both oom & vmscan code is mm after all, there could be some
interference. Is the hung-task issue repeatable?
--
Zlatko
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply
* Re: How to pair device from CLI?
From: Kamil Jońca @ 2012-12-28 13:30 UTC (permalink / raw)
To: linux-bluetooth
In-Reply-To: <20121228080842.GA28814@x220.P-661HNU-F1>
[-- Attachment #1: Type: text/plain, Size: 690 bytes --]
Johan Hedberg <johan.hedberg-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
writes:
> Hi Kamil,
>
> On Fri, Dec 28, 2012, Kamil Jońca wrote:
[....]
>
> It's quite odd that you should get RequestPasskey. That's something that
> should only happen if you're pretending to be a keyboard in which case
> you should enter the passkey displayed on the remote device (your phone
> in this case).
Nothing shows on my phone.
>
>> What do I should check? (s)trace?
>>
>> Distribution is pretty fresh debian sid.
>
> The most useful too would be hcidump (bluez-hcidump package). The output
> of hcidump -X for the full pairing process would be interesting.
Two tries in attachment.
[-- Attachment #2: Log --]
[-- Type: text/plain, Size: 6851 bytes --]
Sorry, try again.
HCI sniffer - Bluetooth packet analyzer ver 2.4
device: hci0 snap_len: 1028 filter: 0xffffffffffffffff
< HCI Command: Create Connection (0x01|0x0005) plen 13
bdaddr D4:E8:B2:AA:15:FA ptype 0xcc18 rswitch 0x01 clkoffset 0x0000
Packet type: DM1 DM3 DM5 DH1 DH3 DH5
> HCI Event: Command Status (0x0f) plen 4
Create Connection (0x01|0x0005) status 0x00 ncmd 1
> HCI Event: Role Change (0x12) plen 8
status 0x00 bdaddr D4:E8:B2:AA:15:FA role 0x01
Role: Slave
> HCI Event: Connect Complete (0x03) plen 11
status 0x00 handle 12 bdaddr D4:E8:B2:AA:15:FA type ACL encrypt 0x00
< HCI Command: Read Remote Supported Features (0x01|0x001b) plen 2
handle 12
> HCI Event: Max Slots Change (0x1b) plen 3
handle 12 slots 5
> HCI Event: Command Status (0x0f) plen 4
Read Remote Supported Features (0x01|0x001b) status 0x00 ncmd 1
> HCI Event: Read Remote Supported Features (0x0b) plen 11
status 0x00 handle 12
Features: 0xbf 0xfe 0x8f 0xfe 0x9b 0xff 0x79 0x83
< HCI Command: Read Remote Extended Features (0x01|0x001c) plen 3
handle 12 page 1
> HCI Event: Command Status (0x0f) plen 4
Read Remote Extended Features (0x01|0x001c) status 0x00 ncmd 1
> HCI Event: Read Remote Extended Features (0x23) plen 13
status 0x00 handle 12 page 1 max 1
Features: 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00
< HCI Command: Remote Name Request (0x01|0x0019) plen 10
bdaddr D4:E8:B2:AA:15:FA mode 2 clkoffset 0x0000
> HCI Event: Command Status (0x0f) plen 4
Remote Name Request (0x01|0x0019) status 0x00 ncmd 1
> HCI Event: Link Supervision Timeout Change (0x38) plen 4
handle 12 timeout 8000
> HCI Event: Remote Name Req Complete (0x07) plen 255
status 0x00 bdaddr D4:E8:B2:AA:15:FA name 'theta'
< HCI Command: Authentication Requested (0x01|0x0011) plen 2
handle 12
> HCI Event: Command Status (0x0f) plen 4
Authentication Requested (0x01|0x0011) status 0x00 ncmd 1
> HCI Event: Link Key Request (0x17) plen 6
bdaddr D4:E8:B2:AA:15:FA
< HCI Command: Link Key Request Negative Reply (0x01|0x000c) plen 6
bdaddr D4:E8:B2:AA:15:FA
> HCI Event: Command Complete (0x0e) plen 10
Link Key Request Negative Reply (0x01|0x000c) ncmd 1
status 0x00 bdaddr D4:E8:B2:AA:15:FA
> HCI Event: IO Capability Request (0x31) plen 6
bdaddr D4:E8:B2:AA:15:FA
< HCI Command: IO Capability Request Reply (0x01|0x002b) plen 9
bdaddr D4:E8:B2:AA:15:FA capability 0x04 oob 0x00 auth 0x03
Capability: Reserved (OOB data not present)
Authentication: Dedicated Bonding (MITM Protection)
> HCI Event: Command Complete (0x0e) plen 10
IO Capability Request Reply (0x01|0x002b) ncmd 1
status 0x00 bdaddr D4:E8:B2:AA:15:FA
> HCI Event: IO Capability Response (0x32) plen 9
bdaddr D4:E8:B2:AA:15:FA capability 0x01 oob 0x00 auth 0x03
Capability: DisplayYesNo (OOB data not present)
Authentication: Dedicated Bonding (MITM Protection)
> HCI Event: User Passkey Request (0x34) plen 6
bdaddr D4:E8:B2:AA:15:FA
< HCI Command: User Passkey Request Reply (0x01|0x002e) plen 10
bdaddr D4:E8:B2:AA:15:FA passkey 0
> HCI Event: Command Complete (0x0e) plen 10
User Passkey Request Reply (0x01|0x002e) ncmd 1
status 0x00 bdaddr D4:E8:B2:AA:15:FA
> HCI Event: Simple Pairing Complete (0x36) plen 7
status 0x05 bdaddr D4:E8:B2:AA:15:FA
Error: Authentication Failure
> HCI Event: Auth Complete (0x06) plen 3
status 0x05 handle 12
Error: Authentication Failure
> HCI Event: Disconn Complete (0x05) plen 4
status 0x00 handle 12 reason 0x05
Reason: Authentication Failure
< HCI Command: Create Connection (0x01|0x0005) plen 13
bdaddr D4:E8:B2:AA:15:FA ptype 0xcc18 rswitch 0x01 clkoffset 0x0000
Packet type: DM1 DM3 DM5 DH1 DH3 DH5
> HCI Event: Command Status (0x0f) plen 4
Create Connection (0x01|0x0005) status 0x00 ncmd 1
> HCI Event: Connect Complete (0x03) plen 11
status 0x00 handle 12 bdaddr D4:E8:B2:AA:15:FA type ACL encrypt 0x00
< HCI Command: Read Remote Supported Features (0x01|0x001b) plen 2
handle 12
> HCI Event: Command Status (0x0f) plen 4
Read Remote Supported Features (0x01|0x001b) status 0x00 ncmd 1
> HCI Event: Read Remote Supported Features (0x0b) plen 11
status 0x00 handle 12
Features: 0xbf 0xfe 0x8f 0xfe 0x9b 0xff 0x79 0x83
< HCI Command: Read Remote Extended Features (0x01|0x001c) plen 3
handle 12 page 1
> HCI Event: Command Status (0x0f) plen 4
Read Remote Extended Features (0x01|0x001c) status 0x00 ncmd 1
> HCI Event: Max Slots Change (0x1b) plen 3
handle 12 slots 5
> HCI Event: Read Remote Extended Features (0x23) plen 13
status 0x00 handle 12 page 1 max 1
Features: 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00
< HCI Command: Remote Name Request (0x01|0x0019) plen 10
bdaddr D4:E8:B2:AA:15:FA mode 2 clkoffset 0x0000
> HCI Event: Command Status (0x0f) plen 4
Remote Name Request (0x01|0x0019) status 0x00 ncmd 1
> HCI Event: Remote Name Req Complete (0x07) plen 255
status 0x00 bdaddr D4:E8:B2:AA:15:FA name 'theta'
< HCI Command: Authentication Requested (0x01|0x0011) plen 2
handle 12
> HCI Event: Command Status (0x0f) plen 4
Authentication Requested (0x01|0x0011) status 0x00 ncmd 1
> HCI Event: Link Key Request (0x17) plen 6
bdaddr D4:E8:B2:AA:15:FA
< HCI Command: Link Key Request Negative Reply (0x01|0x000c) plen 6
bdaddr D4:E8:B2:AA:15:FA
> HCI Event: Command Complete (0x0e) plen 10
Link Key Request Negative Reply (0x01|0x000c) ncmd 1
status 0x00 bdaddr D4:E8:B2:AA:15:FA
> HCI Event: IO Capability Request (0x31) plen 6
bdaddr D4:E8:B2:AA:15:FA
< HCI Command: IO Capability Request Reply (0x01|0x002b) plen 9
bdaddr D4:E8:B2:AA:15:FA capability 0x04 oob 0x00 auth 0x03
Capability: Reserved (OOB data not present)
Authentication: Dedicated Bonding (MITM Protection)
> HCI Event: Command Complete (0x0e) plen 10
IO Capability Request Reply (0x01|0x002b) ncmd 1
status 0x00 bdaddr D4:E8:B2:AA:15:FA
> HCI Event: IO Capability Response (0x32) plen 9
bdaddr D4:E8:B2:AA:15:FA capability 0x01 oob 0x00 auth 0x03
Capability: DisplayYesNo (OOB data not present)
Authentication: Dedicated Bonding (MITM Protection)
> HCI Event: User Passkey Request (0x34) plen 6
bdaddr D4:E8:B2:AA:15:FA
< HCI Command: User Passkey Request Reply (0x01|0x002e) plen 10
bdaddr D4:E8:B2:AA:15:FA passkey 0
> HCI Event: Command Complete (0x0e) plen 10
User Passkey Request Reply (0x01|0x002e) ncmd 1
status 0x00 bdaddr D4:E8:B2:AA:15:FA
> HCI Event: Simple Pairing Complete (0x36) plen 7
status 0x05 bdaddr D4:E8:B2:AA:15:FA
Error: Authentication Failure
> HCI Event: Auth Complete (0x06) plen 3
status 0x05 handle 12
Error: Authentication Failure
> HCI Event: Disconn Complete (0x05) plen 4
status 0x00 handle 12 reason 0x05
Reason: Authentication Failure
[-- Attachment #3: Type: text/plain, Size: 159 bytes --]
--
http://modnebzdury.wordpress.com/2009/10/01/niewiarygodny-list-prof-majewskiej-wprowadzenie/
I want to reach your mind -- where is it currently located?
^ permalink raw reply
* Re: [PATCH] mm: fix null pointer dereference in wait_iff_congested()
From: Zlatko Calusic @ 2012-12-28 13:29 UTC (permalink / raw)
To: Minchan Kim
Cc: Andrew Morton, Mel Gorman, Linus Torvalds, Hugh Dickins, linux-mm,
Linux Kernel Mailing List, Zhouping Liu, Sedat Dilek
In-Reply-To: <20121228024928.GA19720@blaptop>
On 28.12.2012 03:49, Minchan Kim wrote:
> Hello Zlatko,
>
> On Fri, Dec 28, 2012 at 03:16:38AM +0100, Zlatko Calusic wrote:
>> From: Zlatko Calusic <zlatko.calusic@iskon.hr>
>>
>> The unintended consequence of commit 4ae0a48b is that
>> wait_iff_congested() can now be called with NULL struct zone*
>> producing kernel oops like this:
>
> For good description, it would be better to write simple pseudo code
> flow to show how NULL-zone pass into wait_iff_congested because
> kswapd code flow is too complex.
>
> As I see the code, we have following line above wait_iff_congested.
>
> if (!unbalanced_zone || blah blah)
> break;
>
> How can NULL unbalanced_zone reach wait_iff_congested?
>
Hello Minchan, and thanks for the comment.
That line was there before commit 4ae0a48b got in, and you're right,
it's what was protecting wait_iff_congested() from being called with
NULL zone*. But then all that logic got colapsed to a simple
pgdat_balanced() call and that's when I introduced the bug, I lost the
protection.
What I _think_ is happening (pseudo code following...) is that after
scanning the zone in the dma->highmem direction, and concluding that all
zones are balanced (unbalanced_zone remains NULL!),
wake_up(&pgdat->pfmemalloc_wait) wakes up a lot of memory hungry
processes (especially true in various aggressive test/benchmarks) that
immediately drain and unbalance one or more zones. Then pgdat_balanced()
call which immediately follows will be false, but we still have
unbalanced_zone = NULL, rememeber? Oops...
But, all that is a speculation that I can't prove atm. Of course, if
anybody thinks that's a credible explanation, I could add it as a commit
comment, or even as a code comment, but I didn't want to be overly
imaginative. The fix itself is simple and real.
Regards,
--
Zlatko
^ permalink raw reply
* Re: [PATCH] mm: fix null pointer dereference in wait_iff_congested()
From: Zlatko Calusic @ 2012-12-28 13:29 UTC (permalink / raw)
To: Minchan Kim
Cc: Andrew Morton, Mel Gorman, Linus Torvalds, Hugh Dickins, linux-mm,
Linux Kernel Mailing List, Zhouping Liu, Sedat Dilek
In-Reply-To: <20121228024928.GA19720@blaptop>
On 28.12.2012 03:49, Minchan Kim wrote:
> Hello Zlatko,
>
> On Fri, Dec 28, 2012 at 03:16:38AM +0100, Zlatko Calusic wrote:
>> From: Zlatko Calusic <zlatko.calusic@iskon.hr>
>>
>> The unintended consequence of commit 4ae0a48b is that
>> wait_iff_congested() can now be called with NULL struct zone*
>> producing kernel oops like this:
>
> For good description, it would be better to write simple pseudo code
> flow to show how NULL-zone pass into wait_iff_congested because
> kswapd code flow is too complex.
>
> As I see the code, we have following line above wait_iff_congested.
>
> if (!unbalanced_zone || blah blah)
> break;
>
> How can NULL unbalanced_zone reach wait_iff_congested?
>
Hello Minchan, and thanks for the comment.
That line was there before commit 4ae0a48b got in, and you're right,
it's what was protecting wait_iff_congested() from being called with
NULL zone*. But then all that logic got colapsed to a simple
pgdat_balanced() call and that's when I introduced the bug, I lost the
protection.
What I _think_ is happening (pseudo code following...) is that after
scanning the zone in the dma->highmem direction, and concluding that all
zones are balanced (unbalanced_zone remains NULL!),
wake_up(&pgdat->pfmemalloc_wait) wakes up a lot of memory hungry
processes (especially true in various aggressive test/benchmarks) that
immediately drain and unbalance one or more zones. Then pgdat_balanced()
call which immediately follows will be false, but we still have
unbalanced_zone = NULL, rememeber? Oops...
But, all that is a speculation that I can't prove atm. Of course, if
anybody thinks that's a credible explanation, I could add it as a commit
comment, or even as a code comment, but I didn't want to be overly
imaginative. The fix itself is simple and real.
Regards,
--
Zlatko
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply
* Re: Fw: [patch 02/03 v2] usb hid quirks for Masterkit MA901 usb radio
From: Jiri Kosina @ 2012-12-28 13:27 UTC (permalink / raw)
To: Mauro Carvalho Chehab; +Cc: LMML, Alexey Klimov
In-Reply-To: <20121228102928.4103390e@redhat.com>
On Fri, 28 Dec 2012, Mauro Carvalho Chehab wrote:
> Hi Jiri,
>
> There's another radio device that it is incorrectly detected as an HID driver.
> As I'll be applying the driver's patch via the media tree, do you mind if I also
> apply this hid patch there?
Hi Mauro,
please feel free to add
Acked-by: Jiri Kosina <jkosina@suse.cz>
and take the patch through your tree.
Thanks,
--
Jiri Kosina
SUSE Labs
^ permalink raw reply
* [Buildroot] buildroot for AM3358 AM3359 with wireless-tools shared library
From: Thomas Petazzoni @ 2012-12-28 13:21 UTC (permalink / raw)
To: buildroot
In-Reply-To: <1351596954.5576.22.camel@debian.fritz.box>
Dear J?rgen Benjamin Ronshausen,
On Tue, 30 Oct 2012 12:35:54 +0100, J?rgen Benjamin Ronshausen wrote:
> i am developing wireless tracking software. i use the wireless-tools
> library to scan for wireless networks in the area.
>
> i hope to use buildroot for compiling the c program, and to handle the
> library part. my program includes #include <iwlib.h>.
>
> on my old board (arm926t) i could compile by
> ~/buildroot-2012.08/output/host/usr/bin/arm-linux-gcc -Wall -o
> "oldboard" "main.c" -liw
>
> The new Board is a AM335x Starter Kit with a Sitara AM3358 Cortex A8 cpu
> and WL1271 Wifi/bluetooth module.
>
> to make my toolchain i issue:
>
> make beaglebone_defconfig
> make menuconfig and select under packages, networking wireless-tools and
> library. i included contents of .config below.
>
> The first problem is, that there are no files in
> /home/john/AM335/buildroot/output/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/lib
> i am not sure about it, but i think there should be the .so files for
> the compiler.
The problem you reported at
https://raw.github.com/steven11/the-hunt-for-wireless-tools/master/logfile1
was fixed in the current Git repository of Buildroot. It was a problem
on 32 bits hosts while building a toolchain with largefile support
disabled.
The commit fixing it is
http://git.buildroot.net/buildroot/commit/?id=7ce93438c12ca68c9bb12ed28c4d15d1fa840c94.
You can either use the current Git of Buildroot, of backport this fix
in 2012.11 (which should be trivial).
Do not hesitate to let us know if this solves your problem, or if you
face other issues.
Best regards,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply
* [PATCH,v2] [media] vivi: Constify structures
From: Kirill Smelkov @ 2012-12-28 13:12 UTC (permalink / raw)
To: Hans Verkuil; +Cc: Mauro Carvalho Chehab, linux-media, linux-kernel
In-Reply-To: <201212271255.11159.hverkuil@xs4all.nl>
On Thu, Dec 27, 2012 at 12:55:11PM +0100, Hans Verkuil wrote:
> On Wed December 26 2012 16:29:43 Kirill Smelkov wrote:
> > Most of *_ops and other structures in vivi.c were already declared const
> > but some have not. Constify and code/data will take less space:
> >
> > $ size drivers/media/platform/vivi.o
> > text data bss dec hex filename
> > before: 12569 248 8 12825 3219 drivers/media/platform/vivi.o
> > after: 12308 20 8 12336 3030 drivers/media/platform/vivi.o
> >
> > i.e. vivi.o is now ~500 bytes less.
> >
> > Signed-off-by: Kirill Smelkov <kirr@navytux.spb.ru>
> > ---
> > drivers/media/platform/vivi.c | 26 +++++++++++++-------------
> > 1 file changed, 13 insertions(+), 13 deletions(-)
> >
> > diff --git a/drivers/media/platform/vivi.c b/drivers/media/platform/vivi.c
> > index ec65089..bed04e1 100644
> > --- a/drivers/media/platform/vivi.c
> > +++ b/drivers/media/platform/vivi.c
> > @@ -91,13 +91,13 @@ static const struct v4l2_fract
> > ------------------------------------------------------------------*/
> >
> > struct vivi_fmt {
> > - char *name;
> > + const char *name;
>
> Just use one space before '*' since it no longer lines up to anything.
[...]
> > @@ -191,7 +191,7 @@ struct vivi_buffer {
> > /* common v4l buffer stuff -- must be first */
> > struct vb2_buffer vb;
> > struct list_head list;
> > - struct vivi_fmt *fmt;
> > + struct vivi_fmt const *fmt;
> > };
> >
> > struct vivi_dmaqueue {
> > @@ -250,7 +250,7 @@ struct vivi_dev {
> > int input;
> >
> > /* video capture */
> > - struct vivi_fmt *fmt;
> > + struct vivi_fmt const *fmt;
>
> 'const' should be before 'struct' for consistency reasons.
It's just a matter of style, and in this case I though putting const
after would not distract from the fact that fmt is `struct vivi_fmt *`
and also to align types beginning with non-const ones.
But anyway, style is style and this is not a big deal, so here you are
with corrected patch.
Thanks,
Kirill
---- 8< ----
From: Kirill Smelkov <kirr@navytux.spb.ru>
Date: Wed, 26 Dec 2012 19:23:26 +0400
Subject: [PATCH,v2] [media] vivi: Constify structures
Most of *_ops and other structures in vivi.c were already declared const
but some have not. Constify and code/data will take less space:
$ size drivers/media/platform/vivi.o
text data bss dec hex filename
before: 12569 248 8 12825 3219 drivers/media/platform/vivi.o
after: 12308 20 8 12336 3030 drivers/media/platform/vivi.o
i.e. vivi.o is now ~500 bytes less.
Signed-off-by: Kirill Smelkov <kirr@navytux.spb.ru>
---
drivers/media/platform/vivi.c | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
v2:
- put 'const' always before anything, as noted by Hans Verkuil.
- no changes otherwise.
diff --git a/drivers/media/platform/vivi.c b/drivers/media/platform/vivi.c
index ec65089..8a33a71 100644
--- a/drivers/media/platform/vivi.c
+++ b/drivers/media/platform/vivi.c
@@ -91,13 +91,13 @@ static const struct v4l2_fract
------------------------------------------------------------------*/
struct vivi_fmt {
- char *name;
+ const char *name;
u32 fourcc; /* v4l2 format id */
u8 depth;
bool is_yuv;
};
-static struct vivi_fmt formats[] = {
+static const struct vivi_fmt formats[] = {
{
.name = "4:2:2, packed, YUYV",
.fourcc = V4L2_PIX_FMT_YUYV,
@@ -164,9 +164,9 @@ static struct vivi_fmt formats[] = {
},
};
-static struct vivi_fmt *__get_format(u32 pixelformat)
+static const struct vivi_fmt *__get_format(u32 pixelformat)
{
- struct vivi_fmt *fmt;
+ const struct vivi_fmt *fmt;
unsigned int k;
for (k = 0; k < ARRAY_SIZE(formats); k++) {
@@ -181,7 +181,7 @@ static struct vivi_fmt *__get_format(u32 pixelformat)
return &formats[k];
}
-static struct vivi_fmt *get_format(struct v4l2_format *f)
+static const struct vivi_fmt *get_format(struct v4l2_format *f)
{
return __get_format(f->fmt.pix.pixelformat);
}
@@ -191,7 +191,7 @@ struct vivi_buffer {
/* common v4l buffer stuff -- must be first */
struct vb2_buffer vb;
struct list_head list;
- struct vivi_fmt *fmt;
+ const struct vivi_fmt *fmt;
};
struct vivi_dmaqueue {
@@ -250,7 +250,7 @@ struct vivi_dev {
int input;
/* video capture */
- struct vivi_fmt *fmt;
+ const struct vivi_fmt *fmt;
struct v4l2_fract timeperframe;
unsigned int width, height;
struct vb2_queue vb_vidq;
@@ -297,7 +297,7 @@ struct bar_std {
/* Maximum number of bars are 10 - otherwise, the input print code
should be modified */
-static struct bar_std bars[] = {
+static const struct bar_std bars[] = {
{ /* Standard ITU-R color bar sequence */
{ COLOR_WHITE, COLOR_AMBER, COLOR_CYAN, COLOR_GREEN,
COLOR_MAGENTA, COLOR_RED, COLOR_BLUE, COLOR_BLACK, COLOR_BLACK }
@@ -926,7 +926,7 @@ static void vivi_unlock(struct vb2_queue *vq)
}
-static struct vb2_ops vivi_video_qops = {
+static const struct vb2_ops vivi_video_qops = {
.queue_setup = queue_setup,
.buf_prepare = buffer_prepare,
.buf_queue = buffer_queue,
@@ -957,7 +957,7 @@ static int vidioc_querycap(struct file *file, void *priv,
static int vidioc_enum_fmt_vid_cap(struct file *file, void *priv,
struct v4l2_fmtdesc *f)
{
- struct vivi_fmt *fmt;
+ const struct vivi_fmt *fmt;
if (f->index >= ARRAY_SIZE(formats))
return -EINVAL;
@@ -993,7 +993,7 @@ static int vidioc_try_fmt_vid_cap(struct file *file, void *priv,
struct v4l2_format *f)
{
struct vivi_dev *dev = video_drvdata(file);
- struct vivi_fmt *fmt;
+ const struct vivi_fmt *fmt;
fmt = get_format(f);
if (!fmt) {
@@ -1102,7 +1102,7 @@ static int vidioc_s_input(struct file *file, void *priv, unsigned int i)
static int vidioc_enum_frameintervals(struct file *file, void *priv,
struct v4l2_frmivalenum *fival)
{
- struct vivi_fmt *fmt;
+ const struct vivi_fmt *fmt;
if (fival->index)
return -EINVAL;
@@ -1330,7 +1330,7 @@ static const struct v4l2_ioctl_ops vivi_ioctl_ops = {
.vidioc_unsubscribe_event = v4l2_event_unsubscribe,
};
-static struct video_device vivi_template = {
+static const struct video_device vivi_template = {
.name = "vivi",
.fops = &vivi_fops,
.ioctl_ops = &vivi_ioctl_ops,
--
1.8.1.rc3.329.g036938a
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.