2005-03-04 23:21:23

by Greg KH

[permalink] [raw]
Subject: PCI: remove pci_find_device usage from pci sysfs code.

ChangeSet 1.1998.11.23, 2005/02/25 08:26:11-08:00, [email protected]

PCI: remove pci_find_device usage from pci sysfs code.

Signed-off-by: Greg Kroah-Hartman <[email protected]>


drivers/pci/pci-sysfs.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)


diff -Nru a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c
--- a/drivers/pci/pci-sysfs.c 2005-03-04 12:41:33 -08:00
+++ b/drivers/pci/pci-sysfs.c 2005-03-04 12:41:33 -08:00
@@ -481,7 +481,7 @@
struct pci_dev *pdev = NULL;

sysfs_initialized = 1;
- while ((pdev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pdev)) != NULL)
+ while ((pdev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, pdev)) != NULL)
pci_create_sysfs_dev_files(pdev);

return 0;


2005-03-04 21:23:54

by Greg KH

[permalink] [raw]
Subject: [PATCH] PCI: tone down pci=routeirq message

ChangeSet 1.1998.11.25, 2005/02/25 15:47:53-08:00, [email protected]

[PATCH] PCI: tone down pci=routeirq message

From: Bjorn Helgaas <[email protected]>

Tone down the message about using "pci=routeirq". I do still get a few
reports, but most are now prompted just by the fact that my email address
appears in dmesg in an "error-type" message.

Signed-off-by: Bjorn Helgaas <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>


arch/i386/pci/acpi.c | 17 ++++-------------
arch/ia64/pci/pci.c | 16 +++-------------
2 files changed, 7 insertions(+), 26 deletions(-)


diff -Nru a/arch/i386/pci/acpi.c b/arch/i386/pci/acpi.c
--- a/arch/i386/pci/acpi.c 2005-03-04 12:41:20 -08:00
+++ b/arch/i386/pci/acpi.c 2005-03-04 12:41:20 -08:00
@@ -37,21 +37,12 @@
* also do it here in case there are still broken drivers that
* don't use pci_enable_device().
*/
- printk(KERN_INFO "** Routing PCI interrupts for all devices because \"pci=routeirq\"\n");
- printk(KERN_INFO "** was specified. If this was required to make a driver work,\n");
- printk(KERN_INFO "** please email the output of \"lspci\" to [email protected]\n");
- printk(KERN_INFO "** so I can fix the driver.\n");
+ printk(KERN_INFO "PCI: Routing PCI interrupts for all devices because \"pci=routeirq\" specified\n");
while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL)
acpi_pci_irq_enable(dev);
- } else {
- printk(KERN_INFO "** PCI interrupts are no longer routed automatically. If this\n");
- printk(KERN_INFO "** causes a device to stop working, it is probably because the\n");
- printk(KERN_INFO "** driver failed to call pci_enable_device(). As a temporary\n");
- printk(KERN_INFO "** workaround, the \"pci=routeirq\" argument restores the old\n");
- printk(KERN_INFO "** behavior. If this argument makes the device work again,\n");
- printk(KERN_INFO "** please email the output of \"lspci\" to [email protected]\n");
- printk(KERN_INFO "** so I can fix the driver.\n");
- }
+ } else
+ printk(KERN_INFO "PCI: If a device doesn't work, try \"pci=routeirq\". If it helps, post a report\n");
+
#ifdef CONFIG_X86_IO_APIC
if (acpi_ioapic)
print_IO_APIC();
diff -Nru a/arch/ia64/pci/pci.c b/arch/ia64/pci/pci.c
--- a/arch/ia64/pci/pci.c 2005-03-04 12:41:20 -08:00
+++ b/arch/ia64/pci/pci.c 2005-03-04 12:41:20 -08:00
@@ -151,21 +151,11 @@
* also do it here in case there are still broken drivers that
* don't use pci_enable_device().
*/
- printk(KERN_INFO "** Routing PCI interrupts for all devices because \"pci=routeirq\"\n");
- printk(KERN_INFO "** was specified. If this was required to make a driver work,\n");
- printk(KERN_INFO "** please email the output of \"lspci\" to [email protected]\n");
- printk(KERN_INFO "** so I can fix the driver.\n");
+ printk(KERN_INFO "PCI: Routing interrupts for all devices because \"pci=routeirq\" specified\n");
for_each_pci_dev(dev)
acpi_pci_irq_enable(dev);
- } else {
- printk(KERN_INFO "** PCI interrupts are no longer routed automatically. If this\n");
- printk(KERN_INFO "** causes a device to stop working, it is probably because the\n");
- printk(KERN_INFO "** driver failed to call pci_enable_device(). As a temporary\n");
- printk(KERN_INFO "** workaround, the \"pci=routeirq\" argument restores the old\n");
- printk(KERN_INFO "** behavior. If this argument makes the device work again,\n");
- printk(KERN_INFO "** please email the output of \"lspci\" to [email protected]\n");
- printk(KERN_INFO "** so I can fix the driver.\n");
- }
+ } else
+ printk(KERN_INFO "PCI: If a device doesn't work, try \"pci=routeirq\". If it helps, post a report\n");

