From a4f5749ba6e3f23ae4a137cee10324830db4d081 Mon Sep 17 00:00:00 2001 From: Tejun Heo Date: Tue, 12 Sep 2006 20:35:49 -0700 Subject: [PATCH] libata: ignore CFA signature while sanity-checking an ATAPI device 0x848a in ID word 0 indicates CFA device iff the ID data is obtained from IDENTIFY DEVICE. For ATAPI devices, 0x848a in ID work 0 indicates valid ATAPI device. Fix sanity check in ata_dev_read_id() such that ATAPI devices reporting 0x848a in ID word 0 is not handled as error. The problem is identified by J.A. Magallon with HL-DT-ST DVDRAM GSA-4120B. Signed-off-by: Tejun Helo Cc: J.A. Magallon Acked-by: Jeff Garzik Acked-by: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/scsi/libata-core.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'drivers') diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index 73dd6c8deed..427b73a3886 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c @@ -1256,10 +1256,15 @@ int ata_dev_read_id(struct ata_device *dev, unsigned int *p_class, swap_buf_le16(id, ATA_ID_WORDS); /* sanity check */ - if ((class == ATA_DEV_ATA) != (ata_id_is_ata(id) | ata_id_is_cfa(id))) { - rc = -EINVAL; - reason = "device reports illegal type"; - goto err_out; + rc = -EINVAL; + reason = "device reports illegal type"; + + if (class == ATA_DEV_ATA) { + if (!ata_id_is_ata(id) && !ata_id_is_cfa(id)) + goto err_out; + } else { + if (ata_id_is_ata(id)) + goto err_out; } if (post_reset && class == ATA_DEV_ATA) { -- cgit v1.2.3 From e11db063d86d0ef9d7903cb463bb542b5d4e9ddd Mon Sep 17 00:00:00 2001 From: Michael De Backer Date: Tue, 12 Sep 2006 20:35:53 -0700 Subject: [PATCH] alim15x3.c: M5229 (rev c8) support for DMA cd-writer Configuration bits are not set properly for DMA on some chipset revisions. It has already been corrected for M5229 (rev c7) but not for M5229 (rev c8). This leads to the bug described at http://bugzilla.kernel.org/show_bug.cgi?id=5786 (lost interrupt + ide bus hangs). Signed-off-by: Michael De Backer Acked-by: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/ide/pci/alim15x3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/ide/pci/alim15x3.c b/drivers/ide/pci/alim15x3.c index 351dab2fcac..d419e4bb54f 100644 --- a/drivers/ide/pci/alim15x3.c +++ b/drivers/ide/pci/alim15x3.c @@ -730,7 +730,7 @@ static unsigned int __devinit ata66_ali15x3 (ide_hwif_t *hwif) if(m5229_revision <= 0x20) tmpbyte = (tmpbyte & (~0x02)) | 0x01; - else if (m5229_revision == 0xc7) + else if (m5229_revision == 0xc7 || m5229_revision == 0xc8) tmpbyte |= 0x03; else tmpbyte |= 0x01; -- cgit v1.2.3 From 7fbb36451a91de6e8f9ece4f1f1ee9bd8ebf838a Mon Sep 17 00:00:00 2001 From: Stefan Richter Date: Tue, 12 Sep 2006 20:35:54 -0700 Subject: [PATCH] SCSI: lockdep annotation in scsi_send_eh_cmnd Fixup for lockdep enabled kernels: Annotate an on-stack completion. Signed-off-by: Stefan Richter Acked-by: Ingo Molnar Cc: James Bottomley Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/scsi/scsi_error.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index a8ed5a22009..3d355d05461 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c @@ -466,7 +466,7 @@ static int scsi_send_eh_cmnd(struct scsi_cmnd *scmd, unsigned char *cmnd, struct scsi_device *sdev = scmd->device; struct Scsi_Host *shost = sdev->host; int old_result = scmd->result; - DECLARE_COMPLETION(done); + DECLARE_COMPLETION_ONSTACK(done); unsigned long timeleft; unsigned long flags; unsigned char old_cmnd[MAX_COMMAND_SIZE]; -- cgit v1.2.3 From 1883c5aba9973331e3ff0050e05707fe8e84fe0d Mon Sep 17 00:00:00 2001 From: Mike Miller Date: Tue, 12 Sep 2006 20:36:07 -0700 Subject: [PATCH] cciss: version update, new hw Add support for new hardware and bumps the version to 3.6.10. It seems there were several changes introduced including soft_irq. I decided to bump the major number to reflect these changes. Since we're still supporting older vendor kernels I need some way differentiate between kernel versions <=2.6.10 and newer kernels >=2.6.16. Signed-off-by: Mike Miller Cc: Jens Axboe Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/block/cciss.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'drivers') diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c index 7b0eca703a6..2cd3391ff87 100644 --- a/drivers/block/cciss.c +++ b/drivers/block/cciss.c @@ -48,14 +48,14 @@ #include #define CCISS_DRIVER_VERSION(maj,min,submin) ((maj<<16)|(min<<8)|(submin)) -#define DRIVER_NAME "HP CISS Driver (v 2.6.10)" -#define DRIVER_VERSION CCISS_DRIVER_VERSION(2,6,10) +#define DRIVER_NAME "HP CISS Driver (v 3.6.10)" +#define DRIVER_VERSION CCISS_DRIVER_VERSION(3,6,10) /* Embedded module documentation macros - see modules.h */ MODULE_AUTHOR("Hewlett-Packard Company"); -MODULE_DESCRIPTION("Driver for HP Controller SA5xxx SA6xxx version 2.6.10"); +MODULE_DESCRIPTION("Driver for HP Controller SA5xxx SA6xxx version 3.6.10"); MODULE_SUPPORTED_DEVICE("HP SA5i SA5i+ SA532 SA5300 SA5312 SA641 SA642 SA6400" - " SA6i P600 P800 P400 P400i E200 E200i"); + " SA6i P600 P800 P400 P400i E200 E200i E500"); MODULE_LICENSE("GPL"); #include "cciss_cmd.h" @@ -82,6 +82,7 @@ static const struct pci_device_id cciss_pci_device_id[] = { {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSD, 0x103C, 0x3213}, {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSD, 0x103C, 0x3214}, {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSD, 0x103C, 0x3215}, + {PCI_VENDOR_ID_HP, PCI_DEVICE_ID_HP_CISSC, 0x103C, 0x3233}, {0,} }; @@ -110,6 +111,7 @@ static struct board_type products[] = { {0x3213103C, "Smart Array E200i", &SA5_access}, {0x3214103C, "Smart Array E200i", &SA5_access}, {0x3215103C, "Smart Array E200i", &SA5_access}, + {0x3233103C, "Smart Array E500", &SA5_access}, }; /* How long to wait (in milliseconds) for board to go into simple mode */ -- cgit v1.2.3 From add7afc756eddd5d02fd986d19e6300b3e1a5ae8 Mon Sep 17 00:00:00 2001 From: Ishai Rabinovitz Date: Thu, 7 Sep 2006 15:00:01 +0300 Subject: IB/srp: Don't schedule reconnect from srp If there is a problem in the connection, the SCSI mid-layer will eventually call srp_reset_host(), which will call srp_reconnect(), so we do not need to schedule a call to srp_reconnect_work() from srp_completion(). Removing this prevents srp_reset_host() from failing if a reconnect scheduled from srp_completion() is already in progress, which in turn was causing crashes as both SCSI midlayer and srp_reconnect() were cancelling commands. Signed-off-by: Ishai Rabinovitz Signed-off-by: Michael S. Tsirkin Signed-off-by: Roland Dreier --- drivers/infiniband/ulp/srp/ib_srp.c | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'drivers') diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c index 8257d5a2c8f..fd8344cdc0d 100644 --- a/drivers/infiniband/ulp/srp/ib_srp.c +++ b/drivers/infiniband/ulp/srp/ib_srp.c @@ -799,13 +799,6 @@ static void srp_process_rsp(struct srp_target_port *target, struct srp_rsp *rsp) spin_unlock_irqrestore(target->scsi_host->host_lock, flags); } -static void srp_reconnect_work(void *target_ptr) -{ - struct srp_target_port *target = target_ptr; - - srp_reconnect_target(target); -} - static void srp_handle_recv(struct srp_target_port *target, struct ib_wc *wc) { struct srp_iu *iu; @@ -858,7 +851,6 @@ static void srp_completion(struct ib_cq *cq, void *target_ptr) { struct srp_target_port *target = target_ptr; struct ib_wc wc; - unsigned long flags; ib_req_notify_cq(cq, IB_CQ_NEXT_COMP); while (ib_poll_cq(cq, 1, &wc) > 0) { @@ -866,10 +858,6 @@ static void srp_completion(struct ib_cq *cq, void *target_ptr) printk(KERN_ERR PFX "failed %s status %d\n", wc.wr_id & SRP_OP_RECV ? "receive" : "send", wc.status); - spin_lock_irqsave(target->scsi_host->host_lock, flags); - if (target->state == SRP_TARGET_LIVE) - schedule_work(&target->work); - spin_unlock_irqrestore(target->scsi_host->host_lock, flags); break; } @@ -1705,8 +1693,6 @@ static ssize_t srp_create_target(struct class_device *class_dev, target->scsi_host = target_host; target->srp_host = host; - INIT_WORK(&target->work, srp_reconnect_work, target); - INIT_LIST_HEAD(&target->free_reqs); INIT_LIST_HEAD(&target->req_queue); for (i = 0; i < SRP_SQ_SIZE; ++i) { -- cgit v1.2.3 From c11bd42a7676b49d41c780f2ede3709204f8da83 Mon Sep 17 00:00:00 2001 From: Eli Cohen Date: Thu, 14 Sep 2006 13:51:41 -0700 Subject: IPoIB: Retry failed send-only multicast group joins When a send-only multicast group join fails, mcast->query must be set to NULL. Otherwise, IPoIB will never retry the join and the multicast group will never be reachable. Signed-off-by: Eli Cohen Signed-off-by: Michael S. Tsirkin Signed-off-by: Roland Dreier --- drivers/infiniband/ulp/ipoib/ipoib_multicast.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers') diff --git a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c index b5e6a7be603..ec356ce7cdc 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c @@ -326,6 +326,7 @@ ipoib_mcast_sendonly_join_complete(int status, /* Clear the busy flag so we try again */ clear_bit(IPOIB_MCAST_FLAG_BUSY, &mcast->flags); + mcast->query = NULL; } complete(&mcast->done); -- cgit v1.2.3 From d5bb75999cb5733ad936ff000023221fe7a13c59 Mon Sep 17 00:00:00 2001 From: "Michael S. Tsirkin" Date: Wed, 13 Sep 2006 15:01:54 +0300 Subject: RDMA/cma: Increase the IB CM retry count in CMA 3 seems like a low number of IB Communication Manager retries to set; we see connections failing under stress, and in any case 3 just looks like an arbitrary number. 15 is the max value allowed by the InfiniBand spec. Signed-off-by: Michael S. Tsirkin Acked-by: Sean Hefty Signed-off-by: Roland Dreier --- drivers/infiniband/core/cma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c index d6f99d5720f..5d625a81193 100644 --- a/drivers/infiniband/core/cma.c +++ b/drivers/infiniband/core/cma.c @@ -49,7 +49,7 @@ MODULE_DESCRIPTION("Generic RDMA CM Agent"); MODULE_LICENSE("Dual BSD/GPL"); #define CMA_CM_RESPONSE_TIMEOUT 20 -#define CMA_MAX_CM_RETRIES 3 +#define CMA_MAX_CM_RETRIES 15 static void cma_add_one(struct ib_device *device); static void cma_remove_one(struct ib_device *device); -- cgit v1.2.3 From 55ebcc38a5f6d40e4c41447e413ef842b803980f Mon Sep 17 00:00:00 2001 From: Arnaud Patard Date: Sat, 16 Sep 2006 12:15:36 -0700 Subject: [PATCH] IPMI: Fix oops on ipmi_msghandler removal for non ipmi systems When the ipmi_si module is loaded on a system without any ipmi device, it fails with nodev. It would be fine if all resources were freed. A call to device_unregister() is missing, resulting to a oops when you remove the ipmi_msghandler. Signed-off-by: Arnaud Patard Acked-by: Corey Minyard Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/char/ipmi/ipmi_si_intf.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers') diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c index f57eba0bf25..31b59403b63 100644 --- a/drivers/char/ipmi/ipmi_si_intf.c +++ b/drivers/char/ipmi/ipmi_si_intf.c @@ -2481,6 +2481,7 @@ static __devinit int init_ipmi_si(void) #ifdef CONFIG_PCI pci_unregister_driver(&ipmi_pci_driver); #endif + driver_unregister(&ipmi_driver); printk("ipmi_si: Unable to find any System Interface(s)\n"); return -ENODEV; } else { -- cgit v1.2.3 From b64074e46a9c2a7d5c66eff066a7c0b58377a143 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Sat, 16 Sep 2006 12:15:38 -0700 Subject: [PATCH] hvc_console suspend fix Fix http://bugzilla.kernel.org/show_bug.cgi?id=7152 Cc: Michael Tautschnig Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/char/hvc_console.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers') diff --git a/drivers/char/hvc_console.c b/drivers/char/hvc_console.c index ca2f538e549..613d67f1c7f 100644 --- a/drivers/char/hvc_console.c +++ b/drivers/char/hvc_console.c @@ -668,6 +668,7 @@ int khvcd(void *unused) do { poll_mask = 0; hvc_kicked = 0; + try_to_freeze(); wmb(); if (cpus_empty(cpus_in_xmon)) { spin_lock(&hvc_structs_lock); -- cgit v1.2.3 From 4064d5ef26a04d9e34e4c0f348e30f14ab6828d8 Mon Sep 17 00:00:00 2001 From: Corey Minyard Date: Sat, 16 Sep 2006 12:15:41 -0700 Subject: [PATCH] IPMI: fix handling of OEM flags If one of the OEM flags becomes set in the flags from the hardware, the driver could hang if no OEM handler was set. Fix the code to handle this. This was tested by setting the flags by hand after they were fetched. Signed-off-by: Corey Minyard Ackde-by: Matt Domsch Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/char/ipmi/ipmi_si_intf.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'drivers') diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c index 31b59403b63..abca98beac1 100644 --- a/drivers/char/ipmi/ipmi_si_intf.c +++ b/drivers/char/ipmi/ipmi_si_intf.c @@ -402,10 +402,10 @@ static void handle_flags(struct smi_info *smi_info) smi_info->curr_msg->data, smi_info->curr_msg->data_size); smi_info->si_state = SI_GETTING_EVENTS; - } else if (smi_info->msg_flags & OEM_DATA_AVAIL) { - if (smi_info->oem_data_avail_handler) - if (smi_info->oem_data_avail_handler(smi_info)) - goto retry; + } else if (smi_info->msg_flags & OEM_DATA_AVAIL && + smi_info->oem_data_avail_handler) { + if (smi_info->oem_data_avail_handler(smi_info)) + goto retry; } else { smi_info->si_state = SI_NORMAL; } -- cgit v1.2.3 From 96da96065bd66164acc3c8a1ea6db4ee765537e9 Mon Sep 17 00:00:00 2001 From: Vitaly Wool Date: Sat, 16 Sep 2006 12:15:58 -0700 Subject: [PATCH] MTD NAND: OOB buffer offset fixups In the case of data-pad-ecc-pad-data... layout the oob start position has to be sizeof(data) in nand_write_oob_syndrom(). In nand_fill_oob() we need to copy to buf + buffer offset instead of buf + write offset. Signed-off-by: Vitaly Wool Signed-off-by: Thomas Gleixner Signed-off-by: David Woodhouse Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/mtd/nand/nand_base.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index c8cbc00243f..0a54d003ef3 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c @@ -1204,7 +1204,7 @@ static int nand_write_oob_syndrome(struct mtd_info *mtd, pos = steps * (eccsize + chunk); steps = 0; } else - pos = eccsize + chunk; + pos = eccsize; chip->cmdfunc(mtd, NAND_CMD_SEQIN, pos, page); for (i = 0; i < steps; i++) { @@ -1567,7 +1567,7 @@ static uint8_t *nand_fill_oob(struct nand_chip *chip, uint8_t *oob, bytes = min_t(size_t, len, free->length); boffs = free->offset; } - memcpy(chip->oob_poi + woffs, oob, bytes); + memcpy(chip->oob_poi + boffs, oob, bytes); oob += bytes; } return oob; -- cgit v1.2.3