Hello again everyone, I have a 2008 z4 e85 2.5i. Could someone tell me what exactly the MAF sensor (5wk97502) does, i.e. What/ how does it read and then what it controls/ adjusts when driving. Basically I'm at my whits end with my Z, I keep getting lumpy acceleration and knock sensors 1&2 showing in the fault code. Now a bit of history since I bought it early this year......it has had; new valvetronic motor, new eccentric shaft sensor, new vanos solenoids, fresh oil, filters, new knock sensors, new throttle body and most recently new disa valve. My thoughts are that something is wrong with the air/ fuel mix when it accelerates lumpy, now it only does this when the knock sensor codes come in. If I reset the codes and clear adaptions it runs fantastic, smooth powerful acceleration, this used to last for up to a week then the knock sensor codes would reappear and it would go lumpy again, this has now deteriorated to probably less than a day of clearing the code for the lumpy acceleration to occur again. Last week it seemed to stop being lumpy but felt all round generally sluggish, mpg reduced slightly too, upon investigation I found the DISA had failed (flap loose obviously broken) it seemed to be stuck approx 45 degrees open, I had only got No1 knock sensor code fault active, not No2. So at this point I thought I had finally found the root cause, so fitted a new DISA expecting all to be well. However I'm back to lumpy acceleration within a day of resetting the 1 & 2 knock sensor codes, really pee' d off with it now and wishing I'd never bought the ruddy thing 
Now today I cleared the codes and adaptions again, unplugged the MAF sensor plug on the ducting from the air filter box, started up fine albeit with the orange engine light now illuminated, went for a good drive around, low speed, stop start, hard and soft acceleration and it drove great, very surprised, maybe a little smokey which I guess is over fuelling? I then checked for codes and the knock sensor codes were not there, just the ones for the fact the MAF was unplugged (2 codes one was inlet temp and other the MAF). So this is why I'm curious as to what the MAF sensor controls, I'm wondering if this is starving the fuel or overfueling which causes the Knock, then the knock sensors see this and alter the timing which creates the lumpy acceleration??? What are your thoughts? Oh I should mention mine is the 2.5i N52 E85 which only has one DISA valve 2008 model
