Re: [PATCH] net-tg3: Initialize REG_BASE_ADDR at PCI config offset 120 to 0

2013-12-11 Thread David Miller
From: Michael Chan Date: Wed, 11 Dec 2013 15:21:18 -0800 > So it looks to me that we are in good shape. Thanks. Thanks for checking this out, and providing such detailed analysis. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to

Re: [PATCH] net-tg3: Initialize REG_BASE_ADDR at PCI config offset 120 to 0

2013-12-11 Thread Michael Chan
On Tue, 2013-12-10 at 22:23 -0500, David Miller wrote: > Ok, that may be true, but I'd like to consider the much larger issue > at hand. > > If the indirect mechanism is enabled, some of the offsets that may be > in there might be value, but would be entirely undesirable to be read > because the

Re: [PATCH] net-tg3: Initialize REG_BASE_ADDR at PCI config offset 120 to 0

2013-12-11 Thread Michael Chan
On Tue, 2013-12-10 at 22:23 -0500, David Miller wrote: Ok, that may be true, but I'd like to consider the much larger issue at hand. If the indirect mechanism is enabled, some of the offsets that may be in there might be value, but would be entirely undesirable to be read because the read

Re: [PATCH] net-tg3: Initialize REG_BASE_ADDR at PCI config offset 120 to 0

2013-12-11 Thread David Miller
From: Michael Chan mc...@broadcom.com Date: Wed, 11 Dec 2013 15:21:18 -0800 So it looks to me that we are in good shape. Thanks. Thanks for checking this out, and providing such detailed analysis. -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message

Re: [PATCH] net-tg3: Initialize REG_BASE_ADDR at PCI config offset 120 to 0

2013-12-10 Thread David Miller
From: Michael Chan Date: Tue, 10 Dec 2013 10:49:39 -0800 > On Tue, 2013-12-10 at 13:43 -0500, David Miller wrote: > >> What if the kernel is booted via kexec, and the driver in the kernel >> we are kexec'ing from left indirect access enabled in MISC_HOST_CTRL? > > That should be ok. The

Re: [PATCH] net-tg3: Initialize REG_BASE_ADDR at PCI config offset 120 to 0

2013-12-10 Thread Michael Chan
On Tue, 2013-12-10 at 13:43 -0500, David Miller wrote: > What if the kernel is booted via kexec, and the driver in the kernel > we are kexec'ing from left indirect access enabled in MISC_HOST_CTRL? That should be ok. The driver will only use valid register offsets in indirect mode during run

Re: [PATCH] net-tg3: Initialize REG_BASE_ADDR at PCI config offset 120 to 0

2013-12-10 Thread David Miller
From: Michael Chan Date: Mon, 9 Dec 2013 22:58:44 -0800 > On Mon, 2013-12-09 at 13:07 -0800, Michael Chan wrote: >> On Tue, 2013-12-10 at 00:18 +0300, Sergei Shtylyov wrote: >> > >We had crashes when the PCI config space got scanned via >> > > /sys/devices/pci/../config. >> >

Re: [PATCH] net-tg3: Initialize REG_BASE_ADDR at PCI config offset 120 to 0

2013-12-10 Thread Michael Chan
On Tue, 2013-12-10 at 07:01 -0800, Natarajan Gurumoorthy wrote: > The only time I see crashes is after the tg3 driver has been > loaded into the system. I our use case we are poking around > /sys/devices/pci//config. David, please apply this first patch. Acked-by: Michael Chan

Re: [PATCH] net-tg3: Initialize REG_BASE_ADDR at PCI config offset 120 to 0

2013-12-10 Thread Natarajan Gurumoorthy
Michael, The only time I see crashes is after the tg3 driver has been loaded into the system. I our use case we are poking around /sys/devices/pci//config. I guess you will incorporate the original patch into the driver and we can abandon this patch. Regards Nat On Mon,

Re: [PATCH] net-tg3: Initialize REG_BASE_ADDR at PCI config offset 120 to 0

2013-12-10 Thread David Miller
From: Michael Chan mc...@broadcom.com Date: Mon, 9 Dec 2013 22:58:44 -0800 On Mon, 2013-12-09 at 13:07 -0800, Michael Chan wrote: On Tue, 2013-12-10 at 00:18 +0300, Sergei Shtylyov wrote: We had crashes when the PCI config space got scanned via /sys/devices/pci/../config.

Re: [PATCH] net-tg3: Initialize REG_BASE_ADDR at PCI config offset 120 to 0

2013-12-10 Thread Michael Chan
On Tue, 2013-12-10 at 13:43 -0500, David Miller wrote: What if the kernel is booted via kexec, and the driver in the kernel we are kexec'ing from left indirect access enabled in MISC_HOST_CTRL? That should be ok. The driver will only use valid register offsets in indirect mode during run

Re: [PATCH] net-tg3: Initialize REG_BASE_ADDR at PCI config offset 120 to 0

2013-12-10 Thread David Miller
From: Michael Chan mc...@broadcom.com Date: Tue, 10 Dec 2013 10:49:39 -0800 On Tue, 2013-12-10 at 13:43 -0500, David Miller wrote: What if the kernel is booted via kexec, and the driver in the kernel we are kexec'ing from left indirect access enabled in MISC_HOST_CTRL? That should be ok.

Re: [PATCH] net-tg3: Initialize REG_BASE_ADDR at PCI config offset 120 to 0

2013-12-10 Thread Natarajan Gurumoorthy
Michael, The only time I see crashes is after the tg3 driver has been loaded into the system. I our use case we are poking around /sys/devices/pci//config. I guess you will incorporate the original patch into the driver and we can abandon this patch. Regards Nat On Mon,

