[patch 19/20] SCSI: save disk in scsi_device

2007-05-11 Thread akpm
From: Kristen Carlson Accardi [EMAIL PROTECTED] Give anyone who has access to scsi_device access to the genhd struct as well. Signed-off-by: Kristen Carlson Accardi [EMAIL PROTECTED] Signed-off-by: Andrew Morton [EMAIL PROTECTED] --- drivers/scsi/sd.c |1 + drivers/scsi/sr.c

[patch 18/20] genhd: send async notification on media change

2007-05-11 Thread akpm
From: Kristen Carlson Accardi [EMAIL PROTECTED] Send an uevent to user space to indicate that a media change event has occurred. Signed-off-by: Kristen Carlson Accardi [EMAIL PROTECTED] Signed-off-by: Andrew Morton [EMAIL PROTECTED] --- block/genhd.c | 23 +++

[patch 20/20] libata: send event when AN received

2007-05-11 Thread akpm
From: Kristen Carlson Accardi [EMAIL PROTECTED] When we get an SDB FIS with the 'N' bit set, we should send an event to user space to indicate that there has been a media change. This will be done via the block device. Signed-off-by: Kristen Carlson Accardi [EMAIL PROTECTED] Signed-off-by:

[PATCH/RFC 0/7] libata: push part of irq driven pio to workqueue

2007-05-11 Thread Albert Lee
1/7: set the state after PIO data-in to HSM_ST_IDLE instead of HSM_ST_LAST 2/7: fix the ata_altstatus() in ata_hsm_qc_complete() 3/7: move ata_altstatus() out from ata_hsm_move() to the pio data xfer functions 4/7: move polling idle irq check to ata_host_intr() 5/7: move and reduce locking to the

[PATCH/RFC] Fix build failure for drivers/ata/pata_scc.c

2007-05-11 Thread Tony Breeds
The commit d4b2bab4f26345ea1803feb23ea92fbe3f6b77bc added deadline support to prereset and reset methods to libbata the pata_scc driver wasn't converted. This patch is a naive attempt to bring this driver up to scratch. Build failures are: drivers/ata/pata_scc.c: In function 'scc_pata_prereset':

[PATCH 2/7] libata: move the ata_altstatus() in ata_hsm_qc_complete()

2007-05-11 Thread Albert Lee
patch 2/7: Calling ata_altstatus() after the qc completed looks incorrect. Move it to before the qc is completed. Signed-off-by: Albert Lee [EMAIL PROTECTED] --- diff -Nrup 01_last_idle/drivers/ata/libata-core.c 02_flush_fix/drivers/ata/libata-core.c --- 01_last_idle/drivers/ata/libata-core.c

[PATCH 3/7] libata: move ata_altstatus() out to the pio data xfer functions

2007-05-11 Thread Albert Lee
patch 3/7: move ata_altstatus() out from ata_hsm_move() to the pio data xfer functions. Functions like ata_pio_sectors() and atapi_pio_bytes() know better if the flush is needed. Signed-off-by: Albert Lee [EMAIL PROTECTED] --- diff -Nrup 02_flush_fix/drivers/ata/libata-core.c

[PATCH 4/7] libata: move polling idle irq check to ata_host_intr()

2007-05-11 Thread Albert Lee
patch 4/7: move the polling idle irq check from ata_interrupt() to ata_host_intr(), where it makes more sense. Signed-off-by: Albert Lee [EMAIL PROTECTED] --- diff -Nrup 03_smart_flush/drivers/ata/libata-core.c 04_polling_check/drivers/ata/libata-core.c ---

[PATCH 5/7] libata: move and reduce locking to the pio data xfer functions

2007-05-11 Thread Albert Lee
patch 5/7: - move the locking out from the ata_hsm_move() to the data xfer functions like ata_pio_sectors(). - added the ATA_PFLAG_HSM_WQ (HSM running in workqueue) flag to serialize irq and workqueue. - the time holding ap-lock is reduced to last piece of pio transfer and clearing the

[PATCH 6/7] libata: push part of the irq driven pio out to workqueue

