Many farmers will have their active farm operation contained within a corporation and in many cases, this corporation is taxed as an S corporation. If the S corporation has a loss, this loss can be deducted on the shareholder's tax return, but only to the extent of the shareholder's basis. This basis is comprised of the investments made into the corporation by the shareholder (stock basis) and any loans directly made to the corporation by the shareholder (debt basis).
Stock basis is very straightforward, however, debt basis can lead to arguments with the IRS. Simply guaranteeing a loan of the corporation does not get the shareholder any debt basis. However, if the shareholder incurs out of pocket costs related to the guarantee (i.e. he pays part of the corporation's debt), then they will get increased basis for this outlay.
Additionally, the IRS and the Courts have agreed that this debt must be made directly by the shareholder to the corporation. The shareholder can borrow the funds from somebody else and then loan it to the corporation, but the loan must come from the shareholder. There have been many cases where the taxpayer has lost the ability to deduct the S corporation losses due to not making the loan directly. Also, these loans need to be documented with an appropriate interest rate and repayment terms.
With 100% bonus depreciation in 2011 and 50% in 2012, the chance of having S corporaiton's losses increases substantially. Don't lose your ability to deduct the loss by not following the debt basis rules.