public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] PCI: Unhide SMBus on Compaq Evo N620c
@ 2005-09-06 20:39 Rumen Ivanov Zarev
  2005-09-06 22:43 ` Lee Revell
  0 siblings, 1 reply; 5+ messages in thread
From: Rumen Ivanov Zarev @ 2005-09-06 20:39 UTC (permalink / raw)
  To: gregkh; +Cc: linux-kernel

Trivial patch against 2.6.13 to unhide SMBus on Compaq Evo N620c laptop using
Intel 82855PM chipset.

Signed-off-by: Rumen Zarev <rzarev@caltech.edu>

--- linux-2.6.13/drivers/pci/quirks.c.orig	2005-09-05 23:36:49.213894072 +0300
+++ linux-2.6.13/drivers/pci/quirks.c	2005-09-05 23:42:15.391307568 +0300
@@ -850,6 +850,12 @@ static void __init asus_hides_smbus_host
                        case 0xC00C: /* Samsung P35 notebook */
                                asus_hides_smbus = 1;
                        }
+	} else if (unlikely(dev->subsystem_vendor == PCI_VENDOR_ID_COMPAQ)) {
+		if (dev->device == PCI_DEVICE_ID_INTEL_82855PM_HB)
+			switch(dev->subsystem_device) {
+			case 0x0058: /* Compaq Evo N620c */
+				asus_hides_smbus = 1;
+			}
 	}
 }
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL,	PCI_DEVICE_ID_INTEL_82845_HB,	asus_hides_smbus_hostbridge );


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] PCI: Unhide SMBus on Compaq Evo N620c
  2005-09-06 20:39 [PATCH] PCI: Unhide SMBus on Compaq Evo N620c Rumen Ivanov Zarev
@ 2005-09-06 22:43 ` Lee Revell
  2005-09-06 22:59   ` Rumen Zarev
  2005-09-06 23:01   ` Dmitry Torokhov
  0 siblings, 2 replies; 5+ messages in thread
From: Lee Revell @ 2005-09-06 22:43 UTC (permalink / raw)
  To: Rumen Ivanov Zarev; +Cc: gregkh, linux-kernel

On Tue, 2005-09-06 at 13:39 -0700, Rumen Ivanov Zarev wrote:
> Trivial patch against 2.6.13 to unhide SMBus on Compaq Evo N620c laptop using
> Intel 82855PM chipset.

> +	} else if (unlikely(dev->subsystem_vendor == PCI_VENDOR_ID_COMPAQ)) {

Should unlikely() be used for cases where the conditional will be true
iff a specific piece of hardware is present?  Seems like we'd always
lose.

Lee



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] PCI: Unhide SMBus on Compaq Evo N620c
  2005-09-06 22:43 ` Lee Revell
@ 2005-09-06 22:59   ` Rumen Zarev
  2005-09-06 23:01   ` Dmitry Torokhov
  1 sibling, 0 replies; 5+ messages in thread
From: Rumen Zarev @ 2005-09-06 22:59 UTC (permalink / raw)
  To: Lee Revell; +Cc: gregkh, linux-kernel

Lee Revell wrote:
> On Tue, 2005-09-06 at 13:39 -0700, Rumen Ivanov Zarev wrote:
> 
>>Trivial patch against 2.6.13 to unhide SMBus on Compaq Evo N620c laptop using
>>Intel 82855PM chipset.
> 
> 
>>+	} else if (unlikely(dev->subsystem_vendor == PCI_VENDOR_ID_COMPAQ)) {
> 
> 
> Should unlikely() be used for cases where the conditional will be true
> iff a specific piece of hardware is present?  Seems like we'd always
> lose.
> 
> Lee
> 
> 
> 

I just copied some code that was already there and modified it for my 
case. I don't really know HOW it works - I'm not much of a programmer 
myself.

Rumen


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] PCI: Unhide SMBus on Compaq Evo N620c
  2005-09-06 22:43 ` Lee Revell
  2005-09-06 22:59   ` Rumen Zarev
@ 2005-09-06 23:01   ` Dmitry Torokhov
  2005-09-07 18:12     ` Jean Delvare
  1 sibling, 1 reply; 5+ messages in thread
From: Dmitry Torokhov @ 2005-09-06 23:01 UTC (permalink / raw)
  To: Lee Revell; +Cc: Rumen Ivanov Zarev, gregkh, linux-kernel

On 9/6/05, Lee Revell <rlrevell@joe-job.com> wrote:
> On Tue, 2005-09-06 at 13:39 -0700, Rumen Ivanov Zarev wrote:
> > Trivial patch against 2.6.13 to unhide SMBus on Compaq Evo N620c laptop using
> > Intel 82855PM chipset.
> 
> > +     } else if (unlikely(dev->subsystem_vendor == PCI_VENDOR_ID_COMPAQ)) {
> 
> Should unlikely() be used for cases where the conditional will be true
> iff a specific piece of hardware is present?  Seems like we'd always
> lose.
> 

I would say that we should definitely not use [un]likely for code that
is executed once during boot.

-- 
Dmitry

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] PCI: Unhide SMBus on Compaq Evo N620c
  2005-09-06 23:01   ` Dmitry Torokhov
@ 2005-09-07 18:12     ` Jean Delvare
  0 siblings, 0 replies; 5+ messages in thread
From: Jean Delvare @ 2005-09-07 18:12 UTC (permalink / raw)
  To: Dmitry Torokhov, Lee Revell; +Cc: LKML, Rumen Ivanov Zarev

Hi Dmitry, Lee, Rumen, all,

> > Should unlikely() be used for cases where the conditional will be
> > true iff a specific piece of hardware is present?  Seems like we'd
> > always lose.
> 
> I would say that we should definitely not use [un]likely for code that
> is executed once during boot.

I think that the point of using unlikely in pci/quirks is more political
than technical. PCI quirks are only needed because some manufacturers
don't play fair on purpose or are simply too bad to write a proper BIOS
init sequence. This shouldn't slow down the boot process for owners of
decent hardware that do not need such quirks, or at least should it slow
it down as little as possible. So it's only fair that the worst slowdown
happens when the quirks-needing hardware is actually found.

This consideration left apart, each test looking for a specific piece of
hardware, considered individually, is more likely to fail than succeed
on a random machine, so anyway the use of unlikely makes sense. Whether
or not we think it is worth the additional code is a different matter (I
do, but I know not everybody does.)

Thanks,
-- 
Jean Delvare

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-09-07 18:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-06 20:39 [PATCH] PCI: Unhide SMBus on Compaq Evo N620c Rumen Ivanov Zarev
2005-09-06 22:43 ` Lee Revell
2005-09-06 22:59   ` Rumen Zarev
2005-09-06 23:01   ` Dmitry Torokhov
2005-09-07 18:12     ` Jean Delvare

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox