public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <htejun@gmail.com>
To: su henry <henry.su.ati@gmail.com>
Cc: axboe@kernel.dk, linux-scsi@vger.kernel.org,
	James Bottomley <James.Bottomley@suse.de>
Subject: Re: [PATCH RFC] support sata odd zero power
Date: Mon, 28 Jun 2010 14:45:20 +0200	[thread overview]
Message-ID: <4C289960.2040900@gmail.com> (raw)
In-Reply-To: <AANLkTilaI2G9jOtb49gUboNYVh2AiWtnzU-Z0_MxVURt@mail.gmail.com>

Helo,

On 06/28/2010 12:42 PM, su henry wrote:
>> What prevents you from walking the acpi device tree from sr_probe()?
>> Or even if you need to walk it from sr_init(), you still need to store
>> the result and associate it with a specific cdrom device.  It is
>> something which is specific to single device.  You can't use single
>> global data structure for all devices like this.
> 
> In order to make sure we walk the name space one time only.
> 
> Because when the host starts the power supply to ODD, the driver will
> start from sr_probe. I think it unnecessary to walk the acpi name
> space when driver probes the device, so I  walk the acpi name space
> from sr_init.

I don't think it would matter at all whether you walk the ACPI tree
once during boot or on every sr_probe().  sr_probe() isn't exactly hot
path nor is ACPI tree walking a very expensive operation.  Even if it
is expensive, the right thing to do is to walk it in sr_init(), store
the result and _associate_ it with the appropriate device once the
device is probed.  It isn't a system global property.  It simply can't
live in a single global data structure shared by every device.  I
mean, what happens if there are multiple devices w/ ODDZ support?

>>> This is a problem, any suggestions? Especially when the system goes to
>>> S3/S4 state.
>>
>> Associate with specific device and using timer should work.
> 
> Considering the S3/S4 state, if we add a new timer for this, we should
> also add the suspend/resume callbacks for the driver, and modify the
> timer timeout(mod_timer) in the callback function.

I don't see why that would be necessary but if so, yeah, sure.

Thanks.

-- 
tejun

  reply	other threads:[~2010-06-28 12:45 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-25 10:15 [PATCH RFC] support sata odd zero power su henry
2010-06-25 13:39 ` Tejun Heo
2010-06-28  8:43   ` su henry
2010-06-28  9:04     ` Tejun Heo
2010-06-28 10:42       ` su henry
2010-06-28 12:45         ` Tejun Heo [this message]
2010-06-25 14:01 ` James Bottomley
2010-06-28  7:35   ` su henry
2010-06-28 13:42     ` James Bottomley
2010-06-29  1:26       ` su henry

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=4C289960.2040900@gmail.com \
    --to=htejun@gmail.com \
    --cc=James.Bottomley@suse.de \
    --cc=axboe@kernel.dk \
    --cc=henry.su.ati@gmail.com \
    --cc=linux-scsi@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