linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "John W. Linville" <linville@tuxdriver.com>
To: Jeff Raubitschek <jhr@google.com>
Cc: Jeff Garzik <jgarzik@pobox.com>, linux-ide@vger.kernel.org
Subject: Re: [PATCH libata-dev-2.6:passthru] passthru fixes
Date: Wed, 21 Sep 2005 10:32:23 -0400	[thread overview]
Message-ID: <20050921143221.GB23290@tuxdriver.com> (raw)
In-Reply-To: <20050913142636.GB5679@google.com>

On Tue, Sep 13, 2005 at 07:26:36AM -0700, Jeff Raubitschek wrote:
> Fix a few problems seen with the passthru branch:
> 
> - leaked scsi_request on buffer allocate failure
> - passthru sense routines were refering to tf->command
>   which is not read in tf_read, instead use drv_stat for
>   status register.
> - passthru sense passed back to user on ata_task_ioctl
> 
> Patch is against the current libata-dev passthru branch.
> 
> Signed-off-by: Jeff Raubitschek <jhr@google.com>

Acked-by: John W. Linville <linville@tuxdriver.com>

The first hunk, in particular, looks like it could explain the
mysterious lockups/failures when using smartctl/smartd w/ libata.

> diff --git a/drivers/scsi/libata-scsi.c b/drivers/scsi/libata-scsi.c
> --- a/drivers/scsi/libata-scsi.c
> +++ b/drivers/scsi/libata-scsi.c
> @@ -116,8 +116,10 @@ int ata_cmd_ioctl(struct scsi_device *sc
>  	if (args[3]) {
>  		argsize = SECTOR_SIZE * args[3];
>  		argbuf = kmalloc(argsize, GFP_KERNEL);
> -		if (argbuf == NULL)
> -			return -ENOMEM;
> +		if (argbuf == NULL) {
> +			rc = -ENOMEM;
> +			goto error;
> +		}
>  
>  		scsi_cmd[1]  = (4 << 1); /* PIO Data-in */
>  		scsi_cmd[2]  = 0x0e;     /* no off.line or cc, read from dev,

-- 
John W. Linville
linville@tuxdriver.com

  parent reply	other threads:[~2005-09-21 14:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-13 14:26 [PATCH libata-dev-2.6:passthru] passthru fixes Jeff Raubitschek
2005-09-14 12:18 ` Jeff Garzik
2005-09-21 14:32 ` John W. Linville [this message]
2005-10-04 14:22 ` Jeff Garzik
2005-10-10 20:39   ` Mark Lord

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=20050921143221.GB23290@tuxdriver.com \
    --to=linville@tuxdriver.com \
    --cc=jgarzik@pobox.com \
    --cc=jhr@google.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;
as well as URLs for NNTP newsgroup(s).