linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@pobox.com>
To: dougg@torque.net
Cc: linux-scsi@vger.kernel.org, linux-ide@vger.kernel.org
Subject: Re: [PATCH] libata: error processing + rw 6 byte fix
Date: Fri, 26 Aug 2005 23:31:17 -0400	[thread overview]
Message-ID: <430FDE85.4060301@pobox.com> (raw)
In-Reply-To: <430B1337.7080906@torque.net>

Douglas Gilbert wrote:
> Jeff Garzik wrote:
>>>@@ -1093,28 +1189,54 @@
>>>                   unsigned int buflen)
>>> {
>>>     u8 *scsicmd = args->cmd->cmnd, *p, *last;
>>>-    unsigned int page_control, six_byte, output_len;
>>>+    const u8 sat_blk_desc[] = {0, 0, 0, 0, 0, 0, 0x2, 0x0};
>>>+    /* 512 byte blocks, number of blocks = 0, (sat-r05) */
>>
>>
>>NOTE: don't hardcode 512, since that will change very soon in SATA.
> 
> 
> So put ATA_SECT_SIZE in there for the time being?

Yes.


>>1K ATA devices are just around the corner.
>>
>>
>>>@@ -1570,11 +1737,6 @@
>>>             ata_scsi_rbuf_fill(&args, ata_scsiop_mode_sense);
>>>             break;
>>> 
>>>-        case MODE_SELECT:    /* unconditionally return */
>>>-        case MODE_SELECT_10:    /* bad-field-in-cdb */
>>>-            ata_bad_cdb(cmd, done);
>>>-            break;
>>>-
>>>         case READ_CAPACITY:
>>>             ata_scsi_rbuf_fill(&args, ata_scsiop_read_cap);
>>>             break;
>>
>>
>>At this point in the patch series, you should not be removing this code
>>AFAICS.
> 
> 
> It is a trick and an error correction. In this version
> of libata MODE SELECT commands don't have "invalid field
> in cdb" as the ata_bad_cmd() sets, but "invalid command
> operation code" which is what the default case sets.

Since they are required commands, I tend to prefer "invalid field in 
CDB" as a temporary return code.

Of course we could just solve this by getting your MODE SELECT code in 
there ;)

	Jeff



  reply	other threads:[~2005-08-27  3:31 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-22  9:02 [PATCH] libata: error processing + rw 6 byte fix Douglas Gilbert
2005-08-22 19:10 ` Jeff Garzik
2005-08-23 12:14   ` Douglas Gilbert
2005-08-27  3:31     ` Jeff Garzik [this message]
2005-08-23  7:13 ` Jens Axboe
2005-08-23 12:33   ` Douglas Gilbert
2005-08-23 12:44     ` Jens Axboe
2005-08-27  3:26     ` Jeff Garzik
2005-08-27  5:08       ` Douglas Gilbert
2005-08-27  7:17         ` Jens Axboe
2005-08-27  8:20         ` Jeff Garzik
2005-08-27 10:01           ` Jens Axboe

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=430FDE85.4060301@pobox.com \
    --to=jgarzik@pobox.com \
    --cc=dougg@torque.net \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-scsi@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;
as well as URLs for NNTP newsgroup(s).