2010-04-30 17:28:23

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: build failure after merge of the staging-next tree

Hi Greg,

After merging the staging-next tree, today's linux-next build (x86_64
allmodconfig) failed like this:

drivers/net/usb/ipheth.c: In function 'ipheth_alloc_urbs':
drivers/net/usb/ipheth.c:131: error: implicit declaration of function 'usb_buffer_alloc'
drivers/net/usb/ipheth.c:134: warning: assignment makes pointer from integer without a cast
drivers/net/usb/ipheth.c:141: warning: assignment makes pointer from integer without a cast
drivers/net/usb/ipheth.c:153: error: implicit declaration of function 'usb_buffer_free'

Caused by commit 3cc96f50329227fbf34de2459491901b6ee1c98c ("USB: rename
usb_buffer_alloc() and usb_buffer_free() users") from the usb tree
interacting with commit a19259c3d589a014e5f47f148f74dfc44422c82b
("drivers/net/usb: Add new driver ipheth") which entered Linus' tree about
April 25 via the net tree.

I applied the following fixup patch for today.

From: Stephen Rothwell <[email protected]>
Date: Fri, 30 Apr 2010 15:44:06 +1000
Subject: [PATCH] net: fix for usb_buffer_alloc/free rename

Signed-off-by: Stephen Rothwell <[email protected]>
---
drivers/net/usb/ipheth.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/usb/ipheth.c b/drivers/net/usb/ipheth.c
index 418825d..41071d0 100644
--- a/drivers/net/usb/ipheth.c
+++ b/drivers/net/usb/ipheth.c
@@ -128,14 +128,14 @@ static int ipheth_alloc_urbs(struct ipheth_device *iphone)
if (rx_urb == NULL)
goto free_tx_urb;

- tx_buf = usb_buffer_alloc(iphone->udev,
+ tx_buf = usb_alloc_coherent(iphone->udev,
IPHETH_BUF_SIZE,
GFP_KERNEL,
&tx_urb->transfer_dma);
if (tx_buf == NULL)
goto free_rx_urb;

- rx_buf = usb_buffer_alloc(iphone->udev,
+ rx_buf = usb_alloc_coherent(iphone->udev,
IPHETH_BUF_SIZE,
GFP_KERNEL,
&rx_urb->transfer_dma);
@@ -150,7 +150,7 @@ static int ipheth_alloc_urbs(struct ipheth_device *iphone)
return 0;

free_tx_buf:
- usb_buffer_free(iphone->udev, IPHETH_BUF_SIZE, tx_buf,
+ usb_free_coherent(iphone->udev, IPHETH_BUF_SIZE, tx_buf,
tx_urb->transfer_dma);
free_rx_urb:
usb_free_urb(rx_urb);
@@ -162,9 +162,9 @@ error_nomem:

static void ipheth_free_urbs(struct ipheth_device *iphone)
{
- usb_buffer_free(iphone->udev, IPHETH_BUF_SIZE, iphone->rx_buf,
+ usb_free_coherent(iphone->udev, IPHETH_BUF_SIZE, iphone->rx_buf,
iphone->rx_urb->transfer_dma);
- usb_buffer_free(iphone->udev, IPHETH_BUF_SIZE, iphone->tx_buf,
+ usb_free_coherent(iphone->udev, IPHETH_BUF_SIZE, iphone->tx_buf,
iphone->tx_urb->transfer_dma);
usb_free_urb(iphone->rx_urb);
usb_free_urb(iphone->tx_urb);
--
1.7.1

--
Cheers,
Stephen Rothwell [email protected]
http://www.canb.auug.org.au/~sfr/


2010-04-30 16:57:55

by Stephen Rothwell

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the staging-next tree

Hi Greg,

On Fri, 30 Apr 2010 07:45:07 -0700 Greg KH <[email protected]> wrote:
>
> Thanks, I'll be sending in the patch that adds the api call to Linus
> today so that the individual trees can make these changes.

That will be great, thanks.

--
Cheers,
Stephen Rothwell [email protected]
http://www.canb.auug.org.au/~sfr/


Attachments:
(No filename) (344.00 B)
(No filename) (198.00 B)
Download all attachments

2010-04-30 17:43:54

by Greg KH

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the staging-next tree

On Fri, Apr 30, 2010 at 03:50:52PM +1000, Stephen Rothwell wrote:
> Hi Greg,
>
> After merging the staging-next tree, today's linux-next build (x86_64
> allmodconfig) failed like this:
>
> drivers/net/usb/ipheth.c: In function 'ipheth_alloc_urbs':
> drivers/net/usb/ipheth.c:131: error: implicit declaration of function 'usb_buffer_alloc'
> drivers/net/usb/ipheth.c:134: warning: assignment makes pointer from integer without a cast
> drivers/net/usb/ipheth.c:141: warning: assignment makes pointer from integer without a cast
> drivers/net/usb/ipheth.c:153: error: implicit declaration of function 'usb_buffer_free'
>
> Caused by commit 3cc96f50329227fbf34de2459491901b6ee1c98c ("USB: rename
> usb_buffer_alloc() and usb_buffer_free() users") from the usb tree
> interacting with commit a19259c3d589a014e5f47f148f74dfc44422c82b
> ("drivers/net/usb: Add new driver ipheth") which entered Linus' tree about
> April 25 via the net tree.
>
> I applied the following fixup patch for today.

Thanks, I'll be sending in the patch that adds the api call to Linus
today so that the individual trees can make these changes.

thanks,

greg k-h

2010-04-30 17:49:49

by Greg KH

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the staging-next tree

On Fri, Apr 30, 2010 at 03:52:05PM +1000, Stephen Rothwell wrote:
> Hi Greg,
>
> After merging the staging-next tree, today's linux-next build (x86_64
> allmodconfig) failed like this:
>
> drivers/md/md.c: In function 'level_store':
> drivers/md/md.c:3029: error: too few arguments to function 'sysfs_get_dirent'
>
> Caused by commit 262f8e4937e7b4a587923ca3c039a184668f49ec ("sysfs:
> Implement sysfs tagged directory support") from the driver-core tree
> interacting with commit fecc531e3cc0de60514d326c7d82f1075ed55888 ("md:
> manage redundancy group in sysfs when changing level") from the md.
>
> I have applied this fixup patch for today and can carry it as necessary.
>
> [This could have been avoided, of course, by creating a new API (maybe
> sysfs_get_dirent_tagged) and implementing the old API in terms of that].

Thanks for the fixup.

greg k-h

2010-04-30 18:02:26

by Alan Stern

[permalink] [raw]
Subject: [PATCH] USB: remove leftover references to udev->autosuspend_disabled

This patch (as1373) fixes a couple of drivers outside the USB
subtree. Devices are now disabled or enabled for autosuspend by
calling a core function instead of setting a flag.

Signed-off-by: Alan Stern <[email protected]>

---

On Fri, 30 Apr 2010, Greg KH wrote:

> On Fri, Apr 30, 2010 at 03:52:24PM +1000, Stephen Rothwell wrote:
> > Hi Greg,
> >
> > After merging the staging-next tree, today's linux-next build (x86_64
> > allmodconfig) failed like this:
> >
> > drivers/media/video/tlg2300/pd-main.c: In function 'poseidon_probe':
> > drivers/media/video/tlg2300/pd-main.c:457: error: 'struct usb_device' has no member named 'autosuspend_disabled'
> > drivers/net/wimax/i2400m/usb.c: In function 'i2400mu_probe':
> > drivers/net/wimax/i2400m/usb.c:508: error: 'struct usb_device' has no member named 'autosuspend_disabled'
> >
> > Caused by commit 3a03bb2443e8fb3b35666dc598e7f626519c544a ("USB: use PM
> > core routines to enable/disable autosuspend") from the usb tree. I have
> > reverted that commit for today.
>
> It would be good to get that back into the tree. Alan, care to fix this
> up?
>
> thanks,
>
> greg k-h

Here's the fix. I haven't compile-tested it, but the changes are
pretty simple.

Alan Stern


Index: usb-2.6/drivers/media/video/tlg2300/pd-main.c
===================================================================
--- usb-2.6.orig/drivers/media/video/tlg2300/pd-main.c
+++ usb-2.6/drivers/media/video/tlg2300/pd-main.c
@@ -455,8 +455,8 @@ static int poseidon_probe(struct usb_int

device_init_wakeup(&udev->dev, 1);
#ifdef CONFIG_PM
- pd->udev->autosuspend_disabled = 0;
pd->udev->autosuspend_delay = HZ * PM_SUSPEND_DELAY;
+ usb_enable_autosuspend(pd->udev);

if (in_hibernation(pd)) {
INIT_WORK(&pd->pm_work, hibernation_resume);
Index: usb-2.6/drivers/net/wimax/i2400m/usb.c
===================================================================
--- usb-2.6.orig/drivers/net/wimax/i2400m/usb.c
+++ usb-2.6/drivers/net/wimax/i2400m/usb.c
@@ -505,7 +505,7 @@ int i2400mu_probe(struct usb_interface *
iface->needs_remote_wakeup = 1; /* autosuspend (15s delay) */
device_init_wakeup(dev, 1);
usb_dev->autosuspend_delay = 15 * HZ;
- usb_dev->autosuspend_disabled = 0;
+ usb_enable_autosuspend(usb_dev);
#endif

result = i2400m_setup(i2400m, I2400M_BRI_MAC_REINIT);

2010-04-30 18:02:32

by Greg KH

[permalink] [raw]
Subject: Re: linux-next: build failure after merge of the staging-next tree

On Fri, Apr 30, 2010 at 03:52:24PM +1000, Stephen Rothwell wrote:
> Hi Greg,
>
> After merging the staging-next tree, today's linux-next build (x86_64
> allmodconfig) failed like this:
>
> drivers/media/video/tlg2300/pd-main.c: In function 'poseidon_probe':
> drivers/media/video/tlg2300/pd-main.c:457: error: 'struct usb_device' has no member named 'autosuspend_disabled'
> drivers/net/wimax/i2400m/usb.c: In function 'i2400mu_probe':
> drivers/net/wimax/i2400m/usb.c:508: error: 'struct usb_device' has no member named 'autosuspend_disabled'
>
> Caused by commit 3a03bb2443e8fb3b35666dc598e7f626519c544a ("USB: use PM
> core routines to enable/disable autosuspend") from the usb tree. I have
> reverted that commit for today.

It would be good to get that back into the tree. Alan, care to fix this
up?

thanks,

greg k-h