X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fscsi%2Fscsi.c;h=e5c6f6af876558c0b92dea602c6d2f6eed1a23a5;hb=9cf7f7fac8c36e54e4869fc01e1bad0d3b4de53b;hp=b35d19472caa080a7a8614a8e211216b001e8f62;hpb=f389e9fcecdec4c4cb890ad28ea30a87a579ec3e;p=linux-2.6 diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c index b35d19472c..e5c6f6af87 100644 --- a/drivers/scsi/scsi.c +++ b/drivers/scsi/scsi.c @@ -757,7 +757,7 @@ void scsi_finish_command(struct scsi_cmnd *cmd) "Notifying upper driver of completion " "(result %x)\n", cmd->result)); - good_bytes = scsi_bufflen(cmd); + good_bytes = scsi_bufflen(cmd) + cmd->request->extra_len; if (cmd->request->cmd_type != REQ_TYPE_BLOCK_PC) { drv = scsi_cmd_to_driver(cmd); if (drv->done) @@ -969,9 +969,10 @@ void starget_for_each_device(struct scsi_target *starget, void *data, EXPORT_SYMBOL(starget_for_each_device); /** - * __starget_for_each_device - helper to walk all devices of a target - * (UNLOCKED) + * __starget_for_each_device - helper to walk all devices of a target (UNLOCKED) * @starget: target whose devices we want to iterate over. + * @data: parameter for callback @fn() + * @fn: callback function that is invoked for each device * * This traverses over each device of @starget. It does _not_ * take a reference on the scsi_device, so the whole loop must be