Skip to contentSkip to conversation

64 bit bug in ohci1394.c

PATCH New [email protected] 1 participant 1 message Aug 16, 2001

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 64 bit bug in ohci1394.c

Hi

drivers/ieee1394/ohci1394.c has a couple of instances where it saved cpu flags in 'int' which breaks on 64 bit boxes.

Here's a patch.

Jes

ieee1394/ohci1394.c renamed from ieee1394/ohci1394.c~ +8 -4
@@ -200,7 +200,8 @@
 
 static u8 get_phy_reg(struct ti_ohci *ohci, u8 addr) 
 {
-	int i, flags;
+	int i;
+	unsigned long flags;
 	quadlet_t r;
 
 	spin_lock_irqsave (&ohci->phy_reg_lock, flags);
@@ -227,7 +228,8 @@
 
 static void set_phy_reg(struct ti_ohci *ohci, u8 addr, u8 data)
 {
-	int i, flags;
+	int i;
+	unsigned long flags;
 	u32 r;
 
 	spin_lock_irqsave (&ohci->phy_reg_lock, flags);
@@ -1066,7 +1068,8 @@
 	quadlet_t event, node_id;
 	struct ti_ohci *ohci = (struct ti_ohci *)dev_id;
 	struct hpsb_host *host = ohci->host;
-	int phyid = -1, isroot = 0, flags;
+	int phyid = -1, isroot = 0;
+	unsigned long flags;
 
 	/* Read the interrupt event register. We don't clear the bus reset
 	 * here. We wait till we get a selfid complete interrupt and clear
@@ -1331,7 +1334,8 @@
 	struct ti_ohci *ohci = (struct ti_ohci*)(d->ohci);
 	unsigned int split_left, idx, offset, rescount;
 	unsigned char tcode;
-	int length, bytes_left, ack, flags;
+	int length, bytes_left, ack;
+	unsigned long flags;
 	quadlet_t *buf_ptr;
 	char *split_ptr;
 	char msg[256];