2008-02-12 14:30:45

by Sergio Luis

[permalink] [raw]
Subject: [PATCH] 2.6.25-rc1-git2: GDT SCSI: change drivers/scsi/gdth.c into using pci_get device

Fix compilation warning in drivers/scsi/gdth.c, using deprecated pci_find_device.
Change it into using pci_get_device instead:
drivers/scsi/gdth.c:645: warning: 'pci_find_device' is deprecated (declared at include/linux/pci.h:495)

Signed-off-by: Sergio Luis <[email protected]>

gdth.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)


diff -urN linux-2.6.25-rc1-git2.orig/drivers/scsi/gdth.c linux-2.6.25-rc1-git2/drivers/scsi/gdth.c
--- linux-2.6.25-rc1-git2.orig/drivers/scsi/gdth.c 2008-02-12 09:26:14.000000000 -0300
+++ linux-2.6.25-rc1-git2/drivers/scsi/gdth.c 2008-02-12 10:33:08.000000000 -0300
@@ -642,7 +642,7 @@
*cnt, vendor, device));

pdev = NULL;
- while ((pdev = pci_find_device(vendor, device, pdev))
+ while ((pdev = pci_get_device(vendor, device, pdev))
!= NULL) {
if (pci_enable_device(pdev))
continue;


2008-02-12 16:22:49

by James Bottomley

[permalink] [raw]
Subject: Re: [PATCH] 2.6.25-rc1-git2: GDT SCSI: change drivers/scsi/gdth.c into using pci_get device

On Tue, 2008-02-12 at 11:31 -0300, Sergio Luis wrote:
> Fix compilation warning in drivers/scsi/gdth.c, using deprecated pci_find_device.
> Change it into using pci_get_device instead:
> drivers/scsi/gdth.c:645: warning: 'pci_find_device' is deprecated (declared at include/linux/pci.h:495)
>
> Signed-off-by: Sergio Luis <[email protected]>
>
> gdth.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>
> diff -urN linux-2.6.25-rc1-git2.orig/drivers/scsi/gdth.c linux-2.6.25-rc1-git2/drivers/scsi/gdth.c
> --- linux-2.6.25-rc1-git2.orig/drivers/scsi/gdth.c 2008-02-12 09:26:14.000000000 -0300
> +++ linux-2.6.25-rc1-git2/drivers/scsi/gdth.c 2008-02-12 10:33:08.000000000 -0300
> @@ -642,7 +642,7 @@
> *cnt, vendor, device));
>
> pdev = NULL;
> - while ((pdev = pci_find_device(vendor, device, pdev))
> + while ((pdev = pci_get_device(vendor, device, pdev))
> != NULL) {
> if (pci_enable_device(pdev))
> continue;

This can't be correct without a matching put in the error leg.

The difference between the two APIs is that pci_get_device returns a
pci_device with a reference taken and pci_find_device doesn't. However,
pci_get_device does drop the reference again so as long as you never
exit the loop until it returns NULL, it is OK ... it's the exits before
pci_get_device() returns NULL that need the put.

James

2008-02-12 16:54:52

by Boaz Harrosh

[permalink] [raw]
Subject: Re: [PATCH] 2.6.25-rc1-git2: GDT SCSI: change drivers/scsi/gdth.c into using pci_get device

On Tue, Feb 12 2008 at 18:22 +0200, James Bottomley <[email protected]> wrote:
> On Tue, 2008-02-12 at 11:31 -0300, Sergio Luis wrote:
>> Fix compilation warning in drivers/scsi/gdth.c, using deprecated pci_find_device.
>> Change it into using pci_get_device instead:
>> drivers/scsi/gdth.c:645: warning: 'pci_find_device' is deprecated (declared at include/linux/pci.h:495)
>>
>> Signed-off-by: Sergio Luis <[email protected]>
>>
>> gdth.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>>
>> diff -urN linux-2.6.25-rc1-git2.orig/drivers/scsi/gdth.c linux-2.6.25-rc1-git2/drivers/scsi/gdth.c
>> --- linux-2.6.25-rc1-git2.orig/drivers/scsi/gdth.c 2008-02-12 09:26:14.000000000 -0300
>> +++ linux-2.6.25-rc1-git2/drivers/scsi/gdth.c 2008-02-12 10:33:08.000000000 -0300
>> @@ -642,7 +642,7 @@
>> *cnt, vendor, device));
>>
>> pdev = NULL;
>> - while ((pdev = pci_find_device(vendor, device, pdev))
>> + while ((pdev = pci_get_device(vendor, device, pdev))
>> != NULL) {
>> if (pci_enable_device(pdev))
>> continue;
>
> This can't be correct without a matching put in the error leg.
>
> The difference between the two APIs is that pci_get_device returns a
> pci_device with a reference taken and pci_find_device doesn't. However,
> pci_get_device does drop the reference again so as long as you never
> exit the loop until it returns NULL, it is OK ... it's the exits before
> pci_get_device() returns NULL that need the put.
>
> James
>
Yes you are right I have just realized that. Reinspecting pci_get_device()
Sergio will you do it? or should I have a try?
Boaz

2008-02-13 00:17:30

by James Bottomley

[permalink] [raw]
Subject: Re: [PATCH] 2.6.25-rc1-git2: GDT SCSI: change drivers/scsi/gdth.c into using pci_get device

On Tue, 2008-02-12 at 20:48 -0300, Sergio Luis wrote:
> reposting an updated version of it. Please check if it's ok.

Looks fine, thanks! You added an extra space at the end of

while ((pdev = pci_get_device(vendor, device, pdev))

Which I fixed. Unfortunately checkpatch isn't very helpful for this
driver since it uses spaces not tabs everywhere, which checkpatch really
hates.

James

2008-02-13 08:58:15

by Boaz Harrosh

[permalink] [raw]
Subject: Re: [PATCH] 2.6.25-rc1-git2: GDT SCSI: change drivers/scsi/gdth.c into using pci_get device

On Wed, Feb 13 2008 at 2:17 +0200, James Bottomley <[email protected]> wrote:
> On Tue, 2008-02-12 at 20:48 -0300, Sergio Luis wrote:
>> reposting an updated version of it. Please check if it's ok.
>
> Looks fine, thanks! You added an extra space at the end of
>
> while ((pdev = pci_get_device(vendor, device, pdev))
>
> Which I fixed. Unfortunately checkpatch isn't very helpful for this
> driver since it uses spaces not tabs everywhere, which checkpatch really
> hates.
>
> James
>
>
James hi
This patch is now obsolete. After Jeff's patch to convert it to
hot plug API. Jeffs patch looks very good to me. I will try
to push it through the testers.

I still don't have a card for testing myself. Again anyone
wants to send me a card. Intel people anybody home?

I will add the missing Kconfig hunk to jeff's patch and will
push it after it is tested.

Thanks
Boaz

2008-02-16 16:38:12

by Matthew Wilcox

[permalink] [raw]
Subject: Re: [PATCH] 2.6.25-rc1-git2: GDT SCSI: change drivers/scsi/gdth.c into using pci_get device

On Wed, Feb 13, 2008 at 10:57:37AM +0200, Boaz Harrosh wrote:
> I still don't have a card for testing myself. Again anyone
> wants to send me a card. Intel people anybody home?

Apparently Intel sold this line of cards to Adaptec. The copyright
notice in the file backs this up:

* Copyright (C) 1995-06 ICP vortex GmbH, Achim Leubner *
* Copyright (C) 2002-04 Intel Corporation *
* Copyright (C) 2003-06 Adaptec Inc. *
* <[email protected]> *

--
Intel are signing my paycheques ... these opinions are still mine
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours. We can't possibly take such
a retrograde step."

2008-02-17 10:37:49

by Boaz Harrosh

[permalink] [raw]
Subject: Re: [PATCH] 2.6.25-rc1-git2: GDT SCSI: change drivers/scsi/gdth.c into using pci_get device

On Sat, Feb 16 2008 at 18:37 +0200, Matthew Wilcox <[email protected]> wrote:
> On Wed, Feb 13, 2008 at 10:57:37AM +0200, Boaz Harrosh wrote:
>> I still don't have a card for testing myself. Again anyone
>> wants to send me a card. Intel people anybody home?
>
> Apparently Intel sold this line of cards to Adaptec. The copyright
> notice in the file backs this up:
>
> * Copyright (C) 1995-06 ICP vortex GmbH, Achim Leubner *
> * Copyright (C) 2002-04 Intel Corporation *
> * Copyright (C) 2003-06 Adaptec Inc. *
> * <[email protected]> *
>

OK I never got this guy to ping back. CCing [email protected].

Who is the right contact person, regarding the HW that is supported
by the gdth driver? Form what we see in driver commit logs (above),
it was transfered to Adaptec from Intel in 2003. Is that still so?

Boaz

2008-02-17 16:43:32

by Jeff Garzik

[permalink] [raw]
Subject: Re: [PATCH] 2.6.25-rc1-git2: GDT SCSI: change drivers/scsi/gdth.c into using pci_get device

Boaz Harrosh wrote:
> On Sat, Feb 16 2008 at 18:37 +0200, Matthew Wilcox <[email protected]> wrote:
>> On Wed, Feb 13, 2008 at 10:57:37AM +0200, Boaz Harrosh wrote:
>>> I still don't have a card for testing myself. Again anyone
>>> wants to send me a card. Intel people anybody home?
>> Apparently Intel sold this line of cards to Adaptec. The copyright
>> notice in the file backs this up:
>>
>> * Copyright (C) 1995-06 ICP vortex GmbH, Achim Leubner *
>> * Copyright (C) 2002-04 Intel Corporation *
>> * Copyright (C) 2003-06 Adaptec Inc. *
>> * <[email protected]> *
>>
>
> OK I never got this guy to ping back. CCing [email protected].
>
> Who is the right contact person, regarding the HW that is supported
> by the gdth driver? Form what we see in driver commit logs (above),
> it was transfered to Adaptec from Intel in 2003. Is that still so?

In my experience Achim does respond, but this driver is probably very
low priority, so it might take a while...

Jeff



2008-03-04 07:48:45

by Hannes Reinecke

[permalink] [raw]
Subject: Re: [PATCH] 2.6.25-rc1-git2: GDT SCSI: change drivers/scsi/gdth.c into using pci_get device

Boaz Harrosh wrote:
> On Sat, Feb 16 2008 at 18:37 +0200, Matthew Wilcox <[email protected]> wrote:
>> On Wed, Feb 13, 2008 at 10:57:37AM +0200, Boaz Harrosh wrote:
>>> I still don't have a card for testing myself. Again anyone
>>> wants to send me a card. Intel people anybody home?
>> Apparently Intel sold this line of cards to Adaptec. The copyright
>> notice in the file backs this up:
>>
>> * Copyright (C) 1995-06 ICP vortex GmbH, Achim Leubner *
>> * Copyright (C) 2002-04 Intel Corporation *
>> * Copyright (C) 2003-06 Adaptec Inc. *
>> * <[email protected]> *
>>
>
> OK I never got this guy to ping back. CCing [email protected].
>
> Who is the right contact person, regarding the HW that is supported
> by the gdth driver? Form what we see in driver commit logs (above),
> it was transfered to Adaptec from Intel in 2003. Is that still so?
>
Yes, apparently. But gdth is the driver for the rather old ICP Vortex
range; most of which are driven by aacraid nowadays.
I thought I had one of these beasts; will check.

But yes, this is Adaptec. Unless the person is Mark Salyzyn or Luben
it's quite tricky to excite any response.

Cheers,

Hannes
--
Dr. Hannes Reinecke zSeries & Storage
[email protected] +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N?rnberg
GF: Markus Rex, HRB 16746 (AG N?rnberg)

2008-03-04 12:05:06

by Boaz Harrosh

[permalink] [raw]
Subject: Re: [PATCH] 2.6.25-rc1-git2: GDT SCSI: change drivers/scsi/gdth.c into using pci_get device

On Tue, Mar 04 2008 at 9:48 +0200, Hannes Reinecke <[email protected]> wrote:
> Boaz Harrosh wrote:
>> On Sat, Feb 16 2008 at 18:37 +0200, Matthew Wilcox <[email protected]> wrote:
>>> On Wed, Feb 13, 2008 at 10:57:37AM +0200, Boaz Harrosh wrote:
>>>> I still don't have a card for testing myself. Again anyone
>>>> wants to send me a card. Intel people anybody home?
>>> Apparently Intel sold this line of cards to Adaptec. The copyright
>>> notice in the file backs this up:
>>>
>>> * Copyright (C) 1995-06 ICP vortex GmbH, Achim Leubner *
>>> * Copyright (C) 2002-04 Intel Corporation *
>>> * Copyright (C) 2003-06 Adaptec Inc. *
>>> * <[email protected]> *
>>>
>> OK I never got this guy to ping back. CCing [email protected].
>>
>> Who is the right contact person, regarding the HW that is supported
>> by the gdth driver? Form what we see in driver commit logs (above),
>> it was transfered to Adaptec from Intel in 2003. Is that still so?
>>
> Yes, apparently. But gdth is the driver for the rather old ICP Vortex
> range; most of which are driven by aacraid nowadays.
> I thought I had one of these beasts; will check.
>
> But yes, this is Adaptec. Unless the person is Mark Salyzyn or Luben
> it's quite tricky to excite any response.
>
> Cheers,
>
> Hannes

Thanks Hannes.

I never got any response. I guess I'm not important enough.
Christoph said he has a card, that he'll send once he gets
to it. I'll wait for his card. I gave up on the Adaptec guys.

Boaz