Re: [PATCH] net-tg3: Initialize REG_BASE_ADDR at PCI config offset 120 to 0

2013-12-10 Thread Michael Chan
On Tue, 2013-12-10 at 07:01 -0800, Natarajan Gurumoorthy wrote: The only time I see crashes is after the tg3 driver has been loaded into the system. I our use case we are poking around /sys/devices/pci//config. David, please apply this first patch. Acked-by: Michael Chan

Re: [PATCH] net-tg3: Initialize REG_BASE_ADDR at PCI config offset 120 to 0

2013-12-09 Thread Michael Chan
On Mon, 2013-12-09 at 13:07 -0800, Michael Chan wrote: > On Tue, 2013-12-10 at 00:18 +0300, Sergei Shtylyov wrote: > > >We had crashes when the PCI config space got scanned via > > > /sys/devices/pci/../config. > > > > > I agree that this fix will not help if the scan happens

Re: [PATCH] net-tg3: Initialize REG_BASE_ADDR at PCI config offset 120 to 0

2013-12-09 Thread Michael Chan
On Tue, 2013-12-10 at 00:18 +0300, Sergei Shtylyov wrote: > >We had crashes when the PCI config space got scanned via > > /sys/devices/pci/../config. > > > I agree that this fix will not help if the scan happens before the tg3 > > driver gets loaded. > > Then perhaps a

Re: [PATCH] net-tg3: Initialize REG_BASE_ADDR at PCI config offset 120 to 0

2013-12-09 Thread Sergei Shtylyov
Hello. On 12/09/2013 10:22 PM, Natarajan Gurumoorthy wrote: Michael, We had crashes when the PCI config space got scanned via /sys/devices/pci/../config. I agree that this fix will not help if the scan happens before the tg3 driver gets loaded. Then perhaps a better

Re: [PATCH] net-tg3: Initialize REG_BASE_ADDR at PCI config offset 120 to 0

2013-12-09 Thread Natarajan Gurumoorthy
Michael, We had crashes when the PCI config space got scanned via /sys/devices/pci/../config. I agree that this fix will not help if the scan happens before the tg3 driver gets loaded. Regards Nat On Mon, Dec 9, 2013 at 11:00 AM, Michael Chan wrote: > On Mon, 2013-12-09 at 10:43

Re: [PATCH] net-tg3: Initialize REG_BASE_ADDR at PCI config offset 120 to 0

2013-12-09 Thread Michael Chan
On Mon, 2013-12-09 at 10:43 -0800, Nat Gurumoorthy wrote: > The new tg3 driver leaves REG_BASE_ADDR (PCI config offset 120) > uninitialized. From power on reset this register may have garbage in it. The > Register Base Address register defines the device local address of a > register. The data

[PATCH] net-tg3: Initialize REG_BASE_ADDR at PCI config offset 120 to 0

2013-12-09 Thread Nat Gurumoorthy
The new tg3 driver leaves REG_BASE_ADDR (PCI config offset 120) uninitialized. From power on reset this register may have garbage in it. The Register Base Address register defines the device local address of a register. The data pointed to by this location is read or written using the Register

[PATCH] net-tg3: Initialize REG_BASE_ADDR at PCI config offset 120 to 0

2013-12-09 Thread Nat Gurumoorthy
The new tg3 driver leaves REG_BASE_ADDR (PCI config offset 120) uninitialized. From power on reset this register may have garbage in it. The Register Base Address register defines the device local address of a register. The data pointed to by this location is read or written using the Register

Re: [PATCH] net-tg3: Initialize REG_BASE_ADDR at PCI config offset 120 to 0

2013-12-09 Thread Michael Chan
On Mon, 2013-12-09 at 10:43 -0800, Nat Gurumoorthy wrote: The new tg3 driver leaves REG_BASE_ADDR (PCI config offset 120) uninitialized. From power on reset this register may have garbage in it. The Register Base Address register defines the device local address of a register. The data

Re: [PATCH] net-tg3: Initialize REG_BASE_ADDR at PCI config offset 120 to 0

2013-12-09 Thread Natarajan Gurumoorthy
Michael, We had crashes when the PCI config space got scanned via /sys/devices/pci/../config. I agree that this fix will not help if the scan happens before the tg3 driver gets loaded. Regards Nat On Mon, Dec 9, 2013 at 11:00 AM, Michael Chan mc...@broadcom.com wrote: On Mon,

Re: [PATCH] net-tg3: Initialize REG_BASE_ADDR at PCI config offset 120 to 0

2013-12-09 Thread Sergei Shtylyov
Hello. On 12/09/2013 10:22 PM, Natarajan Gurumoorthy wrote: Michael, We had crashes when the PCI config space got scanned via /sys/devices/pci/../config. I agree that this fix will not help if the scan happens before the tg3 driver gets loaded. Then perhaps a better

Re: [PATCH] net-tg3: Initialize REG_BASE_ADDR at PCI config offset 120 to 0

2013-12-09 Thread Michael Chan
On Tue, 2013-12-10 at 00:18 +0300, Sergei Shtylyov wrote: We had crashes when the PCI config space got scanned via /sys/devices/pci/../config. I agree that this fix will not help if the scan happens before the tg3 driver gets loaded. Then perhaps a better place for

Re: [PATCH] net-tg3: Initialize REG_BASE_ADDR at PCI config offset 120 to 0

2013-12-09 Thread Michael Chan
On Mon, 2013-12-09 at 13:07 -0800, Michael Chan wrote: On Tue, 2013-12-10 at 00:18 +0300, Sergei Shtylyov wrote: We had crashes when the PCI config space got scanned via /sys/devices/pci/../config. I agree that this fix will not help if the scan happens before the tg3