return 0;
}

2005-03-04 21:23:55

by Greg KH

[permalink] [raw]
Subject: [PATCH] PCI: Apple PCI IDs update

ChangeSet 1.1998.11.24, 2005/02/25 14:36:10-08:00, [email protected]

[PATCH] PCI: Apple PCI IDs update

please sent that to Andrew/Linus in your next batch for after 2.6.11,
those new IDs will be needed for support of the new iMac G5.

The changes to pci.ids match the changes already submitted to the web
database.

From: Benjamin Herrenschmidt <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>


include/linux/pci_ids.h | 3 +++
1 files changed, 3 insertions(+)


diff -Nru a/include/linux/pci_ids.h b/include/linux/pci_ids.h
--- a/include/linux/pci_ids.h 2005-03-04 12:41:26 -08:00
+++ b/include/linux/pci_ids.h 2005-03-04 12:41:26 -08:00
@@ -862,6 +862,9 @@
#define PCI_DEVICE_ID_APPLE_KEYLARGO_I 0x003e
#define PCI_DEVICE_ID_APPLE_K2_ATA100 0x0043
#define PCI_DEVICE_ID_APPLE_K2_GMAC 0x004c
+#define PCI_DEVICE_ID_APPLE_SH_ATA 0x0050
+#define PCI_DEVICE_ID_APPLE_SH_SUNGEM 0x0051
+#define PCI_DEVICE_ID_APPLE_SH_FW 0x0052
#define PCI_DEVICE_ID_APPLE_TIGON3 0x1645

#define PCI_VENDOR_ID_YAMAHA 0x1073

2005-03-04 21:23:51

by Greg KH

[permalink] [raw]
Subject: [PATCH] PCI: fix hotplug double free

ChangeSet 1.1998.11.26, 2005/02/25 15:48:12-08:00, [email protected]

[PATCH] PCI: fix hotplug double free

With the brackets missed out func could be freed twice.

Found by Coverity tool

Signed-off-by: Alexander Nyberg <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>


drivers/pci/hotplug/pciehp_ctrl.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletion(-)


diff -Nru a/drivers/pci/hotplug/pciehp_ctrl.c b/drivers/pci/hotplug/pciehp_ctrl.c
--- a/drivers/pci/hotplug/pciehp_ctrl.c 2005-03-04 12:41:13 -08:00
+++ b/drivers/pci/hotplug/pciehp_ctrl.c 2005-03-04 12:41:13 -08:00
@@ -1354,10 +1354,11 @@
dbg("PCI Bridge Hot-Remove s:b:d:f(%02x:%02x:%02x:%02x)\n",
ctrl->seg, func->bus, func->device, func->function);
bridge_slot_remove(func);
- } else
+ } else {
dbg("PCI Function Hot-Remove s:b:d:f(%02x:%02x:%02x:%02x)\n",
ctrl->seg, func->bus, func->device, func->function);
slot_remove(func);
+ }

func = pciehp_slot_find(ctrl->slot_bus, device, 0);
}

2005-03-04 23:08:03

by Greg KH

[permalink] [raw]
Subject: [PATCH] PCI: One more Asus SMBus quirk

ChangeSet 1.1998.11.27, 2005/02/25 15:48:28-08:00, [email protected]

[PATCH] PCI: One more Asus SMBus quirk

One more Asus laptop requiring the SMBus quirk (W1N model).

Signed-off-by: Jean Delvare <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>


drivers/pci/quirks.c | 1 +
1 files changed, 1 insertion(+)


diff -Nru a/drivers/pci/quirks.c b/drivers/pci/quirks.c
--- a/drivers/pci/quirks.c 2005-03-04 12:41:06 -08:00
+++ b/drivers/pci/quirks.c 2005-03-04 12:41:06 -08:00
@@ -786,6 +786,7 @@
}
if (dev->device == PCI_DEVICE_ID_INTEL_82855PM_HB)
switch (dev->subsystem_device) {
+ case 0x184b: /* W1N notebook */
case 0x186a: /* M6Ne notebook */
asus_hides_smbus = 1;
}

2005-03-08 22:13:30

by Bill Davidsen

[permalink] [raw]
Subject: Re: [PATCH] PCI: One more Asus SMBus quirk

Greg KH wrote:
> ChangeSet 1.1998.11.27, 2005/02/25 15:48:28-08:00, [email protected]
>
> [PATCH] PCI: One more Asus SMBus quirk
>
> One more Asus laptop requiring the SMBus quirk (W1N model).
>
> Signed-off-by: Jean Delvare <[email protected]>
> Signed-off-by: Greg Kroah-Hartman <[email protected]>

Hopefully this and the double-free patch will be included in 2.6.11.n+1?
They seem to fit the "real bug" criteria.

--
-bill davidsen ([email protected])
"The secret to procrastination is to put things off until the
last possible moment - but no longer" -me

2005-03-08 22:21:01

by Jean Delvare

[permalink] [raw]
Subject: Re: [PATCH] PCI: One more Asus SMBus quirk

Hi Bill,

> > [PATCH] PCI: One more Asus SMBus quirk
> >
> > One more Asus laptop requiring the SMBus quirk (W1N model).
>
> Hopefully this and the double-free patch will be included in
> 2.6.11.n+1? They seem to fit the "real bug" criteria.

I see nothing critical in this patch. It gives access to a chip. Without
the patch you cannot access the chip, and that's about it. No bug there,
only a missing feature.

Can't speak for the "double-free patch", don't know what it is all
about.

--
Jean Delvare

2005-03-08 22:36:02

by Bill Davidsen

[permalink] [raw]
Subject: Re: [PATCH] PCI: One more Asus SMBus quirk

On Tue, 8 Mar 2005, Jean Delvare wrote:

> Hi Bill,
>
> > > [PATCH] PCI: One more Asus SMBus quirk
> > >
> > > One more Asus laptop requiring the SMBus quirk (W1N model).
> >
> > Hopefully this and the double-free patch will be included in
> > 2.6.11.n+1? They seem to fit the "real bug" criteria.
>
> I see nothing critical in this patch. It gives access to a chip. Without
> the patch you cannot access the chip, and that's about it. No bug there,
> only a missing feature.

Sorry, I thought this was an non-functional feature in existing code
rather than support for a new chip.
>
> Can't speak for the "double-free patch", don't know what it is all
> about.
>
> --
> Jean Delvare
>

--
bill davidsen <[email protected]>
CTO, TMR Associates, Inc
Doing interesting things with little computers since 1979.

