git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vserver 1.9.5.x5
[linux-2.6.git]
/
drivers
/
usb
/
gadget
/
net2280.c
diff --git
a/drivers/usb/gadget/net2280.c
b/drivers/usb/gadget/net2280.c
index
d28de0b
..
d2997ef
100644
(file)
--- a/
drivers/usb/gadget/net2280.c
+++ b/
drivers/usb/gadget/net2280.c
@@
-76,7
+76,6
@@
#define EP_DONTUSE 13 /* nonzero */
#define USE_RDK_LEDS /* GPIO pins control three LEDs */
#define EP_DONTUSE 13 /* nonzero */
#define USE_RDK_LEDS /* GPIO pins control three LEDs */
-#define USE_SYSFS_DEBUG_FILES
static const char driver_name [] = "net2280";
static const char driver_name [] = "net2280";
@@
-117,7
+116,7
@@
module_param (fifo_mode, ushort, 0644);
#define DIR_STRING(bAddress) (((bAddress) & USB_DIR_IN) ? "in" : "out")
#define DIR_STRING(bAddress) (((bAddress) & USB_DIR_IN) ? "in" : "out")
-#if defined(
USE_SYSFS
_DEBUG_FILES) || defined (DEBUG)
+#if defined(
CONFIG_USB_GADGET
_DEBUG_FILES) || defined (DEBUG)
static char *type_string (u8 bmAttributes)
{
switch ((bmAttributes) & USB_ENDPOINT_XFERTYPE_MASK) {
static char *type_string (u8 bmAttributes)
{
switch ((bmAttributes) & USB_ENDPOINT_XFERTYPE_MASK) {
@@
-718,7
+717,7
@@
fill_dma_desc (struct net2280_ep *ep, struct net2280_request *req, int valid)
dmacount |= (1 << DMA_DONE_INTERRUPT_ENABLE);
/* td->dmadesc = previously set by caller */
dmacount |= (1 << DMA_DONE_INTERRUPT_ENABLE);
/* td->dmadesc = previously set by caller */
- td->dmaaddr = cpu_to_le32
p (&
req->req.dma);
+ td->dmaaddr = cpu_to_le32
(
req->req.dma);
/* 2280 may be polling VALID_BIT through ep->dma->dmadesc */
wmb ();
/* 2280 may be polling VALID_BIT through ep->dma->dmadesc */
wmb ();
@@
-1450,7
+1449,12
@@
static const struct usb_gadget_ops net2280_ops = {
/*-------------------------------------------------------------------------*/
/*-------------------------------------------------------------------------*/
-#ifdef USE_SYSFS_DEBUG_FILES
+#ifdef CONFIG_USB_GADGET_DEBUG_FILES
+
+/* FIXME move these into procfs, and use seq_file.
+ * Sysfs _still_ doesn't behave for arbitrarily sized files,
+ * and also doesn't help products using this with 2.4 kernels.
+ */
/* "function" sysfs attribute */
static ssize_t
/* "function" sysfs attribute */
static ssize_t
@@
-1703,8
+1707,10
@@
show_queues (struct device *_dev, char *buf)
td = req->td;
t = scnprintf (next, size, "\t td %08x "
" count %08x buf %08x desc %08x\n",
td = req->td;
t = scnprintf (next, size, "\t td %08x "
" count %08x buf %08x desc %08x\n",
- req->td_dma, td->dmacount,
- td->dmaaddr, td->dmadesc);
+ (u32) req->td_dma,
+ le32_to_cpu (td->dmacount),
+ le32_to_cpu (td->dmaaddr),
+ le32_to_cpu (td->dmadesc));
if (t <= 0 || t > size)
goto done;
size -= t;
if (t <= 0 || t > size)
goto done;
size -= t;
@@
-2841,6
+2847,7
@@
static int net2280_probe (struct pci_dev *pdev, const struct pci_device_id *id)
dev->got_irq = 1;
/* DMA setup */
dev->got_irq = 1;
/* DMA setup */
+ /* NOTE: we know only the 32 LSBs of dma addresses may be nonzero */
dev->requests = pci_pool_create ("requests", pdev,
sizeof (struct net2280_dma),
0 /* no alignment requirements */,
dev->requests = pci_pool_create ("requests", pdev,
sizeof (struct net2280_dma),
0 /* no alignment requirements */,
@@
-2936,7
+2943,7
@@
static int __init init (void)
{
if (!use_dma)
use_dma_chaining = 0;
{
if (!use_dma)
use_dma_chaining = 0;
- return pci_
module_init
(&net2280_pci_driver);
+ return pci_
register_driver
(&net2280_pci_driver);
}
module_init (init);
}
module_init (init);