Hi,

The following patch fixes a bus error on sparc64 kernel. The
uhci->io_addr field was incorrectly converted from long to int in
several places.

regards,

Ludovic Aubry


--- linux-2.6.7/drivers/usb/host/uhci-hcd.c     2004-06-16 07:19:53.000000000 +0200
+++ linux-2.6.7-new/drivers/usb/host/uhci-hcd.c 2004-06-20 22:26:14.278150432 +0200
@@ -1756,7 +1756,7 @@
 static irqreturn_t uhci_irq(struct usb_hcd *hcd, struct pt_regs *regs)
 {
        struct uhci_hcd *uhci = hcd_to_uhci(hcd);
-       unsigned int io_addr = uhci->io_addr;
+       unsigned long io_addr = uhci->io_addr;
        unsigned short status;
        struct list_head *tmp, *head;
        unsigned int age;
@@ -1829,7 +1829,7 @@
 
 static void reset_hc(struct uhci_hcd *uhci)
 {
-       unsigned int io_addr = uhci->io_addr;
+       unsigned long io_addr = uhci->io_addr;
 
        /* Global reset for 50ms */
        uhci->state = UHCI_RESET;
@@ -1846,7 +1846,7 @@
 
 static void suspend_hc(struct uhci_hcd *uhci)
 {
-       unsigned int io_addr = uhci->io_addr;
+       unsigned long io_addr = uhci->io_addr;
 
        dev_dbg(uhci_dev(uhci), "%s\n", __FUNCTION__);
        uhci->state = UHCI_SUSPENDED;
@@ -1856,7 +1856,7 @@
 
 static void wakeup_hc(struct uhci_hcd *uhci)
 {
-       unsigned int io_addr = uhci->io_addr;
+       unsigned long io_addr = uhci->io_addr;
 
        switch (uhci->state) {
                case UHCI_SUSPENDED:            /* Start the resume */
@@ -1896,7 +1896,7 @@
 
 static int ports_active(struct uhci_hcd *uhci)
 {
-       unsigned int io_addr = uhci->io_addr;
+       unsigned long io_addr = uhci->io_addr;
        int connection = 0;
        int i;
 
@@ -1908,7 +1908,7 @@
 
 static int suspend_allowed(struct uhci_hcd *uhci)
 {
-       unsigned int io_addr = uhci->io_addr;
+       unsigned long io_addr = uhci->io_addr;
        int i;
 
        if (to_pci_dev(uhci_dev(uhci))->vendor != PCI_VENDOR_ID_INTEL)
@@ -1973,7 +1973,7 @@
 
 static void start_hc(struct uhci_hcd *uhci)
 {
-       unsigned int io_addr = uhci->io_addr;
+       unsigned long io_addr = uhci->io_addr;
        int timeout = 1000;
 
        /*




-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to