You are thinking of the non-commercial loss rules. Unless you can pass certain tests, you can not offset these losses against your other income. They simply carry forward until you make a profit from that same activity. Think of it a bit like capital losses, which you can only offset against capital gains. If your farm loss doesn't pass any of the tests, the loss will sit there until your farm makes a profit, in which case you can then offset it against that same income.