Re: [PATCH v2 1/5] virtio: add functions for piecewise addition of buffers

2013-01-10 Thread Paolo Bonzini
Il 08/01/2013 01:12, Rusty Russell ha scritto: >>> Unfortunately, that cannot work because not all architectures support >>> chained scatterlists. >>> >> >>> >> WHAT? I can't figure out what an arch needs to do to support this? >> > >> > It needs to use the iterator functions in its DMA

[patch] [SCSI] bfa: fix strncpy() limiter in bfad_start_ops()

2013-01-10 Thread Dan Carpenter
The closing parenthesis is in the wrong place so it takes the sizeof a pointer instead of the sizeof the buffer minus one. Signed-off-by: Dan Carpenter diff --git a/drivers/scsi/bfa/bfad.c b/drivers/scsi/bfa/bfad.c index e6bf126..a5f7690 100644 --- a/drivers/scsi/bfa/bfad.c +++ b/drivers/scsi/bf

[PATCH v12 1/9] scsi: sr: support runtime pm

2013-01-10 Thread Aaron Lu
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 d

[PATCH v12 6/9] libata: expose pm qos flags for ata device

2013-01-10 Thread Aaron Lu
Expose pm qos flags to user space so that user has a chance to disable ZPODD feature, if he/she has a broken platform or devices or simply does not like this feature. This flag is exposed to user space only for ZPODD devices. Signed-off-by: Aaron Lu --- drivers/ata/libata-acpi.c | 3 +++ 1 file

[PATCH v12 9/9] scsi: remove can_power_off flag from scsi_device

2013-01-10 Thread Aaron Lu
Commit 166a2967b45ede2e2e56f3ede3cd32053dc17812 "libata: tell scsi layer device supports runtime power off" introduced the can_power_off flag for scsi_device and is used to support ZPODD implementation in SCSI layer. Since ZPODD is now implemented in ATA layer, that flag is no longer needed, so rem

[PATCH v12 5/9] libata: handle power transition of ODD

2013-01-10 Thread Aaron Lu
When ata port is runtime suspended, it will check if the ODD attched to it is a zero power(ZP) capable ODD and if the ZP capable ODD is in zero power ready state. And if this is not the case, the highest acpi state will be limited to ACPI_STATE_D3_HOT to avoid powering off the ODD. And if the ODD c

[PATCH v12 8/9] libata: do not suspend port if normal ODD is attached

2013-01-10 Thread Aaron Lu
For ODDs, the upper layer will poll for media change every few seconds, which will make it enter and leave suspend state very often. And as each suspend will also cause a hard/soft reset, the gain of runtime suspend is very little while the ODD may malfunction after constantly being reset. So the i

[PATCH v12 0/9] ZPODD Patches

2013-01-10 Thread Aaron Lu
v12: Suggestions by Tejun Heo: Fold patch 2 into patch 3; Do not use bitfields in zpodd structure; Call zpodd_exit in ata_scsi_remove_dev; Remove run_atapi_cmd, use ata_exec_internal directly; Use enum to return ODD loading mechanism type information; Added some comments. Typo fix: Fixed some mis-

[PATCH v12 2/9] libata: identify and init ZPODD devices

2013-01-10 Thread Aaron Lu
The ODD can be enabled for ZPODD if the following three conditions are satisfied: 1 The ODD supports device attention; 2 The platform can runtime power off the ODD through ACPI; 3 The ODD is either slot type or drawer type. For such ODDs, zpodd_init is called and a new structure is allocated for it

[PATCH v12 7/9] libata: scsi: no poll when ODD is powered off

2013-01-10 Thread Aaron Lu
When the ODD is powered off, any action the user did to the ODD that would generate a media event will trigger an ACPI interrupt, so the poll for media event is no longer necessary. And the poll will also cause a runtime status change, which will stop the ODD from staying in powered off state, so t

[PATCH v12 4/9] libata: check zero power ready status for ZPODD

2013-01-10 Thread Aaron Lu
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

[PATCH v12 3/9] libata: move acpi notification code to zpodd

2013-01-10 Thread Aaron Lu
Since the ata acpi notification code introduced in commit 3bd46600a7a7e938c54df8cdbac9910668c7dfb0 is solely for ZPODD, and we now have a dedicated place for it, move these code there. And the ata_acpi_add_pm_notifier code is changed a little bit in that it is now invoked when scsi device is not b

[PATCH 1/1] aacraid: 1024 max outstanding command support

