linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tejun Heo <htejun@gmail.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: "J.A. Magall?n" <jamagallon@ono.com>,
	"Linux-Kernel," <linux-kernel@vger.kernel.org>,
	linux-ide@vger.kernel.org, Jeff Garzik <jgarzik@pobox.com>,
	Andrew Morton <akpm@osdl.org>
Subject: Re: [2.6.18-rc2-mm1] libata ate one PATA channel
Date: Tue, 01 Aug 2006 03:52:11 +0900	[thread overview]
Message-ID: <44CE515B.1060302@gmail.com> (raw)
In-Reply-To: <1154371972.7230.95.camel@localhost.localdomain>

Hello,

Alan Cox wrote:
[--snip--]
>> I killed hard_port_no by s/ap->hard_port_no/ap->port_no/g without 
>> actually reviewing the usages (man, those are a LOT).  If all pata 
>> drivers always relied on ap->hard_port_no representing the actual port 
>> index in the controller, there shouldn't be a problem.  But, just in 
>> case, please review the change.
> 
> Think about the following execution sequence
> 
> ati_pci_init_one
> 	primary port already stolen by drivers/ide 
> 	secondary port free
> 
> 	legacy_mode = ATA_PORT_SECONDARY
> 	ata_pci_init_legacy_port
> 
> 	port_num = 0
> 	hard_port_num = 1
> 
> 	*kerunnccchhhhhh*

Ah... You're right.  That will make port_no different from the hw port#.

>> If this fixes Magallon's problem and you agree with the fix, I'll break 
>> it down to two patches and submit'em to you with proper heading and all.
> 
> I agree with the theory and the diagnosis. I'm a bit worried about
> hard_port_no however and I don't think that bit is safe in the secondary
> only corner case. Registering both always and disabling one works for me
> as a cleanup.
> 
> If you do that then I'll audit all the drivers use of ->port_no against
> the patches.

I like 'registering both always and disabling one' approach for 
partially stolen legacy devices.  We can make ->hard_port_no do the job 
as before, but IMHO it's error-prone and only useful for very limited 
cases (first legacy port stolen).

Jeff, what do you think?

-- 
tejun

  reply	other threads:[~2006-07-31 18:52 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-28 11:45 [2.6.18-rc2-mm1] libata ate one PATA channel J.A. Magallón
2006-07-30 19:53 ` Tejun Heo
2006-07-31 15:24   ` J.A. Magallón
2006-07-31 16:00     ` Tejun Heo
2006-07-31 16:31       ` Alan Cox
2006-07-31 16:50         ` Tejun Heo
2006-07-31 17:03           ` Tejun Heo
2006-07-31 18:52             ` Alan Cox
2006-07-31 18:52               ` Tejun Heo [this message]
2006-07-31 19:05                 ` Jeff Garzik
2006-07-31 18:38           ` Alan Cox
2006-07-31 21:41           ` J.A. Magallón
2006-08-01  6:22           ` Andrew Morton
2006-08-01  7:32             ` 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=44CE515B.1060302@gmail.com \
    --to=htejun@gmail.com \
    --cc=akpm@osdl.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=jamagallon@ono.com \
    --cc=jgarzik@pobox.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@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).