public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeff Garzik <jeff@garzik.org>
To: Linux IDE mailing list <linux-ide@vger.kernel.org>
Cc: Jens Axboe <jens.axboe@oracle.com>, LKML <linux-kernel@vger.kernel.org>
Subject: IDE, packet commands and REQ_TYPE_SENSE?
Date: Thu, 02 Apr 2009 05:31:44 -0400	[thread overview]
Message-ID: <49D48600.2070109@garzik.org> (raw)

Looking at REQ_TYPE_*, I see that REQ_TYPE_SENSE is only used once in an 
assignment, and appears to never be tested anywhere.

Furthermore, the use of REQ_TYPE_SENSE immediately follows a previous 
assignment rq->cmd_type assignment:

cdrom_queue_request_sense():
[...]
         /* stuff the sense request in front of our current request */
         blk_rq_init(NULL, rq);
         rq->cmd_type = REQ_TYPE_ATA_PC;
         rq->rq_disk = info->disk;

         rq->data = sense;
         rq->cmd[0] = GPCMD_REQUEST_SENSE;
         rq->cmd[4] = 18;
         rq->data_len = 18;

         rq->cmd_type = REQ_TYPE_SENSE;
         rq->cmd_flags |= REQ_PREEMPT;
[...]

First, the code assigns REQ_TYPE_ATA_PC, then without any intervening 
tests or branches, it assigns REQ_TYPE_SENSE.

So, some questions...

Is REQ_TYPE_ATA_PC sufficient (i.e. the first assignment)?

Can we get rid of REQ_TYPE_SENSE?

What are the differences between REQ_TYPE_ATA_PC and REQ_TYPE_BLOCK_PC? 
  Would it be possible to eliminate REQ_TYPE_ATA_PC after some work, as 
well?

	Jeff




             reply	other threads:[~2009-04-02  9:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-02  9:31 Jeff Garzik [this message]
2009-04-02  9:36 ` IDE, packet commands and REQ_TYPE_SENSE? Jeff Garzik
2009-04-02 12:45 ` Borislav Petkov

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=49D48600.2070109@garzik.org \
    --to=jeff@garzik.org \
    --cc=jens.axboe@oracle.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox