2008-02-03 09:40:06

by tip-bot for Wenji Huang

[permalink] [raw]
Subject: LPFC compilation error in 2.6.24-git12/git13

Hi,

Found compilation error in 2.6.24-git12/git13:

CC [M] drivers/scsi/lpfc/lpfc_mem.o
CC [M] drivers/scsi/lpfc/lpfc_sli.o
CC [M] drivers/scsi/lpfc/lpfc_ct.o
CC [M] drivers/scsi/lpfc/lpfc_els.o
CC [M] drivers/scsi/lpfc/lpfc_hbadisc.o
CC [M] drivers/scsi/lpfc/lpfc_init.o
drivers/scsi/lpfc/lpfc_init.c: In function ‘lpfc_pci_probe_one':
drivers/scsi/lpfc/lpfc_init.c:1897: error: implicit declaration of
function ‘pci_enable_device_bars'
make[3]: *** [drivers/scsi/lpfc/lpfc_init.o] Error 1
make[2]: *** [drivers/scsi/lpfc] Error 2
make[1]: *** [drivers/scsi] Error 2
make: *** [drivers] Error 2

pci_enable_device_bars is removed in commit
215e871aaa3d94540121a3809d80d0c5e5686e4f.

Regards,
Wenji


2008-02-03 11:20:55

by Peter Teoh

[permalink] [raw]
Subject: Re: LPFC compilation error in 2.6.24-git12/git13

On 2/3/08, Wenji Huang <[email protected]> wrote:
> Hi,
>
> Found compilation error in 2.6.24-git12/git13:
>
> CC [M] drivers/scsi/lpfc/lpfc_mem.o
> CC [M] drivers/scsi/lpfc/lpfc_sli.o
> CC [M] drivers/scsi/lpfc/lpfc_ct.o
> CC [M] drivers/scsi/lpfc/lpfc_els.o
> CC [M] drivers/scsi/lpfc/lpfc_hbadisc.o
> CC [M] drivers/scsi/lpfc/lpfc_init.o
> drivers/scsi/lpfc/lpfc_init.c: In function 'lpfc_pci_probe_one':
> drivers/scsi/lpfc/lpfc_init.c:1897: error: implicit declaration of
> function 'pci_enable_device_bars'
> make[3]: *** [drivers/scsi/lpfc/lpfc_init.o] Error 1
> make[2]: *** [drivers/scsi/lpfc] Error 2
> make[1]: *** [drivers/scsi] Error 2
> make: *** [drivers] Error 2
>
> pci_enable_device_bars is removed in commit
> 215e871aaa3d94540121a3809d80d0c5e5686e4f.
>
> Regards,
> Wenji
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>

Removed by:

http://www.mail-archive.com/[email protected]/msg241836.html

Following suggestions from:

http://lkml.org/lkml/2007/12/17/422
and
http://www.gossamer-threads.com/lists/linux/kernel/873333

This is my suggested patch:


--- drivers/scsi/lpfc/lpfc_init.c 2008-02-03 19:26:42.000000000 +0800
+++ lpfc_init.c.old 2008-02-03 19:26:20.000000000 +0800
@@ -1894,7 +1894,7 @@ lpfc_pci_probe_one(struct pci_dev *pdev,
uint16_t iotag;
int bars = pci_select_bars(pdev, IORESOURCE_MEM);

- if (pci_enable_device_io(pdev))
+ if (pci_enable_device_bars(pdev, bars))
goto out;
if (pci_request_selected_regions(pdev, bars, LPFC_DRIVER_NAME))
goto out_disable_device;

Is that correct?

2008-02-03 11:26:10

by Peter Teoh

[permalink] [raw]
Subject: Re: LPFC compilation error in 2.6.24-git12/git13

On 2/3/08, Peter Teoh <[email protected]> wrote:
> On 2/3/08, Wenji Huang <[email protected]> wrote:
> > Hi,
> >
> > Found compilation error in 2.6.24-git12/git13:
> >
> > CC [M] drivers/scsi/lpfc/lpfc_mem.o
> > CC [M] drivers/scsi/lpfc/lpfc_sli.o
> > CC [M] drivers/scsi/lpfc/lpfc_ct.o
> > CC [M] drivers/scsi/lpfc/lpfc_els.o
> > CC [M] drivers/scsi/lpfc/lpfc_hbadisc.o
> > CC [M] drivers/scsi/lpfc/lpfc_init.o
> > drivers/scsi/lpfc/lpfc_init.c: In function 'lpfc_pci_probe_one':
> > drivers/scsi/lpfc/lpfc_init.c:1897: error: implicit declaration of
> > function 'pci_enable_device_bars'
> > make[3]: *** [drivers/scsi/lpfc/lpfc_init.o] Error 1
> > make[2]: *** [drivers/scsi/lpfc] Error 2
> > make[1]: *** [drivers/scsi] Error 2
> > make: *** [drivers] Error 2
> >
> > pci_enable_device_bars is removed in commit
> > 215e871aaa3d94540121a3809d80d0c5e5686e4f.
> >
> > Regards,
> > Wenji
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> > the body of a message to [email protected]
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
> > Please read the FAQ at http://www.tux.org/lkml/
> >
>
> Removed by:
>
> http://www.mail-archive.com/[email protected]/msg241836.html
>
> Following suggestions from:
>
> http://lkml.org/lkml/2007/12/17/422
> and
> http://www.gossamer-threads.com/lists/linux/kernel/873333
>
> This is my suggested patch:
>
>
> --- drivers/scsi/lpfc/lpfc_init.c 2008-02-03 19:26:42.000000000 +0800
> +++ lpfc_init.c.old 2008-02-03 19:26:20.000000000 +0800
> @@ -1894,7 +1894,7 @@ lpfc_pci_probe_one(struct pci_dev *pdev,
> uint16_t iotag;
> int bars = pci_select_bars(pdev, IORESOURCE_MEM);
>
> - if (pci_enable_device_io(pdev))
> + if (pci_enable_device_bars(pdev, bars))
> goto out;
> if (pci_request_selected_regions(pdev, bars, LPFC_DRIVER_NAME))
> goto out_disable_device;
>
> Is that correct?
>

Sorry got my order wrong :-):

--- lpfc_init.c.old 2008-02-03 19:26:20.000000000 +0800
+++ drivers/scsi/lpfc/lpfc_init.c 2008-02-03 19:26:42.000000000 +0800
@@ -1894,7 +1894,7 @@ lpfc_pci_probe_one(struct pci_dev *pdev,
uint16_t iotag;
int bars = pci_select_bars(pdev, IORESOURCE_MEM);

- if (pci_enable_device_bars(pdev, bars))
+ if (pci_enable_device_io(pdev))
goto out;
if (pci_request_selected_regions(pdev, bars, LPFC_DRIVER_NAME))
goto out_disable_device;

2008-02-03 17:35:33

by Jeff Garzik

[permalink] [raw]
Subject: Re: LPFC compilation error in 2.6.24-git12/git13

Peter Teoh wrote:
> --- lpfc_init.c.old 2008-02-03 19:26:20.000000000 +0800
> +++ drivers/scsi/lpfc/lpfc_init.c 2008-02-03 19:26:42.000000000 +0800
> @@ -1894,7 +1894,7 @@ lpfc_pci_probe_one(struct pci_dev *pdev,
> uint16_t iotag;
> int bars = pci_select_bars(pdev, IORESOURCE_MEM);
>
> - if (pci_enable_device_bars(pdev, bars))
> + if (pci_enable_device_io(pdev))
> goto out;


As already discussed and pointed out on LKML and linux-scsi, this is the
wrong change. Look at the line above the one you changed -- we want mem
not io.

Jeff