On Sunday 28 January 2007 11:02, Igor Korot wrote: > Hi, Larry, > > In the patch ftp://lwfinger.dynalias.org/patches/patch_2.6.18.1_for_PCI-E, > there is a following code: > > @@ -2582,8 +2586,9 @@ static int bcm43xx_probe_cores(struct bc > /* fetch sb_id_hi from core information registers */ > sb_id_hi = bcm43xx_read32(bcm, BCM43xx_CIR_SB_ID_HI); > > - core_id = (sb_id_hi & 0xFFF0) >> 4; > - core_rev = (sb_id_hi & 0xF); > + core_id = (sb_id_hi & 0x8FF0) >> 4; > + core_rev = (sb_id_hi & 0x7000) >> 8; > + core_rev |= (sb_id_hi & 0xF); > core_vendor = (sb_id_hi & 0xFFFF0000) >> 16; > > However, in this patch > https://lists.berlios.de/pipermail/bcm43xx-dev/2007-January/003484.html, > there is a following code: > > @@ -2704,8 +2704,8 @@ static int bcm43xx_probe_cores(struct bc > sb_id_hi = bcm43xx_read32(bcm, BCM43xx_CIR_SB_ID_HI); > > /* extract core_id, core_rev, core_vendor */ > - core_id = (sb_id_hi & 0xFFF0) >> 4; > - core_rev = (sb_id_hi & 0xF); > + core_id = (sb_id_hi & 0x8FF0) >> 4; > + core_rev = ((sb_id_hi & 0xF) | ((sb_id_hi & 0x7000) >> 8)); > core_vendor = (sb_id_hi & 0xFFFF0000) >> 16; > > Notice the difference in the calculation of the core_rev variable. > > Which version is correct one?
The latter one. -- Greetings Michael. _______________________________________________ Bcm43xx-dev mailing list [email protected] https://lists.berlios.de/mailman/listinfo/bcm43xx-dev