2007-05-11 Thread Albert Lee
patch 6/7: Push part of the irq driven pio out to workqueue. Signed-off-by: Albert Lee [EMAIL PROTECTED] --- It seems this creates new race condition with ata_exec_internal_sg() and EH? diff -Nrup 05_narrow_lock/drivers/ata/libata-core.c 06_irq_wq/drivers/ata/libata-core.c ---

[PATCH 7/7] libata: ack unexpected INTRQ when polling

2007-05-11 Thread Albert Lee
patch 7/7: ack unexpected INTRQ when polling. (Some device asserts INTRQ even if polling and nIEN = 1. http://bugzilla.kernel.org/show_bug.cgi?id=8441) Signed-off-by: Albert Lee [EMAIL PROTECTED] --- diff -Nrup 06_irq_wq/drivers/ata/libata-core.c 07_ack_random_irq/drivers/ata/libata-core.c ---

Re: [PATCH] Re: 2.6.19.1, sata_sil: sata dvd writer doesn't work

2007-05-11 Thread Tejun Heo
Hello, Harald Dunkel wrote: Hi Tejun, Setting the timeout to 15 did not help, either :-(. All your patches are still in, of course. Hmm... I'm out of ideas. I'll try it when I get back home. May 10 22:15:55 pluto kernel: ata2.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x2 frozen

Re: libata reset-seq merge broke sata_sil on sh

2007-05-11 Thread Tejun Heo
[cc'ing Gary Hade for GoVault drive, Hello] Hello, Paul. Paul Mundt wrote: On Thu, May 10, 2007 at 03:08:59PM +0200, Tejun Heo wrote: Paul Mundt wrote: The detection is simply flaky after that point, however before the current master it never hit the 35 second point (and thus never implied

sata_mv hotplug status?

2007-05-11 Thread Tomasz Chmielewski
I'm a little confused about sata_mv hotplug status. According to http://linux-ata.org/driver-status.html#marvell, the driver has full SATA control including hotplug. A bit down on that same page, the matrix http://linux-ata.org/driver-status.html#matrix says sata_mv - device hotplug: no.

Re: [patch 05/20] pata_acpi-restore-driver versus libata-clean-up-sff-init-mess

2007-05-11 Thread Tejun Heo
[EMAIL PROTECTED] wrote: From: Andrew Morton [EMAIL PROTECTED] If you apply both libata-clean-up-sff-init-mess.patch and pata_acpi-restore-driver.patch, you'll need to add this patch to pata_acpi-restore-driver.patch Cc: Tejun Heo [EMAIL PROTECTED] Cc: Alan Cox [EMAIL PROTECTED]

Re: [patch 08/20] drivers/ata: remove the wildcard from sata_nv driver

2007-05-11 Thread Tejun Heo
[EMAIL PROTECTED] wrote: From: Peer Chen [EMAIL PROTECTED] Because nvidia SATA controllers onward base on AHCI, so wildcard in sata_nv driver is unnecessary. Also the wildcard sometimes cause sata_nv driver to be loaded for AHCI controllers,which is not as expected. Signed-off-by: Peer

Re: [patch 09/20] Add the combined mode for ATI SB700

2007-05-11 Thread Tejun Heo
[EMAIL PROTECTED] wrote: From: Henry Su [EMAIL PROTECTED] Besides those modes in ATI SB600 SATA controller, ATI SB700 supports one more mode:the combined mode. The combined mode is a Legacy IDE mode used for compatibility with some old OS without AHCI driver, but now it is not necessary

Re: [patch 01/20] git-libata-all: sata_via build fix

2007-05-11 Thread Tejun Heo
[EMAIL PROTECTED] wrote: From: Andrew Morton [EMAIL PROTECTED] Cc: Tejun Heo [EMAIL PROTECTED] Cc: Jeff Garzik [EMAIL PROTECTED] Signed-off-by: Andrew Morton [EMAIL PROTECTED] Acked-by: Tejun Heo [EMAIL PROTECTED] -- tejun - To unsubscribe from this list: send the line unsubscribe

Re: [patch 10/20] add the ATI SB700 SATA controller device id to AHCI pci table

2007-05-11 Thread Tejun Heo
[EMAIL PROTECTED] wrote: From: Henry Su [EMAIL PROTECTED] Add the device ID to AHCI pci table for ATI SB700 SATA controller, the subsequent chipset of SB600. Signed-off-by: henry su[EMAIL PROTECTED] Cc: Jeff Garzik [EMAIL PROTECTED] Cc: Tejun Heo [EMAIL PROTECTED] Signed-off-by: Andrew

Re: [PATCH/RFC] Fix build failure for drivers/ata/pata_scc.c

2007-05-11 Thread Tejun Heo
Tony Breeds wrote: The commit d4b2bab4f26345ea1803feb23ea92fbe3f6b77bc added deadline support to prereset and reset methods to libbata the pata_scc driver wasn't converted. This patch is a naive attempt to bring this driver up to scratch. Build failures are: drivers/ata/pata_scc.c: In

[PATCH] libata: fallback to the other IDENTIFY on device error, take#2

2007-05-11 Thread Tejun Heo
It seems the world isn't as frank as we thought and some devices lie about who they are. Fallback to the other IDENTIFY if IDENTIFY is aborted by the device. As this is the strategy used by IDE for a long time, it shouldn't cause too much problem. Signed-off-by: Tejun Heo [EMAIL PROTECTED] Cc:

[PATCH] libata: give devices one last chance even if recovery failed with -EINVAL

2007-05-11 Thread Tejun Heo
After certain errors, some devices report complete garbage on IDENTIFY. This can cause ata_dev_read_id() to fail with -EINVAL resulting in immediate disabling of the device. Give the device one last chance after -EINVAL to allow recovery from such situations. As -EINVAL is triggered very

Re: [PATCH 5/7] libata: move and reduce locking to the pio data xfer functions

2007-05-11 Thread Tejun Heo
Albert Lee wrote: -static void ata_pio_sector(struct ata_queued_cmd *qc, int last) +static void ata_pio_sector(struct ata_queued_cmd *qc, int last, int lock) I think the naming of @lock is a bit confusing here. @clr_hsm_wq or @last_sector, maybe? + if (lock) { +

Re: [PATCH 5/7] libata: move and reduce locking to the pio data xfer functions

2007-05-11 Thread Tejun Heo
Alan Cox wrote: I'd say this is a non-starter. It solves nothing and means PIO in libata is still basically unusable. It doesn't solve the problem completely but still helps, FWIW. I was Most transfers for PIO are a single 512 byte transfer per command. Not for disks but, yeah, who uses

Re: [PATCH 4/7] libata: move polling idle irq check to ata_host_intr()

2007-05-11 Thread Tejun Heo
Albert Lee wrote: patch 4/7: move the polling idle irq check from ata_interrupt() to ata_host_intr(), where it makes more sense. Signed-off-by: Albert Lee [EMAIL PROTECTED] --- diff -Nrup 03_smart_flush/drivers/ata/libata-core.c 04_polling_check/drivers/ata/libata-core.c ---

Re: [PATCH 5/7] libata: move and reduce locking to the pio data xfer functions

2007-05-11 Thread Alan Cox
Aieee, we have to transfer the whole last sector while holding the spin lock and IRQ disabled. That's sad but pushing locking into -data_xfer doesn't sound attractive either. Any better ideas? I'd say this is a non-starter. It solves nothing and means PIO in libata is still basically

Re: [PATCH 5/7] libata: move and reduce locking to the pio data xfer functions

2007-05-11 Thread Tejun Heo
Alan Cox wrote: Aieee, we have to transfer the whole last sector while holding the spin lock and IRQ disabled. That's sad but pushing locking into -data_xfer doesn't sound attractive either. Any better ideas? I'd say this is a non-starter. It solves nothing and means PIO in libata is

Re: [PATCH 5/7] libata: move and reduce locking to the pio data xfer functions

2007-05-11 Thread Alan Cox
The problem is that controllers queue IRQ till the end of transfer and raise it right after the last transfer completes. If WQ-active-ignore-IRQ flag is set at that point we're not holding the lock, the IRQ handler will ignore the IRQ without clearing it, so we get nobody-cared right after

Re: [PATCH 5/7] libata: move and reduce locking to the pio data xfer functions

2007-05-11 Thread Alan Cox
On Fri, 11 May 2007 17:14:35 +0200 Tejun Heo [EMAIL PROTECTED] wrote: Alan Cox wrote: I'd say this is a non-starter. It solves nothing and means PIO in libata is still basically unusable. It doesn't solve the problem completely but still helps, FWIW. I was Most transfers for PIO are

Re: [PATCH 4/7] libata: move polling idle irq check to ata_host_intr()

2007-05-11 Thread Albert Lee
Tejun Heo wrote: diff -Nrup 03_smart_flush/drivers/ata/libata-core.c 04_polling_check/drivers/ata/libata-core.c --- 03_smart_flush/drivers/ata/libata-core.c 2007-05-11 10:24:19.0 +0800 +++ 04_polling_check/drivers/ata/libata-core.c2007-05-11 10:25:09.0 +0800 @@

Re: [PATCH 5/7] libata: move and reduce locking to the pio data xfer functions

2007-05-11 Thread Albert Lee
Tejun Heo wrote: Albert Lee wrote: -static void ata_pio_sector(struct ata_queued_cmd *qc, int last) +static void ata_pio_sector(struct ata_queued_cmd *qc, int last, int lock) I think the naming of @lock is a bit confusing here. @clr_hsm_wq or @last_sector, maybe? How about

Re: [PATCH] libata: add human-readable error value decoding

2007-05-11 Thread Chuck Ebbert
Robert Hancock wrote: + ehc-i.serror SERR_TRANS_ST_ERROR ? TransStatTransErr : , + ehc-i.serror SERR_UNRECOG_FIS ? UnrecogFIS : , + ehc-i.serror SERR_DEV_XCHG ? DevExchanged : ); I'm not really convinced whether this is necessary. The human readable form

Re: [PATCH 5/7] libata: move and reduce locking to the pio data xfer functions

2007-05-11 Thread Tejun Heo
Alan Cox wrote: The problem is that controllers queue IRQ till the end of transfer and raise it right after the last transfer completes. If WQ-active-ignore-IRQ flag is set at that point we're not holding the lock, the IRQ handler will ignore the IRQ without clearing it, so we get

Re: [PATCH 5/7] libata: move and reduce locking to the pio data xfer functions

2007-05-11 Thread Tejun Heo
Albert Lee wrote: Tejun Heo wrote: Albert Lee wrote: -static void ata_pio_sector(struct ata_queued_cmd *qc, int last) +static void ata_pio_sector(struct ata_queued_cmd *qc, int last, int lock) I think the naming of @lock is a bit confusing here. @clr_hsm_wq or @last_sector, maybe? How

Re: [PATCH 5/7] libata: move and reduce locking to the pio data xfer functions

2007-05-11 Thread Tejun Heo
Albert Lee wrote: Tejun Heo wrote: Albert Lee wrote: -static void ata_pio_sector(struct ata_queued_cmd *qc, int last) +static void ata_pio_sector(struct ata_queued_cmd *qc, int last, int lock) I think the naming of @lock is a bit confusing here. @clr_hsm_wq or @last_sector, maybe? How

Re: [PATCH] libata: add human-readable error value decoding

2007-05-11 Thread Tejun Heo
Chuck Ebbert wrote: Robert Hancock wrote: + ehc-i.serror SERR_TRANS_ST_ERROR ? TransStatTransErr : , + ehc-i.serror SERR_UNRECOG_FIS ? UnrecogFIS : , + ehc-i.serror SERR_DEV_XCHG ? DevExchanged : ); I'm not really convinced whether this is necessary. The

Re: [PATCH 5/7] libata: move and reduce locking to the pio data xfer functions

2007-05-11 Thread Alan Cox
That would be the cleanest way to do it but I'm not sure whether all controllers can live with that. If I understand correctly, Some controllers just have to have the whole transfer done atomically. I think Alan knows much better about this. Alan? Those controllers already do a local IRQ

Re: [PATCH 5/7] libata: move and reduce locking to the pio data xfer functions

2007-05-11 Thread Alan Cox
clear_bit(COMPLETION_RUN, -flags); xfer bytes if (test_and_set_bit(COMPLETION_RUN, -flags) == 0) run_completion_routine(); -active-ignore-irq = 0; and in the IRQ case after checking we are not active-ignore-IRQ we similarly do if

Re: [PATCH 5/7] libata: move and reduce locking to the pio data xfer functions

2007-05-11 Thread Tejun Heo
Alan Cox wrote: That would be the cleanest way to do it but I'm not sure whether all controllers can live with that. If I understand correctly, Some controllers just have to have the whole transfer done atomically. I think Alan knows much better about this. Alan? Those controllers

Re: [PATCH 5/7] libata: move and reduce locking to the pio data xfer functions

2007-05-11 Thread Tejun Heo
Alan Cox wrote: Now if we are unlucky and the IRQ gets in between the last byte of transfer and clearing the active ignore IRQ flag we will still run the completion handler I don't really get this. What happens if the IRQ is shared and the other device raises interrupt while the data

Re: sata_mv hotplug status?

2007-05-11 Thread Jeff Garzik
Tomasz Chmielewski wrote: I'm a little confused about sata_mv hotplug status. According to http://linux-ata.org/driver-status.html#marvell, the driver has full SATA control including hotplug. A bit down on that same page, the matrix http://linux-ata.org/driver-status.html#matrix says

[PATCH pata-2.6 fix queue] aec62xx: rework init_setup_aec6x80()

2007-05-11 Thread Sergei Shtylyov
Rework init_setup_aec6x80() so that it won't rewrite the constant name strings anymore -- in order to do this: - in aec62xx_init_one(), pass a local copy of 'struct pci_device_id' down the call chain; - change the names for in aec62xx_chipsets[] to default to AEC-6280[R]; - override the

Re: [PATCH 1/2] libata: reimplement suspend/resume support using sdev-manage_start_stop

2007-05-11 Thread Jeff Garzik
Tejun Heo wrote: Jeff Garzik wrote: Tejun Heo wrote: Reimplement suspend/resume support using sdev-manage_start_stop. * Device suspend/resume is now SCSI layer's responsibility and the code is simplified a lot. * DPM is dropped. This also simplifies code a lot. Suspend/resume status is

[PATCH pata-2.6 fix queue] aec62xx: kill speedproc() method wrapper

2007-05-11 Thread Sergei Shtylyov
There's no reason to have the speedproc() method wrapper for the two quite different chip families, so just get rid of it. Signed-off-by: Sergei Shtylyov [EMAIL PROTECTED] --- The patch should apply somewhere near the start of pata-2.6 patchset. Warning: the patch has only been compile tested.

Re: [PATCH 5/7] libata: move and reduce locking to the pio data xfer functions

2007-05-11 Thread Alan Cox
This case is where I fail to understand how it's supposed to work. If IRQ beats the clearing of the ignore irq flag execution of completion routine from wq, it ignores the IRQ, right? The IRQ line remains I was assuming your polling handler would be polling and clearing the IRQ status

Re: [PATCH] libata: ignore EH scheduling during initialization

2007-05-11 Thread Jeff Garzik
Tejun Heo wrote: libata enables SCSI host during ATA host activation which happens after IRQ handler is registered and IRQ is enabled. All ATA ports are in frozen state when IRQ is enabled but frozen ports may raise limited number of IRQs after being frozen - IOW, -freeze() is not responsible

Re: [PATCH] libata: fallback to the other IDENTIFY on device error, take#2

2007-05-11 Thread Jeff Garzik
Tejun Heo wrote: It seems the world isn't as frank as we thought and some devices lie about who they are. Fallback to the other IDENTIFY if IDENTIFY is aborted by the device. As this is the strategy used by IDE for a long time, it shouldn't cause too much problem. Signed-off-by: Tejun Heo

Re: [PATCH] libata: fallback to the other IDENTIFY on device error, take#2

2007-05-11 Thread Jeff Garzik
Tejun Heo wrote: + if (class == ATA_DEV_ATA) + class = ATA_DEV_ATAPI; + else + class = ATA_DEV_ATA; the 'else' branch is obviously redundant - To unsubscribe from this list: send the line

Re: [PATCH 03/11] libata-acpi: s/CONFIG_SATA_ACPI/CONFIG_ATA_ACPI/

2007-05-11 Thread Jeff Garzik
Tejun Heo wrote: ACPI applies to both SATA and PATA. Drop the 'S' from the config variable. Signed-off-by: Tejun Heo [EMAIL PROTECTED] --- drivers/ata/Kconfig| 26 +- drivers/ata/Makefile |2 +- drivers/ata/libata.h |2 +- include/linux/libata.h |

Re: [patch 12/20] libata-core: convert to use cancel_rearming_delayed_work()

2007-05-11 Thread Jeff Garzik
[EMAIL PROTECTED] wrote: From: Oleg Nesterov [EMAIL PROTECTED] We should not use cancel_work_sync(delayed_work-work). This works, but not good. We can use cancel_rearming_delayed_work(), this also simplifies the code. Signed-off-by: Oleg Nesterov [EMAIL PROTECTED] Signed-off-by: Andrew Morton

Re: [patch 01/20] git-libata-all: sata_via build fix

2007-05-11 Thread Jeff Garzik
[EMAIL PROTECTED] wrote: From: Andrew Morton [EMAIL PROTECTED] Cc: Tejun Heo [EMAIL PROTECTED] Cc: Jeff Garzik [EMAIL PROTECTED] Signed-off-by: Andrew Morton [EMAIL PROTECTED] --- drivers/ata/sata_via.c |4 1 file changed, 4 deletions(-) applied - To unsubscribe from this list:

Re: [patch 07/20] pata_pcmcia: recognize 2GB CompactFlash from Transcend

2007-05-11 Thread Jeff Garzik
[EMAIL PROTECTED] wrote: From: Aeschbacher, Fabrice [EMAIL PROTECTED] Allow the pata_pcmcia driver to automatically detect 2GB CompactFlash cards from Transcend. Signed-off-by: Fabrice Aeschbacher [EMAIL PROTECTED] Cc: Peter Stuge [EMAIL PROTECTED] Acked-by: Alan Cox [EMAIL PROTECTED] Cc:

Re: [patch 09/20] Add the combined mode for ATI SB700

2007-05-11 Thread Jeff Garzik
[EMAIL PROTECTED] wrote: From: Henry Su [EMAIL PROTECTED] Besides those modes in ATI SB600 SATA controller, ATI SB700 supports one more mode:the combined mode. The combined mode is a Legacy IDE mode used for compatibility with some old OS without AHCI driver, but now it is not necessary for

Re: [patch 10/20] add the ATI SB700 SATA controller device id to AHCI pci table

2007-05-11 Thread Jeff Garzik
[EMAIL PROTECTED] wrote: From: Henry Su [EMAIL PROTECTED] Add the device ID to AHCI pci table for ATI SB700 SATA controller, the subsequent chipset of SB600. Signed-off-by: henry su[EMAIL PROTECTED] Cc: Jeff Garzik [EMAIL PROTECTED] Cc: Tejun Heo [EMAIL PROTECTED] Signed-off-by: Andrew Morton

Re: [patch 13/20] Use menuconfig objects: libata

2007-05-11 Thread Jeff Garzik
[EMAIL PROTECTED] wrote: From: Jan Engelhardt [EMAIL PROTECTED] Use menuconfigs instead of menus, so the whole menu can be disabled at once instead of going through all options. Signed-off-by: Jan Engelhardt [EMAIL PROTECTED] Cc: Jeff Garzik [EMAIL PROTECTED] Signed-off-by: Andrew Morton

Re: [PATCH] pata_platform: don't use generic ata_port_start

2007-05-11 Thread Jeff Garzik
Olof Johansson wrote: Hi, I have a system where I have a simple IDE controller that sits on a local bus without bus master dma capability, and thus no dma_mapping ops defined for the device/bus. pata_platform works great for me, with the exception of using the generic ata_port_start which

Re: [PATCH] libata: add human-readable error value decoding

2007-05-11 Thread Jeff Garzik
Robert Hancock wrote: The ATA ones are more of a pain in that regard than SCSI though - SCSI has all distinct error codes for different errors, whereas ATA has bitmasks for everything.. That should not affect implementation. Either way, a table-driven approach can easily work. I favor

Re: libata reset-seq merge broke sata_sil on sh

2007-05-11 Thread Paul Mundt
On Fri, May 11, 2007 at 11:39:20AM +0200, Tejun Heo wrote: Paul Mundt wrote: Bumping the hardreset delay up does indeed fix it, I've had to bump it up to 1200 before it started working (at 600 it still fails): [0.967379] scsi0 : sata_sil [0.970425] scsi1 : sata_sil [