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
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: 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 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: [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] 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

[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: 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

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: 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: 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: 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: [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: 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: [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

[PATCH] SCSI: throttle SG_DXFER_TO_FROM_DEV warning message better

2007-08-17 Thread Tejun Heo
ge if the name matches. This can protect most use cases. Signed-off-by: Tejun Heo <[EMAIL PROTECTED]> --- drivers/scsi/sg.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c index 85d3894..913408a 100644 --- a/drivers/scsi

Re: [PATCH] sd: disentangle barriers in SCSI

2007-08-04 Thread Tejun Heo
James Bottomley wrote: > Our current implementation has a generic set of barrier functions that > go through the SCSI driver model. Realistically, this is unnecessary, > because the only device that can use barriers (sd) can set the flush > functions up at probe or revalidate time. This patch pul

Re: [patch 3/4] Enable link power management for ata drivers

2007-08-01 Thread Tejun Heo
Kristen Carlson Accardi wrote: > On Wed, 01 Aug 2007 17:27:39 +0900 > Tejun Heo <[EMAIL PROTECTED]> wrote: > >> Kristen Carlson Accardi wrote: > >> Is it safe to use ALPM on a device which only claims to support DIPM? > > Yes - I doubled checked this with

Re: [patch 2/4] Expose Power Management Policy option to users

2007-08-01 Thread Tejun Heo
Tejun Heo wrote: > Arjan van de Ven wrote: >>> They were hardware problems. I don't think any amount of proper >>> implementation can fix them. I have one DVD RAM somewhere in my pile of >>> hardware which locks up solidly if any link PS mode is used and had

Re: [patch 3/4] Enable link power management for ata drivers

2007-08-01 Thread Tejun Heo
Kristen Carlson Accardi wrote: > libata drivers can define a function (enable_pm) that will > perform hardware specific actions to enable whatever power > management policy the user set up from the scsi sysfs > interface if the driver supports it. This power management > policy will be activated

Re: [patch 1/4] Store interrupt value

2007-08-01 Thread Tejun Heo
Kristen Carlson Accardi wrote: > Use a stored value for which interrupts to enable. Changing this allows > us to selectively turn off certain interrupts later and have them > stay off. > > Signed-off-by: Kristen Carlson Accardi <[EMAIL PROTECTED]> Acked-by: Tejun

Re: [patch 2/4] Expose Power Management Policy option to users

2007-07-31 Thread Tejun Heo
Kristen Carlson Accardi wrote: >> I don't think the interface you're suggesting is a good one. Do you? > > I think if it's applicable to SCSI at all it is fine. If it is not, then > I think we need to make do with the interface we are given. I do not think > we should hold up a feature for liba

Re: [patch 2/4] Expose Power Management Policy option to users

2007-07-31 Thread Tejun Heo
Kristen Carlson Accardi wrote: > So at current rate of development and kernel release schedule, the best > possible scenario is still 6 months away - whereas this patchset is already > tested and ready for merging now. The best possible scenario is .24-rc1 merge window with or without waiting. W

Re: [patch 2/4] Expose Power Management Policy option to users

2007-07-31 Thread Tejun Heo
Arjan van de Ven wrote: >> They were hardware problems. I don't think any amount of proper >> implementation can fix them. I have one DVD RAM somewhere in my pile of >> hardware which locks up solidly if any link PS mode is used and had a > > and the AHCI ALPM code decides to use power savings o

Re: [patch 2/4] Expose Power Management Policy option to users

2007-07-31 Thread Tejun Heo
Kristen Carlson Accardi wrote: > I think what you are saying is that you'd like a way to use your HIPM > and DIPM without ALPM on the AHCI driver. Fine - it's really easy > to add these levels later - if they don't make sense at the sysfs interface > we can add module params to specify the definit

Re: [patch 2/4] Expose Power Management Policy option to users

2007-07-31 Thread Tejun Heo
Hello, Kristen. Kristen Carlson Accardi wrote: > On Tue, 31 Jul 2007 23:45:25 +0900 > Tejun Heo <[EMAIL PROTECTED]> wrote: > >> Anyways, I don't really think this attribute belongs to SCSI sysfs >> hierarchy. There currently isn't any alternative but

Re: [patch 2/4] Expose Power Management Policy option to users

2007-07-31 Thread Tejun Heo
Arjan van de Ven wrote: > either sucks. AHCI ALPM ought to work if it's supported; it's what other > operating systems also use... A question. Does the other OS enable ALPM without checking against white/black list? Or is it enabled only on certain configurations - e.g. specific notebooks, etc?

Re: [patch 2/4] Expose Power Management Policy option to users

2007-07-31 Thread Tejun Heo
Arjan van de Ven wrote: > On Tue, 2007-07-31 at 15:27 +0900, Tejun Heo wrote: >> Jeff Garzik wrote: >>> Any chance the SCSI peeps could ACK this, and then let me include it in >>> the ALPM patchset in the libata tree? >> ATA link PS is pretty complex with HIPM, DIP

Re: [patch 2/4] Expose Power Management Policy option to users

2007-07-30 Thread Tejun Heo
Jeff Garzik wrote: > Any chance the SCSI peeps could ACK this, and then let me include it in > the ALPM patchset in the libata tree? ATA link PS is pretty complex with HIPM, DIPM and AHCI ALPM. I'm not sure whether this three level knob would be sufficient. It might be good enough if we're gonna

Re: unexpected scsi timeout

2007-07-25 Thread Tejun Heo
Vasily Averin wrote: > Albert Lee wrote: Vasily Averin wrote: > I've noticed that some scsi commands for DVD-drive attached to pata_via > successfully finishes without any delays but reports about TIMEOUT > condition. It > happens because of ATA_ERR bit is set in status regist

Re: unexpected scsi timeout

2007-07-24 Thread Tejun Heo
[cc'ing Albert] Vasily Averin wrote: > Tejun, Jeff > > I've noticed that some scsi commands for DVD-drive attached to pata_via > successfully finishes without any delays but reports about TIMEOUT condition. > It > happens because of ATA_ERR bit is set in status register. As result for each > com

Re: Some NCQ numbers...

2007-07-03 Thread Tejun Heo
Hello, Michael Tokarev wrote: > Well. It looks like the results does not depend on the > elevator. Originally I tried with deadline, and just > re-ran the test with noop (hence the long delay with > the answer) - changing linux elevator changes almost > nothing in the results - modulo some rando

Re: Some NCQ numbers...

2007-07-03 Thread Tejun Heo
Michael Tokarev wrote: > [Offtopic notice: For the first time I demonstrated some > speed testing results on linux-ide mailinglist, as a > demonstration how [NT]CQ can help. But later, someone > becomes curious and posted that email to lkml, asking > for more details. Since that, I become more cu

Re: [PATCH] aacraid: add cpu cache flush after kmapping and modifying a page

2007-06-20 Thread Tejun Heo
Salyzyn, Mark wrote: > Updated patch to address overlap with patches introduced by FUJITA > Tomonori <[EMAIL PROTECTED]>. Tejun, please inspect. I'm sorry but this patch is really out of my hand. James? -- tejun - To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body

Re: [patch 0/3] AHCI Link Power Management

2007-06-14 Thread Tejun Heo
Jens Axboe wrote: >> 1. It didn't have proper interface with userland. This was mainly >> because of missing ATA sysfs nodes. I'm not sure whether adding this to >> scsi node is a good idea. >> >> 2. It was focused on SATA link PS and couldn't cover the Lenovo case. >> >> I think we need somethin

Re: [patch 0/3] AHCI Link Power Management

2007-06-14 Thread Tejun Heo
Kristen Carlson Accardi wrote: > I'm not sure about this. We need better PM framework to support > powersaving in other controllers and some ahcis don't save much > when only link power management is used, do you have data to support this? >>> Yeah, it was some Lenovo notebook.

Re: [patch 3/3] Enable Aggressive Link Power management for AHCI controllers.

2007-06-12 Thread Tejun Heo
Matthew Garrett wrote: > On Tue, Jun 12, 2007 at 11:17:14AM -0300, Henrique de Moraes Holschuh wrote: >> On Tue, 12 Jun 2007, Matthew Garrett wrote: >>> Laptop bays are designed to deal with hotplugging PATA - I don't think >>> this is too much of an issue :) >> The new SATA ones use the SATA hard

Re: [patch 0/3] AHCI Link Power Management

2007-06-11 Thread Tejun Heo
Arjan van de Ven wrote: >>> The data we have from this patch is that it saves typically a Watt of >>> power (depends on the machine of course, but the range is 0.5W to >>> 1.5W). If you want to also have an even more agressive thing where >>> you want to start disabling the entire controller... I d

Re: [patch 0/3] AHCI Link Power Management

2007-06-11 Thread Tejun Heo
Arjan van de Ven wrote: >> I'm not sure about this. We need better PM framework to support >> powersaving in other controllers and some ahcis don't save much >> when only link power management is used, > > do you have data to support this? Yeah, it was some Lenovo notebook. Pavel is more famil

Re: [patch 0/3] AHCI Link Power Management

2007-06-11 Thread Tejun Heo
Kristen Carlson Accardi wrote: > Hi, > This series of patches enables Aggressive Link Power Management for AHCI > devices, as documented in the AHCI spec. On my laptop (a Lenovo X60), this > saves me a full watt of power. On other systems, reported power savings > range from .5-1.5 Watts. It ha

Re: [PATCH] sd.c: fix refcounting regression in suspend/resume routines

2007-05-21 Thread Tejun Heo
Alan Stern wrote: > This patch (as909) fixes a couple of refcounting errors in the sd > driver's suspend and resume methods. > > Signed-off-by: Alan Stern <[EMAIL PROTECTED]> Acked-by: Tejun Heo <[EMAIL PROTECTED]> Thanks. -- tejun - To unsubscribe from this lis

Re: Weird hard disk noise on shutdown (bug #7674)

2007-05-15 Thread Tejun Heo
Hello, Henrique. Henrique de Moraes Holschuh wrote: > On Mon, 14 May 2007, Francesco Pretto wrote: >> Ubuntu [1] ang Gentoo [2] bugs opened. Sent a mail to Miquel van >> Smoorenburg, dev of sysvinit. > > For all Debian sysvinit issues, please send email to > [EMAIL PROTECTED] (added to CC). > >

Re: [PATCH scsi-misc-2.6] SCSI: kill sht->suspend/resume

2007-05-14 Thread Tejun Heo
James Bottomley wrote: > On Wed, 2007-03-21 at 16:05 +0900, Tejun Heo wrote: >> This patch breaks the existing libata suspend/resume support and thus >> should not be applied before libata is updated. So, please don't >> apply it yet. > > I don't have a git t

Re: ata/scsi crash on halt

2007-05-13 Thread Tejun Heo
ssleep in the command translation > path. The commit that did it was this one: > > commit 920a4b1038e442700a1cfac77ea7e20bd615a2c3 > Author: Tejun Heo <[EMAIL PROTECTED]> > Date: Fri May 4 21:28:48 2007 +0200 > > libata: implement libata.spindown_compat > > I'm afr

Re: [patch 0/7] Asynchronous Notification for ATAPI devices (v2) - resend

2007-05-06 Thread Tejun Heo
Kristen Carlson Accardi wrote: > This patch series implements Asynchronous Notification (AN) for SATA > ATAPI devices as defined in SATA 2.5 and AHCI 1.1 and higher. Drives > which support this feature will send a notification when new media is > inserted and removed, preventing the need for user

Re: libata /dev/scd0 problem: mount after burn fails without eject

2007-05-04 Thread Tejun Heo
Frank van Maarseveen wrote: > On Fri, May 04, 2007 at 10:16:32AM +0200, Tejun Heo wrote: >> Michal Piotrowski wrote: >>> On 01/05/07, Mark Lord <[EMAIL PROTECTED]> wrote: >>>> Forwarding to linux-scsi and linux-ide mailing lists. >>>> >>>&

Re: libata /dev/scd0 problem: mount after burn fails without eject

2007-05-04 Thread Tejun Heo
Michal Piotrowski wrote: > On 01/05/07, Mark Lord <[EMAIL PROTECTED]> wrote: >> Forwarding to linux-scsi and linux-ide mailing lists. >> >> Frank van Maarseveen wrote: >> > Tested on 2.6.20.6 and 2.6.21.1 >> > >> > I decided to swich from the old IDE drivers to libata and now there >> > seems to be

Re: [patch 5/7] genhd: send async notification on media change

2007-04-24 Thread Tejun Heo
Kristen Carlson Accardi wrote: > Send an uevent to user space to indicate that a media change event has > occurred. > > Signed-off-by: Kristen Carlson Accardi <[EMAIL PROTECTED]> > > Index: 2.6-git/block/genhd.c > === > --- 2.6-git.

Re: [patch 2/7] genhd: expose AN to user space

2007-04-24 Thread Tejun Heo
Kristen Carlson Accardi wrote: > +static struct disk_attribute disk_attr_capability = { > + .attr = {.name = "capability_flags", .mode = S_IRUGO }, > + .show = disk_capability_read > +}; How about just "capability"? I think that would be more consistent with other attributes. -- tejun

Re: [patch 1/7] libata: check for AN support

2007-04-24 Thread Tejun Heo
Hello, Kristen Carlson Accardi wrote: > static unsigned int ata_print_id = 1; > @@ -1744,6 +1745,23 @@ int ata_dev_configure(struct ata_device > } > dev->cdb_len = (unsigned int) rc; > > + /* > + * check to see if this ATAPI device supports

Re: [PATCH 4/4] libata: implement libata.spindown_compat

2007-04-17 Thread Tejun Heo
James Bottomley wrote: > On Tue, 2007-04-17 at 11:20 -0400, Jeff Garzik wrote: >> then, unless there are dependencies in libata-dev, how about Tejun >> pushes patches 3-4 through scsi-misc as well? > > Sure ... as long as there are no dependencies. James, are you going to rebase scsi-misc-2.6 be

Re: Kernel 2.6.20.4: Software RAID 5: ata13.00: (irq_stat 0x00020002, failed to transmit command FIS)

2007-04-09 Thread Tejun Heo
Justin Piszcz wrote: > > > On Thu, 5 Apr 2007, Justin Piszcz wrote: > >> Had a quick question, this is the first time I have seen this happen, >> and it was not even under during heavy I/O, hardly anything was going >> on with the box at the time. > > .. snip .. > > # /usr/bin/time badblocks -

Re: [RFD driver-core] Lifetime problems of the current driver model

2007-04-02 Thread Tejun Heo
Cornelia Huck wrote: > On Mon, 2 Apr 2007 11:20:48 +0200, > Cornelia Huck <[EMAIL PROTECTED]> wrote: > >> Cool. However, there's something fishy there (not sure whether it's in >> your patch or a latent bug in the ccw bus code that just has been >> uncovered): > > Similar bug when loading/unloadi

Re: [RFD driver-core] Lifetime problems of the current driver model

2007-04-01 Thread Tejun Heo
Hello, James, Greg. On Fri, Mar 30, 2007 at 01:19:34PM -0500, James Bottomley wrote: > That's sort of what I was reaching for too ... it just looks to me that > all the sysfs glue is in kobject, so they make a good candidate for the > pure sysfs objects. Whatever we do, there has to be breakable

Re: [RFD driver-core] Lifetime problems of the current driver model

2007-03-31 Thread Tejun Heo
Cornelia Huck wrote: On Sat, 31 Mar 2007 12:12:48 +0900, Tejun Heo <[EMAIL PROTECTED]> wrote: Hm, but as long as dk0 is registered, it can be looked up and someone could get a reference on it. Yeah, exactly. That's why any getting any kobject reference backed by a module must be

Re: [RFD driver-core] Lifetime problems of the current driver model

2007-03-30 Thread Tejun Heo
Tejun Heo wrote: > Cornelia Huck wrote: >> On Sat, 31 Mar 2007 00:08:19 +0900, >> Tejun Heo <[EMAIL PROTECTED]> wrote: >> >>> (3) make sure all existing kobjects are released by module exit function. >>> >>> For example, let's say t

Re: [RFD driver-core] Lifetime problems of the current driver model

2007-03-30 Thread Tejun Heo
Cornelia Huck wrote: > On Sat, 31 Mar 2007 00:08:19 +0900, > Tejun Heo <[EMAIL PROTECTED]> wrote: > >> (3) make sure all existing kobjects are released by module exit function. >> >> For example, let's say there is a hypothetical disk device /dev/dk0 &g

Re: [RFD driver-core] Lifetime problems of the current driver model

2007-03-30 Thread Tejun Heo
Cornelia Huck wrote: > On Fri, 30 Mar 2007 22:58:39 +0900, > Tejun Heo <[EMAIL PROTECTED]> wrote: > >> It's a little bit more convoluted than that. Module reference count of >> zero doesn't indicate that there is no one referencing the module. It >>

Re: [RFD driver-core] Lifetime problems of the current driver model

2007-03-30 Thread Tejun Heo
Cornelia Huck wrote: > On Fri, 30 Mar 2007 22:19:52 +0900, > Tejun Heo <[EMAIL PROTECTED]> wrote: > >>> Shouldn't getting/putting the module refcount be solely done in >>> kobject.c? Grab the module reference when the kobject is created and >>>

Re: [RFD driver-core] Lifetime problems of the current driver model

2007-03-30 Thread Tejun Heo
James Bottomley wrote: > On Fri, 2007-03-30 at 18:43 +0900, Tejun Heo wrote: >> Orphaning sysfs nodes on unregistration is a big step in this >> direction. With sysfs reference counting out of the picture, >> implementing 'disconnect immediate' interface only on

Re: [RFD driver-core] Lifetime problems of the current driver model

2007-03-30 Thread Tejun Heo
Cornelia Huck wrote: > On Fri, 30 Mar 2007 18:43:02 +0900, > Tejun Heo <[EMAIL PROTECTED]> wrote: > >> One way to solve this problem is to subordinate lifetime rule #b to >> rule #c. Each kobject points to its owning module such that grabbing >> a kobject aut

[RFD driver-core] Lifetime problems of the current driver model

2007-03-30 Thread Tejun Heo
Hello, all. This document tries to describe lifetime problems of the current device driver model primarily from the point view of device drivers and establish consensus, or at least, start discussion about how to solve these problems. This is primarily based on my experience with IDE and SCSI la

Re: [patch 2/3] libata: expose AN support to user space via sysfs

2007-03-28 Thread Tejun Heo
Jeff Garzik wrote: AN is a generic concept that I feel will propagate elsewhere. I think SCSI already has it or am I imagining things again? :-) Though perhaps it should be in a 'capability_flags' file rather than a 'media_change_event' file. IMHO, if it's genhd.capability_flags then the f

Re: [patch 2/3] libata: expose AN support to user space via sysfs

2007-03-28 Thread Tejun Heo
Jeff Garzik wrote: Kristen Carlson Accardi wrote: Allow user space to determine if an ATAPI device supports async notification (AN) of media changes. This is done by adding a new sysfs file "async_notification" to genhd. If the file reads 1, then the device supports async notification. If the

[PATCH scsi-misc-2.6] SCSI: kill sht->suspend/resume

2007-03-20 Thread Tejun Heo
suspend/resume() callbacks. This change is suggested by Christoph Hellwig. Signed-off-by: Tejun Heo <[EMAIL PROTECTED]> Cc: Christoph Hellwig <[EMAIL PROTECTED]> --- This patch breaks the existing libata suspend/resume support and thus should not be applied before libata is updated. So,

Re: [PATCH 2/3] sd: implement START/STOP management

2007-03-20 Thread Tejun Heo
James Bottomley wrote: > On Wed, 2007-03-21 at 02:08 +0900, Tejun Heo wrote: >> I got too comfortable with libata-dev#upstream and forgot to verify >> patches against scsi-misc-2.6. Sorry about that. If you don't have >> objection against the content, I'll resubmi

Re: [PATCH 2/3] sd: implement START/STOP management

2007-03-20 Thread Tejun Heo
Hello, Douglas. Douglas Gilbert wrote: > Tejun, > I note at this point that the IMMED bit in the > START STOP UNIT cdb is clear. [The code might > note that as well.] All SCSI disks that I have > seen, implement the IMMED bit and according to > the SAT standard, so should SAT layers like the > one

Re: [PATCH 2/3] sd: implement START/STOP management

2007-03-20 Thread Tejun Heo
James Bottomley wrote: > On Wed, 2007-03-21 at 00:13 +0900, Tejun Heo wrote: >> Implement SBC START/STOP management. sdev->mange_start_stop is added. >> When it's set to one, sd STOPs the device on suspend and shutdown and >> STARTs it on resume. sdev->manag

[PATCH 4/4] libata: implement libata.spindown_compat

2007-03-20 Thread Tejun Heo
f so, write 1 to it and continue; otherwise, fall through to #3. 3. Synchronize cache and spin down as before. } Signed-off-by: Tejun Heo <[EMAIL PROTECTED]> --- Henrique, does it look good enough? How do we coordinate this with distributions? I can take care of suse and I guess A

[PATCH 3/4] libata: reimplement suspend/resume support using sdev->manage_start_stop

2007-03-20 Thread Tejun Heo
csi_slave_config(). This fixes spindown on shutdown and suspend-to-disk. Signed-off-by: Tejun Heo <[EMAIL PROTECTED]> --- drivers/ata/ahci.c |4 drivers/ata/ata_generic.c |6 - drivers/ata/ata_piix.c |4 drivers/ata/libata-core.c | 39

[PATCH 2/3] sd: implement START/STOP management

2007-03-20 Thread Tejun Heo
figuration but is exported under scsi_disk sysfs node as sdev->allow_restart is. When manage_start_stop is zero (the default value), this patch doesn't introduce any behavior change. Signed-off-by: Tejun Heo <[EMAIL PROTECTED]> --- drivers/scsi/scsi_sysfs.c | 31

[PATCH 1/3] sd: fix return value of sd_sync_cache()

2007-03-20 Thread Tejun Heo
sd_sync_cache() should return -errno on error, fix it. Signed-off-by: Tejun Heo <[EMAIL PROTECTED]> --- drivers/scsi/sd.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) Index: work/drivers/scsi/sd.c === --- wor

Re: [PATCH] libata: fix probe_ent alloc/free bugs

2007-02-20 Thread Tejun Heo
Tejun Heo wrote: > ata_probe_ent_alloc() had a temporary hack such that devm_kzalloc() > was used for allocation if devres had been previously initialized on > the device; otherwise, plain kzalloc() was used. This was to make the > code useable from both the old and devres-aware li

[PATCH] libata: fix probe_ent alloc/free bugs

2007-02-17 Thread Tejun Heo
hack made ata_sas_port_alloc() unable to determine how the probe_ent is allocated, causing double free in some cases. Remove the now-unneeded hack and make ata_sas_port_alloc() use devm_kfree(). Signed-off-by: Tejun Heo <[EMAIL PROTECTED]> Cc: James Bottomley <[EMAIL PROTECTED]> --- J

[PATCH] libata: fix probe_ent free in ata_sas_port_alloc()

2007-02-17 Thread Tejun Heo
probe_ent is allocated using devm_kzalloc() and thus should be freed using devm_kfree(). ata_sas_port_alloc() freed its probe_ent using kfree() thus causing double free later. Signed-off-by: Tejun Heo <[EMAIL PROTECTED]> --- James, does this fix the bug you mentioned on IRC? diff -

Re: [PATCH 08/12] libsas: Unknown STP devices should be reported to libata as unknown.

2007-02-07 Thread Tejun Heo
Darrick J. Wong wrote: When libsas encounters a STP device whose protocol isn't recognized (i.e. not ATA or ATAPI), we should set the ata_device's class to ATA_DEV_UNKNOWN instead of ATA_DEV_ATA. Signed-off-by: Darrick J. Wong <[EMAIL PROTECTED]> --- drivers/scsi/libsas/sas_ata.c |2 +- 1

Re: [PATCH 04/12] sas_ata: ata_post_internal should abort the sas_task

2007-02-07 Thread Tejun Heo
Darrick J. Wong wrote: This patch adds a new field, lldd_task, to ata_queued_cmd so that libata users such as libsas can associate some data with a qc. The particular ambition with this patch is to associate a sas_task with a qc; that way, if libata decides to timeout a command, we can come back

Re: [PATCH 06/12] sas_ata: Implement SATA PHY control

2007-02-07 Thread Tejun Heo
Darrick J. Wong wrote: This patch requires "libsas: Add a sysfs knob to enable/disable a phy" to be applied. It hooks the SControl write function to provide basic SATA phy control for phy enable/disable and speed limits. Power management is still broken, though it is unclear that libata actuall

Re: [PATCH] sd: implement stop_on_shutdown

2007-02-05 Thread Tejun Heo
James Bottomley wrote: > There are practical problems to handling this in sd, namely that the > power handling commands and state model are part of the ATA command set, > not part of the SCSI command set. SAT really only covers the basics of > mapping the different power management models. I see.

Re: [PATCH] RESEND: SCSI, libata: add support for ATA_16 commands to libata ATAPI devices

2007-02-01 Thread Tejun Heo
Jeff Garzik wrote: > Tejun Heo wrote: >> SCSI always uses the smallest command it can use, so we're safe. Most >> other commands are issued directly from the userland and it's their >> responsibility not to feed disallowed commands to a device (or we need >>

Re: [PATCH] RESEND: SCSI, libata: add support for ATA_16 commands to libata ATAPI devices

2007-02-01 Thread Tejun Heo
Jeff Garzik wrote: > Mark Lord wrote: >> For example, I think all existing ATAPI drives only speak 12-byte packet >> protocols, and so if we tell SCSI we're good for 16-byte, then won't the >> SCSI layer suddenly start sending us READ_16 and the like? > > Speaking strictly about the device, IDENTI

Re: [PATCH] RESEND: SCSI, libata: add support for ATA_16 commands to libata ATAPI devices

2007-01-31 Thread Tejun Heo
Mark Lord wrote: > Tejun Heo wrote: >> Mark Lord wrote: >> .. >>> So, to achieve ATA passthru capability for libata ATAPI, >>> we have to instead use the ATA_16 opcode: a 16-byte command. >>> >>> SCSI normally disallows issuing 16-byte commands t

Re: [PATCH] RESEND: SCSI, libata: add support for ATA_16 commands to libata ATAPI devices

2007-01-31 Thread Tejun Heo
Mark Lord wrote: > In an ideal world, we would use the existing ATA_12 opcode > to issue 12-byte ATA passthrough commands for libata ATAPI drives > from userspace. > > But ATA_12 happens to have the same SCSI opcode value as the older > CD/RW "BLANK" command, widely used by cdrecord and friends. >

Re: [PATCH] sd: implement stop_on_shutdown

2007-01-20 Thread Tejun Heo
Jeff Garzik wrote: > Tejun Heo wrote: >> For ATA, it's currently being done inside libata proper (a bit ugly). >> It would be nice to have those implemented at sd layer but I wonder how >> useful it's going to be for actual SCSI devices. Do people actually >>

Re: [PATCH] sd: implement stop_on_shutdown

2007-01-19 Thread Tejun Heo
Darrick J. Wong wrote: > Tejun Heo wrote: >> sd doesn't stop (unload head) on shutdown. This behavior is necessary >> for multi initiator cases. Unloading head by powering off stresses >> the drive and sometimes produces distinct clunking noise which >> appar

Re: [PATCH] sd: implement stop_on_shutdown

2007-01-19 Thread Tejun Heo
Hello, Douglas. Douglas Gilbert wrote: >> This patch implements sd attribute stop_on_shutdown. If set to 1, sd >> stops the drive on non-restarting shutdown. stop_on_shutdown is >> initialized from sd parameter stop_on_shutdown_default which defaults >> to 0. So, this patch does not change the

[PATCH] sd: implement stop_on_shutdown

2007-01-19 Thread Tejun Heo
parameter stop_on_shutdown_default which defaults to 0. So, this patch does not change the default behavior. Signed-off-by: Tejun Heo <[EMAIL PROTECTED]> Acked-by: Henrique de Moraes Holschuh <[EMAIL PROTECTED]> diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 978bfc1..f21e5fe 100644 -

Re: [PATCH] libata: initialize qc->dma_dir to DMA_NONE

2007-01-17 Thread Tejun Heo
James Bottomley wrote: > This looks perfectly fine as a possible solution. Is there any reason > not to initialise qc->dma_dir unconditionally from the SCSI command? That should work too. I did what I did because it was more in line with what the current code assumed and initializing the field o

[PATCH] libata: initialize qc->dma_dir to DMA_NONE

2007-01-16 Thread Tejun Heo
is problem has been spotted by James Bottomley. Signed-off-by: Tejun Heo <[EMAIL PROTECTED]> Cc: James Bottomley <[EMAIL PROTECTED]> diff --git a/include/linux/libata.h b/include/linux/libata.h index 7cfc18f..925ad7f 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h @

[PATCH] SCSI: fix error code check in sr_block_ioctl()

2007-01-02 Thread Tejun Heo
sr_block_ioctl() should proceed to SCSI ioctls if cdrom_ioctl() returns -ENOSYS. However it tested for ENOSYS instead of -ENOSYS rendering all SCSI ioctls other than GET_IDLUN and GET_BUS_NUMBER inaccessible. Fix it. Signed-off-by: Tejun Heo <[EMAIL PROTECTED]> diff --git a/drivers/scsi/

[PATCH -stable] SCSI: add missing cdb clearing in scsi_execute()

2006-12-16 Thread Tejun Heo
/focus=14605 Signed-off-by: Tejun Heo <[EMAIL PROTECTED]> diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 1748e27..644f711 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -191,6 +191,7 @@ int scsi_execute(struct scsi_device *sdev, const unsigned cha

[PATCH 2/2] SCSI: revert clear-garbage-after-CDB fix

2006-12-16 Thread Tejun Heo
Upper layer is already passing in enough information via req->cmd_len and requiring it to do the same thing twice makes it easy to miss - scsi_execute() doesn't do it. Now that libata is updated to handle garbage after CDB, remove unnecessary CDB clearing. Signed-off-by: Tejun Heo

[PATCH] [PATCH] libata: take scmd->cmd_len into account when translating SCSI commands

2006-12-16 Thread Tejun Heo
to access more than just CDB and they have already been accessing scmd via qc->scsicmd. Just pass in qc. * Variable names are normalized. scsi_cmnd is scmd and CDB, cdb. Signed-off-by: Tejun Heo <[EMAIL PROTECTED]> Cc: Jens Axboe <[EMAIL PROTECTED]> Cc: Douglas Gilbert <[E

Re: [PATCH RESEND 2/2] SCSI: add scsi_device->retries

2006-11-19 Thread Tejun Heo
Hello, Kai Makisara wrote: * st uses three retry limits - MAX_RETRIES, MAX_WRITE_RETRIES and MAX_READY_RETRIES, which are all zero. This patch only converts MAX_RETRIES to sdev->retries. Defining WRITE and READY retries in terms of sdev->retries would make more sense. I am neither ackin

Re: [PATCH RESEND 1/2] SCSI: use scsi_device->timeout consistently

2006-11-19 Thread Tejun Heo
Kai Makisara wrote: On Sun, 19 Nov 2006, Tejun Heo wrote: Each high level driver uses scsi_device->timeout diffrently. ... Index: scsi-misc-2.6/drivers/scsi/st.c === --- scsi-misc-2.6.orig/drivers/scsi/st.c +++ scsi-misc-

[PATCH RESEND 2/2] SCSI: add scsi_device->retries

2006-11-19 Thread Tejun Heo
ilure. * st uses three retry limits - MAX_RETRIES, MAX_WRITE_RETRIES and MAX_READY_RETRIES, which are all zero. This patch only converts MAX_RETRIES to sdev->retries. Defining WRITE and READY retries in terms of sdev->retries would make more sense. Signed-off-by: Tejun Heo <[EMAIL PRO

[PATCH RESEND 1/2] SCSI: use scsi_device->timeout consistently

2006-11-19 Thread Tejun Heo
ch as IOCTL_TIMEOUT and scsi/osst_tape->long_timeout. This patch also adds sdev local variable for shorter notation where multiple references to sdev are added. Signed-off-by: Tejun Heo <[EMAIL PROTECTED]> --- Sorry, the original post had [EMAIL PROTECTED] instead of [EMAIL PR

Re: [RFC] SCSI EH document

2005-09-07 Thread Tejun Heo
Hello, Jeff & James. Jeff Garzik wrote: Tejun Heo wrote: Hello, fellow SCSI/ATA developers. This is the first draft of SCSI EH document. This document tries to describe how SCSI EH works and what choirs should be done to maintain SCSI midlayer integrity. It's intended

Re: [RFC] libata new EH document

2005-08-31 Thread Tejun Heo
Hello, Luben. Luben Tuikov wrote: --- Tejun Heo <[EMAIL PROTECTED]> wrote: As implementing autosensing will probably need rewriting failed qc for REQUEST SENSE command, I'm opposing it. My proposal is to do the following, which, in effect, should be equivalent to autosensing

Re: [RFC] libata new EH document

2005-08-31 Thread Tejun Heo
Hi, Luben. On Wed, Aug 31, 2005 at 08:30:27PM -0700, Luben Tuikov wrote: > --- Tejun Heo <[EMAIL PROTECTED]> wrote: > > IMHO, it's a good idea to maintain one qc to one ATA/ATAPI command > > mapping as long as possible. And, in the suggested framework, it

<    1   2   3   4   5   6   7   8   >