[SCSI] qla1280: fix 32 bit segment code

2008-01-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3a43e69ce50d467ded2f17f6e571e831d3677ab5
Commit: 3a43e69ce50d467ded2f17f6e571e831d3677ab5
Parent: fd0b45dfd1858c6b49d06355a460bcf36d654c06
Author: FUJITA Tomonori [EMAIL PROTECTED]
AuthorDate: Tue Jan 8 23:07:01 2008 +0900
Committer:  James Bottomley [EMAIL PROTECTED]
CommitDate: Wed Jan 9 15:06:07 2008 -0600

[SCSI] qla1280: fix 32 bit segment code

There's an error remaining in the 32 bit descriptor code after the
conversion to dma accessors:  req_cnt is left uninitialised.

qla1280_32bit_start_scsi gives the following warnings:

drivers/scsi/qla1280.c: In function 'qla1280_32bit_start_scsi':
drivers/scsi/qla1280.c:3044: warning: unused variable 'dma_handle'
drivers/scsi/qla1280.c: In function 'qla1280_queuecommand':
drivers/scsi/qla1280.c:3060: warning: 'req_cnt' is used uninitialized in 
this function
drivers/scsi/qla1280.c:3042: note: 'req_cnt' was declared here

Signed-off-by: FUJITA Tomonori [EMAIL PROTECTED]
Signed-off-by: James Bottomley [EMAIL PROTECTED]
---
 drivers/scsi/qla1280.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/scsi/qla1280.c b/drivers/scsi/qla1280.c
index 146d540..2886407 100644
--- a/drivers/scsi/qla1280.c
+++ b/drivers/scsi/qla1280.c
@@ -3041,7 +3041,6 @@ qla1280_32bit_start_scsi(struct scsi_qla_host *ha, struct 
srb * sp)
int cnt;
int req_cnt;
int seg_cnt;
-   dma_addr_t dma_handle;
u8 dir;
 
ENTER(qla1280_32bit_start_scsi);
@@ -3050,6 +3049,7 @@ qla1280_32bit_start_scsi(struct scsi_qla_host *ha, struct 
srb * sp)
cmd-cmnd[0]);
 
