Commands needing to be retried would result in a block I/O request being re-used, without being re-initialized properly. This patch ensures that the requests are correctly re-initialized via standard allocation means. Prior to this patch, boots were failing consistently as in: http://lkml.org/lkml/2008/12/5/161 With this patch in place, the system is booting reliably. Signed-off-by: Alan D. Brunelle Cc: Jens Axboe Cc: Mike Anderson Cc: James Bottomley --- drivers/cdrom/cdrom.c | 2 ++ drivers/scsi/device_handler/scsi_dh_hp_sw.c | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c index d16b024..0b86d8a 100644 --- a/drivers/cdrom/cdrom.c +++ b/drivers/cdrom/cdrom.c @@ -2131,6 +2131,8 @@ static int cdrom_read_cdda_bpc(struct cdrom_device_info *cdi, __u8 __user *ubuf, nframes -= nr; lba += nr; ubuf += len; + + blk_rq_init(q, rq); } blk_put_request(rq); diff --git a/drivers/scsi/device_handler/scsi_dh_hp_sw.c b/drivers/scsi/device_handler/scsi_dh_hp_sw.c index 9aec4ca..075ae35 100644 --- a/drivers/scsi/device_handler/scsi_dh_hp_sw.c +++ b/drivers/scsi/device_handler/scsi_dh_hp_sw.c @@ -136,8 +136,10 @@ retry: h->path_state = HP_SW_PATH_ACTIVE; ret = SCSI_DH_OK; } - if (ret == SCSI_DH_IMM_RETRY) + if (ret == SCSI_DH_IMM_RETRY) { + blk_rq_init(req->q, q); goto retry; + } if (ret == SCSI_DH_DEV_OFFLINED) { h->path_state = HP_SW_PATH_PASSIVE; ret = SCSI_DH_OK; @@ -231,8 +233,10 @@ retry: ret = SCSI_DH_OK; if (ret == SCSI_DH_RETRY) { - if (--retry) + if (--retry) { + blk_rq_init(req->q, req); goto retry; + } ret = SCSI_DH_IO; } -- 1.5.6.3