RE: PROBLEM: usbnet / ax88179_178a: Panic in usb_hcd_map_urb_for_dma

2014-01-17 Thread David Laight
From: Ming Lei > On Mon, Jan 13, 2014 at 9:26 PM, David Laight wrote: > >> > >> I believe all processing use the urb->num_sgs field to limit the number > >> of entries. Common interfaces like dma_map_sg() and for_each_sg() limit > >> their processing to "nents" entries, and the USB code use the v

Re: PROBLEM: usbnet / ax88179_178a: Panic in usb_hcd_map_urb_for_dma

2014-01-15 Thread Ming Lei
On Mon, Jan 13, 2014 at 9:26 PM, David Laight wrote: >> >> I believe all processing use the urb->num_sgs field to limit the number >> of entries. Common interfaces like dma_map_sg() and for_each_sg() limit >> their processing to "nents" entries, and the USB code use the value of >> urb->num_sgs f

RE: PROBLEM: usbnet / ax88179_178a: Panic in usb_hcd_map_urb_for_dma

2014-01-13 Thread David Laight
From: Bjørn Mork [mailto:bj...@mork.no] > David Laight writes: > > From: Bjørn Mork > >> David Laight writes: > >> > >> > The patch you submitted is wrong. > >> > Whoever wrote the sg interface was on crack. > >> > The 'last' marker needs moving as well. > >> > >> I'm afraid I don't understand wh

Re: PROBLEM: usbnet / ax88179_178a: Panic in usb_hcd_map_urb_for_dma

2014-01-13 Thread Bjørn Mork
David Laight writes: > From: Bjørn Mork >> David Laight writes: >> >> > The patch you submitted is wrong. >> > Whoever wrote the sg interface was on crack. >> > The 'last' marker needs moving as well. >> >> I'm afraid I don't understand what you meant by this. >> >> sg_init_table() set the 'la

RE: PROBLEM: usbnet / ax88179_178a: Panic in usb_hcd_map_urb_for_dma

2014-01-13 Thread David Laight
From: Bjørn Mork > David Laight writes: > > > The patch you submitted is wrong. > > Whoever wrote the sg interface was on crack. > > The 'last' marker needs moving as well. > > I'm afraid I don't understand what you meant by this. > > sg_init_table() set the 'last' marker. AFAICS, you don't ne

Re: PROBLEM: usbnet / ax88179_178a: Panic in usb_hcd_map_urb_for_dma

2014-01-13 Thread Bjørn Mork
David Laight writes: > The patch you submitted is wrong. > Whoever wrote the sg interface was on crack. > The 'last' marker needs moving as well. I'm afraid I don't understand what you meant by this. sg_init_table() set the 'last' marker. AFAICS, you don't need to change it unless you want to

RE: PROBLEM: usbnet / ax88179_178a: Panic in usb_hcd_map_urb_for_dma

2014-01-13 Thread David Laight
From: Bjørn Mork > Thomas Kear writes: > > > On Sat, Jan 11, 2014 at 11:09 AM, Bjrn Mork wrote: > >> But looking at the code I think I found and obvious miss in the SG list > >> initialisation. I'll post a proposed fix for that. Would be good if > >> someone was able to test it. > > > > I've b

Re: PROBLEM: usbnet / ax88179_178a: Panic in usb_hcd_map_urb_for_dma

2014-01-10 Thread Bjørn Mork
Thomas Kear writes: > On Sat, Jan 11, 2014 at 11:09 AM, Bjørn Mork wrote: >> But looking at the code I think I found and obvious miss in the SG list >> initialisation. I'll post a proposed fix for that. Would be good if >> someone was able to test it. > > I've built 3.13.0-rc7-next-20140110 wi

Re: PROBLEM: usbnet / ax88179_178a: Panic in usb_hcd_map_urb_for_dma

2014-01-10 Thread Thomas Kear
On Sat, Jan 11, 2014 at 11:09 AM, Bjørn Mork wrote: > But looking at the code I think I found and obvious miss in the SG list > initialisation. I'll post a proposed fix for that. Would be good if > someone was able to test it. I've built 3.13.0-rc7-next-20140110 with your patch applied. Unfortu

Re: PROBLEM: usbnet / ax88179_178a: Panic in usb_hcd_map_urb_for_dma

2014-01-10 Thread Bjørn Mork
Ben Hutchings writes: > On Sat, 2014-01-11 at 08:56 +1300, Thomas Kear wrote: >> USB3 gigabit ethernet adapters with the ASIX AX88179 chipset (LevelOne >> USB0401-V3, Plugable USB3-E1000, SIIG JU-NE0211-S1 and others) are >> experiencing kernel panics in usb_hcd_map_urb_for_dma since 3.12. > [...]

Re: PROBLEM: usbnet / ax88179_178a: Panic in usb_hcd_map_urb_for_dma

2014-01-10 Thread Ben Hutchings
On Sat, 2014-01-11 at 08:56 +1300, Thomas Kear wrote: > USB3 gigabit ethernet adapters with the ASIX AX88179 chipset (LevelOne > USB0401-V3, Plugable USB3-E1000, SIIG JU-NE0211-S1 and others) are > experiencing kernel panics in usb_hcd_map_urb_for_dma since 3.12. [...] > So far as I can tell, the d