linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] libata: replace ap->cbl tests with ATA_FLAG_SATA tests
@ 2007-05-21 16:33 Tejun Heo
  2007-05-21 16:58 ` Alan Cox
  2007-05-25  3:05 ` Jeff Garzik
  0 siblings, 2 replies; 3+ messages in thread
From: Tejun Heo @ 2007-05-21 16:33 UTC (permalink / raw)
  To: Jeff Garzik, IDE/ATA development list, Alan Cox

ap->cbl == ATA_CBL_SATA indicates SATA cable while ap->flags &
ATA_FLAG_SATA indicates SATA host port.  Till now they always gave the
same result but SATA/PATA bridge handling will change that.  Switch to
ATA_FLAG_SATA test if we're testing for host port type.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
---
 libata-core.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index d5939e6..da322d4 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -3364,7 +3364,7 @@ int ata_std_prereset(struct ata_port *ap
 		return 0;
 
 	/* if SATA, resume phy */
-	if (ap->cbl == ATA_CBL_SATA) {
+	if (ap->flags & ATA_FLAG_SATA) {
 		rc = sata_phy_resume(ap, timing, deadline);
 		/* whine about phy resume failure but proceed */
 		if (rc && rc != -EOPNOTSUPP)
@@ -5678,7 +5678,7 @@ irqreturn_t ata_interrupt (int irq, void
  */
 int sata_scr_valid(struct ata_port *ap)
 {
-	return ap->cbl == ATA_CBL_SATA && ap->ops->scr_read;
+	return (ap->flags & ATA_FLAG_SATA) && ap->ops->scr_read;
 }
 
 /**
@@ -6341,7 +6341,7 @@ int ata_host_register(struct ata_host *h
 		if (!ata_port_is_dummy(ap))
 			ata_port_printk(ap, KERN_INFO, "%cATA max %s cmd 0x%p "
 					"ctl 0x%p bmdma 0x%p irq %d\n",
-					ap->cbl == ATA_CBL_SATA ? 'S' : 'P',
+					(ap->flags & ATA_FLAG_SATA) ? 'S' : 'P',
 					ata_mode_string(xfer_mask),
 					ap->ioaddr.cmd_addr,
 					ap->ioaddr.ctl_addr,

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] libata: replace ap->cbl tests with ATA_FLAG_SATA tests
  2007-05-21 16:33 [PATCH] libata: replace ap->cbl tests with ATA_FLAG_SATA tests Tejun Heo
@ 2007-05-21 16:58 ` Alan Cox
  2007-05-25  3:05 ` Jeff Garzik
  1 sibling, 0 replies; 3+ messages in thread
From: Alan Cox @ 2007-05-21 16:58 UTC (permalink / raw)
  To: Tejun Heo; +Cc: Jeff Garzik, IDE/ATA development list

On Mon, 21 May 2007 18:33:47 +0200
Tejun Heo <htejun@gmail.com> wrote:

> ap->cbl == ATA_CBL_SATA indicates SATA cable while ap->flags &
> ATA_FLAG_SATA indicates SATA host port.  Till now they always gave the
> same result but SATA/PATA bridge handling will change that.  Switch to
> ATA_FLAG_SATA test if we're testing for host port type.
> 
> Signed-off-by: Tejun Heo <htejun@gmail.com>
> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>

Acked-by: Alan Cox <alan@redhat.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] libata: replace ap->cbl tests with ATA_FLAG_SATA tests
  2007-05-21 16:33 [PATCH] libata: replace ap->cbl tests with ATA_FLAG_SATA tests Tejun Heo
  2007-05-21 16:58 ` Alan Cox
@ 2007-05-25  3:05 ` Jeff Garzik
  1 sibling, 0 replies; 3+ messages in thread
From: Jeff Garzik @ 2007-05-25  3:05 UTC (permalink / raw)
  To: Tejun Heo; +Cc: IDE/ATA development list, Alan Cox

Tejun Heo wrote:
> ap->cbl == ATA_CBL_SATA indicates SATA cable while ap->flags &
> ATA_FLAG_SATA indicates SATA host port.  Till now they always gave the
> same result but SATA/PATA bridge handling will change that.  Switch to
> ATA_FLAG_SATA test if we're testing for host port type.
> 
> Signed-off-by: Tejun Heo <htejun@gmail.com>
> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
> ---
>  libata-core.c |    6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

applied



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-05-25  3:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-21 16:33 [PATCH] libata: replace ap->cbl tests with ATA_FLAG_SATA tests Tejun Heo
2007-05-21 16:58 ` Alan Cox
2007-05-25  3:05 ` Jeff Garzik

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).