Douglas Gilbert <dougg@xxxxxxxxxx> wrote: > underflow - LLD should place (DID_ERROR << 16) in 'result' if > actual number of bytes transferred is less than this > figure. Not many LLDs implement this check and some > that do just output an error message to the log > rather than report a DID_ERROR. Better for an LLD > to implement 'resid'. > Andreas, > The last sentence is were the stress should be. It implies > the LLD should use one or the other, preferably resid. Ok. BTW, resid is used in scsi_lib.c to set rq->data_len. Who is actually evaluating this field -- the block layer (I have seen some usage in elevator.c)? > Historically 'underflow' has been there the longest but was > insufficient to distinguish between serious underflows > (e.g. on a READ of a block device) and informative underflows > (e.g. fetching a mode page with an arbitrarily large buffer). > So 'resid' was added later and conveys more information and > doesn't jump to conclusions that it is a serious error. > Perhaps 'underflow' should be marked as deprecated. > Is any data conveyed or is the underflow value the same > as the requested length? Value is the same as the requested length. > See what happens if 'underflow' is ignored (i.e. not > written to be the LLD) and DID_ERROR is not set in > the host_byte. Yes I will give it a try. Thanks. Regards, Andreas - : 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