Re: [PATCH/RFT] libata "DMA timeout" fix

From: Justin Cormack (justin_at_street-vision.com)
Date: 02/29/04

  • Next message: Guennadi Liakhovetski: "Re: [OT] Copyright infringement by Walmart?"
    To: Jeff Garzik <jgarzik@pobox.com>
    Date:	Sun, 29 Feb 2004 17:26:01 +0000
    
    

    Thanks, testing James's fix on one machine at the moment. Will have
    another six or so machines as a libata test farm tomorrow.

    Justin

    On Sat, 2004-02-28 at 21:23, Jeff Garzik wrote:
    > James Bottomley wrote:
    > > On Sat, 2004-02-28 at 13:10, Jeff Garzik wrote:
    > >
    > >>===== drivers/scsi/libata-core.c 1.19 vs edited =====
    > >>--- 1.19/drivers/scsi/libata-core.c Wed Feb 25 22:41:13 2004
    > >>+++ edited/drivers/scsi/libata-core.c Sat Feb 28 14:03:18 2004
    > >>@@ -2130,6 +2130,14 @@
    > >> cmd->result = SAM_STAT_CHECK_CONDITION;
    > >> else
    > >> ata_to_sense_error(qc);
    > >>+
    > >>+ /* hack alert! we need this to get past the
    > >>+ * first check in scsi_done(). libata is the
    > >>+ * -only- user of ->eh_strategy_handler() in
    > >>+ * any kernel tree, which exposes some incorrect
    > >>+ * assumptions in the SCSI layer.
    > >>+ */
    > >>+ scsi_add_timer(cmd, 2000 * HZ, NULL);
    > >> } else {
    > >> cmd->result = SAM_STAT_GOOD;
    > >> }
    > >
    > >
    > > You can't do this. Supposing there command's delayed, the timer fires
    > > and then the command returns with a sense error? The done will go
    > > through automatically completing the command, but your strategy handler
    > > will still think it has a failed command to handle.
    >
    > hmmm, yeah that will be a problem iff we are not already in the strategy
    > handler.
    >
    >
    > > The correct fix is this, I think (uncompiled, but you get the idea):
    >
    > Yeah, that's much better. That function is not exported though ;-)
    >
    > Jeff
    >
    >
    >
    > -
    > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    > the body of a message to majordomo@vger.kernel.org
    > More majordomo info at http://vger.kernel.org/majordomo-info.html
    > Please read the FAQ at http://www.tux.org/lkml/

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: Guennadi Liakhovetski: "Re: [OT] Copyright infringement by Walmart?"

    Relevant Pages

    • Re: [PATCH scsi-misc-2.6 01/04] scsi: make scsi_send_eh_cmnd use its own timer instead of scmd->e
      ... James Bottomley wrote: ... >>normal command timeouts. ... * The lldd succeeds to delete timer and normal completion path runs. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [PATCH/RFT] libata "DMA timeout" fix
      ... > through automatically completing the command, but your strategy handler ... Yeah, that's much better. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: Arrr! Linux v2.6.14-rc2
      ... command that comes in through scsi_queue_insert. ... command each time, the retries decrement is never seen, so we're ... int scsi_queue_insert(struct scsi_cmnd *cmd, int reason) ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [RFC] ethtool semantics
      ... I find the c) feature very convenient. ... the configuration of the switch, something which is usually (pick your ... Command line parameters of the bcm5700 driver do implement c) (among ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: silent semantic changes with reiser4
      ... multiple-data-streams from non-MDS aware apps is the runat shell ... attribute directory and then runs a command. ... I don't like "at" because the API changes don't have anything to do with ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)