v8:
This version is a redesign, it doesn't have much to do with previous
versions. The ZPODD implementation is done almost entirely in ATA layer
now, except 2 helper functions from SCSI sr driver to block disk events.
The basic idea is that, when ata port is runtime suspended, it will
check if
This patch adds runtime pm support for sr.
It did this by increasing the runtime usage_count of the device when:
- its block device is opened;
- the events checking is to run.
And decreasing the runtime usage_count of the device when:
- its block device is closed;
- After the events checking is
Added a new config CONFIG_SATA_ZPODD, which is ued to support
SATA based zero power ODD. It depends on ACPI, and selects BLK_DEV_SR
as the implementation of ZPODD depends on SCSI sr driver.
2 new files are added, which will be used to host ZPODD related code.
They are empty for this commit.
If the ODD supports device attention and the platform can runtime
power off it through ACPI, it means this ODD together with this platform
is ZPODD capable. For this case, zpodd_init is called and a new
structure is allocated for the device to store ZPODD related stuffs.
And the zpodd_dev_enabled
Since the ata acpi notification code introduced in commit
3bd46600a7a7e938c54df8cdbac9910668c7dfb0 is solely for zero power ODD,
and we now have a dedicated place for ZPODD, move these code there.
And the add/remove_pm_notifier code is simplified a little bit that it
does not check things like if
ata_exec_internal will preempt the ata link's active_tag and ata port's
qc_active flags, this is OK for error recovery, but if normal code path
wants to use ata_exec_internal, there is a problem: we need to check if
it is OK to issue a new command with the help of port_ops-defer.
In ZPODD, I'll
The atapi_eh_tur and atapi_eh_request_sense can be reused by ZPODD
code, so separate them out to a file named libata-atapi.c. A header
file libata-atapi.h is added and the Makefile is modified accordingly.
Signed-off-by: Aaron Lu aaron...@intel.com
---
drivers/ata/Makefile | 2 +-
A new interface to block disk events is added, this interface is
meant to eliminate a race between PM runtime callback and disk events
checking.
Suppose the following device tree:
device_sata_port (the parent)
device_ODD (the child)
When ODD is runtime suspended, sata port will have a
Per the Mount Fuji spec on SATA ZPODD, only slot type or drawer type
ODD can support ZPODD. So add a function to check this, and if fails,
skip setting of dev-private_data so that zpodd_dev_enabled will return
false.
Signed-off-by: Aaron Lu aaron...@intel.com
---
drivers/ata/sata_zpodd.c | 87
Per the Mount Fuji spec, the ODD is considered zero power ready when:
- For slot type ODD, no media inside;
- For tray type ODD, no media inside and tray closed.
The information can be retrieved by either the returned information of
command GET_EVENT_STATUS_NOTIFICATION(the command is used to
The implementation of ZPODD aligns with runtime pm, which means the ODD
will only be runtime powered off after it is runtime suspended.
And each time in ata port's suspend callback, a check is made to see if
the ODD is ready to be powered off:
1 zp_ready is true;
2 events is successfully blocked.
2 interfaces are added to block/unblock events for the disk sr manages.
This is used by SATA ZPODD, when ODD is runtime powered off, the events
poll is no longer needed so better be blocked. And once powered on,
events poll will be unblocked.
These 2 interfaces are needed here because SATA layer
On Fri, 2012-09-21 at 11:28 +0200, Paul Bolle wrote:
Building the aic7xxx_old driver triggers these GCC warnings:
drivers/scsi/aic7xxx_old.c:7901:5: warning: case value '257' not in
enumerated type 'ahc_chip' [-Wswitch]
drivers/scsi/aic7xxx_old.c:7898:5: warning: case value '513' not
On Tue, 2012-09-25 at 14:07 +0200, Paul Bolle wrote:
Compiling aic94xx_sds.o (part of the aic94xx driver) triggers this GCC
warning:
drivers/scsi/aic94xx/aic94xx_sds.c: In function 'asd_read_flash':
drivers/scsi/aic94xx/aic94xx_sds.c:597:21: warning: 'offs' may be used
uninitialized
Hi,
In June, adam radford wrote:
On Thu, Jun 28, 2012 at 1:27 PM, Jonathan Nieder jrnie...@gmail.com wrote:
If someone makes a backport of the patches marked [3] as well, would
you be able to look over or test the combination? That would be much
appreciated. If that's not possible, your
On Mon, 2012-10-29 at 11:36 +0100, Paul Bolle wrote:
On Fri, 2012-09-21 at 11:28 +0200, Paul Bolle wrote:
Building the aic7xxx_old driver triggers these GCC warnings:
drivers/scsi/aic7xxx_old.c:7901:5: warning: case value '257' not in
enumerated type 'ahc_chip' [-Wswitch]
On Mon, 2012-10-29 at 12:17 +, James Bottomley wrote:
the aic7xxx_old driver is in deep maintenance; I don't think anyone can
actually test changes to it anymore, so we just keep it around unchanged
for the odd really old card that can't be driven by the current driver.
For this reason, we
On 10/28/12 19:01, Zhuang, Jin Can wrote:
I recently ran into the same issue
The test I did is plug/unplug u-disk in an interval of 1 second. And
I found when sdev1 is being removed, scsi_run_queue is triggered by
sdev2, which then accesses all the starving scsi device including sdev1.
I
On 10/29/12 02:52, Tejun Heo wrote:
On Sun, Oct 28, 2012 at 06:47:22PM -0700, Tejun Heo wrote:
On Fri, Oct 26, 2012 at 02:01:23PM +0200, Bart Van Assche wrote:
Code like drain |= q-nr_rqs[i] might result in blk_drain_queue()
to finish early if the expression at the RHS is a multiple of 256
On Mon, Oct 29, 2012 at 05:01:32PM +0800, Aaron Lu wrote:
ata_exec_internal will preempt the ata link's active_tag and ata port's
qc_active flags, this is OK for error recovery, but if normal code path
wants to use ata_exec_internal, there is a problem: we need to check if
it is OK to issue a
Hello,
On Mon, Oct 29, 2012 at 05:01:36PM +0800, Aaron Lu wrote:
ODD_suspenddisk_events_workfn
ata_port_suspend check_events
disk_block_events resume ODD
cancel_delayed_work_sync resume parent
(waiting for
On Sat, Oct 20, 2012 at 7:00 PM, Richard Weinberger rich...@nod.at wrote:
Hi!
I can reliably trigger the following warning by physically detaching my disk
array after
stopping md1.
---cut---
[ 149.780554] md: md1 stopped.
[ 149.780559] md: unbindsdh1
[ 149.782025] md:
On Mon, Oct 29, 2012 at 06:08:22PM +0100, richard -rw- weinberger wrote:
On Sat, Oct 20, 2012 at 7:00 PM, Richard Weinberger rich...@nod.at wrote:
Hi!
I can reliably trigger the following warning by physically detaching my disk
array after
stopping md1.
Does this show up in 3.7-rc3?
On Mon, 2012-10-29 at 17:01 +0800, Aaron Lu wrote:
Added a new config CONFIG_SATA_ZPODD, which is ued to support
SATA based zero power ODD. It depends on ACPI, and selects BLK_DEV_SR
as the implementation of ZPODD depends on SCSI sr driver.
2 new files are added, which will be used to host
On Mon, 2012-10-29 at 17:01 +0800, Aaron Lu wrote:
2 interfaces are added to block/unblock events for the disk sr manages.
This is used by SATA ZPODD, when ODD is runtime powered off, the events
poll is no longer needed so better be blocked. And once powered on,
events poll will be unblocked.
On Mon, 29 Oct 2012, James Bottomley wrote:
On Mon, 2012-10-29 at 17:01 +0800, Aaron Lu wrote:
2 interfaces are added to block/unblock events for the disk sr manages.
This is used by SATA ZPODD, when ODD is runtime powered off, the events
poll is no longer needed so better be blocked. And
Hello,
On Tue, Oct 30, 2012 at 11:00:16AM +0800, Aaron Lu wrote:
Why not do the discovery from EH?
Do you mean set a device level EH flag and then schedule EH to do the
discovery?
Yeah, something like that or why can't it be done while probing the
device in the first place?
Thanks.
--
On 10/30/2012 11:01 AM, Tejun Heo wrote:
Hello,
On Tue, Oct 30, 2012 at 11:00:16AM +0800, Aaron Lu wrote:
Why not do the discovery from EH?
Do you mean set a device level EH flag and then schedule EH to do the
discovery?
Yeah, something like that or why can't it be done while probing
On 10/30/2012 02:11 AM, James Bottomley wrote:
On Mon, 2012-10-29 at 17:01 +0800, Aaron Lu wrote:
Added a new config CONFIG_SATA_ZPODD, which is ued to support
SATA based zero power ODD. It depends on ACPI, and selects BLK_DEV_SR
as the implementation of ZPODD depends on SCSI sr driver.
2
John == John Washer johnkwas...@gmail.com writes:
John Provisioning mode is not being set to unmap even though it seems
John that device firmware provides all the required information to SD.
I instrumented scsi_debug to provide the same values as your device
(LBPME=1, identical Block Limits
On Mon, 2012-10-29 at 18:22 -0400, Alan Stern wrote:
On Mon, 29 Oct 2012, James Bottomley wrote:
On Mon, 2012-10-29 at 17:01 +0800, Aaron Lu wrote:
2 interfaces are added to block/unblock events for the disk sr manages.
This is used by SATA ZPODD, when ODD is runtime powered off, the
On 10/30/2012 02:11 AM, James Bottomley wrote:
On Mon, 2012-10-29 at 17:01 +0800, Aaron Lu wrote:
2 interfaces are added to block/unblock events for the disk sr manages.
This is used by SATA ZPODD, when ODD is runtime powered off, the events
poll is no longer needed so better be blocked. And
Hi Bart,
Yes. Here's the warning.
For the trace below, I used scsi_device_get/scsi_device_put() in
scsi_run_queue(). (A little different from your patch). But I think it's the
same.
10-23 18:15:53.309 8 8 I KERNEL : [ 268.994556] BUG: sleeping
function called from invalid context
33 matches
Mail list logo