2005-03-09 00:34:23

by Greg KH

[permalink] [raw]
Subject: Re: [PATCH] PCI: One more Asus SMBus quirk

On Tue, Mar 08, 2005 at 05:18:16PM -0500, Bill Davidsen wrote:
> Greg KH wrote:
> >ChangeSet 1.1998.11.27, 2005/02/25 15:48:28-08:00, [email protected]
> >
> >[PATCH] PCI: One more Asus SMBus quirk
> >
> >One more Asus laptop requiring the SMBus quirk (W1N model).
> >
> >Signed-off-by: Jean Delvare <[email protected]>
> >Signed-off-by: Greg Kroah-Hartman <[email protected]>
>
> Hopefully this and the double-free patch will be included in 2.6.11.n+1?

what double-free patch?

thanks,

greg k-h

2005-03-09 16:19:27

by Bill Davidsen

[permalink] [raw]
Subject: Re: [PATCH] PCI: One more Asus SMBus quirk

On Tue, 8 Mar 2005, Greg KH wrote:

> On Tue, Mar 08, 2005 at 05:18:16PM -0500, Bill Davidsen wrote:
> > Greg KH wrote:
> > >ChangeSet 1.1998.11.27, 2005/02/25 15:48:28-08:00, [email protected]
> > >
> > >[PATCH] PCI: One more Asus SMBus quirk
> > >
> > >One more Asus laptop requiring the SMBus quirk (W1N model).
> > >
> > >Signed-off-by: Jean Delvare <[email protected]>
> > >Signed-off-by: Greg Kroah-Hartman <[email protected]>
> >
> > Hopefully this and the double-free patch will be included in 2.6.11.n+1?
>
> what double-free patch?

ChangeSet 1.1998.11.26, 2005/02/25 15:48:12-08:00

See <[email protected]>.

Or do you feel the possible results are harmless enough to wait for the
next release? Your call, obviously.


--
bill davidsen <[email protected]>
CTO, TMR Associates, Inc
Doing interesting things with little computers since 1979.

2005-03-09 16:39:14

by Greg KH

[permalink] [raw]
Subject: Re: [PATCH] PCI: One more Asus SMBus quirk

On Wed, Mar 09, 2005 at 11:06:15AM -0500, Bill Davidsen wrote:
> On Tue, 8 Mar 2005, Greg KH wrote:
>
> > On Tue, Mar 08, 2005 at 05:18:16PM -0500, Bill Davidsen wrote:
> > > Greg KH wrote:
> > > >ChangeSet 1.1998.11.27, 2005/02/25 15:48:28-08:00, [email protected]
> > > >
> > > >[PATCH] PCI: One more Asus SMBus quirk
> > > >
> > > >One more Asus laptop requiring the SMBus quirk (W1N model).
> > > >
> > > >Signed-off-by: Jean Delvare <[email protected]>
> > > >Signed-off-by: Greg Kroah-Hartman <[email protected]>
> > >
> > > Hopefully this and the double-free patch will be included in 2.6.11.n+1?
> >
> > what double-free patch?
>
> ChangeSet 1.1998.11.26, 2005/02/25 15:48:12-08:00
>
> See <[email protected]>.

Giving just the Subject: would have been easier to find the patch...

> Or do you feel the possible results are harmless enough to wait for the
> next release? Your call, obviously.

I'll add it to the -stable queue, thanks for pointing it out.

greg k-h

2005-03-10 12:06:51

by Bill Davidsen

[permalink] [raw]
Subject: Re: [PATCH] PCI: One more Asus SMBus quirk

On Wed, 9 Mar 2005, Greg KH wrote:

