]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
Fix order for reading rx-status registers in 32bit mode of DM9000
authorRemy Bohmer <linux@bohmer.net>
Wed, 4 Jun 2008 08:47:25 +0000 (10:47 +0200)
committerBen Warren <biggerbadderben@gmail.com>
Thu, 5 Jun 2008 06:49:28 +0000 (23:49 -0700)
A last minute cleanup before submitting the DM9000A patch series yesterday introduced
a bug in reading the rx-status registers in 32bit mode only.
This patch repairs this.

Signed-off-by: Remy Bohmer <linux@bohmer.net>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
drivers/net/dm9000x.c

index 2945995457bc630a144bec21ceb5220593938300..6f3ddf020dad1f643b853c86aa6f35b73a880428 100644 (file)
@@ -211,10 +211,11 @@ static void dm9000_inblk_32bit(void *data_ptr, int count)
 
 static void dm9000_rx_status_32bit(u16 *RxStatus, u16 *RxLen)
 {
-       u32 tmpdata = DM9000_inl(DM9000_DATA);
+       u32 tmpdata;
 
        DM9000_outb(DM9000_MRCMD, DM9000_IO);
 
+       tmpdata = DM9000_inl(DM9000_DATA);
        *RxStatus = tmpdata;
        *RxLen = tmpdata >> 16;
 }