Skip to contentSkip to conversation

2.6.25-rc1-git2: GDT SCSI: change drivers/scsi/gdth.c into using pci_get device

PATCH In review Sergio Luis 6 participants 10 messages Feb 12, 2008 – Mar 4, 2008 1 message not in the archive SCSI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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)

gdth.c | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/gdth.c +1 -1
diff -urN linux-2.6.25-rc1-git2.orig/drivers/scsi/gdth.c linux-2.6.25-rc1-git2/drivers/scsi/gdth.c
@@ -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;
maintainer
#1 lore raw
Quoted 14 lines · Sergio Luis

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)

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

drivers/scsi/gdth.c line 648

Quoted 8 lines
drivers/scsi/gdth.c +1 -1
@@ -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

#2 lore raw
Quoted 26 lines · James Bottomley
Quoted 14 lines · Sergio Luis

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)

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

drivers/scsi/gdth.c line 648

Quoted 8 lines
drivers/scsi/gdth.c +1 -1
@@ -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.

Quoted 8 lines

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

A message that is not in the archive (sent off-list or not yet received): [email protected]

maintainer
#4 lore raw
Quoted 1 line · Sergio Luis

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

#5 lore raw
Quoted 5 lines · James Bottomley
Quoted 1 line · Sergio Luis

reposting an updated version of it. Please check if it's ok.

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

Quoted 9 lines

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

#6 lore raw
Quoted 2 lines · Boaz Harrosh

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]>                                          *
Signature · 4 lines
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."
#7 lore raw
Quoted 4 lines · Matthew Wilcox
Quoted 2 lines · Boaz Harrosh

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

Quoted 8 lines

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

#8 lore raw
Quoted 13 lines · Boaz Harrosh
Quoted 11 lines · Matthew Wilcox
Quoted 2 lines · Boaz Harrosh

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]>                                          *
Quoted 4 lines

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

#9 lore raw
In reply to Boaz Harrosh
Quoted 13 lines · Boaz Harrosh
Quoted 11 lines · Matthew Wilcox
Quoted 2 lines · Boaz Harrosh

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]>                                          *
Quoted 6 lines

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

Signature · 8 lines
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)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#10 lore raw
Quoted 23 lines · Hannes Reinecke
Quoted 12 lines · Boaz Harrosh
Quoted 11 lines · Matthew Wilcox
Quoted 2 lines · Boaz Harrosh

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]>                                          *
Quoted 6 lines

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.

Quoted 6 lines

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