From: Greg Kroah-Hartman Date: Tue, 26 Jan 2010 00:04:30 +0000 (-0800) Subject: more .32 patches X-Git-Tag: v2.6.32.7~18 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ac6979ed4b74bcdccfa03f005c909c8d494e6243;p=thirdparty%2Fkernel%2Fstable-queue.git more .32 patches --- diff --git a/queue-2.6.32/ahci-disable-snotification-capability-for-ich8.patch b/queue-2.6.32/ahci-disable-snotification-capability-for-ich8.patch new file mode 100644 index 00000000000..6b98772c28a --- /dev/null +++ b/queue-2.6.32/ahci-disable-snotification-capability-for-ich8.patch @@ -0,0 +1,94 @@ +From 1b677afda44f7882b7e257d6f025d006ec5d14f9 Mon Sep 17 00:00:00 2001 +From: Shaohua Li +Date: Mon, 16 Nov 2009 09:56:05 +0800 +Subject: ahci: disable SNotification capability for ich8 + +From: Shaohua Li + +commit 1b677afda44f7882b7e257d6f025d006ec5d14f9 upstream. + +I obseved there is a sata_async_notification() for every ahci +interrupt. But the async notification does nothing (this is hard +disk drive and no pmp). This cause cpu wastes some time on sntf +register access. + +It appears ICH AHCI doesn't support SNotification register, but the +controller reports it does. After quirking it, the async notification +disappears. + +PS. it appears all ICH don't support SNotification register from ICH +manual, don't know if we need quirk all ICH. I don't have machines +with all kinds of ICH. + +Signed-off-by: Shaohua Li +Signed-off-by: Jeff Garzik +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/ata/ahci.c | 20 ++++++++++++++++++-- + 1 file changed, 18 insertions(+), 2 deletions(-) + +--- a/drivers/ata/ahci.c ++++ b/drivers/ata/ahci.c +@@ -113,6 +113,7 @@ enum { + board_ahci_mcp65 = 6, + board_ahci_nopmp = 7, + board_ahci_yesncq = 8, ++ board_ahci_nosntf = 9, + + /* global controller registers */ + HOST_CAP = 0x00, /* host capabilities */ +@@ -235,6 +236,7 @@ enum { + AHCI_HFLAG_NO_SUSPEND = (1 << 10), /* don't suspend */ + AHCI_HFLAG_SRST_TOUT_IS_OFFLINE = (1 << 11), /* treat SRST timeout as + link offline */ ++ AHCI_HFLAG_NO_SNTF = (1 << 12), /* no sntf */ + + /* ap->flags bits */ + +@@ -508,7 +510,7 @@ static const struct ata_port_info ahci_p + .udma_mask = ATA_UDMA6, + .port_ops = &ahci_ops, + }, +- /* board_ahci_yesncq */ ++ [board_ahci_yesncq] = + { + AHCI_HFLAGS (AHCI_HFLAG_YES_NCQ), + .flags = AHCI_FLAG_COMMON, +@@ -516,6 +518,14 @@ static const struct ata_port_info ahci_p + .udma_mask = ATA_UDMA6, + .port_ops = &ahci_ops, + }, ++ [board_ahci_nosntf] = ++ { ++ AHCI_HFLAGS (AHCI_HFLAG_NO_SNTF), ++ .flags = AHCI_FLAG_COMMON, ++ .pio_mask = ATA_PIO4, ++ .udma_mask = ATA_UDMA6, ++ .port_ops = &ahci_ops, ++ }, + }; + + static const struct pci_device_id ahci_pci_tbl[] = { +@@ -531,7 +541,7 @@ static const struct pci_device_id ahci_p + { PCI_VDEVICE(INTEL, 0x2683), board_ahci }, /* ESB2 */ + { PCI_VDEVICE(INTEL, 0x27c6), board_ahci }, /* ICH7-M DH */ + { PCI_VDEVICE(INTEL, 0x2821), board_ahci }, /* ICH8 */ +- { PCI_VDEVICE(INTEL, 0x2822), board_ahci }, /* ICH8 */ ++ { PCI_VDEVICE(INTEL, 0x2822), board_ahci_nosntf }, /* ICH8 */ + { PCI_VDEVICE(INTEL, 0x2824), board_ahci }, /* ICH8 */ + { PCI_VDEVICE(INTEL, 0x2829), board_ahci }, /* ICH8M */ + { PCI_VDEVICE(INTEL, 0x282a), board_ahci }, /* ICH8M */ +@@ -849,6 +859,12 @@ static void ahci_save_initial_config(str + cap &= ~HOST_CAP_PMP; + } + ++ if ((cap & HOST_CAP_SNTF) && (hpriv->flags & AHCI_HFLAG_NO_SNTF)) { ++ dev_printk(KERN_INFO, &pdev->dev, ++ "controller can't do SNTF, turning off CAP_SNTF\n"); ++ cap &= ~HOST_CAP_SNTF; ++ } ++ + if (pdev->vendor == PCI_VENDOR_ID_JMICRON && pdev->device == 0x2361 && + port_map != 1) { + dev_printk(KERN_INFO, &pdev->dev, diff --git a/queue-2.6.32/alsa-hda-add-missing-line-out-and-pcm-switches-as-slave.patch b/queue-2.6.32/alsa-hda-add-missing-line-out-and-pcm-switches-as-slave.patch new file mode 100644 index 00000000000..42e7e7cf493 --- /dev/null +++ b/queue-2.6.32/alsa-hda-add-missing-line-out-and-pcm-switches-as-slave.patch @@ -0,0 +1,30 @@ +From 23033b2bce4361f2859ee0331f97c9056dae7091 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Tue, 8 Dec 2009 12:36:52 +0100 +Subject: ALSA: hda - Add missing Line-Out and PCM switches as slave + +From: Takashi Iwai + +commit 23033b2bce4361f2859ee0331f97c9056dae7091 upstream. + +Realtek codecs may have "PCM" and "Line-Out" playback switches, and +they can be slaves for vmaster. + +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/pci/hda/patch_realtek.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/sound/pci/hda/patch_realtek.c ++++ b/sound/pci/hda/patch_realtek.c +@@ -2401,6 +2401,8 @@ static const char *alc_slave_sws[] = { + "Speaker Playback Switch", + "Mono Playback Switch", + "IEC958 Playback Switch", ++ "Line-Out Playback Switch", ++ "PCM Playback Switch", + NULL, + }; + diff --git a/queue-2.6.32/alsa-hda-fix-quirk-for-maxdata-obook4-1.patch b/queue-2.6.32/alsa-hda-fix-quirk-for-maxdata-obook4-1.patch new file mode 100644 index 00000000000..e658c859c77 --- /dev/null +++ b/queue-2.6.32/alsa-hda-fix-quirk-for-maxdata-obook4-1.patch @@ -0,0 +1,32 @@ +From 2fef62c825f09e29d2f52dc187ddf6f99e28c7f1 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Fri, 18 Dec 2009 08:48:42 +0100 +Subject: ALSA: hda - Fix quirk for Maxdata obook4-1 + +From: Takashi Iwai + +commit 2fef62c825f09e29d2f52dc187ddf6f99e28c7f1 upstream. + +Works fine with the auto-parser. + +Reference: Novell bnc#564940 + https://bugzilla.novell.com/show_bug.cgi?id=564940 + +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/pci/hda/patch_realtek.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/sound/pci/hda/patch_realtek.c ++++ b/sound/pci/hda/patch_realtek.c +@@ -8839,7 +8839,7 @@ static struct snd_pci_quirk alc882_cfg_t + SND_PCI_QUIRK(0x1462, 0x040d, "MSI", ALC883_TARGA_2ch_DIG), + SND_PCI_QUIRK(0x1462, 0x0579, "MSI", ALC883_TARGA_2ch_DIG), + SND_PCI_QUIRK(0x1462, 0x28fb, "Targa T8", ALC882_TARGA), /* MSI-1049 T8 */ +- SND_PCI_QUIRK(0x1462, 0x2fb3, "MSI", ALC883_TARGA_2ch_DIG), ++ SND_PCI_QUIRK(0x1462, 0x2fb3, "MSI", ALC882_AUTO), + SND_PCI_QUIRK(0x1462, 0x6668, "MSI", ALC882_6ST_DIG), + SND_PCI_QUIRK(0x1462, 0x3729, "MSI S420", ALC883_TARGA_DIG), + SND_PCI_QUIRK(0x1462, 0x3783, "NEC S970", ALC883_TARGA_DIG), diff --git a/queue-2.6.32/alsa-hda-select-ibexpeak-handler-for-calpella.patch b/queue-2.6.32/alsa-hda-select-ibexpeak-handler-for-calpella.patch new file mode 100644 index 00000000000..85355f621af --- /dev/null +++ b/queue-2.6.32/alsa-hda-select-ibexpeak-handler-for-calpella.patch @@ -0,0 +1,31 @@ +From 739b47f1e5aa3b36eadd7906cc6b41f0175c6ed1 Mon Sep 17 00:00:00 2001 +From: Wu Fengguang +Date: Fri, 30 Oct 2009 11:34:19 +0100 +Subject: ALSA: hda - select IbexPeak handler for Calpella + +From: Wu Fengguang + +commit 739b47f1e5aa3b36eadd7906cc6b41f0175c6ed1 upstream. + +An earlier patch merely adds id for 0x80862804. +It has 2/3 cvt/pin nodes and shall be tied to the IbexPeak handler. + +Signed-off-by: Wu Fengguang +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/pci/hda/patch_intelhdmi.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/sound/pci/hda/patch_intelhdmi.c ++++ b/sound/pci/hda/patch_intelhdmi.c +@@ -684,7 +684,7 @@ static struct hda_codec_preset snd_hda_p + { .id = 0x80862801, .name = "G45 DEVBLC", .patch = patch_intel_hdmi }, + { .id = 0x80862802, .name = "G45 DEVCTG", .patch = patch_intel_hdmi }, + { .id = 0x80862803, .name = "G45 DEVELK", .patch = patch_intel_hdmi }, +- { .id = 0x80862804, .name = "G45 DEVIBX", .patch = patch_intel_hdmi }, ++ { .id = 0x80862804, .name = "G45 DEVIBX", .patch = patch_intel_hdmi_ibexpeak }, + { .id = 0x80860054, .name = "Q57 DEVIBX", .patch = patch_intel_hdmi_ibexpeak }, + { .id = 0x10951392, .name = "SiI1392 HDMI", .patch = patch_intel_hdmi }, + {} /* terminator */ diff --git a/queue-2.6.32/ata_piix-enable-32bit-pio-on-sata-piix.patch b/queue-2.6.32/ata_piix-enable-32bit-pio-on-sata-piix.patch new file mode 100644 index 00000000000..f7d4f001c6c --- /dev/null +++ b/queue-2.6.32/ata_piix-enable-32bit-pio-on-sata-piix.patch @@ -0,0 +1,33 @@ +From 0b67c7439fe2a5d76602de36854c88e2beab00b0 Mon Sep 17 00:00:00 2001 +From: Tejun Heo +Date: Mon, 11 Jan 2010 17:03:11 +0900 +Subject: ata_piix: enable 32bit PIO on SATA piix + +From: Tejun Heo + +commit 0b67c7439fe2a5d76602de36854c88e2beab00b0 upstream. + +Commit 871af1210f13966ab911ed2166e4ab2ce775b99d enabled 32bit PIO for +PATA piix but didn't for SATA. There's no reason not to use 32bit PIO +on SATA piix. Enable it. + +Signed-off-by: Tejun Heo +Cc: Alan Cox +Signed-off-by: Jeff Garzik +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/ata/ata_piix.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/ata/ata_piix.c ++++ b/drivers/ata/ata_piix.c +@@ -329,7 +329,7 @@ static struct ata_port_operations ich_pa + }; + + static struct ata_port_operations piix_sata_ops = { +- .inherits = &ata_bmdma_port_ops, ++ .inherits = &ata_bmdma32_port_ops, + }; + + static struct ata_port_operations piix_sidpr_sata_ops = { diff --git a/queue-2.6.32/ata_piix-fix-mwdma-handling-on-piix3.patch b/queue-2.6.32/ata_piix-fix-mwdma-handling-on-piix3.patch new file mode 100644 index 00000000000..6b2b12bdf1c --- /dev/null +++ b/queue-2.6.32/ata_piix-fix-mwdma-handling-on-piix3.patch @@ -0,0 +1,36 @@ +From 6938594374ee506e91a4c03117a034ea0ed66783 Mon Sep 17 00:00:00 2001 +From: Bartlomiej Zolnierkiewicz +Date: Thu, 3 Dec 2009 20:32:08 +0100 +Subject: ata_piix: fix MWDMA handling on PIIX3 + +From: Bartlomiej Zolnierkiewicz + +commit 6938594374ee506e91a4c03117a034ea0ed66783 upstream. + +Fix erroneous check for ap->udma_mask in do_pata_set_dmamode() +resulting in controller not being programmed properly for MWDMA. + +Signed-off-by: Bartlomiej Zolnierkiewicz +Signed-off-by: Jeff Garzik +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/ata/ata_piix.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- a/drivers/ata/ata_piix.c ++++ b/drivers/ata/ata_piix.c +@@ -869,10 +869,10 @@ static void do_pata_set_dmamode(struct a + (timings[pio][1] << 8); + } + +- if (ap->udma_mask) { ++ if (ap->udma_mask) + udma_enable &= ~(1 << devid); +- pci_write_config_word(dev, master_port, master_data); +- } ++ ++ pci_write_config_word(dev, master_port, master_data); + } + /* Don't scribble on 0x48 if the controller does not support UDMA */ + if (ap->udma_mask) diff --git a/queue-2.6.32/cio-dont-panic-in-non-fatal-conditions.patch b/queue-2.6.32/cio-dont-panic-in-non-fatal-conditions.patch new file mode 100644 index 00000000000..22bfe9c1f71 --- /dev/null +++ b/queue-2.6.32/cio-dont-panic-in-non-fatal-conditions.patch @@ -0,0 +1,85 @@ +From 16b9a0571da4ee5cd15ca75e871722b0b5aee64d Mon Sep 17 00:00:00 2001 +From: Peter Oberparleiter +Date: Mon, 7 Dec 2009 12:51:24 +0100 +Subject: [S390] cio: dont panic in non-fatal conditions + +From: Peter Oberparleiter + +commit 16b9a0571da4ee5cd15ca75e871722b0b5aee64d upstream. + +Remove the call to BUG() for situations which are unexpected +but do not cause actual problems. + +Signed-off-by: Peter Oberparleiter +Signed-off-by: Martin Schwidefsky +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/s390/cio/device_fsm.c | 25 ++++++------------------- + 1 file changed, 6 insertions(+), 19 deletions(-) + +--- a/drivers/s390/cio/device_fsm.c ++++ b/drivers/s390/cio/device_fsm.c +@@ -1080,14 +1080,14 @@ void ccw_device_trigger_reprobe(struct c + ccw_device_start_id(cdev, 0); + } + +-static void +-ccw_device_offline_irq(struct ccw_device *cdev, enum dev_event dev_event) ++static void ccw_device_disabled_irq(struct ccw_device *cdev, ++ enum dev_event dev_event) + { + struct subchannel *sch; + + sch = to_subchannel(cdev->dev.parent); + /* +- * An interrupt in state offline means a previous disable was not ++ * An interrupt in a disabled state means a previous disable was not + * successful - should not happen, but we try to disable again. + */ + cio_disable_subchannel(sch); +@@ -1150,25 +1150,12 @@ ccw_device_nop(struct ccw_device *cdev, + } + + /* +- * Bug operation action. +- */ +-static void +-ccw_device_bug(struct ccw_device *cdev, enum dev_event dev_event) +-{ +- CIO_MSG_EVENT(0, "Internal state [%i][%i] not handled for device " +- "0.%x.%04x\n", cdev->private->state, dev_event, +- cdev->private->dev_id.ssid, +- cdev->private->dev_id.devno); +- BUG(); +-} +- +-/* + * device statemachine + */ + fsm_func_t *dev_jumptable[NR_DEV_STATES][NR_DEV_EVENTS] = { + [DEV_STATE_NOT_OPER] = { + [DEV_EVENT_NOTOPER] = ccw_device_nop, +- [DEV_EVENT_INTERRUPT] = ccw_device_bug, ++ [DEV_EVENT_INTERRUPT] = ccw_device_disabled_irq, + [DEV_EVENT_TIMEOUT] = ccw_device_nop, + [DEV_EVENT_VERIFY] = ccw_device_nop, + }, +@@ -1186,7 +1173,7 @@ fsm_func_t *dev_jumptable[NR_DEV_STATES] + }, + [DEV_STATE_OFFLINE] = { + [DEV_EVENT_NOTOPER] = ccw_device_generic_notoper, +- [DEV_EVENT_INTERRUPT] = ccw_device_offline_irq, ++ [DEV_EVENT_INTERRUPT] = ccw_device_disabled_irq, + [DEV_EVENT_TIMEOUT] = ccw_device_nop, + [DEV_EVENT_VERIFY] = ccw_device_offline_verify, + }, +@@ -1243,7 +1230,7 @@ fsm_func_t *dev_jumptable[NR_DEV_STATES] + [DEV_STATE_DISCONNECTED] = { + [DEV_EVENT_NOTOPER] = ccw_device_nop, + [DEV_EVENT_INTERRUPT] = ccw_device_start_id, +- [DEV_EVENT_TIMEOUT] = ccw_device_bug, ++ [DEV_EVENT_TIMEOUT] = ccw_device_nop, + [DEV_EVENT_VERIFY] = ccw_device_start_id, + }, + [DEV_STATE_DISCONNECTED_SENSE_ID] = { diff --git a/queue-2.6.32/cio-fix-double-free-in-case-of-probe-failure.patch b/queue-2.6.32/cio-fix-double-free-in-case-of-probe-failure.patch new file mode 100644 index 00000000000..3ad3c596526 --- /dev/null +++ b/queue-2.6.32/cio-fix-double-free-in-case-of-probe-failure.patch @@ -0,0 +1,68 @@ +From 48e4c385c5f54626651cca027afe242439281899 Mon Sep 17 00:00:00 2001 +From: Peter Oberparleiter +Date: Mon, 7 Dec 2009 12:51:15 +0100 +Subject: [S390] cio: fix double free in case of probe failure + +From: Peter Oberparleiter + +commit 48e4c385c5f54626651cca027afe242439281899 upstream. + +io_subchannel_probe() frees memory for sch->private which is later +freed again when io_subchannel_remove() is called. Fix this problem +by removing the cleanup in io_subchannel_probe(). + +Signed-off-by: Peter Oberparleiter +Signed-off-by: Martin Schwidefsky +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/s390/cio/device.c | 11 +++++------ + 1 file changed, 5 insertions(+), 6 deletions(-) + +--- a/drivers/s390/cio/device.c ++++ b/drivers/s390/cio/device.c +@@ -1292,7 +1292,7 @@ static int io_subchannel_probe(struct su + sch->private = kzalloc(sizeof(struct io_subchannel_private), + GFP_KERNEL | GFP_DMA); + if (!sch->private) +- goto out_err; ++ goto out_schedule; + /* + * First check if a fitting device may be found amongst the + * disconnected devices or in the orphanage. +@@ -1317,7 +1317,7 @@ static int io_subchannel_probe(struct su + } + cdev = io_subchannel_create_ccwdev(sch); + if (IS_ERR(cdev)) +- goto out_err; ++ goto out_schedule; + rc = io_subchannel_recog(cdev, sch); + if (rc) { + spin_lock_irqsave(sch->lock, flags); +@@ -1325,9 +1325,7 @@ static int io_subchannel_probe(struct su + spin_unlock_irqrestore(sch->lock, flags); + } + return 0; +-out_err: +- kfree(sch->private); +- sysfs_remove_group(&sch->dev.kobj, &io_subchannel_attr_group); ++ + out_schedule: + io_subchannel_schedule_removal(sch); + return 0; +@@ -1341,13 +1339,14 @@ io_subchannel_remove (struct subchannel + + cdev = sch_get_cdev(sch); + if (!cdev) +- return 0; ++ goto out_free; + /* Set ccw device to not operational and drop reference. */ + spin_lock_irqsave(cdev->ccwlock, flags); + sch_set_cdev(sch, NULL); + cdev->private->state = DEV_STATE_NOT_OPER; + spin_unlock_irqrestore(cdev->ccwlock, flags); + ccw_device_unregister(cdev); ++out_free: + kfree(sch->private); + sysfs_remove_group(&sch->dev.kobj, &io_subchannel_attr_group); + return 0; diff --git a/queue-2.6.32/fcoe-fix-checking-san-mac-address.patch b/queue-2.6.32/fcoe-fix-checking-san-mac-address.patch new file mode 100644 index 00000000000..03928a1131d --- /dev/null +++ b/queue-2.6.32/fcoe-fix-checking-san-mac-address.patch @@ -0,0 +1,31 @@ +From bf361707c81f8e8e43e332bfc8838bae76ae021a Mon Sep 17 00:00:00 2001 +From: Yi Zou +Date: Tue, 3 Nov 2009 11:49:38 -0800 +Subject: [SCSI] fcoe: Fix checking san mac address + +From: Yi Zou + +commit bf361707c81f8e8e43e332bfc8838bae76ae021a upstream. + +This was fixed before in 7a7f0c7 but it's introduced again recently. + +Signed-off-by: Yi Zou +Signed-off-by: Robert Love +Signed-off-by: James Bottomley +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/scsi/fcoe/fcoe.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/scsi/fcoe/fcoe.c ++++ b/drivers/scsi/fcoe/fcoe.c +@@ -176,7 +176,7 @@ static int fcoe_interface_setup(struct f + rcu_read_lock(); + for_each_dev_addr(netdev, ha) { + if ((ha->type == NETDEV_HW_ADDR_T_SAN) && +- (is_valid_ether_addr(fip->ctl_src_addr))) { ++ (is_valid_ether_addr(ha->addr))) { + memcpy(fip->ctl_src_addr, ha->addr, ETH_ALEN); + fip->spma = 1; + break; diff --git a/queue-2.6.32/fcoe-fix-getting-san-mac-for-vlan-interface.patch b/queue-2.6.32/fcoe-fix-getting-san-mac-for-vlan-interface.patch new file mode 100644 index 00000000000..c79df5d04dc --- /dev/null +++ b/queue-2.6.32/fcoe-fix-getting-san-mac-for-vlan-interface.patch @@ -0,0 +1,43 @@ +From 5bab87e6d465d54a2b5899e0f583d42f00dbee2e Mon Sep 17 00:00:00 2001 +From: Yi Zou +Date: Tue, 3 Nov 2009 11:49:43 -0800 +Subject: [SCSI] fcoe: Fix getting san mac for VLAN interface + +From: Yi Zou + +commit 5bab87e6d465d54a2b5899e0f583d42f00dbee2e upstream. + +Make sure we are get the SAN MAC address from the real netdev if the input +netdev is a VLAN device. + +Signed-off-by: Yi Zou +Signed-off-by: Robert Love +Signed-off-by: James Bottomley +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/scsi/fcoe/fcoe.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +--- a/drivers/scsi/fcoe/fcoe.c ++++ b/drivers/scsi/fcoe/fcoe.c +@@ -160,6 +160,7 @@ static int fcoe_interface_setup(struct f + { + struct fcoe_ctlr *fip = &fcoe->ctlr; + struct netdev_hw_addr *ha; ++ struct net_device *real_dev; + u8 flogi_maddr[ETH_ALEN]; + + fcoe->netdev = netdev; +@@ -173,8 +174,10 @@ static int fcoe_interface_setup(struct f + + /* look for SAN MAC address, if multiple SAN MACs exist, only + * use the first one for SPMA */ ++ real_dev = (netdev->priv_flags & IFF_802_1Q_VLAN) ? ++ vlan_dev_real_dev(netdev) : netdev; + rcu_read_lock(); +- for_each_dev_addr(netdev, ha) { ++ for_each_dev_addr(real_dev, ha) { + if ((ha->type == NETDEV_HW_ADDR_T_SAN) && + (is_valid_ether_addr(ha->addr))) { + memcpy(fip->ctl_src_addr, ha->addr, ETH_ALEN); diff --git a/queue-2.6.32/fcoe-initialize-return-value-in-fcoe_destroy.patch b/queue-2.6.32/fcoe-initialize-return-value-in-fcoe_destroy.patch new file mode 100644 index 00000000000..5ea9ababc1a --- /dev/null +++ b/queue-2.6.32/fcoe-initialize-return-value-in-fcoe_destroy.patch @@ -0,0 +1,34 @@ +From 8eca355fa8af660557fbdd5506bde1392eee9bfe Mon Sep 17 00:00:00 2001 +From: Mike Christie +Date: Wed, 21 Oct 2009 16:27:44 -0700 +Subject: [SCSI] fcoe: initialize return value in fcoe_destroy + +From: Mike Christie + +commit 8eca355fa8af660557fbdd5506bde1392eee9bfe upstream. + +When doing echo ethX > /sys..../destroy I am getting +errors when the tear down succeeds. It looks like the +reason for this is because the rc var is not getting set +when the destruction works. This just sets it to zero. + +Signed-off-by: Mike Christie +Signed-off-by: Robert Love +Signed-off-by: James Bottomley +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/scsi/fcoe/fcoe.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/scsi/fcoe/fcoe.c ++++ b/drivers/scsi/fcoe/fcoe.c +@@ -1631,7 +1631,7 @@ static int fcoe_destroy(const char *buff + { + struct fcoe_interface *fcoe; + struct net_device *netdev; +- int rc; ++ int rc = 0; + + mutex_lock(&fcoe_config_mutex); + #ifdef CONFIG_FCOE_MODULE diff --git a/queue-2.6.32/fcoe-libfc-fix-an-libfc-issue-with-queue-ramp-down-in-libfc.patch b/queue-2.6.32/fcoe-libfc-fix-an-libfc-issue-with-queue-ramp-down-in-libfc.patch new file mode 100644 index 00000000000..a2a4998112d --- /dev/null +++ b/queue-2.6.32/fcoe-libfc-fix-an-libfc-issue-with-queue-ramp-down-in-libfc.patch @@ -0,0 +1,64 @@ +From 14caf44c69184ed72d46a2f883311daf27a4192f Mon Sep 17 00:00:00 2001 +From: Vasu Dev +Date: Thu, 15 Oct 2009 17:46:55 -0700 +Subject: [SCSI] fcoe, libfc: fix an libfc issue with queue ramp down in libfc + +From: Vasu Dev + +commit 14caf44c69184ed72d46a2f883311daf27a4192f upstream. + +The cmd_per_lun value is used by scsi-ml as fall back lowest +queue_depth value but in case of libfc cmd_per_lun is set to +same value as max queue_depth = 32. + +So this patch reduces cmd_per_lun value to 3 and configures +each lun with default max queue_depth 32 in fc_slave_alloc. + +Signed-off-by: Vasu Dev +Acked-by: Robert Love +Signed-off-by: James Bottomley +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/scsi/fcoe/fcoe.c | 2 +- + drivers/scsi/libfc/fc_fcp.c | 14 ++++++-------- + 2 files changed, 7 insertions(+), 9 deletions(-) + +--- a/drivers/scsi/fcoe/fcoe.c ++++ b/drivers/scsi/fcoe/fcoe.c +@@ -137,7 +137,7 @@ static struct scsi_host_template fcoe_sh + .change_queue_depth = fc_change_queue_depth, + .change_queue_type = fc_change_queue_type, + .this_id = -1, +- .cmd_per_lun = 32, ++ .cmd_per_lun = 3, + .can_queue = FCOE_MAX_OUTSTANDING_COMMANDS, + .use_clustering = ENABLE_CLUSTERING, + .sg_tablesize = SG_ALL, +--- a/drivers/scsi/libfc/fc_fcp.c ++++ b/drivers/scsi/libfc/fc_fcp.c +@@ -2049,18 +2049,16 @@ EXPORT_SYMBOL(fc_eh_host_reset); + int fc_slave_alloc(struct scsi_device *sdev) + { + struct fc_rport *rport = starget_to_rport(scsi_target(sdev)); +- int queue_depth; + + if (!rport || fc_remote_port_chkready(rport)) + return -ENXIO; + +- if (sdev->tagged_supported) { +- if (sdev->host->hostt->cmd_per_lun) +- queue_depth = sdev->host->hostt->cmd_per_lun; +- else +- queue_depth = FC_FCP_DFLT_QUEUE_DEPTH; +- scsi_activate_tcq(sdev, queue_depth); +- } ++ if (sdev->tagged_supported) ++ scsi_activate_tcq(sdev, FC_FCP_DFLT_QUEUE_DEPTH); ++ else ++ scsi_adjust_queue_depth(sdev, scsi_get_tag_type(sdev), ++ FC_FCP_DFLT_QUEUE_DEPTH); ++ + return 0; + } + EXPORT_SYMBOL(fc_slave_alloc); diff --git a/queue-2.6.32/fcoe-remove-redundant-checking-of-netdev-netdev_ops.patch b/queue-2.6.32/fcoe-remove-redundant-checking-of-netdev-netdev_ops.patch new file mode 100644 index 00000000000..87ded289657 --- /dev/null +++ b/queue-2.6.32/fcoe-remove-redundant-checking-of-netdev-netdev_ops.patch @@ -0,0 +1,40 @@ +From b04d023cf5b7f4113cc4a09405c2fe8003bfe37d Mon Sep 17 00:00:00 2001 +From: Yi Zou +Date: Wed, 21 Oct 2009 16:26:55 -0700 +Subject: [SCSI] fcoe: remove redundant checking of netdev->netdev_ops + +From: Yi Zou + +commit b04d023cf5b7f4113cc4a09405c2fe8003bfe37d upstream. + +Remove the redundant checking of netdev->netdev_ops as it will never be NULL. + +Signed-off-by: Yi Zou +Signed-off-by: Robert Love +Signed-off-by: James Bottomley +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/scsi/fcoe/fcoe.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/scsi/fcoe/fcoe.c ++++ b/drivers/scsi/fcoe/fcoe.c +@@ -664,7 +664,7 @@ static int fcoe_ddp_setup(struct fc_lpor + { + struct net_device *n = fcoe_netdev(lp); + +- if (n->netdev_ops && n->netdev_ops->ndo_fcoe_ddp_setup) ++ if (n->netdev_ops->ndo_fcoe_ddp_setup) + return n->netdev_ops->ndo_fcoe_ddp_setup(n, xid, sgl, sgc); + + return 0; +@@ -681,7 +681,7 @@ static int fcoe_ddp_done(struct fc_lport + { + struct net_device *n = fcoe_netdev(lp); + +- if (n->netdev_ops && n->netdev_ops->ndo_fcoe_ddp_done) ++ if (n->netdev_ops->ndo_fcoe_ddp_done) + return n->netdev_ops->ndo_fcoe_ddp_done(n, xid); + return 0; + } diff --git a/queue-2.6.32/hid-fixup-quirk-for-ncr-devices.patch b/queue-2.6.32/hid-fixup-quirk-for-ncr-devices.patch new file mode 100644 index 00000000000..73f578a87ef --- /dev/null +++ b/queue-2.6.32/hid-fixup-quirk-for-ncr-devices.patch @@ -0,0 +1,68 @@ +From 5b915d9e6dc3d22fedde91dfef1cb1a8fa9a1870 Mon Sep 17 00:00:00 2001 +From: Jiri Kosina +Date: Thu, 5 Nov 2009 14:08:03 +0100 +Subject: HID: fixup quirk for NCR devices + +From: Jiri Kosina + +commit 5b915d9e6dc3d22fedde91dfef1cb1a8fa9a1870 upstream. + +NCR devices are terminally broken by design -- they claim themselves to contain +proper input applications in their HID report descriptor, but behave very badly +if treated in standard way. + +According to NCR developers, the devices get confused when queried for reports +in a standard way, rendering them unusable. + +NCR is shipping application called "RPSL" that can be used to drive these +devices through hiddev, under the assumption that in-kernel driver doesn't +perform initial report query. +If it does, neither in-kernel nor hiddev-based driver can operate with these +devices any more. + +Introduce a quirk that skips the report query for all NCR devices. The previous +NOGET quirk was wrong and had been introduced because I misunderstood the nature +of brokenness of these devices. + +Signed-off-by: Jiri Kosina +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/hid/usbhid/hid-core.c | 3 ++- + drivers/hid/usbhid/hid-quirks.c | 2 +- + include/linux/hid.h | 1 + + 3 files changed, 4 insertions(+), 2 deletions(-) + +--- a/drivers/hid/usbhid/hid-core.c ++++ b/drivers/hid/usbhid/hid-core.c +@@ -998,7 +998,8 @@ static int usbhid_start(struct hid_devic + usbhid->urbctrl->transfer_dma = usbhid->ctrlbuf_dma; + usbhid->urbctrl->transfer_flags |= (URB_NO_TRANSFER_DMA_MAP | URB_NO_SETUP_DMA_MAP); + +- usbhid_init_reports(hid); ++ if (!(hid->quirks & HID_QUIRK_NO_INIT_REPORTS)) ++ usbhid_init_reports(hid); + + set_bit(HID_STARTED, &usbhid->iofl); + +--- a/drivers/hid/usbhid/hid-quirks.c ++++ b/drivers/hid/usbhid/hid-quirks.c +@@ -280,7 +280,7 @@ u32 usbhid_lookup_quirk(const u16 idVend + if (idVendor == USB_VENDOR_ID_NCR && + idProduct >= USB_DEVICE_ID_NCR_FIRST && + idProduct <= USB_DEVICE_ID_NCR_LAST) +- return HID_QUIRK_NOGET; ++ return HID_QUIRK_NO_INIT_REPORTS; + + down_read(&dquirks_rwsem); + bl_entry = usbhid_exists_dquirk(idVendor, idProduct); +--- a/include/linux/hid.h ++++ b/include/linux/hid.h +@@ -312,6 +312,7 @@ struct hid_item { + #define HID_QUIRK_MULTI_INPUT 0x00000040 + #define HID_QUIRK_SKIP_OUTPUT_REPORTS 0x00010000 + #define HID_QUIRK_FULLSPEED_INTERVAL 0x10000000 ++#define HID_QUIRK_NO_INIT_REPORTS 0x20000000 + + /* + * This is the global environment of the parser. This information is diff --git a/queue-2.6.32/input-i8042-add-dritek-quirk-for-acer-aspire-5610.patch b/queue-2.6.32/input-i8042-add-dritek-quirk-for-acer-aspire-5610.patch new file mode 100644 index 00000000000..f15e5fb99b9 --- /dev/null +++ b/queue-2.6.32/input-i8042-add-dritek-quirk-for-acer-aspire-5610.patch @@ -0,0 +1,33 @@ +From e6edbdc52bc0755cbfe0721ca91d4fd87649bc13 Mon Sep 17 00:00:00 2001 +From: Elliott Sales de Andrade +Date: Sun, 10 Jan 2010 23:59:05 -0800 +Subject: Input: i8042 - add Dritek quirk for Acer Aspire 5610. + +From: Elliott Sales de Andrade + +commit e6edbdc52bc0755cbfe0721ca91d4fd87649bc13 upstream. + +Signed-off-by: Elliott Sales de Andrade +Signed-off-by: Dmitry Torokhov +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/input/serio/i8042-x86ia64io.h | 7 +++++++ + 1 file changed, 7 insertions(+) + +--- a/drivers/input/serio/i8042-x86ia64io.h ++++ b/drivers/input/serio/i8042-x86ia64io.h +@@ -524,6 +524,13 @@ static const struct dmi_system_id __init + */ + static const struct dmi_system_id __initconst i8042_dmi_dritek_table[] = { + { ++ /* Acer Aspire 5610 */ ++ .matches = { ++ DMI_MATCH(DMI_SYS_VENDOR, "Acer"), ++ DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5610"), ++ }, ++ }, ++ { + /* Acer Aspire 5630 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Acer"), diff --git a/queue-2.6.32/input-i8042-add-gigabyte-m1022m-to-the-noloop-list.patch b/queue-2.6.32/input-i8042-add-gigabyte-m1022m-to-the-noloop-list.patch new file mode 100644 index 00000000000..f6cb77b0424 --- /dev/null +++ b/queue-2.6.32/input-i8042-add-gigabyte-m1022m-to-the-noloop-list.patch @@ -0,0 +1,39 @@ +From a61cd03827eceefcec19eefc6e1173703fdc5e5d Mon Sep 17 00:00:00 2001 +From: Dmitry Torokhov +Date: Sun, 13 Dec 2009 00:34:06 -0800 +Subject: Input: i8042 - add Gigabyte M1022M to the noloop list + +From: Dmitry Torokhov + +commit a61cd03827eceefcec19eefc6e1173703fdc5e5d upstream. + +Gigabyte netbook model M1022M requires i8042.noloop, otherwise AUX port +will not detected and the touchpad will not work. Unfortunately chassis +type in DMI set to "Other" and thus generic laptop entry does not fire +on it. + +Reported-by: Darryl Bond +Signed-off-by: Dmitry Torokhov +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/input/serio/i8042-x86ia64io.h | 8 ++++++++ + 1 file changed, 8 insertions(+) + +--- a/drivers/input/serio/i8042-x86ia64io.h ++++ b/drivers/input/serio/i8042-x86ia64io.h +@@ -158,6 +158,14 @@ static const struct dmi_system_id __init + }, + }, + { ++ /* Gigabyte M1022M netbook */ ++ .matches = { ++ DMI_MATCH(DMI_BOARD_VENDOR, "Gigabyte Technology Co.,Ltd."), ++ DMI_MATCH(DMI_BOARD_NAME, "M1022E"), ++ DMI_MATCH(DMI_BOARD_VERSION, "1.02"), ++ }, ++ }, ++ { + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), + DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion dv9700"), diff --git a/queue-2.6.32/input-i8042-remove-identification-strings-from-dmi-tables.patch b/queue-2.6.32/input-i8042-remove-identification-strings-from-dmi-tables.patch new file mode 100644 index 00000000000..655f7626d3e --- /dev/null +++ b/queue-2.6.32/input-i8042-remove-identification-strings-from-dmi-tables.patch @@ -0,0 +1,579 @@ +From f909b1df0a068f30e252d8dc3e9d45ca25bf266f Mon Sep 17 00:00:00 2001 +From: Dmitry Torokhov +Date: Fri, 4 Dec 2009 10:24:19 -0800 +Subject: Input: i8042 - remove identification strings from DMI tables + +From: Dmitry Torokhov + +commit f909b1df0a068f30e252d8dc3e9d45ca25bf266f upstream. + +The driver does not reference identification strings in DMI tables and +since these strings are no longer required by DMI core we can safely +remove them and save some memory. + +Signed-off-by: Dmitry Torokhov + +--- + drivers/input/serio/i8042-x86ia64io.h | 143 +++++++++++++++------------------- + 1 file changed, 66 insertions(+), 77 deletions(-) + +--- a/drivers/input/serio/i8042-x86ia64io.h ++++ b/drivers/input/serio/i8042-x86ia64io.h +@@ -67,10 +67,12 @@ static inline void i8042_write_command(i + + #include + +-static struct dmi_system_id __initdata i8042_dmi_noloop_table[] = { ++static const struct dmi_system_id __initconst i8042_dmi_noloop_table[] = { + { +- /* AUX LOOP command does not raise AUX IRQ */ +- .ident = "Arima-Rioworks HDAMB", ++ /* ++ * Arima-Rioworks HDAMB - ++ * AUX LOOP command does not raise AUX IRQ ++ */ + .matches = { + DMI_MATCH(DMI_BOARD_VENDOR, "RIOWORKS"), + DMI_MATCH(DMI_BOARD_NAME, "HDAMB"), +@@ -78,7 +80,7 @@ static struct dmi_system_id __initdata i + }, + }, + { +- .ident = "ASUS G1S", ++ /* ASUS G1S */ + .matches = { + DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer Inc."), + DMI_MATCH(DMI_BOARD_NAME, "G1S"), +@@ -86,8 +88,7 @@ static struct dmi_system_id __initdata i + }, + }, + { +- /* AUX LOOP command does not raise AUX IRQ */ +- .ident = "ASUS P65UP5", ++ /* ASUS P65UP5 - AUX LOOP command does not raise AUX IRQ */ + .matches = { + DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK Computer INC."), + DMI_MATCH(DMI_BOARD_NAME, "P/I-P65UP5"), +@@ -95,7 +96,6 @@ static struct dmi_system_id __initdata i + }, + }, + { +- .ident = "Compaq Proliant 8500", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Compaq"), + DMI_MATCH(DMI_PRODUCT_NAME , "ProLiant"), +@@ -103,7 +103,6 @@ static struct dmi_system_id __initdata i + }, + }, + { +- .ident = "Compaq Proliant DL760", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Compaq"), + DMI_MATCH(DMI_PRODUCT_NAME , "ProLiant"), +@@ -111,7 +110,7 @@ static struct dmi_system_id __initdata i + }, + }, + { +- .ident = "OQO Model 01", ++ /* OQO Model 01 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "OQO"), + DMI_MATCH(DMI_PRODUCT_NAME, "ZEPTO"), +@@ -119,8 +118,7 @@ static struct dmi_system_id __initdata i + }, + }, + { +- /* AUX LOOP does not work properly */ +- .ident = "ULI EV4873", ++ /* ULI EV4873 - AUX LOOP does not work properly */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "ULI"), + DMI_MATCH(DMI_PRODUCT_NAME, "EV4873"), +@@ -128,7 +126,7 @@ static struct dmi_system_id __initdata i + }, + }, + { +- .ident = "Microsoft Virtual Machine", ++ /* Microsoft Virtual Machine */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Microsoft Corporation"), + DMI_MATCH(DMI_PRODUCT_NAME, "Virtual Machine"), +@@ -136,7 +134,7 @@ static struct dmi_system_id __initdata i + }, + }, + { +- .ident = "Medion MAM 2070", ++ /* Medion MAM 2070 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Notebook"), + DMI_MATCH(DMI_PRODUCT_NAME, "MAM 2070"), +@@ -144,7 +142,7 @@ static struct dmi_system_id __initdata i + }, + }, + { +- .ident = "Blue FB5601", ++ /* Blue FB5601 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "blue"), + DMI_MATCH(DMI_PRODUCT_NAME, "FB5601"), +@@ -152,7 +150,7 @@ static struct dmi_system_id __initdata i + }, + }, + { +- .ident = "Gigabyte M912", ++ /* Gigabyte M912 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "GIGABYTE"), + DMI_MATCH(DMI_PRODUCT_NAME, "M912"), +@@ -160,7 +158,6 @@ static struct dmi_system_id __initdata i + }, + }, + { +- .ident = "HP DV9700", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), + DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion dv9700"), +@@ -177,72 +174,72 @@ static struct dmi_system_id __initdata i + * ... apparently some Toshibas don't like MUX mode either and + * die horrible death on reboot. + */ +-static struct dmi_system_id __initdata i8042_dmi_nomux_table[] = { ++static const struct dmi_system_id __initconst i8042_dmi_nomux_table[] = { + { +- .ident = "Fujitsu Lifebook P7010/P7010D", ++ /* Fujitsu Lifebook P7010/P7010D */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"), + DMI_MATCH(DMI_PRODUCT_NAME, "P7010"), + }, + }, + { +- .ident = "Fujitsu Lifebook P7010", ++ /* Fujitsu Lifebook P7010 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"), + DMI_MATCH(DMI_PRODUCT_NAME, "0000000000"), + }, + }, + { +- .ident = "Fujitsu Lifebook P5020D", ++ /* Fujitsu Lifebook P5020D */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"), + DMI_MATCH(DMI_PRODUCT_NAME, "LifeBook P Series"), + }, + }, + { +- .ident = "Fujitsu Lifebook S2000", ++ /* Fujitsu Lifebook S2000 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"), + DMI_MATCH(DMI_PRODUCT_NAME, "LifeBook S Series"), + }, + }, + { +- .ident = "Fujitsu Lifebook S6230", ++ /* Fujitsu Lifebook S6230 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"), + DMI_MATCH(DMI_PRODUCT_NAME, "LifeBook S6230"), + }, + }, + { +- .ident = "Fujitsu T70H", ++ /* Fujitsu T70H */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"), + DMI_MATCH(DMI_PRODUCT_NAME, "FMVLT70H"), + }, + }, + { +- .ident = "Fujitsu-Siemens Lifebook T3010", ++ /* Fujitsu-Siemens Lifebook T3010 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"), + DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK T3010"), + }, + }, + { +- .ident = "Fujitsu-Siemens Lifebook E4010", ++ /* Fujitsu-Siemens Lifebook E4010 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"), + DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK E4010"), + }, + }, + { +- .ident = "Fujitsu-Siemens Amilo Pro 2010", ++ /* Fujitsu-Siemens Amilo Pro 2010 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"), + DMI_MATCH(DMI_PRODUCT_NAME, "AMILO Pro V2010"), + }, + }, + { +- .ident = "Fujitsu-Siemens Amilo Pro 2030", ++ /* Fujitsu-Siemens Amilo Pro 2030 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"), + DMI_MATCH(DMI_PRODUCT_NAME, "AMILO PRO V2030"), +@@ -253,7 +250,7 @@ static struct dmi_system_id __initdata i + * No data is coming from the touchscreen unless KBC + * is in legacy mode. + */ +- .ident = "Panasonic CF-29", ++ /* Panasonic CF-29 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Matsushita"), + DMI_MATCH(DMI_PRODUCT_NAME, "CF-29"), +@@ -261,10 +258,10 @@ static struct dmi_system_id __initdata i + }, + { + /* +- * Errors on MUX ports are reported without raising AUXDATA ++ * HP Pavilion DV4017EA - ++ * errors on MUX ports are reported without raising AUXDATA + * causing "spurious NAK" messages. + */ +- .ident = "HP Pavilion DV4017EA", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), + DMI_MATCH(DMI_PRODUCT_NAME, "Pavilion dv4000 (EA032EA#ABF)"), +@@ -272,9 +269,9 @@ static struct dmi_system_id __initdata i + }, + { + /* +- * Like DV4017EA does not raise AUXERR for errors on MUX ports. ++ * HP Pavilion ZT1000 - ++ * like DV4017EA does not raise AUXERR for errors on MUX ports. + */ +- .ident = "HP Pavilion ZT1000", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), + DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion Notebook PC"), +@@ -283,44 +280,41 @@ static struct dmi_system_id __initdata i + }, + { + /* +- * Like DV4017EA does not raise AUXERR for errors on MUX ports. ++ * HP Pavilion DV4270ca - ++ * like DV4017EA does not raise AUXERR for errors on MUX ports. + */ +- .ident = "HP Pavilion DV4270ca", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), + DMI_MATCH(DMI_PRODUCT_NAME, "Pavilion dv4000 (EH476UA#ABL)"), + }, + }, + { +- .ident = "Toshiba P10", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), + DMI_MATCH(DMI_PRODUCT_NAME, "Satellite P10"), + }, + }, + { +- .ident = "Toshiba Equium A110", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), + DMI_MATCH(DMI_PRODUCT_NAME, "EQUIUM A110"), + }, + }, + { +- .ident = "Alienware Sentia", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "ALIENWARE"), + DMI_MATCH(DMI_PRODUCT_NAME, "Sentia"), + }, + }, + { +- .ident = "Sharp Actius MM20", ++ /* Sharp Actius MM20 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "SHARP"), + DMI_MATCH(DMI_PRODUCT_NAME, "PC-MM20 Series"), + }, + }, + { +- .ident = "Sony Vaio FS-115b", ++ /* Sony Vaio FS-115b */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"), + DMI_MATCH(DMI_PRODUCT_NAME, "VGN-FS115B"), +@@ -328,73 +322,72 @@ static struct dmi_system_id __initdata i + }, + { + /* +- * Reset and GET ID commands issued via KBD port are ++ * Sony Vaio FZ-240E - ++ * reset and GET ID commands issued via KBD port are + * sometimes being delivered to AUX3. + */ +- .ident = "Sony Vaio FZ-240E", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"), + DMI_MATCH(DMI_PRODUCT_NAME, "VGN-FZ240E"), + }, + }, + { +- .ident = "Amoi M636/A737", ++ /* Amoi M636/A737 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Amoi Electronics CO.,LTD."), + DMI_MATCH(DMI_PRODUCT_NAME, "M636/A737 platform"), + }, + }, + { +- .ident = "Lenovo 3000 n100", ++ /* Lenovo 3000 n100 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), + DMI_MATCH(DMI_PRODUCT_NAME, "076804U"), + }, + }, + { +- .ident = "Acer Aspire 1360", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Acer"), + DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 1360"), + }, + }, + { +- .ident = "Gericom Bellagio", ++ /* Gericom Bellagio */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Gericom"), + DMI_MATCH(DMI_PRODUCT_NAME, "N34AS6"), + }, + }, + { +- .ident = "IBM 2656", ++ /* IBM 2656 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "IBM"), + DMI_MATCH(DMI_PRODUCT_NAME, "2656"), + }, + }, + { +- .ident = "Dell XPS M1530", ++ /* Dell XPS M1530 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), + DMI_MATCH(DMI_PRODUCT_NAME, "XPS M1530"), + }, + }, + { +- .ident = "Compal HEL80I", ++ /* Compal HEL80I */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "COMPAL"), + DMI_MATCH(DMI_PRODUCT_NAME, "HEL80I"), + }, + }, + { +- .ident = "Dell Vostro 1510", ++ /* Dell Vostro 1510 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), + DMI_MATCH(DMI_PRODUCT_NAME, "Vostro1510"), + }, + }, + { +- .ident = "Acer Aspire 5536", ++ /* Acer Aspire 5536 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Acer"), + DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5536"), +@@ -404,65 +397,65 @@ static struct dmi_system_id __initdata i + { } + }; + +-static struct dmi_system_id __initdata i8042_dmi_reset_table[] = { ++static const struct dmi_system_id __initconst i8042_dmi_reset_table[] = { + { +- .ident = "MSI Wind U-100", ++ /* MSI Wind U-100 */ + .matches = { + DMI_MATCH(DMI_BOARD_NAME, "U-100"), + DMI_MATCH(DMI_BOARD_VENDOR, "MICRO-STAR INTERNATIONAL CO., LTD"), + }, + }, + { +- .ident = "LG Electronics X110", ++ /* LG Electronics X110 */ + .matches = { + DMI_MATCH(DMI_BOARD_NAME, "X110"), + DMI_MATCH(DMI_BOARD_VENDOR, "LG Electronics Inc."), + }, + }, + { +- .ident = "Acer Aspire One 150", ++ /* Acer Aspire One 150 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Acer"), + DMI_MATCH(DMI_PRODUCT_NAME, "AOA150"), + }, + }, + { +- .ident = "Advent 4211", ++ /* Advent 4211 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "DIXONSXP"), + DMI_MATCH(DMI_PRODUCT_NAME, "Advent 4211"), + }, + }, + { +- .ident = "Medion Akoya Mini E1210", ++ /* Medion Akoya Mini E1210 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "MEDION"), + DMI_MATCH(DMI_PRODUCT_NAME, "E1210"), + }, + }, + { +- .ident = "Mivvy M310", ++ /* Mivvy M310 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "VIOOO"), + DMI_MATCH(DMI_PRODUCT_NAME, "N10"), + }, + }, + { +- .ident = "Dell Vostro 1320", ++ /* Dell Vostro 1320 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), + DMI_MATCH(DMI_PRODUCT_NAME, "Vostro 1320"), + }, + }, + { +- .ident = "Dell Vostro 1520", ++ /* Dell Vostro 1520 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), + DMI_MATCH(DMI_PRODUCT_NAME, "Vostro 1520"), + }, + }, + { +- .ident = "Dell Vostro 1720", ++ /* Dell Vostro 1720 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), + DMI_MATCH(DMI_PRODUCT_NAME, "Vostro 1720"), +@@ -472,16 +465,16 @@ static struct dmi_system_id __initdata i + }; + + #ifdef CONFIG_PNP +-static struct dmi_system_id __initdata i8042_dmi_nopnp_table[] = { ++static const struct dmi_system_id __initconst i8042_dmi_nopnp_table[] = { + { +- .ident = "Intel MBO Desktop D845PESV", ++ /* Intel MBO Desktop D845PESV */ + .matches = { + DMI_MATCH(DMI_BOARD_NAME, "D845PESV"), + DMI_MATCH(DMI_BOARD_VENDOR, "Intel Corporation"), + }, + }, + { +- .ident = "MSI Wind U-100", ++ /* MSI Wind U-100 */ + .matches = { + DMI_MATCH(DMI_BOARD_NAME, "U-100"), + DMI_MATCH(DMI_BOARD_VENDOR, "MICRO-STAR INTERNATIONAL CO., LTD"), +@@ -490,27 +483,23 @@ static struct dmi_system_id __initdata i + { } + }; + +-static struct dmi_system_id __initdata i8042_dmi_laptop_table[] = { ++static const struct dmi_system_id __initconst i8042_dmi_laptop_table[] = { + { +- .ident = "Portable", + .matches = { + DMI_MATCH(DMI_CHASSIS_TYPE, "8"), /* Portable */ + }, + }, + { +- .ident = "Laptop", + .matches = { + DMI_MATCH(DMI_CHASSIS_TYPE, "9"), /* Laptop */ + }, + }, + { +- .ident = "Notebook", + .matches = { + DMI_MATCH(DMI_CHASSIS_TYPE, "10"), /* Notebook */ + }, + }, + { +- .ident = "Sub-Notebook", + .matches = { + DMI_MATCH(DMI_CHASSIS_TYPE, "14"), /* Sub-Notebook */ + }, +@@ -525,58 +514,58 @@ static struct dmi_system_id __initdata i + * Originally, this was just confined to older laptops, but a few Acer laptops + * have turned up in 2007 that also need this again. + */ +-static struct dmi_system_id __initdata i8042_dmi_dritek_table[] = { ++static const struct dmi_system_id __initconst i8042_dmi_dritek_table[] = { + { +- .ident = "Acer Aspire 5630", ++ /* Acer Aspire 5630 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Acer"), + DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5630"), + }, + }, + { +- .ident = "Acer Aspire 5650", ++ /* Acer Aspire 5650 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Acer"), + DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5650"), + }, + }, + { +- .ident = "Acer Aspire 5680", ++ /* Acer Aspire 5680 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Acer"), + DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5680"), + }, + }, + { +- .ident = "Acer Aspire 5720", ++ /* Acer Aspire 5720 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Acer"), + DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5720"), + }, + }, + { +- .ident = "Acer Aspire 9110", ++ /* Acer Aspire 9110 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Acer"), + DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 9110"), + }, + }, + { +- .ident = "Acer TravelMate 660", ++ /* Acer TravelMate 660 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Acer"), + DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 660"), + }, + }, + { +- .ident = "Acer TravelMate 2490", ++ /* Acer TravelMate 2490 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Acer"), + DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 2490"), + }, + }, + { +- .ident = "Acer TravelMate 4280", ++ /* Acer TravelMate 4280 */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Acer"), + DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 4280"), diff --git a/queue-2.6.32/input-psmouse-fix-synaptics-detection-when-protocol-is-disabled.patch b/queue-2.6.32/input-psmouse-fix-synaptics-detection-when-protocol-is-disabled.patch new file mode 100644 index 00000000000..b3c3a406e7a --- /dev/null +++ b/queue-2.6.32/input-psmouse-fix-synaptics-detection-when-protocol-is-disabled.patch @@ -0,0 +1,88 @@ +From e4e6efd2df4b5754bd519b516207eb723d1f17df Mon Sep 17 00:00:00 2001 +From: Daniel Drake +Date: Thu, 7 Jan 2010 01:52:39 -0800 +Subject: Input: psmouse - fix Synaptics detection when protocol is disabled + +From: Daniel Drake + +commit e4e6efd2df4b5754bd519b516207eb723d1f17df upstream. + +For configurations where Synaptics hardware is present but the Synaptics +extensions support is not compiled in, the mouse is reprobed and a new +device is allocated on every suspend/resume. + +During probe, psmouse_switch_protocol() calls psmouse_extensions() with +set_properties=1. This calls the dummy synaptics_init() which returns an +error code, instructing us not to use the synaptics extensions. + +During resume, psmouse_reconnect() calls psmouse_extensions() with +set_properties=0, in which case call to synaptics_init() is bypassed and +PSMOUSE_SYNAPTICS is returned. Since the result is different from previous +attempt psmouse_reconnect() fails and full re-probe happens. + +Fix this by tweaking the set_properties=0 codepath in psmouse_extensions() +to be more careful about offering PSMOUSE_SYNAPTICS extensions. + +Signed-off-by: Daniel Drake +Signed-off-by: Dmitry Torokhov +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/input/mouse/psmouse-base.c | 9 ++++++++- + drivers/input/mouse/synaptics.c | 10 ++++++++++ + drivers/input/mouse/synaptics.h | 1 + + 3 files changed, 19 insertions(+), 1 deletion(-) + +--- a/drivers/input/mouse/psmouse-base.c ++++ b/drivers/input/mouse/psmouse-base.c +@@ -611,8 +611,15 @@ static int psmouse_extensions(struct psm + synaptics_hardware = true; + + if (max_proto > PSMOUSE_IMEX) { +- if (!set_properties || synaptics_init(psmouse) == 0) ++/* ++ * Try activating protocol, but check if support is enabled first, since ++ * we try detecting Synaptics even when protocol is disabled. ++ */ ++ if (synaptics_supported() && ++ (!set_properties || synaptics_init(psmouse) == 0)) { + return PSMOUSE_SYNAPTICS; ++ } ++ + /* + * Some Synaptics touchpads can emulate extended protocols (like IMPS/2). + * Unfortunately Logitech/Genius probes confuse some firmware versions so +--- a/drivers/input/mouse/synaptics.c ++++ b/drivers/input/mouse/synaptics.c +@@ -738,6 +738,11 @@ int synaptics_init(struct psmouse *psmou + return -1; + } + ++bool synaptics_supported(void) ++{ ++ return true; ++} ++ + #else /* CONFIG_MOUSE_PS2_SYNAPTICS */ + + int synaptics_init(struct psmouse *psmouse) +@@ -745,5 +750,10 @@ int synaptics_init(struct psmouse *psmou + return -ENOSYS; + } + ++bool synaptics_supported(void) ++{ ++ return false; ++} ++ + #endif /* CONFIG_MOUSE_PS2_SYNAPTICS */ + +--- a/drivers/input/mouse/synaptics.h ++++ b/drivers/input/mouse/synaptics.h +@@ -108,5 +108,6 @@ struct synaptics_data { + int synaptics_detect(struct psmouse *psmouse, bool set_properties); + int synaptics_init(struct psmouse *psmouse); + void synaptics_reset(struct psmouse *psmouse); ++bool synaptics_supported(void); + + #endif /* _SYNAPTICS_H */ diff --git a/queue-2.6.32/ipc-ns-fix-memory-leak-idr.patch b/queue-2.6.32/ipc-ns-fix-memory-leak-idr.patch new file mode 100644 index 00000000000..4f792707959 --- /dev/null +++ b/queue-2.6.32/ipc-ns-fix-memory-leak-idr.patch @@ -0,0 +1,62 @@ +From 7d6feeb287c61aafa88f06345387b1188edf4b86 Mon Sep 17 00:00:00 2001 +From: Serge E. Hallyn +Date: Tue, 15 Dec 2009 16:47:27 -0800 +Subject: ipc ns: fix memory leak (idr) + +From: Serge E. Hallyn + +commit 7d6feeb287c61aafa88f06345387b1188edf4b86 upstream. + +We have apparently had a memory leak since +7ca7e564e049d8b350ec9d958ff25eaa24226352 "ipc: store ipcs into IDRs" in +2007. The idr of which 3 exist for each ipc namespace is never freed. + +This patch simply frees them when the ipcns is freed. I don't believe any +idr_remove() are done from rcu (and could therefore be delayed until after +this idr_destroy()), so the patch should be safe. Some quick testing +showed no harm, and the memory leak fixed. + +Caught by kmemleak. + +Signed-off-by: Serge E. Hallyn +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Acked-by: Nick Piggin +Signed-off-by: Greg Kroah-Hartman + +--- + ipc/msg.c | 1 + + ipc/sem.c | 1 + + ipc/shm.c | 1 + + 3 files changed, 3 insertions(+) + +--- a/ipc/msg.c ++++ b/ipc/msg.c +@@ -125,6 +125,7 @@ void msg_init_ns(struct ipc_namespace *n + void msg_exit_ns(struct ipc_namespace *ns) + { + free_ipcs(ns, &msg_ids(ns), freeque); ++ idr_destroy(&ns->ids[IPC_MSG_IDS].ipcs_idr); + } + #endif + +--- a/ipc/sem.c ++++ b/ipc/sem.c +@@ -129,6 +129,7 @@ void sem_init_ns(struct ipc_namespace *n + void sem_exit_ns(struct ipc_namespace *ns) + { + free_ipcs(ns, &sem_ids(ns), freeary); ++ idr_destroy(&ns->ids[IPC_SEM_IDS].ipcs_idr); + } + #endif + +--- a/ipc/shm.c ++++ b/ipc/shm.c +@@ -101,6 +101,7 @@ static void do_shm_rmid(struct ipc_names + void shm_exit_ns(struct ipc_namespace *ns) + { + free_ipcs(ns, &shm_ids(ns), do_shm_rmid); ++ idr_destroy(&ns->ids[IPC_SHM_IDS].ipcs_idr); + } + #endif + diff --git a/queue-2.6.32/iscsi-class-modify-handling-of-replacement-timeout.patch b/queue-2.6.32/iscsi-class-modify-handling-of-replacement-timeout.patch new file mode 100644 index 00000000000..85ed94e009e --- /dev/null +++ b/queue-2.6.32/iscsi-class-modify-handling-of-replacement-timeout.patch @@ -0,0 +1,51 @@ +From fdd46dcbe4468a1f47a2cc9be442d11c3d21dd68 Mon Sep 17 00:00:00 2001 +From: Mike Christie +Date: Wed, 11 Nov 2009 16:34:34 -0600 +Subject: [SCSI] iscsi class: modify handling of replacement timeout + +From: Mike Christie + +commit fdd46dcbe4468a1f47a2cc9be442d11c3d21dd68 upstream. + +This patch modifies the replacement/recovery_timeout so it works +more like the fc fast io fail tmo. + +If userspace tries to set the replacement/recovery_timeout to less than +zero, we will turn off the forced recovery cleanup. + +If userspace sets the value to 0 then we will force the recovery +cleanup immediately. + +Signed-off-by: Mike Christie +Signed-off-by: James Bottomley +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/scsi/scsi_transport_iscsi.c | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +--- a/drivers/scsi/scsi_transport_iscsi.c ++++ b/drivers/scsi/scsi_transport_iscsi.c +@@ -627,8 +627,10 @@ static void __iscsi_block_session(struct + spin_unlock_irqrestore(&session->lock, flags); + scsi_target_block(&session->dev); + ISCSI_DBG_TRANS_SESSION(session, "Completed SCSI target blocking\n"); +- queue_delayed_work(iscsi_eh_timer_workq, &session->recovery_work, +- session->recovery_tmo * HZ); ++ if (session->recovery_tmo >= 0) ++ queue_delayed_work(iscsi_eh_timer_workq, ++ &session->recovery_work, ++ session->recovery_tmo * HZ); + } + + void iscsi_block_session(struct iscsi_cls_session *session) +@@ -1348,8 +1350,7 @@ iscsi_set_param(struct iscsi_transport * + switch (ev->u.set_param.param) { + case ISCSI_PARAM_SESS_RECOVERY_TMO: + sscanf(data, "%d", &value); +- if (value != 0) +- session->recovery_tmo = value; ++ session->recovery_tmo = value; + break; + default: + err = transport->set_param(conn, ev->u.set_param.param, diff --git a/queue-2.6.32/itco_wdt-add-intel-cougar-point-and-pch-deviceids.patch b/queue-2.6.32/itco_wdt-add-intel-cougar-point-and-pch-deviceids.patch new file mode 100644 index 00000000000..c49774ddf2a --- /dev/null +++ b/queue-2.6.32/itco_wdt-add-intel-cougar-point-and-pch-deviceids.patch @@ -0,0 +1,102 @@ +From 3c9d8eccd8687f0e770e4d89fd0d73d4f81a985a Mon Sep 17 00:00:00 2001 +From: Seth Heasley +Date: Thu, 14 Jan 2010 20:58:05 +0000 +Subject: [WATCHDOG] iTCO_wdt: Add Intel Cougar Point and PCH DeviceIDs + +From: Seth Heasley + +commit 3c9d8eccd8687f0e770e4d89fd0d73d4f81a985a upstream. + +This patch adds the Intel Cougar Point and PCH DeviceIDs for iTCO Watchdog. + +Signed-off-by: Seth Heasley +Signed-off-by: Wim Van Sebroeck +Acked-by: Jiri Kosina +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/watchdog/iTCO_wdt.c | 45 +++++++++++++++++++++++++++++++++++++++++++- + 1 file changed, 44 insertions(+), 1 deletion(-) + +--- a/drivers/watchdog/iTCO_wdt.c ++++ b/drivers/watchdog/iTCO_wdt.c +@@ -29,8 +29,9 @@ + * document number 313056-003, 313057-017: 82801H (ICH8) + * document number 316972-004, 316973-012: 82801I (ICH9) + * document number 319973-002, 319974-002: 82801J (ICH10) +- * document number 322169-001, 322170-001: 5 Series, 3400 Series (PCH) ++ * document number 322169-001, 322170-003: 5 Series, 3400 Series (PCH) + * document number 320066-003, 320257-008: EP80597 (IICH) ++ * document number TBD : Cougar Point (CPT) + */ + + /* +@@ -100,8 +101,22 @@ enum iTCO_chipsets { + TCO_ICH10DO, /* ICH10DO */ + TCO_PCH, /* PCH Desktop Full Featured */ + TCO_PCHM, /* PCH Mobile Full Featured */ ++ TCO_P55, /* P55 */ ++ TCO_PM55, /* PM55 */ ++ TCO_H55, /* H55 */ ++ TCO_QM57, /* QM57 */ ++ TCO_H57, /* H57 */ ++ TCO_HM55, /* HM55 */ ++ TCO_Q57, /* Q57 */ ++ TCO_HM57, /* HM57 */ + TCO_PCHMSFF, /* PCH Mobile SFF Full Featured */ ++ TCO_QS57, /* QS57 */ ++ TCO_3400, /* 3400 */ ++ TCO_3420, /* 3420 */ ++ TCO_3450, /* 3450 */ + TCO_EP80579, /* EP80579 */ ++ TCO_CPTD, /* CPT Desktop */ ++ TCO_CPTM, /* CPT Mobile */ + }; + + static struct { +@@ -144,8 +159,22 @@ static struct { + {"ICH10DO", 2}, + {"PCH Desktop Full Featured", 2}, + {"PCH Mobile Full Featured", 2}, ++ {"P55", 2}, ++ {"PM55", 2}, ++ {"H55", 2}, ++ {"QM57", 2}, ++ {"H57", 2}, ++ {"HM55", 2}, ++ {"Q57", 2}, ++ {"HM57", 2}, + {"PCH Mobile SFF Full Featured", 2}, ++ {"QS57", 2}, ++ {"3400", 2}, ++ {"3420", 2}, ++ {"3450", 2}, + {"EP80579", 2}, ++ {"CPT Desktop", 2}, ++ {"CPT Mobile", 2}, + {NULL, 0} + }; + +@@ -216,8 +245,22 @@ static struct pci_device_id iTCO_wdt_pci + { ITCO_PCI_DEVICE(0x3a14, TCO_ICH10DO)}, + { ITCO_PCI_DEVICE(0x3b00, TCO_PCH)}, + { ITCO_PCI_DEVICE(0x3b01, TCO_PCHM)}, ++ { ITCO_PCI_DEVICE(0x3b02, TCO_P55)}, ++ { ITCO_PCI_DEVICE(0x3b03, TCO_PM55)}, ++ { ITCO_PCI_DEVICE(0x3b06, TCO_H55)}, ++ { ITCO_PCI_DEVICE(0x3b07, TCO_QM57)}, ++ { ITCO_PCI_DEVICE(0x3b08, TCO_H57)}, ++ { ITCO_PCI_DEVICE(0x3b09, TCO_HM55)}, ++ { ITCO_PCI_DEVICE(0x3b0a, TCO_Q57)}, ++ { ITCO_PCI_DEVICE(0x3b0b, TCO_HM57)}, + { ITCO_PCI_DEVICE(0x3b0d, TCO_PCHMSFF)}, ++ { ITCO_PCI_DEVICE(0x3b0f, TCO_QS57)}, ++ { ITCO_PCI_DEVICE(0x3b12, TCO_3400)}, ++ { ITCO_PCI_DEVICE(0x3b14, TCO_3420)}, ++ { ITCO_PCI_DEVICE(0x3b16, TCO_3450)}, + { ITCO_PCI_DEVICE(0x5031, TCO_EP80579)}, ++ { ITCO_PCI_DEVICE(0x1c42, TCO_CPTD)}, ++ { ITCO_PCI_DEVICE(0x1c43, TCO_CPTM)}, + { 0, }, /* End of list */ + }; + MODULE_DEVICE_TABLE(pci, iTCO_wdt_pci_tbl); diff --git a/queue-2.6.32/itco_wdt-add-pci-id-for-the-intel-ep80579-tolapai-soc.patch b/queue-2.6.32/itco_wdt-add-pci-id-for-the-intel-ep80579-tolapai-soc.patch new file mode 100644 index 00000000000..9090204a713 --- /dev/null +++ b/queue-2.6.32/itco_wdt-add-pci-id-for-the-intel-ep80579-tolapai-soc.patch @@ -0,0 +1,53 @@ +From 4946f8353da9d3038e2a9d0295d5dfeee4cee5c5 Mon Sep 17 00:00:00 2001 +From: Imre Kaloz +Date: Mon, 7 Dec 2009 20:42:26 +0100 +Subject: [WATCHDOG] iTCO_wdt: add PCI ID for the Intel EP80579 (Tolapai) SoC + +From: Imre Kaloz + +commit 4946f8353da9d3038e2a9d0295d5dfeee4cee5c5 upstream. + +add PCI ID for the Intel EP80579 (Tolapai) SoC + +Signed-off-by: Imre Kaloz +Signed-off-by: Wim Van Sebroeck +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/watchdog/iTCO_wdt.c | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/drivers/watchdog/iTCO_wdt.c ++++ b/drivers/watchdog/iTCO_wdt.c +@@ -30,6 +30,7 @@ + * document number 316972-004, 316973-012: 82801I (ICH9) + * document number 319973-002, 319974-002: 82801J (ICH10) + * document number 322169-001, 322170-001: 5 Series, 3400 Series (PCH) ++ * document number 320066-003, 320257-008: EP80597 (IICH) + */ + + /* +@@ -100,6 +101,7 @@ enum iTCO_chipsets { + TCO_PCH, /* PCH Desktop Full Featured */ + TCO_PCHM, /* PCH Mobile Full Featured */ + TCO_PCHMSFF, /* PCH Mobile SFF Full Featured */ ++ TCO_EP80579, /* EP80579 */ + }; + + static struct { +@@ -143,6 +145,7 @@ static struct { + {"PCH Desktop Full Featured", 2}, + {"PCH Mobile Full Featured", 2}, + {"PCH Mobile SFF Full Featured", 2}, ++ {"EP80579", 2}, + {NULL, 0} + }; + +@@ -214,6 +217,7 @@ static struct pci_device_id iTCO_wdt_pci + { ITCO_PCI_DEVICE(0x3b00, TCO_PCH)}, + { ITCO_PCI_DEVICE(0x3b01, TCO_PCHM)}, + { ITCO_PCI_DEVICE(0x3b0d, TCO_PCHMSFF)}, ++ { ITCO_PCI_DEVICE(0x5031, TCO_EP80579)}, + { 0, }, /* End of list */ + }; + MODULE_DEVICE_TABLE(pci, iTCO_wdt_pci_tbl); diff --git a/queue-2.6.32/itco_wdt.c-cleanup-chipset-documentation.patch b/queue-2.6.32/itco_wdt.c-cleanup-chipset-documentation.patch new file mode 100644 index 00000000000..f191a71aa8b --- /dev/null +++ b/queue-2.6.32/itco_wdt.c-cleanup-chipset-documentation.patch @@ -0,0 +1,95 @@ +From cb711a1931363b8ad4dc98df4a92c262ced8eeb4 Mon Sep 17 00:00:00 2001 +From: Wim Van Sebroeck +Date: Sun, 15 Nov 2009 13:44:54 +0000 +Subject: [WATCHDOG] iTCO_wdt.c - cleanup chipset documentation + +From: Wim Van Sebroeck + +commit cb711a1931363b8ad4dc98df4a92c262ced8eeb4 upstream. + +Cleanup the documentation about the supported chipsets. + +[needed for further device ids to add to this driver - gkh] + +Signed-off-by: Wim Van Sebroeck +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/watchdog/iTCO_wdt.c | 61 ++++++++++++-------------------------------- + 1 file changed, 17 insertions(+), 44 deletions(-) + +--- a/drivers/watchdog/iTCO_wdt.c ++++ b/drivers/watchdog/iTCO_wdt.c +@@ -1,5 +1,5 @@ + /* +- * intel TCO Watchdog Driver (Used in i82801 and i63xxESB chipsets) ++ * intel TCO Watchdog Driver + * + * (c) Copyright 2006-2009 Wim Van Sebroeck . + * +@@ -14,49 +14,22 @@ + * + * The TCO watchdog is implemented in the following I/O controller hubs: + * (See the intel documentation on http://developer.intel.com.) +- * 82801AA (ICH) : document number 290655-003, 290677-014, +- * 82801AB (ICHO) : document number 290655-003, 290677-014, +- * 82801BA (ICH2) : document number 290687-002, 298242-027, +- * 82801BAM (ICH2-M) : document number 290687-002, 298242-027, +- * 82801CA (ICH3-S) : document number 290733-003, 290739-013, +- * 82801CAM (ICH3-M) : document number 290716-001, 290718-007, +- * 82801DB (ICH4) : document number 290744-001, 290745-025, +- * 82801DBM (ICH4-M) : document number 252337-001, 252663-008, +- * 82801E (C-ICH) : document number 273599-001, 273645-002, +- * 82801EB (ICH5) : document number 252516-001, 252517-028, +- * 82801ER (ICH5R) : document number 252516-001, 252517-028, +- * 6300ESB (6300ESB) : document number 300641-004, 300884-013, +- * 82801FB (ICH6) : document number 301473-002, 301474-026, +- * 82801FR (ICH6R) : document number 301473-002, 301474-026, +- * 82801FBM (ICH6-M) : document number 301473-002, 301474-026, +- * 82801FW (ICH6W) : document number 301473-001, 301474-026, +- * 82801FRW (ICH6RW) : document number 301473-001, 301474-026, +- * 631xESB (631xESB) : document number 313082-001, 313075-006, +- * 632xESB (632xESB) : document number 313082-001, 313075-006, +- * 82801GB (ICH7) : document number 307013-003, 307014-024, +- * 82801GR (ICH7R) : document number 307013-003, 307014-024, +- * 82801GDH (ICH7DH) : document number 307013-003, 307014-024, +- * 82801GBM (ICH7-M) : document number 307013-003, 307014-024, +- * 82801GHM (ICH7-M DH) : document number 307013-003, 307014-024, +- * 82801GU (ICH7-U) : document number 307013-003, 307014-024, +- * 82801HB (ICH8) : document number 313056-003, 313057-017, +- * 82801HR (ICH8R) : document number 313056-003, 313057-017, +- * 82801HBM (ICH8M) : document number 313056-003, 313057-017, +- * 82801HH (ICH8DH) : document number 313056-003, 313057-017, +- * 82801HO (ICH8DO) : document number 313056-003, 313057-017, +- * 82801HEM (ICH8M-E) : document number 313056-003, 313057-017, +- * 82801IB (ICH9) : document number 316972-004, 316973-012, +- * 82801IR (ICH9R) : document number 316972-004, 316973-012, +- * 82801IH (ICH9DH) : document number 316972-004, 316973-012, +- * 82801IO (ICH9DO) : document number 316972-004, 316973-012, +- * 82801IBM (ICH9M) : document number 316972-004, 316973-012, +- * 82801IEM (ICH9M-E) : document number 316972-004, 316973-012, +- * 82801JIB (ICH10) : document number 319973-002, 319974-002, +- * 82801JIR (ICH10R) : document number 319973-002, 319974-002, +- * 82801JD (ICH10D) : document number 319973-002, 319974-002, +- * 82801JDO (ICH10DO) : document number 319973-002, 319974-002, +- * 5 Series (PCH) : document number 322169-001, 322170-001, +- * 3400 Series (PCH) : document number 322169-001, 322170-001 ++ * document number 290655-003, 290677-014: 82801AA (ICH), 82801AB (ICHO) ++ * document number 290687-002, 298242-027: 82801BA (ICH2) ++ * document number 290733-003, 290739-013: 82801CA (ICH3-S) ++ * document number 290716-001, 290718-007: 82801CAM (ICH3-M) ++ * document number 290744-001, 290745-025: 82801DB (ICH4) ++ * document number 252337-001, 252663-008: 82801DBM (ICH4-M) ++ * document number 273599-001, 273645-002: 82801E (C-ICH) ++ * document number 252516-001, 252517-028: 82801EB (ICH5), 82801ER (ICH5R) ++ * document number 300641-004, 300884-013: 6300ESB ++ * document number 301473-002, 301474-026: 82801F (ICH6) ++ * document number 313082-001, 313075-006: 631xESB, 632xESB ++ * document number 307013-003, 307014-024: 82801G (ICH7) ++ * document number 313056-003, 313057-017: 82801H (ICH8) ++ * document number 316972-004, 316973-012: 82801I (ICH9) ++ * document number 319973-002, 319974-002: 82801J (ICH10) ++ * document number 322169-001, 322170-001: 5 Series, 3400 Series (PCH) + */ + + /* diff --git a/queue-2.6.32/libfc-don-t-warn_on-in-lport_timeout-for-reset-state.patch b/queue-2.6.32/libfc-don-t-warn_on-in-lport_timeout-for-reset-state.patch new file mode 100644 index 00000000000..58950c07765 --- /dev/null +++ b/queue-2.6.32/libfc-don-t-warn_on-in-lport_timeout-for-reset-state.patch @@ -0,0 +1,41 @@ +From 22655ac22289d7b7def8ef2d72eafe5024bd57fe Mon Sep 17 00:00:00 2001 +From: Joe Eykholt +Date: Wed, 21 Oct 2009 16:27:22 -0700 +Subject: [SCSI] libfc: don't WARN_ON in lport_timeout for RESET state + +From: Joe Eykholt + +commit 22655ac22289d7b7def8ef2d72eafe5024bd57fe upstream. + +It's possible and harmless to get FLOGI timeouts +while in RESET state. Don't do a WARN_ON in that case. + +Also, split out the other WARN_ONs in fc_lport_timeout, so +we can tell which one is hit by its line number. + +Signed-off-by: Joe Eykholt +Signed-off-by: Robert Love +Signed-off-by: James Bottomley +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/scsi/libfc/fc_lport.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +--- a/drivers/scsi/libfc/fc_lport.c ++++ b/drivers/scsi/libfc/fc_lport.c +@@ -1237,10 +1237,13 @@ static void fc_lport_timeout(struct work + + switch (lport->state) { + case LPORT_ST_DISABLED: ++ WARN_ON(1); ++ break; + case LPORT_ST_READY: +- case LPORT_ST_RESET: + WARN_ON(1); + break; ++ case LPORT_ST_RESET: ++ break; + case LPORT_ST_FLOGI: + fc_lport_enter_flogi(lport); + break; diff --git a/queue-2.6.32/libfc-fix-ddp-in-fc_fcp-for-0-xid.patch b/queue-2.6.32/libfc-fix-ddp-in-fc_fcp-for-0-xid.patch new file mode 100644 index 00000000000..ac32410d2a1 --- /dev/null +++ b/queue-2.6.32/libfc-fix-ddp-in-fc_fcp-for-0-xid.patch @@ -0,0 +1,50 @@ +From 5e472d077f45de4f37365171bd742f18b3ef20de Mon Sep 17 00:00:00 2001 +From: Yi Zou +Date: Wed, 21 Oct 2009 16:26:50 -0700 +Subject: [SCSI] libfc: fix ddp in fc_fcp for 0 xid + +From: Yi Zou + +commit 5e472d077f45de4f37365171bd742f18b3ef20de upstream. + +xid 0 was used as an indication of invalid xid before but now xid 0 +can be used as a valid exchange i. This patch fixes the ddp completion +in fcp layer, i.e., in fc_fcp.c:fc_fcp_ddp_done() function, to make sure it +does not use xid 0 for indication of an invalid xid, instead, it now +uses use FC_XID_UNKNOWN for such indication. + +Signed-off-by: Yi Zou +Signed-off-by: Robert Love +Signed-off-by: James Bottomley +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/scsi/libfc/fc_fcp.c | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +--- a/drivers/scsi/libfc/fc_fcp.c ++++ b/drivers/scsi/libfc/fc_fcp.c +@@ -302,10 +302,13 @@ static void fc_fcp_ddp_done(struct fc_fc + if (!fsp) + return; + ++ if (fsp->xfer_ddp == FC_XID_UNKNOWN) ++ return; ++ + lp = fsp->lp; +- if (fsp->xfer_ddp && lp->tt.ddp_done) { ++ if (lp->tt.ddp_done) { + fsp->xfer_len = lp->tt.ddp_done(lp, fsp->xfer_ddp); +- fsp->xfer_ddp = 0; ++ fsp->xfer_ddp = FC_XID_UNKNOWN; + } + } + +@@ -1708,6 +1711,7 @@ int fc_queuecommand(struct scsi_cmnd *sc + fsp->cmd = sc_cmd; /* save the cmd */ + fsp->lp = lp; /* save the softc ptr */ + fsp->rport = rport; /* set the remote port ptr */ ++ fsp->xfer_ddp = FC_XID_UNKNOWN; + sc_cmd->scsi_done = done; + + /* diff --git a/queue-2.6.32/libfc-fix-frags-in-frame-exceeding-skb_max_frags-in-fc_fcp_send_data.patch b/queue-2.6.32/libfc-fix-frags-in-frame-exceeding-skb_max_frags-in-fc_fcp_send_data.patch new file mode 100644 index 00000000000..b3041b2999d --- /dev/null +++ b/queue-2.6.32/libfc-fix-frags-in-frame-exceeding-skb_max_frags-in-fc_fcp_send_data.patch @@ -0,0 +1,50 @@ +From d37322a43ebac79eef417149f5696390cf8872db Mon Sep 17 00:00:00 2001 +From: Yi Zou +Date: Wed, 21 Oct 2009 16:27:58 -0700 +Subject: [SCSI] libfc: Fix frags in frame exceeding SKB_MAX_FRAGS in fc_fcp_send_data + +From: Yi Zou + +commit d37322a43ebac79eef417149f5696390cf8872db upstream. + +In case of sequence offload, in fc_fcp_send_data(), the skb_fill_page_info() +called may end up adding more frags to the skb_shinfo(fp_skb(fp))->frags[], +exceeding SKB_MAX_FRAGS, this eventually corrupts the memory. I am adding the +FR_FRAME_SG_LEN back, but as SKB_MAX_FRAGS -1, leaving 1 for our fcoe_eof_crc +page. And send will be broken into multiple large sends if the frame already +contains more frags than skb handle. + +Signed-off-by: Yi Zou +Signed-off-by: Robert Love +Signed-off-by: James Bottomley +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/scsi/libfc/fc_fcp.c | 3 ++- + include/scsi/fc_frame.h | 3 +++ + 2 files changed, 5 insertions(+), 1 deletion(-) + +--- a/drivers/scsi/libfc/fc_fcp.c ++++ b/drivers/scsi/libfc/fc_fcp.c +@@ -575,7 +575,8 @@ static int fc_fcp_send_data(struct fc_fc + tlen -= sg_bytes; + remaining -= sg_bytes; + +- if (tlen) ++ if ((skb_shinfo(fp_skb(fp))->nr_frags < FC_FRAME_SG_LEN) && ++ (tlen)) + continue; + + /* +--- a/include/scsi/fc_frame.h ++++ b/include/scsi/fc_frame.h +@@ -37,6 +37,9 @@ + #define FC_FRAME_HEADROOM 32 /* headroom for VLAN + FCoE headers */ + #define FC_FRAME_TAILROOM 8 /* trailer space for FCoE */ + ++/* Max number of skb frags allowed, reserving one for fcoe_crc_eof page */ ++#define FC_FRAME_SG_LEN (MAX_SKB_FRAGS - 1) ++ + #define fp_skb(fp) (&((fp)->skb)) + #define fr_hdr(fp) ((fp)->skb.data) + #define fr_len(fp) ((fp)->skb.len) diff --git a/queue-2.6.32/libfc-fix-free-of-fc_rport_priv-with-timer-pending.patch b/queue-2.6.32/libfc-fix-free-of-fc_rport_priv-with-timer-pending.patch new file mode 100644 index 00000000000..bce3107d7a4 --- /dev/null +++ b/queue-2.6.32/libfc-fix-free-of-fc_rport_priv-with-timer-pending.patch @@ -0,0 +1,224 @@ +From b4a9c7ede96e90f7b1ec009ce7256059295e76df Mon Sep 17 00:00:00 2001 +From: Joe Eykholt +Date: Wed, 21 Oct 2009 16:28:30 -0700 +Subject: [SCSI] libfc: fix free of fc_rport_priv with timer pending + +From: Joe Eykholt + +commit b4a9c7ede96e90f7b1ec009ce7256059295e76df upstream. + +Timer crashes were caused by freeing a struct fc_rport_priv +with a timer pending, causing the timer facility list to be +corrupted. This was during FC uplink flap tests with a lot +of targets. + +After discovery, we were doing an PLOGI on an rdata that was +in DELETE state but not yet removed from the lookup list. +This moved the rdata from DELETE state to PLOGI state. +If the PLOGI exchange allocation failed and needed to be +retried, the timer scheduling could race with the free +being done by fc_rport_work(). + +When fc_rport_login() is called on a rport in DELETE state, +move it to a new state RESTART. In fc_rport_work, when +handling a LOGO, STOPPED or FAILED event, look for restart +state. In the RESTART case, don't take the rdata off the +list and after the transport remote port is deleted and +exchanges are reset, re-login to the remote port. + +Note that the new RESTART state also corrects a problem we +had when re-discovering a port that had moved to DELETE state. +In that case, a new rdata was created, but the old rdata +would do an exchange manager reset affecting the FC_ID +for both the new rdata and old rdata. With the new state, +the new port isn't logged into until after any old exchanges +are reset. + +Signed-off-by: Joe Eykholt +Signed-off-by: Robert Love +Signed-off-by: James Bottomley +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/scsi/libfc/fc_rport.c | 69 ++++++++++++++++++++++++++++++------------ + include/scsi/libfc.h | 1 + 2 files changed, 51 insertions(+), 19 deletions(-) + +--- a/drivers/scsi/libfc/fc_rport.c ++++ b/drivers/scsi/libfc/fc_rport.c +@@ -86,6 +86,7 @@ static const char *fc_rport_state_names[ + [RPORT_ST_LOGO] = "LOGO", + [RPORT_ST_ADISC] = "ADISC", + [RPORT_ST_DELETE] = "Delete", ++ [RPORT_ST_RESTART] = "Restart", + }; + + /** +@@ -99,8 +100,7 @@ static struct fc_rport_priv *fc_rport_lo + struct fc_rport_priv *rdata; + + list_for_each_entry(rdata, &lport->disc.rports, peers) +- if (rdata->ids.port_id == port_id && +- rdata->rp_state != RPORT_ST_DELETE) ++ if (rdata->ids.port_id == port_id) + return rdata; + return NULL; + } +@@ -235,6 +235,7 @@ static void fc_rport_work(struct work_st + struct fc_rport_operations *rport_ops; + struct fc_rport_identifiers ids; + struct fc_rport *rport; ++ int restart = 0; + + mutex_lock(&rdata->rp_mutex); + event = rdata->event; +@@ -287,8 +288,19 @@ static void fc_rport_work(struct work_st + mutex_unlock(&rdata->rp_mutex); + + if (port_id != FC_FID_DIR_SERV) { ++ /* ++ * We must drop rp_mutex before taking disc_mutex. ++ * Re-evaluate state to allow for restart. ++ * A transition to RESTART state must only happen ++ * while disc_mutex is held and rdata is on the list. ++ */ + mutex_lock(&lport->disc.disc_mutex); +- list_del(&rdata->peers); ++ mutex_lock(&rdata->rp_mutex); ++ if (rdata->rp_state == RPORT_ST_RESTART) ++ restart = 1; ++ else ++ list_del(&rdata->peers); ++ mutex_unlock(&rdata->rp_mutex); + mutex_unlock(&lport->disc.disc_mutex); + } + +@@ -312,7 +324,13 @@ static void fc_rport_work(struct work_st + mutex_unlock(&rdata->rp_mutex); + fc_remote_port_delete(rport); + } +- kref_put(&rdata->kref, lport->tt.rport_destroy); ++ if (restart) { ++ mutex_lock(&rdata->rp_mutex); ++ FC_RPORT_DBG(rdata, "work restart\n"); ++ fc_rport_enter_plogi(rdata); ++ mutex_unlock(&rdata->rp_mutex); ++ } else ++ kref_put(&rdata->kref, lport->tt.rport_destroy); + break; + + default: +@@ -342,6 +360,12 @@ int fc_rport_login(struct fc_rport_priv + FC_RPORT_DBG(rdata, "ADISC port\n"); + fc_rport_enter_adisc(rdata); + break; ++ case RPORT_ST_RESTART: ++ break; ++ case RPORT_ST_DELETE: ++ FC_RPORT_DBG(rdata, "Restart deleted port\n"); ++ fc_rport_state_enter(rdata, RPORT_ST_RESTART); ++ break; + default: + FC_RPORT_DBG(rdata, "Login to port\n"); + fc_rport_enter_plogi(rdata); +@@ -397,20 +421,21 @@ int fc_rport_logoff(struct fc_rport_priv + + if (rdata->rp_state == RPORT_ST_DELETE) { + FC_RPORT_DBG(rdata, "Port in Delete state, not removing\n"); +- mutex_unlock(&rdata->rp_mutex); + goto out; + } + +- fc_rport_enter_logo(rdata); ++ if (rdata->rp_state == RPORT_ST_RESTART) ++ FC_RPORT_DBG(rdata, "Port in Restart state, deleting\n"); ++ else ++ fc_rport_enter_logo(rdata); + + /* + * Change the state to Delete so that we discard + * the response. + */ + fc_rport_enter_delete(rdata, RPORT_EV_STOP); +- mutex_unlock(&rdata->rp_mutex); +- + out: ++ mutex_unlock(&rdata->rp_mutex); + return 0; + } + +@@ -466,6 +491,7 @@ static void fc_rport_timeout(struct work + case RPORT_ST_READY: + case RPORT_ST_INIT: + case RPORT_ST_DELETE: ++ case RPORT_ST_RESTART: + break; + } + +@@ -499,6 +525,7 @@ static void fc_rport_error(struct fc_rpo + fc_rport_enter_logo(rdata); + break; + case RPORT_ST_DELETE: ++ case RPORT_ST_RESTART: + case RPORT_ST_READY: + case RPORT_ST_INIT: + break; +@@ -1248,6 +1275,7 @@ static void fc_rport_recv_plogi_req(stru + } + break; + case RPORT_ST_PRLI: ++ case RPORT_ST_RTV: + case RPORT_ST_READY: + case RPORT_ST_ADISC: + FC_RPORT_DBG(rdata, "Received PLOGI in logged-in state %d " +@@ -1255,11 +1283,14 @@ static void fc_rport_recv_plogi_req(stru + /* XXX TBD - should reset */ + break; + case RPORT_ST_DELETE: +- default: +- FC_RPORT_DBG(rdata, "Received PLOGI in unexpected state %d\n", +- rdata->rp_state); +- fc_frame_free(rx_fp); +- goto out; ++ case RPORT_ST_LOGO: ++ case RPORT_ST_RESTART: ++ FC_RPORT_DBG(rdata, "Received PLOGI in state %s - send busy\n", ++ fc_rport_state(rdata)); ++ mutex_unlock(&rdata->rp_mutex); ++ rjt_data.reason = ELS_RJT_BUSY; ++ rjt_data.explan = ELS_EXPL_NONE; ++ goto reject; + } + + /* +@@ -1510,14 +1541,14 @@ static void fc_rport_recv_logo_req(struc + FC_RPORT_DBG(rdata, "Received LOGO request while in state %s\n", + fc_rport_state(rdata)); + ++ fc_rport_enter_delete(rdata, RPORT_EV_LOGO); ++ + /* +- * If the remote port was created due to discovery, +- * log back in. It may have seen a stale RSCN about us. ++ * If the remote port was created due to discovery, set state ++ * to log back in. It may have seen a stale RSCN about us. + */ +- if (rdata->rp_state != RPORT_ST_DELETE && rdata->disc_id) +- fc_rport_enter_plogi(rdata); +- else +- fc_rport_enter_delete(rdata, RPORT_EV_LOGO); ++ if (rdata->disc_id) ++ fc_rport_state_enter(rdata, RPORT_ST_RESTART); + mutex_unlock(&rdata->rp_mutex); + } else + FC_RPORT_ID_DBG(lport, sid, +--- a/include/scsi/libfc.h ++++ b/include/scsi/libfc.h +@@ -145,6 +145,7 @@ enum fc_rport_state { + RPORT_ST_LOGO, /* port logout sent */ + RPORT_ST_ADISC, /* Discover Address sent */ + RPORT_ST_DELETE, /* port being deleted */ ++ RPORT_ST_RESTART, /* remote port being deleted and will restart */ + }; + + /** diff --git a/queue-2.6.32/libfc-fix-memory-corruption-caused-by-double-frees-and-bad-error-handling.patch b/queue-2.6.32/libfc-fix-memory-corruption-caused-by-double-frees-and-bad-error-handling.patch new file mode 100644 index 00000000000..51f000b2b1c --- /dev/null +++ b/queue-2.6.32/libfc-fix-memory-corruption-caused-by-double-frees-and-bad-error-handling.patch @@ -0,0 +1,190 @@ +From 8f550f937e9fdafa5c37e348e214aecec851ef3f Mon Sep 17 00:00:00 2001 +From: Chris Leech +Date: Wed, 21 Oct 2009 16:28:09 -0700 +Subject: [SCSI] libfc: fix memory corruption caused by double frees and bad error handling + +From: Chris Leech + +commit 8f550f937e9fdafa5c37e348e214aecec851ef3f upstream. + +I was running into several different panics under stress, which I traced down +to a few different possible slab corruption issues in error handling paths. +I have not yet looked into why these exchange sends fail, but with these +fixes my test system is much more stable under stress than before. + +fc_elsct_send() could fail and either leave the passed in frame intact +(failure in fc_ct/els_fill) or the frame could have been freed if the +failure was is fc_exch_seq_send(). The caller had no way of knowing, and +there was a potential double free in the error handling in fc_fcp_rec(). + +Make fc_elsct_send() always free the frame before returning, and remove the +fc_frame_free() call in fc_fcp_rec(). + +While fc_exch_seq_send() did always consume the frame, there were double free +bugs in the error handling of fc_fcp_cmd_send() and fc_fcp_srr() as well. + +Numerous calls to error handling routines (fc_disc_error(), +fc_lport_error(), fc_rport_error_retry() ) were passing in a frame pointer that +had already been freed in the case of an error. I have changed the call +sites to pass in a NULL pointer, but there may be more appropriate error +codes to use. + +Question: Why do these error routines take a frame pointer anyway? I +understand passing in a pointer encoded error to the response handlers, but +the error routines take no action on a valid pointer and should never be +called that way. + +Signed-off-by: Chris Leech +Signed-off-by: Robert Love +Signed-off-by: James Bottomley +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/scsi/libfc/fc_disc.c | 2 +- + drivers/scsi/libfc/fc_elsct.c | 4 +++- + drivers/scsi/libfc/fc_fcp.c | 7 ++----- + drivers/scsi/libfc/fc_lport.c | 8 ++++---- + drivers/scsi/libfc/fc_rport.c | 10 +++++----- + 5 files changed, 15 insertions(+), 16 deletions(-) + +--- a/drivers/scsi/libfc/fc_disc.c ++++ b/drivers/scsi/libfc/fc_disc.c +@@ -371,7 +371,7 @@ static void fc_disc_gpn_ft_req(struct fc + disc, lport->e_d_tov)) + return; + err: +- fc_disc_error(disc, fp); ++ fc_disc_error(disc, NULL); + } + + /** +--- a/drivers/scsi/libfc/fc_elsct.c ++++ b/drivers/scsi/libfc/fc_elsct.c +@@ -53,8 +53,10 @@ static struct fc_seq *fc_elsct_send(stru + did = FC_FID_DIR_SERV; + } + +- if (rc) ++ if (rc) { ++ fc_frame_free(fp); + return NULL; ++ } + + fc_fill_fc_hdr(fp, r_ctl, did, fc_host_port_id(lport->host), fh_type, + FC_FC_FIRST_SEQ | FC_FC_END_SEQ | FC_FC_SEQ_INIT, 0); +--- a/drivers/scsi/libfc/fc_fcp.c ++++ b/drivers/scsi/libfc/fc_fcp.c +@@ -1052,7 +1052,6 @@ static int fc_fcp_cmd_send(struct fc_lpo + + seq = lp->tt.exch_seq_send(lp, fp, resp, fc_fcp_pkt_destroy, fsp, 0); + if (!seq) { +- fc_frame_free(fp); + rc = -1; + goto unlock; + } +@@ -1317,7 +1316,6 @@ static void fc_fcp_rec(struct fc_fcp_pkt + fc_fcp_pkt_hold(fsp); /* hold while REC outstanding */ + return; + } +- fc_frame_free(fp); + retry: + if (fsp->recov_retry++ < FC_MAX_RECOV_RETRY) + fc_fcp_timer_set(fsp, FC_SCSI_REC_TOV); +@@ -1565,10 +1563,9 @@ static void fc_fcp_srr(struct fc_fcp_pkt + + seq = lp->tt.exch_seq_send(lp, fp, fc_fcp_srr_resp, NULL, + fsp, jiffies_to_msecs(FC_SCSI_REC_TOV)); +- if (!seq) { +- fc_frame_free(fp); ++ if (!seq) + goto retry; +- } ++ + fsp->recov_seq = seq; + fsp->xfer_len = offset; + fsp->xfer_contig_end = offset; +--- a/drivers/scsi/libfc/fc_lport.c ++++ b/drivers/scsi/libfc/fc_lport.c +@@ -1115,7 +1115,7 @@ static void fc_lport_enter_scr(struct fc + + if (!lport->tt.elsct_send(lport, FC_FID_FCTRL, fp, ELS_SCR, + fc_lport_scr_resp, lport, lport->e_d_tov)) +- fc_lport_error(lport, fp); ++ fc_lport_error(lport, NULL); + } + + /** +@@ -1186,7 +1186,7 @@ static void fc_lport_enter_rpn_id(struct + if (!lport->tt.elsct_send(lport, FC_FID_DIR_SERV, fp, FC_NS_RPN_ID, + fc_lport_rpn_id_resp, + lport, lport->e_d_tov)) +- fc_lport_error(lport, fp); ++ fc_lport_error(lport, NULL); + } + + static struct fc_rport_operations fc_lport_rport_ops = { +@@ -1340,7 +1340,7 @@ static void fc_lport_enter_logo(struct f + + if (!lport->tt.elsct_send(lport, FC_FID_FLOGI, fp, ELS_LOGO, + fc_lport_logo_resp, lport, lport->e_d_tov)) +- fc_lport_error(lport, fp); ++ fc_lport_error(lport, NULL); + } + + /** +@@ -1456,7 +1456,7 @@ void fc_lport_enter_flogi(struct fc_lpor + + if (!lport->tt.elsct_send(lport, FC_FID_FLOGI, fp, ELS_FLOGI, + fc_lport_flogi_resp, lport, lport->e_d_tov)) +- fc_lport_error(lport, fp); ++ fc_lport_error(lport, NULL); + } + + /* Configure a fc_lport */ +--- a/drivers/scsi/libfc/fc_rport.c ++++ b/drivers/scsi/libfc/fc_rport.c +@@ -632,7 +632,7 @@ static void fc_rport_enter_plogi(struct + + if (!lport->tt.elsct_send(lport, rdata->ids.port_id, fp, ELS_PLOGI, + fc_rport_plogi_resp, rdata, lport->e_d_tov)) +- fc_rport_error_retry(rdata, fp); ++ fc_rport_error_retry(rdata, NULL); + else + kref_get(&rdata->kref); + } +@@ -793,7 +793,7 @@ static void fc_rport_enter_prli(struct f + + if (!lport->tt.elsct_send(lport, rdata->ids.port_id, fp, ELS_PRLI, + fc_rport_prli_resp, rdata, lport->e_d_tov)) +- fc_rport_error_retry(rdata, fp); ++ fc_rport_error_retry(rdata, NULL); + else + kref_get(&rdata->kref); + } +@@ -889,7 +889,7 @@ static void fc_rport_enter_rtv(struct fc + + if (!lport->tt.elsct_send(lport, rdata->ids.port_id, fp, ELS_RTV, + fc_rport_rtv_resp, rdata, lport->e_d_tov)) +- fc_rport_error_retry(rdata, fp); ++ fc_rport_error_retry(rdata, NULL); + else + kref_get(&rdata->kref); + } +@@ -919,7 +919,7 @@ static void fc_rport_enter_logo(struct f + + if (!lport->tt.elsct_send(lport, rdata->ids.port_id, fp, ELS_LOGO, + fc_rport_logo_resp, rdata, lport->e_d_tov)) +- fc_rport_error_retry(rdata, fp); ++ fc_rport_error_retry(rdata, NULL); + else + kref_get(&rdata->kref); + } +@@ -1006,7 +1006,7 @@ static void fc_rport_enter_adisc(struct + } + if (!lport->tt.elsct_send(lport, rdata->ids.port_id, fp, ELS_ADISC, + fc_rport_adisc_resp, rdata, lport->e_d_tov)) +- fc_rport_error_retry(rdata, fp); ++ fc_rport_error_retry(rdata, NULL); + else + kref_get(&rdata->kref); + } diff --git a/queue-2.6.32/libfc-fix-typo-in-retry-check-on-received-prli.patch b/queue-2.6.32/libfc-fix-typo-in-retry-check-on-received-prli.patch new file mode 100644 index 00000000000..603d86f8e42 --- /dev/null +++ b/queue-2.6.32/libfc-fix-typo-in-retry-check-on-received-prli.patch @@ -0,0 +1,37 @@ +From 85b5893ca97c69e409ecbb5ee90a5d99882369c4 Mon Sep 17 00:00:00 2001 +From: Joe Eykholt +Date: Wed, 21 Oct 2009 16:26:45 -0700 +Subject: [SCSI] libfc: fix typo in retry check on received PRLI + +From: Joe Eykholt + +commit 85b5893ca97c69e409ecbb5ee90a5d99882369c4 upstream. + +A received Fibre Channel ELS PRLI request contains a bit that +indicates whether the remote port supports certain retry processing +sequences. The test for this bit was somehow coded to use multiply +instead of AND! + +This case would apply only for target mode operation, and it is +unlikely to be noticed as an initiator. + +Signed-off-by: Joe Eykholt +Signed-off-by: Robert Love +Signed-off-by: James Bottomley +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/scsi/libfc/fc_rport.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/scsi/libfc/fc_rport.c ++++ b/drivers/scsi/libfc/fc_rport.c +@@ -1402,7 +1402,7 @@ static void fc_rport_recv_prli_req(struc + break; + case FC_TYPE_FCP: + fcp_parm = ntohl(rspp->spp_params); +- if (fcp_parm * FCP_SPPF_RETRY) ++ if (fcp_parm & FCP_SPPF_RETRY) + rdata->flags |= FC_RP_FLAGS_RETRY; + rdata->supported_classes = FC_COS_CLASS3; + if (fcp_parm & FCP_SPPF_INIT_FCN) diff --git a/queue-2.6.32/libfc-fix-wrong-scsi-return-status-under-fc_data_undrun.patch b/queue-2.6.32/libfc-fix-wrong-scsi-return-status-under-fc_data_undrun.patch new file mode 100644 index 00000000000..bb409f0c458 --- /dev/null +++ b/queue-2.6.32/libfc-fix-wrong-scsi-return-status-under-fc_data_undrun.patch @@ -0,0 +1,41 @@ +From 4347fa66878e079766258bc0d077c350cb31a799 Mon Sep 17 00:00:00 2001 +From: Yi Zou +Date: Wed, 21 Oct 2009 16:27:12 -0700 +Subject: [SCSI] libfc: Fix wrong scsi return status under FC_DATA_UNDRUN + +From: Yi Zou + +commit 4347fa66878e079766258bc0d077c350cb31a799 upstream. + +This bug is exposed when there is a link flap in LLD. Particularly, when it +happens right after a SCSI write command is sent out, no FCP_DATA is sent, +causing fsp->status_code to be set as FC_DATA_UNDRUN in fc_fcp_complete_locked +even no SCSI status is received. Consequently, fc_io_compl treats this as DID_OK. +This results in SCSI returning successful to the initial I/O request even +there is no DATA actually sent. Particularly, if you run an I/O tool w/ data +verification on, the read back for verification is gonna fail. + +This is fixed here by checking when FC_DATA_UNDRUN happens, SCSI status is +received w/ FC_SRB_RCV_STATUS set in fsp->state. + +Signed-off-by: Yi Zou +Signed-off-by: Robert Love +Signed-off-by: James Bottomley +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/scsi/libfc/fc_fcp.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/drivers/scsi/libfc/fc_fcp.c ++++ b/drivers/scsi/libfc/fc_fcp.c +@@ -1850,7 +1850,8 @@ static void fc_io_compl(struct fc_fcp_pk + * scsi status is good but transport level + * underrun. + */ +- sc_cmd->result = DID_OK << 16; ++ sc_cmd->result = (fsp->state & FC_SRB_RCV_STATUS ? ++ DID_OK : DID_ERROR) << 16; + } else { + /* + * scsi got underrun, this is an error diff --git a/queue-2.6.32/libfc-lport-fix-minor-documentation-errors.patch b/queue-2.6.32/libfc-lport-fix-minor-documentation-errors.patch new file mode 100644 index 00000000000..721053dc361 --- /dev/null +++ b/queue-2.6.32/libfc-lport-fix-minor-documentation-errors.patch @@ -0,0 +1,91 @@ +From 1b69bc062c2a4c8f3e15ac69f487afec3aa8d774 Mon Sep 17 00:00:00 2001 +From: Joe Eykholt +Date: Wed, 21 Oct 2009 16:27:17 -0700 +Subject: [SCSI] libfc: lport: fix minor documentation errors + +From: Joe Eykholt + +commit 1b69bc062c2a4c8f3e15ac69f487afec3aa8d774 upstream. + +Fix minor errors. +A debug message said an RLIR was received instead of ECHO. +"Expected" was misspelled in several places. +Fix a type cast from u32 to __be32. + +Rob, Some of these may have been also taken care of in your +other doc cleanup patch. Feel free to fold them in. + +Signed-off-by: Joe Eykholt +Signed-off-by: Robert Love +Signed-off-by: James Bottomley +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/scsi/libfc/fc_lport.c | 20 ++++++++++---------- + 1 file changed, 10 insertions(+), 10 deletions(-) + +--- a/drivers/scsi/libfc/fc_lport.c ++++ b/drivers/scsi/libfc/fc_lport.c +@@ -329,7 +329,7 @@ static void fc_lport_add_fc4_type(struct + * @sp: current sequence in the RLIR exchange + * @fp: RLIR request frame + * +- * Locking Note: The lport lock is exected to be held before calling ++ * Locking Note: The lport lock is expected to be held before calling + * this function. + */ + static void fc_lport_recv_rlir_req(struct fc_seq *sp, struct fc_frame *fp, +@@ -348,7 +348,7 @@ static void fc_lport_recv_rlir_req(struc + * @sp: current sequence in the ECHO exchange + * @fp: ECHO request frame + * +- * Locking Note: The lport lock is exected to be held before calling ++ * Locking Note: The lport lock is expected to be held before calling + * this function. + */ + static void fc_lport_recv_echo_req(struct fc_seq *sp, struct fc_frame *in_fp, +@@ -361,7 +361,7 @@ static void fc_lport_recv_echo_req(struc + void *dp; + u32 f_ctl; + +- FC_LPORT_DBG(lport, "Received RLIR request while in state %s\n", ++ FC_LPORT_DBG(lport, "Received ECHO request while in state %s\n", + fc_lport_state(lport)); + + len = fr_len(in_fp) - sizeof(struct fc_frame_header); +@@ -374,7 +374,7 @@ static void fc_lport_recv_echo_req(struc + if (fp) { + dp = fc_frame_payload_get(fp, len); + memcpy(dp, pp, len); +- *((u32 *)dp) = htonl(ELS_LS_ACC << 24); ++ *((__be32 *)dp) = htonl(ELS_LS_ACC << 24); + sp = lport->tt.seq_start_next(sp); + f_ctl = FC_FC_EX_CTX | FC_FC_LAST_SEQ | FC_FC_END_SEQ; + fc_fill_fc_hdr(fp, FC_RCTL_ELS_REP, ep->did, ep->sid, +@@ -385,12 +385,12 @@ static void fc_lport_recv_echo_req(struc + } + + /** +- * fc_lport_recv_echo_req() - Handle received Request Node ID data request +- * @lport: Fibre Channel local port recieving the RNID +- * @sp: current sequence in the RNID exchange +- * @fp: RNID request frame ++ * fc_lport_recv_rnid_req() - Handle received Request Node ID data request ++ * @sp: The sequence in the RNID exchange ++ * @fp: The RNID request frame ++ * @lport: The local port recieving the RNID + * +- * Locking Note: The lport lock is exected to be held before calling ++ * Locking Note: The lport lock is expected to be held before calling + * this function. + */ + static void fc_lport_recv_rnid_req(struct fc_seq *sp, struct fc_frame *in_fp, +@@ -667,7 +667,7 @@ static void fc_lport_enter_ready(struct + * Accept it with the common service parameters indicating our N port. + * Set up to do a PLOGI if we have the higher-number WWPN. + * +- * Locking Note: The lport lock is exected to be held before calling ++ * Locking Note: The lport lock is expected to be held before calling + * this function. + */ + static void fc_lport_recv_flogi_req(struct fc_seq *sp_in, diff --git a/queue-2.6.32/lpfc-fix-hang-on-sgi-ia64-platform.patch b/queue-2.6.32/lpfc-fix-hang-on-sgi-ia64-platform.patch new file mode 100644 index 00000000000..830d902ca77 --- /dev/null +++ b/queue-2.6.32/lpfc-fix-hang-on-sgi-ia64-platform.patch @@ -0,0 +1,57 @@ +From 8e68597d087977d3e4fd3e735d290ab45fd0b5ea Mon Sep 17 00:00:00 2001 +From: Michael Reed +Date: Fri, 18 Sep 2009 12:02:05 -0500 +Subject: [SCSI] lpfc: fix hang on SGI ia64 platform + +From: Michael Reed + +commit 8e68597d087977d3e4fd3e735d290ab45fd0b5ea upstream. + +In testing 2.6.31 on one of our ia64 platforms I've encountered a hang +due to the driver using hardware ATEs which are a limited resource. +This is because the driver does not set the dma consistent mask to +64 bits. + +Signed-off-by: Michael Reed +Acked-by: James Smart +Signed-off-by: James Bottomley +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/scsi/lpfc/lpfc_init.c | 16 ++++++++++++---- + 1 file changed, 12 insertions(+), 4 deletions(-) + +--- a/drivers/scsi/lpfc/lpfc_init.c ++++ b/drivers/scsi/lpfc/lpfc_init.c +@@ -4384,9 +4384,13 @@ lpfc_sli_pci_mem_setup(struct lpfc_hba * + pdev = phba->pcidev; + + /* Set the device DMA mask size */ +- if (pci_set_dma_mask(pdev, DMA_BIT_MASK(64)) != 0) +- if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32)) != 0) ++ if (pci_set_dma_mask(pdev, DMA_BIT_MASK(64)) != 0 ++ || pci_set_consistent_dma_mask(pdev,DMA_BIT_MASK(64)) != 0) { ++ if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32)) != 0 ++ || pci_set_consistent_dma_mask(pdev,DMA_BIT_MASK(32)) != 0) { + return error; ++ } ++ } + + /* Get the bus address of Bar0 and Bar2 and the number of bytes + * required by each mapping. +@@ -5940,9 +5944,13 @@ lpfc_sli4_pci_mem_setup(struct lpfc_hba + pdev = phba->pcidev; + + /* Set the device DMA mask size */ +- if (pci_set_dma_mask(pdev, DMA_BIT_MASK(64)) != 0) +- if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32)) != 0) ++ if (pci_set_dma_mask(pdev, DMA_BIT_MASK(64)) != 0 ++ || pci_set_consistent_dma_mask(pdev,DMA_BIT_MASK(64)) != 0) { ++ if (pci_set_dma_mask(pdev, DMA_BIT_MASK(32)) != 0 ++ || pci_set_consistent_dma_mask(pdev,DMA_BIT_MASK(32)) != 0) { + return error; ++ } ++ } + + /* Get the bus address of SLI4 device Bar0, Bar1, and Bar2 and the + * number of bytes required by each mapping. They are actually diff --git a/queue-2.6.32/md-fix-small-irregularity-with-start_ro-module-parameter.patch b/queue-2.6.32/md-fix-small-irregularity-with-start_ro-module-parameter.patch new file mode 100644 index 00000000000..08192bf8bf0 --- /dev/null +++ b/queue-2.6.32/md-fix-small-irregularity-with-start_ro-module-parameter.patch @@ -0,0 +1,40 @@ +From 0f9552b5dc4fe10da37fa3f4a4ca185d90fa41c9 Mon Sep 17 00:00:00 2001 +From: NeilBrown +Date: Wed, 30 Dec 2009 12:08:50 +1100 +Subject: md: fix small irregularity with start_ro module parameter + +From: NeilBrown + +commit 0f9552b5dc4fe10da37fa3f4a4ca185d90fa41c9 upstream. + +The start_ro modules parameter can be used to force arrays to be +started in 'auto-readonly' in which they are read-only until the first +write. This ensures that no resync/recovery happens until something +else writes to the device. This is important for resume-from-disk +off an md array. + +However if an array is started 'readonly' (by writing 'readonly' to +the 'array_state' sysfs attribute) we want it to be really 'readonly', +not 'auto-readonly'. + +So strengthen the condition to only set auto-readonly if the +array is not already read-only. + +Signed-off-by: NeilBrown +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/md/md.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/md/md.c ++++ b/drivers/md/md.c +@@ -4173,7 +4173,7 @@ static int do_md_run(mddev_t * mddev) + mddev->barriers_work = 1; + mddev->ok_start_degraded = start_dirty_degraded; + +- if (start_readonly) ++ if (start_readonly && mddev->ro == 0) + mddev->ro = 2; /* read-only, but switch on first write */ + + err = mddev->pers->run(mddev); diff --git a/queue-2.6.32/netiucv-displayed-tx-bytes-value-much-too-high.patch b/queue-2.6.32/netiucv-displayed-tx-bytes-value-much-too-high.patch new file mode 100644 index 00000000000..e5df05faf5d --- /dev/null +++ b/queue-2.6.32/netiucv-displayed-tx-bytes-value-much-too-high.patch @@ -0,0 +1,38 @@ +From 998221c26b86a7edd621e66b437628c5ec0f8e9b Mon Sep 17 00:00:00 2001 +From: Ursula Braun +Date: Thu, 12 Nov 2009 21:46:30 +0000 +Subject: netiucv: displayed TX bytes value much too high + +From: Ursula Braun + +commit 998221c26b86a7edd621e66b437628c5ec0f8e9b upstream. + +tx_bytes value must be updated by skb length before skb is freed. + +Signed-off-by: Ursula Braun +Signed-off-by: David S. Miller +Acked-by: John Jolly +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/s390/net/netiucv.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/s390/net/netiucv.c ++++ b/drivers/s390/net/netiucv.c +@@ -741,13 +741,13 @@ static void conn_action_txdone(fsm_insta + if (single_flag) { + if ((skb = skb_dequeue(&conn->commit_queue))) { + atomic_dec(&skb->users); +- dev_kfree_skb_any(skb); + if (privptr) { + privptr->stats.tx_packets++; + privptr->stats.tx_bytes += + (skb->len - NETIUCV_HDRLEN +- - NETIUCV_HDRLEN); ++ - NETIUCV_HDRLEN); + } ++ dev_kfree_skb_any(skb); + } + } + conn->tx_buff->data = conn->tx_buff->head; diff --git a/queue-2.6.32/netxen-add-pci-ids-for-new-chip.patch b/queue-2.6.32/netxen-add-pci-ids-for-new-chip.patch new file mode 100644 index 00000000000..3dd2a7602dc --- /dev/null +++ b/queue-2.6.32/netxen-add-pci-ids-for-new-chip.patch @@ -0,0 +1,69 @@ +From f0e08fac06596a760f074c08521550d93b96336e Mon Sep 17 00:00:00 2001 +From: Dhananjay Phadke +Date: Sat, 24 Oct 2009 16:04:00 +0000 +Subject: netxen: add PCI IDs for new chip + +From: Dhananjay Phadke + +commit f0e08fac06596a760f074c08521550d93b96336e upstream. + +Add PCI vendor and device IDs for QLE8240 and QLE8242 +CNA devices. + +Signed-off-by: Dhananjay Phadke +Signed-off-by: David S. Miller +Signed-off-by: Brandon Philips +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/netxen/netxen_nic.h | 2 -- + drivers/net/netxen/netxen_nic_ethtool.c | 4 ++-- + drivers/net/netxen/netxen_nic_main.c | 6 ++++++ + 3 files changed, 8 insertions(+), 4 deletions(-) + +--- a/drivers/net/netxen/netxen_nic_ethtool.c ++++ b/drivers/net/netxen/netxen_nic_ethtool.c +@@ -690,8 +690,8 @@ static int netxen_nic_reg_test(struct ne + u32 data_read, data_written; + + data_read = NXRD32(adapter, NETXEN_PCIX_PH_REG(0)); +- if ((data_read & 0xffff) != PHAN_VENDOR_ID) +- return 1; ++ if ((data_read & 0xffff) != adapter->pdev->vendor) ++ return 1; + + data_written = (u32)0xa5a5a5a5; + +--- a/drivers/net/netxen/netxen_nic.h ++++ b/drivers/net/netxen/netxen_nic.h +@@ -74,8 +74,6 @@ + #define NETXEN_FLASH_TOTAL_SIZE (NETXEN_NUM_FLASH_SECTORS \ + * NETXEN_FLASH_SECTOR_SIZE) + +-#define PHAN_VENDOR_ID 0x4040 +- + #define RCV_DESC_RINGSIZE(rds_ring) \ + (sizeof(struct rcv_desc) * (rds_ring)->num_desc) + #define RCV_BUFF_RINGSIZE(rds_ring) \ +--- a/drivers/net/netxen/netxen_nic_main.c ++++ b/drivers/net/netxen/netxen_nic_main.c +@@ -87,6 +87,11 @@ static void netxen_config_indev_addr(str + #define ENTRY(device) \ + {PCI_DEVICE(PCI_VENDOR_ID_NETXEN, (device)), \ + .class = PCI_CLASS_NETWORK_ETHERNET << 8, .class_mask = ~0} ++#define ENTRY2(device) \ ++ {PCI_DEVICE(PCI_VENDOR_ID_QLOGIC, (device)), \ ++ .class = PCI_CLASS_NETWORK_ETHERNET << 8, .class_mask = ~0} ++ ++#define PCI_DEVICE_ID_QLOGIC_QLE824X 0x8020 + + static struct pci_device_id netxen_pci_tbl[] __devinitdata = { + ENTRY(PCI_DEVICE_ID_NX2031_10GXSR), +@@ -97,6 +102,7 @@ static struct pci_device_id netxen_pci_t + ENTRY(PCI_DEVICE_ID_NX2031_XG_MGMT), + ENTRY(PCI_DEVICE_ID_NX2031_XG_MGMT2), + ENTRY(PCI_DEVICE_ID_NX3031), ++ ENTRY2(PCI_DEVICE_ID_QLOGIC_QLE824X), + {0,} + }; + diff --git a/queue-2.6.32/nfs-revert-default-r-wsize-behavior.patch b/queue-2.6.32/nfs-revert-default-r-wsize-behavior.patch new file mode 100644 index 00000000000..4e74736d8b5 --- /dev/null +++ b/queue-2.6.32/nfs-revert-default-r-wsize-behavior.patch @@ -0,0 +1,55 @@ +From dd47f96c077b4516727e497e4b6fd47a06778c0a Mon Sep 17 00:00:00 2001 +From: Chuck Lever +Date: Thu, 3 Dec 2009 15:58:56 -0500 +Subject: NFS: Revert default r/wsize behavior + +From: Chuck Lever + +commit dd47f96c077b4516727e497e4b6fd47a06778c0a upstream. + +When the "rsize=" or "wsize=" mount options are not specified, +text-based mounts have slightly different behavior than legacy binary +mounts. Text-based mounts use the smaller of the server's maximum +and the client's maximum, but binary mounts use the smaller of the +server's _preferred_ size and the client's maximum. + +This difference is actually pretty subtle. Most servers advertise +the same value as their maximum and their preferred transfer size, so +the end result is the same in most cases. + +The reason for this difference is that for text-based mounts, if +r/wsize are not specified, they are set to the largest value supported +by the client. For legacy mounts, the values are set to zero if these +options are not specified. + +nfs_server_set_fsinfo() can negotiate the transfer size defaults +correctly in any case. There's no need to specify any particular +value as default in the text-based option parsing logic. + +Note that nfs4 doesn't use nfs_server_set_fsinfo(), but the mount.nfs4 +command does set rsize and wsize to 0 if the user didn't specify these +options. So, make the same change for text-based NFSv4 mounts. + +Thanks to James Pearson for reporting and +diagnosing the problem. + +Signed-off-by: Chuck Lever +Signed-off-by: Trond Myklebust +Cc: Neil Brown +Signed-off-by: Greg Kroah-Hartman + +--- + fs/nfs/super.c | 2 -- + 1 file changed, 2 deletions(-) + +--- a/fs/nfs/super.c ++++ b/fs/nfs/super.c +@@ -734,8 +734,6 @@ static struct nfs_parsed_mount_data *nfs + + data = kzalloc(sizeof(*data), GFP_KERNEL); + if (data) { +- data->rsize = NFS_MAX_FILE_IO_SIZE; +- data->wsize = NFS_MAX_FILE_IO_SIZE; + data->acregmin = NFS_DEF_ACREGMIN; + data->acregmax = NFS_DEF_ACREGMAX; + data->acdirmin = NFS_DEF_ACDIRMIN; diff --git a/queue-2.6.32/nfsd-fix-sort_pacl-in-fs-nfsd-nf4acl.c-to-actually-sort-groups.patch b/queue-2.6.32/nfsd-fix-sort_pacl-in-fs-nfsd-nf4acl.c-to-actually-sort-groups.patch new file mode 100644 index 00000000000..496dff93927 --- /dev/null +++ b/queue-2.6.32/nfsd-fix-sort_pacl-in-fs-nfsd-nf4acl.c-to-actually-sort-groups.patch @@ -0,0 +1,43 @@ +From aba24d71580180dfdf6a1a83a5858a1c048fd785 Mon Sep 17 00:00:00 2001 +From: Frank Filz +Date: Wed, 21 Oct 2009 16:45:02 -0700 +Subject: nfsd: Fix sort_pacl in fs/nfsd/nf4acl.c to actually sort groups + +From: Frank Filz + +commit aba24d71580180dfdf6a1a83a5858a1c048fd785 upstream. + +We have been doing some extensive testing of Linux support for ACLs on +NFDS v4. We have noticed that the server rejects ACLs where the groups +are out of order, for example, the following ACL is rejected: + +A::OWNER@:rwaxtTcCy +A::user101@domain:rwaxtcy +A::GROUP@:rwaxtcy +A:g:group102@domain:rwaxtcy +A:g:group101@domain:rwaxtcy +A::EVERYONE@:rwaxtcy + +Examining the server code, I found that after converting an NFS v4 ACL +to POSIX, sort_pacl is called to sort the user ACEs and group ACEs. +Unfortunately, a minor bug causes the group sort to be skipped. + +Signed-off-by: Frank Filz +Signed-off-by: J. Bruce Fields +Signed-off-by: Greg Kroah-Hartman + +--- + fs/nfsd/nfs4acl.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/fs/nfsd/nfs4acl.c ++++ b/fs/nfsd/nfs4acl.c +@@ -389,7 +389,7 @@ sort_pacl(struct posix_acl *pacl) + sort_pacl_range(pacl, 1, i-1); + + BUG_ON(pacl->a_entries[i].e_tag != ACL_GROUP_OBJ); +- j = i++; ++ j = ++i; + while (pacl->a_entries[j].e_tag == ACL_GROUP) + j++; + sort_pacl_range(pacl, i, j-1); diff --git a/queue-2.6.32/nohz-prevent-clocksource-wrapping-during-idle.patch b/queue-2.6.32/nohz-prevent-clocksource-wrapping-during-idle.patch new file mode 100644 index 00000000000..c16afa47b29 --- /dev/null +++ b/queue-2.6.32/nohz-prevent-clocksource-wrapping-during-idle.patch @@ -0,0 +1,232 @@ +From 98962465ed9e6ea99c38e0af63fe1dcb5a79dc25 Mon Sep 17 00:00:00 2001 +From: Jon Hunter +Date: Tue, 18 Aug 2009 12:45:10 -0500 +Subject: nohz: Prevent clocksource wrapping during idle + +From: Jon Hunter + +commit 98962465ed9e6ea99c38e0af63fe1dcb5a79dc25 upstream. + +The dynamic tick allows the kernel to sleep for periods longer than a +single tick, but it does not limit the sleep time currently. In the +worst case the kernel could sleep longer than the wrap around time of +the time keeping clock source which would result in losing track of +time. + +Prevent this by limiting it to the safe maximum sleep time of the +current time keeping clock source. The value is calculated when the +clock source is registered. + +[ tglx: simplified the code a bit and massaged the commit msg ] + +Signed-off-by: Jon Hunter +Cc: John Stultz +LKML-Reference: <1250617512-23567-2-git-send-email-jon-hunter@ti.com> +Signed-off-by: Thomas Gleixner +Signed-off-by: Greg Kroah-Hartman + +--- + include/linux/clocksource.h | 2 + + include/linux/time.h | 1 + kernel/time/clocksource.c | 44 +++++++++++++++++++++++++++++++++++++ + kernel/time/tick-sched.c | 52 ++++++++++++++++++++++++++++++++------------ + kernel/time/timekeeping.c | 11 +++++++++ + 5 files changed, 96 insertions(+), 14 deletions(-) + +--- a/include/linux/clocksource.h ++++ b/include/linux/clocksource.h +@@ -151,6 +151,7 @@ extern u64 timecounter_cyc2time(struct t + * subtraction of non 64 bit counters + * @mult: cycle to nanosecond multiplier + * @shift: cycle to nanosecond divisor (power of two) ++ * @max_idle_ns: max idle time permitted by the clocksource (nsecs) + * @flags: flags describing special properties + * @vread: vsyscall based read + * @resume: resume function for the clocksource, if necessary +@@ -168,6 +169,7 @@ struct clocksource { + cycle_t mask; + u32 mult; + u32 shift; ++ u64 max_idle_ns; + unsigned long flags; + cycle_t (*vread)(void); + void (*resume)(void); +--- a/include/linux/time.h ++++ b/include/linux/time.h +@@ -148,6 +148,7 @@ extern void monotonic_to_bootbased(struc + + extern struct timespec timespec_trunc(struct timespec t, unsigned gran); + extern int timekeeping_valid_for_hres(void); ++extern u64 timekeeping_max_deferment(void); + extern void update_wall_time(void); + extern void update_xtime_cache(u64 nsec); + extern void timekeeping_leap_insert(int leapsecond); +--- a/kernel/time/clocksource.c ++++ b/kernel/time/clocksource.c +@@ -416,6 +416,47 @@ void clocksource_touch_watchdog(void) + #ifdef CONFIG_GENERIC_TIME + + /** ++ * clocksource_max_deferment - Returns max time the clocksource can be deferred ++ * @cs: Pointer to clocksource ++ * ++ */ ++static u64 clocksource_max_deferment(struct clocksource *cs) ++{ ++ u64 max_nsecs, max_cycles; ++ ++ /* ++ * Calculate the maximum number of cycles that we can pass to the ++ * cyc2ns function without overflowing a 64-bit signed result. The ++ * maximum number of cycles is equal to ULLONG_MAX/cs->mult which ++ * is equivalent to the below. ++ * max_cycles < (2^63)/cs->mult ++ * max_cycles < 2^(log2((2^63)/cs->mult)) ++ * max_cycles < 2^(log2(2^63) - log2(cs->mult)) ++ * max_cycles < 2^(63 - log2(cs->mult)) ++ * max_cycles < 1 << (63 - log2(cs->mult)) ++ * Please note that we add 1 to the result of the log2 to account for ++ * any rounding errors, ensure the above inequality is satisfied and ++ * no overflow will occur. ++ */ ++ max_cycles = 1ULL << (63 - (ilog2(cs->mult) + 1)); ++ ++ /* ++ * The actual maximum number of cycles we can defer the clocksource is ++ * determined by the minimum of max_cycles and cs->mask. ++ */ ++ max_cycles = min_t(u64, max_cycles, (u64) cs->mask); ++ max_nsecs = clocksource_cyc2ns(max_cycles, cs->mult, cs->shift); ++ ++ /* ++ * To ensure that the clocksource does not wrap whilst we are idle, ++ * limit the time the clocksource can be deferred by 12.5%. Please ++ * note a margin of 12.5% is used because this can be computed with ++ * a shift, versus say 10% which would require division. ++ */ ++ return max_nsecs - (max_nsecs >> 5); ++} ++ ++/** + * clocksource_select - Select the best clocksource available + * + * Private function. Must hold clocksource_mutex when called. +@@ -511,6 +552,9 @@ static void clocksource_enqueue(struct c + */ + int clocksource_register(struct clocksource *cs) + { ++ /* calculate max idle time permitted for this clocksource */ ++ cs->max_idle_ns = clocksource_max_deferment(cs); ++ + mutex_lock(&clocksource_mutex); + clocksource_enqueue(cs); + clocksource_select(); +--- a/kernel/time/tick-sched.c ++++ b/kernel/time/tick-sched.c +@@ -216,6 +216,7 @@ void tick_nohz_stop_sched_tick(int inidl + struct tick_sched *ts; + ktime_t last_update, expires, now; + struct clock_event_device *dev = __get_cpu_var(tick_cpu_device).evtdev; ++ u64 time_delta; + int cpu; + + local_irq_save(flags); +@@ -275,6 +276,17 @@ void tick_nohz_stop_sched_tick(int inidl + seq = read_seqbegin(&xtime_lock); + last_update = last_jiffies_update; + last_jiffies = jiffies; ++ ++ /* ++ * On SMP we really should only care for the CPU which ++ * has the do_timer duty assigned. All other CPUs can ++ * sleep as long as they want. ++ */ ++ if (cpu == tick_do_timer_cpu || ++ tick_do_timer_cpu == TICK_DO_TIMER_NONE) ++ time_delta = timekeeping_max_deferment(); ++ else ++ time_delta = KTIME_MAX; + } while (read_seqretry(&xtime_lock, seq)); + + /* Get the next timer wheel timer */ +@@ -294,11 +306,26 @@ void tick_nohz_stop_sched_tick(int inidl + if ((long)delta_jiffies >= 1) { + + /* +- * calculate the expiry time for the next timer wheel +- * timer +- */ +- expires = ktime_add_ns(last_update, tick_period.tv64 * +- delta_jiffies); ++ * calculate the expiry time for the next timer wheel ++ * timer. delta_jiffies >= NEXT_TIMER_MAX_DELTA signals ++ * that there is no timer pending or at least extremely ++ * far into the future (12 days for HZ=1000). In this ++ * case we set the expiry to the end of time. ++ */ ++ if (likely(delta_jiffies < NEXT_TIMER_MAX_DELTA)) { ++ /* ++ * Calculate the time delta for the next timer event. ++ * If the time delta exceeds the maximum time delta ++ * permitted by the current clocksource then adjust ++ * the time delta accordingly to ensure the ++ * clocksource does not wrap. ++ */ ++ time_delta = min_t(u64, time_delta, ++ tick_period.tv64 * delta_jiffies); ++ expires = ktime_add_ns(last_update, time_delta); ++ } else { ++ expires.tv64 = KTIME_MAX; ++ } + + /* + * If this cpu is the one which updates jiffies, then +@@ -342,22 +369,19 @@ void tick_nohz_stop_sched_tick(int inidl + + ts->idle_sleeps++; + ++ /* Mark expires */ ++ ts->idle_expires = expires; ++ + /* +- * delta_jiffies >= NEXT_TIMER_MAX_DELTA signals that +- * there is no timer pending or at least extremly far +- * into the future (12 days for HZ=1000). In this case +- * we simply stop the tick timer: ++ * If the expiration time == KTIME_MAX, then ++ * in this case we simply stop the tick timer. + */ +- if (unlikely(delta_jiffies >= NEXT_TIMER_MAX_DELTA)) { +- ts->idle_expires.tv64 = KTIME_MAX; ++ if (unlikely(expires.tv64 == KTIME_MAX)) { + if (ts->nohz_mode == NOHZ_MODE_HIGHRES) + hrtimer_cancel(&ts->sched_timer); + goto out; + } + +- /* Mark expiries */ +- ts->idle_expires = expires; +- + if (ts->nohz_mode == NOHZ_MODE_HIGHRES) { + hrtimer_start(&ts->sched_timer, expires, + HRTIMER_MODE_ABS_PINNED); +--- a/kernel/time/timekeeping.c ++++ b/kernel/time/timekeeping.c +@@ -488,6 +488,17 @@ int timekeeping_valid_for_hres(void) + } + + /** ++ * timekeeping_max_deferment - Returns max time the clocksource can be deferred ++ * ++ * Caller must observe xtime_lock via read_seqbegin/read_seqretry to ++ * ensure that the clocksource does not change! ++ */ ++u64 timekeeping_max_deferment(void) ++{ ++ return timekeeper.clock->max_idle_ns; ++} ++ ++/** + * read_persistent_clock - Return time from the persistent clock. + * + * Weak dummy function for arches that do not yet support it. diff --git a/queue-2.6.32/pci-aer-fix-aer-inject-result-in-kernel-oops.patch b/queue-2.6.32/pci-aer-fix-aer-inject-result-in-kernel-oops.patch new file mode 100644 index 00000000000..f85f4a4b393 --- /dev/null +++ b/queue-2.6.32/pci-aer-fix-aer-inject-result-in-kernel-oops.patch @@ -0,0 +1,75 @@ +From 46256f83d0d066f99ffde547f27473dfd2a78009 Mon Sep 17 00:00:00 2001 +From: Youquan,Song +Date: Fri, 11 Dec 2009 18:42:35 -0500 +Subject: PCI: AER: fix aer inject result in kernel oops + +From: Youquan,Song + +commit 46256f83d0d066f99ffde547f27473dfd2a78009 upstream. + +If the BIOS does not export _OSC to allow OS take over the PCIe AER, the +pcie aer driver will not initialize the aer service. However, the +aer_inject driver does not check this scenario, which results in a kernel +oops when injecting an aer error into OS. For example: + +BUG: unable to handle kernel NULL pointer dereference at 0000000000000350 +IP: [] _spin_lock_irqsave+0xc/0x23 +PGD 155c41067 PUD 157fe0067 PMD 0 +Oops: 0002 [#1] SMP +Pid: 5119, comm: aer-inject Not tainted 2.6.32-rc8-mce #2 +RIP: 0010:[] [] _spin_lock_irqsave+0xc/0x23 +RSP: 0018:ffff880157f81e28 EFLAGS: 00010096 +RAX: 0000000000000296 RBX: 0000000000000000 RCX: 0000000000000100 +RDX: 0000000000010000 RSI: 0000000000000246 RDI: 0000000000000350 +RBP: ffff880157f81e28 R08: 0000000000000004 R09: ffff880157f81dac +R10: ffff88015a666f60 R11: ffff88015a666f40 R12: ffff88015758cc00 +R13: 0000000000000350 R14: 0000000000000000 R15: 0000000000000100 +FS: 00007f4d4a66e6f0(0000) GS:ffff8800282e0000(0000) knlGS:0000000000000000 +CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b +CR2: 0000000000000350 CR3: 000000015661a000 CR4: 00000000000006e0 +DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 +DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 +Process aer-inject (pid: 5119, threadinfo ffff880157f80000, task ffff8801585f4340) +Stack: + ffff880157f81e78 ffffffff811b1615 ffff880157f81e78 ffffffff81222823 +Call Trace: + [] aer_irq+0x38/0x117 + [] ? device_for_each_child+0x5f/0x6f + [] aer_inject_write+0x409/0x45e [aer_inject] + [] vfs_write+0xae/0x16a + [] sys_write+0x47/0x6e + [] system_call_fastpath+0x16/0x1b +RIP [] _spin_lock_irqsave+0xc/0x23 + RSP +CR2: 0000000000000350 + +So check the _OSC before assuming that AER is available to the OS. + +Signed-off-by: Youquan, Song +Acked-by: Ying, Huang +Signed-off-by: Jesse Barnes +Signed-off-by: Thomas Renninger +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/pci/pcie/aer/aer_inject.c | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +--- a/drivers/pci/pcie/aer/aer_inject.c ++++ b/drivers/pci/pcie/aer/aer_inject.c +@@ -392,8 +392,14 @@ static int aer_inject(struct aer_error_i + if (ret) + goto out_put; + +- if (find_aer_device(rpdev, &edev)) ++ if (find_aer_device(rpdev, &edev)) { ++ if (!get_service_data(edev)) { ++ printk(KERN_WARNING "AER service is not initialized\n"); ++ ret = -EINVAL; ++ goto out_put; ++ } + aer_irq(-1, edev); ++ } + else + ret = -EINVAL; + out_put: diff --git a/queue-2.6.32/pci-always-set-prefetchable-base-limit-upper32-registers.patch b/queue-2.6.32/pci-always-set-prefetchable-base-limit-upper32-registers.patch new file mode 100644 index 00000000000..3cb0cb8f45a --- /dev/null +++ b/queue-2.6.32/pci-always-set-prefetchable-base-limit-upper32-registers.patch @@ -0,0 +1,71 @@ +From 59353ea30e65ab3ae181d6175e3212e1361c3787 Mon Sep 17 00:00:00 2001 +From: Alex Williamson +Date: Mon, 30 Nov 2009 14:51:44 -0700 +Subject: PCI: Always set prefetchable base/limit upper32 registers + +From: Alex Williamson + +commit 59353ea30e65ab3ae181d6175e3212e1361c3787 upstream. + +Prior to 1f82de10 we always initialized the upper 32bits of the +prefetchable memory window, regardless of the address range used. +Now we only touch it for a >32bit address, which means the upper32 +registers remain whatever the BIOS initialized them too. + +It's valid for the BIOS to set the upper32 base/limit to +0xffffffff/0x00000000, which makes us program prefetchable ranges +like 0xffffffffabc00000 - 0x00000000abc00000 + +Revert the chunk of 1f82de10 that made this conditional so we always +write the upper32 registers and remove now unused pref_mem64 variable. + +Signed-off-by: Alex Williamson +Signed-off-by: Jesse Barnes +Signed-off-by: Rafael J. Wysocki +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/pci/setup-bus.c | 11 +++-------- + 1 file changed, 3 insertions(+), 8 deletions(-) + +--- a/drivers/pci/setup-bus.c ++++ b/drivers/pci/setup-bus.c +@@ -142,7 +142,6 @@ static void pci_setup_bridge(struct pci_ + struct pci_dev *bridge = bus->self; + struct pci_bus_region region; + u32 l, bu, lu, io_upper16; +- int pref_mem64; + + if (pci_is_enabled(bridge)) + return; +@@ -198,7 +197,6 @@ static void pci_setup_bridge(struct pci_ + pci_write_config_dword(bridge, PCI_PREF_LIMIT_UPPER32, 0); + + /* Set up PREF base/limit. */ +- pref_mem64 = 0; + bu = lu = 0; + pcibios_resource_to_bus(bridge, ®ion, bus->resource[2]); + if (bus->resource[2]->flags & IORESOURCE_PREFETCH) { +@@ -206,7 +204,6 @@ static void pci_setup_bridge(struct pci_ + l = (region.start >> 16) & 0xfff0; + l |= region.end & 0xfff00000; + if (bus->resource[2]->flags & IORESOURCE_MEM_64) { +- pref_mem64 = 1; + bu = upper_32_bits(region.start); + lu = upper_32_bits(region.end); + width = 16; +@@ -221,11 +218,9 @@ static void pci_setup_bridge(struct pci_ + } + pci_write_config_dword(bridge, PCI_PREF_MEMORY_BASE, l); + +- if (pref_mem64) { +- /* Set the upper 32 bits of PREF base & limit. */ +- pci_write_config_dword(bridge, PCI_PREF_BASE_UPPER32, bu); +- pci_write_config_dword(bridge, PCI_PREF_LIMIT_UPPER32, lu); +- } ++ /* Set the upper 32 bits of PREF base & limit. */ ++ pci_write_config_dword(bridge, PCI_PREF_BASE_UPPER32, bu); ++ pci_write_config_dword(bridge, PCI_PREF_LIMIT_UPPER32, lu); + + pci_write_config_word(bridge, PCI_BRIDGE_CONTROL, bus->bridge_ctl); + } diff --git a/queue-2.6.32/qlge-add-handler-for-dcbx-firmware-event.patch b/queue-2.6.32/qlge-add-handler-for-dcbx-firmware-event.patch new file mode 100644 index 00000000000..2c6a4dde70c --- /dev/null +++ b/queue-2.6.32/qlge-add-handler-for-dcbx-firmware-event.patch @@ -0,0 +1,33 @@ +From 91ced682f9de17ebab5fcb2a70b48e372eb43281 Mon Sep 17 00:00:00 2001 +From: Ron Mercer +Date: Sat, 10 Oct 2009 09:35:05 +0000 +Subject: qlge: Add handler for DCBX firmware event. + +From: Ron Mercer + +commit 91ced682f9de17ebab5fcb2a70b48e372eb43281 upstream. + +The driver has nothing to do, but this marker prevents the event from +showing up 'not handled'. + +Signed-off-by: Ron Mercer +Signed-off-by: David S. Miller +Signed-off-by: Brandon Philips +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/qlge/qlge_mpi.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/drivers/net/qlge/qlge_mpi.c ++++ b/drivers/net/qlge/qlge_mpi.c +@@ -446,6 +446,9 @@ static int ql_mpi_handler(struct ql_adap + ql_aen_lost(qdev, mbcp); + break; + ++ case AEN_DCBX_CHG: ++ /* Need to support AEN 8110 */ ++ break; + default: + QPRINTK(qdev, DRV, ERR, + "Unsupported AE %.08x.\n", mbcp->mbox_out[0]); diff --git a/queue-2.6.32/qlge-bonding-fix-for-mode-6.patch b/queue-2.6.32/qlge-bonding-fix-for-mode-6.patch new file mode 100644 index 00000000000..6e4250750d3 --- /dev/null +++ b/queue-2.6.32/qlge-bonding-fix-for-mode-6.patch @@ -0,0 +1,32 @@ +From 63ae93a19094d88c8ca62543586b20e3a7ff7637 Mon Sep 17 00:00:00 2001 +From: Ron Mercer +Date: Tue, 17 Nov 2009 11:10:40 +0000 +Subject: qlge: Bonding fix for mode 6. + +From: Ron Mercer + +commit 63ae93a19094d88c8ca62543586b20e3a7ff7637 upstream. + +Allow MAC address to be changed even if device is not up. + +Signed-off-by: Ron Mercer +Signed-off-by: David S. Miller +Signed-off-by: Brandon Philips +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/qlge/qlge_main.c | 3 --- + 1 file changed, 3 deletions(-) + +--- a/drivers/net/qlge/qlge_main.c ++++ b/drivers/net/qlge/qlge_main.c +@@ -3712,9 +3712,6 @@ static int qlge_set_mac_address(struct n + struct sockaddr *addr = p; + int status; + +- if (netif_running(ndev)) +- return -EBUSY; +- + if (!is_valid_ether_addr(addr->sa_data)) + return -EADDRNOTAVAIL; + memcpy(ndev->dev_addr, addr->sa_data, ndev->addr_len); diff --git a/queue-2.6.32/qlge-don-t-fail-open-when-port-is-not-initialized.patch b/queue-2.6.32/qlge-don-t-fail-open-when-port-is-not-initialized.patch new file mode 100644 index 00000000000..02d4d789666 --- /dev/null +++ b/queue-2.6.32/qlge-don-t-fail-open-when-port-is-not-initialized.patch @@ -0,0 +1,32 @@ +From 80928860941023bb37e9c61927395d0eb753bc3b Mon Sep 17 00:00:00 2001 +From: Ron Mercer +Date: Sat, 10 Oct 2009 09:35:09 +0000 +Subject: qlge: Don't fail open when port is not initialized. + +From: Ron Mercer + +commit 80928860941023bb37e9c61927395d0eb753bc3b upstream. + +Signed-off-by: Ron Mercer +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/qlge/qlge_main.c | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +--- a/drivers/net/qlge/qlge_main.c ++++ b/drivers/net/qlge/qlge_main.c +@@ -3310,10 +3310,8 @@ static int ql_adapter_initialize(struct + + /* Initialize the port and set the max framesize. */ + status = qdev->nic_ops->port_initialize(qdev); +- if (status) { +- QPRINTK(qdev, IFUP, ERR, "Failed to start port.\n"); +- return status; +- } ++ if (status) ++ QPRINTK(qdev, IFUP, ERR, "Failed to start port.\n"); + + /* Set up the MAC address and frame routing filter. */ + status = ql_cam_route_initialize(qdev); diff --git a/queue-2.6.32/qlge-remove-explicit-setting-of-pci-dev-ctl-reg.patch b/queue-2.6.32/qlge-remove-explicit-setting-of-pci-dev-ctl-reg.patch new file mode 100644 index 00000000000..beb0e85eb30 --- /dev/null +++ b/queue-2.6.32/qlge-remove-explicit-setting-of-pci-dev-ctl-reg.patch @@ -0,0 +1,51 @@ +From 1d1023d039d8295070b8dbb92c4d972237235304 Mon Sep 17 00:00:00 2001 +From: Ron Mercer +Date: Sat, 10 Oct 2009 09:35:03 +0000 +Subject: qlge: Remove explicit setting of PCI Dev CTL reg. + +From: Ron Mercer + +commit 1d1023d039d8295070b8dbb92c4d972237235304 upstream. + +Remove explicit setting of error reporting bits. + +Signed-off-by: Ron Mercer +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/qlge/qlge_main.c | 16 +--------------- + 1 file changed, 1 insertion(+), 15 deletions(-) + +--- a/drivers/net/qlge/qlge_main.c ++++ b/drivers/net/qlge/qlge_main.c +@@ -3868,8 +3868,7 @@ static int __devinit ql_init_device(stru + struct net_device *ndev, int cards_found) + { + struct ql_adapter *qdev = netdev_priv(ndev); +- int pos, err = 0; +- u16 val16; ++ int err = 0; + + memset((void *)qdev, 0, sizeof(*qdev)); + err = pci_enable_device(pdev); +@@ -3881,19 +3880,6 @@ static int __devinit ql_init_device(stru + qdev->ndev = ndev; + qdev->pdev = pdev; + pci_set_drvdata(pdev, ndev); +- pos = pci_find_capability(pdev, PCI_CAP_ID_EXP); +- if (pos <= 0) { +- dev_err(&pdev->dev, PFX "Cannot find PCI Express capability, " +- "aborting.\n"); +- return pos; +- } else { +- pci_read_config_word(pdev, pos + PCI_EXP_DEVCTL, &val16); +- val16 &= ~PCI_EXP_DEVCTL_NOSNOOP_EN; +- val16 |= (PCI_EXP_DEVCTL_CERE | +- PCI_EXP_DEVCTL_NFERE | +- PCI_EXP_DEVCTL_FERE | PCI_EXP_DEVCTL_URRE); +- pci_write_config_word(pdev, pos + PCI_EXP_DEVCTL, val16); +- } + + err = pci_request_regions(pdev, DRV_NAME); + if (err) { diff --git a/queue-2.6.32/qlge-set-pcie-max-read-request-size.patch b/queue-2.6.32/qlge-set-pcie-max-read-request-size.patch new file mode 100644 index 00000000000..9d18d1afd38 --- /dev/null +++ b/queue-2.6.32/qlge-set-pcie-max-read-request-size.patch @@ -0,0 +1,33 @@ +From bc9167f39ff8cd428e8577eb72751a653008edb2 Mon Sep 17 00:00:00 2001 +From: Ron Mercer +Date: Sat, 10 Oct 2009 09:35:04 +0000 +Subject: qlge: Set PCIE max read request size. + +From: Ron Mercer + +commit bc9167f39ff8cd428e8577eb72751a653008edb2 upstream. + +Signed-off-by: Ron Mercer +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/qlge/qlge_main.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +--- a/drivers/net/qlge/qlge_main.c ++++ b/drivers/net/qlge/qlge_main.c +@@ -3881,6 +3881,13 @@ static int __devinit ql_init_device(stru + qdev->pdev = pdev; + pci_set_drvdata(pdev, ndev); + ++ /* Set PCIe read request size */ ++ err = pcie_set_readrq(pdev, 4096); ++ if (err) { ++ dev_err(&pdev->dev, "Set readrq failed.\n"); ++ goto err_out; ++ } ++ + err = pci_request_regions(pdev, DRV_NAME); + if (err) { + dev_err(&pdev->dev, "PCI region request failed.\n"); diff --git a/queue-2.6.32/sched-fix-isolcpus-boot-option.patch b/queue-2.6.32/sched-fix-isolcpus-boot-option.patch new file mode 100644 index 00000000000..b28028b4873 --- /dev/null +++ b/queue-2.6.32/sched-fix-isolcpus-boot-option.patch @@ -0,0 +1,56 @@ +From bdddd2963c0264c56f18043f6fa829d3c1d3d1c0 Mon Sep 17 00:00:00 2001 +From: Rusty Russell +Date: Wed, 2 Dec 2009 14:09:16 +1030 +Subject: sched: Fix isolcpus boot option + +From: Rusty Russell + +commit bdddd2963c0264c56f18043f6fa829d3c1d3d1c0 upstream. + +Anton Blanchard wrote: + +> We allocate and zero cpu_isolated_map after the isolcpus +> __setup option has run. This means cpu_isolated_map always +> ends up empty and if CPUMASK_OFFSTACK is enabled we write to a +> cpumask that hasn't been allocated. + +I introduced this regression in 49557e620339cb13 (sched: Fix +boot crash by zalloc()ing most of the cpu masks). + +Use the bootmem allocator if they set isolcpus=, otherwise +allocate and zero like normal. + +Reported-by: Anton Blanchard +Signed-off-by: Rusty Russell +Cc: peterz@infradead.org +Cc: Linus Torvalds +Cc: +LKML-Reference: <200912021409.17013.rusty@rustcorp.com.au> +Signed-off-by: Ingo Molnar +Tested-by: Anton Blanchard + +--- + kernel/sched.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +--- a/kernel/sched.c ++++ b/kernel/sched.c +@@ -8061,6 +8061,7 @@ static cpumask_var_t cpu_isolated_map; + /* Setup the mask of cpus configured for isolated domains */ + static int __init isolated_cpu_setup(char *str) + { ++ alloc_bootmem_cpumask_var(&cpu_isolated_map); + cpulist_parse(str, cpu_isolated_map); + return 1; + } +@@ -9591,7 +9592,9 @@ void __init sched_init(void) + zalloc_cpumask_var(&nohz.cpu_mask, GFP_NOWAIT); + alloc_cpumask_var(&nohz.ilb_grp_nohz_mask, GFP_NOWAIT); + #endif +- zalloc_cpumask_var(&cpu_isolated_map, GFP_NOWAIT); ++ /* May be allocated at isolcpus cmdline parse time */ ++ if (cpu_isolated_map == NULL) ++ zalloc_cpumask_var(&cpu_isolated_map, GFP_NOWAIT); + #endif /* SMP */ + + perf_event_init(); diff --git a/queue-2.6.32/sched-fix-missing-sched-tunable-recalculation-on-cpu-add-remove.patch b/queue-2.6.32/sched-fix-missing-sched-tunable-recalculation-on-cpu-add-remove.patch new file mode 100644 index 00000000000..d422c062853 --- /dev/null +++ b/queue-2.6.32/sched-fix-missing-sched-tunable-recalculation-on-cpu-add-remove.patch @@ -0,0 +1,131 @@ +From 0bcdcf28c979869f44e05121b96ff2cfb05bd8e6 Mon Sep 17 00:00:00 2001 +From: Christian Ehrhardt +Date: Mon, 30 Nov 2009 12:16:46 +0100 +Subject: sched: Fix missing sched tunable recalculation on cpu add/remove + +From: Christian Ehrhardt + +commit 0bcdcf28c979869f44e05121b96ff2cfb05bd8e6 upstream. + +Based on Peter Zijlstras patch suggestion this enables recalculation of +the scheduler tunables in response of a change in the number of cpus. It +also adds a max of eight cpus that are considered in that scaling. + +Signed-off-by: Christian Ehrhardt +Signed-off-by: Peter Zijlstra +LKML-Reference: <1259579808-11357-2-git-send-email-ehrhardt@linux.vnet.ibm.com> +Signed-off-by: Ingo Molnar +Signed-off-by: Greg Kroah-Hartman + +--- + kernel/sched.c | 29 ++++++++++++++++------------- + kernel/sched_fair.c | 16 ++++++++++++++++ + 2 files changed, 32 insertions(+), 13 deletions(-) + +--- a/kernel/sched.c ++++ b/kernel/sched.c +@@ -816,6 +816,7 @@ const_debug unsigned int sysctl_sched_nr + * default: 0.25ms + */ + unsigned int sysctl_sched_shares_ratelimit = 250000; ++unsigned int normalized_sysctl_sched_shares_ratelimit = 250000; + + /* + * Inject some fuzzyness into changing the per-cpu group shares +@@ -1812,6 +1813,7 @@ static void cfs_rq_set_shares(struct cfs + #endif + + static void calc_load_account_active(struct rq *this_rq); ++static void update_sysctl(void); + + #include "sched_stats.h" + #include "sched_idletask.c" +@@ -7018,22 +7020,23 @@ cpumask_var_t nohz_cpu_mask; + * + * This idea comes from the SD scheduler of Con Kolivas: + */ +-static inline void sched_init_granularity(void) ++static void update_sysctl(void) + { +- unsigned int factor = 1 + ilog2(num_online_cpus()); +- const unsigned long limit = 200000000; +- +- sysctl_sched_min_granularity *= factor; +- if (sysctl_sched_min_granularity > limit) +- sysctl_sched_min_granularity = limit; +- +- sysctl_sched_latency *= factor; +- if (sysctl_sched_latency > limit) +- sysctl_sched_latency = limit; ++ unsigned int cpus = min(num_online_cpus(), 8U); ++ unsigned int factor = 1 + ilog2(cpus); + +- sysctl_sched_wakeup_granularity *= factor; ++#define SET_SYSCTL(name) \ ++ (sysctl_##name = (factor) * normalized_sysctl_##name) ++ SET_SYSCTL(sched_min_granularity); ++ SET_SYSCTL(sched_latency); ++ SET_SYSCTL(sched_wakeup_granularity); ++ SET_SYSCTL(sched_shares_ratelimit); ++#undef SET_SYSCTL ++} + +- sysctl_sched_shares_ratelimit *= factor; ++static inline void sched_init_granularity(void) ++{ ++ update_sysctl(); + } + + #ifdef CONFIG_SMP +--- a/kernel/sched_fair.c ++++ b/kernel/sched_fair.c +@@ -35,12 +35,14 @@ + * run vmstat and monitor the context-switches (cs) field) + */ + unsigned int sysctl_sched_latency = 5000000ULL; ++unsigned int normalized_sysctl_sched_latency = 5000000ULL; + + /* + * Minimal preemption granularity for CPU-bound tasks: + * (default: 1 msec * (1 + ilog(ncpus)), units: nanoseconds) + */ + unsigned int sysctl_sched_min_granularity = 1000000ULL; ++unsigned int normalized_sysctl_sched_min_granularity = 1000000ULL; + + /* + * is kept at sysctl_sched_latency / sysctl_sched_min_granularity +@@ -70,6 +72,7 @@ unsigned int __read_mostly sysctl_sched_ + * have immediate wakeup/sleep latencies. + */ + unsigned int sysctl_sched_wakeup_granularity = 1000000UL; ++unsigned int normalized_sysctl_sched_wakeup_granularity = 1000000UL; + + const_debug unsigned int sysctl_sched_migration_cost = 500000UL; + +@@ -1880,6 +1883,17 @@ move_one_task_fair(struct rq *this_rq, i + + return 0; + } ++ ++static void rq_online_fair(struct rq *rq) ++{ ++ update_sysctl(); ++} ++ ++static void rq_offline_fair(struct rq *rq) ++{ ++ update_sysctl(); ++} ++ + #endif /* CONFIG_SMP */ + + /* +@@ -2027,6 +2041,8 @@ static const struct sched_class fair_sch + + .load_balance = load_balance_fair, + .move_one_task = move_one_task_fair, ++ .rq_online = rq_online_fair, ++ .rq_offline = rq_offline_fair, + #endif + + .set_curr_task = set_curr_task_fair, diff --git a/queue-2.6.32/scsi_devinfo-update-hitachi-entries-v2.patch b/queue-2.6.32/scsi_devinfo-update-hitachi-entries-v2.patch new file mode 100644 index 00000000000..e0f0137238c --- /dev/null +++ b/queue-2.6.32/scsi_devinfo-update-hitachi-entries-v2.patch @@ -0,0 +1,40 @@ +From 627511e3e67553b04f6917c03e39b797df210e04 Mon Sep 17 00:00:00 2001 +From: Takahiro Yasui +Date: Tue, 10 Nov 2009 16:22:19 -0500 +Subject: [SCSI] scsi_devinfo: update Hitachi entries (v2) + +From: Takahiro Yasui + +commit 627511e3e67553b04f6917c03e39b797df210e04 upstream. + +Four models, OPEN-/DF400/DF500/DISK-SUBSYSTEM, can handle REPORT_LUN, +and the BLIST_REPORTLUN2 flag needs to be set. And DF600 doesn't require +any flags because it returns ANSI 03h (SPC). + +Signed-off-by: Takahiro Yasui +Signed-off-by: James Bottomley +Acked-by: Hannes Reinecke +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/scsi/scsi_devinfo.c | 9 ++++----- + 1 file changed, 4 insertions(+), 5 deletions(-) + +--- a/drivers/scsi/scsi_devinfo.c ++++ b/drivers/scsi/scsi_devinfo.c +@@ -168,11 +168,10 @@ static struct { + {"Generic", "USB SD Reader", "1.00", BLIST_FORCELUN | BLIST_INQUIRY_36}, + {"Generic", "USB Storage-SMC", "0180", BLIST_FORCELUN | BLIST_INQUIRY_36}, + {"Generic", "USB Storage-SMC", "0207", BLIST_FORCELUN | BLIST_INQUIRY_36}, +- {"HITACHI", "DF400", "*", BLIST_SPARSELUN}, +- {"HITACHI", "DF500", "*", BLIST_SPARSELUN}, +- {"HITACHI", "DF600", "*", BLIST_SPARSELUN}, +- {"HITACHI", "DISK-SUBSYSTEM", "*", BLIST_ATTACH_PQ3 | BLIST_SPARSELUN | BLIST_LARGELUN}, +- {"HITACHI", "OPEN-E", "*", BLIST_ATTACH_PQ3 | BLIST_SPARSELUN | BLIST_LARGELUN}, ++ {"HITACHI", "DF400", "*", BLIST_REPORTLUN2}, ++ {"HITACHI", "DF500", "*", BLIST_REPORTLUN2}, ++ {"HITACHI", "DISK-SUBSYSTEM", "*", BLIST_REPORTLUN2}, ++ {"HITACHI", "OPEN-", "*", BLIST_REPORTLUN2}, + {"HITACHI", "OP-C-", "*", BLIST_SPARSELUN | BLIST_LARGELUN}, + {"HITACHI", "3380-", "*", BLIST_SPARSELUN | BLIST_LARGELUN}, + {"HITACHI", "3390-", "*", BLIST_SPARSELUN | BLIST_LARGELUN}, diff --git a/queue-2.6.32/scsi_dh-create-sysfs-file-dh_state-for-all-scsi-disk-devices.patch b/queue-2.6.32/scsi_dh-create-sysfs-file-dh_state-for-all-scsi-disk-devices.patch new file mode 100644 index 00000000000..121293dcd77 --- /dev/null +++ b/queue-2.6.32/scsi_dh-create-sysfs-file-dh_state-for-all-scsi-disk-devices.patch @@ -0,0 +1,46 @@ +From 5917290ce9b376866b165d02a5ed88d5ecdb32d0 Mon Sep 17 00:00:00 2001 +From: Chandra Seetharaman +Date: Fri, 11 Sep 2009 10:20:35 -0700 +Subject: [SCSI] scsi_dh: create sysfs file, dh_state for all SCSI disk devices + +From: Chandra Seetharaman + +commit 5917290ce9b376866b165d02a5ed88d5ecdb32d0 upstream. + +Create the sysfs file, dh_state even if the new SCSI device is not +in the any of the device handler's internal lists. + +Signed-Off-by: Chandra Seetharaman +Acked-by: Hannes Reinecke +Signed-off-by: James Bottomley +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/scsi/device_handler/scsi_dh.c | 11 ++++------- + 1 file changed, 4 insertions(+), 7 deletions(-) + +--- a/drivers/scsi/device_handler/scsi_dh.c ++++ b/drivers/scsi/device_handler/scsi_dh.c +@@ -304,18 +304,15 @@ static int scsi_dh_notifier(struct notif + sdev = to_scsi_device(dev); + + if (action == BUS_NOTIFY_ADD_DEVICE) { ++ err = device_create_file(dev, &scsi_dh_state_attr); ++ /* don't care about err */ + devinfo = device_handler_match(NULL, sdev); +- if (!devinfo) +- goto out; +- +- err = scsi_dh_handler_attach(sdev, devinfo); +- if (!err) +- err = device_create_file(dev, &scsi_dh_state_attr); ++ if (devinfo) ++ err = scsi_dh_handler_attach(sdev, devinfo); + } else if (action == BUS_NOTIFY_DEL_DEVICE) { + device_remove_file(dev, &scsi_dh_state_attr); + scsi_dh_handler_detach(sdev, NULL); + } +-out: + return err; + } + diff --git a/queue-2.6.32/scsi_transport_fc-remove-invalid-bug_on.patch b/queue-2.6.32/scsi_transport_fc-remove-invalid-bug_on.patch new file mode 100644 index 00000000000..c1a3a6e0f1a --- /dev/null +++ b/queue-2.6.32/scsi_transport_fc-remove-invalid-bug_on.patch @@ -0,0 +1,147 @@ +From 8798a694da59486e4a3ff0abeec183202fb34c20 Mon Sep 17 00:00:00 2001 +From: Michael Reed +Date: Fri, 9 Oct 2009 14:15:59 -0500 +Subject: [SCSI] scsi_transport_fc: remove invalid BUG_ON + +From: Michael Reed + +commit 8798a694da59486e4a3ff0abeec183202fb34c20 upstream. + +I was doing some large lun count testing with 2.6.31 and hit +a BUG_ON() in fc_timeout_deleted_rport(), and it seems like it +should have been just a matter of time before someone did. + +It seems invalid to set port_state under lock, then expect it to +remain set after releasing the lock. Another thread called +fc_remote_port_add() when the lock was released, changing the +port_state. + +This patch removes the BUG_ON and moves the test of the +port_state to inside the host_lock. It's been running for +several weeks now with no ill effect. + +Signed-off-by: Michael Reed +Acked-by: James Smart +Signed-off-by: James Bottomley +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/scsi/scsi_transport_fc.c | 68 ++++++++++++++++++++++++--------------- + 1 file changed, 42 insertions(+), 26 deletions(-) + +--- a/drivers/scsi/scsi_transport_fc.c ++++ b/drivers/scsi/scsi_transport_fc.c +@@ -2395,6 +2395,7 @@ fc_rport_final_delete(struct work_struct + struct Scsi_Host *shost = rport_to_shost(rport); + struct fc_internal *i = to_fc_internal(shost->transportt); + unsigned long flags; ++ int do_callback = 0; + + /* + * if a scan is pending, flush the SCSI Host work_q so that +@@ -2433,8 +2434,15 @@ fc_rport_final_delete(struct work_struct + * Avoid this call if we already called it when we preserved the + * rport for the binding. + */ ++ spin_lock_irqsave(shost->host_lock, flags); + if (!(rport->flags & FC_RPORT_DEVLOSS_CALLBK_DONE) && +- (i->f->dev_loss_tmo_callbk)) ++ (i->f->dev_loss_tmo_callbk)) { ++ rport->flags |= FC_RPORT_DEVLOSS_CALLBK_DONE; ++ do_callback = 1; ++ } ++ spin_unlock_irqrestore(shost->host_lock, flags); ++ ++ if (do_callback) + i->f->dev_loss_tmo_callbk(rport); + + fc_bsg_remove(rport->rqst_q); +@@ -2981,6 +2989,7 @@ fc_timeout_deleted_rport(struct work_str + struct fc_internal *i = to_fc_internal(shost->transportt); + struct fc_host_attrs *fc_host = shost_to_fc_host(shost); + unsigned long flags; ++ int do_callback = 0; + + spin_lock_irqsave(shost->host_lock, flags); + +@@ -3046,7 +3055,6 @@ fc_timeout_deleted_rport(struct work_str + rport->roles = FC_PORT_ROLE_UNKNOWN; + rport->port_state = FC_PORTSTATE_NOTPRESENT; + rport->flags &= ~FC_RPORT_FAST_FAIL_TIMEDOUT; +- rport->flags |= FC_RPORT_DEVLOSS_CALLBK_DONE; + + /* + * Pre-emptively kill I/O rather than waiting for the work queue +@@ -3056,32 +3064,40 @@ fc_timeout_deleted_rport(struct work_str + spin_unlock_irqrestore(shost->host_lock, flags); + fc_terminate_rport_io(rport); + +- BUG_ON(rport->port_state != FC_PORTSTATE_NOTPRESENT); ++ spin_lock_irqsave(shost->host_lock, flags); + +- /* remove the identifiers that aren't used in the consisting binding */ +- switch (fc_host->tgtid_bind_type) { +- case FC_TGTID_BIND_BY_WWPN: +- rport->node_name = -1; +- rport->port_id = -1; +- break; +- case FC_TGTID_BIND_BY_WWNN: +- rport->port_name = -1; +- rport->port_id = -1; +- break; +- case FC_TGTID_BIND_BY_ID: +- rport->node_name = -1; +- rport->port_name = -1; +- break; +- case FC_TGTID_BIND_NONE: /* to keep compiler happy */ +- break; ++ if (rport->port_state == FC_PORTSTATE_NOTPRESENT) { /* still missing */ ++ ++ /* remove the identifiers that aren't used in the consisting binding */ ++ switch (fc_host->tgtid_bind_type) { ++ case FC_TGTID_BIND_BY_WWPN: ++ rport->node_name = -1; ++ rport->port_id = -1; ++ break; ++ case FC_TGTID_BIND_BY_WWNN: ++ rport->port_name = -1; ++ rport->port_id = -1; ++ break; ++ case FC_TGTID_BIND_BY_ID: ++ rport->node_name = -1; ++ rport->port_name = -1; ++ break; ++ case FC_TGTID_BIND_NONE: /* to keep compiler happy */ ++ break; ++ } ++ ++ /* ++ * As this only occurs if the remote port (scsi target) ++ * went away and didn't come back - we'll remove ++ * all attached scsi devices. ++ */ ++ rport->flags |= FC_RPORT_DEVLOSS_CALLBK_DONE; ++ fc_queue_work(shost, &rport->stgt_delete_work); ++ ++ do_callback = 1; + } + +- /* +- * As this only occurs if the remote port (scsi target) +- * went away and didn't come back - we'll remove +- * all attached scsi devices. +- */ +- fc_queue_work(shost, &rport->stgt_delete_work); ++ spin_unlock_irqrestore(shost->host_lock, flags); + + /* + * Notify the driver that the rport is now dead. The LLDD will +@@ -3089,7 +3105,7 @@ fc_timeout_deleted_rport(struct work_str + * + * Note: we set the CALLBK_DONE flag above to correspond + */ +- if (i->f->dev_loss_tmo_callbk) ++ if (do_callback && i->f->dev_loss_tmo_callbk) + i->f->dev_loss_tmo_callbk(rport); + } + diff --git a/queue-2.6.32/series b/queue-2.6.32/series index d1a44fab8cb..79a0078487c 100644 --- a/queue-2.6.32/series +++ b/queue-2.6.32/series @@ -24,3 +24,55 @@ netfilter-xtables-fix-conntrack-match-v1-ipt-save-output.patch partitions-read-whole-sector-with-efi-gpt-header.patch partitions-use-sector-size-for-efi-gpt.patch alsa-ice1724-patch-for-suspend-resume-for-esi-juli.patch +sched-fix-isolcpus-boot-option.patch +sched-fix-missing-sched-tunable-recalculation-on-cpu-add-remove.patch +nohz-prevent-clocksource-wrapping-during-idle.patch +nfsd-fix-sort_pacl-in-fs-nfsd-nf4acl.c-to-actually-sort-groups.patch +timers-init-limit-the-number-of-per-cpu-calibration-bootup-messages.patch +pci-always-set-prefetchable-base-limit-upper32-registers.patch +iscsi-class-modify-handling-of-replacement-timeout.patch +nfs-revert-default-r-wsize-behavior.patch +hid-fixup-quirk-for-ncr-devices.patch +scsi_devinfo-update-hitachi-entries-v2.patch +scsi_dh-create-sysfs-file-dh_state-for-all-scsi-disk-devices.patch +scsi_transport_fc-remove-invalid-bug_on.patch +lpfc-fix-hang-on-sgi-ia64-platform.patch +libfc-fix-typo-in-retry-check-on-received-prli.patch +libfc-fix-ddp-in-fc_fcp-for-0-xid.patch +fcoe-remove-redundant-checking-of-netdev-netdev_ops.patch +libfc-fix-wrong-scsi-return-status-under-fc_data_undrun.patch +libfc-lport-fix-minor-documentation-errors.patch +libfc-don-t-warn_on-in-lport_timeout-for-reset-state.patch +fcoe-initialize-return-value-in-fcoe_destroy.patch +libfc-fix-frags-in-frame-exceeding-skb_max_frags-in-fc_fcp_send_data.patch +libfc-fix-memory-corruption-caused-by-double-frees-and-bad-error-handling.patch +libfc-fix-free-of-fc_rport_priv-with-timer-pending.patch +fcoe-libfc-fix-an-libfc-issue-with-queue-ramp-down-in-libfc.patch +fcoe-fix-checking-san-mac-address.patch +fcoe-fix-getting-san-mac-for-vlan-interface.patch +qlge-remove-explicit-setting-of-pci-dev-ctl-reg.patch +qlge-set-pcie-max-read-request-size.patch +qlge-don-t-fail-open-when-port-is-not-initialized.patch +qlge-add-handler-for-dcbx-firmware-event.patch +qlge-bonding-fix-for-mode-6.patch +netxen-add-pci-ids-for-new-chip.patch +pci-aer-fix-aer-inject-result-in-kernel-oops.patch +input-i8042-remove-identification-strings-from-dmi-tables.patch +input-i8042-add-gigabyte-m1022m-to-the-noloop-list.patch +input-i8042-add-dritek-quirk-for-acer-aspire-5610.patch +input-psmouse-fix-synaptics-detection-when-protocol-is-disabled.patch +alsa-hda-select-ibexpeak-handler-for-calpella.patch +alsa-hda-fix-quirk-for-maxdata-obook4-1.patch +alsa-hda-add-missing-line-out-and-pcm-switches-as-slave.patch +itco_wdt.c-cleanup-chipset-documentation.patch +itco_wdt-add-pci-id-for-the-intel-ep80579-tolapai-soc.patch +itco_wdt-add-intel-cougar-point-and-pch-deviceids.patch +ahci-disable-snotification-capability-for-ich8.patch +ata_piix-fix-mwdma-handling-on-piix3.patch +ata_piix-enable-32bit-pio-on-sata-piix.patch +md-fix-small-irregularity-with-start_ro-module-parameter.patch +v4l-dvb-13826-uvcvideo-fix-controls-blacklisting.patch +cio-fix-double-free-in-case-of-probe-failure.patch +cio-dont-panic-in-non-fatal-conditions.patch +netiucv-displayed-tx-bytes-value-much-too-high.patch +ipc-ns-fix-memory-leak-idr.patch diff --git a/queue-2.6.32/timers-init-limit-the-number-of-per-cpu-calibration-bootup-messages.patch b/queue-2.6.32/timers-init-limit-the-number-of-per-cpu-calibration-bootup-messages.patch new file mode 100644 index 00000000000..42af6768c20 --- /dev/null +++ b/queue-2.6.32/timers-init-limit-the-number-of-per-cpu-calibration-bootup-messages.patch @@ -0,0 +1,102 @@ +From feae3203d711db0a9965300ee6d592257fdaae4f Mon Sep 17 00:00:00 2001 +From: Mike Travis +Date: Tue, 17 Nov 2009 18:22:13 -0600 +Subject: timers, init: Limit the number of per cpu calibration bootup messages + +From: Mike Travis + +commit feae3203d711db0a9965300ee6d592257fdaae4f upstream. + +Limit the number of per cpu calibration messages by only +printing out results for the first cpu to boot. + +Also, don't print "CPUx is down" as this is expected, and we +don't need 4096 reminders... ;-) + +Signed-off-by: Mike Travis +Cc: Heiko Carstens +Cc: Roland Dreier +Cc: Randy Dunlap +Cc: Tejun Heo +Cc: Andi Kleen +Cc: Greg Kroah-Hartman +Cc: Yinghai Lu +Cc: David Rientjes +Cc: Steven Rostedt +Cc: Rusty Russell +Cc: Hidetoshi Seto +Cc: Jack Steiner +Cc: Frederic Weisbecker +LKML-Reference: <20091118002219.889552000@alcatraz.americas.sgi.com> +Signed-off-by: Ingo Molnar +Signed-off-by: Greg Kroah-Hartman + +--- + init/calibrate.c | 24 +++++++++++++++--------- + kernel/cpu.c | 5 ++--- + 2 files changed, 17 insertions(+), 12 deletions(-) + +--- a/init/calibrate.c ++++ b/init/calibrate.c +@@ -123,23 +123,26 @@ void __cpuinit calibrate_delay(void) + { + unsigned long ticks, loopbit; + int lps_precision = LPS_PREC; ++ static bool printed; + + if (preset_lpj) { + loops_per_jiffy = preset_lpj; +- printk(KERN_INFO +- "Calibrating delay loop (skipped) preset value.. "); +- } else if ((smp_processor_id() == 0) && lpj_fine) { ++ if (!printed) ++ pr_info("Calibrating delay loop (skipped) " ++ "preset value.. "); ++ } else if ((!printed) && lpj_fine) { + loops_per_jiffy = lpj_fine; +- printk(KERN_INFO +- "Calibrating delay loop (skipped), " ++ pr_info("Calibrating delay loop (skipped), " + "value calculated using timer frequency.. "); + } else if ((loops_per_jiffy = calibrate_delay_direct()) != 0) { +- printk(KERN_INFO +- "Calibrating delay using timer specific routine.. "); ++ if (!printed) ++ pr_info("Calibrating delay using timer " ++ "specific routine.. "); + } else { + loops_per_jiffy = (1<<12); + +- printk(KERN_INFO "Calibrating delay loop... "); ++ if (!printed) ++ pr_info("Calibrating delay loop... "); + while ((loops_per_jiffy <<= 1) != 0) { + /* wait for "start of" clock tick */ + ticks = jiffies; +@@ -170,7 +173,10 @@ void __cpuinit calibrate_delay(void) + loops_per_jiffy &= ~loopbit; + } + } +- printk(KERN_CONT "%lu.%02lu BogoMIPS (lpj=%lu)\n", ++ if (!printed) ++ pr_cont("%lu.%02lu BogoMIPS (lpj=%lu)\n", + loops_per_jiffy/(500000/HZ), + (loops_per_jiffy/(5000/HZ)) % 100, loops_per_jiffy); ++ ++ printed = true; + } +--- a/kernel/cpu.c ++++ b/kernel/cpu.c +@@ -400,10 +400,9 @@ int disable_nonboot_cpus(void) + if (cpu == first_cpu) + continue; + error = _cpu_down(cpu, 1); +- if (!error) { ++ if (!error) + cpumask_set_cpu(cpu, frozen_cpus); +- printk("CPU%d is down\n", cpu); +- } else { ++ else { + printk(KERN_ERR "Error taking CPU%d down: %d\n", + cpu, error); + break; diff --git a/queue-2.6.32/v4l-dvb-13826-uvcvideo-fix-controls-blacklisting.patch b/queue-2.6.32/v4l-dvb-13826-uvcvideo-fix-controls-blacklisting.patch new file mode 100644 index 00000000000..10b2282b1e1 --- /dev/null +++ b/queue-2.6.32/v4l-dvb-13826-uvcvideo-fix-controls-blacklisting.patch @@ -0,0 +1,37 @@ +From 385097e08b9c24655626ed760bc67eb7e50115a0 Mon Sep 17 00:00:00 2001 +From: Laurent Pinchart +Date: Wed, 9 Dec 2009 22:31:21 -0300 +Subject: V4L/DVB (13826): uvcvideo: Fix controls blacklisting + +From: Laurent Pinchart + +commit 385097e08b9c24655626ed760bc67eb7e50115a0 upstream. + +The control blacklisting code erroneously used usb_match_id() by passing +a pointer to a usb_device_id structure instead of an array of such +structures. + +Replace the usb_match_id() call by usb_match_id_one(). + +Thanks to Paulo Assis for diagnosing the bug and providing an initial +fix. + +Signed-off-by: Laurent Pinchart +Signed-off-by: Mauro Carvalho Chehab +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/media/video/uvc/uvc_ctrl.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/media/video/uvc/uvc_ctrl.c ++++ b/drivers/media/video/uvc/uvc_ctrl.c +@@ -1405,7 +1405,7 @@ uvc_ctrl_prune_entity(struct uvc_device + size = entity->processing.bControlSize; + + for (i = 0; i < ARRAY_SIZE(blacklist); ++i) { +- if (!usb_match_id(dev->intf, &blacklist[i].id)) ++ if (!usb_match_one_id(dev->intf, &blacklist[i].id)) + continue; + + if (blacklist[i].index >= 8 * size ||