From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org,
Borislav Petkov <petkovbb@gmail.com>
Subject: Re: [PATCH] ide-cd: document capacity hack
Date: Wed, 18 Feb 2009 21:38:14 +0100 [thread overview]
Message-ID: <200902182138.15501.bzolnier@gmail.com> (raw)
In-Reply-To: <499C62FF.1090805@ru.mvista.com>
On Wednesday 18 February 2009, Sergei Shtylyov wrote:
> Hello.
>
> Bartlomiej Zolnierkiewicz wrote:
>
> > Just copy the comment from drivers/scsi/sr.c::sr_done()
> > (from which the capacity hack has been originated).
>
> > Cc: Borislav Petkov <petkovbb@gmail.com>
> > Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
>
> Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
>
> > Index: b/drivers/ide/ide-cd.c
> > ===================================================================
> > --- a/drivers/ide/ide-cd.c
> > +++ b/drivers/ide/ide-cd.c
> > @@ -189,6 +189,14 @@ static void cdrom_analyze_sense_data(ide
> > bio_sectors = max(bio_sectors(failed_command->bio), 4U);
> > sector &= ~(bio_sectors - 1);
> >
> > + /*
> > + * The SCSI specification allows for the value
> > + * returned by READ CAPACITY to be up to 75 2K
> > + * sectors past the last readable block.
>
> Oh horror... :-)
>
> > + * Therefore, if we hit a medium error within the
> > + * last 75 2K sectors, we decrease the saved size
> > + * value.
> > + */
> > if (sector < get_capacity(info->disk) &&
> > drive->probed_capacity - sector < 4 * 75)
> > set_capacity(info->disk, sector);
>
> Would be nice if the CHS capacity workround was finally documented too? ;-)
Send patches. I have my hands full of work...
prev parent reply other threads:[~2009-02-18 20:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-18 19:18 [PATCH] ide-cd: document capacity hack Bartlomiej Zolnierkiewicz
2009-02-18 19:35 ` Sergei Shtylyov
2009-02-18 20:38 ` Bartlomiej Zolnierkiewicz [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200902182138.15501.bzolnier@gmail.com \
--to=bzolnier@gmail.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=petkovbb@gmail.com \
--cc=sshtylyov@ru.mvista.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.