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 pag

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

[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 Cc: "James E.J. Bottomley" 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. Please holler if t

[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 Cc: Nicholas A. Bellinger 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 to route these together through -mm

[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 Cc: James Smart 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. Please holler if there's any obje

[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 Cc: Krishna C Gudipati 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. Please holler if there'

[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 Cc: Krishna C Gudipati Cc: linux-scsi@vger.kernel.org --- drivers/scsi/bfa/bfad_im.c | 15 --- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/drivers/scsi/bfa/bfad_im.c b

[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 Cc: James Smart Cc: linux-scsi@vger.kernel.org --- drivers/scsi/lpfc/lpfc_init.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers

[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 Cc: Nicholas A. Bellinger Cc: linux-scsi@vger.kernel.org Cc: target-de...@vger.kernel.org --- drivers/target/iscsi/iscsi_target.c | 15 --- drivers/target/iscsi/iscsi_target_login.c

[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 Cc: "James E.J. Bottomley" Cc: linux-scsi@vger.kernel.org --- drivers/scsi/ch.c | 21 + drivers/scsi/sg.c | 43 +-- drivers/scsi

Re: [PATCH 1/2] block: Avoid invoking blk_run_queue() recursively

2013-02-22 Thread Tejun Heo
r later before returning > from their request_fn() implementation. > > Signed-off-by: Bart Van Assche > Cc: Jens Axboe > Cc: Tejun Heo > Cc: James Bottomley > Cc: Alasdair G Kergon > Cc: Mike Snitzer > Cc: > --- > block/blk-core.c | 21 +

Re: [PATCH 5/7] ahci: Convert driver to use modern PM hooks

2016-02-18 Thread Tejun Heo
On Thu, Feb 18, 2016 at 12:45:05PM +0200, Andy Shevchenko wrote: > > + .driver.pm = &ahci_pci_pm_ops, > > Please, do this in several assignments, since to support older compilers. Can you please elaborate? That's a single assignment. Are there compilers which can't do that?

Re: [PATCH 0/7] Runtime PM support for AHCI host controller driver

2016-02-18 Thread Tejun Heo
Hello, Patchset looks good to me. Once Jens acks the first patch, I'll apply the whole series to libata/for-4.6 w/ the field initialization updated. Thanks. -- tejun -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org M

Re: [PATCH 0/7] Runtime PM support for AHCI host controller driver

2016-02-19 Thread Tejun Heo
On Thu, Feb 18, 2016 at 10:54:10AM +0200, Mika Westerberg wrote: > Linux already supports runtime PM of disks (drivers/scsi/sd.c) so that > after certain amount of idle time the disk is suspended automatically. This > series extends the support to AHCI host controllers. Whenever SATA ports > are de

Re: [PATCH 01/17] Add ida and idr helper routines.

2015-09-15 Thread Tejun Heo
Hello, On Tue, Sep 15, 2015 at 09:46:01AM -0700, Lee Duncan wrote: > +/** > + * ida_get_index - allocate a ida index value > + * @ida idr handle > + * @lock spinlock handle protecting this index > + * @p_id pointer to allocated index value > + * > + * A helper function for saf

Re: [PATCH 01/17] Add ida and idr helper routines.

2015-09-15 Thread Tejun Heo
Hello, On Tue, Sep 15, 2015 at 11:38:42AM -0700, James Bottomley wrote: > For most of the SCSI stuff, yes. I'm less sure about the sd numbers. > They go up very high and get hammered a lot during system bring up and > hot plug. I think having their own lock rather than wrapping everything > arou

Re: DEFINE_IDA causing memory leaks? (was Re: [PATCH 1/2] virtio: fix memory leak of virtio ida cache layers)

2015-09-17 Thread Tejun Heo
Hello, On Thu, Sep 17, 2015 at 07:15:44AM -0700, James Bottomley wrote: > I don't understand why you'd want to forbid DEFINE_IDA ... all it does I guess to require the use of explicit init / creation so that it's clear the data structure needs to be destroyed? > is pre-initialise a usually stati

Re: DEFINE_IDA causing memory leaks? (was Re: [PATCH 1/2] virtio: fix memory leak of virtio ida cache layers)

2015-09-17 Thread Tejun Heo
Hello, On Thu, Sep 17, 2015 at 09:48:37AM -0700, James Bottomley wrote: > Well, there's an easy fix for that. We could have ida_remove() actually > free the bitmap and not cache it if it's the last layer. That way ida > would naturally empty and we wouldn't need a destructor. Tejun, would > th

Re: DEFINE_IDA causing memory leaks? (was Re: [PATCH 1/2] virtio: fix memory leak of virtio ida cache layers)

2015-09-17 Thread Tejun Heo
Hello, James. On Thu, Sep 17, 2015 at 10:58:29AM -0700, James Bottomley wrote: > The argument is that we shouldn't have to explicitly destroy a > statically initialized object, so > > DEFINE_IDA(someida); > > Should just work without having to explicitly do > > ida_destory(someida); > > somew

Re: [PATCH 01/17] Add ida and idr helper routines.

2015-09-18 Thread Tejun Heo
Hello, On Fri, Sep 18, 2015 at 08:42:26AM -0700, Lee Duncan wrote: > To be clear: you would like a patch series that converts the users of > the ida_* routines in my patches to instead use the ida_simple_* > routines, correct? And of course the ida_* helper routines I was adding > in idr.h would n

Re: Bugs in multipath scsi in 4.3-rc2

2015-09-30 Thread Tejun Heo
Hello, Christoph. On Wed, Sep 30, 2015 at 05:14:49PM +0200, Christoph Hellwig wrote: > The problem is that async probing deadlocks vs a synchronous > request_module, as Tejun figured out based on the thrad in > http://thread.gmane.org/gmane.linux.kernel/1420814 > > Tejun, if I understand the thre

Re: [PATCH 0/5] Modify ida_* users to use ida_simple_*

2015-10-05 Thread Tejun Heo
to > manage that. The whole series looks good to me. Please feel free to add Reviewed-by: Tejun Heo 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 3/3] faster workaround

2007-10-23 Thread Tejun Heo
Jeff Garzik wrote: > Alan Cox wrote: >>> 2) Once we identified, over time, the set of drives affected by this >>> 3112 quirk (aka drives that didn't fully comply to SATA spec), the >>> debugging of corruption cases largely shifted to the standard >>> routine: update the BIOS, replace the >>> cables

Re: What's left in libata-dev.git?

2007-10-25 Thread Tejun Heo
Jeff Garzik wrote: 3) Tejun: libata: implement ata_wait_after_reset() ^^^ Tejun, what case does this solve? Still needed? Not needed yet. It will be necessary to support a weird device (CF bridged over SATA) but it's a nice clean up regardless (instead of quoting ATADVDR in every rese

Re: [git patches] libata update

2007-10-25 Thread Tejun Heo
Jeff Garzik wrote: > Andrey Borzenkov wrote: >> Jeff Garzik wrote: >> >>> * Asynchronous notification -- finally userspace CD-ROM polling can go >>> away! >>> (NOTE: waiting on James B to apply the piece that actually makes this >>> work...) >> >> Does it depend on hardware offering suitable su

Re: Disk spindown on rmmod sd_mod

2007-10-26 Thread Tejun Heo
Jan Engelhardt wrote: > I am using 2.6.23-rc9 with pata_sis. `modprobe -r sd_mod`, which I ran > from initramfs, caused all my disks to spindown - sd even told me so. > > I recall there has been talk a while back about whether to spin down > disks on shutdown or not, but I do not think it touche

Re: Process Scheduling Issue using sg/libata

2007-11-16 Thread Tejun Heo
Fajun Chen wrote: > I use sg/libata and ata pass through for read/writes. Linux 2.6.18-rc2 > and libata version 2.00 are loaded on ARM XScale board. Under heavy > cpu load (e.g. when blocks per transfer/sector count is set to 1), > I've observed that the test application can suck cpu away for long

Re: Process Scheduling Issue using sg/libata

2007-11-19 Thread Tejun Heo
James Chapman wrote: > Mark Lord wrote: >> One way to deal with it in an embedded device, is to force the >> application that's generating the I/O to self-throttle. >> Or modify the device driver to self-throttle. > > Does disk access have to be so interrupt driven? Could disk interrupt > handling

Re: [patch 03/23] SCSI: early detection of medium not present, updated

2007-11-21 Thread Tejun Heo
7&w=2 > > Apparently fixes the bug described at > http://bugzilla.kernel.org/show_bug.cgi?id=8904 > > Needs some TLC. Perhaps urgently. > > Cc: Albert Lee <[EMAIL PROTECTED]> > Cc: Alan Stern <[EMAIL PROTECTED]> > Cc: James Bottomley <[EMAIL PROTE

Re: [patch] SCSI: early detection of medium not present, updated

2007-11-29 Thread Tejun Heo
p;w=2 > > Apparently fixes the bug described at > http://bugzilla.kernel.org/show_bug.cgi?id=8904 > > Needs some TLC. Perhaps urgently. > > Cc: Albert Lee <[EMAIL PROTECTED]> > Cc: Alan Stern <[EMAIL PROTECTED]> > Cc: James Bottomley <[EMAIL PROTE

[PATCH] SCSI: make pcmcia directory use obj-y|m instead of subdir-y|m

2007-12-07 Thread Tejun Heo
subdir-y|m isn't supposed to contain modules or built-in components. Change subdir-$(CONFIG_PCMCIA) to obj-$(CONFIG_PCMCIA). Signed-off-by: Tejun Heo <[EMAIL PROTECTED]> Cc: Sam Ravnborg <[EMAIL PROTECTED]> Cc: James Bottomley <[EMAIL PROTECTED]> --- drivers/scsi/Mak

Re: [PATCH] SCSI: make pcmcia directory use obj-y|m instead of subdir-y|m

2007-12-07 Thread Tejun Heo
Sam Ravnborg wrote: > On Fri, Dec 07, 2007 at 10:36:23PM +0900, Tejun Heo wrote: >> subdir-y|m isn't supposed to contain modules or built-in components. >> Change subdir-$(CONFIG_PCMCIA) to obj-$(CONFIG_PCMCIA). >> >> Signed-off-by: Tejun Heo <[EMAIL PROT

Re: [PATCH 7/7] sg_ring: convert core ATA code to sg_ring.

2007-12-26 Thread Tejun Heo
Hello, Rusty Russell. Rusty Russell wrote: > ATA relies so heavily on scsi that it needs to be converted at the > same time. > > ATA adds padding to scatterlists in scsi commands, but because there was > no good way of appending to those scatterlists, it had to use boutique > iterators to make su

Re: [PATCH 7/7] sg_ring: convert core ATA code to sg_ring.

2007-12-26 Thread Tejun Heo
Hello, Rusty. Rusty Russell wrote: > On Wednesday 26 December 2007 19:36:36 Tejun Heo wrote: >> It would be better to build upon sg chaining as we already have it. I >> think it can be made much easier with a bit more safe guards, >> generalization and some helpers. >

Re: Maybe Sorry for that but where should i write .)

2008-01-01 Thread Tejun Heo
Boaz Harrosh wrote: > On Sat, Dec 29 2007 at 3:50 +0200, thanatos <[EMAIL PROTECTED]> wrote: >> I got a sata controller ignitio >> >> 00:11.0 SATA controller: Initio Corporation INI-1623 PCI SATA-II >> Controller (rev 02) (prog-if 00 [Vendor specific]) >> Subsystem: Initio Corporation IN

Re: [PATCH 0/7] sg_ring: a ring of scatterlist arrays

2008-01-06 Thread Tejun Heo
Hello, Rusty Russell wrote: >> The other thing I note is that the problem you're claiming to solve with >> sg_ring (the ability to add extra scatterlists to the front or the back >> of an existing one) is already solved with sg_chain, so the only real >> advantage of sg_ring was that it contains e

Re: [PATCH] Don't blatt first element of prv in sg_chain()

2008-01-06 Thread Tejun Heo
Rusty Russell wrote: > I realize that sg chaining is a ploy to make the rest of the kernel > devs feel the pain of the SCSI subsystem. But this was a little > unsubtle. > > Signed-off-by: Rusty Russell <[EMAIL PROTECTED]> Embarrassingly Acked-by: Tejun Heo <[E

Re: [PATCH 0/7] sg_ring: a ring of scatterlist arrays

2008-01-06 Thread Tejun Heo
Rusty Russell wrote: > On Monday 07 January 2008 16:01:40 Tejun Heo wrote: >>> But we hit the same problems: >>> >>> 1) sg_chain loses information. The clever chain packaging makes reading >>> easy, but manipulation is severely limited. You can append to

Re: [PATCH 0/7] sg_ring: a ring of scatterlist arrays

2008-01-07 Thread Tejun Heo
Rusty Russell wrote: > On Monday 07 January 2008 17:37:41 Tejun Heo wrote: >> Rusty Russell wrote: >>> Hi Tejun, >>> >>>Nice try! Even ignoring the ugliness of undoing such an operation if >>> the caller doesn't expect you to mangle their chai

Re: [PATCH] libata: eliminate the home grown dma padding in favour of that provided by the block layer

2008-01-08 Thread Tejun Heo
James Bottomley wrote: > ATA requires that all DMA transfers begin and end on word boundaries. > Because of this, a large amount of machinery grew up in ide to adjust > scatterlists on this basis. However, as of 2.5, the block layer has a > dma_alignment variable which ensures both the beginning a

Re: [PATCH] libata: eliminate the home grown dma padding in favour of that provided by the block layer

2008-01-08 Thread Tejun Heo
James Bottomley wrote: >> Also, DMA alignment at >> block layer isn't enough for ATA. ATA needs drain buffers for ATAPI >> commands with variable length response. :-( > > OK, where is this in the libata code? The dma_pad size is only 4 bytes, > so this drain, I assume is only a word long? Giv

[PATCH] aha152x: fix isa/pcmcia compile problem

2008-01-17 Thread Tejun Heo
: Tejun Heo <[EMAIL PROTECTED]> --- drivers/scsi/aha152x.c | 12 ++-- drivers/scsi/aha152x.h | 20 +--- drivers/scsi/pcmcia/aha152x_stub.c | 10 ++ 3 files changed, 29 insertions(+), 13 deletions(-) diff --git a/drivers/scsi/aha15

[PATCH] SCSI: fix isa/pcmcia compile problem

2008-01-17 Thread Tejun Heo
compilation. Signed-off-by: Tejun Heo <[EMAIL PROTECTED]> --- Ah... missed that one. Here's the updated version. drivers/scsi/aha152x.c | 12 ++-- drivers/scsi/aha152x.h | 20 +--- drivers/scsi/fdomain.c

Re: [PATCH] SCSI: fix isa/pcmcia compile problem

2008-01-18 Thread Tejun Heo
James Bottomley wrote: >> I'm just a bit reluctant to touch these drivers, since they're all >> incredibly ancient. We don't have good luck with simple transformation >> patches on the older drivers ... and it seems to take months before >> anyone notices there's a problem. > > This is the patch

Re: [PATCH] SCSI: fix isa/pcmcia compile problem

2008-01-18 Thread Tejun Heo
James Bottomley wrote: >> I personally think it's a bit odd to disallow building into kernel >> because of the peculiarity of the implementation (including c files and >> compiling them slightly differently) and also no one reporting doesn't >> necessarily mean no one has attempted it and failed. >

Re: [PATCH] SCSI: fix isa/pcmcia compile problem

2008-01-18 Thread Tejun Heo
Tejun Heo wrote: > James Bottomley wrote: >> On Fri, 2008-01-18 at 16:20 +0900, Tejun Heo wrote: >>> aha152x.c and fdomain are built twice - once for the isa driver and >>> once for the PCMCIA one. Through #ifdefs, the compiled codes are >>> slightly differ

Re: [PATCH] SCSI: fix isa/pcmcia compile problem

2008-01-18 Thread Tejun Heo
James Bottomley wrote: > On Fri, 2008-01-18 at 16:20 +0900, Tejun Heo wrote: >> aha152x.c and fdomain are built twice - once for the isa driver and >> once for the PCMCIA one. Through #ifdefs, the compiled codes are >> slightly different; thus, global symbols need to be giv

Re: [PATCH RESEND number 2] libata: eliminate the home grown dma padding in favour of that provided by the block layer

2008-02-02 Thread Tejun Heo
James Bottomley wrote: > On Fri, 2008-02-01 at 15:02 -0500, Jeff Garzik wrote: >> James Bottomley wrote: >>> Could we please get this in ... I thought I mentioned several times that >>> it fixes a fatal oops in both aic94xx and ipr. >> Tejun has a persistent objection... see other email. > > Actu

Re: [PATCH RESEND number 2] libata: eliminate the home grown dma padding in favour of that provided by the block layer

2008-02-02 Thread Tejun Heo
James Bottomley wrote: >> I think the best solution is to update block layer draining such that it >> can be included together before the merge window closes. I'll dig into it. > > Like I said, the block layer pieces are already upstream. All we need > is the ATA bits and I think it should all w

Re: [PATCH RESEND number 2] libata: eliminate the home grown dma padding in favour of that provided by the block layer

2008-02-03 Thread Tejun Heo
James Bottomley wrote: > I'm reluctant to add another parameter to the request, but this one you > can calculate: you just do it wherever you work out the size of the > request. If data_len is the true data length and total_data_len is the > data length plus the drain length, the calculation frag

Re: [PATCH RESEND number 2] libata: eliminate the home grown dma padding in favour of that provided by the block layer

2008-02-03 Thread Tejun Heo
James Bottomley wrote: > On Mon, 2008-02-04 at 00:14 +0900, Tejun Heo wrote: >> James Bottomley wrote: >>> I'm reluctant to add another parameter to the request, but this one you >>> can calculate: you just do it wherever you work out the size of the >>&g

Re: [PATCH RESEND number 2] libata: eliminate the home grown dma padding in favour of that provided by the block layer

2008-02-03 Thread Tejun Heo
James Bottomley wrote: > I'm only really going by what Tejun says about AHCI. The problem as I > understand it is data overrun on PIO mode commands. AHCI apparently > (like aic94xx) processes these internally and doesn't actually use the > libata pio handlers, so it just uses an internal buffer t

Re: [PATCH RESEND number 2] libata: eliminate the home grown dma padding in favour of that provided by the block layer

2008-02-04 Thread Tejun Heo
Tejun Heo wrote: > Some ATA controllers including SFF BMDMA and libata PIO HSM need the > number of bytes mapped in the sg table. Yeah, it can be calculated with > a simple macro but it also is a fundamentally confusing dual-sizing > which should be made as clear as possible. Plu

Re: [PATCH RESEND number 2] libata: eliminate the home grown dma padding in favour of that provided by the block layer

2008-02-04 Thread Tejun Heo
And, here's working version. I'll splite and post them tomorrow. Thanks. Index: work/block/blk-core.c === --- work.orig/block/blk-core.c +++ work/block/blk-core.c @@ -116,6 +116,7 @@ void rq_init(struct request_queue *q, st

Re: [PATCH RESEND number 2] libata: eliminate the home grown dma padding in favour of that provided by the block layer

2008-02-04 Thread Tejun Heo
James Bottomley wrote: > Plus, tape devices are also ATAPI and since the problem seems to be > handling of ATAPI pio commands, they need all of this too. It really > is, I think, better just to do the setup in the libata slave configure > if the device is atapi. If no SCSI HBA needs it, fine. >

Re: [PATCH RESEND number 2] libata: eliminate the home grown dma padding in favour of that provided by the block layer

2008-02-04 Thread Tejun Heo
James Bottomley wrote: No, it doesn't. Drain needs to extend the sg table too >>> The patches do extend the sg table. >> Hmm... Where? > > It's the block component; it's already in git head with this patch: > > commit fa0ccd837e3dddb44c7db2f128a8bb7e4eabc21a > Author: James Bottomley <[EMA

Re: [PATCH RESEND number 2] libata: eliminate the home grown dma padding in favour of that provided by the block layer

2008-02-04 Thread Tejun Heo
Hello, James Bottomley wrote: >> No, it doesn't. Drain needs to extend the sg table too > > The patches do extend the sg table. Hmm... Where? >> and it makes controllers lax about buffer overruns for commands they >> shouldn't be. > > So adjust the qc->nbytes to show no drain element in lib

Re: [PATCH RESEND number 2] libata: eliminate the home grown dma padding in favour of that provided by the block layer

2008-02-04 Thread Tejun Heo
James Bottomley wrote: >> Oops, I was talking about padding. Sorry about that. > > Oh, OK ... the I thought the changelog was pretty explicit. However, it > works because the dma_aligment parameter of the block layer ensures that > all elements of the sg list begin and end on an address that con

[PATCH 4/5] libata: eliminate the home grown dma padding in favour of that provided by the block layer

2008-02-04 Thread Tejun Heo
ter. Signed-off-by: James Bottomley <[EMAIL PROTECTED]> Signed-off-by: Tejun Heo <[EMAIL PROTECTED]> --- drivers/ata/ahci.c|5 -- drivers/ata/libata-core.c | 145 +++-- drivers/ata/libata-scsi.c | 23 ++- drivers/ata/pa

[PATCH 2/5] block: add request->raw_data_len

2008-02-04 Thread Tejun Heo
to the controller or device. Signed-off-by: Tejun Heo <[EMAIL PROTECTED]> Cc: James Bottomley <[EMAIL PROTECTED]> --- block/blk-core.c|2 ++ block/blk-map.c |2 ++ block/blk-merge.c |1 + block/bsg.c |8 block/scsi_ioctl.c |3

[PATCH 1/5] block: update bio according to DMA alignment padding

2008-02-04 Thread Tejun Heo
e last bio of the request to make this padding visible to lower layers. This patch makes blk_rq_map_user() extend the last bio such that it includes the padding area and the size of area pointed to by the request is properly aligned. Signed-off-by: Tejun Heo <[EMAIL PROTECTED]> Cc: James B

[PATCHSET #upstream] block/libata: update and use block layer padding and draining

2008-02-04 Thread Tejun Heo
This patchset updates block layer padding and draining support and make libata use it. It's based on James Bottomley's initial work and, of the five, the last two patches are from James with some modifications. Please read the following thread for more info. http://thread.gmane.org/gmane.linu

[PATCH 3/5] block: implement request_queue->dma_drain_needed

2008-02-04 Thread Tejun Heo
Draining shouldn't be done for commands where overflow may indicate data integrity issues. Add dma_drain_needed callback to request_queue. Drain buffer is appened iff this function returns non-zero. Signed-off-by: Tejun Heo <[EMAIL PROTECTED]> Cc: James Bottomley <[EMAIL PROTECTE

[PATCH 5/5] libata: implement drain buffers

2008-02-04 Thread Tejun Heo
ocating drain buffer. * ata_dev_printk() used instead of sdev_printk(). Signed-off-by: James Bottomley <[EMAIL PROTECTED]> Signed-off-by: Tejun Heo <[EMAIL PROTECTED]> --- drivers/ata/libata-scsi.c | 41 +++-- 1 files changed, 35 insertions(+), 6 de

Re: [PATCHSET #upstream] block/libata: update and use block layer padding and draining

2008-02-08 Thread Tejun Heo
Jeff Garzik wrote: > Jens Axboe wrote: >> On Fri, Feb 08 2008, Jeff Garzik wrote: >>> Jeff Garzik wrote: >>>> Tejun Heo wrote: >>>>> This patchset updates block layer padding and draining support and >>>>> make libata use it. It'

[PATCH 6/7] libata: eliminate the home grown dma padding in favour of that provided by the block layer

2008-02-08 Thread Tejun Heo
a set queue alignment correctly for ATAPI devices and drop broken sg mangling from ata_sg_setup(). * Use request->raw_data_len for ATAPI transfer chunk size. * Killed qc->raw_nbytes. * Separated out killing qc->n_iter. Signed-off-by: James Bottomley <[EMAIL PROTECTED

[PATCH 1/7] libata: update ATAPI overflow draining

2008-02-08 Thread Tejun Heo
. Signed-off-by: Tejun Heo <[EMAIL PROTECTED]> Acked-by: Albert Lee <[EMAIL PROTECTED]> --- drivers/ata/libata-core.c | 76 +++- 1 files changed, 33 insertions(+), 43 deletions(-) diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-

[PATCH 2/7] block: update bio according to DMA alignment padding

2008-02-08 Thread Tejun Heo
e last bio of the request to make this padding visible to lower layers. This patch makes blk_rq_map_user() extend the last bio such that it includes the padding area and the size of area pointed to by the request is properly aligned. Signed-off-by: Tejun Heo <[EMAIL PROTECTED]> Cc: James B

[PATCHSET #upstream] block/libata: update and use block layer padding and draining, take 2

2008-02-08 Thread Tejun Heo
This is the second take of blk-layer-padding-and-draining patchset. Changes from the last take[L] are... * libata-update-ATAPI-overflow-draining patch added. This patch fixes up ATAPI PIO handling before updating it to use block layer draining. consumed accounting and atapi_qc_may_overflow(

[PATCH 3/7] block: add request->raw_data_len

2008-02-08 Thread Tejun Heo
to the controller or device. Signed-off-by: Tejun Heo <[EMAIL PROTECTED]> Cc: James Bottomley <[EMAIL PROTECTED]> --- block/blk-core.c|2 ++ block/blk-map.c |2 ++ block/blk-merge.c |1 + block/bsg.c |8 block/scsi_ioctl.c |3

[PATCH 5/7] block: clear drain buffer if draining for write command

2008-02-08 Thread Tejun Heo
Clear drain buffer before chaining if the command in question is a write. Signed-off-by: Tejun Heo <[EMAIL PROTECTED]> --- block/blk-merge.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/block/blk-merge.c b/block/blk-merge.c index d50cfc8..d0b9031 100644 --- a

[PATCH 7/7] libata: implement drain buffers

2008-02-08 Thread Tejun Heo
logic dropped. * ata_dev_printk() used instead of sdev_printk(). Signed-off-by: James Bottomley <[EMAIL PROTECTED]> Signed-off-by: Tejun Heo <[EMAIL PROTECTED]> --- drivers/ata/libata-core.c | 56 +++--- driver

[PATCH 4/7] block: implement request_queue->dma_drain_needed

2008-02-08 Thread Tejun Heo
Draining shouldn't be done for commands where overflow may indicate data integrity issues. Add dma_drain_needed callback to request_queue. Drain buffer is appened iff this function returns non-zero. Signed-off-by: Tejun Heo <[EMAIL PROTECTED]> Cc: James Bottomley <[EMAIL PROTECTE

Re: [PATCH RFC 00/77] Re-design MSI/MSI-X interrupts enablement pattern

2013-10-07 Thread Tejun Heo
Hey, guys. On Sun, Oct 06, 2013 at 09:10:30AM +0200, Alexander Gordeev wrote: > On Sun, Oct 06, 2013 at 05:19:46PM +1100, Benjamin Herrenschmidt wrote: > > On Sun, 2013-10-06 at 08:02 +0200, Alexander Gordeev wrote: > > > In fact, in the current design to address the quota race decently the > > >

Re: [PATCH RFC 05/77] PCI/MSI: Convert pci_msix_table_size() to a public interface

2013-10-07 Thread Tejun Heo
Hello, On Wed, Oct 02, 2013 at 12:48:21PM +0200, Alexander Gordeev wrote: > Make pci_msix_table_size() to return a error code if the device > does not support MSI-X. This update is needed to facilitate a > forthcoming re-design MSI/MSI-X interrupts enabling pattern. > > Device drivers will use th

Re: [PATCH RFC 07/77] PCI/MSI: Re-design MSI/MSI-X interrupts enablement pattern

2013-10-07 Thread Tejun Heo
Hello, On Wed, Oct 02, 2013 at 12:48:23PM +0200, Alexander Gordeev wrote: > +static int foo_driver_enable_msi(struct foo_adapter *adapter, int nvec) > +{ > + rc = pci_get_msi_cap(adapter->pdev); > + if (rc < 0) > + return rc; > + > + nvec = min(nvec, rc); > + if (nvec <

Re: [PATCH RFC 00/77] Re-design MSI/MSI-X interrupts enablement pattern

2013-10-07 Thread Tejun Heo
Hello, Alexander. On Wed, Oct 02, 2013 at 12:48:16PM +0200, Alexander Gordeev wrote: > Alexander Gordeev (77): > PCI/MSI: Fix return value when populate_msi_sysfs() failed > PCI/MSI/PPC: Fix wrong RTAS error code reporting > PCI/MSI/s390: Fix single MSI only check > PCI/MSI/s390: Remove su

Re: [PATCH RFC 00/77] Re-design MSI/MSI-X interrupts enablement pattern

2013-10-09 Thread Tejun Heo
Hello, On Tue, Oct 08, 2013 at 02:22:16PM +0200, Alexander Gordeev wrote: > If we talk about pSeries quota, then the current pSeries pci_enable_msix() > implementation is racy internally and could fail if the quota went down > *while* pci_enable_msix() is executing. In this case the loop will have

Re: [PATCH RFC 00/77] Re-design MSI/MSI-X interrupts enablement pattern

2013-10-09 Thread Tejun Heo
Hello, On Wed, Oct 09, 2013 at 02:57:16PM +0200, Alexander Gordeev wrote: > On Mon, Oct 07, 2013 at 02:01:11PM -0400, Tejun Heo wrote: > > Hmmm... yean, the race condition could be an issue as multiple msi > > allocation might fail even if the driver can and explicitly hand

Re: [PATCH RFC 00/77] Re-design MSI/MSI-X interrupts enablement pattern

2013-10-09 Thread Tejun Heo
On Mon, Oct 07, 2013 at 09:48:01PM +0100, Ben Hutchings wrote: > > There is one major flaw in min-max approach - the generic MSI layer > > will have to take decisions on exact number of MSIs to request, not > > device drivers. > [... > > No, the min-max functions should be implemented using the sa

Re: [PATCH RFC 07/77] PCI/MSI: Re-design MSI/MSI-X interrupts enablement pattern

2013-10-09 Thread Tejun Heo
Hello, Alexander. On Tue, Oct 08, 2013 at 09:48:26AM +0200, Alexander Gordeev wrote: > > If there are many which duplicate the above pattern, it'd probably be > > worthwhile to provide a helper? It's usually a good idea to reduce > > the amount of boilerplate code in drivers. > > I wanted to lim

Re: [PATCH RFC 00/77] Re-design MSI/MSI-X interrupts enablement pattern

2013-10-09 Thread Tejun Heo
Hello, On Tue, Oct 08, 2013 at 11:07:16AM +0200, Alexander Gordeev wrote: > Multipe MSIs is just a handful of drivers, really. MSI-X impact still Yes, so it's pretty nice to try out things there before going full-on. > will be huge. But if we opt a different name for the new pci_enable_msix() >

Re: [PATCH v2 3/4] ata: add APM X-Gene SoC 6.0Gbps SATA PHY driver

2013-11-20 Thread Tejun Heo
Hey, guys. On Tue, Nov 19, 2013 at 04:53:16PM -0700, Loc Ho wrote: > This patch adds support for APM X-Gene SoC 6.0Gbps SATA PHY. This is the > physical layer interface for the corresponding SATA host controller. This > driver uses the new PHY generic framework posted by Kishon Vijay Abrahm. Hmm.

Re: [PATCH v2 3/4] ata: add APM X-Gene SoC 6.0Gbps SATA PHY driver

2013-11-20 Thread Tejun Heo
Hello, Arnd. On Wed, Nov 20, 2013 at 10:41 AM, Arnd Bergmann wrote: > It needs to be in drivers/phy, which is currently being prepared for > the next merge window and which contains the generic interface used > in this driver. Ah, cool, so I don't need to worry about this one, right? Thanks a l

Re: [usb-storage] UAS hangs khubd on USB disconnect

2013-12-13 Thread Tejun Heo
Hello, guys. (cc'ing Greg) On Fri, Dec 13, 2013 at 01:19:36PM -0500, Alan Stern wrote: > On Fri, 13 Dec 2013, Sarah Sharp wrote: > > > > Given the way things work now, I suspect these warnings are truly > > > harmless. We could simply get rid of the WARN in sysfs_remove_group. > > > > > > The

Re: [PATCH/RESEND v2 0/2] SATA disk resume time optimization

2013-12-17 Thread Tejun Heo
On Mon, Nov 11, 2013 at 12:08:49PM -0500, Phillip Susi wrote: > No, I did not tune my system; I fixed the kernel so that userspace's > activities do not start those disks. So, umm, implementing things in kernel to facilitate userland is great but please don't try to work around userland from kerne

[PATCH 10/12] scsi: use device_remove_file_self() instead of device_schedule_callback()

2014-01-07 Thread Tejun Heo
driver-core now supports synchrnous self-deletion of attributes and the asynchrnous removal mechanism is scheduled for removal. Use it instead of device_schedule_callback(). This makes "delete" behave synchronously. Signed-off-by: Tejun Heo Cc: "James E.J. Bottomley&q

[PATCH 12/14] scsi: use device_remove_file_self() instead of device_schedule_callback()

2014-01-10 Thread Tejun Heo
driver-core now supports synchrnous self-deletion of attributes and the asynchrnous removal mechanism is scheduled for removal. Use it instead of device_schedule_callback(). This makes "delete" behave synchronously. Signed-off-by: Tejun Heo Cc: "James E.J. Bottomley&q

[PATCH 12/14] scsi: use device_remove_file_self() instead of device_schedule_callback()

2014-01-10 Thread Tejun Heo
driver-core now supports synchrnous self-deletion of attributes and the asynchrnous removal mechanism is scheduled for removal. Use it instead of device_schedule_callback(). This makes "delete" behave synchronously. Signed-off-by: Tejun Heo Cc: "James E.J. Bottomley&q

Re: [PATCH/RESEND v2 1/2] Hard disk S3 resume time optimization

2014-01-11 Thread Tejun Heo
Hello, On Tue, Jan 07, 2014 at 04:56:07PM -0800, Todd E Brandt wrote: > On resume, the ATA port driver currently waits until the AHCI controller > finishes executing the port wakeup command. This patch changes the Is there anything ahci specific about this? There shouldn't be. > This patch only

Re: [PATCH v8 3/4] ata: Add APM X-Gene SoC SATA host controller driver

2014-01-11 Thread Tejun Heo
Hello, David. On Fri, Jan 10, 2014 at 02:07:21PM -0600, David Milburn wrote: > Tejun, to avoid some of the interrupt handling code duplication, would > it better to have a AHCI_HFLAG_FLUSH and then change > > this driver to set flush > > hpriv->hpriv.flush = (void *) xgene_ahci_iob_flush; > > a

Re: [PATCH v8 3/4] ata: Add APM X-Gene SoC SATA host controller driver

2014-01-12 Thread Tejun Heo
Hello, On Sat, Jan 11, 2014 at 07:58:04PM -0800, Loc Ho wrote: > The flush has to occurred immediately after reading the CI > register. It can not wrap around the isr routine and issue the flush > after or before the library ahci isr routine. I see. So, you're saying that if PMP support is disab

Re: [PATCH v8 3/4] ata: Add APM X-Gene SoC SATA host controller driver

2014-01-13 Thread Tejun Heo
Hello, Loc. On Sun, Jan 12, 2014 at 08:01:59PM -0800, Loc Ho wrote: > Yes but Let me summary what overrides are required for this X-Gene > SATA controller driver: > > 1. For Query ID, these two functions - ahci_read_id and ahci_qc_issue > requires override. But the comment in ahci_qc_issue() says

Re: [PATCH/RESEND v2 1/2] Hard disk S3 resume time optimization

2014-01-13 Thread Tejun Heo
Hello, On Mon, Jan 13, 2014 at 11:55:44AM -0800, Todd E Brandt wrote: > I see your point, why have two paths if one will do. The only thing that > worries me is that the PM resume from hibernate function doesn't have > an error handler. What happens when it tries to read the image from swap > and

Re: [PATCH/RESEND v2 1/2] Hard disk S3 resume time optimization

2014-01-14 Thread Tejun Heo
Hello, Todd. On Mon, Jan 13, 2014 at 03:30:26PM -0800, Todd E Brandt wrote: > Ahh, sorry, yea I think async should work for the entire resume pathway. Would > you be willing to accept this ata patch separately from the scsi one? It > wouldn't provide any performance benefit on its own, but would p

Re: [PATCH/RESEND v2 0/2] Hard disk S3 resume time optimization

2014-01-14 Thread Tejun Heo
Hello, Gwendal. On Mon, Jan 13, 2014 at 04:36:52PM -0800, Gwendal Grignou wrote: > Won't this patch defeat staggered spinup at resume? If you have a jbod > with a smallish power supply, with a 12V rail designed for the steady > state and 1 or 2 devices spinning up at once, you may be in trouble >

Re: [PATCH v8 3/4] ata: Add APM X-Gene SoC SATA host controller driver

2014-01-14 Thread Tejun Heo
Hey, On Tue, Jan 14, 2014 at 07:57:19AM -0800, Loc Ho wrote: > > No, they don't and the comments in your driver don't really explain > > what's going on. Why are we having retry loops inside hardreset > > itself? This can prolong recovery time significantly in corner cases. > > Why is this neces

Re: [PATCH v8 3/4] ata: Add APM X-Gene SoC SATA host controller driver

2014-01-14 Thread Tejun Heo
On Tue, Jan 14, 2014 at 11:03:12AM -0500, Tejun Heo wrote: > > As mentioned, the flush requires immediately after reading the CI. > > Otherwise, there is still an chance that the command is completed and > > the OS notified the upper layer while the data is still in flight. F

Re: [PATCH v8 3/4] ata: Add APM X-Gene SoC SATA host controller driver

2014-01-14 Thread Tejun Heo
On Tue, Jan 14, 2014 at 08:21:28AM -0800, Loc Ho wrote: > In the ISR, the AHCI library code reads the CI register and then > performs XOR to determine which commands are completed. Then it goes > and processes the completed command(s). I am worry that the process of > processing the completed comma

Re: [PATCH v8 3/4] ata: Add APM X-Gene SoC SATA host controller driver

2014-01-14 Thread Tejun Heo
On Tue, Jan 14, 2014 at 08:37:18AM -0800, Loc Ho wrote: > This issue has NOT been observed but the design has this issue and > observed from verification. As a mean to ensure that this never occur > from design itself, this is the workaround and only apply to SATA and > SDIO. The SDIO don't need th

<    1   2   3   4   5   6   7   8   >