> On Wed, Mar 09, 2005 at 11:06:15AM -0500, Bill Davidsen wrote:
> > On Tue, 8 Mar 2005, Greg KH wrote:
> >
> > > On Tue, Mar 08, 2005 at 05:18:16PM -0500, Bill Davidsen wrote:
> > > > Greg KH wrote:
> > > > >ChangeSet 1.1998.11.27, 2005/02/25 15:48:28-08:00, [email protected]
> > > > >
> > > > >[PATCH] PCI: One more Asus SMBus quirk
> > > > >
> > > > >One more Asus laptop requiring the SMBus quirk (W1N model).
> > > > >
> > > > >Signed-off-by: Jean Delvare <[email protected]>
> > > > >Signed-off-by: Greg Kroah-Hartman <[email protected]>
> > > >
> > > > Hopefully this and the double-free patch will be included in 2.6.11.n+1?
> > >
> > > what double-free patch?
> >
> > ChangeSet 1.1998.11.26, 2005/02/25 15:48:12-08:00
> >
> > See <[email protected]>.
>
> Giving just the Subject: would have been easier to find the patch...

But... but... but it was YOUR PATCH, wasn't it? That's kind of why I
didn't expect much problem identifying it, I got it from you.
>
> > Or do you feel the possible results are harmless enough to wait for the
> > next release? Your call, obviously.
>
> I'll add it to the -stable queue, thanks for pointing it out.

Great, then I didn't waste your time with it. I'm still feeling out what's
worth suggesting for -stable, as you probably guessed.

--
bill davidsen <[email protected]>
CTO, TMR Associates, Inc
Doing interesting things with little computers since 1979.

2005-03-10 16:55:39

by Greg KH

[permalink] [raw]
Subject: Re: [PATCH] PCI: One more Asus SMBus quirk

On Thu, Mar 10, 2005 at 06:54:57AM -0500, Bill Davidsen wrote:
> On Wed, 9 Mar 2005, Greg KH wrote:
>
> > On Wed, Mar 09, 2005 at 11:06:15AM -0500, Bill Davidsen wrote:
> > > On Tue, 8 Mar 2005, Greg KH wrote:
> > >
> > > > On Tue, Mar 08, 2005 at 05:18:16PM -0500, Bill Davidsen wrote:
> > > > > Greg KH wrote:
> > > > > >ChangeSet 1.1998.11.27, 2005/02/25 15:48:28-08:00, [email protected]
> > > > > >
> > > > > >[PATCH] PCI: One more Asus SMBus quirk
> > > > > >
> > > > > >One more Asus laptop requiring the SMBus quirk (W1N model).
> > > > > >
> > > > > >Signed-off-by: Jean Delvare <[email protected]>
> > > > > >Signed-off-by: Greg Kroah-Hartman <[email protected]>
> > > > >
> > > > > Hopefully this and the double-free patch will be included in 2.6.11.n+1?
> > > >
> > > > what double-free patch?
> > >
> > > ChangeSet 1.1998.11.26, 2005/02/25 15:48:12-08:00
> > >
> > > See <[email protected]>.
> >
> > Giving just the Subject: would have been easier to find the patch...
>
> But... but... but it was YOUR PATCH, wasn't it? That's kind of why I
> didn't expect much problem identifying it, I got it from you.

No, I didn't write it. If you notice, I sent out over 200 patches in
the past few days, the majority from other people. So trying to
remember exactly which patch you were referring to took a bit of
searching :)

thanks,

greg k-h

2005-03-20 19:47:21

by Rolf Eike Beer

[permalink] [raw]
Subject: Re: PCI: remove pci_find_device usage from pci sysfs code.

Greg KH wrote:
> ChangeSet 1.1998.11.23, 2005/02/25 08:26:11-08:00, [email protected]
>
> PCI: remove pci_find_device usage from pci sysfs code.

> diff -Nru a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c
> --- a/drivers/pci/pci-sysfs.c 2005-03-04 12:41:33 -08:00
> +++ b/drivers/pci/pci-sysfs.c 2005-03-04 12:41:33 -08:00
> @@ -481,7 +481,7 @@
> struct pci_dev *pdev = NULL;
>
> sysfs_initialized = 1;
> - while ((pdev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pdev)) != NULL)
> + while ((pdev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, pdev)) != NULL)
> pci_create_sysfs_dev_files(pdev);
>
> return 0;

