All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@pobox.com>
To: Tejun Heo <htejun@gmail.com>
Cc: alan@lxorguk.ukuu.org.uk, lkml@rtr.ca, forrest.zhao@intel.com,
	linux-ide@vger.kernel.org
Subject: Re: [PATCH 03/17] libata-link: introduce ata_link
Date: Wed, 19 Jul 2006 16:26:57 -0400	[thread overview]
Message-ID: <44BE9591.5050201@pobox.com> (raw)
In-Reply-To: <11523375354124-git-send-email-htejun@gmail.com>

Tejun Heo wrote:
> @@ -496,6 +496,23 @@ struct ata_eh_context {
>  	unsigned int		did_probe_mask;
>  };
>  
> +struct ata_link {
> +	struct ata_port		*ap;
> +
> +	unsigned int		active_tag;	/* active tag on this link */
> +	u32			sactive;	/* active NCQ commands */
> +
> +	unsigned int		hw_sata_spd_limit;
> +	unsigned int		sata_spd_limit;
> +
> +	/* record runtime error info, protected by host_set lock */
> +	struct ata_eh_info	eh_info;
> +	/* EH context */
> +	struct ata_eh_context	eh_context;
> +
> +	struct ata_device	device[1];
> +};
> +
>  struct ata_port {
>  	struct Scsi_Host	*host;	/* our co-allocated scsi host */
>  	const struct ata_port_operations *ops;
> @@ -520,22 +537,13 @@ struct ata_port {
>  	unsigned int		mwdma_mask;
>  	unsigned int		udma_mask;
>  	unsigned int		cbl;	/* cable type; ATA_CBL_xxx */
> -	unsigned int		hw_sata_spd_limit;
> -	unsigned int		sata_spd_limit;	/* SATA PHY speed limit */
> -
> -	/* record runtime error info, protected by host_set lock */
> -	struct ata_eh_info	eh_info;
> -	/* EH context owned by EH */
> -	struct ata_eh_context	eh_context;
> -
> -	struct ata_device	device[ATA_MAX_DEVICES];
>  
>  	struct ata_queued_cmd	qcmd[ATA_MAX_QUEUE];
>  	unsigned long		qc_allocated;
>  	unsigned int		qc_active;
>  
> -	unsigned int		active_tag;
> -	u32			sactive;
> +	struct ata_link		link;	/* host default link */
> +	struct ata_device	__dev1;	/* storage for link.device[1] */

This storage mess for link.device[] is NAK'd.

This patch overall looks good, but it should really be entirely an 
equivalent-transformation patch, one that is easy to review and prove 
correct.

As such, this patch should move 'struct ata_device 
device[ATA_MAX_DEVICES]' into struct ata_link, rather than the strange 
arrangement you have above.  If you want to do something unusual like 
this, it's better to do it in a separate patch.

	Jeff



  reply	other threads:[~2006-07-19 20:27 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-08  5:45 [PATCHSET 1/3] implement ata_link, take 2 Tejun Heo
2006-07-08  5:45 ` [PATCH 03/17] libata-link: introduce ata_link Tejun Heo
2006-07-19 20:26   ` Jeff Garzik [this message]
2006-07-24  6:19     ` Tejun Heo
2006-07-08  5:45 ` [PATCH 02/17] libata-link: add PMP related ATA constants Tejun Heo
2006-07-19 20:24   ` Jeff Garzik
2006-07-08  5:45 ` [PATCH 01/17] libata-link: separate out ata_eh_handle_dev_fail() Tejun Heo
2006-07-08  5:45 ` [PATCH 08/17] libata-link: linkify config/EH related functions Tejun Heo
2006-07-08  5:45 ` [PATCH 06/17] libata-link: linkify EH action helpers Tejun Heo
2006-07-08  5:45 ` [PATCH 04/17] libata-link: implement and use link/device iterators Tejun Heo
2006-07-08  5:45 ` [PATCH 05/17] libata-link: linkify PHY-related functions Tejun Heo
2006-07-08  5:45 ` [PATCH 07/17] libata-link: linkify reset Tejun Heo
2006-07-08  5:45 ` [PATCH 11/17] libata-link: implement ata_link_abort() Tejun Heo
2006-07-08  5:45 ` [PATCH 12/17] libata-link: add PMP links Tejun Heo
2006-07-08  5:45 ` [PATCH 10/17] libata-link: implement link->reset_tries Tejun Heo
2006-07-08  5:45 ` [PATCH 09/17] libata-link: separate out link initialization functions Tejun Heo
2006-07-08  5:45 ` [PATCH 13/17] libata-link: update ata_scsi_error() to handle PMP links Tejun Heo
2006-07-08  5:45 ` [PATCH 17/17] libata-link: update Power Management " Tejun Heo
2006-07-19 20:29   ` Jeff Garzik
2006-07-08  5:45 ` [PATCH 15/17] libata-link: update EH to deal with " Tejun Heo
2006-07-08  5:45 ` [PATCH 14/17] libata-link: update ata_dev_configure() " Tejun Heo
2006-07-08  5:45 ` [PATCH 16/17] libata-link: update hotplug to handle " Tejun Heo

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=44BE9591.5050201@pobox.com \
    --to=jgarzik@pobox.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=forrest.zhao@intel.com \
    --cc=htejun@gmail.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=lkml@rtr.ca \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.