[PATCH] libata: reorganize ata_set_mode()