From: Pat LaVarre <p.lavarre@ieee.org>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: linux-ide@vger.kernel.org
Subject: Re: [PATCH] libata atapi work #2.1
Date: 18 May 2004 15:10:07 -0600 [thread overview]
Message-ID: <1084914607.3421.10.camel@patibmrh9> (raw)
In-Reply-To: <1084844914.3211.182.camel@patibmrh9>
Jeff G:
> > > on the SCSI end of ATAPI ...
> > > * issue REQUEST SENSE, to simulate an
> > > auto-sensing scsi device
> > ...
> > I will have to discover how to auto sense only after a plain failure,
> > not inappropriately after a timeout.
Is the following patch a miniscule step forward?
I guess it is because, in -bk5, same as before, I see the lack of auto
sense forces me to reboot before again I may modprobe:
kernel: atapi_packet_task: send cdb
kernel: ata_host_intr: BUS_NODATA (drv_stat 0x51)
kernel: atapi_autosense: FIXME: auto sense up to 0x12 of 0x60 @ 0xD2B33140
kernel: ata_scsi_error: ENTER
kernel: ata_eng_timeout: ENTER
/sbin/hotplug: no runnable /etc/hotplug/scsi_generic.agent is installed
kernel: ata2: BUG: timeout without command
kernel: ata_eng_timeout: EXIT
kernel: ata_scsi_error: EXIT
kernel: irq 18: nobody cared!
kernel: [<c01081d7>] __report_bad_irq+0x2a/0x8b
...
kernel:
kernel: handlers:
kernel: [<df96750f>] (ata_interrupt+0x0/0x1b9 [libata])
kernel: Disabling IRQ #18
The "atapi_autosense: FIXME" message is new, it comes from this patch,
at I hope the right time.
In my newbie ignorance, at first I tried auto sensing in ata_scsi_error,
but the ata_qc_from_tag was null by then.
Next, the "irq 18: nobody cared!" provoked me to confirm that
ata_host_intr sees qc->tf.protocol = 5 = ATA_PROT_ATAPI (not
ATA_PROT_ATAPI_DMA) presumably because (cmd->sc_data_direction ==
SCSI_DATA_NONE).
Now I ask:
"Is the following patch a miniscule step forward?"
Pat LaVarre
diff -Nurp linux-2.6.6-bk5/drivers/scsi/libata-core.c linux-2.6.6-bk5-pel/drivers/scsi/libata-core.c
--- linux-2.6.6-bk5/drivers/scsi/libata-core.c 2004-05-18 14:20:05.000000000 -0600
+++ linux-2.6.6-bk5-pel/drivers/scsi/libata-core.c 2004-05-18 14:40:01.000000000 -0600
@@ -2299,6 +2299,28 @@ struct ata_queued_cmd *ata_qc_new_init(s
}
/**
+ * atapi_autosense -
+ * @qc:
+ * @drv_stat:
+ * @cmd:
+ *
+ * LOCKING:
+ *
+ */
+
+void atapi_autosense(struct ata_queued_cmd *qc, u8 drv_stat,
+ struct scsi_cmnd *cmd)
+{
+ cmd->result = SAM_STAT_CHECK_CONDITION;
+ if (drv_stat & (ATA_BUSY | ATA_DRQ)) {
+ return;
+ }
+ DPRINTK("FIXME: auto sense up to 0x12 of 0x%X @ 0x%X\n",
+ (int) sizeof cmd->sense_buffer,
+ (int) &cmd->sense_buffer[0]);
+}
+
+/**
* ata_qc_complete -
* @qc:
* @drv_stat:
@@ -2322,7 +2344,7 @@ void ata_qc_complete(struct ata_queued_c
if (cmd) {
if (unlikely(drv_stat & (ATA_ERR | ATA_BUSY | ATA_DRQ))) {
if (is_atapi_taskfile(&qc->tf))
- cmd->result = SAM_STAT_CHECK_CONDITION;
+ atapi_autosense(qc, drv_stat, cmd);
else
ata_to_sense_error(qc);
} else {
next prev parent reply other threads:[~2004-05-18 21:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-16 15:39 [PATCH] libata atapi work #2.1 Pat LaVarre
2004-05-16 23:20 ` Jeff Garzik
2004-05-17 14:56 ` Pat LaVarre
2004-05-17 17:57 ` Jeff Garzik
2004-05-17 19:24 ` Pat LaVarre
2004-05-18 1:48 ` Pat LaVarre
2004-05-18 21:10 ` Pat LaVarre [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-05-15 22:12 Jeff Garzik
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=1084914607.3421.10.camel@patibmrh9 \
--to=p.lavarre@ieee.org \
--cc=jgarzik@pobox.com \
--cc=linux-ide@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