2008-07-21 04:37:55

by Ben Collins

[permalink] [raw]
Subject: [PATCH 0/7] Patches from Ubuntu kernel tree

The following is a set of patches collected from our tree. They are
available from:

git.kernel.org:/pub/scm/linux/kernel/git/bcollins/linux-ubuntu#for-linus

NOTE: Contrary to the branch name, this isn't meant to be pulled
wholesale.

Alexandre Karpenko (1):
HID: Add quirks for fourth generation MacBooks (4,1)

Ben Collins (3):
bluetooth: Add quirks for a few hci_usb devices
[airprime] Add support for more devices
pm: Config option to disable handling of console during suspend/resume

Chuck Short (1):
ata: blacklist FUJITSU MHW2160BH PL

Matthew Garrett (1):
irda: Default to dongle type 9 on IBM hardware

Tim Gardner (1):
netfilter: Export ip6t_mh.h and xt_quota.h for iptables build

drivers/ata/libata-core.c | 1 +
drivers/bluetooth/hci_usb.c | 7 +++++++
drivers/hid/usbhid/hid-quirks.c | 13 ++++++++++++-
drivers/net/irda/nsc-ircc.c | 5 ++++-
drivers/usb/serial/airprime.c | 9 +++++++++
include/linux/netfilter/Kbuild | 2 ++
include/linux/netfilter_ipv6/Kbuild | 1 +
kernel/power/Kconfig | 15 +++++++++++++++
kernel/power/console.c | 4 ++++
9 files changed, 55 insertions(+), 2 deletions(-)


2008-07-21 04:26:28

by Ben Collins

[permalink] [raw]
Subject: [PATCH 5/7] [airprime] Add support for more devices

Reference: https://launchpad.net/bugs/208250

Add support for:
- Audiovox PC5740
- Huawei E220
- Momo design
- AirPrime 5220
- Dell Wireless HSDPA 5500
- Sprint Pantech PX-500
- Novatel U727
- Onda MT505UP

CC: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Colin Ian King <[email protected]>
Signed-off-by: Ben Collins <[email protected]>
---
drivers/usb/serial/airprime.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/serial/airprime.c b/drivers/usb/serial/airprime.c
index 0798c14..164191b 100644
--- a/drivers/usb/serial/airprime.c
+++ b/drivers/usb/serial/airprime.c
@@ -18,6 +18,15 @@

static struct usb_device_id id_table [] = {
{ USB_DEVICE(0x0c88, 0x17da) }, /* Kyocera Wireless KPC650/Passport */
+ { USB_DEVICE(0x413c, 0x8115) }, /* Dell Wireless HSDPA 5500 */
+ { USB_DEVICE(0x0930, 0x1303) }, /* Toshiba (Novatel Wireless) HSDPA for M400 */
+ { USB_DEVICE(0x106c, 0x3701) }, /* Audiovox PC5740 */
+ { USB_DEVICE(0x106c, 0x3702) }, /* Sprint Pantech PX-500 DGE */
+ { USB_DEVICE(0x1410, 0x4100) }, /* Novatel Wireless U727 */
+ { USB_DEVICE(0x12d1, 0x1003) }, /* Huawei E220 */
+ { USB_DEVICE(0x05c6, 0x6000) }, /* Momo design */
+ { USB_DEVICE(0xf3d0, 0x0112) }, /* AirPrime 5220 */
+ { USB_DEVICE(0X19d2, 0x0002) }, /* Onda MT505UP GPRS-EDGE-HSPDA-hsups */
{ },
};
MODULE_DEVICE_TABLE(usb, id_table);
--
1.5.4.3

2008-07-21 04:30:08

by Ben Collins

[permalink] [raw]
Subject: [PATCH 3/7] bluetooth: Add quirks for a few hci_usb devices

When the Dell 370 and 410 BT adapters are put into BT radio mode, they
need to be prepared like many other Broadcom adapters.

Also, add quirk Broadcom 2046 devices with HCI_RESET.