Any reasons why you are not using "for_each_pci_dev(pdev)" here?

Eike


Attachments:
(No filename) (685.00 B)
(No filename) (189.00 B)
Download all attachments

2005-03-21 23:16:16

by Greg KH

[permalink] [raw]
Subject: Re: PCI: remove pci_find_device usage from pci sysfs code.

On Sun, Mar 20, 2005 at 03:53:58PM +0100, Rolf Eike Beer wrote:
> Greg KH wrote:
> > ChangeSet 1.1998.11.23, 2005/02/25 08:26:11-08:00, [email protected]
> >
> > PCI: remove pci_find_device usage from pci sysfs code.
>
> > diff -Nru a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c
> > --- a/drivers/pci/pci-sysfs.c 2005-03-04 12:41:33 -08:00
> > +++ b/drivers/pci/pci-sysfs.c 2005-03-04 12:41:33 -08:00
> > @@ -481,7 +481,7 @@
> > struct pci_dev *pdev = NULL;
> >
> > sysfs_initialized = 1;
> > - while ((pdev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pdev)) != NULL)
> > + while ((pdev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, pdev)) != NULL)
> > pci_create_sysfs_dev_files(pdev);
> >
> > return 0;
>
> Any reasons why you are not using "for_each_pci_dev(pdev)" here?

Nope, I forgot it was there :)

Care to send a patch?

thanks,

greg k-h

2005-03-25 11:31:19

by Rolf Eike Beer

[permalink] [raw]
Subject: Re: PCI: remove pci_find_device usage from pci sysfs code.

Greg KH wrote:
> On Sun, Mar 20, 2005 at 03:53:58PM +0100, Rolf Eike Beer wrote:
> > Greg KH wrote:
> > > ChangeSet 1.1998.11.23, 2005/02/25 08:26:11-08:00, [email protected]
> > >
> > > PCI: remove pci_find_device usage from pci sysfs code.

> > Any reasons why you are not using "for_each_pci_dev(pdev)" here?
>
> Nope, I forgot it was there :)

Patch is against 2.6.12-rc1-bk1 and does the same think like your one,
except it uses for_each_pci_dev()

Eike

Signed-off-by: Rolf Eike Beer <[email protected]>

--- linux-2.6.11/drivers/pci/pci-sysfs.c 2005-03-21 11:41:56.000000000 +0100
+++ linux-2.6.12-rc1/drivers/pci/pci-sysfs.c 2005-03-24 19:20:50.000000000
+0100
@@ -481,7 +481,7 @@ static int __init pci_sysfs_init(void)
struct pci_dev *pdev = NULL;

sysfs_initialized = 1;
- while ((pdev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, pdev)) != NULL)
+ for_each_pci_dev(pdev)
pci_create_sysfs_dev_files(pdev);

return 0;

2005-03-28 23:22:20

by Greg KH

[permalink] [raw]
Subject: Re: PCI: remove pci_find_device usage from pci sysfs code.

On Thu, Mar 24, 2005 at 10:06:11PM +0100, Rolf Eike Beer wrote:
> Greg KH wrote:
> > On Sun, Mar 20, 2005 at 03:53:58PM +0100, Rolf Eike Beer wrote:
> > > Greg KH wrote:
> > > > ChangeSet 1.1998.11.23, 2005/02/25 08:26:11-08:00, [email protected]
> > > >
> > > > PCI: remove pci_find_device usage from pci sysfs code.
>
> > > Any reasons why you are not using "for_each_pci_dev(pdev)" here?
> >
> > Nope, I forgot it was there :)
>
> Patch is against 2.6.12-rc1-bk1 and does the same think like your one,
> except it uses for_each_pci_dev()

Applied, thanks.

greg k-h