Re: [PATCH] USB: net: Fix asix read transfer buffer allocations.

2007-10-24 Thread David Hollis
On Wed, 2007-10-24 at 15:33 +0400, Valentine Barshak wrote: > On systems with noncoherent cache, allocating dma buffers > on the stack for USB IN transfers causes kernel crash, > because usb map_urb_for_dma() code calls dma_map_single(), > that invalidates data cache for DMA_FROM_DEVICE transfer d

[PATCH] USB: net: Fix asix read transfer buffer allocations.

2007-10-24 Thread Valentine Barshak
On systems with noncoherent cache, allocating dma buffers on the stack for USB IN transfers causes kernel crash, because usb map_urb_for_dma() code calls dma_map_single(), that invalidates data cache for DMA_FROM_DEVICE transfer direction and causes stack data loss if transfer size is less than cac

Re: [linux-usb-devel] [PATCH] USB: net: Fix asix read transfer buffer allocations.

2007-10-24 Thread Valentine Barshak
Sorry, CC'ed Dave Brownell instead of Dave Hollis :) - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH] USB: net: Fix asix read transfer buffer allocations.

2007-10-24 Thread Valentine Barshak
On systems with noncoherent cache, allocating dma buffers on the stack for USB IN transfers causes kernel crash, because usb map_urb_for_dma() code calls dma_map_single(), that invalidates data cache for DMA_FROM_DEVICE transfer direction and causes stack data loss if transfer size is less than cac

Re: [linux-usb-devel] [PATCH] USB: net: Fix asix read transfer buffer allocations.

2007-10-23 Thread David Brownell
> From [EMAIL PROTECTED] Tue Oct 23 10:51:00 2007 > Date: Tue, 23 Oct 2007 21:40:18 +0400 > From: Valentine Barshak <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED] > Cc: netdev@vger.kernel.org > Subject: [linux-usb-devel] [PATCH] USB: net: Fix asix read transfer buffer >

[PATCH] USB: net: Fix asix read transfer buffer allocations.

2007-10-23 Thread Valentine Barshak
On systems with noncoherent cache, allocating dma buffers on the stack for USB IN transfers causes kernel crash, because usb map_urb_for_dma() code calls dma_map_single(), that invalidates data cache for DMA_FROM_DEVICE transfer direction and causes stack data loss if transfer size is less than cac

Re: [linux-usb-devel] [PATCH] USB: net: Fix asix read transfer buffer allocations.

2007-10-23 Thread Valentine Barshak
Ingo Oeser wrote: Valentine Barshak schrieb: Oliver Neukum wrote: Am Montag 22 Oktober 2007 schrieb Valentine Barshak: static int asix_mdio_read(struct net_device *netdev, int phy_id, int loc) { struct usbnet *dev = netdev_priv(netdev); + void *buf; u16 res; m

Re: [linux-usb-devel] [PATCH] USB: net: Fix asix read transfer buffer allocations.

2007-10-23 Thread Ingo Oeser
Valentine Barshak schrieb: > Oliver Neukum wrote: > > Am Montag 22 Oktober 2007 schrieb Valentine Barshak: > >> static int asix_mdio_read(struct net_device *netdev, int phy_id, int loc) > >> { > >> struct usbnet *dev = netdev_priv(netdev); > >> + void *buf; > >> u16 res; > >

Re: [linux-usb-devel] [PATCH] USB: net: Fix asix read transfer buffer allocations.

2007-10-22 Thread Valentine Barshak
Oliver Neukum wrote: Am Montag 22 Oktober 2007 schrieb Valentine Barshak: static int asix_mdio_read(struct net_device *netdev, int phy_id, int loc) { struct usbnet *dev = netdev_priv(netdev); + void *buf; u16 res; mutex_lock(&dev->phy_mutex); asix_set_s

Re: [linux-usb-devel] [PATCH] USB: net: Fix asix read transfer buffer allocations.

2007-10-22 Thread Oliver Neukum
Am Montag 22 Oktober 2007 schrieb Valentine Barshak: >  static int asix_mdio_read(struct net_device *netdev, int phy_id, int loc) >  { > struct usbnet *dev = netdev_priv(netdev); > +   void *buf; > u16 res; >   > mutex_lock(&dev->phy_mutex); > asix_set_sw_mii(dev

[PATCH] USB: net: Fix asix read transfer buffer allocations.

2007-10-22 Thread Valentine Barshak
On systems with noncoherent cache, allocating dma buffers on the stack for USB IN transfers causes kernel crash, because usb map_urb_for_dma() code calls dma_map_single(), that invalidates data cache for DMA_FROM_DEVICE transfer direction and causes stack data loss if transfer size is less than cac