Commit 5153655b authored by Alan Stern's avatar Alan Stern Committed by Greg Kroah-Hartman

[PATCH] USB: Use 64-bit IO addresses in UHCI driver

Thanks to Ludovic Aubry for this patch.  It changes some local variables
used by the UHCI driver to store IO addresses from unsigned int to
unsigned long.  This is vitally necessary on 64-bit platforms.




From: Ludovic Aubry <laubrycomm@free.fr>
Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent 72127038
......@@ -248,7 +248,7 @@ static int uhci_show_sc(int port, unsigned short status, char *buf, int len)
static int uhci_show_status(struct uhci_hcd *uhci, char *buf, int len)
{
char *out = buf;
unsigned int io_addr = uhci->io_addr;
unsigned long io_addr = uhci->io_addr;
unsigned short usbcmd, usbstat, usbint, usbfrnum;
unsigned int flbaseadd;
unsigned char sof;
......
......@@ -1762,7 +1762,7 @@ static void uhci_remove_pending_urbps(struct uhci_hcd *uhci)
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;
......@@ -1835,7 +1835,7 @@ static irqreturn_t uhci_irq(struct usb_hcd *hcd, struct pt_regs *regs)
static void reset_hc(struct uhci_hcd *uhci)
{
unsigned int io_addr = uhci->io_addr;
unsigned long io_addr = uhci->io_addr;
/* Turn off PIRQ, SMI, and all interrupts. This also turns off
* the BIOS's USB Legacy Support.
......@@ -1856,7 +1856,7 @@ static void reset_hc(struct uhci_hcd *uhci)
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;
......@@ -1866,7 +1866,7 @@ static void suspend_hc(struct uhci_hcd *uhci)
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 */
......@@ -1906,7 +1906,7 @@ static void wakeup_hc(struct uhci_hcd *uhci)
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;
......@@ -1918,7 +1918,7 @@ static int ports_active(struct uhci_hcd *uhci)
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)
......@@ -1983,7 +1983,7 @@ static void hc_state_transitions(struct uhci_hcd *uhci)
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;
/*
......
......@@ -36,7 +36,7 @@ static __u8 root_hub_hub_des[] =
static int uhci_hub_status_data(struct usb_hcd *hcd, char *buf)
{
struct uhci_hcd *uhci = hcd_to_uhci(hcd);
unsigned int io_addr = uhci->io_addr;
unsigned long io_addr = uhci->io_addr;
int i;
*buf = 0;
......@@ -69,7 +69,7 @@ static int uhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
{
struct uhci_hcd *uhci = hcd_to_uhci(hcd);
int status, retval = 0, len = 0;
unsigned int port_addr = uhci->io_addr + USBPORTSC1 + 2 * (wIndex-1);
unsigned long port_addr = uhci->io_addr + USBPORTSC1 + 2 * (wIndex-1);
__u16 wPortChange, wPortStatus;
switch (typeReq) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment