Re: [PATCH 39/51] DMA-API: others: use dma_set_coherent_mask()

2013-09-20 Thread Tejun Heo
On Fri, Sep 20, 2013 at 07:16:52AM -0500, Tejun Heo wrote: On Fri, Sep 20, 2013 at 12:11:38AM +0100, Russell King wrote: The correct way for a driver to specify the coherent DMA mask is not to directly access the field in the struct device, but to use dma_set_coherent_mask(). Only arch

Re: [PATCH 39/51] DMA-API: others: use dma_set_coherent_mask()

2013-09-20 Thread Tejun Heo
Hey, On Fri, Sep 20, 2013 at 03:00:18PM +0100, Russell King - ARM Linux wrote: Another would be if subsystem maintainers are happy that I carry them, I can add the acks, and then later on towards the end of the cycle, provide a branch subsystem maintainers could pull. Or... if you can think

Re: [RFC PATCH 2/2] ata: acpi: rework the ata acpi bind support

2013-08-22 Thread Tejun Heo
Hello, Aaron. On Thu, Aug 22, 2013 at 03:15:16PM +0800, Aaron Lu wrote: The patch series has two patches and the first has been taken, shall I send the 2nd one again without the RFC tag in the patch subject? There should be no other changes at the moment. Yes, that was a request for you to

Re: [RFC PATCH 2/2] ata: acpi: rework the ata acpi bind support

2013-08-14 Thread Tejun Heo
Hello, Aaron. On Thu, Aug 15, 2013 at 09:33:28AM +0800, Aaron Lu wrote: This has been quiet for some time, may I know your opinion on this? Ooh, I like it. I was waiting for proper patch series w/o RFC tag and hopefully some test results. Thanks. -- tejun -- To unsubscribe from this list:

Re: [PATCH RESEND 0/1] AHCI: Optimize interrupt processing

2013-08-09 Thread Tejun Heo
On Fri, Aug 09, 2013 at 10:23:35AM +0200, Alexander Gordeev wrote: On Mon, Jul 29, 2013 at 07:46:53AM -0400, Tejun Heo wrote: One thing which would probably be worthwhile tho is getting rid of the bitmap based qc tag allocator in libata. That one is just borderline stupid to keep around

Re: [PATCH RESEND 0/1] AHCI: Optimize interrupt processing

2013-07-31 Thread Tejun Heo
Hello, On Tue, Jul 30, 2013 at 09:16:02PM -0700, Marc C wrote: One thing which would probably be worthwhile tho is getting rid of the bitmap based qc tag allocator in libata. That one is just borderline stupid to keep around on any setup which is supposed to be scalable. Your border

Re: [PATCH RESEND 0/1] AHCI: Optimize interrupt processing

2013-07-29 Thread Tejun Heo
Hello, On Fri, Jul 26, 2013 at 02:14:36PM -0700, Nicholas A. Bellinger wrote: So I don't think (completely) getting rid of ata_port-qcmds[] will be possible, and just converting the ata_scsi_queuecmd() path to use the extra SHT-cmd_size pre-allocation for *ata_queued_cmd might end up being

Re: [PATCH RESEND 0/1] AHCI: Optimize interrupt processing

2013-07-29 Thread Tejun Heo
Yo, On Fri, Jul 26, 2013 at 05:43:13PM -0700, Nicholas A. Bellinger wrote: Considering there can be more than a single ata_device hanging off each ata_port, the '*sdev = ap-link.device[0].sdev' in __ata_qc_from_tag() is definitely bogus, but I'm not sure how else to correlate blk-mq/scsi-mq

Re: [RFC PATCH 1/2] ata: acpi: remove dead code for ata_acpi_(un)bind

2013-07-25 Thread Tejun Heo
On Thu, Jul 25, 2013 at 01:47:02PM +0800, Aaron Lu wrote: Commit 7381fe737 libata-acpi: remove redundent code for power resource handling removed ata_acpi_(un)bind but left their prototypes in libata.h, so remove them. Signed-off-by: Aaron Lu aaron...@intel.com Applied to libata/for-3.12.

Re: [RFC PATCH 2/2] ata: acpi: rework the ata acpi bind support

2013-07-25 Thread Tejun Heo
On Thu, Jul 25, 2013 at 01:47:03PM +0800, Aaron Lu wrote: Binding ACPI handle to SCSI device has several drawbacks, namely: 1 During ATA device initialization time, ACPI handle will be needed while SCSI devices are not created yet. So each time ACPI handle is needed, instead of retrieving

Re: [PATCH v3 2/4] lib/scatterlist: introduce sg_pcopy_from_buffer() and sg_pcopy_to_buffer()

2013-06-24 Thread Tejun Heo
...@gmail.com Cc: Tejun Heo t...@kernel.org Cc: Imre Deak imre.d...@intel.com Cc: Herbert Xu herb...@gondor.apana.org.au Cc: David S. Miller da...@davemloft.net Cc: linux-cry...@vger.kernel.org Cc: James E.J. Bottomley jbottom...@parallels.com Cc: Douglas Gilbert dgilb...@interlog.com Cc: linux-scsi

Re: [PATCH v2 1/4] lib/scatterlist: factor out sg_miter_get_next_page() from sg_miter_next()

2013-06-18 Thread Tejun Heo
On Tue, Jun 18, 2013 at 10:31:31PM +0900, Akinobu Mita wrote: This function is used to proceed page iterator to the next page if necessary, and will be used to implement the variants of sg_copy_{from,to}_buffer() later. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: Tejun Heo t

Re: [PATCH v2 2/4] lib/scatterlist: introduce sg_pcopy_from_buffer() and sg_pcopy_to_buffer()

2013-06-18 Thread Tejun Heo
On Tue, Jun 18, 2013 at 10:31:32PM +0900, Akinobu Mita wrote: /** + * sg_miter_seek - reposition mapping iterator + * @miter: sg mapping iter to be seeked + * @offset: number of bytes to plus the current location + * + * Description: + * Sets the offset of @miter to its current location

Re: [PATCH 1/3] lib/scatterlist: introduce sg_pcopy_from_buffer() and sg_pcopy_to_buffer()

2013-06-06 Thread Tejun Heo
Hello, On Thu, Jun 06, 2013 at 09:52:56PM +0900, Akinobu Mita wrote: +static bool sg_miter_get_next_page(struct sg_mapping_iter *miter) +{ + if (!miter-__remaining) { + struct scatterlist *sg; + unsigned long pgoffset; + + if

Re: [PATCH] ipr: qc_fill_rtf() method should not store alternate status register

2013-06-02 Thread Tejun Heo
On Sat, Jun 01, 2013 at 02:37:00AM +0400, Sergei Shtylyov wrote: Hello. On 05/31/2013 04:46 PM, Brian King wrote: The 'ctl' field of the 'struct ata_taskfile' is not really dual purpose, i.e. it is not intended for storing the alternate status register (which is mapped at the same

Re: PING^7 (was Re: [PATCH v2 00/14] Corrections and customization of the SG_IO command whitelist (CVE-2012-4542))

2013-05-25 Thread Tejun Heo
Hey, James. On Fri, May 24, 2013 at 09:35:02PM -0700, James Bottomley wrote: Well, I'd actually much prefer disabling CDB whitelisting for all !MMC devices if at all possible. I'll go along with this. I'm also wondering what the problem would be Don't think we can. It'd be a behavior

Re: PING^7 (was Re: [PATCH v2 00/14] Corrections and customization of the SG_IO command whitelist (CVE-2012-4542))

2013-05-25 Thread Tejun Heo
On Sat, May 25, 2013 at 01:14:37PM +0200, Paolo Bonzini wrote: Don't think we can. It'd be a behavior change clearly visible to userland at this point. We can (and even for MMC) if it is a build-time configuration knob. It would satisfy those people who want the CVE fixed, as long as

Re: PING^7 (was Re: [PATCH v2 00/14] Corrections and customization of the SG_IO command whitelist (CVE-2012-4542))

2013-05-24 Thread Tejun Heo
On Fri, May 24, 2013 at 4:13 PM, Paolo Bonzini pbonz...@redhat.com wrote: The same filtering table being applied to different classes of hardware is a software bug, but my point is that the practive essentially entrusts non-insignificant part of security enforcement to the hardware itself.

Re: PING^7 (was Re: [PATCH v2 00/14] Corrections and customization of the SG_IO command whitelist (CVE-2012-4542))

2013-05-24 Thread Tejun Heo
On Fri, May 24, 2013 at 5:31 PM, Paolo Bonzini pbonz...@redhat.com wrote: I agree intuition may not count, and it's perfectly possible that firmware writers forgot a break; or put the wrong location in a jump table, so that unimplemented commands give interesting results. It's not just

Re: PING^7 (was Re: [PATCH v2 00/14] Corrections and customization of the SG_IO command whitelist (CVE-2012-4542))

2013-05-24 Thread Tejun Heo
On Fri, May 24, 2013 at 11:45:33AM +0200, Paolo Bonzini wrote: It's not just unimplemented commands. Exposing any new command exposes its borderline problems together with it. For commands that are used by Linux already, the right way to fix the problems is not obscuring the commands from

Re: PING^7 (was Re: [PATCH v2 00/14] Corrections and customization of the SG_IO command whitelist (CVE-2012-4542))

2013-05-23 Thread Tejun Heo
On Thu, May 23, 2013 at 09:45:42AM +0200, Paolo Bonzini wrote: Il 23/05/2013 00:17, Tejun Heo ha scritto: Then let's make it fit the use case better. I really can't see much point in crafting the cdb filter when you basically have to entrust the device to the user anyway. Let's either

Re: PING^7 (was Re: [PATCH v2 00/14] Corrections and customization of the SG_IO command whitelist (CVE-2012-4542))

2013-05-23 Thread Tejun Heo
On Thu, May 23, 2013 at 11:47:25AM +0200, Paolo Bonzini wrote: No no, I'm not talking about it not working for the users - it's just passing the commands, it of course works. I'm doubting about it being a worthy security isolation layer. cdb filtering (of any form really) has always been

Re: PING^7 (was Re: [PATCH v2 00/14] Corrections and customization of the SG_IO command whitelist (CVE-2012-4542))

2013-05-22 Thread Tejun Heo
On Wed, May 22, 2013 at 08:35:54AM +0200, Paolo Bonzini wrote: I'm not sure what is more ridiculous, whether the seven pings or the lack of review... So, ummm, I don't know what Jens is thinking but at this point I'm basically waiting for someone else to pick it up as review to return ratio is

Re: PING^7 (was Re: [PATCH v2 00/14] Corrections and customization of the SG_IO command whitelist (CVE-2012-4542))

2013-05-22 Thread Tejun Heo
On Wed, May 22, 2013 at 12:23:56PM +0200, Paolo Bonzini wrote: Yes, because I have no idea what _your_ point is. Isolate the actual fixes and just submit them as it seems impossible for you to provide proper justifications for the things you want to add. -- tejun -- To unsubscribe from this

Re: PING^7 (was Re: [PATCH v2 00/14] Corrections and customization of the SG_IO command whitelist (CVE-2012-4542))

2013-05-22 Thread Tejun Heo
On Wed, May 22, 2013 at 04:12:04PM +0200, Paolo Bonzini wrote: Il 22/05/2013 15:41, Tejun Heo ha scritto: On Wed, May 22, 2013 at 12:23:56PM +0200, Paolo Bonzini wrote: Yes, because I have no idea what _your_ point is. Isolate the actual fixes and just submit them as it seems impossible

Re: PING^7 (was Re: [PATCH v2 00/14] Corrections and customization of the SG_IO command whitelist (CVE-2012-4542))

2013-05-22 Thread Tejun Heo
On Wed, May 22, 2013 at 05:00:52PM +0200, Paolo Bonzini wrote: Il 22/05/2013 16:30, Tejun Heo ha scritto: * Separate fixes from additions. Transform existing code so that the visible behavior doesn't change but the required fix can be implemented on top. Explicitly note what's going

Re: PING^7 (was Re: [PATCH v2 00/14] Corrections and customization of the SG_IO command whitelist (CVE-2012-4542))

2013-05-22 Thread Tejun Heo
Hey, On Wed, May 22, 2013 at 05:53:34PM +0200, Paolo Bonzini wrote: I do listen to review feedback, but I also expect the other side to listen to me, ask me what is not clear, and possess some knowledge of the domain that he's reviewing patches for. All of which, quite frankly, I have not

Re: PING^7 (was Re: [PATCH v2 00/14] Corrections and customization of the SG_IO command whitelist (CVE-2012-4542))

2013-05-22 Thread Tejun Heo
On Wed, May 22, 2013 at 11:18:05PM +0200, Paolo Bonzini wrote: Ok, so I can split it in 10 patches one per command, but at some point I wonder if it is overkill. For example, for disks: - WRITE AND VERIFY(16) is needed to support 2TB disks, and the corresponding 12-byte CDB is whitelisted

Re: PING^7 (was Re: [PATCH v2 00/14] Corrections and customization of the SG_IO command whitelist (CVE-2012-4542))

2013-05-22 Thread Tejun Heo
On Thu, May 23, 2013 at 07:17:37AM +0900, Tejun Heo wrote: No, it doesn't. You can use SCM_RIGHTS, and pass a file descriptor for the device node to an unprivileged program. You can choose the users/groups that are allowed to access the device. In either case, the privileged action

Re: [PATCH] Hard disk S3 resume time optimization

2013-05-16 Thread Tejun Heo
Hello, First of all, if at all possible, please try to fill the message to 80 columns, preferably a bit narrower than that. Most email clients can do it without you knowing. [The Problem] The vast majority of time spent in S3 resume is consumed by the ATA subsystem as it resumes the

Re: [PATCH] Hard disk S3 resume time optimization

2013-05-16 Thread Tejun Heo
On Thu, May 16, 2013 at 03:44:41PM -0700, Tejun Heo wrote: So, while I agree about the problem and the solution seems to be headed the right way of making SCSI suspend/resume asynchronous, what's going on with patch splitting, submission format and comments? Please read up on patch submission

[PATCH 60/77] scsi/bfa: convert to idr_alloc()

2013-02-06 Thread Tejun Heo
Convert to the much saner new idr interface. Only compile tested. Signed-off-by: Tejun Heo t...@kernel.org Cc: Krishna C Gudipati kgudi...@brocade.com Cc: linux-scsi@vger.kernel.org --- drivers/scsi/bfa/bfad_im.c | 15 --- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git

[PATCH 63/77] scsi/lpfc: convert to idr_alloc()

2013-02-06 Thread Tejun Heo
Convert to the much saner new idr interface. Only compile tested. Signed-off-by: Tejun Heo t...@kernel.org Cc: James Smart james.sm...@emulex.com Cc: linux-scsi@vger.kernel.org --- drivers/scsi/lpfc/lpfc_init.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git

[PATCH 62/77] target/iscsi: convert to idr_alloc()

2013-02-06 Thread Tejun Heo
Convert to the much saner new idr interface. Only compile tested. Signed-off-by: Tejun Heo t...@kernel.org Cc: Nicholas A. Bellinger n...@linux-iscsi.org Cc: linux-scsi@vger.kernel.org Cc: target-de...@vger.kernel.org --- drivers/target/iscsi/iscsi_target.c | 15 --- drivers

[PATCH 61/77] scsi: convert to idr_alloc()

2013-02-06 Thread Tejun Heo
Convert to the much saner new idr interface. Only compile tested. Signed-off-by: Tejun Heo t...@kernel.org Cc: James E.J. Bottomley james.bottom...@hansenpartnership.com Cc: linux-scsi@vger.kernel.org --- drivers/scsi/ch.c | 21 + drivers/scsi/sg.c | 43

[PATCH 45/62] scsi: convert to idr_alloc()

2013-02-02 Thread Tejun Heo
Convert to the much saner new idr interface. Only compile tested. Signed-off-by: Tejun Heo t...@kernel.org Cc: James E.J. Bottomley james.bottom...@hansenpartnership.com Cc: linux-scsi@vger.kernel.org --- This patch depends on an earlier idr changes and I think it would be best to route

[PATCH 46/62] target/iscsi: convert to idr_alloc()

2013-02-02 Thread Tejun Heo
Convert to the much saner new idr interface. Only compile tested. Signed-off-by: Tejun Heo t...@kernel.org Cc: Nicholas A. Bellinger n...@linux-iscsi.org Cc: linux-scsi@vger.kernel.org Cc: target-de...@vger.kernel.org --- This patch depends on an earlier idr changes and I think it would be best

[PATCH 47/62] scsi/lpfc: convert to idr_alloc()

2013-02-02 Thread Tejun Heo
Convert to the much saner new idr interface. Only compile tested. Signed-off-by: Tejun Heo t...@kernel.org Cc: James Smart james.sm...@emulex.com Cc: linux-scsi@vger.kernel.org --- This patch depends on an earlier idr changes and I think it would be best to route these together through -mm

[PATCH 44/62] scsi/bfa: convert to idr_alloc()

2013-02-02 Thread Tejun Heo
Convert to the much saner new idr interface. Only compile tested. Signed-off-by: Tejun Heo t...@kernel.org Cc: Krishna C Gudipati kgudi...@brocade.com Cc: linux-scsi@vger.kernel.org --- This patch depends on an earlier idr changes and I think it would be best to route these together through -mm

Re: [PATCH v14 1/3] scsi: sr: support runtime pm

2013-01-28 Thread Tejun Heo
Hey, Aaron. Thank *you* for the persistence. It was a pleasure to work with you. :) -- tejun -- To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v2 1/1] block: blk-merge: don't merge the pages with non-contiguous descriptors

2013-01-16 Thread Tejun Heo
On Wed, Jan 16, 2013 at 10:32:35AM +, James Bottomley wrote: diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c index 6b2fb87..ab88c5b 100644 --- a/arch/arm/mm/dma-mapping.c +++ b/arch/arm/mm/dma-mapping.c @@ -809,7 +809,7 @@ static void dma_cache_maint_page(struct page

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

2013-01-11 Thread Tejun Heo
Hello, On Fri, Jan 11, 2013 at 11:16:26AM +0800, Aaron Lu wrote: OK, will make it atomic in next version, thanks for the advice. Perhaps I can add two scsi helper functions in scsi_lib.c like: void sdev_disable_disk_events(struct scsi_device *sdev) {

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

2013-01-10 Thread Tejun Heo
aaron...@intel.com Acked-by: Tejun Heo t...@kernel.org Thanks. -- tejun -- To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

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

2013-01-10 Thread Tejun Heo
or not as the odd_can_poweroff function already checked that. Signed-off-by: Aaron Lu aaron...@intel.com Acked-by: Tejun Heo t...@kernel.org Thanks. -- tejun -- To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to majord...@vger.kernel.org More

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 set, it

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

2013-01-10 Thread Tejun Heo
-by: Tejun Heo t...@kernel.org -- tejun -- To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

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

2013-01-10 Thread Tejun Heo
. Signed-off-by: Aaron Lu aaron...@intel.com Acked-by: Tejun Heo t...@kernel.org Thanks. -- tejun -- To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

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 ODD so

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

2013-01-10 Thread Tejun Heo
the ODD may malfunction after constantly being reset. So the idle callback here will not proceed to suspend if a non-ZPODD capable ODD is attached to the port. Signed-off-by: Aaron Lu aaron...@intel.com Acked-by: Tejun Heo t...@kernel.org Thanks. -- tejun -- To unsubscribe from this list

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

Re: [PATCH v11 3/9] libata: identify and init ZPODD devices

2013-01-08 Thread Tejun Heo
Hello, Aaron. On Tue, Jan 08, 2013 at 05:07:46PM +0800, Aaron Lu wrote: +struct zpodd { + bool slot:1; + bool drawer:1; + + struct ata_device *dev; +}; Field names are usually indented. It would be nice to have a comment checkscript.sh doesn't seem like this if I put a tab

Re: [PATCH v11 2/9] libata: Add CONFIG_SATA_ZPODD

2013-01-07 Thread Tejun Heo
On Sun, Jan 06, 2013 at 10:48:22AM +0800, Aaron Lu wrote: Added a new config CONFIG_SATA_ZPODD, which is used to support SATA based zero power ODD(ZPODD), and depends on ATA_ACPI. Signed-off-by: Aaron Lu aaron...@intel.com Maybe just fold this into the next patch? It's rather unconventional

Re: [PATCH v11 3/9] libata: identify and init ZPODD devices

2013-01-07 Thread Tejun Heo
On Sun, Jan 06, 2013 at 10:48:23AM +0800, Aaron Lu wrote: diff --git a/drivers/ata/libata-acpi.c b/drivers/ata/libata-acpi.c index ef01ac0..5aa7322 100644 --- a/drivers/ata/libata-acpi.c +++ b/drivers/ata/libata-acpi.c @@ -1063,6 +1063,8 @@ void ata_acpi_bind(struct ata_device *dev) void

Re: [PATCH v11 4/9] libata: move acpi notification code to zpodd

2013-01-07 Thread Tejun Heo
On Sun, Jan 06, 2013 at 10:48:24AM +0800, Aaron Lu wrote: @@ -7,6 +9,9 @@ struct zpodd { bool slot:1; bool drawer:1; + /* The following bits are synchronized by PM core */ + bool from_notify:1; /* resumed as a result of acpi notification */ + struct ata_device

Re: [PATCH v11 5/9] libata: check zero power ready status for ZPODD

2013-01-07 Thread Tejun Heo
Hello, Aaron. On Sun, Jan 06, 2013 at 10:48:25AM +0800, Aaron Lu wrote: +/* Check zero power ready status */ +void zpodd_on_suspend(struct ata_device *dev) +{ + struct zpodd *zpodd = dev-zpodd; + unsigned long expires; + + if (!zpready(dev)) { + zpodd-zp_ready =

Re: [PATCH v11 7/9] libata: expose pm qos flags for ata device

2013-01-07 Thread Tejun Heo
On Sun, Jan 06, 2013 at 10:48:27AM +0800, Aaron Lu wrote: Expose pm qos flags to user space so that user has a chance to disable pm features like power off, if he/she has a broken platform or devices or simply does not like this pm feature. This flag is exposed to user space only for ata

Re: [PATCH v11 8/9] libata: no poll when ODD is powered off

2013-01-07 Thread Tejun Heo
On Sun, Jan 06, 2013 at 10:48:28AM +0800, Aaron Lu wrote: 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,

Re: [PATCH v11 6/9] libata: handle power transition of ODD

2013-01-07 Thread Tejun Heo
On Sun, Jan 06, 2013 at 10:48:26AM +0800, Aaron Lu wrote: +bool zpodd_zpready(struct ata_device *dev) +{ + struct zpodd *zpodd = dev-zpodd; + return zpodd-zp_ready; +} + +void zpodd_pre_poweroff(struct ata_device *dev) +{ + struct zpodd *zpodd = dev-zpodd; + +

Re: [PATCH v9 06/10] ata: zpodd: check zero power ready status

2012-12-28 Thread Tejun Heo
Hello, On Wed, Dec 26, 2012 at 09:42:14AM +0800, Aaron Lu wrote: This is really a round-about way to find out the matching device and it wouldn't work if the disk device nests deeper. Doesn't really look like a good idea to me. I don't quite understand the 'disk device nests deeper'

Re: [PATCH v9 06/10] ata: zpodd: check zero power ready status

2012-12-25 Thread Tejun Heo
Hello, Aaron. On Thu, Dec 20, 2012 at 02:07:25PM +0800, Aaron Lu wrote: +static int is_gendisk_part0(struct device *dev, void *data) +{ + struct device **child = data; + + if (dev-class == block_class dev-type == disk_type) { + *child = dev; + return 1; +

Re: [PATCH] megaraid: convert to work_struct

2012-12-18 Thread Tejun Heo
On Thu, Dec 13, 2012 at 04:53:18PM +0800, Xiaotian Feng wrote: There's no need to use delayed work, convert to use work_struct and cancel_work_sync(). Requested-by: Tejun Heo t...@kernel.org Signed-off-by: Xiaotian Feng dannyf...@tencent.com Cc: Neela Syam Kolli megaraidli...@lsi.com Cc

Re: [PATCH v9 06/10] ata: zpodd: check zero power ready status

2012-12-10 Thread Tejun Heo
Hello, guys. On Mon, Dec 10, 2012 at 11:26:07AM +0800, Aaron Lu wrote: The problem here is there's no easy to reach genhd from libata (or the other way around) without going through sr. I think we're gonna have to have something in sr one way or the other. Can't we do that via an

Re: [PATCH] megaraid: fix use of delayed work

2012-12-04 Thread Tejun Heo
by others. With commit 8852aac, schedule_delayed_work() will check dwork-timer before queue_work, this will cause megaraid code to hit the BUG_ON in workqueue code. Change megaraid code to use delayed work. Signed-off-by: Xiaotian Feng dannyf...@tencent.com Cc: Tejun Heo t...@kernel.org

[PATCH 1/2] megaraid: fix BUG_ON() from incorrect use of delayed work

2012-12-04 Thread Tejun Heo
to hit the BUG_ON() in workqueue code. Change megaraid code to use delayed work. Signed-off-by: Xiaotian Feng dannyf...@tencent.com Signed-off-by: Tejun Heo t...@kernel.org Cc: Neela Syam Kolli megaraidli...@lsi.com Cc: James E.J. Bottomley jbottom...@parallels.com Cc: linux-scsi@vger.kernel.org

[PATCH 2/2] workqueue: convert BUG_ON()s in __queue_delayed_work() to WARN_ON_ONCE()s

2012-12-04 Thread Tejun Heo
From 87aa1e796ff6d491b5ed4e5663e5a4e449ac513b Mon Sep 17 00:00:00 2001 From: Tejun Heo t...@kernel.org Date: Tue, 4 Dec 2012 07:40:39 -0800 8852aac25e (workqueue: mod_delayed_work_on() shouldn't queue timer on 0 delay) unexpectedly uncovered a very nasty abuse of delayed_work in megaraid

Re: [PATCH] megaraid: fix use of delayed work

2012-12-04 Thread Tejun Heo
Hello, again, Xiaotian. On Tue, Dec 04, 2012 at 07:39:39AM -0800, Tejun Heo wrote: Urgh... what the Didn't see that one coming. I'm gonna push this to Linus through the workqueue tree. Thanks for the fix. It seems like megaraid doesn't have any reason to use delayed_work at all

[GIT PULL] workqueue fixes for 3.7-rc8

2012-12-04 Thread Tejun Heo
Tejun Heo (1): workqueue: convert BUG_ON()s in __queue_delayed_work() to WARN_ON_ONCE()s Xiaotian Feng (1): megaraid: fix BUG_ON() from incorrect use of delayed work drivers/scsi/megaraid/megaraid_sas.h | 2 +- drivers/scsi/megaraid/megaraid_sas_base.c

Re: [PATCH v9 06/10] ata: zpodd: check zero power ready status

2012-12-03 Thread Tejun Heo
Hello, James. On Mon, Dec 03, 2012 at 08:25:43AM +, James Bottomley wrote: diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index e65c62e..1756151 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h @@ -160,6 +160,7 @@ struct scsi_device {

Re: [PATCH v6 10/13] Make scsi_remove_host() wait for device removal

2012-12-03 Thread Tejun Heo
Hello, Bart. On Mon, Dec 03, 2012 at 05:38:52PM +0100, Bart Van Assche wrote: It is indeed possible to invoke complete() only if the device list became empty with the host state equal to SHOST_CANCEL, SHOST_CANCEL_RECOVERY, SHOST_DEL or SHOST_DEL_RECOVERY and in We can test this with

Re: [PATCH v6 03/13] block: Avoid that request_fn is invoked on a dead queue

2012-12-02 Thread Tejun Heo
-by: Bart Van Assche bvanass...@acm.org Cc: James Bottomley jbottom...@parallels.com Cc: Mike Christie micha...@cs.wisc.edu Cc: Jens Axboe ax...@kernel.dk Cc: Tejun Heo t...@kernel.org Cc: Chanho Min chanho@lge.com Acked-by: Tejun Heo t...@kernel.org +inline void __blk_run_queue_uncond

Re: [PATCH v6 04/13] block: Avoid scheduling delayed work on a dead queue

2012-12-02 Thread Tejun Heo
it is now superfluous: __blk_run_queue() already tests whether or not the queue is dead. Signed-off-by: Bart Van Assche bvanass...@acm.org Cc: Tejun Heo t...@kernel.org Cc: Mike Christie micha...@cs.wisc.edu Cc: Jens Axboe ax...@kernel.dk Acked-by: Tejun Heo t...@kernel.org But, some nits

Re: [PATCH v6 08/13] Remove get_device() / put_device() pair from scsi_request_fn()

2012-12-02 Thread Tejun Heo
() / put_device() pair from scsi_request_fn(). Signed-off-by: Bart Van Assche bvanass...@acm.org Acked-by: Tejun Heo t...@kernel.org Cc: James Bottomley jbottom...@parallels.com Cc: Mike Christie micha...@cs.wisc.edu Cc: Jens Axboe ax...@kernel.dk Acked-by: Tejun Heo t...@kernel.org with one nit

Re: [PATCH v6 09/13] Avoid saving/restoring interrupt state inside scsi_remove_host()

2012-12-02 Thread Tejun Heo
jbottom...@parallels.com Cc: Tejun Heo t...@kernel.org Cc: Mike Christie micha...@cs.wisc.edu Cc: Hannes Reinecke h...@suse.de Acked-by: Tejun Heo t...@kernel.org It would be nice to note that this doesn't make any functional difference in the commit message. Thanks. -- tejun -- To unsubscribe

Re: [PATCH v6 10/13] Make scsi_remove_host() wait for device removal

2012-12-02 Thread Tejun Heo
with the host has finished. That avoids that queuecommand() gets invoked after scsi_remove_host() finished. Also, avoid adding new SCSI devices after scsi_remove_host() started. Signed-off-by: Bart Van Assche bvanass...@acm.org Cc: Tejun Heo t...@kernel.org Cc: James Bottomley jbottom

Re: [PATCH v6 10/13] Make scsi_remove_host() wait for device removal

2012-12-02 Thread Tejun Heo
Hey, again. On Sun, Dec 02, 2012 at 05:45:15AM -0800, Tejun Heo wrote: +/* Return true if and only if scsi_remove_host() is allowed to finish. */ +static bool __scsi_remove_host_done(struct Scsi_Host *shost) +{ + lockdep_assert_held(shost-host_lock); + + return list_empty(shost

Re: [PATCH v6 11/13] Make scsi_remove_host() wait until error handling finished

2012-12-02 Thread Tejun Heo
Hello, Bart. On Wed, Nov 28, 2012 at 01:52:51PM +0100, Bart Van Assche wrote: A SCSI LLD may start cleaning up host resources as soon as scsi_remove_host() returns. These host resources may be needed by the LLD in an implementation of one of the eh_* functions. So if one of the eh_* functions

Re: [PATCH v6 12/13] Avoid that scsi_device_set_state() triggers a race

2012-12-02 Thread Tejun Heo
On Wed, Nov 28, 2012 at 01:53:24PM +0100, Bart Van Assche wrote: Make concurrent invocations of scsi_device_set_state() safe. Signed-off-by: Bart Van Assche bvanass...@acm.org Cc: James Bottomley jbottom...@parallels.com Cc: Tejun Heo t...@kernel.org Cc: Hannes Reinecke h...@suse.de Cc

Re: [PATCH v6 13/13] Do not queue new I/O after scsi_remove_host() started

2012-12-02 Thread Tejun Heo
Hello, On Wed, Nov 28, 2012 at 01:53:58PM +0100, Bart Van Assche wrote: The function scsi_remove_host() may get invoked concurrently with scsi_request_fn(). Kill those I/O requests for which processing starts after scsi_remove_host() has been invoked. This makes device removal a little

Re: [PATCH v6 04/13] block: Avoid scheduling delayed work on a dead queue

2012-12-02 Thread Tejun Heo
Hello, Bart. On Sun, Dec 02, 2012 at 02:41:20PM +0100, Bart Van Assche wrote: I agree. There is a reason though I have not yet added a lockdep_assert_held() statement in these functions: there are still unprotected calls of blk_run_queue_async() in drivers/md/dm.c and

Re: [PATCH 0/13 v6] More device removal fixes

2012-12-02 Thread Tejun Heo
Hello, Bart. On Wed, Nov 28, 2012 at 01:39:53PM +0100, Bart Van Assche wrote: Fix a few race conditions that can be triggered by removing a device: - Avoid that request_fn() can be invoked on a dead queue. - Avoid that blk_cleanup_queue() can finish while request_fn is still running. - Fix

Re: [PATCH v9 06/10] ata: zpodd: check zero power ready status

2012-11-27 Thread Tejun Heo
Hey, Rafael. On Wed, Nov 28, 2012 at 01:51:00AM +0100, Rafael J. Wysocki wrote: Having considered that a bit more I'm now thinking that in fact the power state the device is in at the moment doesn't really matter, so the polling code need not really know what PM is doing. What it needs to

Re: [PATCH v9 07/10] block: add a new interface to block events

2012-11-19 Thread Tejun Heo
On Sun, Nov 18, 2012 at 09:07:22PM -0500, Alan Stern wrote: Hey... Hey, again. :P So, at least for SATA, I think what autopm can do is... * Trigger zpodd if possible. * Trigger suspend iff polling isn't happening on the device. That sums it up nicely. Of course, the PM core is

Re: [PATCH v9 05/10] libata: separate ATAPI code

2012-11-19 Thread Tejun Heo
On Mon, Nov 19, 2012 at 10:21:15AM +0800, Aaron Lu wrote: My thought is that, the 2 functions are for ATAPI and can be used by libata-eh, libata-zpodd and maybe others in the future, so it deserves a separate place. But if this is regarded as unnecessary, I will drop this patch. Yeah, please

Re: [PATCH v9 06/10] ata: zpodd: check zero power ready status

2012-11-19 Thread Tejun Heo
Hey, Aaron. On Mon, Nov 19, 2012 at 11:09:40AM +0800, Aaron Lu wrote: What I'm confused about is what autopm does for devices w/o zpodd. What happens then? Is it gonna leave power on for the device and, say, go on to suspend the controller? But, how would that work for, say, future

Re: [PATCH v9 03/10] ata: zpodd: identify and init ZPODD devices

2012-11-18 Thread Tejun Heo
Hello, Aaron. On Wed, Nov 14, 2012 at 09:32:27AM +0800, Aaron Lu wrote: I don't think you're supposed to use dev-private_data from libata core layer. Just add a new field. Nobody cares about adding 8 more bytes to struct ata_device and spending 8 more bytes is way better than muddying

Re: [PATCH v9 06/10] ata: zpodd: check zero power ready status

2012-11-18 Thread Tejun Heo
Hello, Aaron. On Wed, Nov 14, 2012 at 10:18:23AM +0800, Aaron Lu wrote: On 11/13/2012 03:13 AM, Tejun Heo wrote: Hello, On Fri, Nov 09, 2012 at 02:51:58PM +0800, Aaron Lu wrote: +#define POWEROFF_DELAY (30 * 1000) /* 30 seconds for power off delay */ + struct zpodd

Re: [PATCH v9 05/10] libata: separate ATAPI code

2012-11-18 Thread Tejun Heo
On Tue, Nov 13, 2012 at 08:49:24PM +0800, Aaron Lu wrote: On Mon, Nov 12, 2012 at 10:57:10AM -0800, Tejun Heo wrote: On Fri, Nov 09, 2012 at 02:51:57PM +0800, Aaron Lu wrote: The atapi_eh_tur and atapi_eh_request_sense can be reused by ZPODD code, so separate them out to a file named

Re: [PATCH v9 07/10] block: add a new interface to block events

2012-11-18 Thread Tejun Heo
Hello, Alan. On Mon, Nov 12, 2012 at 02:34:01PM -0500, Alan Stern wrote: It wouldn't do anything for the device, but it would allow the device's parent to go to low power in between polls. That's why Aaron at one point suggested lengthening the polling interval. Ah, okay. Entering and

Re: [PATCH v9 07/10] block: add a new interface to block events

2012-11-18 Thread Tejun Heo
Hello, Alan. On Sun, Nov 18, 2012 at 12:41:06PM -0500, Alan Stern wrote: If so (I can't see how else it would behave), it may not really work. I mean, you would be spending about ten seconds reinitiaizing everything and then enter sleep and do it all over again two seconds later, most

Re: [PATCH v9 07/10] block: add a new interface to block events

2012-11-18 Thread Tejun Heo
On Sun, Nov 18, 2012 at 01:56:57PM -0800, Tejun Heo wrote: I think the only reason autopm doesn't blow up for SATA devices is that userland usually automatically mounts them thus effectively disabling autopm. I *think* the only sane thing we can do is doing autopm iff zpodd is available

Re: [PATCH v9 07/10] block: add a new interface to block events

2012-11-18 Thread Tejun Heo
Hey, Alan. On Sun, Nov 18, 2012 at 06:28:24PM -0500, Alan Stern wrote: The problem is that SATA devices aren't really designed to be used like that. If you reset a ODD w/ a media in it, it'll probably spin it up and try to re-establish media state during probe sequence. It isn't

Re: [PATCH v3 1/2] sg_io: pass request_queue to blk_verify_command

2012-11-13 Thread Tejun Heo
...@hansenpartnership.com Cc: Jens Axboe ax...@kernel.dk Cc: Ric Wheeler rwhee...@redhat.com Cc: Tejun Heo t...@kernel.org Signed-off-by: Paolo Bonzini pbonz...@redhat.com Acked-by: Tejun Heo t...@kernel.org Thanks. -- tejun -- To unsubscribe from this list: send the line unsubscribe linux-scsi in the body

Re: [PATCH v3 2/2] sg_io: introduce unpriv_sgio queue flag

2012-11-13 Thread Tejun Heo
james.bottom...@hansenpartnership.com Cc: Jens Axboe ax...@kernel.dk Cc: Ric Wheeler rwhee...@redhat.com Cc: Tejun Heo t...@kernel.org Signed-off-by: Paolo Bonzini pbonz...@redhat.com Acked-by: Tejun Heo t...@kernel.org Thanks. -- tejun -- To unsubscribe from this list: send the line

Re: [PATCH v9 03/10] ata: zpodd: identify and init ZPODD devices

2012-11-12 Thread Tejun Heo
Hello, On Fri, Nov 09, 2012 at 02:51:55PM +0800, Aaron Lu wrote: void ata_acpi_unbind(struct ata_device *dev) { + if (zpodd_dev_enabled(dev)) + zpodd_deinit(dev); Maybe zpodd_exit() instead? +void zpodd_init(struct ata_device *dev) +{ + int ret; + struct zpodd

Re: [PATCH v9 04/10] libata: acpi: move acpi notification code to zpodd

2012-11-12 Thread Tejun Heo
On Fri, Nov 09, 2012 at 02:51:56PM +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 add/remove_pm_notifier code is simplified

Re: [PATCH v9 05/10] libata: separate ATAPI code

2012-11-12 Thread Tejun Heo
On Fri, Nov 09, 2012 at 02:51:57PM +0800, Aaron Lu wrote: 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, and the Makefile is modified accordingly. No functional changes should result from this commit. Why is this

Re: [PATCH v9 06/10] ata: zpodd: check zero power ready status

2012-11-12 Thread Tejun Heo
Hello, On Fri, Nov 09, 2012 at 02:51:58PM +0800, Aaron Lu wrote: @@ -784,7 +784,13 @@ static int ata_acpi_push_id(struct ata_device *dev) */ int ata_acpi_on_suspend(struct ata_port *ap) { - /* nada */ + struct ata_device *dev; + + ata_for_each_dev(dev, ap-link, ENABLED) {

Re: [PATCH v9 07/10] block: add a new interface to block events

2012-11-12 Thread Tejun Heo
On Fri, Nov 09, 2012 at 02:51:59PM +0800, Aaron Lu wrote: 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

Re: [PATCH v9 07/10] block: add a new interface to block events

2012-11-12 Thread Tejun Heo
Hello, Alan. On Mon, Nov 12, 2012 at 02:18:11PM -0500, Alan Stern wrote: Weren't you gonna do something different about this? I mean, if sr knows that autopm kicked in, it can simply tell the block layer that nothing is going on. Wouldn't that be simpler? It wouldn't work for non-ZP

Re: [PATCH v8 05/11] libata-eh: allow defer in ata_exec_internal

2012-11-01 Thread Tejun Heo
Hello, Aaron. On Thu, Nov 01, 2012 at 10:35:10AM +0800, Aaron Lu wrote: You can always add some fields. :) OK. My concern is that, such information is only useful to ZPODD capable device+platforms, so checking this loading mechanism thing for all ATAPI devices during probe time doesn't

<    1   2   3   4   5   6   7   >