From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: Borislav Petkov <petkovbb@googlemail.com>
Cc: linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org,
Borislav Petkov <petkovbb@gmail.com>
Subject: Re: [PATCH 14/22] ide-tape: cleanup and fix comments
Date: Tue, 5 Feb 2008 02:27:10 +0100 [thread overview]
Message-ID: <200802050227.11033.bzolnier@gmail.com> (raw)
In-Reply-To: <1202132440-26648-15-git-send-email-petkovbb@gmail.com>
On Monday 04 February 2008, Borislav Petkov wrote:
> Also, remove redundant ones and cleanup whitespace.
>
> Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
fixed few minor issues while merging the patch:
> ---
> drivers/ide/ide-tape.c | 725 +++++++++++++++++++----------------------------
> 1 files changed, 293 insertions(+), 432 deletions(-)
>
> diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c
> index 175d507..a80f8d9 100644
> --- a/drivers/ide/ide-tape.c
> +++ b/drivers/ide/ide-tape.c
[...]
> /*
> - * DSC polling parameters.
> + * DSC polling parameters.
> *
> - * Polling for DSC (a single bit in the status register) is a very
> - * important function in ide-tape. There are two cases in which we
> - * poll for DSC:
> + * Polling for DSC (a single bit in the status register) is a very important
> + * function in ide-tape. There are two cases in which we poll for DSC:
> *
> - * 1. Before a read/write packet command, to ensure that we
> - * can transfer data from/to the tape's data buffers, without
> - * causing an actual media access. In case the tape is not
> - * ready yet, we take out our request from the device
> - * request queue, so that ide.c will service requests from
> - * the other device on the same interface meanwhile.
> *
> - * 2. After the successful initialization of a "media access
> - * packet command", which is a command which can take a long
> - * time to complete (it can be several seconds or even an hour).
> + * 1. Before a read/write packet command, to ensure that we can transfer data
> + * from/to the tape's data buffers, without causing an actual media access.
> + * In case the tape is not ready yet, we take out our request from the device
> + * request queue, so that ide.c could service requests from the other device
> + * on the same interface in the meantime.
> *
> - * Again, we postpone our request in the middle to free the bus
> - * for the other device. The polling frequency here should be
> - * lower than the read/write frequency since those media access
> - * commands are slow. We start from a "fast" frequency -
> - * IDETAPE_DSC_MA_FAST (one second), and if we don't receive DSC
> - * after IDETAPE_DSC_MA_THRESHOLD (5 minutes), we switch it to a
> - * lower frequency - IDETAPE_DSC_MA_SLOW (1 minute).
> + * 2. After the successful initialization of a "media access packet command",
> + * which is a command that can take a long time to complete (the interval can
> + * range from several seconds to even an hour).
> *
> - * We also set a timeout for the timer, in case something goes wrong.
> - * The timeout should be longer then the maximum execution time of a
> - * tape operation.
> - */
> -
> -/*
> - * DSC timings.
> + * Again, we postpone our request in the middle to free the bus for the other
> + * device. The polling frequency here should be lower than the read/write
> + * frequency since those media access commands are slow. We start from a "fast"
> + * frequency - IDETAPE_DSC_MA_FAST (one second), and if we don't receive DSC
> + * after IDETAPE_DSC_MA_THRESHOLD (5 minutes), we switch it to a lower frequency
> + * - IDETAPE_DSC_MA_SLOW (1 minute). We also set a timeout for the timer, in
the above paragraph is true only for point 2.
[...]
> @@ -703,8 +654,8 @@ static void idetape_analyze_error(ide_drive_t *drive, u8 *sense)
> }
>
> /*
> - * If error was the result of a zero-length read or write command,
> - * with sense key=5, asc=0x22, ascq=0, let it slide. Some drives
> + * If error was the result of a zero-length read or write command, with
> + * sense key=5, asc=0x22, ascq=0, let it slide. Some drives
> * (i.e. Seagate STT3401A Travan) don't support 0-length read/writes.
> */
> if ((pc->c[0] == READ_6 || pc->c[0] == WRITE_6)
[...]
> @@ -1070,25 +1012,24 @@ static ide_startstop_t idetape_pc_intr(ide_drive_t *drive)
> if (pc->flags & PC_FL_DMA_IN_PROGRESS) {
> if (hwif->ide_dma_end(drive) || (stat & ERR_STAT)) {
> /*
> - * A DMA error is sometimes expected. For example,
> - * if the tape is crossing a filemark during a
> - * READ command, it will issue an irq and position
> - * itself before the filemark, so that only a partial
> - * data transfer will occur (which causes the DMA
> - * error). In that case, we will later ask the tape
> - * how much bytes of the original request were
> - * actually transferred (we can't receive that
> - * information from the DMA engine on most chipsets).
> + * A DMA error is sometimes expected. For example, if
> + * the tape is crossing a filemark during a READ
> + * command, it will issue an irq and position itself
> + * before the filemark, so that only a partial data
> + * transfer will occur (which causes the DMA error). In
> + * that case, we will later ask the tape how much bytes
> + * of the original request were actually transferred (we
> + * can't receive that information from the DMA engine on
> + * most chipsets).
> */
>
> /*
> - * On the contrary, a DMA error is never expected;
> - * it usually indicates a hardware error or abort.
> - * If the tape crosses a filemark during a READ
> - * command, it will issue an irq and position itself
> - * after the filemark (not before). Only a partial
> - * data transfer will occur, but no DMA error.
> - * (AS, 19 Apr 2001)
> + * On the contrary, a DMA error is never expected; it
> + * usually indicates a hardware error or abort. If the
> + * tape crosses a filemark during a READ command, it
> + * will issue an irq and position itself after the
> + * filemark (not before). Only a partial data transfer
> + * will occur, but no DMA error. (AS, 19 Apr 2001)
> */
> pc->flags |= PC_FL_DMA_ERROR;
> } else {
I dropped the above chunks (they don't seem to add any value)
[...]
> + * 3. ATAPI Tape media access commands have immediate status with a delayed
> + * process. In case of a successful initiation of a media access packet command,
> + * the DSC bit will be set when the actual execution of the command is finished.
> + * Since the tape drive will not issue an interrupt, we have to poll for this
> + * event. In this case, we define the request as "low priority request" by
> + * setting rq_status to IDETAPE_RQ_POSTPONED, set a timer to poll for DSC and
> + * exit the driver.
replaced tabs with spaces
[...]
> - * For SCSI this byte is defined as subpage instead of high byte
> - * of length and some IDE drives seem to interpret it this way
> - * and return an error when 255 is used.
> + * For SCSI this byte is defined as subpage instead of high byte of
> + * length and some IDE drives seem to interpret it this way and return
> + * an error when 255 is used.
this change was also dropped
[...]
> - * If the tape is still busy, postpone our request and service
> - * the other device meanwhile.
> + * If the tape is still busy, postpone our request and service the other
> + * device meanwhile.
same here
[...]
> /*
> - * ide_setup is called to:
> + * The function below is called to:
> *
> - * 1. Initialize our various state variables.
> - * 2. Ask the tape for its capabilities.
> - * 3. Allocate a buffer which will be used for data
> - * transfer. The buffer size is chosen based on
> - * the recommendation which we received in step (2).
> - *
> - * Note that at this point ide.c already assigned us an irq, so that
> - * we can queue requests here and wait for their completion.
> + * 1. Initialize our various state variables.
> + * 2. Ask the tape for its capabilities.
> + * 3. Allocate a buffer which will be used for data transfer. The buffer size is
> + * chosen based on the recommendation which we received in step 2. Note that at
"Note" is for the whole comment not only step 3.
> + * this point ide.c already assigned us an irq, so that we can queue requests
> + * here and wait for their completion.
> */
next prev parent reply other threads:[~2008-02-05 1:15 UTC|newest]
Thread overview: 65+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-04 13:40 (unknown), Borislav Petkov
2008-02-04 13:40 ` Borislav Petkov
2008-02-04 13:40 ` [PATCH 01/22] ide-tape: refactor the debug logging facility Borislav Petkov
2008-02-04 13:40 ` Borislav Petkov
2008-02-04 13:40 ` [PATCH 02/22] ide-tape: remove struct idetape_read_position_result_t Borislav Petkov
2008-02-04 13:40 ` Borislav Petkov
2008-02-05 1:23 ` Bartlomiej Zolnierkiewicz
2008-02-04 13:40 ` [PATCH 03/22] ide-tape: remove unreachable code chunk Borislav Petkov
2008-02-04 13:40 ` Borislav Petkov
2008-02-04 13:40 ` [PATCH 04/22] ide-tape: simplify code branching in the interrupt handler Borislav Petkov
2008-02-04 13:40 ` Borislav Petkov
2008-02-04 13:40 ` [PATCH 05/22] ide-tape: remove typedef idetape_chrdev_direction_t Borislav Petkov
2008-02-04 13:40 ` Borislav Petkov
2008-02-04 13:40 ` [PATCH 06/22] ide-tape: struct idetape_tape_t: remove unused members Borislav Petkov
2008-02-04 13:40 ` Borislav Petkov
2008-09-22 13:25 ` Sergei Shtylyov
2008-09-22 13:58 ` Boris Petkov
2008-09-22 15:50 ` Sergei Shtylyov
2008-02-04 13:40 ` [PATCH 07/22] ide-tape: struct idetape_tape_t: shorten member names v2 Borislav Petkov
2008-02-04 13:40 ` Borislav Petkov
2008-02-05 1:23 ` Bartlomiej Zolnierkiewicz
2008-02-05 4:47 ` Borislav Petkov
2008-02-04 13:40 ` [PATCH 08/22] ide-tape: remove packet command and struct request memory buffers Borislav Petkov
2008-02-04 13:40 ` Borislav Petkov
2008-02-04 13:40 ` [PATCH 09/22] ide-tape: remove idetape_increase_max_pipeline_stages() Borislav Petkov
2008-02-04 13:40 ` Borislav Petkov
2008-02-04 13:40 ` [PATCH 10/22] ide-tape: shorten some function names Borislav Petkov
2008-02-04 13:40 ` Borislav Petkov
2008-02-04 13:40 ` [PATCH 11/22] ide-tape: remove atomic test/set macros Borislav Petkov
2008-02-04 13:40 ` Borislav Petkov
2008-02-04 13:40 ` [PATCH 12/22] ide-tape: dump gcw fields on error in idetape_identify_device() Borislav Petkov
2008-02-04 13:40 ` Borislav Petkov
2008-02-04 13:40 ` [PATCH 13/22] ide-tape: remove struct idetape_id_gcw Borislav Petkov
2008-02-04 13:40 ` Borislav Petkov
2008-02-04 13:40 ` [PATCH 14/22] ide-tape: cleanup and fix comments Borislav Petkov
2008-02-04 13:40 ` Borislav Petkov
2008-02-05 1:27 ` Bartlomiej Zolnierkiewicz [this message]
2008-02-04 13:40 ` [PATCH 15/22] ide-tape: remove unused "length" arg from idetape_create_read_buffer_cmd() Borislav Petkov
2008-02-04 13:40 ` Borislav Petkov
2008-02-04 13:40 ` [PATCH 16/22] ide-tape: include proper headers Borislav Petkov
2008-02-04 13:40 ` Borislav Petkov
2008-02-04 13:40 ` [PATCH 17/22] ide-tape: collect module-related macro calls at the end Borislav Petkov
2008-02-04 13:40 ` Borislav Petkov
2008-02-04 13:40 ` [PATCH 18/22] ide-tape: remove leftover OnStream support warning Borislav Petkov
2008-02-04 13:40 ` Borislav Petkov
2008-02-04 13:40 ` [PATCH 19/22] ide-tape: fix syntax error in idetape_identify_device() Borislav Petkov
2008-02-04 13:40 ` Borislav Petkov
2008-02-04 13:40 ` [PATCH 20/22] ide-tape: cleanup the remaining codestyle issues Borislav Petkov
2008-02-04 13:40 ` Borislav Petkov
2008-02-05 1:27 ` Bartlomiej Zolnierkiewicz
2008-02-04 13:40 ` [PATCH 21/22] ide-tape: bump minor driver version Borislav Petkov
2008-02-04 13:40 ` Borislav Petkov
2008-02-04 13:40 ` [PATCH 22/22] ide-tape: schedule driver for removal after 6 months in case it turns out Borislav Petkov
2008-02-04 13:40 ` Borislav Petkov
2008-02-05 1:20 ` ide-tape redux (was: Bartlomiej Zolnierkiewicz
2008-02-06 5:23 ` Borislav Petkov
2008-02-06 5:27 ` Borislav Petkov
2008-02-09 16:25 ` Bartlomiej Zolnierkiewicz
2008-02-09 19:42 ` [PATCH 1/2] ide-tape: move all struct and other defs at the top Borislav Petkov
2008-02-09 19:42 ` Borislav Petkov
2008-02-11 22:12 ` Bartlomiej Zolnierkiewicz
2008-02-09 16:25 ` ide-tape redux (was: Bartlomiej Zolnierkiewicz
2008-02-09 19:43 ` [PATCH 2/2] ide-tape: remove atomic test/set macros for packet commands Borislav Petkov
2008-02-09 19:43 ` Borislav Petkov
2008-02-11 22:12 ` Bartlomiej Zolnierkiewicz
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=200802050227.11033.bzolnier@gmail.com \
--to=bzolnier@gmail.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=petkovbb@gmail.com \
--cc=petkovbb@googlemail.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.