Re: Patch to enable the USB handoff on Dell 650

2005-03-10 Thread Andrey Panin
On 063, 03 04, 2005 at 12:17:40 -0800, Pete Zaitcev wrote:
> On Wed, 2 Feb 2005 10:18:47 +0300 Andrey Panin <[EMAIL PROTECTED]> wrote:
> 
> > > +++ linux-2.6.11-rc2-lem/arch/i386/kernel/dmi_scan.c  2005-01-31 
> > > 20:42:16.163592792 -0800
> 
> > > +static __init int enable_usb_handoff(struct dmi_blacklist *d)
> > > +{
> 
> > Please don't add new quirks into dmi_scan.c. Use dmi_check_system()
> > where possible.
> 
> Do you have a suggestion for a good place where to add a suitable
> call for dmi_check_system for the USB handoff? Please observe that
> it does not belong with the USB code, in fact we have this code
> there already. It has to happen before any device drivers are
> initiated.
 
What about this patch ?

diff -urdpNX /usr/share/dontdiff linux-2.6.11.vanilla/drivers/pci/quirks.c 
linux-2.6.11/drivers/pci/quirks.c
--- linux-2.6.11.vanilla/drivers/pci/quirks.c   2005-03-02 10:37:31.0 
+0300
+++ linux-2.6.11/drivers/pci/quirks.c   2005-03-10 10:45:19.0 +0300
@@ -18,6 +18,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #undef DEBUG
 
@@ -886,6 +887,40 @@ static int __init usb_handoff_early(char
 }
 __setup("usb-handoff", usb_handoff_early);
 
+static int __init enable_usb_handoff(struct dmi_system_id *d)
+{
+   /*
+* A printk is probably unnecessary. There's no way this causes
+* any harm (famous last words). But seriously, we only add systems
+* to the list if we know that they need handoff for sure.
+*/
+   usb_early_handoff = 1;
+   return 0;
+}
+
+static __initdata struct dmi_system_id usb_handoff_dmi_table[] = {
+   /*
+*  Boxes which need USB taken over from BIOS explicitly.
+*/
+   {
+   .callback = enable_usb_handoff,
+   .ident = "Dell PW650",
+   .matches = {
+   DMI_MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
+   DMI_MATCH(DMI_PRODUCT_NAME, "Precision WorkStation 
650"),
+   },
+   }
+};
+
+static int __init usb_handoff_dmi_init(void)
+{
+   dmi_check_system(usb_handoff_dmi_table);
+   return 0;
+}
+
+core_initcall(usb_handoff_dmi_init);
+
+
 static void __devinit quirk_usb_handoff_uhci(struct pci_dev *pdev)
 {
unsigned long base = 0;

-- 
Andrey Panin| Linux and UNIX system administrator
[EMAIL PROTECTED]   | PGP key: wwwkeys.pgp.net
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Patch to enable the USB handoff on Dell 650

2005-03-10 Thread Andrey Panin
On 063, 03 04, 2005 at 12:17:40 -0800, Pete Zaitcev wrote:
 On Wed, 2 Feb 2005 10:18:47 +0300 Andrey Panin [EMAIL PROTECTED] wrote:
 
   +++ linux-2.6.11-rc2-lem/arch/i386/kernel/dmi_scan.c  2005-01-31 
   20:42:16.163592792 -0800
 
   +static __init int enable_usb_handoff(struct dmi_blacklist *d)
   +{
 
  Please don't add new quirks into dmi_scan.c. Use dmi_check_system()
  where possible.
 
 Do you have a suggestion for a good place where to add a suitable
 call for dmi_check_system for the USB handoff? Please observe that
 it does not belong with the USB code, in fact we have this code
 there already. It has to happen before any device drivers are
 initiated.
 
What about this patch ?

diff -urdpNX /usr/share/dontdiff linux-2.6.11.vanilla/drivers/pci/quirks.c 
linux-2.6.11/drivers/pci/quirks.c
--- linux-2.6.11.vanilla/drivers/pci/quirks.c   2005-03-02 10:37:31.0 
+0300
+++ linux-2.6.11/drivers/pci/quirks.c   2005-03-10 10:45:19.0 +0300
@@ -18,6 +18,7 @@
 #include linux/pci.h
 #include linux/init.h
 #include linux/delay.h
+#include linux/dmi.h
 
 #undef DEBUG
 
@@ -886,6 +887,40 @@ static int __init usb_handoff_early(char
 }
 __setup(usb-handoff, usb_handoff_early);
 
+static int __init enable_usb_handoff(struct dmi_system_id *d)
+{
+   /*
+* A printk is probably unnecessary. There's no way this causes
+* any harm (famous last words). But seriously, we only add systems
+* to the list if we know that they need handoff for sure.
+*/
+   usb_early_handoff = 1;
+   return 0;
+}
+
+static __initdata struct dmi_system_id usb_handoff_dmi_table[] = {
+   /*
+*  Boxes which need USB taken over from BIOS explicitly.
+*/
+   {
+   .callback = enable_usb_handoff,
+   .ident = Dell PW650,
+   .matches = {
+   DMI_MATCH(DMI_SYS_VENDOR, Dell Computer Corporation),
+   DMI_MATCH(DMI_PRODUCT_NAME, Precision WorkStation 
650),
+   },
+   }
+};
+
+static int __init usb_handoff_dmi_init(void)
+{
+   dmi_check_system(usb_handoff_dmi_table);
+   return 0;
+}
+
+core_initcall(usb_handoff_dmi_init);
+
+
 static void __devinit quirk_usb_handoff_uhci(struct pci_dev *pdev)
 {
unsigned long base = 0;

-- 
Andrey Panin| Linux and UNIX system administrator
[EMAIL PROTECTED]   | PGP key: wwwkeys.pgp.net
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Patch to enable the USB handoff on Dell 650

2005-03-04 Thread Pete Zaitcev
On Wed, 2 Feb 2005 10:18:47 +0300 Andrey Panin <[EMAIL PROTECTED]> wrote:

> > +++ linux-2.6.11-rc2-lem/arch/i386/kernel/dmi_scan.c2005-01-31 
> > 20:42:16.163592792 -0800

> > +static __init int enable_usb_handoff(struct dmi_blacklist *d)
> > +{

> Please don't add new quirks into dmi_scan.c. Use dmi_check_system()
> where possible.

Do you have a suggestion for a good place where to add a suitable
call for dmi_check_system for the USB handoff? Please observe that
it does not belong with the USB code, in fact we have this code
there already. It has to happen before any device drivers are
initiated.

-- Pete
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Patch to enable the USB handoff on Dell 650

2005-03-04 Thread Pete Zaitcev
On Wed, 2 Feb 2005 10:18:47 +0300 Andrey Panin [EMAIL PROTECTED] wrote:

  +++ linux-2.6.11-rc2-lem/arch/i386/kernel/dmi_scan.c2005-01-31 
  20:42:16.163592792 -0800

  +static __init int enable_usb_handoff(struct dmi_blacklist *d)
  +{

 Please don't add new quirks into dmi_scan.c. Use dmi_check_system()
 where possible.

Do you have a suggestion for a good place where to add a suitable
call for dmi_check_system for the USB handoff? Please observe that
it does not belong with the USB code, in fact we have this code
there already. It has to happen before any device drivers are
initiated.

-- Pete
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Patch to enable the USB handoff on Dell 650

2005-02-01 Thread Andrey Panin
On 032, 02 01, 2005 at 10:02:41AM -0800, Pete Zaitcev wrote:
> Hi, guys,
> 
> I was looking at this:
>   https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=138892
> 
>   I have added usb-handoff as a kernel option in grub.conf for
>   2.4.21-20.EL (smp) and re-enabled USB Emulation and Controller in the
>   BIOS, and the machine now seems to boot normally.  I only had time to
>   try booting it twice, but previously it would fail almost every time,
>   so two successive successful boots seems very good.  Thanks for your
>   quick responses and working solution!
> 
> Can someone with the Dell PW650 (which, I think, should be same as PE600)
> test this patch for me? I do not want to send this for inclusion into
> Linus' kernel before it's tested.
> 
> In theory we probably will want USB handoff to be enabled by default, but
> I am not sure this time is now, so let us use DMI lists until then.
> 
> Thanks,
> -- Pete
> 
> --- linux-2.6.11-rc2/arch/i386/kernel/dmi_scan.c  2005-01-22 
> 14:53:59.0 -0800
> +++ linux-2.6.11-rc2-lem/arch/i386/kernel/dmi_scan.c  2005-01-31 
> 20:42:16.163592792 -0800
> @@ -243,6 +243,19 @@
>  }  
>  #endif
>  
> +static __init int enable_usb_handoff(struct dmi_blacklist *d)
> +{
> + extern int usb_early_handoff;
> +
> + /*
> +  * A printk is probably unnecessary. There's no way this causes
> +  * any harm (famous last words). But seriously, we only add systems
> +  * to the list if we know that they need handoff for sure.
> +  */
> + usb_early_handoff = 1;
> + return 0;
> +}
> +

Please don't add new quirks into dmi_scan.c. Use dmi_check_system()
where possible.

>  /*
>   *   Process the DMI blacklists
>   */
> @@ -376,6 +389,14 @@
>  
>  #endif
>  
> + /*
> +  *  Boxes which need USB taken over from BIOS explicitly.
> +  */
> + { enable_usb_handoff, "Dell PW650", {
> + MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
> + MATCH(DMI_PRODUCT_NAME, "Precision WorkStation 650"),
> + NO_MATCH, NO_MATCH }},
> +
>   { NULL, }

-- 
Andrey Panin| Linux and UNIX system administrator
[EMAIL PROTECTED]   | PGP key: wwwkeys.pgp.net


signature.asc
Description: Digital signature


Patch to enable the USB handoff on Dell 650

2005-02-01 Thread Pete Zaitcev
Hi, guys,

I was looking at this:
  https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=138892

  I have added usb-handoff as a kernel option in grub.conf for
  2.4.21-20.EL (smp) and re-enabled USB Emulation and Controller in the
  BIOS, and the machine now seems to boot normally.  I only had time to
  try booting it twice, but previously it would fail almost every time,
  so two successive successful boots seems very good.  Thanks for your
  quick responses and working solution!

Can someone with the Dell PW650 (which, I think, should be same as PE600)
test this patch for me? I do not want to send this for inclusion into
Linus' kernel before it's tested.

In theory we probably will want USB handoff to be enabled by default, but
I am not sure this time is now, so let us use DMI lists until then.

Thanks,
-- Pete

--- linux-2.6.11-rc2/arch/i386/kernel/dmi_scan.c2005-01-22 
14:53:59.0 -0800
+++ linux-2.6.11-rc2-lem/arch/i386/kernel/dmi_scan.c2005-01-31 
20:42:16.163592792 -0800
@@ -243,6 +243,19 @@
 }  
 #endif
 
+static __init int enable_usb_handoff(struct dmi_blacklist *d)
+{
+   extern int usb_early_handoff;
+
+   /*
+* A printk is probably unnecessary. There's no way this causes
+* any harm (famous last words). But seriously, we only add systems
+* to the list if we know that they need handoff for sure.
+*/
+   usb_early_handoff = 1;
+   return 0;
+}
+
 /*
  * Process the DMI blacklists
  */
@@ -376,6 +389,14 @@
 
 #endif
 
+   /*
+*  Boxes which need USB taken over from BIOS explicitly.
+*/
+   { enable_usb_handoff, "Dell PW650", {
+   MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
+   MATCH(DMI_PRODUCT_NAME, "Precision WorkStation 650"),
+   NO_MATCH, NO_MATCH }},
+
{ NULL, }
 };
 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Patch to enable the USB handoff on Dell 650

2005-02-01 Thread Pete Zaitcev
Hi, guys,

I was looking at this:
  https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=138892

  I have added usb-handoff as a kernel option in grub.conf for
  2.4.21-20.EL (smp) and re-enabled USB Emulation and Controller in the
  BIOS, and the machine now seems to boot normally.  I only had time to
  try booting it twice, but previously it would fail almost every time,
  so two successive successful boots seems very good.  Thanks for your
  quick responses and working solution!

Can someone with the Dell PW650 (which, I think, should be same as PE600)
test this patch for me? I do not want to send this for inclusion into
Linus' kernel before it's tested.

In theory we probably will want USB handoff to be enabled by default, but
I am not sure this time is now, so let us use DMI lists until then.

Thanks,
-- Pete

--- linux-2.6.11-rc2/arch/i386/kernel/dmi_scan.c2005-01-22 
14:53:59.0 -0800
+++ linux-2.6.11-rc2-lem/arch/i386/kernel/dmi_scan.c2005-01-31 
20:42:16.163592792 -0800
@@ -243,6 +243,19 @@
 }  
 #endif
 
+static __init int enable_usb_handoff(struct dmi_blacklist *d)
+{
+   extern int usb_early_handoff;
+
+   /*
+* A printk is probably unnecessary. There's no way this causes
+* any harm (famous last words). But seriously, we only add systems
+* to the list if we know that they need handoff for sure.
+*/
+   usb_early_handoff = 1;
+   return 0;
+}
+
 /*
  * Process the DMI blacklists
  */
@@ -376,6 +389,14 @@
 
 #endif
 
+   /*
+*  Boxes which need USB taken over from BIOS explicitly.
+*/
+   { enable_usb_handoff, Dell PW650, {
+   MATCH(DMI_SYS_VENDOR, Dell Computer Corporation),
+   MATCH(DMI_PRODUCT_NAME, Precision WorkStation 650),
+   NO_MATCH, NO_MATCH }},
+
{ NULL, }
 };
 
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Patch to enable the USB handoff on Dell 650

2005-02-01 Thread Andrey Panin
On 032, 02 01, 2005 at 10:02:41AM -0800, Pete Zaitcev wrote:
 Hi, guys,
 
 I was looking at this:
   https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=138892
 
   I have added usb-handoff as a kernel option in grub.conf for
   2.4.21-20.EL (smp) and re-enabled USB Emulation and Controller in the
   BIOS, and the machine now seems to boot normally.  I only had time to
   try booting it twice, but previously it would fail almost every time,
   so two successive successful boots seems very good.  Thanks for your
   quick responses and working solution!
 
 Can someone with the Dell PW650 (which, I think, should be same as PE600)
 test this patch for me? I do not want to send this for inclusion into
 Linus' kernel before it's tested.
 
 In theory we probably will want USB handoff to be enabled by default, but
 I am not sure this time is now, so let us use DMI lists until then.
 
 Thanks,
 -- Pete
 
 --- linux-2.6.11-rc2/arch/i386/kernel/dmi_scan.c  2005-01-22 
 14:53:59.0 -0800
 +++ linux-2.6.11-rc2-lem/arch/i386/kernel/dmi_scan.c  2005-01-31 
 20:42:16.163592792 -0800
 @@ -243,6 +243,19 @@
  }  
  #endif
  
 +static __init int enable_usb_handoff(struct dmi_blacklist *d)
 +{
 + extern int usb_early_handoff;
 +
 + /*
 +  * A printk is probably unnecessary. There's no way this causes
 +  * any harm (famous last words). But seriously, we only add systems
 +  * to the list if we know that they need handoff for sure.
 +  */
 + usb_early_handoff = 1;
 + return 0;
 +}
 +

Please don't add new quirks into dmi_scan.c. Use dmi_check_system()
where possible.

  /*
   *   Process the DMI blacklists
   */
 @@ -376,6 +389,14 @@
  
  #endif
  
 + /*
 +  *  Boxes which need USB taken over from BIOS explicitly.
 +  */
 + { enable_usb_handoff, Dell PW650, {
 + MATCH(DMI_SYS_VENDOR, Dell Computer Corporation),
 + MATCH(DMI_PRODUCT_NAME, Precision WorkStation 650),
 + NO_MATCH, NO_MATCH }},
 +
   { NULL, }

-- 
Andrey Panin| Linux and UNIX system administrator
[EMAIL PROTECTED]   | PGP key: wwwkeys.pgp.net


signature.asc
Description: Digital signature