2013-01-10 Thread Mahesh Rajashekhara
Hi James, This patch adds 1024 max outstanding command support for Series 7 and above controllers. Signed-off-by: Mahesh Rajashekhara --- drivers/scsi/aacraid/aacraid.h | 8 ++-- drivers/scsi/aacraid/comminit.c | 11 ++- 2 files changed, 16 insertions(+), 3 deletions(-) diff --g

Re: [PATCH v12 2/9] libata: identify and init ZPODD devices

2013-01-10 Thread Tejun Heo
On Thu, Jan 10, 2013 at 05:24:23PM +0800, Aaron Lu wrote: > The ODD can be enabled for ZPODD if the following three conditions are > satisfied: > 1 The ODD supports device attention; > 2 The platform can runtime power off the ODD through ACPI; > 3 The ODD is either slot type or drawer type. > For s

Re: [PATCH v12 3/9] libata: move acpi notification code to zpodd

2013-01-10 Thread Tejun Heo
On Thu, Jan 10, 2013 at 05:24:24PM +0800, Aaron Lu wrote: > Since the ata acpi notification code introduced in commit > 3bd46600a7a7e938c54df8cdbac9910668c7dfb0 is solely for ZPODD, and we > now have a dedicated place for it, move these code there. > > And the ata_acpi_add_pm_notifier code is chan

Re: [PATCH v12 4/9] libata: check zero power ready status for ZPODD