CC: [email protected]
Signed-off-by: Michael Frey <[email protected]>
Signed-off-by: Mario Limonciello <[email protected]>
Signed-off-by: Tim Gardner <[email protected]>
Signed-off-by: Ben Collins <[email protected]>
---
drivers/bluetooth/hci_usb.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/drivers/bluetooth/hci_usb.c b/drivers/bluetooth/hci_usb.c
index 192522e..0254a6b 100644
--- a/drivers/bluetooth/hci_usb.c
+++ b/drivers/bluetooth/hci_usb.c
@@ -134,6 +134,13 @@ static struct usb_device_id blacklist_ids[] = {

/* Dell laptop with Broadcom chip */
{ USB_DEVICE(0x413c, 0x8126), .driver_info = HCI_RESET | HCI_WRONG_SCO_MTU },
+ /* Dell Wireless 370 */
+ { USB_DEVICE(0x413c, 0x8156), .driver_info = HCI_RESET | HCI_WRONG_SCO_MTU },
+ /* Dell Wireless 410 */
+ { USB_DEVICE(0x413c, 0x8152), .driver_info = HCI_RESET | HCI_WRONG_SCO_MTU },
+
+ /* Broadcom 2046 */
+ { USB_DEVICE(0x0a5c, 0x2151), .driver_info = HCI_RESET },

/* Microsoft Wireless Transceiver for Bluetooth 2.0 */
{ USB_DEVICE(0x045e, 0x009c), .driver_info = HCI_RESET },
--
1.5.4.3

2008-07-21 04:42:51

by Ben Collins

[permalink] [raw]
Subject: [PATCH 6/7] pm: Config option to disable handling of console during suspend/resume

Config option allows userspace to handle console during suspend/resume
instead of the kernel.

Signed-off-by: Ben Collins <[email protected]>
---
kernel/power/Kconfig | 15 +++++++++++++++
kernel/power/console.c | 4 ++++
2 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/kernel/power/Kconfig b/kernel/power/Kconfig
index b45da40..6855299 100644
--- a/kernel/power/Kconfig
+++ b/kernel/power/Kconfig
@@ -105,6 +105,21 @@ config SUSPEND_FREEZER

Turning OFF this setting is NOT recommended! If in doubt, say Y.

+config PM_DISABLE_CONSOLE
+ bool "Disable Power Management messing with the active console"
+ depends on PM
+ default n
+ ---help---
+ By default, PM will take over the active console (generally, this means
+ switching to the console when suspending from X). This can at times cause
+ problems, especially if userspace suspend scripts try to do things with
+ the console before or after suspending (e.g. calling vbestate).
+
+ To work around this, enable this option so that PM will not handle the
+ console.
+
+ If unsure, say N.
+
config HIBERNATION
bool "Hibernation (aka 'suspend to disk')"
depends on PM && SWAP && ARCH_HIBERNATION_POSSIBLE
diff --git a/kernel/power/console.c b/kernel/power/console.c
index b8628be..8b9706f 100644
--- a/kernel/power/console.c
+++ b/kernel/power/console.c
@@ -33,6 +33,7 @@ EXPORT_SYMBOL(pm_set_vt_switch);

int pm_prepare_console(void)
{
+#ifndef CONFIG_PM_DISABLE_CONSOLE
acquire_console_sem();

if (disable_vt_switch) {
@@ -66,11 +67,13 @@ int pm_prepare_console(void)
}
orig_kmsg = kmsg_redirect;
kmsg_redirect = SUSPEND_CONSOLE;
+#endif
return 0;
}

void pm_restore_console(void)
{
+#ifndef CONFIG_PM_DISABLE_CONSOLE
acquire_console_sem();
if (disable_vt_switch) {
release_console_sem();
@@ -79,5 +82,6 @@ void pm_restore_console(void)
set_console(orig_fgconsole);
release_console_sem();
kmsg_redirect = orig_kmsg;
+#endif
}
#endif
--
1.5.4.3

2008-07-21 04:43:21

by Alexandre Karpenko

[permalink] [raw]
Subject: [PATCH 7/7] HID: Add quirks for fourth generation MacBooks (4,1)

Reference: https://launchpad.net/bugs/207127

Added device ids to hid-quriks for detection of keyboards on 4th generation
Macbook Pro and Macbook Air.

CC: [email protected]
Signed-off-by: Alexandre Karpenko <[email protected]>
Signed-off-by: Tim Gardner <[email protected]>
Signed-off-by: Ben Collins <[email protected]>
---
drivers/hid/usbhid/hid-quirks.c | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/drivers/hid/usbhid/hid-quirks.c b/drivers/hid/usbhid/hid-quirks.c
index 1df832a..8cf16e9 100644
--- a/drivers/hid/usbhid/hid-quirks.c
+++ b/drivers/hid/usbhid/hid-quirks.c
@@ -75,6 +75,12 @@
#define USB_DEVICE_ID_APPLE_ALU_WIRELESS_ANSI 0x022c
#define USB_DEVICE_ID_APPLE_ALU_WIRELESS_ISO 0x022d
#define USB_DEVICE_ID_APPLE_ALU_WIRELESS_JIS 0x022e
+#define USB_DEVICE_ID_APPLE_WELLSPRING_ANSI 0x0223
+#define USB_DEVICE_ID_APPLE_WELLSPRING_ISO 0x0224
+#define USB_DEVICE_ID_APPLE_WELLSPRING_JIS 0x0225
+#define USB_DEVICE_ID_APPLE_WELLSPRING2_ANSI 0x0230
+#define USB_DEVICE_ID_APPLE_WELLSPRING2_ISO 0x0231
+#define USB_DEVICE_ID_APPLE_WELLSPRING2_JIS 0x0232
#define USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY 0x030a
#define USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY 0x030b
#define USB_DEVICE_ID_APPLE_IRCONTROL4 0x8242
@@ -644,7 +650,12 @@ static const struct hid_blacklist {
{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_JIS, HID_QUIRK_APPLE_NUMLOCK_EMULATION | HID_QUIRK_APPLE_HAS_FN },
{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY, HID_QUIRK_APPLE_NUMLOCK_EMULATION | HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_IGNORE_MOUSE },
{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY, HID_QUIRK_APPLE_NUMLOCK_EMULATION | HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_IGNORE_MOUSE },
-
+ { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING_ANSI, HID_QUIRK_APPLE_HAS_FN },
+ { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING_ISO, HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_APPLE_ISO_KEYBOARD },
+ { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING_JIS, HID_QUIRK_APPLE_HAS_FN },
+ { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING2_ANSI, HID_QUIRK_APPLE_HAS_FN },
+ { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING2_ISO, HID_QUIRK_APPLE_HAS_FN | HID_QUIRK_APPLE_ISO_KEYBOARD },
+ { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING2_JIS, HID_QUIRK_APPLE_HAS_FN },
{ USB_VENDOR_ID_DELL, USB_DEVICE_ID_DELL_W7658, HID_QUIRK_RESET_LEDS },
{ USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_KBD, HID_QUIRK_RESET_LEDS },
{ USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY, HID_QUIRK_IGNORE },
--
1.5.4.3

2008-07-21 04:49:27

by Matthew Garrett

[permalink] [raw]
Subject: [PATCH 4/7] irda: Default to dongle type 9 on IBM hardware

CC: Samuel Ortiz <[email protected]>
Signed-off-by: Matthew Garrett <[email protected]>
Signed-off-by: Ben Collins <[email protected]>
---
drivers/net/irda/nsc-ircc.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/drivers/net/irda/nsc-ircc.c b/drivers/net/irda/nsc-ircc.c
index effc1ce..1ecb013 100644
--- a/drivers/net/irda/nsc-ircc.c
+++ b/drivers/net/irda/nsc-ircc.c
@@ -151,8 +151,8 @@ static char *dongle_types[] = {
static chipio_t pnp_info;
static const struct pnp_device_id nsc_ircc_pnp_table[] = {
{ .id = "NSC6001", .driver_data = 0 },
- { .id = "IBM0071", .driver_data = 0 },
{ .id = "HWPC224", .driver_data = 0 },
+ { .id = "IBM0071", .driver_data = 1 },
{ }
};

@@ -934,6 +934,9 @@ static int nsc_ircc_pnp_probe(struct pnp_dev *dev, const struct pnp_device_id *i
* On my box, cfg_base is in the PnP descriptor of the
* motherboard. Oh well... Jean II */

+ if (id->driver_data == 1)
+ dongle_id = 0x9;
+
if (pnp_port_valid(dev, 0) &&
!(pnp_port_flags(dev, 0) & IORESOURCE_DISABLED))
pnp_info.fir_base = pnp_port_start(dev, 0);
--
1.5.4.3

2008-07-21 05:07:54

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [PATCH 3/7] bluetooth: Add quirks for a few hci_usb devices

Hi Ben,

> When the Dell 370 and 410 BT adapters are put into BT radio mode, they
> need to be prepared like many other Broadcom adapters.
>
> Also, add quirk Broadcom 2046 devices with HCI_RESET.
>
> CC: [email protected]
> Signed-off-by: Michael Frey <[email protected]>
> Signed-off-by: Mario Limonciello <[email protected]>
> Signed-off-by: Tim Gardner <[email protected]>
> Signed-off-by: Ben Collins <[email protected]>
> ---
> drivers/bluetooth/hci_usb.c | 7 +++++++
> 1 files changed, 7 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/bluetooth/hci_usb.c b/drivers/bluetooth/hci_usb.c
> index 192522e..0254a6b 100644
> --- a/drivers/bluetooth/hci_usb.c
> +++ b/drivers/bluetooth/hci_usb.c
> @@ -134,6 +134,13 @@ static struct usb_device_id blacklist_ids[] = {
>
> /* Dell laptop with Broadcom chip */
> { USB_DEVICE(0x413c, 0x8126), .driver_info = HCI_RESET | HCI_WRONG_SCO_MTU },
> + /* Dell Wireless 370 */
> + { USB_DEVICE(0x413c, 0x8156), .driver_info = HCI_RESET | HCI_WRONG_SCO_MTU },
> + /* Dell Wireless 410 */
> + { USB_DEVICE(0x413c, 0x8152), .driver_info = HCI_RESET | HCI_WRONG_SCO_MTU },
> +
> + /* Broadcom 2046 */
> + { USB_DEVICE(0x0a5c, 0x2151), .driver_info = HCI_RESET },

do me a favor and use tabs and not whitespaces here. And is this the
latest Apple machine that has a Broadcom instead of a CSR chip in it. If
so, then let the comment reflect this.

Regards

Marcel

2008-07-21 05:29:18

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [PATCH 4/7] irda: Default to dongle type 9 on IBM hardware

Hi Matthew,

> CC: Samuel Ortiz <[email protected]>
> Signed-off-by: Matthew Garrett <[email protected]>
> Signed-off-by: Ben Collins <[email protected]>
> ---
> drivers/net/irda/nsc-ircc.c | 5 ++++-
> 1 files changed, 4 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/irda/nsc-ircc.c b/drivers/net/irda/nsc-ircc.c
> index effc1ce..1ecb013 100644
> --- a/drivers/net/irda/nsc-ircc.c
> +++ b/drivers/net/irda/nsc-ircc.c
> @@ -151,8 +151,8 @@ static char *dongle_types[] = {
> static chipio_t pnp_info;
> static const struct pnp_device_id nsc_ircc_pnp_table[] = {
> { .id = "NSC6001", .driver_data = 0 },
> - { .id = "IBM0071", .driver_data = 0 },
> { .id = "HWPC224", .driver_data = 0 },
> + { .id = "IBM0071", .driver_data = 1 },
> { }
> };
>
> @@ -934,6 +934,9 @@ static int nsc_ircc_pnp_probe(struct pnp_dev *dev, const struct pnp_device_id *i
> * On my box, cfg_base is in the PnP descriptor of the
> * motherboard. Oh well... Jean II */
>
> + if (id->driver_data == 1)
> + dongle_id = 0x9;
> +

this patch is in serious need of introducing some constants to be used
with driver_data and not plain numbers. Also using a bitmask would be a
good idea.

Regards

Marcel

2008-07-21 05:54:35

by Ben Collins

[permalink] [raw]
Subject: Re: [PATCH 3/7] bluetooth: Add quirks for a few hci_usb devices

On Mon, 2008-07-21 at 07:08 +0200, Marcel Holtmann wrote:
> Hi Ben,
>
> > When the Dell 370 and 410 BT adapters are put into BT radio mode, they
> > need to be prepared like many other Broadcom adapters.
> >
> > Also, add quirk Broadcom 2046 devices with HCI_RESET.
> >
> > CC: [email protected]
> > Signed-off-by: Michael Frey <[email protected]>
> > Signed-off-by: Mario Limonciello <[email protected]>
> > Signed-off-by: Tim Gardner <[email protected]>
> > Signed-off-by: Ben Collins <[email protected]>
> > ---
> > drivers/bluetooth/hci_usb.c | 7 +++++++
> > 1 files changed, 7 insertions(+), 0 deletions(-)
> >
> > diff --git a/drivers/bluetooth/hci_usb.c b/drivers/bluetooth/hci_usb.c
> > index 192522e..0254a6b 100644
> > --- a/drivers/bluetooth/hci_usb.c
> > +++ b/drivers/bluetooth/hci_usb.c
> > @@ -134,6 +134,13 @@ static struct usb_device_id blacklist_ids[] = {
> >
> > /* Dell laptop with Broadcom chip */
> > { USB_DEVICE(0x413c, 0x8126), .driver_info = HCI_RESET | HCI_WRONG_SCO_MTU },
> > + /* Dell Wireless 370 */
> > + { USB_DEVICE(0x413c, 0x8156), .driver_info = HCI_RESET | HCI_WRONG_SCO_MTU },
> > + /* Dell Wireless 410 */
> > + { USB_DEVICE(0x413c, 0x8152), .driver_info = HCI_RESET | HCI_WRONG_SCO_MTU },
> > +
> > + /* Broadcom 2046 */
> > + { USB_DEVICE(0x0a5c, 0x2151), .driver_info = HCI_RESET },
>
> do me a favor and use tabs and not whitespaces here. And is this the
> latest Apple machine that has a Broadcom instead of a CSR chip in it. If
> so, then let the comment reflect this.

Whoops. That slipped through. I've no idea what system that device
actually came from. I'd have to ask Michael, since he was the one who
reported it. I'll resend a corrected patch in the morning.

Thanks Marcel.

2008-07-21 16:00:34

by Ben Collins

[permalink] [raw]
Subject: Re: [PATCH 3/7] bluetooth: Add quirks for a few hci_usb devices

Preface: The "Broadcom" device is on unreleased hardware, so I can't
disclose the actual model.

When the Dell 370 and 410 BT adapters are put into BT radio mode, they
need to be prepared like many other Broadcom adapters.

Also, add quirk Broadcom 2046 devices with HCI_RESET. Reference for this
bug: https://launchpad.net/bugs/249448

CC: [email protected]
Signed-off-by: Michael Frey <[email protected]>
Signed-off-by: Mario Limonciello <[email protected]>
Signed-off-by: Tim Gardner <[email protected]>
Signed-off-by: Ben Collins <[email protected]>

diff --git a/drivers/bluetooth/hci_usb.c b/drivers/bluetooth/hci_usb.c
index 192522e..c33bb59 100644
--- a/drivers/bluetooth/hci_usb.c
+++ b/drivers/bluetooth/hci_usb.c
@@ -134,6 +134,13 @@ static struct usb_device_id blacklist_ids[] = {

/* Dell laptop with Broadcom chip */
{ USB_DEVICE(0x413c, 0x8126), .driver_info = HCI_RESET | HCI_WRONG_SCO_MTU },
+ /* Dell Wireless 370 */
+ { USB_DEVICE(0x413c, 0x8156), .driver_info = HCI_RESET | HCI_WRONG_SCO_MTU },
+ /* Dell Wireless 410 */
+ { USB_DEVICE(0x413c, 0x8152), .driver_info = HCI_RESET | HCI_WRONG_SCO_MTU },
+
+ /* Broadcom 2046 */
+ { USB_DEVICE(0x0a5c, 0x2151), .driver_info = HCI_RESET },

/* Microsoft Wireless Transceiver for Bluetooth 2.0 */
{ USB_DEVICE(0x045e, 0x009c), .driver_info = HCI_RESET },

2008-07-21 17:53:24

by Ben Collins

[permalink] [raw]
Subject: Re: [PATCH 4/7] nsc-ircc: Default to dongle type 9 on IBM hardware

CC: Samuel Ortiz <[email protected]>
Signed-off-by: Matthew Garrett <[email protected]>
Signed-off-by: Ben Collins <[email protected]>

diff --git a/drivers/net/irda/nsc-ircc.c b/drivers/net/irda/nsc-ircc.c
index effc1ce..18d1714 100644
--- a/drivers/net/irda/nsc-ircc.c
+++ b/drivers/net/irda/nsc-ircc.c
@@ -151,8 +151,8 @@ static char *dongle_types[] = {
static chipio_t pnp_info;
static const struct pnp_device_id nsc_ircc_pnp_table[] = {
{ .id = "NSC6001", .driver_data = 0 },
- { .id = "IBM0071", .driver_data = 0 },
{ .id = "HWPC224", .driver_data = 0 },
+ { .id = "IBM0071", .driver_data = NSC_FORCE_DONGLE_TYPE9 },
{ }
};

@@ -930,7 +930,10 @@ static int nsc_ircc_pnp_probe(struct pnp_dev *dev, const struct pnp_device_id *i
pnp_info.dma = -1;
pnp_succeeded = 1;

- /* There don't seem to be any way to get the cfg_base.
+ if (id->driver_data & NSC_FORCE_DONGLE_TYPE9)
+ dongle_id = 0x9;
+
+ /* There doesn't seem to be any way of getting the cfg_base.
* On my box, cfg_base is in the PnP descriptor of the
* motherboard. Oh well... Jean II */

diff --git a/drivers/net/irda/nsc-ircc.h b/drivers/net/irda/nsc-ircc.h
index 29398a4..71cd3c5 100644
--- a/drivers/net/irda/nsc-ircc.h
+++ b/drivers/net/irda/nsc-ircc.h
@@ -35,6 +35,9 @@
#include <linux/types.h>
#include <asm/io.h>

+/* Features for chips (set in driver_data) */
+#define NSC_FORCE_DONGLE_TYPE9 0x00000001
+
/* DMA modes needed */
#define DMA_TX_MODE 0x08 /* Mem to I/O, ++, demand. */
#define DMA_RX_MODE 0x04 /* I/O to mem, ++, demand. */

2008-07-21 23:30:35

by Marcel Holtmann

[permalink] [raw]
Subject: Re: [PATCH 3/7] bluetooth: Add quirks for a few hci_usb devices

Hi Ben,

> Preface: The "Broadcom" device is on unreleased hardware, so I can't
> disclose the actual model.

then put on your todo list to update this entry once you can.

> When the Dell 370 and 410 BT adapters are put into BT radio mode, they
> need to be prepared like many other Broadcom adapters.
>
> Also, add quirk Broadcom 2046 devices with HCI_RESET. Reference for
> this
> bug: https://launchpad.net/bugs/249448
>
> CC: [email protected]
> Signed-off-by: Michael Frey <[email protected]>
> Signed-off-by: Mario Limonciello <[email protected]>
> Signed-off-by: Tim Gardner <[email protected]>
> Signed-off-by: Ben Collins <[email protected]>

Acked-by: Marcel Holtmann <[email protected]>

Regards

Marcel

2008-07-22 08:55:44

by Jan Engelhardt

[permalink] [raw]
Subject: Re: [PATCH 1/7] netfilter: Export ip6t_mh.h and xt_quota.h for iptables build


On Wednesday 2008-01-02 16:57, Tim Gardner wrote:

>Export ip6t_mh.h and xt_quota.h for
> iptables build
>
>CC: [email protected]
>Signed-off-by: Soren Hansen <[email protected]>
>Signed-off-by: Tim Gardner <[email protected]>
>Signed-off-by: Ben Collins <[email protected]>


They are not needed for iptables, which has its own copy of
the headers.

2008-07-22 10:45:31

by Patrick McHardy

[permalink] [raw]
Subject: Re: [PATCH 1/7] netfilter: Export ip6t_mh.h and xt_quota.h for iptables build

Tim Gardner wrote:
> CC: [email protected]
> Signed-off-by: Soren Hansen <[email protected]>
> Signed-off-by: Tim Gardner <[email protected]>
> Signed-off-by: Ben Collins <[email protected]>
> ---
> include/linux/netfilter/Kbuild | 2 ++
> include/linux/netfilter_ipv6/Kbuild | 1 +
> 2 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/include/linux/netfilter/Kbuild b/include/linux/netfilter/Kbuild
> index 3aff513..3a04da3 100644
> --- a/include/linux/netfilter/Kbuild
> +++ b/include/linux/netfilter/Kbuild
> @@ -31,6 +31,8 @@ header-y += xt_multiport.h
> header-y += xt_owner.h
> header-y += xt_pkttype.h
> header-y += xt_rateest.h
> +header-y += xt_policy.h
> +header-y += xt_quota.h

xt_policy.h is already included in unidef-y. The others look fine.

2008-07-29 02:47:15

by Andrew Morton

[permalink] [raw]
Subject: Re: [PATCH 4/7] nsc-ircc: Default to dongle type 9 on IBM hardware

On Mon, 21 Jul 2008 13:40:57 -0400 Ben Collins <[email protected]> wrote:

> CC: Samuel Ortiz <[email protected]>
> Signed-off-by: Matthew Garrett <[email protected]>
> Signed-off-by: Ben Collins <[email protected]>
>
> diff --git a/drivers/net/irda/nsc-ircc.c b/drivers/net/irda/nsc-ircc.c
> index effc1ce..18d1714 100644
> --- a/drivers/net/irda/nsc-ircc.c
> +++ b/drivers/net/irda/nsc-ircc.c
> @@ -151,8 +151,8 @@ static char *dongle_types[] = {
> static chipio_t pnp_info;
> static const struct pnp_device_id nsc_ircc_pnp_table[] = {
> { .id = "NSC6001", .driver_data = 0 },
> - { .id = "IBM0071", .driver_data = 0 },
> { .id = "HWPC224", .driver_data = 0 },
> + { .id = "IBM0071", .driver_data = NSC_FORCE_DONGLE_TYPE9 },
> { }
> };
>
> @@ -930,7 +930,10 @@ static int nsc_ircc_pnp_probe(struct pnp_dev *dev, const struct pnp_device_id *i
> pnp_info.dma = -1;
> pnp_succeeded = 1;
>
> - /* There don't seem to be any way to get the cfg_base.
> + if (id->driver_data & NSC_FORCE_DONGLE_TYPE9)
> + dongle_id = 0x9;
> +
> + /* There doesn't seem to be any way of getting the cfg_base.
> * On my box, cfg_base is in the PnP descriptor of the
> * motherboard. Oh well... Jean II */
>
> diff --git a/drivers/net/irda/nsc-ircc.h b/drivers/net/irda/nsc-ircc.h
> index 29398a4..71cd3c5 100644
> --- a/drivers/net/irda/nsc-ircc.h
> +++ b/drivers/net/irda/nsc-ircc.h
> @@ -35,6 +35,9 @@
> #include <linux/types.h>
> #include <asm/io.h>
>
> +/* Features for chips (set in driver_data) */
> +#define NSC_FORCE_DONGLE_TYPE9 0x00000001
> +
> /* DMA modes needed */
> #define DMA_TX_MODE 0x08 /* Mem to I/O, ++, demand. */
> #define DMA_RX_MODE 0x04 /* I/O to mem, ++, demand. */
>

The changelog doesn't exist^Wexplain the reasons for this patch.

I assume it fixes some bug? What is it?

2008-07-29 02:58:31

by Andrew Morton

[permalink] [raw]
Subject: Re: [PATCH 5/7] [airprime] Add support for more devices

On Sun, 20 Jul 2008 21:54:48 -0400 Ben Collins <[email protected]> wrote:

> Reference: https://launchpad.net/bugs/208250
>
> Add support for:
> - Audiovox PC5740
> - Huawei E220
> - Momo design
> - AirPrime 5220
> - Dell Wireless HSDPA 5500
> - Sprint Pantech PX-500
> - Novatel U727
> - Onda MT505UP

airprime.c got deleted.

commit 640c1bce86d1e11ee6a1263fdf6170d3210b1684
Author: Greg Kroah-Hartman <[email protected]>
Date: Thu Jun 19 11:21:16 2008 -0700

USB: delete airprime driver

This driver is only for one device id, and the option driver should be
used instead for it.

It'd be good if we can verify that the option driver presently supports
all these new devices.

2008-07-29 03:18:44

by Greg KH

[permalink] [raw]
Subject: Re: [PATCH 5/7] [airprime] Add support for more devices

On Mon, Jul 28, 2008 at 07:58:13PM -0700, Andrew Morton wrote:
> On Sun, 20 Jul 2008 21:54:48 -0400 Ben Collins <[email protected]> wrote:
>
> > Reference: https://launchpad.net/bugs/208250
> >
> > Add support for:
> > - Audiovox PC5740
> > - Huawei E220
> > - Momo design
> > - AirPrime 5220
> > - Dell Wireless HSDPA 5500
> > - Sprint Pantech PX-500
> > - Novatel U727
> > - Onda MT505UP
>
> airprime.c got deleted.

Ben, why did you not cc: the linux-usb mailing list if you are sending
USB patches out? Or at least the USB or USB-serial maintainer :)

> commit 640c1bce86d1e11ee6a1263fdf6170d3210b1684
> Author: Greg Kroah-Hartman <[email protected]>
> Date: Thu Jun 19 11:21:16 2008 -0700
>
> USB: delete airprime driver
>
> This driver is only for one device id, and the option driver should be
> used instead for it.
>
> It'd be good if we can verify that the option driver presently supports
> all these new devices.

If it doesn't, it should be very simple to add the device ids to it.

airprime.c is dead and gone.

thanks,

greg k-h

2008-07-29 03:30:21

by Greg KH

[permalink] [raw]
Subject: Re: [PATCH 5/7] [airprime] Add support for more devices

On Mon, Jul 28, 2008 at 08:17:52PM -0700, Greg KH wrote:
> On Mon, Jul 28, 2008 at 07:58:13PM -0700, Andrew Morton wrote:
> > On Sun, 20 Jul 2008 21:54:48 -0400 Ben Collins <[email protected]> wrote:
> >
> > > Reference: https://launchpad.net/bugs/208250
> > >
> > > Add support for:
> > > - Audiovox PC5740
> > > - Huawei E220
> > > - Momo design
> > > - AirPrime 5220
> > > - Dell Wireless HSDPA 5500
> > > - Sprint Pantech PX-500
> > > - Novatel U727
> > > - Onda MT505UP
> >
> > airprime.c got deleted.
>
> Ben, why did you not cc: the linux-usb mailing list if you are sending
> USB patches out? Or at least the USB or USB-serial maintainer :)

Odd, your original message did CC: me, but I don't see it in my inbox
anywhere. My appologies, but you should always cc: the subsystem
mailing list as well.

Anyway, check 2.6.27-rc1 for a bunch of these ids already, and feel free
to send me an update for option.c for the remaining ones.

thanks,

greg k-h

2008-07-29 03:36:18

by Greg KH

[permalink] [raw]
Subject: Re: [PATCH 6/7] pm: Config option to disable handling of console during suspend/resume

On Sun, Jul 20, 2008 at 09:48:28PM -0400, Ben Collins wrote:
> Config option allows userspace to handle console during suspend/resume
> instead of the kernel.
>
> Signed-off-by: Ben Collins <[email protected]>
> ---
> kernel/power/Kconfig | 15 +++++++++++++++
> kernel/power/console.c | 4 ++++
> 2 files changed, 19 insertions(+), 0 deletions(-)
>
> diff --git a/kernel/power/Kconfig b/kernel/power/Kconfig
> index b45da40..6855299 100644
> --- a/kernel/power/Kconfig
> +++ b/kernel/power/Kconfig
> @@ -105,6 +105,21 @@ config SUSPEND_FREEZER
>
> Turning OFF this setting is NOT recommended! If in doubt, say Y.
>
> +config PM_DISABLE_CONSOLE
> + bool "Disable Power Management messing with the active console"
> + depends on PM
> + default n
> + ---help---
> + By default, PM will take over the active console (generally, this means
> + switching to the console when suspending from X). This can at times cause
> + problems, especially if userspace suspend scripts try to do things with
> + the console before or after suspending (e.g. calling vbestate).
> +
> + To work around this, enable this option so that PM will not handle the
> + console.
> +
> + If unsure, say N.
> +
> config HIBERNATION
> bool "Hibernation (aka 'suspend to disk')"
> depends on PM && SWAP && ARCH_HIBERNATION_POSSIBLE
> diff --git a/kernel/power/console.c b/kernel/power/console.c
> index b8628be..8b9706f 100644
> --- a/kernel/power/console.c
> +++ b/kernel/power/console.c
> @@ -33,6 +33,7 @@ EXPORT_SYMBOL(pm_set_vt_switch);
>
> int pm_prepare_console(void)
> {
> +#ifndef CONFIG_PM_DISABLE_CONSOLE

Can't you do this in a .h file instead?

And is this really needed? Why has no other distro needed this change?
What is so wierd about your suspend setup to require this?

thanks,

greg k-h

2008-07-29 03:36:35

by Greg KH

[permalink] [raw]
Subject: Re: [PATCH 0/7] Patches from Ubuntu kernel tree

On Wed, Jan 02, 2008 at 08:57:35AM -0700, Ben Collins wrote:
> The following is a set of patches collected from our tree. They are
> available from:

Your date is _really_ wrong, that's probably why your patch never got
through the corporate spam filters

thanks,

greg k-h

2008-07-29 14:20:42

by Ben Collins

[permalink] [raw]
Subject: Re: [PATCH 5/7] [airprime] Add support for more devices

On Mon, 2008-07-28 at 20:30 -0700, Greg KH wrote:
> On Mon, Jul 28, 2008 at 08:17:52PM -0700, Greg KH wrote:
> > On Mon, Jul 28, 2008 at 07:58:13PM -0700, Andrew Morton wrote:
> > > On Sun, 20 Jul 2008 21:54:48 -0400 Ben Collins <[email protected]> wrote:
> > >
> > > > Reference: https://launchpad.net/bugs/208250
> > > >
> > > > Add support for:
> > > > - Audiovox PC5740
> > > > - Huawei E220
> > > > - Momo design
> > > > - AirPrime 5220
> > > > - Dell Wireless HSDPA 5500
> > > > - Sprint Pantech PX-500
> > > > - Novatel U727
> > > > - Onda MT505UP
> > >
> > > airprime.c got deleted.
> >
> > Ben, why did you not cc: the linux-usb mailing list if you are sending
> > USB patches out? Or at least the USB or USB-serial maintainer :)
>
> Odd, your original message did CC: me, but I don't see it in my inbox
> anywhere. My appologies, but you should always cc: the subsystem
> mailing list as well.
>
> Anyway, check 2.6.27-rc1 for a bunch of these ids already, and feel free
> to send me an update for option.c for the remaining ones.
>
> thanks,

Will do.

2008-07-29 16:08:12

by Kevin Lloyd

[permalink] [raw]
Subject: RE: [PATCH 5/7] [airprime] Add support for more devices

AirPrime 5220 is supported in the sierra.c driver

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Ben Collins
Sent: Tuesday, July 29, 2008 7:20 AM
To: Greg KH
Cc: Andrew Morton; [email protected]; [email protected]
Subject: Re: [PATCH 5/7] [airprime] Add support for more devices

On Mon, 2008-07-28 at 20:30 -0700, Greg KH wrote:
> On Mon, Jul 28, 2008 at 08:17:52PM -0700, Greg KH wrote:
> > On Mon, Jul 28, 2008 at 07:58:13PM -0700, Andrew Morton wrote:
> > > On Sun, 20 Jul 2008 21:54:48 -0400 Ben Collins <[email protected]> wrote:
> > >
> > > > Reference: https://launchpad.net/bugs/208250
> > > >
> > > > Add support for:
> > > > - Audiovox PC5740
> > > > - Huawei E220
> > > > - Momo design
> > > > - AirPrime 5220
> > > > - Dell Wireless HSDPA 5500
> > > > - Sprint Pantech PX-500
> > > > - Novatel U727
> > > > - Onda MT505UP
> > >
> > > airprime.c got deleted.
> >
> > Ben, why did you not cc: the linux-usb mailing list if you are sending
> > USB patches out? Or at least the USB or USB-serial maintainer :)
>
> Odd, your original message did CC: me, but I don't see it in my inbox
> anywhere. My appologies, but you should always cc: the subsystem
> mailing list as well.
>
> Anyway, check 2.6.27-rc1 for a bunch of these ids already, and feel free
> to send me an update for option.c for the remaining ones.
>
> thanks,

Will do.

2008-07-29 21:13:16

by Rafael J. Wysocki

[permalink] [raw]
Subject: Re: [PATCH 6/7] pm: Config option to disable handling of console during suspend/resume

On Tuesday, 29 of July 2008, Greg KH wrote:
> On Sun, Jul 20, 2008 at 09:48:28PM -0400, Ben Collins wrote:
> > Config option allows userspace to handle console during suspend/resume
> > instead of the kernel.
> >
> > Signed-off-by: Ben Collins <[email protected]>
> > ---
> > kernel/power/Kconfig | 15 +++++++++++++++
> > kernel/power/console.c | 4 ++++
> > 2 files changed, 19 insertions(+), 0 deletions(-)
> >
> > diff --git a/kernel/power/Kconfig b/kernel/power/Kconfig
> > index b45da40..6855299 100644
> > --- a/kernel/power/Kconfig
> > +++ b/kernel/power/Kconfig
> > @@ -105,6 +105,21 @@ config SUSPEND_FREEZER
> >
> > Turning OFF this setting is NOT recommended! If in doubt, say Y.
> >
> > +config PM_DISABLE_CONSOLE
> > + bool "Disable Power Management messing with the active console"
> > + depends on PM
> > + default n
> > + ---help---
> > + By default, PM will take over the active console (generally, this means
> > + switching to the console when suspending from X). This can at times cause
> > + problems, especially if userspace suspend scripts try to do things with
> > + the console before or after suspending (e.g. calling vbestate).
> > +
> > + To work around this, enable this option so that PM will not handle the
> > + console.
> > +
> > + If unsure, say N.
> > +
> > config HIBERNATION
> > bool "Hibernation (aka 'suspend to disk')"
> > depends on PM && SWAP && ARCH_HIBERNATION_POSSIBLE
> > diff --git a/kernel/power/console.c b/kernel/power/console.c
> > index b8628be..8b9706f 100644
> > --- a/kernel/power/console.c
> > +++ b/kernel/power/console.c
> > @@ -33,6 +33,7 @@ EXPORT_SYMBOL(pm_set_vt_switch);
> >
> > int pm_prepare_console(void)
> > {
> > +#ifndef CONFIG_PM_DISABLE_CONSOLE
>
> Can't you do this in a .h file instead?
>
> And is this really needed? Why has no other distro needed this change?
> What is so wierd about your suspend setup to require this?

Reportedly, some systems have problems with graphics restoration from user
space if the switch is done.

Anyway, I'd prefer to use the (already existing) pm_set_vt_switch() thing for
that, maybe with the help of a command line parameter, to adding the .config
option like this.

Thanks,
Rafael

2008-07-29 21:52:15

by Ben Collins

[permalink] [raw]
Subject: Re: [PATCH 6/7] pm: Config option to disable handling of console during suspend/resume

On Tue, 2008-07-29 at 23:15 +0200, Rafael J. Wysocki wrote:
> On Tuesday, 29 of July 2008, Greg KH wrote:
> > On Sun, Jul 20, 2008 at 09:48:28PM -0400, Ben Collins wrote:
> > > Config option allows userspace to handle console during suspend/resume
> > > instead of the kernel.
> > >
> > > Signed-off-by: Ben Collins <[email protected]>
> > > ---
> > > kernel/power/Kconfig | 15 +++++++++++++++
> > > kernel/power/console.c | 4 ++++
> > > 2 files changed, 19 insertions(+), 0 deletions(-)
> > >
> > > diff --git a/kernel/power/Kconfig b/kernel/power/Kconfig
> > > index b45da40..6855299 100644
> > > --- a/kernel/power/Kconfig
> > > +++ b/kernel/power/Kconfig
> > > @@ -105,6 +105,21 @@ config SUSPEND_FREEZER
> > >
> > > Turning OFF this setting is NOT recommended! If in doubt, say Y.
> > >
> > > +config PM_DISABLE_CONSOLE
> > > + bool "Disable Power Management messing with the active console"
> > > + depends on PM
> > > + default n
> > > + ---help---
> > > + By default, PM will take over the active console (generally, this means
> > > + switching to the console when suspending from X). This can at times cause
> > > + problems, especially if userspace suspend scripts try to do things with
> > > + the console before or after suspending (e.g. calling vbestate).
> > > +
> > > + To work around this, enable this option so that PM will not handle the
> > > + console.
> > > +
> > > + If unsure, say N.
> > > +
> > > config HIBERNATION
> > > bool "Hibernation (aka 'suspend to disk')"
> > > depends on PM && SWAP && ARCH_HIBERNATION_POSSIBLE
> > > diff --git a/kernel/power/console.c b/kernel/power/console.c
> > > index b8628be..8b9706f 100644
> > > --- a/kernel/power/console.c
> > > +++ b/kernel/power/console.c
> > > @@ -33,6 +33,7 @@ EXPORT_SYMBOL(pm_set_vt_switch);
> > >
> > > int pm_prepare_console(void)
> > > {
> > > +#ifndef CONFIG_PM_DISABLE_CONSOLE
> >
> > Can't you do this in a .h file instead?
> >
> > And is this really needed? Why has no other distro needed this change?
> > What is so wierd about your suspend setup to require this?
>
> Reportedly, some systems have problems with graphics restoration from user
> space if the switch is done.
>
> Anyway, I'd prefer to use the (already existing) pm_set_vt_switch() thing for
> that, maybe with the help of a command line parameter, to adding the .config
> option like this.

Ah. I didn't notice pm_set_vt_switch(). Then what I would like better is
the config option to set a default. For us, not doing the vt switch is a
good default (I don't think we have a case where suspend/resume requires
it).

Something like:

diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index e7bea3e..6a042f8 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -2247,6 +2247,11 @@ and is between 256 and 4096 characters. It is defined in the file
vmpoff= [KNL,S390] Perform z/VM CP command after power off.
Format: <command>

+ vt_switch= [PM] Switch vt's during suspend/resume
+ Format: { 0 | 1 }
+ Default is normally '1', but depends on value of
+ the PM_DISABLE_CONSOLE config option.
+
waveartist= [HW,OSS]
Format: <io>,<irq>,<dma>,<dma2>

diff --git a/kernel/power/Kconfig b/kernel/power/Kconfig
index dcd165f..202f9b3 100644
--- a/kernel/power/Kconfig
+++ b/kernel/power/Kconfig
@@ -116,6 +116,25 @@ config SUSPEND_FREEZER

Turning OFF this setting is NOT recommended! If in doubt, say Y.

+config PM_DISABLE_CONSOLE
+ bool "Disable Power Management messing with the active console"
+ depends on PM
+ default n
+ ---help---
+ By default, PM will take over the active console (generally, this means
+ switching to the console when suspending from X). This can at times cause
+ problems, especially if userspace suspend scripts try to do things with
+ the console before or after suspending (e.g. calling vbestate).
+
+ To work around this, enable this option so that PM will not handle the
+ console.
+
+ Note, this is the same as passing vt_switch=0 command line option, but
+ just hardcodes the default. You can still pass vt_switch=1 with this
+ option to get original behavior.
+
+ If unsure, say N.
+
config HIBERNATION
bool "Hibernation (aka 'suspend to disk')"
depends on PM && SWAP && ARCH_HIBERNATION_POSSIBLE
diff --git a/kernel/power/console.c b/kernel/power/console.c
index b8628be..db116d8 100644
--- a/kernel/power/console.c
+++ b/kernel/power/console.c
@@ -14,7 +14,11 @@
#define SUSPEND_CONSOLE (MAX_NR_CONSOLES-1)

static int orig_fgconsole, orig_kmsg;
+#ifdef CONFIG_PM_DISABLE_CONSOLE
+static int disable_vt_switch = 1;
+#else
static int disable_vt_switch;
+#endif

/*
* Normally during a suspend, we allocate a new console and switch to it.
@@ -80,4 +84,17 @@ void pm_restore_console(void)
release_console_sem();
kmsg_redirect = orig_kmsg;
}
+
+static int __init set_vt_switch(char *str)
+{
+ if (str[0] == '0')
+ disable_vt_switch = 1;
+ else if (str[0] == '1')
+ disable_vt_switch = 0;
+ else
+ return -EINVAL;
+
+ return 0;
+}
+__setup("vt_switch=", set_vt_switch);
#endif

2008-07-29 22:16:19

by Rafael J. Wysocki

[permalink] [raw]
Subject: Re: [PATCH 6/7] pm: Config option to disable handling of console during suspend/resume

On Tuesday, 29 of July 2008, Ben Collins wrote:
> On Tue, 2008-07-29 at 23:15 +0200, Rafael J. Wysocki wrote:
> > On Tuesday, 29 of July 2008, Greg KH wrote:
> > > On Sun, Jul 20, 2008 at 09:48:28PM -0400, Ben Collins wrote:
> > > > Config option allows userspace to handle console during suspend/resume
> > > > instead of the kernel.
> > > >
> > > > Signed-off-by: Ben Collins <[email protected]>
> > > > ---
> > > > kernel/power/Kconfig | 15 +++++++++++++++
> > > > kernel/power/console.c | 4 ++++
> > > > 2 files changed, 19 insertions(+), 0 deletions(-)
> > > >
> > > > diff --git a/kernel/power/Kconfig b/kernel/power/Kconfig
> > > > index b45da40..6855299 100644
> > > > --- a/kernel/power/Kconfig
> > > > +++ b/kernel/power/Kconfig
> > > > @@ -105,6 +105,21 @@ config SUSPEND_FREEZER
> > > >
> > > > Turning OFF this setting is NOT recommended! If in doubt, say Y.
> > > >
> > > > +config PM_DISABLE_CONSOLE
> > > > + bool "Disable Power Management messing with the active console"
> > > > + depends on PM
> > > > + default n
> > > > + ---help---
> > > > + By default, PM will take over the active console (generally, this means
> > > > + switching to the console when suspending from X). This can at times cause
> > > > + problems, especially if userspace suspend scripts try to do things with
> > > > + the console before or after suspending (e.g. calling vbestate).
> > > > +
> > > > + To work around this, enable this option so that PM will not handle the
> > > > + console.
> > > > +
> > > > + If unsure, say N.
> > > > +
> > > > config HIBERNATION
> > > > bool "Hibernation (aka 'suspend to disk')"
> > > > depends on PM && SWAP && ARCH_HIBERNATION_POSSIBLE
> > > > diff --git a/kernel/power/console.c b/kernel/power/console.c
> > > > index b8628be..8b9706f 100644
> > > > --- a/kernel/power/console.c
> > > > +++ b/kernel/power/console.c
> > > > @@ -33,6 +33,7 @@ EXPORT_SYMBOL(pm_set_vt_switch);
> > > >
> > > > int pm_prepare_console(void)
> > > > {
> > > > +#ifndef CONFIG_PM_DISABLE_CONSOLE
> > >
> > > Can't you do this in a .h file instead?
> > >
> > > And is this really needed? Why has no other distro needed this change?
> > > What is so wierd about your suspend setup to require this?
> >
> > Reportedly, some systems have problems with graphics restoration from user
> > space if the switch is done.
> >
> > Anyway, I'd prefer to use the (already existing) pm_set_vt_switch() thing for
> > that, maybe with the help of a command line parameter, to adding the .config
> > option like this.
>
> Ah. I didn't notice pm_set_vt_switch(). Then what I would like better is
> the config option to set a default. For us, not doing the vt switch is a
> good default (I don't think we have a case where suspend/resume requires
> it).

As long as we freeze X, I don't think the switch is really necessary. I might
be wrong, though.

> Something like:

Well, why not.

[/me makes a note to change disable_vt_switch to 'bool' at some point in
future]


> diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
> index e7bea3e..6a042f8 100644
> --- a/Documentation/kernel-parameters.txt
> +++ b/Documentation/kernel-parameters.txt
> @@ -2247,6 +2247,11 @@ and is between 256 and 4096 characters. It is defined in the file
> vmpoff= [KNL,S390] Perform z/VM CP command after power off.
> Format: <command>
>
> + vt_switch= [PM] Switch vt's during suspend/resume
> + Format: { 0 | 1 }
> + Default is normally '1', but depends on value of
> + the PM_DISABLE_CONSOLE config option.
> +
> waveartist= [HW,OSS]
> Format: <io>,<irq>,<dma>,<dma2>
>
> diff --git a/kernel/power/Kconfig b/kernel/power/Kconfig
> index dcd165f..202f9b3 100644
> --- a/kernel/power/Kconfig
> +++ b/kernel/power/Kconfig
> @@ -116,6 +116,25 @@ config SUSPEND_FREEZER
>
> Turning OFF this setting is NOT recommended! If in doubt, say Y.
>
> +config PM_DISABLE_CONSOLE
> + bool "Disable Power Management messing with the active console"
> + depends on PM
> + default n
> + ---help---
> + By default, PM will take over the active console (generally, this means
> + switching to the console when suspending from X). This can at times cause
> + problems, especially if userspace suspend scripts try to do things with
> + the console before or after suspending (e.g. calling vbestate).
> +
> + To work around this, enable this option so that PM will not handle the
> + console.
> +
> + Note, this is the same as passing vt_switch=0 command line option, but
> + just hardcodes the default. You can still pass vt_switch=1 with this
> + option to get original behavior.
> +
> + If unsure, say N.
> +
> config HIBERNATION
> bool "Hibernation (aka 'suspend to disk')"
> depends on PM && SWAP && ARCH_HIBERNATION_POSSIBLE
> diff --git a/kernel/power/console.c b/kernel/power/console.c
> index b8628be..db116d8 100644
> --- a/kernel/power/console.c
> +++ b/kernel/power/console.c
> @@ -14,7 +14,11 @@
> #define SUSPEND_CONSOLE (MAX_NR_CONSOLES-1)
>
> static int orig_fgconsole, orig_kmsg;
> +#ifdef CONFIG_PM_DISABLE_CONSOLE
> +static int disable_vt_switch = 1;
> +#else
> static int disable_vt_switch;
> +#endif
>
> /*
> * Normally during a suspend, we allocate a new console and switch to it.
> @@ -80,4 +84,17 @@ void pm_restore_console(void)
> release_console_sem();
> kmsg_redirect = orig_kmsg;
> }
> +
> +static int __init set_vt_switch(char *str)
> +{
> + if (str[0] == '0')
> + disable_vt_switch = 1;
> + else if (str[0] == '1')
> + disable_vt_switch = 0;
> + else
> + return -EINVAL;
> +
> + return 0;
> +}
> +__setup("vt_switch=", set_vt_switch);
> #endif
>
>
>
>

2008-07-30 01:45:59

by Matthew Garrett

[permalink] [raw]
Subject: Re: [PATCH 4/7] nsc-ircc: Default to dongle type 9 on IBM hardware

On Mon, Jul 28, 2008 at 07:46:12PM -0700, Andrew Morton wrote:
> The changelog doesn't exist^Wexplain the reasons for this patch.
>
> I assume it fixes some bug? What is it?

It's necessary to set the dongle type on the nsc driver in order to get
it to work correctly. Thinkpads all appear to use dongle type 9. This
patch defaults nsc devices with an IBM PnP descriptor to use type 9.

--
Matthew Garrett | [email protected]

2008-07-30 02:16:37

by Andrew Morton

[permalink] [raw]
Subject: Re: [PATCH 4/7] nsc-ircc: Default to dongle type 9 on IBM hardware

On Wed, 30 Jul 2008 02:44:39 +0100 Matthew Garrett <[email protected]> wrote:

> On Mon, Jul 28, 2008 at 07:46:12PM -0700, Andrew Morton wrote:
> > The changelog doesn't exist^Wexplain the reasons for this patch.
> >
> > I assume it fixes some bug? What is it?
>
> It's necessary to set the dongle type on the nsc driver in order to get
> it to work correctly. Thinkpads all appear to use dongle type 9. This
> patch defaults nsc devices with an IBM PnP descriptor to use type 9.
>

So it makes thinkpads work? That's useful info.

We're getting there. Who actually authored the patch?

2008-07-30 04:51:31

by Greg KH

[permalink] [raw]
Subject: Re: [PATCH 6/7] pm: Config option to disable handling of console during suspend/resume

On Tue, Jul 29, 2008 at 05:51:50PM -0400, Ben Collins wrote:
> On Tue, 2008-07-29 at 23:15 +0200, Rafael J. Wysocki wrote:
> > On Tuesday, 29 of July 2008, Greg KH wrote:
> > > On Sun, Jul 20, 2008 at 09:48:28PM -0400, Ben Collins wrote:
> > > > Config option allows userspace to handle console during suspend/resume
> > > > instead of the kernel.
> > > >
> > > > Signed-off-by: Ben Collins <[email protected]>
> > > > ---
> > > > kernel/power/Kconfig | 15 +++++++++++++++
> > > > kernel/power/console.c | 4 ++++
> > > > 2 files changed, 19 insertions(+), 0 deletions(-)
> > > >
> > > > diff --git a/kernel/power/Kconfig b/kernel/power/Kconfig
> > > > index b45da40..6855299 100644
> > > > --- a/kernel/power/Kconfig
> > > > +++ b/kernel/power/Kconfig
> > > > @@ -105,6 +105,21 @@ config SUSPEND_FREEZER
> > > >
> > > > Turning OFF this setting is NOT recommended! If in doubt, say Y.
> > > >
> > > > +config PM_DISABLE_CONSOLE
> > > > + bool "Disable Power Management messing with the active console"
> > > > + depends on PM
> > > > + default n
> > > > + ---help---
> > > > + By default, PM will take over the active console (generally, this means
> > > > + switching to the console when suspending from X). This can at times cause
> > > > + problems, especially if userspace suspend scripts try to do things with
> > > > + the console before or after suspending (e.g. calling vbestate).
> > > > +
> > > > + To work around this, enable this option so that PM will not handle the
> > > > + console.
> > > > +
> > > > + If unsure, say N.
> > > > +
> > > > config HIBERNATION
> > > > bool "Hibernation (aka 'suspend to disk')"
> > > > depends on PM && SWAP && ARCH_HIBERNATION_POSSIBLE
> > > > diff --git a/kernel/power/console.c b/kernel/power/console.c
> > > > index b8628be..8b9706f 100644
> > > > --- a/kernel/power/console.c
> > > > +++ b/kernel/power/console.c
> > > > @@ -33,6 +33,7 @@ EXPORT_SYMBOL(pm_set_vt_switch);
> > > >
> > > > int pm_prepare_console(void)
> > > > {
> > > > +#ifndef CONFIG_PM_DISABLE_CONSOLE
> > >
> > > Can't you do this in a .h file instead?
> > >
> > > And is this really needed? Why has no other distro needed this change?
> > > What is so wierd about your suspend setup to require this?
> >
> > Reportedly, some systems have problems with graphics restoration from user
> > space if the switch is done.
> >
> > Anyway, I'd prefer to use the (already existing) pm_set_vt_switch() thing for
> > that, maybe with the help of a command line parameter, to adding the .config
> > option like this.
>
> Ah. I didn't notice pm_set_vt_switch(). Then what I would like better is
> the config option to set a default. For us, not doing the vt switch is a
> good default (I don't think we have a case where suspend/resume requires
> it).
>
> Something like:
>
> diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
> index e7bea3e..6a042f8 100644
> --- a/Documentation/kernel-parameters.txt
> +++ b/Documentation/kernel-parameters.txt
> @@ -2247,6 +2247,11 @@ and is between 256 and 4096 characters. It is defined in the file
> vmpoff= [KNL,S390] Perform z/VM CP command after power off.
> Format: <command>
>
> + vt_switch= [PM] Switch vt's during suspend/resume
> + Format: { 0 | 1 }
> + Default is normally '1', but depends on value of
> + the PM_DISABLE_CONSOLE config option.
> +

Why a build time config option? Why not just set the command line
option if you need this? And/or make it a sysctrl?

That way we don't have to add yet-another-config-option for distros and
users to get wrong.

thanks,

greg k-h

2008-07-30 05:11:22

by Matthew Garrett

[permalink] [raw]
Subject: Re: [PATCH 4/7] nsc-ircc: Default to dongle type 9 on IBM hardware

On Tue, Jul 29, 2008 at 07:16:14PM -0700, Andrew Morton wrote:

> We're getting there. Who actually authored the patch?

Me. I can resend with a new description if you'd like.

--
Matthew Garrett | [email protected]

2008-07-30 14:17:55

by Ben Collins

[permalink] [raw]
Subject: Re: [PATCH 4/7] nsc-ircc: Default to dongle type 9 on IBM hardware

On Wed, 2008-07-30 at 06:11 +0100, Matthew Garrett wrote:
> On Tue, Jul 29, 2008 at 07:16:14PM -0700, Andrew Morton wrote:
>
> > We're getting there. Who actually authored the patch?
>
> Me. I can resend with a new description if you'd like.

Matthew did the original patch, I just reworked it based on some
comments.

2008-07-30 14:20:26

by Ben Collins

[permalink] [raw]
Subject: Re: [PATCH 6/7] pm: Config option to disable handling of console during suspend/resume

On Tue, 2008-07-29 at 21:47 -0700, Greg KH wrote:
> On Tue, Jul 29, 2008 at 05:51:50PM -0400, Ben Collins wrote:
> > On Tue, 2008-07-29 at 23:15 +0200, Rafael J. Wysocki wrote:
> > > On Tuesday, 29 of July 2008, Greg KH wrote:
> > > > On Sun, Jul 20, 2008 at 09:48:28PM -0400, Ben Collins wrote:
> > > > > Config option allows userspace to handle console during suspend/resume
> > > > > instead of the kernel.
> > > > >
> > > > > Signed-off-by: Ben Collins <[email protected]>
> > > > > ---
> > > > > kernel/power/Kconfig | 15 +++++++++++++++
> > > > > kernel/power/console.c | 4 ++++
> > > > > 2 files changed, 19 insertions(+), 0 deletions(-)
> > > > >
> > > > > diff --git a/kernel/power/Kconfig b/kernel/power/Kconfig
> > > > > index b45da40..6855299 100644
> > > > > --- a/kernel/power/Kconfig
> > > > > +++ b/kernel/power/Kconfig
> > > > > @@ -105,6 +105,21 @@ config SUSPEND_FREEZER
> > > > >
> > > > > Turning OFF this setting is NOT recommended! If in doubt, say Y.
> > > > >
> > > > > +config PM_DISABLE_CONSOLE
> > > > > + bool "Disable Power Management messing with the active console"
> > > > > + depends on PM
> > > > > + default n
> > > > > + ---help---
> > > > > + By default, PM will take over the active console (generally, this means
> > > > > + switching to the console when suspending from X). This can at times cause
> > > > > + problems, especially if userspace suspend scripts try to do things with
> > > > > + the console before or after suspending (e.g. calling vbestate).
> > > > > +
> > > > > + To work around this, enable this option so that PM will not handle the
> > > > > + console.
> > > > > +
> > > > > + If unsure, say N.
> > > > > +
> > > > > config HIBERNATION
> > > > > bool "Hibernation (aka 'suspend to disk')"
> > > > > depends on PM && SWAP && ARCH_HIBERNATION_POSSIBLE
> > > > > diff --git a/kernel/power/console.c b/kernel/power/console.c
> > > > > index b8628be..8b9706f 100644
> > > > > --- a/kernel/power/console.c
> > > > > +++ b/kernel/power/console.c
> > > > > @@ -33,6 +33,7 @@ EXPORT_SYMBOL(pm_set_vt_switch);
> > > > >
> > > > > int pm_prepare_console(void)
> > > > > {
> > > > > +#ifndef CONFIG_PM_DISABLE_CONSOLE
> > > >
> > > > Can't you do this in a .h file instead?
> > > >
> > > > And is this really needed? Why has no other distro needed this change?
> > > > What is so wierd about your suspend setup to require this?
> > >
> > > Reportedly, some systems have problems with graphics restoration from user
> > > space if the switch is done.
> > >
> > > Anyway, I'd prefer to use the (already existing) pm_set_vt_switch() thing for
> > > that, maybe with the help of a command line parameter, to adding the .config
> > > option like this.
> >
> > Ah. I didn't notice pm_set_vt_switch(). Then what I would like better is
> > the config option to set a default. For us, not doing the vt switch is a
> > good default (I don't think we have a case where suspend/resume requires
> > it).
> >
> > Something like:
> >
> > diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
> > index e7bea3e..6a042f8 100644
> > --- a/Documentation/kernel-parameters.txt
> > +++ b/Documentation/kernel-parameters.txt
> > @@ -2247,6 +2247,11 @@ and is between 256 and 4096 characters. It is defined in the file
> > vmpoff= [KNL,S390] Perform z/VM CP command after power off.
> > Format: <command>
> >
> > + vt_switch= [PM] Switch vt's during suspend/resume
> > + Format: { 0 | 1 }
> > + Default is normally '1', but depends on value of
> > + the PM_DISABLE_CONSOLE config option.
> > +
>
> Why a build time config option? Why not just set the command line
> option if you need this? And/or make it a sysctrl?
>
> That way we don't have to add yet-another-config-option for distros and
> users to get wrong.
>
> thanks,

Sysctl makes sense. I would rather not have to add a cmdline option to
default installs (and on upgrades). I'll redo the patch that way and
resend.

2008-07-31 05:45:42

by Jeff Garzik

[permalink] [raw]
Subject: Re: [PATCH 2/7] ata: blacklist FUJITSU MHW2160BH PL

Chuck Short wrote:
> Reference: https://launchpad.net/bugs/175834
>
> CC: [email protected]
> Signed-off-by: Chuck Short <[email protected]>
> Signed-off-by: Tim Gardner <[email protected]>
> Signed-off-by: Ben Collins <[email protected]>
> ---
> drivers/ata/libata-core.c | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
> index 9bef1a8..2664082 100644
> --- a/drivers/ata/libata-core.c
> +++ b/drivers/ata/libata-core.c
> @@ -3935,6 +3935,7 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = {
> { "HTS541060G9SA00", "MB3OC60D", ATA_HORKAGE_NONCQ, },
> { "HTS541080G9SA00", "MB4OC60D", ATA_HORKAGE_NONCQ, },
> { "HTS541010G9SA00", "MBZOC60D", ATA_HORKAGE_NONCQ, },
> + { "FUJITSU MHW2160BH PL", "0084001E", ATA_HORKAGE_NONCQ, },

This is outdated -- spurious completion code is long gone

2008-07-21 04:35:52

by Chuck Short

[permalink] [raw]
Subject: [PATCH 2/7] ata: blacklist FUJITSU MHW2160BH PL

Reference: https://launchpad.net/bugs/175834

CC: [email protected]
Signed-off-by: Chuck Short <[email protected]>
Signed-off-by: Tim Gardner <[email protected]>
Signed-off-by: Ben Collins <[email protected]>
---
drivers/ata/libata-core.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 9bef1a8..2664082 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -3935,6 +3935,7 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = {
{ "HTS541060G9SA00", "MB3OC60D", ATA_HORKAGE_NONCQ, },
{ "HTS541080G9SA00", "MB4OC60D", ATA_HORKAGE_NONCQ, },
{ "HTS541010G9SA00", "MBZOC60D", ATA_HORKAGE_NONCQ, },
+ { "FUJITSU MHW2160BH PL", "0084001E", ATA_HORKAGE_NONCQ, },

/* devices which puke on READ_NATIVE_MAX */
{ "HDS724040KLSA80", "KFAOA20N", ATA_HORKAGE_BROKEN_HPA, },
--
1.5.4.3

2008-07-21 04:36:21

by Tim Gardner

[permalink] [raw]
Subject: [PATCH 1/7] netfilter: Export ip6t_mh.h and xt_quota.h for iptables build

CC: [email protected]
Signed-off-by: Soren Hansen <[email protected]>
Signed-off-by: Tim Gardner <[email protected]>
Signed-off-by: Ben Collins <[email protected]>
---
include/linux/netfilter/Kbuild | 2 ++
include/linux/netfilter_ipv6/Kbuild | 1 +
2 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/include/linux/netfilter/Kbuild b/include/linux/netfilter/Kbuild
index 3aff513..3a04da3 100644
--- a/include/linux/netfilter/Kbuild
+++ b/include/linux/netfilter/Kbuild
@@ -31,6 +31,8 @@ header-y += xt_multiport.h
header-y += xt_owner.h
header-y += xt_pkttype.h
header-y += xt_rateest.h
+header-y += xt_policy.h
+header-y += xt_quota.h
header-y += xt_realm.h
header-y += xt_sctp.h
header-y += xt_state.h
diff --git a/include/linux/netfilter_ipv6/Kbuild b/include/linux/netfilter_ipv6/Kbuild
index 8887a5f..aca4bd1 100644
--- a/include/linux/netfilter_ipv6/Kbuild
+++ b/include/linux/netfilter_ipv6/Kbuild
@@ -11,6 +11,7 @@ header-y += ip6t_length.h
header-y += ip6t_limit.h
header-y += ip6t_mac.h
header-y += ip6t_mark.h
+header-y += ip6t_mh.h
header-y += ip6t_multiport.h
header-y += ip6t_opts.h
header-y += ip6t_owner.h
--
1.5.4.3

2008-08-04 06:46:42

by Pavel Machek

[permalink] [raw]
Subject: Re: [PATCH 6/7] pm: Config option to disable handling of console during suspend/resume

Hi!

> > > diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
> > > index e7bea3e..6a042f8 100644
> > > --- a/Documentation/kernel-parameters.txt
> > > +++ b/Documentation/kernel-parameters.txt
> > > @@ -2247,6 +2247,11 @@ and is between 256 and 4096 characters. It is defined in the file
> > > vmpoff= [KNL,S390] Perform z/VM CP command after power off.
> > > Format: <command>
> > >
> > > + vt_switch= [PM] Switch vt's during suspend/resume
> > > + Format: { 0 | 1 }
> > > + Default is normally '1', but depends on value of
> > > + the PM_DISABLE_CONSOLE config option.
> > > +
> >
> > Why a build time config option? Why not just set the command line
> > option if you need this? And/or make it a sysctrl?
> >
> > That way we don't have to add yet-another-config-option for distros and
> > users to get wrong.
> >
> > thanks,
>
> Sysctl makes sense. I would rather not have to add a cmdline option to
> default installs (and on upgrades). I'll redo the patch that way and
> resend.

Maybe have acpi_sleep=no_vt_switch? THat is already settable from
userspace...?
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

2008-08-07 21:35:01

by Ben Collins

[permalink] [raw]
Subject: Re: [PATCH 6/7] pm: Config option to disable handling of console during suspend/resume

On Mon, 2008-08-04 at 08:28 +0200, Pavel Machek wrote:
> Hi!
>
> > > > diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
> > > > index e7bea3e..6a042f8 100644
> > > > --- a/Documentation/kernel-parameters.txt
> > > > +++ b/Documentation/kernel-parameters.txt
> > > > @@ -2247,6 +2247,11 @@ and is between 256 and 4096 characters. It is defined in the file
> > > > vmpoff= [KNL,S390] Perform z/VM CP command after power off.
> > > > Format: <command>
> > > >
> > > > + vt_switch= [PM] Switch vt's during suspend/resume
> > > > + Format: { 0 | 1 }
> > > > + Default is normally '1', but depends on value of
> > > > + the PM_DISABLE_CONSOLE config option.
> > > > +
> > >
> > > Why a build time config option? Why not just set the command line
> > > option if you need this? And/or make it a sysctrl?
> > >
> > > That way we don't have to add yet-another-config-option for distros and
> > > users to get wrong.
> > >
> > > thanks,
> >
> > Sysctl makes sense. I would rather not have to add a cmdline option to
> > default installs (and on upgrades). I'll redo the patch that way and
> > resend.
>
> Maybe have acpi_sleep=no_vt_switch? THat is already settable from
> userspace...?

Where is this setting?
Pavel

2008-08-07 21:40:33

by Rafael J. Wysocki

[permalink] [raw]
Subject: Re: [PATCH 6/7] pm: Config option to disable handling of console during suspend/resume

On Thursday, 7 of August 2008, Ben Collins wrote:
> On Mon, 2008-08-04 at 08:28 +0200, Pavel Machek wrote:
> > Hi!
> >
> > > > > diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
> > > > > index e7bea3e..6a042f8 100644
> > > > > --- a/Documentation/kernel-parameters.txt
> > > > > +++ b/Documentation/kernel-parameters.txt
> > > > > @@ -2247,6 +2247,11 @@ and is between 256 and 4096 characters. It is defined in the file
> > > > > vmpoff= [KNL,S390] Perform z/VM CP command after power off.
> > > > > Format: <command>
> > > > >
> > > > > + vt_switch= [PM] Switch vt's during suspend/resume
> > > > > + Format: { 0 | 1 }
> > > > > + Default is normally '1', but depends on value of
> > > > > + the PM_DISABLE_CONSOLE config option.
> > > > > +
> > > >
> > > > Why a build time config option? Why not just set the command line
> > > > option if you need this? And/or make it a sysctrl?
> > > >
> > > > That way we don't have to add yet-another-config-option for distros and
> > > > users to get wrong.
> > > >
> > > > thanks,
> > >
> > > Sysctl makes sense. I would rather not have to add a cmdline option to
> > > default installs (and on upgrades). I'll redo the patch that way and
> > > resend.
> >
> > Maybe have acpi_sleep=no_vt_switch? THat is already settable from
> > userspace...?
>
> Where is this setting?

This is a command line option + sysctl, but it won't be sufficient, IMO,
because it only is available on ACPI systems, while your sysctl should be
available on all systems that can suspend.

Thanks,
Rafael