Albert Lee wrote: > Jeff Garzik wrote: > >>Tejun Heo wrote: >> >> >>>It seems that HSM_ST needs to handle !DRQ && ERR case before the first >>>iteration (or maybe it should be pushed into HSM_ST_FIRST?). Does my >>>analysis make sense? >> >> >>Agreed, though we should check for ERR on ATAPI path first, too, IMO. >> > > > Fix the HSM error_mask mapping. > > Changes: > - Better mapping in ac_err_mask() > - In HSM_ST_FIRST ans HSM_ST state, check ATA_ERR|ATA_DF and map it to AC_ERR_DEV instead of AC_ERR_HSM. > - In HSM_ST_FIRST and HSM_ST state, map DRQ=1 ERR=1 to AC_ERR_HSM. > - For PIO data in and DRQ=1 ERR=1, add check after the junk data block is read. > > Signed-off-by: Albert Lee <albertcc@xxxxxxxxxx> > --- > The device might stop the HSM by BSY=0 DRQ=1 ERR=1 when it finds something wrong. Sorry, it should be "The device might stop the HSM by BSY=0 DRQ=0 ERR=1 when it finds something wrong." -- albert > Map this condition to AC_ERR_DEV for accuracy. > This should fix the problem of SMART reported by Nicolas. > (patch against upstream branch.) - : send the line "unsubscribe linux-ide" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html