linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* ata_port->device[] question
@ 2005-11-15 21:33 Randy.Dunlap
  2005-11-16 15:13 ` Bartlomiej Zolnierkiewicz
  2005-11-16 15:16 ` Jeff Garzik
  0 siblings, 2 replies; 3+ messages in thread
From: Randy.Dunlap @ 2005-11-15 21:33 UTC (permalink / raw)
  To: jgarzik; +Cc: linux-ide


libata-core.c, around line 1299, says:

static inline u8 ata_dev_knobble(const struct ata_port *ap)
{
	return ((ap->cbl == ATA_CBL_SATA) && (!ata_id_is_sata(ap->device->id)));
}

That's the same as this: (right?)

	return ((ap->cbl == ATA_CBL_SATA) && (!ata_id_is_sata(ap->device[0]->id)));
	                                                                ~~~

and is this intentional?
I.e., always using device[0] for this bridge check?

Just curious.
thanks,
-- 
~Randy

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

* Re: ata_port->device[] question
  2005-11-15 21:33 ata_port->device[] question Randy.Dunlap
@ 2005-11-16 15:13 ` Bartlomiej Zolnierkiewicz
  2005-11-16 15:16 ` Jeff Garzik
  1 sibling, 0 replies; 3+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2005-11-16 15:13 UTC (permalink / raw)
  To: Randy.Dunlap; +Cc: jgarzik, linux-ide

On 11/15/05, Randy.Dunlap <rdunlap@xenotime.net> wrote:
>
> libata-core.c, around line 1299, says:
>
> static inline u8 ata_dev_knobble(const struct ata_port *ap)
> {
>         return ((ap->cbl == ATA_CBL_SATA) && (!ata_id_is_sata(ap->device->id)));
> }
>
> That's the same as this: (right?)
>
>         return ((ap->cbl == ATA_CBL_SATA) && (!ata_id_is_sata(ap->device[0]->id)));
>                                                                         ~~~
>
> and is this intentional?
> I.e., always using device[0] for this bridge check?

Yes, this is only valid for SATA (=> only primary device).

Bartlomiej

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

* Re: ata_port->device[] question
  2005-11-15 21:33 ata_port->device[] question Randy.Dunlap
  2005-11-16 15:13 ` Bartlomiej Zolnierkiewicz
@ 2005-11-16 15:16 ` Jeff Garzik
  1 sibling, 0 replies; 3+ messages in thread
From: Jeff Garzik @ 2005-11-16 15:16 UTC (permalink / raw)
  To: Randy.Dunlap; +Cc: linux-ide

Randy.Dunlap wrote:
> libata-core.c, around line 1299, says:
> 
> static inline u8 ata_dev_knobble(const struct ata_port *ap)
> {
> 	return ((ap->cbl == ATA_CBL_SATA) && (!ata_id_is_sata(ap->device->id)));
> }
> 
> That's the same as this: (right?)
> 
> 	return ((ap->cbl == ATA_CBL_SATA) && (!ata_id_is_sata(ap->device[0]->id)));
> 	                                                                ~~~
> 
> and is this intentional?
> I.e., always using device[0] for this bridge check?

really it should be ap->device[0].id if I'm not mistaken

	Jeff




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

end of thread, other threads:[~2005-11-16 15:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-15 21:33 ata_port->device[] question Randy.Dunlap
2005-11-16 15:13 ` Bartlomiej Zolnierkiewicz
2005-11-16 15:16 ` 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).