netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Bjørn Mork" <bjorn-yOkvZcmFvRU@public.gmane.org>
To: David Laight <David.Laight-ZS65k/vG3HxXrIkS9f7CXA@public.gmane.org>
Cc: Thomas Kear <thomas-hrxM1pTBpuF02iOg2JU2CQ@public.gmane.org>,
	Ben Hutchings
	<bhutchings-s/n/eUQHGBpZroRs9YW3xA@public.gmane.org>,
	netdev <netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"linux-usb\@vger.kernel.org"
	<linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: PROBLEM: usbnet / ax88179_178a: Panic in usb_hcd_map_urb_for_dma
Date: Mon, 13 Jan 2014 13:25:26 +0100	[thread overview]
Message-ID: <87vbxo83wp.fsf@nemi.mork.no> (raw)
In-Reply-To: <063D6719AE5E284EB5DD2968C1650D6D45904D-VkEWCZq2GCInGFn1LkZF6NBPR1lH4CV8@public.gmane.org> (David Laight's message of "Mon, 13 Jan 2014 11:52:04 +0000")

David Laight <David.Laight-ZS65k/vG3HxXrIkS9f7CXA@public.gmane.org> writes:
> From: Bjørn Mork
>> David Laight <David.Laight-ZS65k/vG3HxXrIkS9f7CXA@public.gmane.org> 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 chain lists.
>> 
>> Care to explain with some code?
>
> Just assuming that there will be some code, somewhere, that will try
> to process the entire sg list - so won't like the entry with a
> NULL pointer and zero length at the end.
>
> If all the places that process the list are given an explicit
> number of entries, or don't care about the NULL it doesn't matter.

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 for this parameter.


Bjørn
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2014-01-13 12:25 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-10 19:56 PROBLEM: usbnet / ax88179_178a: Panic in usb_hcd_map_urb_for_dma Thomas Kear
     [not found] ` <CAHNSM4Kv5gcJn=H4k8QjPggWzjF0zRm_t_icAYXjCTqXx4xL2w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-01-10 20:30   ` Ben Hutchings
     [not found]     ` <1389385824.2025.95.camel-/LGg1Z1CJKQ+9kgCwbf1HqK4ta4zdZpAajtMo4Cw6ucAvxtiuMwx3w@public.gmane.org>
2014-01-10 22:09       ` Bjørn Mork
     [not found]         ` <87ob3j1ocb.fsf-lbf33ChDnrE/G1V5fR+Y7Q@public.gmane.org>
2014-01-10 23:41           ` Thomas Kear
     [not found]             ` <CAHNSM4KU8QEybpHgAcCjQoWuRjU8=wd1O7KUVMnrRJKQ-xr=Gg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-01-11  0:53               ` Bjørn Mork
     [not found]                 ` <87zjn3z6d5.fsf-lbf33ChDnrE/G1V5fR+Y7Q@public.gmane.org>
2014-01-13 11:08                   ` David Laight
2014-01-13 11:28                     ` Bjørn Mork
2014-01-13 11:52                       ` David Laight
     [not found]                         ` <063D6719AE5E284EB5DD2968C1650D6D45904D-VkEWCZq2GCInGFn1LkZF6NBPR1lH4CV8@public.gmane.org>
2014-01-13 12:25                           ` Bjørn Mork [this message]
     [not found]                             ` <87vbxo83wp.fsf-lbf33ChDnrE/G1V5fR+Y7Q@public.gmane.org>
2014-01-13 13:26                               ` David Laight
     [not found]                                 ` <063D6719AE5E284EB5DD2968C1650D6D4590AF-VkEWCZq2GCInGFn1LkZF6NBPR1lH4CV8@public.gmane.org>
2014-01-16  1:28                                   ` Ming Lei
2014-01-17 14:46                                     ` David Laight
2014-01-17 10:38 ` David Laight

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87vbxo83wp.fsf@nemi.mork.no \
    --to=bjorn-yokvzcmfvru@public.gmane.org \
    --cc=David.Laight-ZS65k/vG3HxXrIkS9f7CXA@public.gmane.org \
    --cc=bhutchings-s/n/eUQHGBpZroRs9YW3xA@public.gmane.org \
    --cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=thomas-hrxM1pTBpuF02iOg2JU2CQ@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).