Re: [PATCH] Airprime driver improvements to allow full speed EvDO transfers



On Fri, 30 Jun 2006 00:10:21 -0700, Andrew Morton <akpm@xxxxxxxx> wrote:

+static void airprime_read_bulk_callback(struct urb *urb, struct pt_regs *regs)
.......
+ /* should this use GFP_KERNEL? */
+ result = usb_submit_urb(urb, GFP_ATOMIC);

If possible, yep.

You can't be serious. It's a callback function we're discussing here,
and you even quoted it.

+ /* free up private structure? */

Yes please ;)

+1

Is usb_serial_driver.write() really called in a context in which it is
forced to use GFP_ATOMIC?

There are cases when it is. It happens when a line discipline does it.
The n_tty does it if the line is in cooked mode, which is the default.
n_hdlc does it always, though I have no idea if this is applicable
to airprime. I think PPP writes from a tasklet as well.

The idea to allocate a URB for every little user write bothers me as
well. It was a dirty code thrown together quickly by someone who could
not be bothered to use a circular buffer and two URBs. It was fine
for the visor.c, but the Airprime is a higher performance card, and it
can be used in a home gateway with a low-power CPU. I'm not happy.

-- Pete
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/