2013-01-10 Thread Tejun Heo
Hello, Aaron. On Thu, Jan 10, 2013 at 05:24:25PM +0800, Aaron Lu wrote: > +/* > + * Update the zpodd->zp_ready field. This field will only be set > + * if the ODD has stayed in ZP ready state for zpodd_poweroff_delay > + * time, and will be used to decide if power off is allowed. If it > + * is se

Re: [PATCH v12 5/9] libata: handle power transition of ODD

2013-01-10 Thread Tejun Heo
On Thu, Jan 10, 2013 at 05:24:26PM +0800, Aaron Lu wrote: > When ata port is runtime suspended, it will check if the ODD attched to > it is a zero power(ZP) capable ODD and if the ZP capable ODD is in zero > power ready state. And if this is not the case, the highest acpi state > will be limited to

Re: [PATCH v12 6/9] libata: expose pm qos flags for ata device

2013-01-10 Thread Tejun Heo
On Thu, Jan 10, 2013 at 05:24:27PM +0800, Aaron Lu wrote: > Expose pm qos flags to user space so that user has a chance to disable > ZPODD feature, if he/she has a broken platform or devices or simply does > not like this feature. > > This flag is exposed to user space only for ZPODD devices. > >

Re: [PATCH v12 7/9] libata: scsi: no poll when ODD is powered off

2013-01-10 Thread Tejun Heo
On Thu, Jan 10, 2013 at 05:24:28PM +0800, Aaron Lu wrote: > @@ -182,6 +182,13 @@ void zpodd_enable_run_wake(struct ata_device *dev) > { > struct zpodd *zpodd = dev->zpodd; > > + /* > + * Silence the media change poll, as we will be notified when > + * user wants to use the OD

Re: [PATCH v12 8/9] libata: do not suspend port if normal ODD is attached

2013-01-10 Thread Tejun Heo
On Thu, Jan 10, 2013 at 05:24:29PM +0800, Aaron Lu wrote: > For ODDs, the upper layer will poll for media change every few > seconds, which will make it enter and leave suspend state very > often. And as each suspend will also cause a hard/soft reset, > the gain of runtime suspend is very little wh

Re: [PATCH v12 4/9] libata: check zero power ready status for ZPODD

2013-01-10 Thread Aaron Lu
Hi Tejun, On Thu, Jan 10, 2013 at 11:52:31AM -0800, Tejun Heo wrote: > Hello, Aaron. > > On Thu, Jan 10, 2013 at 05:24:25PM +0800, Aaron Lu wrote: > > +/* > > + * Update the zpodd->zp_ready field. This field will only be set > > + * if the ODD has stayed in ZP ready state for zpodd_poweroff_delay

Re: [PATCH v12 7/9] libata: scsi: no poll when ODD is powered off

2013-01-10 Thread Aaron Lu
On Thu, Jan 10, 2013 at 11:56:10AM -0800, Tejun Heo wrote: > On Thu, Jan 10, 2013 at 05:24:28PM +0800, Aaron Lu wrote: > > @@ -182,6 +182,13 @@ void zpodd_enable_run_wake(struct ata_device *dev) > > { > > struct zpodd *zpodd = dev->zpodd; > > > > + /* > > +* Silence the media change po

Re: [PATCH v12 7/9] libata: scsi: no poll when ODD is powered off

2013-01-10 Thread Tejun Heo
Hello, Aaron. On Fri, Jan 11, 2013 at 10:11:10AM +0800, Aaron Lu wrote: > > What's the synchronization rule for this field? > > I documented the rule in include/scsi/scsi_device.h. > > This field is modified in the ata port's runtime suspend and resume > callback, and is read accessed in the che

Re: [PATCH v12 7/9] libata: scsi: no poll when ODD is powered off

2013-01-10 Thread Aaron Lu
Hi Tejun, On Thu, Jan 10, 2013 at 06:17:01PM -0800, Tejun Heo wrote: > Hello, Aaron. > > On Fri, Jan 11, 2013 at 10:11:10AM +0800, Aaron Lu wrote: > > > What's the synchronization rule for this field? > > > > I documented the rule in include/scsi/scsi_device.h. > > > > This field is modified in

Re: [PATCH 1/5] target: Don't let abort handling free pending write commands too soon

2013-01-10 Thread Nicholas A. Bellinger
On Wed, 2013-01-02 at 12:47 -0800, Roland Dreier wrote: > From: Roland Dreier > > The following sequence happens for write commands (or any other > commands with a data out phase): > > - The transport calls target_submit_cmd(), which sets CMD_T_ACTIVE in >cmd->transport_state and sets cmd->

Re: [PATCH 2/5] target: Fix use-after-free in LUN RESET handling

2013-01-10 Thread Nicholas A. Bellinger
On Wed, 2013-01-02 at 12:47 -0800, Roland Dreier wrote: > From: Roland Dreier > > If a backend IO takes a really long then an initiator might abort a > command, and then when it gives up on the abort, send a LUN reset too, > all before we process any of the original command or the abort. (The >

Re: [PATCH 3/5] target: Release se_cmd when LUN lookup fails for TMR

2013-01-10 Thread Nicholas A. Bellinger
On Wed, 2013-01-02 at 12:47 -0800, Roland Dreier wrote: > From: Roland Dreier > > When transport_lookup_tmr_lun() fails and we return a task management > response from target_complete_tmr_failure(), we need to call > transport_cmd_check_stop_to_fabric() to release the last ref to the > cmd after

Re: [PATCH 4/5] target: Remove useless if statement

2013-01-10 Thread Nicholas A. Bellinger
On Wed, 2013-01-02 at 12:48 -0800, Roland Dreier wrote: > From: Roland Dreier > > We do the same thing no matter which way the test goes, so just remove > the test and do what we're going to do. > > The debug messages printed the wrong value of CMD_T_ACTIVE and don't > seem particularly useful,

Re: [PATCH 5/5] target: Remove never-used TMR_FABRIC_TMR enum value

2013-01-10 Thread Nicholas A. Bellinger
On Wed, 2013-01-02 at 12:48 -0800, Roland Dreier wrote: > From: Roland Dreier > > Signed-off-by: Roland Dreier > --- > include/target/target_core_base.h | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/include/target/target_core_base.h > b/include/target/target_core_base.h > index 7cae

Re: [PATCH] iscsi-target: Fix CmdSN comparison (use cmd->cmd_sn instead of cmd->stat_sn)

2013-01-10 Thread Nicholas A. Bellinger
On Mon, 2013-01-07 at 11:45 -0800, Roland Dreier wrote: > From: Roland Dreier > > Commit 64c13330a389 ("iscsi-target: Fix bug in handling of ExpStatSN > ACK during u32 wrap-around") introduced a bug where we compare the > wrong SN against our ExpCmdSN. > > Reported-by: Ben Hutchings > Signed-of

Re: linux-next: build failure after merge of the scsi tree

2013-01-10 Thread James Bottomley
On Fri, 2013-01-11 at 12:03 +1100, Stephen Rothwell wrote: > Hi James, > > After merging the scsi tree, today's linux-next build (powerpc > ppc64_defconfig) failed like this: > > drivers/scsi/ipr.c:9138:22: error: expected '=', ',', ';', 'asm' or > '__attribute__' before 'ipr_enable_msix' > driv

[v2 PATCH 3/8] bnx2fc: support software fcoe target

2013-01-10 Thread Bhanu Prakash Gollapudi
James, Please pick up v2 version of patch 3 in the patch series. If you have already picked up the patches, please let me know so that I can create a new patch. Thanks. V2: incorrectly used bitwise 'or' instead of bitwise 'and' operation. Fixed it in this V2 patch. Software FCoE target always ad