/* Calculate number of entries and segments required. */
+   req_cnt = 1;
seg_cnt = scsi_dma_map(cmd);
if (seg_cnt) {
/*
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


NFSv4: Give the lock stateid its own sequence queue

2008-01-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d0dc3701cb46f73cf8ca393f62e325065b0bbd03
Commit: d0dc3701cb46f73cf8ca393f62e325065b0bbd03
Parent: 3a43e69ce50d467ded2f17f6e571e831d3677ab5
Author: Trond Myklebust [EMAIL PROTECTED]
AuthorDate: Thu Jan 10 16:07:54 2008 -0500
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Thu Jan 10 13:35:32 2008 -0800

NFSv4: Give the lock stateid its own sequence queue

Sharing the open sequence queue causes a deadlock when we try to take
both a lock sequence id and and open sequence id.

This fixes the regression reported by Dimitri Puzin and Jeff Garzik: See

http://bugzilla.kernel.org/show_bug.cgi?id=9712

for details.

Reported-and-tested-by: Dimitri Puzin [EMAIL PROTECTED]
Signed-off-by: Trond Myklebust [EMAIL PROTECTED]
Tested-by: Jeff Garzik [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 fs/nfs/nfs4_fs.h   |1 +
 fs/nfs/nfs4state.c |5 -
 2 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/fs/nfs/nfs4_fs.h b/fs/nfs/nfs4_fs.h
index b35069a..bd1b9d6 100644
--- a/fs/nfs/nfs4_fs.h
+++ b/fs/nfs/nfs4_fs.h
@@ -115,6 +115,7 @@ struct nfs4_lock_state {
 #define NFS_LOCK_INITIALIZED 1
int ls_flags;
struct nfs_seqid_counterls_seqid;
+   struct rpc_sequence ls_sequence;
struct nfs_unique_idls_id;
nfs4_stateidls_stateid;
atomic_tls_count;
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
index 23a9a36..5a39c6f 100644
--- a/fs/nfs/nfs4state.c
+++ b/fs/nfs/nfs4state.c
@@ -509,7 +509,10 @@ static struct nfs4_lock_state 
*nfs4_alloc_lock_state(struct nfs4_state *state, f
lsp = kzalloc(sizeof(*lsp), GFP_KERNEL);
if (lsp == NULL)
return NULL;
-   lsp-ls_seqid.sequence = state-owner-so_sequence;
+   rpc_init_wait_queue(lsp-ls_sequence.wait, lock_seqid_waitqueue);
+   spin_lock_init(lsp-ls_sequence.lock);
+   INIT_LIST_HEAD(lsp-ls_sequence.list);
+   lsp-ls_seqid.sequence = lsp-ls_sequence;
atomic_set(lsp-ls_count, 1);
lsp-ls_owner = fl_owner;
spin_lock(clp-cl_lock);
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


ide: fix cable detection for SATA bridges

2008-01-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b98f8803ccfe9d156d37a6eb471a620904085c80
Commit: b98f8803ccfe9d156d37a6eb471a620904085c80
Parent: 90494893b5d2bf7533fb65accbfd8cbd6b51b9c3
Author: George Kibardin [EMAIL PROTECTED]
AuthorDate: Thu Jan 10 23:03:42 2008 +0100
Committer:  Bartlomiej Zolnierkiewicz [EMAIL PROTECTED]
CommitDate: Thu Jan 10 23:03:42 2008 +0100

ide: fix cable detection for SATA bridges

Signed-off-by: George Kibardin [EMAIL PROTECTED]
Signed-off-by: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED]
---
 drivers/ide/ide-iops.c |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c
index cef405d..bb9693d 100644
--- a/drivers/ide/ide-iops.c
+++ b/drivers/ide/ide-iops.c
@@ -612,12 +612,12 @@ u8 eighty_ninty_three (ide_drive_t *drive)
printk(KERN_DEBUG %s: skipping word 93 validity check\n,
  drive-name);
 
+   if (ide_dev_is_sata(id)  !ivb)
+   return 1;
+
if (hwif-cbl != ATA_CBL_PATA80  !ivb)
goto no_80w;
 
-   if (ide_dev_is_sata(id))
-   return 1;
-
/*
 * FIXME:
 * - force bit13 (80c cable present) check also for !ivb devices
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


ide: workaround suspend bug for ACPI IDE

2008-01-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=90494893b5d2bf7533fb65accbfd8cbd6b51b9c3
Commit: 90494893b5d2bf7533fb65accbfd8cbd6b51b9c3
Parent: fd0b45dfd1858c6b49d06355a460bcf36d654c06
Author: Shaohua Li [EMAIL PROTECTED]
AuthorDate: Thu Jan 10 23:03:42 2008 +0100
Committer:  Bartlomiej Zolnierkiewicz [EMAIL PROTECTED]
CommitDate: Thu Jan 10 23:03:42 2008 +0100

ide: workaround suspend bug for ACPI IDE

http://bugzilla.kernel.org/show_bug.cgi?id=9673

ACPI _PS3 cause S4 breaks in the second attempt. The system has a _PS3
method for IDE, which will call into SMM mode. Currently we haven't clue
why just the second attempt fails, as it's totally in BIOS code, so
blacklist the system so far for 2.6.24.

A possible suspect is ACPI NVS isn't save/restore, we will revisit the
bug after linux does ACPI NVS save/restore.

Bart:
- fix scripts/checkpatch.pl complaints
- const-ify ide_acpi_dmi_table[]

Signed-off-by: Shaohua Li [EMAIL PROTECTED]
Cc: Rafael J. Wysocki [EMAIL PROTECTED]
Reported-by: Mikko Vinni [EMAIL PROTECTED]
Signed-off-by: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED]
---
 drivers/ide/ide-acpi.c |   36 +++-
 1 files changed, 35 insertions(+), 1 deletions(-)

diff --git a/drivers/ide/ide-acpi.c b/drivers/ide/ide-acpi.c
index 89df48f..fe6768a 100644
--- a/drivers/ide/ide-acpi.c
+++ b/drivers/ide/ide-acpi.c
@@ -16,6 +16,7 @@
 #include acpi/acpi.h
 #include linux/ide.h
 #include linux/pci.h
+#include linux/dmi.h
 
 #include acpi/acpi_bus.h
 #include acpi/acnames.h
@@ -65,6 +66,37 @@ extern int ide_noacpi;
 extern int ide_noacpitfs;
 extern int ide_noacpionboot;
 
+static bool ide_noacpi_psx;
+static int no_acpi_psx(const struct dmi_system_id *id)
+{
+   ide_noacpi_psx = true;
+   printk(KERN_NOTICE%s detected - disable ACPI _PSx.\n, id-ident);
+   return 0;
+}
+
+static const struct dmi_system_id ide_acpi_dmi_table[] = {
+   /* Bug 9673. */
+   /* We should check if this is because ACPI NVS isn't save/restored. */
+   {
+   .callback = no_acpi_psx,
+   .ident= HP nx9005,
+   .matches  = {
+   DMI_MATCH(DMI_BIOS_VENDOR, Phoenix Technologies Ltd.),
+   DMI_MATCH(DMI_BIOS_VERSION, KAM1.60)
+   },
+   },
+};
+
+static int ide_acpi_blacklist(void)
+{
+   static int done;
+   if (done)
+   return 0;
+   done = 1;
+   dmi_check_system(ide_acpi_dmi_table);
+   return 0;
+}
+
 /**
  * ide_get_dev_handle - finds acpi_handle and PCI device.function
  * @dev: device to locate
@@ -623,7 +655,7 @@ void ide_acpi_set_state(ide_hwif_t *hwif, int on)
 {
int unit;
 
-   if (ide_noacpi)
+   if (ide_noacpi || ide_noacpi_psx)
return;
 
DEBPRINT(ENTER:\n);
@@ -668,6 +700,8 @@ void ide_acpi_init(ide_hwif_t *hwif)
struct ide_acpi_drive_link  *master;
struct ide_acpi_drive_link  *slave;
 
+   ide_acpi_blacklist();
+
hwif-acpidata = kzalloc(sizeof(struct ide_acpi_hwif_link), GFP_KERNEL);
if (!hwif-acpidata)
return;
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


trm290: do hook dma_host_{on,off} methods (take 2)

2008-01-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=93c0b5608086a103892aa78b7b83d7ecab60f7ab
Commit: 93c0b5608086a103892aa78b7b83d7ecab60f7ab
Parent: b98f8803ccfe9d156d37a6eb471a620904085c80
Author: Sergei Shtylyov [EMAIL PROTECTED]
AuthorDate: Thu Jan 10 23:03:42 2008 +0100
Committer:  Bartlomiej Zolnierkiewicz [EMAIL PROTECTED]
CommitDate: Thu Jan 10 23:03:42 2008 +0100

trm290: do hook dma_host_{on,off} methods (take 2)

Using default methods caused the chip's DMA PRD count registers, 
inadvertently
starting DMA!  While fixing it, also do:

- get rid of the 'ide_' prefixes in several functions for which the prefix 
in
  the method's name has been 'ide_' ectomized already;

- align the code hooking the IDE DMA methods in init_hwif_trm290()...

Signed-off-by: Sergei Shtylyov [EMAIL PROTECTED]
Signed-off-by: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED]
---
 drivers/ide/pci/trm290.c |   29 -
 1 files changed, 20 insertions(+), 9 deletions(-)

diff --git a/drivers/ide/pci/trm290.c b/drivers/ide/pci/trm290.c
index 0895e75..0151d7f 100644
--- a/drivers/ide/pci/trm290.c
+++ b/drivers/ide/pci/trm290.c
@@ -1,7 +1,8 @@
 /*
- *  linux/drivers/ide/pci/trm290.c Version 1.02Mar. 18, 2000
+ *  linux/drivers/ide/pci/trm290.c Version 1.05Dec. 26, 2007
  *
  *  Copyright (c) 1997-1998  Mark Lord
+ *  Copyright (c) 2007   MontaVista Software, Inc. [EMAIL PROTECTED]
  *  May be copied or modified under the terms of the GNU General Public License
  *
  *  June 22, 2004 - get rid of check_region
@@ -177,7 +178,7 @@ static void trm290_selectproc (ide_drive_t *drive)
trm290_prepare_drive(drive, drive-using_dma);
 }
 
-static void trm290_ide_dma_exec_cmd(ide_drive_t *drive, u8 command)
+static void trm290_dma_exec_cmd(ide_drive_t *drive, u8 command)
 {
BUG_ON(HWGROUP(drive)-handler != NULL);/* paranoia check */
ide_set_handler(drive, ide_dma_intr, WAIT_CMD, NULL);
@@ -185,7 +186,7 @@ static void trm290_ide_dma_exec_cmd(ide_drive_t *drive, u8 
command)
outb(command, IDE_COMMAND_REG);
 }
 
