Browse Source

bitforce: Initialise lasttag based on response register

Luke Dashjr 12 years ago
parent
commit
d372af1a53
1 changed files with 2 additions and 0 deletions
  1. 2 0
      driver-bitforce.c

+ 2 - 0
driver-bitforce.c

@@ -218,6 +218,8 @@ mapfailB:
 		munmap((void*)devdata->bar[1], 0x1000);
 		munmap((void*)devdata->bar[1], 0x1000);
 		goto mapfailB;
 		goto mapfailB;
 	}
 	}
+	const volatile uint32_t * const respreg = &devdata->bar[2][2];
+	devdata->lasttag = (*respreg >> 16) & 0xff;
 	devdata->is_open = true;
 	devdata->is_open = true;
 	return devdata->is_open;
 	return devdata->is_open;
 }
 }