From 7ee2413ca0da80c819f2388c0faeffce1ac8513b Mon Sep 17 00:00:00 2001 From: Tony Battersby Date: Tue, 6 Nov 2007 14:40:54 -0500 Subject: [SCSI] sym53c8xx: fix free_irq() regression The following commit changed the pointer passed to request_irq(), but failed to change the pointer passed to free_irq(): commit 99c9e0a1d6cfe1ba1169a7a81435ee85bc00e4a1 Author: Matthew Wilcox Date: Fri Oct 5 15:55:12 2007 -0400 [SCSI] sym53c8xx: Make interrupt handler capable of returning IRQ_NONE ... The result is that free_irq() doesn't actually take any action. This patch fixes it. Signed-off-by: Tony Battersby Acked-by: Christoph Hellwig Signed-off-by: James Bottomley --- drivers/scsi/sym53c8xx_2/sym_glue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/scsi') diff --git a/drivers/scsi/sym53c8xx_2/sym_glue.c b/drivers/scsi/sym53c8xx_2/sym_glue.c index 0f74aba5b23..9e0908d1981 100644 --- a/drivers/scsi/sym53c8xx_2/sym_glue.c +++ b/drivers/scsi/sym53c8xx_2/sym_glue.c @@ -1243,7 +1243,7 @@ static void sym_free_resources(struct sym_hcb *np, struct pci_dev *pdev) * Free O/S specific resources. */ if (pdev->irq) - free_irq(pdev->irq, np); + free_irq(pdev->irq, np->s.host); if (np->s.ioaddr) pci_iounmap(pdev, np->s.ioaddr); if (np->s.ramaddr) -- cgit v1.2.3-70-g09d2 From c80ddf00cde4c21018dbd0ea2872736c90c7dda2 Mon Sep 17 00:00:00 2001 From: James Bottomley Date: Wed, 12 Dec 2007 15:06:21 -0500 Subject: [SCSI] dpt_i2o: driver is only 32 bit so don't set 64 bit DMA mask This fixes a potential corruption bug where the truncation would cause reading or writing to the wrong memory area on machines with >4GB of main memory. Cc: Stable Kernel Tree Signed-off-by: James Bottomley --- drivers/scsi/dpt_i2o.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'drivers/scsi') diff --git a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c index 70f48a1a6d5..b31d1c95c9f 100644 --- a/drivers/scsi/dpt_i2o.c +++ b/drivers/scsi/dpt_i2o.c @@ -906,8 +906,7 @@ static int adpt_install_hba(struct scsi_host_template* sht, struct pci_dev* pDev } pci_set_master(pDev); - if (pci_set_dma_mask(pDev, DMA_64BIT_MASK) && - pci_set_dma_mask(pDev, DMA_32BIT_MASK)) + if (pci_set_dma_mask(pDev, DMA_32BIT_MASK)) return -EINVAL; base_addr0_phys = pci_resource_start(pDev,0); -- cgit v1.2.3-70-g09d2 From cedefa13db502432905c29819c195f46805b13eb Mon Sep 17 00:00:00 2001 From: Tony Battersby Date: Fri, 14 Dec 2007 15:45:16 -0500 Subject: [SCSI] sym53c8xx: fix "irq X: nobody cared" regression The patch described by the following excerpt from ChangeLog-2.6.24-rc1 eventually causes a "irq X: nobody cared" error after a while: commit 99c9e0a1d6cfe1ba1169a7a81435ee85bc00e4a1 Author: Matthew Wilcox Date: Fri Oct 5 15:55:12 2007 -0400 [SCSI] sym53c8xx: Make interrupt handler capable of returning IRQ_NONE After this happens, the kernel disables the IRQ, causing the SCSI card to stop working until the next reboot. The problem is caused by the interrupt handler returning IRQ_NONE instead of IRQ_HANDLED after handling an interrupt-on-the-fly (INTF) condition. The following patch fixes the problem. Signed-off-by: Tony Battersby Acked-by: Matthew Wilcox Signed-off-by: James Bottomley --- drivers/scsi/sym53c8xx_2/sym_hipd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/scsi') diff --git a/drivers/scsi/sym53c8xx_2/sym_hipd.c b/drivers/scsi/sym53c8xx_2/sym_hipd.c index 463f119f20e..254bdaeb35f 100644 --- a/drivers/scsi/sym53c8xx_2/sym_hipd.c +++ b/drivers/scsi/sym53c8xx_2/sym_hipd.c @@ -2791,7 +2791,7 @@ irqreturn_t sym_interrupt(struct Scsi_Host *shost) istat = INB(np, nc_istat); if (istat & INTF) { OUTB(np, nc_istat, (istat & SIGP) | INTF | np->istat_sem); - istat = INB(np, nc_istat); /* DUMMY READ */ + istat |= INB(np, nc_istat); /* DUMMY READ */ if (DEBUG_FLAGS & DEBUG_TINY) printf ("F "); sym_wakeup_done(np); } -- cgit v1.2.3-70-g09d2 From 99f1f534922a2f2251ba05b14657a1c62882a80e Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Thu, 13 Dec 2007 16:14:05 -0800 Subject: [SCSI] initio: fix conflict when loading driver > I have a scanner connected to a Initio INI-950 SCSI card and I recently > upgraded from SuSE 10.2 to 10.3. The new kernel doesn't see any of my > devices. I get the following in /var/log/messages: > > ACPI: PCI Interrupt 0000:00:0a.0[A] -> GSI 17 (level, low) -> IRQ 16 > initio: I/O port range 0x0 is busy. > ACPI: PCI interrupt for device 0000:00:0a.0 disabled Humm not a collision - thats a bug in the driver updating. Looks like the changes I made and combined with Christoph's lost a line somewhere when I was merging it all. Signed-off-by: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: James Bottomley --- drivers/scsi/initio.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/scsi') diff --git a/drivers/scsi/initio.c b/drivers/scsi/initio.c index 4c4465d39a1..769a7a80585 100644 --- a/drivers/scsi/initio.c +++ b/drivers/scsi/initio.c @@ -2867,6 +2867,7 @@ static int initio_probe_one(struct pci_dev *pdev, } host = (struct initio_host *)shost->hostdata; memset(host, 0, sizeof(struct initio_host)); + host->addr = pci_resource_start(pdev, 0); if (!request_region(host->addr, 256, "i91u")) { printk(KERN_WARNING "initio: I/O port range 0x%x is busy.\n", host->addr); -- cgit v1.2.3-70-g09d2 From cd81621c5c5c869b848818b506962dab4499e0d9 Mon Sep 17 00:00:00 2001 From: FUJITA Tomonori Date: Sat, 15 Dec 2007 15:51:55 +0900 Subject: [SCSI] st: fix kernel BUG at include/linux/scatterlist.h:59! This is caused by a missing scatterlist initialisation (it only shows up when sg list handling debugging is turned on). Signed-off-by: FUJITA Tomonori Cc: Kai Makisara Signed-off-by: James Bottomley --- drivers/scsi/st.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/scsi') diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c index 98dfd6ea209..328c47c6aeb 100644 --- a/drivers/scsi/st.c +++ b/drivers/scsi/st.c @@ -3611,6 +3611,7 @@ static struct st_buffer * tb->dma = need_dma; tb->buffer_size = got; + sg_init_table(tb->sg, max_sg); return tb; } -- cgit v1.2.3-70-g09d2 From a169e63740779f62a9a5ddf0aa61091a393a03c5 Mon Sep 17 00:00:00 2001 From: Boaz Harrosh Date: Mon, 17 Dec 2007 18:08:59 +0200 Subject: [SCSI] initio: bugfix for accessors patch patch: [SCSI] initio: convert to use the data buffer accessors had a small but fatal bug in that it didn't increment the pointer into the initio scatterlist descriptors as it looped over the block generated ones. Fixed here. Signed-off-by: Boaz Harrosh Signed-off-by: James Bottomley --- drivers/scsi/initio.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/scsi') diff --git a/drivers/scsi/initio.c b/drivers/scsi/initio.c index 769a7a80585..01bf0189367 100644 --- a/drivers/scsi/initio.c +++ b/drivers/scsi/initio.c @@ -2616,6 +2616,7 @@ static void initio_build_scb(struct initio_host * host, struct scsi_ctrl_blk * c scsi_for_each_sg(cmnd, sglist, cblk->sglen, i) { sg->data = cpu_to_le32((u32)sg_dma_address(sglist)); total_len += sg->len = cpu_to_le32((u32)sg_dma_len(sglist)); + ++sg; } cblk->buflen = (scsi_bufflen(cmnd) > total_len) ? -- cgit v1.2.3-70-g09d2