-static int trm290_ide_dma_setup(ide_drive_t *drive)
+static int trm290_dma_setup(ide_drive_t *drive)
 {
ide_hwif_t *hwif = drive-hwif;
struct request *rq = hwif-hwgroup-rq;
@@ -215,7 +216,7 @@ static int trm290_ide_dma_setup(ide_drive_t *drive)
return 0;
 }
 
-static void trm290_ide_dma_start(ide_drive_t *drive)
+static void trm290_dma_start(ide_drive_t *drive)
 {
 }
 
@@ -240,6 +241,14 @@ static int trm290_ide_dma_test_irq (ide_drive_t *drive)
return (status == 0x00ff);
 }
 
+static void trm290_dma_host_on(ide_drive_t *drive)
+{
+}
+
+static void trm290_dma_host_off(ide_drive_t *drive)
+{
+}
+
 static void __devinit init_hwif_trm290(ide_hwif_t *hwif)
 {
unsigned int cfgbase = 0;
@@ -280,11 +289,13 @@ static void __devinit init_hwif_trm290(ide_hwif_t *hwif)
 
ide_setup_dma(hwif, (hwif-config_data + 4) ^ (hwif-channel ? 0x0080 : 
0x), 3);
 
-   hwif-dma_setup = trm290_ide_dma_setup;
-   hwif-dma_exec_cmd = trm290_ide_dma_exec_cmd;
-   hwif-dma_start = trm290_ide_dma_start;
-   hwif-ide_dma_end = trm290_ide_dma_end;
-   hwif-ide_dma_test_irq = trm290_ide_dma_test_irq;
+   hwif-dma_host_off  = trm290_dma_host_off;
+   hwif-dma_host_on   = trm290_dma_host_on;
+   hwif-dma_setup = trm290_dma_setup;
+   hwif-dma_exec_cmd  = trm290_dma_exec_cmd;
+   hwif-dma_start = trm290_dma_start;
+   hwif-ide_dma_end   = trm290_ide_dma_end;
+   hwif-ide_dma_test_irq  = trm290_ide_dma_test_irq;
 
hwif-selectproc = trm290_selectproc;
 #if 1
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


sata_qstor: use hardreset instead of softreset

2008-01-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b14dabcdb651ddd9f85c69c9042322c139e7da84
Commit: b14dabcdb651ddd9f85c69c9042322c139e7da84
Parent: fd0b45dfd1858c6b49d06355a460bcf36d654c06
Author: Tejun Heo [EMAIL PROTECTED]
AuthorDate: Fri Jan 4 00:22:19 2008 +0900
Committer:  Jeff Garzik [EMAIL PROTECTED]
CommitDate: Thu Jan 10 16:52:41 2008 -0500

sata_qstor: use hardreset instead of softreset

During conversion to new EH, sata_qstor was accidentaly changed to use
softreset, which is buggy on this chip, instead of hardreset.  This
patch updates sata_qstor such that it uses hardreset again.

This fixes bugzilla bug 9631.

Signed-off-by: Tejun Heo [EMAIL PROTECTED]
Cc: Mark Lord [EMAIL PROTECTED]
Signed-off-by: Jeff Garzik [EMAIL PROTECTED]
---
 drivers/ata/sata_qstor.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/ata/sata_qstor.c b/drivers/ata/sata_qstor.c
index 2f1de6e..c68b241 100644
--- a/drivers/ata/sata_qstor.c
+++ b/drivers/ata/sata_qstor.c
@@ -270,7 +270,7 @@ static int qs_scr_read(struct ata_port *ap, unsigned int 
sc_reg, u32 *val)
 static void qs_error_handler(struct ata_port *ap)
 {
qs_enter_reg_mode(ap);
-   ata_do_eh(ap, qs_prereset, ata_std_softreset, NULL,
+   ata_do_eh(ap, qs_prereset, NULL, sata_std_hardreset,
  ata_std_postreset);
 }
 
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


libata-sff: PCI IRQ handling fix

2008-01-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=277d72a37431d200727189693b14488368b7c258
Commit: 277d72a37431d200727189693b14488368b7c258
Parent: b14dabcdb651ddd9f85c69c9042322c139e7da84
Author: Alan Cox [EMAIL PROTECTED]
AuthorDate: Thu Jan 3 17:22:28 2008 +
Committer:  Jeff Garzik [EMAIL PROTECTED]
CommitDate: Thu Jan 10 16:52:51 2008 -0500

libata-sff: PCI IRQ handling fix

It is legitimate (although annoying and silly) for a PCI IDE controller
not to be assigned an interrupt and to be polled. The libata-sff code
should therefore not try and request IRQ 0 in this case.

Signed-off-by: Alan Cox [EMAIL PROTECTED]
Signed-off-by: Jeff Garzik [EMAIL PROTECTED]
---
 drivers/ata/libata-sff.c |7 +--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c
index 48acc09..b7ac80b 100644
--- a/drivers/ata/libata-sff.c
+++ b/drivers/ata/libata-sff.c
@@ -806,7 +806,10 @@ int ata_pci_init_one(struct pci_dev *pdev,
if (rc)
goto err_out;
 
-   if (!legacy_mode) {
+   if (!legacy_mode  pdev-irq) {
+   /* We may have no IRQ assigned in which case we can poll. This
+  shouldn't happen on a sane system but robustness is cheap
+  in this case */
rc = devm_request_irq(dev, pdev-irq, pi-port_ops-irq_handler,
  IRQF_SHARED, DRV_NAME, host);
if (rc)
@@ -814,7 +817,7 @@ int ata_pci_init_one(struct pci_dev *pdev,
 
ata_port_desc(host-ports[0], irq %d, pdev-irq);
ata_port_desc(host-ports[1], irq %d, pdev-irq);
-   } else {
+   } else if (legacy_mode) {
if (!ata_port_is_dummy(host-ports[0])) {
rc = devm_request_irq(dev, ATA_PRIMARY_IRQ(pdev),
  pi-port_ops-irq_handler,
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


pata_pdc202xx_old: Further fixups

2008-01-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=36906d9beab941452cad406cc03f05cc78671256
Commit: 36906d9beab941452cad406cc03f05cc78671256
Parent: 277d72a37431d200727189693b14488368b7c258
Author: Alan Cox [EMAIL PROTECTED]
AuthorDate: Fri Jan 4 00:08:49 2008 +
Committer:  Jeff Garzik [EMAIL PROTECTED]
CommitDate: Thu Jan 10 16:52:53 2008 -0500

pata_pdc202xx_old: Further fixups

Turns out distros always enabled burst mode and it is pretty essential so
do the same. Also sort out the post DMA mode restore properly.

My 20263 card now seems happy but needs some four drive tests done yet
(when I've persuaded the kernel not to hang in the edd boot code if I
plug them in ..)

Signed-off-by: Alan Cox [EMAIL PROTECTED]
Signed-off-by: Jeff Garzik [EMAIL PROTECTED]
---
 drivers/ata/pata_pdc202xx_old.c |   15 +--
 1 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/drivers/ata/pata_pdc202xx_old.c b/drivers/ata/pata_pdc202xx_old.c
index bc7c2d5..8f28156 100644
--- a/drivers/ata/pata_pdc202xx_old.c
+++ b/drivers/ata/pata_pdc202xx_old.c
@@ -215,8 +215,8 @@ static void pdc2026x_bmdma_stop(struct ata_queued_cmd *qc)
/* Flip back to 33Mhz for PIO */
if (adev-dma_mode = XFER_UDMA_2)
iowrite8(ioread8(clock)  ~sel66, clock);
-
ata_bmdma_stop(qc);
+   pdc202xx_set_piomode(ap, adev);
 }
 
 /**
@@ -233,6 +233,17 @@ static void pdc2026x_dev_config(struct ata_device *adev)
adev-max_sectors = 256;
 }
 
+static int pdc2026x_port_start(struct ata_port *ap)
+{
+   void __iomem *bmdma = ap-ioaddr.bmdma_addr;
+   if (bmdma) {
+   /* Enable burst mode */
+   u8 burst = ioread8(bmdma + 0x1f);
+   iowrite8(burst | 0x01, bmdma + 0x1f);
+   }
+   return ata_sff_port_start(ap);
+}
+
 static struct scsi_host_template pdc202xx_sht = {
.module = THIS_MODULE,
.name   = DRV_NAME,
@@ -313,7 +324,7 @@ static struct ata_port_operations pdc2026x_port_ops = {
.irq_clear  = ata_bmdma_irq_clear,
.irq_on = ata_irq_on,
 
-   .port_start = ata_sff_port_start,
+   .port_start = pdc2026x_port_start,
 };
 
 static int pdc202xx_init_one(struct pci_dev *dev, const struct pci_device_id 
*id)
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


pata_ixp4xx_cf: fix compilation introduced by ata_port_desc() conversion

2008-01-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=af183748044cefb1050ab47519e6bdcfcecec226
Commit: af183748044cefb1050ab47519e6bdcfcecec226
Parent: 36906d9beab941452cad406cc03f05cc78671256
Author: Rod Whitby [EMAIL PROTECTED]
AuthorDate: Sun Jan 6 10:05:28 2008 +0900
Committer:  Jeff Garzik [EMAIL PROTECTED]
CommitDate: Thu Jan 10 16:53:10 2008 -0500

pata_ixp4xx_cf: fix compilation introduced by ata_port_desc() conversion

Fixes a compilation error caused by ata_port_desc() conversion
(cbcdd87593a1d85c5c4b259945a3a09eee12814d).

Signed-off-by: Rod Whitby [EMAIL PROTECTED]
Signed-off-by: Tejun Heo [EMAIL PROTECTED]
Signed-off-by: Jeff Garzik [EMAIL PROTECTED]
---
 drivers/ata/pata_ixp4xx_cf.c |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/ata/pata_ixp4xx_cf.c b/drivers/ata/pata_ixp4xx_cf.c
index fcd532a..120b5bf 100644
--- a/drivers/ata/pata_ixp4xx_cf.c
+++ b/drivers/ata/pata_ixp4xx_cf.c
@@ -130,10 +130,11 @@ static struct ata_port_operations ixp4xx_port_ops = {
.port_start = ata_port_start,
 };
 
-static void ixp4xx_setup_port(struct ata_ioports *ioaddr,
+static void ixp4xx_setup_port(struct ata_port *ap,
  struct ixp4xx_pata_data *data,
  unsigned long raw_cs0, unsigned long raw_cs1)
 {
+   struct ata_ioports *ioaddr = ap-ioaddr;
unsigned long raw_cmd = raw_cs0;
unsigned long raw_ctl = raw_cs1 + 0x06;
 
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


libata-pmp: 4726 hates SRST

2008-01-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8048307dbc3cfc30690b131e786fb57157fbdb11
Commit: 8048307dbc3cfc30690b131e786fb57157fbdb11
Parent: af183748044cefb1050ab47519e6bdcfcecec226
Author: Tejun Heo [EMAIL PROTECTED]
AuthorDate: Thu Jan 10 13:38:46 2008 +0900
Committer:  Jeff Garzik [EMAIL PROTECTED]
CommitDate: Thu Jan 10 16:53:12 2008 -0500

libata-pmp: 4726 hates SRST

4726 hates SRST even on non-config ports.  Don't use it.

Signed-off-by: Tejun Heo [EMAIL PROTECTED]
Signed-off-by: Jeff Garzik [EMAIL PROTECTED]
---
 drivers/ata/libata-pmp.c |   12 +---
 1 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/drivers/ata/libata-pmp.c b/drivers/ata/libata-pmp.c
index c0c4dbc..caef2bb 100644
--- a/drivers/ata/libata-pmp.c
+++ b/drivers/ata/libata-pmp.c
@@ -495,14 +495,12 @@ static void sata_pmp_quirks(struct ata_port *ap)
/* SError.N need a kick in the ass to get working */
link-flags |= ATA_LFLAG_HRST_TO_RESUME;
 
-   /* class code report is unreliable */
-   if (link-pmp  5)
-   link-flags |= ATA_LFLAG_ASSUME_ATA;
-
-   /* The config device, which can be either at
-* port 0 or 5, locks up on SRST.
+   /* Class code report is unreliable and SRST
+* times out under certain configurations.
+* Config device can be at port 0 or 5 and
+* locks up on SRST.
 */
-   if (link-pmp == 0 || link-pmp == 5)
+   if (link-pmp = 5)
link-flags |= ATA_LFLAG_NO_SRST |
   ATA_LFLAG_ASSUME_ATA;
 
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


libata-pmp: propagate timeout to host link

2008-01-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2695e36616c3ece5e8e30666868fc7c90dc3fc75
Commit: 2695e36616c3ece5e8e30666868fc7c90dc3fc75
Parent: 8048307dbc3cfc30690b131e786fb57157fbdb11
Author: Tejun Heo [EMAIL PROTECTED]
AuthorDate: Thu Jan 10 13:41:23 2008 +0900
Committer:  Jeff Garzik [EMAIL PROTECTED]
CommitDate: Thu Jan 10 16:53:16 2008 -0500

libata-pmp: propagate timeout to host link

Timeout on downstream command may indicate transmission problem on
host link.  Propagate timeouts to host link.

Signed-off-by: Tejun Heo [EMAIL PROTECTED]
Signed-off-by: Jeff Garzik [EMAIL PROTECTED]
---
 drivers/ata/libata-eh.c |   20 +++-
 1 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index f0124a8..74269ed 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -1733,11 +1733,15 @@ static void ata_eh_link_autopsy(struct ata_link *link)
ehc-i.action = ~ATA_EH_PERDEV_MASK;
}
 
-   /* consider speeding down */
+   /* propagate timeout to host link */
+   if ((all_err_mask  AC_ERR_TIMEOUT)  !ata_is_host_link(link))
+   ap-link.eh_context.i.err_mask |= AC_ERR_TIMEOUT;
+
+   /* record error and consider speeding down */
dev = ehc-i.dev;
-   if (!dev  ata_link_max_devices(link) == 1 
-   ata_dev_enabled(link-device))
-   dev = link-device;
+   if (!dev  ((ata_link_max_devices(link) == 1 
+ ata_dev_enabled(link-device
+   dev = link-device;
 
if (dev)
ehc-i.action |= ata_eh_speed_down(dev, is_io, all_err_mask);
@@ -1759,8 +1763,14 @@ void ata_eh_autopsy(struct ata_port *ap)
 {
struct ata_link *link;
 
-   __ata_port_for_each_link(link, ap)
+   ata_port_for_each_link(link, ap)
ata_eh_link_autopsy(link);
+
+   /* Autopsy of fanout ports can affect host link autopsy.
+* Perform host link autopsy last.
+*/
+   if (ap-nr_pmp_links)
+   ata_eh_link_autopsy(ap-link);
 }
 
 /**
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


libata: don't normalize UNKNOWN to NONE after reset

2008-01-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4ccd3329a2e51473a86547a55f9e5f98f8f65b33
Commit: 4ccd3329a2e51473a86547a55f9e5f98f8f65b33
Parent: 2695e36616c3ece5e8e30666868fc7c90dc3fc75
Author: Tejun Heo [EMAIL PROTECTED]
AuthorDate: Tue Jan 8 20:26:12 2008 +0900
Committer:  Jeff Garzik [EMAIL PROTECTED]
CommitDate: Thu Jan 10 16:53:22 2008 -0500

libata: don't normalize UNKNOWN to NONE after reset

After non-classifying reset, ehc-classes[] could contain
ATA_DEV_UNKNOWN which used to be normalized to ATA_DEV_NONE for
consistency.  However, this causes unfortunate side effect for drivers
which have non-classifying hardresets (e.g. sata_nv) by making
hardreset report ATA_DEV_NONE for non-classifying resets and thus
makes EH believe that the port is unoccupied and recovery can be
skipped.  The end result is that after a device is swapped with
another one, the new device isn't attached after the old one is
detached.

This patch makes ata_eh_reset() not normalize UNKNOWN to NONE after
non-classifying resets.  This fixes the above problem.  As UNKNOWN and
NONE are handled differently by only EH hotplug logic, this doesn't
cause other behavior changes.

Signed-off-by: Tejun Heo [EMAIL PROTECTED]
Cc: Robert Hancock [EMAIL PROTECTED]
Signed-off-by: Jeff Garzik [EMAIL PROTECTED]
---
 drivers/ata/libata-eh.c |4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index 74269ed..21a81cd 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -2167,13 +2167,11 @@ int ata_eh_reset(struct ata_link *link, int classify,
if (ata_link_offline(link))
continue;
 
-   /* apply class override and convert UNKNOWN to NONE */
+   /* apply class override */
if (lflags  ATA_LFLAG_ASSUME_ATA)
classes[dev-devno] = ATA_DEV_ATA;
else if (lflags  ATA_LFLAG_ASSUME_SEMB)
classes[dev-devno] = ATA_DEV_SEMB_UNSUP; /* not yet */
-   else if (classes[dev-devno] == ATA_DEV_UNKNOWN)
-   classes[dev-devno] = ATA_DEV_NONE;
}
 
/* record current link speed */
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


sata_sil24: prevent hba lockup when pass-through ATA commands are used

2008-01-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=13cc546be3060324de9d92ebde3bc9dbd950df23
Commit: 13cc546be3060324de9d92ebde3bc9dbd950df23
Parent: fcb71f6f034c6c4f6a3ab4a55404c95db6e32653
Author: Gwendal Grignou [EMAIL PROTECTED]
AuthorDate: Thu Jan 10 15:47:56 2008 +0900
Committer:  Jeff Garzik [EMAIL PROTECTED]
CommitDate: Thu Jan 10 16:54:01 2008 -0500

sata_sil24: prevent hba lockup when pass-through ATA commands are used

Fix commands timeout with Sil3124/3132 based HBA when pass-through ATA
commands [where ATA_QCFLAG_RESULT_TF is set] are used while other
commands are active on other devices connected to the same port with a
Port Multiplier.  Due to a hardware bug, these commands must be sent
alone, like ATAPI commands.

Signed-off-by: Gwendal Grignou [EMAIL PROTECTED]
Acked-by: Tejun Heo [EMAIL PROTECTED]
Signed-off-by: Jeff Garzik [EMAIL PROTECTED]
---
 drivers/ata/sata_sil24.c |   37 ++---
 1 files changed, 26 insertions(+), 11 deletions(-)

diff --git a/drivers/ata/sata_sil24.c b/drivers/ata/sata_sil24.c
index 96fd526..b4c674d 100644
--- a/drivers/ata/sata_sil24.c
+++ b/drivers/ata/sata_sil24.c
@@ -832,16 +832,31 @@ static int sil24_qc_defer(struct ata_queued_cmd *qc)
struct ata_link *link = qc-dev-link;
struct ata_port *ap = link-ap;
u8 prot = qc-tf.protocol;
-   int is_atapi = (prot == ATA_PROT_ATAPI ||
-   prot == ATA_PROT_ATAPI_NODATA ||
-   prot == ATA_PROT_ATAPI_DMA);
-
-   /* ATAPI commands completing with CHECK_SENSE cause various
-* weird problems if other commands are active.  PMP DMA CS
-* errata doesn't cover all and HSM violation occurs even with
-* only one other device active.  Always run an ATAPI command
-* by itself.
-*/
+
+   /*
+* There is a bug in the chip:
+* Port LRAM Causes the PRB/SGT Data to be Corrupted
+* If the host issues a read request for LRAM and SActive registers
+* while active commands are available in the port, PRB/SGT data in
+* the LRAM can become corrupted. This issue applies only when
+* reading from, but not writing to, the LRAM.
+*
+* Therefore, reading LRAM when there is no particular error [and
+* other commands may be outstanding] is prohibited.
+*
+* To avoid this bug there are two situations where a command must run
+* exclusive of any other commands on the port:
+*
+* - ATAPI commands which check the sense data
+* - Passthrough ATA commands which always have ATA_QCFLAG_RESULT_TF
+*   set.
+*
+*/
+   int is_excl = (prot == ATA_PROT_ATAPI ||
+  prot == ATA_PROT_ATAPI_NODATA ||
+  prot == ATA_PROT_ATAPI_DMA ||
+  (qc-flags  ATA_QCFLAG_RESULT_TF));
+
if (unlikely(ap-excl_link)) {
if (link == ap-excl_link) {
if (ap-nr_active_links)
@@ -849,7 +864,7 @@ static int sil24_qc_defer(struct ata_queued_cmd *qc)
qc-flags |= ATA_QCFLAG_CLEAR_EXCL;
} else
return ATA_DEFER_PORT;
-   } else if (unlikely(is_atapi)) {
+   } else if (unlikely(is_excl)) {
ap-excl_link = link;
if (ap-nr_active_links)
return ATA_DEFER_PORT;
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


libata and starting/stopping ATAPI floppy devices

2008-01-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9b8e8de7e59b3a2dab3113d620b52dc8ba890fb3
Commit: 9b8e8de7e59b3a2dab3113d620b52dc8ba890fb3
Parent: 13cc546be3060324de9d92ebde3bc9dbd950df23
Author: Ondrej Zary [EMAIL PROTECTED]
AuthorDate: Thu Jan 10 17:13:19 2008 -0500
Committer:  Jeff Garzik [EMAIL PROTECTED]
CommitDate: Thu Jan 10 17:13:19 2008 -0500

libata and starting/stopping ATAPI floppy devices

Prevent libata from starting/stopping non-ATA devices (like ATAPI floppy
drives) as they don't seem to like it:

sd 1:0:1:0: [sdb] Starting disk
ata2.01: configured for PIO2
sd 1:0:1:0: [sdb] Result: hostbyte=0x00 driverbyte=0x08
sd 1:0:1:0: [sdb] Sense Key : 0x2 [current]
sd 1:0:1:0: [sdb] ASC=0x3a ASCQ=0x0

Signed-off-by: Ondrej Zary [EMAIL PROTECTED]
Signed-off-by: Tejun Heo [EMAIL PROTECTED]
Signed-off-by: Jeff Garzik [EMAIL PROTECTED]
---
 drivers/ata/libata-scsi.c |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index a883bb0..264ae60 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -872,7 +872,8 @@ int ata_scsi_slave_config(struct scsi_device *sdev)
 
ata_scsi_sdev_config(sdev);
 
-   sdev-manage_start_stop = 1;
+   if (dev-class == ATA_DEV_ATA)
+   sdev-manage_start_stop = 1;
 
if (dev)
ata_scsi_dev_config(sdev, dev);
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[CRYPTO] padlock: Fix alignment fault in aes_crypt_copy

2008-01-10 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=490fe3f05be3f7c87d7932bcb6e6e53e3db2cd9c
Commit: 490fe3f05be3f7c87d7932bcb6e6e53e3db2cd9c
Parent: d4a7dd8e637b322faaa934ffcd6dd07711af831f
Author: Herbert Xu [EMAIL PROTECTED]
AuthorDate: Fri Jan 11 08:09:35 2008 +1100
Committer:  Herbert Xu [EMAIL PROTECTED]
CommitDate: Fri Jan 11 08:09:35 2008 +1100

[CRYPTO] padlock: Fix alignment fault in aes_crypt_copy

The previous patch fixed spurious read faults from occuring by copying
the data if we happen to have a single block at the end of a page.  It
appears that gcc cannot guarantee 16-byte alignment in the kernel with
__attribute__.  The following report from Torben Viets shows a buffer
that's only 8-byte aligned:

 eneral protection fault:  [#1]
 Modules linked in: xt_TCPMSS xt_tcpmss iptable_mangle ipt_MASQUERADE
 xt_tcpudp xt_mark xt_state iptable_nat nf_nat nf_conntrack_ipv4
 iptable_filter ip_tables x_tables pppoe pppox af_packet ppp_generic slhc
 aes_i586
 CPU:0
 EIP:0060:[c035b828]Not tainted VLI
 EFLAGS: 00010292   (2.6.23.12 #7)
 EIP is at aes_crypt_copy+0x28/0x40
 eax: f7639ff0   ebx: f6c24050   ecx: 0001   edx: f6c24030
 esi: f7e89dc8   edi: f7639ff0   ebp: 0001   esp: f7e89dc8

Since the hardware must have 16-byte alignment, the following patch fixes
this by open coding the alignment adjustment.

Signed-off-by: Herbert Xu [EMAIL PROTECTED]
---
 drivers/crypto/padlock-aes.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/crypto/padlock-aes.c b/drivers/crypto/padlock-aes.c
index a337b69..5f7e718 100644
--- a/drivers/crypto/padlock-aes.c
+++ b/drivers/crypto/padlock-aes.c
@@ -429,8 +429,8 @@ static inline void padlock_xcrypt(const u8 *input, u8 
*output, void *key,
 
 static void aes_crypt_copy(const u8 *in, u8 *out, u32 *key, struct cword 
*cword)
 {
-   u8 tmp[AES_BLOCK_SIZE * 2]
-   __attribute__ ((__aligned__(PADLOCK_ALIGNMENT)));
+   u8 buf[AES_BLOCK_SIZE * 2 + PADLOCK_ALIGNMENT - 1];
+   u8 *tmp = PTR_ALIGN(buf[0], PADLOCK_ALIGNMENT);
 
memcpy(tmp, in, AES_BLOCK_SIZE);
padlock_xcrypt(tmp, out, key, cword);
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html