Greg:
This patch makes a few minor improvements to the appearance of the UHCI
driver. Please apply.
Alan Stern
===== uhci-hcd.h 1.29 vs edited =====
--- 1.29/drivers/usb/host/uhci-hcd.h Fri Mar 26 10:19:24 2004
+++ edited/drivers/usb/host/uhci-hcd.h Mon Apr 19 11:05:56 2004
@@ -80,7 +80,7 @@
#define CAN_SCHEDULE_FRAMES 1000 /* how far future frames can be scheduled */
struct uhci_frame_list {
- __u32 frame[UHCI_NUMFRAMES];
+ u32 frame[UHCI_NUMFRAMES];
void *frame_cpu[UHCI_NUMFRAMES];
@@ -105,8 +105,8 @@
*/
struct uhci_qh {
/* Hardware fields */
- __u32 link; /* Next queue */
- __u32 element; /* Queue element pointer */
+ u32 link; /* Next queue */
+ u32 element; /* Queue element pointer */
/* Software fields */
dma_addr_t dma_handle;
@@ -185,10 +185,10 @@
*/
struct uhci_td {
/* Hardware fields */
- __u32 link;
- __u32 status;
- __u32 token;
- __u32 buffer;
+ u32 link;
+ u32 status;
+ u32 token;
+ u32 buffer;
/* Software fields */
dma_addr_t dma_handle;
===== drivers/usb/host/uhci-hcd.c 1.101 vs edited =====
--- 1.101/drivers/usb/host/uhci-hcd.c Fri Mar 26 10:19:10 2004
+++ edited/drivers/usb/host/uhci-hcd.c Wed Apr 14 10:19:54 2004
@@ -157,8 +157,8 @@
return td;
}
-static inline void uhci_fill_td(struct uhci_td *td, __u32 status,
- __u32 token, __u32 buffer)
+static inline void uhci_fill_td(struct uhci_td *td, u32 status,
+ u32 token, u32 buffer)
{
td->status = cpu_to_le32(status);
td->token = cpu_to_le32(token);
@@ -184,11 +184,11 @@
list_add_tail(&td->fl_list, &ftd->fl_list);
td->link = ltd->link;
- mb();
+ wmb();
ltd->link = cpu_to_le32(td->dma_handle);
} else {
td->link = uhci->fl->frame[framenum];
- mb();
+ wmb();
uhci->fl->frame[framenum] = cpu_to_le32(td->dma_handle);
uhci->fl->frame_cpu[framenum] = td;
}
@@ -218,7 +218,7 @@
ptd->link = td->link;
}
- mb();
+ wmb();
td->link = UHCI_PTR_TERM;
list_del_init(&td->fl_list);
@@ -352,15 +352,15 @@
*
* The HC could see (and use!) any of these as we write them.
*/
+ lqh->link = cpu_to_le32(urbp->qh->dma_handle) | UHCI_PTR_QH;
if (lqh->urbp) {
list_for_each (tmp, &lqh->urbp->queue_list) {
struct urb_priv *turbp =
list_entry(tmp, struct urb_priv, queue_list);
- turbp->qh->link = cpu_to_le32(urbp->qh->dma_handle) |
UHCI_PTR_QH;
+ turbp->qh->link = lqh->link;
}
}
- lqh->link = cpu_to_le32(urbp->qh->dma_handle) | UHCI_PTR_QH;
list_add_tail(&urbp->qh->list, &skelqh->list);
}
@@ -372,7 +372,7 @@
static void uhci_remove_qh(struct uhci_hcd *uhci, struct uhci_qh *qh)
{
struct uhci_qh *pqh;
- __u32 newlink;
+ u32 newlink;
if (!qh)
return;
@@ -413,7 +413,7 @@
turbp->qh->link = newlink;
}
}
- mb();
+ wmb();
/* Leave qh->link in case the HC is on the QH now, it will */
/* continue the rest of the schedule */
@@ -500,7 +500,7 @@
/* All qh's in the queue need to link to the next queue */
urbp->qh->link = eurbp->qh->link;
- mb(); /* Make sure we flush everything */
+ wmb(); /* Make sure we flush everything */
lltd->link = cpu_to_le32(urbp->qh->dma_handle) | UHCI_PTR_QH;
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel