All of lore.kernel.org
 help / color / mirror / Atom feed
From: Roland Dreier <roland@topspin.com>
To: Marcelo Tosatti <marcelo@conectiva.com.br>
Cc: David Brownell <david-b@pacbell.net>,
	Oliver Neukum <oliver@neukum.name>,
	linux-usb-devel@lists.sourceforge.net,
	linux-kernel@vger.kernel.org
Subject: [PATCH] use __dma_buffer for USB
Date: 12 Jun 2002 17:27:40 -0700	[thread overview]
Message-ID: <52ofeg2fb7.fsf@topspin.com> (raw)

Use __dma_buffer to align buffer in struct usb_hub and descriptor in
struct usb_device since both are used for DMA.

Patch is against 2.4.19-pre10.

Thanks,
  Roland

 drivers/usb/hub.h   |    3 ++-
 include/linux/usb.h |    3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff -Naur linux-2.4.19-pre9.orig/drivers/usb/hub.h linux-2.4.19-pre9/drivers/usb/hub.h
--- linux-2.4.19-pre9.orig/drivers/usb/hub.h	Wed Jun 12 14:53:36 2002
+++ linux-2.4.19-pre9/drivers/usb/hub.h	Wed Jun 12 14:55:58 2002
@@ -3,6 +3,7 @@
 
 #include <linux/list.h>
 #include <linux/compiler.h>	/* likely()/unlikely() */
+#include <asm/dma_buffer.h>
 
 /*
  * Hub request types
@@ -125,7 +126,7 @@
 
 	struct urb *urb;		/* Interrupt polling pipe */
 
-	char buffer[(USB_MAXCHILDREN + 1 + 7) / 8]; /* add 1 bit for hub status change */
+	char buffer[(USB_MAXCHILDREN + 1 + 7) / 8] __dma_buffer; /* add 1 bit for hub status change */
 					/* and add 7 bits to round up to byte boundary */
 	int error;
 	int nerrors;
diff -Naur linux-2.4.19-pre9.orig/include/linux/usb.h linux-2.4.19-pre9/include/linux/usb.h
--- linux-2.4.19-pre9.orig/include/linux/usb.h	Wed Jun 12 14:53:52 2002
+++ linux-2.4.19-pre9/include/linux/usb.h	Wed Jun 12 14:55:40 2002
@@ -139,6 +139,7 @@
 #include <linux/interrupt.h>	/* for in_interrupt() */
 #include <linux/config.h>
 #include <linux/list.h>
+#include <asm/dma_buffer.h>
 
 #define USB_MAJOR 180
 
@@ -781,7 +782,7 @@
 	struct usb_device *parent;
 	struct usb_bus *bus;		/* Bus we're part of */
 
-	struct usb_device_descriptor descriptor;/* Descriptor */
+	struct usb_device_descriptor descriptor __dma_buffer;/* Descriptor */
 	struct usb_config_descriptor *config;	/* All of the configs */
 	struct usb_config_descriptor *actconfig;/* the active configuration */
 

                 reply	other threads:[~2002-06-13  0:27 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=52ofeg2fb7.fsf@topspin.com \
    --to=roland@topspin.com \
    --cc=david-b@pacbell.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb-devel@lists.sourceforge.net \
    --cc=marcelo@conectiva.com.br \
    --cc=oliver@neukum.name \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.