Hi Tejun, --- Tejun Heo <htejun@xxxxxxxxx> wrote: > So, what's your suggestion here? Do you think libata should do such > things with its own mechanism? Your instinct is correct. Anything between I and T, as in I_T, is SDS domain. That is, SAM doesn't have a _context_ for anything between the I and T. (In SATA's case I_T_L, of course.) So this is why you shouldn't call SCSI's ER without context, as in "Hey, neither command, nor device is broken, but do some ER for me." Such work belongs in your SATA Layer, unless either a device or command is involved, as we discussed. Handle protocol ER in your SATA layer. Note however that most of your ER could be done on behalf of a command or device, since of course, a device or command(s) end up being affected. Basically "do as little as possible but no less" technique. Good luck! Luben - : send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html