Linux on ARM based TI OMAP SoCs
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>
To: "Shilimkar, Santosh" <santosh.shilimkar-l0cyMroinI0@public.gmane.org>
Cc: "Mankad, Maulik Ojas" <x0082077-l0cyMroinI0@public.gmane.org>,
	"linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
	<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>
Subject: Re: Issue with file transfers to a mass storage device on SMP system
Date: Tue, 27 Jul 2010 11:01:21 +0100	[thread overview]
Message-ID: <20100727100121.GB7846@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <EAF47CD23C76F840A9E7FCE10091EFAB02C62EF707-/tLxBxkBPtCIQmiDNMet8wC/G2K4zDHf@public.gmane.org>

On Tue, Jul 27, 2010 at 03:08:54PM +0530, Shilimkar, Santosh wrote:
> As discussed, the main reason is the cache maintenance isn't done on
>  "bcb->CDB"  buffers and hence the data remains in CPU write buffer
> instead of the physical memory on which DMA operates. 

struct bulk_cb_wrap {
        __le32  Signature;              /* contains 'USBC' */
        __u32   Tag;                    /* unique per command id */
        __le32  DataTransferLength;     /* size of data */
        __u8    Flags;                  /* direction in bit 0 */
        __u8    Lun;                    /* LUN normally 0 */
        __u8    Length;                 /* of of the CDB */
        __u8    CDB[16];                /* max command */
};

So, CDB is contained within bcb...bcb+sizeof(*bcb).

The bcb is passed to usb_stor_bulk_transfer_buf:

        result = usb_stor_bulk_transfer_buf(us, us->send_bulk_pipe,
                                bcb, cbwlen, NULL);

which fills it into a URB:

        usb_fill_bulk_urb(us->current_urb, us->pusb_dev, pipe, buf, length,
                      usb_stor_blocking_completion, NULL);

This sets the URB buffer pointers:

        urb->transfer_buffer = transfer_buffer;
        urb->transfer_buffer_length = buffer_length;

And this buffer should be dma-mapped and dma-unmapped as appropriate.

Wasn't there an issue with the DMA mapping being used with a PIO USB
host recently?  Is that the problem here?
--
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:[~2010-07-27 10:01 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-27  6:34 Issue with file transfers to a mass storage device on SMP system Maulik
2010-07-27  7:05 ` Ming Lei
2010-07-27  9:38 ` Shilimkar, Santosh
     [not found]   ` <EAF47CD23C76F840A9E7FCE10091EFAB02C62EF707-/tLxBxkBPtCIQmiDNMet8wC/G2K4zDHf@public.gmane.org>
2010-07-27 10:01     ` Russell King - ARM Linux [this message]
     [not found]       ` <20100727100121.GB7846-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2010-07-27 10:19         ` Shilimkar, Santosh
2010-07-27 10:41           ` Russell King - ARM Linux
     [not found]             ` <20100727104133.GA10665-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2010-07-27 12:00               ` Shilimkar, Santosh
2010-07-27 13:45                 ` Shilimkar, Santosh
     [not found]                   ` <EAF47CD23C76F840A9E7FCE10091EFAB02C62EF8F3-/tLxBxkBPtCIQmiDNMet8wC/G2K4zDHf@public.gmane.org>
2010-07-27 13:59                     ` Russell King - ARM Linux
2010-07-27 14:14                       ` Shilimkar, Santosh
     [not found]                         ` <EAF47CD23C76F840A9E7FCE10091EFAB02C62EF90B-/tLxBxkBPtCIQmiDNMet8wC/G2K4zDHf@public.gmane.org>
2010-07-27 14:21                           ` Russell King - ARM Linux
2010-07-27 14:29                             ` Shilimkar, Santosh
2010-07-27 16:07                               ` Russell King - ARM Linux
     [not found]                                 ` <20100727160710.GF11468-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2010-07-28  5:15                                   ` Shilimkar, Santosh

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=20100727100121.GB7846@n2100.arm.linux.org.uk \
    --to=linux-lfz/pmaqli7xmaaqvzeohq@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=santosh.shilimkar-l0cyMroinI0@public.gmane.org \
    --cc=x0082077-l0cyMroinI0@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