diff options
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/ata/Kconfig | 2 | ||||
| -rw-r--r-- | drivers/ata/ahci.c | 8 | ||||
| -rw-r--r-- | drivers/ata/ahci.h | 1 | ||||
| -rw-r--r-- | drivers/ata/ata_piix.c | 8 | ||||
| -rw-r--r-- | drivers/ata/libahci.c | 3 | ||||
| -rw-r--r-- | drivers/ata/libata-acpi.c | 15 | ||||
| -rw-r--r-- | drivers/ata/libata-core.c | 3 | ||||
| -rw-r--r-- | drivers/ata/pata_atiixp.c | 16 | ||||
| -rw-r--r-- | drivers/block/drbd/drbd_bitmap.c | 15 | ||||
| -rw-r--r-- | drivers/block/drbd/drbd_int.h | 1 | ||||
| -rw-r--r-- | drivers/block/drbd/drbd_main.c | 28 | ||||
| -rw-r--r-- | drivers/block/drbd/drbd_nl.c | 4 | ||||
| -rw-r--r-- | drivers/block/drbd/drbd_req.c | 36 | ||||
| -rw-r--r-- | drivers/cpufreq/omap-cpufreq.c | 4 | ||||
| -rw-r--r-- | drivers/crypto/caam/jr.c | 10 | ||||
| -rw-r--r-- | drivers/crypto/hifn_795x.c | 4 | ||||
| -rw-r--r-- | drivers/hid/hid-core.c | 1 | ||||
| -rw-r--r-- | drivers/ide/ide-pm.c | 4 | ||||
| -rw-r--r-- | drivers/rtc/rtc-at91sam9.c | 22 | ||||
| -rw-r--r-- | drivers/spi/spi-bcm63xx.c | 31 | ||||
| -rw-r--r-- | drivers/watchdog/booke_wdt.c | 7 | ||||
| -rw-r--r-- | drivers/xen/platform-pci.c | 15 |
22 files changed, 159 insertions, 79 deletions
diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig index 2be8ef1d3093..27cecd313e75 100644 --- a/drivers/ata/Kconfig +++ b/drivers/ata/Kconfig | |||
| @@ -115,7 +115,7 @@ config SATA_SIL24 | |||
| 115 | If unsure, say N. | 115 | If unsure, say N. |
| 116 | 116 | ||
| 117 | config ATA_SFF | 117 | config ATA_SFF |
| 118 | bool "ATA SFF support" | 118 | bool "ATA SFF support (for legacy IDE and PATA)" |
| 119 | default y | 119 | default y |
| 120 | help | 120 | help |
| 121 | This option adds support for ATA controllers with SFF | 121 | This option adds support for ATA controllers with SFF |
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index 062e6a1a248f..50d5dea0ff59 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c | |||
| @@ -256,6 +256,14 @@ static const struct pci_device_id ahci_pci_tbl[] = { | |||
| 256 | { PCI_VDEVICE(INTEL, 0x8c07), board_ahci }, /* Lynx Point RAID */ | 256 | { PCI_VDEVICE(INTEL, 0x8c07), board_ahci }, /* Lynx Point RAID */ |
| 257 | { PCI_VDEVICE(INTEL, 0x8c0e), board_ahci }, /* Lynx Point RAID */ | 257 | { PCI_VDEVICE(INTEL, 0x8c0e), board_ahci }, /* Lynx Point RAID */ |
| 258 | { PCI_VDEVICE(INTEL, 0x8c0f), board_ahci }, /* Lynx Point RAID */ | 258 | { PCI_VDEVICE(INTEL, 0x8c0f), board_ahci }, /* Lynx Point RAID */ |
| 259 | { PCI_VDEVICE(INTEL, 0x9c02), board_ahci }, /* Lynx Point-LP AHCI */ | ||
| 260 | { PCI_VDEVICE(INTEL, 0x9c03), board_ahci }, /* Lynx Point-LP AHCI */ | ||
| 261 | { PCI_VDEVICE(INTEL, 0x9c04), board_ahci }, /* Lynx Point-LP RAID */ | ||
| 262 | { PCI_VDEVICE(INTEL, 0x9c05), board_ahci }, /* Lynx Point-LP RAID */ | ||
| 263 | { PCI_VDEVICE(INTEL, 0x9c06), board_ahci }, /* Lynx Point-LP RAID */ | ||
| 264 | { PCI_VDEVICE(INTEL, 0x9c07), board_ahci }, /* Lynx Point-LP RAID */ | ||
| 265 | { PCI_VDEVICE(INTEL, 0x9c0e), board_ahci }, /* Lynx Point-LP RAID */ | ||
| 266 | { PCI_VDEVICE(INTEL, 0x9c0f), board_ahci }, /* Lynx Point-LP RAID */ | ||
| 259 | 267 | ||
| 260 | /* JMicron 360/1/3/5/6, match class to avoid IDE function */ | 268 | /* JMicron 360/1/3/5/6, match class to avoid IDE function */ |
| 261 | { PCI_VENDOR_ID_JMICRON, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, | 269 | { PCI_VENDOR_ID_JMICRON, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, |
diff --git a/drivers/ata/ahci.h b/drivers/ata/ahci.h index c2594ddf25b0..57eb1c212a4c 100644 --- a/drivers/ata/ahci.h +++ b/drivers/ata/ahci.h | |||
| @@ -320,6 +320,7 @@ extern struct device_attribute *ahci_sdev_attrs[]; | |||
| 320 | extern struct ata_port_operations ahci_ops; | 320 | extern struct ata_port_operations ahci_ops; |
| 321 | extern struct ata_port_operations ahci_pmp_retry_srst_ops; | 321 | extern struct ata_port_operations ahci_pmp_retry_srst_ops; |
| 322 | 322 | ||
| 323 | unsigned int ahci_dev_classify(struct ata_port *ap); | ||
| 323 | void ahci_fill_cmd_slot(struct ahci_port_priv *pp, unsigned int tag, | 324 | void ahci_fill_cmd_slot(struct ahci_port_priv *pp, unsigned int tag, |
| 324 | u32 opts); | 325 | u32 opts); |
| 325 | void ahci_save_initial_config(struct device *dev, | 326 | void ahci_save_initial_config(struct device *dev, |
diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c index 3c809bfbccf5..ef773e12af79 100644 --- a/drivers/ata/ata_piix.c +++ b/drivers/ata/ata_piix.c | |||
| @@ -329,6 +329,14 @@ static const struct pci_device_id piix_pci_tbl[] = { | |||
| 329 | { 0x8086, 0x8c08, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata }, | 329 | { 0x8086, 0x8c08, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata }, |
| 330 | /* SATA Controller IDE (Lynx Point) */ | 330 | /* SATA Controller IDE (Lynx Point) */ |
| 331 | { 0x8086, 0x8c09, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata }, | 331 | { 0x8086, 0x8c09, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata }, |
| 332 | /* SATA Controller IDE (Lynx Point-LP) */ | ||
| 333 | { 0x8086, 0x9c00, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_snb }, | ||
| 334 | /* SATA Controller IDE (Lynx Point-LP) */ | ||
| 335 | { 0x8086, 0x9c01, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_snb }, | ||
| 336 | /* SATA Controller IDE (Lynx Point-LP) */ | ||
| 337 | { 0x8086, 0x9c08, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata }, | ||
| 338 | /* SATA Controller IDE (Lynx Point-LP) */ | ||
| 339 | { 0x8086, 0x9c09, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata }, | ||
| 332 | /* SATA Controller IDE (DH89xxCC) */ | 340 | /* SATA Controller IDE (DH89xxCC) */ |
| 333 | { 0x8086, 0x2326, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata }, | 341 | { 0x8086, 0x2326, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata }, |
| 334 | { } /* terminate list */ | 342 | { } /* terminate list */ |
diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c index f9eaa82311a9..555c07afa05b 100644 --- a/drivers/ata/libahci.c +++ b/drivers/ata/libahci.c | |||
| @@ -1139,7 +1139,7 @@ static void ahci_dev_config(struct ata_device *dev) | |||
| 1139 | } | 1139 | } |
| 1140 | } | 1140 | } |
| 1141 | 1141 | ||
| 1142 | static unsigned int ahci_dev_classify(struct ata_port *ap) | 1142 | unsigned int ahci_dev_classify(struct ata_port *ap) |
| 1143 | { | 1143 | { |
| 1144 | void __iomem *port_mmio = ahci_port_base(ap); | 1144 | void __iomem *port_mmio = ahci_port_base(ap); |
| 1145 | struct ata_taskfile tf; | 1145 | struct ata_taskfile tf; |
| @@ -1153,6 +1153,7 @@ static unsigned int ahci_dev_classify(struct ata_port *ap) | |||
| 1153 | 1153 | ||
| 1154 | return ata_dev_classify(&tf); | 1154 | return ata_dev_classify(&tf); |
| 1155 | } | 1155 | } |
| 1156 | EXPORT_SYMBOL_GPL(ahci_dev_classify); | ||
| 1156 | 1157 | ||
| 1157 | void ahci_fill_cmd_slot(struct ahci_port_priv *pp, unsigned int tag, | 1158 | void ahci_fill_cmd_slot(struct ahci_port_priv *pp, unsigned int tag, |
| 1158 | u32 opts) | 1159 | u32 opts) |
diff --git a/drivers/ata/libata-acpi.c b/drivers/ata/libata-acpi.c index 902b5a457170..fd9ecf74e631 100644 --- a/drivers/ata/libata-acpi.c +++ b/drivers/ata/libata-acpi.c | |||
| @@ -60,17 +60,7 @@ acpi_handle ata_ap_acpi_handle(struct ata_port *ap) | |||
| 60 | if (ap->flags & ATA_FLAG_ACPI_SATA) | 60 | if (ap->flags & ATA_FLAG_ACPI_SATA) |
| 61 | return NULL; | 61 | return NULL; |
| 62 | 62 | ||
| 63 | /* | 63 | return acpi_get_child(DEVICE_ACPI_HANDLE(ap->host->dev), ap->port_no); |
| 64 | * If acpi bind operation has already happened, we can get the handle | ||
| 65 | * for the port by checking the corresponding scsi_host device's | ||
| 66 | * firmware node, otherwise we will need to find out the handle from | ||
| 67 | * its parent's acpi node. | ||
| 68 | */ | ||
| 69 | if (ap->scsi_host) | ||
| 70 | return DEVICE_ACPI_HANDLE(&ap->scsi_host->shost_gendev); | ||
| 71 | else | ||
| 72 | return acpi_get_child(DEVICE_ACPI_HANDLE(ap->host->dev), | ||
| 73 | ap->port_no); | ||
| 74 | } | 64 | } |
| 75 | EXPORT_SYMBOL(ata_ap_acpi_handle); | 65 | EXPORT_SYMBOL(ata_ap_acpi_handle); |
| 76 | 66 | ||
| @@ -1101,6 +1091,9 @@ static int ata_acpi_bind_host(struct ata_port *ap, acpi_handle *handle) | |||
| 1101 | if (!*handle) | 1091 | if (!*handle) |
| 1102 | return -ENODEV; | 1092 | return -ENODEV; |
| 1103 | 1093 | ||
| 1094 | if (ata_acpi_gtm(ap, &ap->__acpi_init_gtm) == 0) | ||
| 1095 | ap->pflags |= ATA_PFLAG_INIT_GTM_VALID; | ||
| 1096 | |||
| 1104 | return 0; | 1097 | return 0; |
| 1105 | } | 1098 | } |
| 1106 | 1099 | ||
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index fadd5866d40f..8e1039c8e159 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c | |||
| @@ -4062,7 +4062,7 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = { | |||
| 4062 | { "_NEC DV5800A", NULL, ATA_HORKAGE_NODMA }, | 4062 | { "_NEC DV5800A", NULL, ATA_HORKAGE_NODMA }, |
| 4063 | { "SAMSUNG CD-ROM SN-124", "N001", ATA_HORKAGE_NODMA }, | 4063 | { "SAMSUNG CD-ROM SN-124", "N001", ATA_HORKAGE_NODMA }, |
| 4064 | { "Seagate STT20000A", NULL, ATA_HORKAGE_NODMA }, | 4064 | { "Seagate STT20000A", NULL, ATA_HORKAGE_NODMA }, |
| 4065 | { "2GB ATA Flash Disk", "ADMA428M", ATA_HORKAGE_NODMA }, | 4065 | { " 2GB ATA Flash Disk", "ADMA428M", ATA_HORKAGE_NODMA }, |
| 4066 | /* Odd clown on sil3726/4726 PMPs */ | 4066 | /* Odd clown on sil3726/4726 PMPs */ |
| 4067 | { "Config Disk", NULL, ATA_HORKAGE_DISABLE }, | 4067 | { "Config Disk", NULL, ATA_HORKAGE_DISABLE }, |
| 4068 | 4068 | ||
| @@ -4128,6 +4128,7 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = { | |||
| 4128 | 4128 | ||
| 4129 | /* Devices that do not need bridging limits applied */ | 4129 | /* Devices that do not need bridging limits applied */ |
| 4130 | { "MTRON MSP-SATA*", NULL, ATA_HORKAGE_BRIDGE_OK, }, | 4130 | { "MTRON MSP-SATA*", NULL, ATA_HORKAGE_BRIDGE_OK, }, |
| 4131 | { "BUFFALO HD-QSU2/R5", NULL, ATA_HORKAGE_BRIDGE_OK, }, | ||
| 4131 | 4132 | ||
| 4132 | /* Devices which aren't very happy with higher link speeds */ | 4133 | /* Devices which aren't very happy with higher link speeds */ |
| 4133 | { "WD My Book", NULL, ATA_HORKAGE_1_5_GBPS, }, | 4134 | { "WD My Book", NULL, ATA_HORKAGE_1_5_GBPS, }, |
diff --git a/drivers/ata/pata_atiixp.c b/drivers/ata/pata_atiixp.c index 361c75cea57b..24e51056ac26 100644 --- a/drivers/ata/pata_atiixp.c +++ b/drivers/ata/pata_atiixp.c | |||
| @@ -20,6 +20,7 @@ | |||
| 20 | #include <linux/delay.h> | 20 | #include <linux/delay.h> |
| 21 | #include <scsi/scsi_host.h> | 21 | #include <scsi/scsi_host.h> |
| 22 | #include <linux/libata.h> | 22 | #include <linux/libata.h> |
| 23 | #include <linux/dmi.h> | ||
| 23 | 24 | ||
| 24 | #define DRV_NAME "pata_atiixp" | 25 | #define DRV_NAME "pata_atiixp" |
| 25 | #define DRV_VERSION "0.4.6" | 26 | #define DRV_VERSION "0.4.6" |
| @@ -33,11 +34,26 @@ enum { | |||
| 33 | ATIIXP_IDE_UDMA_MODE = 0x56 | 34 | ATIIXP_IDE_UDMA_MODE = 0x56 |
| 34 | }; | 35 | }; |
| 35 | 36 | ||
| 37 | static const struct dmi_system_id attixp_cable_override_dmi_table[] = { | ||
| 38 | { | ||
| 39 | /* Board has onboard PATA<->SATA converters */ | ||
| 40 | .ident = "MSI E350DM-E33", | ||
| 41 | .matches = { | ||
| 42 | DMI_MATCH(DMI_BOARD_VENDOR, "MSI"), | ||
| 43 | DMI_MATCH(DMI_BOARD_NAME, "E350DM-E33(MS-7720)"), | ||
| 44 | }, | ||
| 45 | }, | ||
| 46 | { } | ||
| 47 | }; | ||
| 48 | |||
| 36 | static int atiixp_cable_detect(struct ata_port *ap) | 49 | static int atiixp_cable_detect(struct ata_port *ap) |
| 37 | { | 50 | { |
| 38 | struct pci_dev *pdev = to_pci_dev(ap->host->dev); | 51 | struct pci_dev *pdev = to_pci_dev(ap->host->dev); |
| 39 | u8 udma; | 52 | u8 udma; |
| 40 | 53 | ||
| 54 | if (dmi_check_system(attixp_cable_override_dmi_table)) | ||
| 55 | return ATA_CBL_PATA40_SHORT; | ||
| 56 | |||
| 41 | /* Hack from drivers/ide/pci. Really we want to know how to do the | 57 | /* Hack from drivers/ide/pci. Really we want to know how to do the |
| 42 | raw detection not play follow the bios mode guess */ | 58 | raw detection not play follow the bios mode guess */ |
| 43 | pci_read_config_byte(pdev, ATIIXP_IDE_UDMA_MODE + ap->port_no, &udma); | 59 | pci_read_config_byte(pdev, ATIIXP_IDE_UDMA_MODE + ap->port_no, &udma); |
diff --git a/drivers/block/drbd/drbd_bitmap.c b/drivers/block/drbd/drbd_bitmap.c index ba91b408abad..d84566496746 100644 --- a/drivers/block/drbd/drbd_bitmap.c +++ b/drivers/block/drbd/drbd_bitmap.c | |||
| @@ -889,6 +889,7 @@ struct bm_aio_ctx { | |||
| 889 | unsigned int done; | 889 | unsigned int done; |
| 890 | unsigned flags; | 890 | unsigned flags; |
| 891 | #define BM_AIO_COPY_PAGES 1 | 891 | #define BM_AIO_COPY_PAGES 1 |
| 892 | #define BM_WRITE_ALL_PAGES 2 | ||
| 892 | int error; | 893 | int error; |
| 893 | struct kref kref; | 894 | struct kref kref; |
| 894 | }; | 895 | }; |
| @@ -1059,7 +1060,8 @@ static int bm_rw(struct drbd_conf *mdev, int rw, unsigned flags, unsigned lazy_w | |||
| 1059 | if (lazy_writeout_upper_idx && i == lazy_writeout_upper_idx) | 1060 | if (lazy_writeout_upper_idx && i == lazy_writeout_upper_idx) |
| 1060 | break; | 1061 | break; |
| 1061 | if (rw & WRITE) { | 1062 | if (rw & WRITE) { |
| 1062 | if (bm_test_page_unchanged(b->bm_pages[i])) { | 1063 | if (!(flags & BM_WRITE_ALL_PAGES) && |
| 1064 | bm_test_page_unchanged(b->bm_pages[i])) { | ||
| 1063 | dynamic_dev_dbg(DEV, "skipped bm write for idx %u\n", i); | 1065 | dynamic_dev_dbg(DEV, "skipped bm write for idx %u\n", i); |
| 1064 | continue; | 1066 | continue; |
| 1065 | } | 1067 | } |
| @@ -1141,6 +1143,17 @@ int drbd_bm_write(struct drbd_conf *mdev) __must_hold(local) | |||
| 1141 | } | 1143 | } |
| 1142 | 1144 | ||
| 1143 | /** | 1145 | /** |
| 1146 | * drbd_bm_write_all() - Write the whole bitmap to its on disk location. | ||
| 1147 | * @mdev: DRBD device. | ||
| 1148 | * | ||
| 1149 | * Will write all pages. | ||
| 1150 | */ | ||
| 1151 | int drbd_bm_write_all(struct drbd_conf *mdev) __must_hold(local) | ||
| 1152 | { | ||
| 1153 | return bm_rw(mdev, WRITE, BM_WRITE_ALL_PAGES, 0); | ||
| 1154 | } | ||
| 1155 | |||
| 1156 | /** | ||
| 1144 | * drbd_bm_lazy_write_out() - Write bitmap pages 0 to @upper_idx-1, if they have changed. | 1157 | * drbd_bm_lazy_write_out() - Write bitmap pages 0 to @upper_idx-1, if they have changed. |
| 1145 | * @mdev: DRBD device. | 1158 | * @mdev: DRBD device. |
| 1146 | * @upper_idx: 0: write all changed pages; +ve: page index to stop scanning for changed pages | 1159 | * @upper_idx: 0: write all changed pages; +ve: page index to stop scanning for changed pages |
diff --git a/drivers/block/drbd/drbd_int.h b/drivers/block/drbd/drbd_int.h index b2ca143d0053..b953cc7c9c00 100644 --- a/drivers/block/drbd/drbd_int.h +++ b/drivers/block/drbd/drbd_int.h | |||
| @@ -1469,6 +1469,7 @@ extern int drbd_bm_e_weight(struct drbd_conf *mdev, unsigned long enr); | |||
| 1469 | extern int drbd_bm_write_page(struct drbd_conf *mdev, unsigned int idx) __must_hold(local); | 1469 | extern int drbd_bm_write_page(struct drbd_conf *mdev, unsigned int idx) __must_hold(local); |
| 1470 | extern int drbd_bm_read(struct drbd_conf *mdev) __must_hold(local); | 1470 | extern int drbd_bm_read(struct drbd_conf *mdev) __must_hold(local); |
| 1471 | extern int drbd_bm_write(struct drbd_conf *mdev) __must_hold(local); | 1471 | extern int drbd_bm_write(struct drbd_conf *mdev) __must_hold(local); |
| 1472 | extern int drbd_bm_write_all(struct drbd_conf *mdev) __must_hold(local); | ||
| 1472 | extern int drbd_bm_write_copy_pages(struct drbd_conf *mdev) __must_hold(local); | 1473 | extern int drbd_bm_write_copy_pages(struct drbd_conf *mdev) __must_hold(local); |
| 1473 | extern unsigned long drbd_bm_ALe_set_all(struct drbd_conf *mdev, | 1474 | extern unsigned long drbd_bm_ALe_set_all(struct drbd_conf *mdev, |
| 1474 | unsigned long al_enr); | 1475 | unsigned long al_enr); |
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c index dbe6135a2abe..f93a0320e952 100644 --- a/drivers/block/drbd/drbd_main.c +++ b/drivers/block/drbd/drbd_main.c | |||
| @@ -79,6 +79,7 @@ static int w_md_sync(struct drbd_conf *mdev, struct drbd_work *w, int unused); | |||
| 79 | static void md_sync_timer_fn(unsigned long data); | 79 | static void md_sync_timer_fn(unsigned long data); |
| 80 | static int w_bitmap_io(struct drbd_conf *mdev, struct drbd_work *w, int unused); | 80 | static int w_bitmap_io(struct drbd_conf *mdev, struct drbd_work *w, int unused); |
| 81 | static int w_go_diskless(struct drbd_conf *mdev, struct drbd_work *w, int unused); | 81 | static int w_go_diskless(struct drbd_conf *mdev, struct drbd_work *w, int unused); |
| 82 | static void _tl_clear(struct drbd_conf *mdev); | ||
| 82 | 83 | ||
| 83 | MODULE_AUTHOR("Philipp Reisner <phil@linbit.com>, " | 84 | MODULE_AUTHOR("Philipp Reisner <phil@linbit.com>, " |
| 84 | "Lars Ellenberg <lars@linbit.com>"); | 85 | "Lars Ellenberg <lars@linbit.com>"); |
| @@ -432,19 +433,10 @@ static void _tl_restart(struct drbd_conf *mdev, enum drbd_req_event what) | |||
| 432 | 433 | ||
| 433 | /* Actions operating on the disk state, also want to work on | 434 | /* Actions operating on the disk state, also want to work on |
| 434 | requests that got barrier acked. */ | 435 | requests that got barrier acked. */ |
| 435 | switch (what) { | ||
| 436 | case fail_frozen_disk_io: | ||
| 437 | case restart_frozen_disk_io: | ||
| 438 | list_for_each_safe(le, tle, &mdev->barrier_acked_requests) { | ||
| 439 | req = list_entry(le, struct drbd_request, tl_requests); | ||
| 440 | _req_mod(req, what); | ||
| 441 | } | ||
| 442 | 436 | ||
| 443 | case connection_lost_while_pending: | 437 | list_for_each_safe(le, tle, &mdev->barrier_acked_requests) { |
| 444 | case resend: | 438 | req = list_entry(le, struct drbd_request, tl_requests); |
| 445 | break; | 439 | _req_mod(req, what); |
| 446 | default: | ||
| 447 | dev_err(DEV, "what = %d in _tl_restart()\n", what); | ||
| 448 | } | 440 | } |
| 449 | } | 441 | } |
| 450 | 442 | ||
| @@ -459,11 +451,16 @@ static void _tl_restart(struct drbd_conf *mdev, enum drbd_req_event what) | |||
| 459 | */ | 451 | */ |
| 460 | void tl_clear(struct drbd_conf *mdev) | 452 | void tl_clear(struct drbd_conf *mdev) |
| 461 | { | 453 | { |
| 454 | spin_lock_irq(&mdev->req_lock); | ||
| 455 | _tl_clear(mdev); | ||
| 456 | spin_unlock_irq(&mdev->req_lock); | ||
| 457 | } | ||
| 458 | |||
| 459 | static void _tl_clear(struct drbd_conf *mdev) | ||
| 460 | { | ||
| 462 | struct list_head *le, *tle; | 461 | struct list_head *le, *tle; |
| 463 | struct drbd_request *r; | 462 | struct drbd_request *r; |
| 464 | 463 | ||
| 465 | spin_lock_irq(&mdev->req_lock); | ||
| 466 | |||
| 467 | _tl_restart(mdev, connection_lost_while_pending); | 464 | _tl_restart(mdev, connection_lost_while_pending); |
| 468 | 465 | ||
| 469 | /* we expect this list to be empty. */ | 466 | /* we expect this list to be empty. */ |
| @@ -482,7 +479,6 @@ void tl_clear(struct drbd_conf *mdev) | |||
| 482 | 479 | ||
| 483 | memset(mdev->app_reads_hash, 0, APP_R_HSIZE*sizeof(void *)); | 480 | memset(mdev->app_reads_hash, 0, APP_R_HSIZE*sizeof(void *)); |
| 484 | 481 | ||
| 485 | spin_unlock_irq(&mdev->req_lock); | ||
| 486 | } | 482 | } |
| 487 | 483 | ||
| 488 | void tl_restart(struct drbd_conf *mdev, enum drbd_req_event what) | 484 | void tl_restart(struct drbd_conf *mdev, enum drbd_req_event what) |
| @@ -1476,12 +1472,12 @@ static void after_state_ch(struct drbd_conf *mdev, union drbd_state os, | |||
| 1476 | if (ns.susp_fen) { | 1472 | if (ns.susp_fen) { |
| 1477 | /* case1: The outdate peer handler is successful: */ | 1473 | /* case1: The outdate peer handler is successful: */ |
| 1478 | if (os.pdsk > D_OUTDATED && ns.pdsk <= D_OUTDATED) { | 1474 | if (os.pdsk > D_OUTDATED && ns.pdsk <= D_OUTDATED) { |
| 1479 | tl_clear(mdev); | ||
| 1480 | if (test_bit(NEW_CUR_UUID, &mdev->flags)) { | 1475 | if (test_bit(NEW_CUR_UUID, &mdev->flags)) { |
| 1481 | drbd_uuid_new_current(mdev); | 1476 | drbd_uuid_new_current(mdev); |
| 1482 | clear_bit(NEW_CUR_UUID, &mdev->flags); | 1477 | clear_bit(NEW_CUR_UUID, &mdev->flags); |
| 1483 | } | 1478 | } |
| 1484 | spin_lock_irq(&mdev->req_lock); | 1479 | spin_lock_irq(&mdev->req_lock); |
| 1480 | _tl_clear(mdev); | ||
| 1485 | _drbd_set_state(_NS(mdev, susp_fen, 0), CS_VERBOSE, NULL); | 1481 | _drbd_set_state(_NS(mdev, susp_fen, 0), CS_VERBOSE, NULL); |
| 1486 | spin_unlock_irq(&mdev->req_lock); | 1482 | spin_unlock_irq(&mdev->req_lock); |
| 1487 | } | 1483 | } |
diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c index fb9dce8daa24..edb490aad8b4 100644 --- a/drivers/block/drbd/drbd_nl.c +++ b/drivers/block/drbd/drbd_nl.c | |||
| @@ -674,8 +674,8 @@ enum determine_dev_size drbd_determine_dev_size(struct drbd_conf *mdev, enum dds | |||
| 674 | la_size_changed && md_moved ? "size changed and md moved" : | 674 | la_size_changed && md_moved ? "size changed and md moved" : |
| 675 | la_size_changed ? "size changed" : "md moved"); | 675 | la_size_changed ? "size changed" : "md moved"); |
| 676 | /* next line implicitly does drbd_suspend_io()+drbd_resume_io() */ | 676 | /* next line implicitly does drbd_suspend_io()+drbd_resume_io() */ |
| 677 | err = drbd_bitmap_io(mdev, &drbd_bm_write, | 677 | err = drbd_bitmap_io(mdev, md_moved ? &drbd_bm_write_all : &drbd_bm_write, |
| 678 | "size changed", BM_LOCKED_MASK); | 678 | "size changed", BM_LOCKED_MASK); |
| 679 | if (err) { | 679 | if (err) { |
| 680 | rv = dev_size_error; | 680 | rv = dev_size_error; |
| 681 | goto out; | 681 | goto out; |
diff --git a/drivers/block/drbd/drbd_req.c b/drivers/block/drbd/drbd_req.c index 910335c30927..01b2ac641c7b 100644 --- a/drivers/block/drbd/drbd_req.c +++ b/drivers/block/drbd/drbd_req.c | |||
| @@ -695,6 +695,12 @@ int __req_mod(struct drbd_request *req, enum drbd_req_event what, | |||
| 695 | break; | 695 | break; |
| 696 | 696 | ||
| 697 | case resend: | 697 | case resend: |
| 698 | /* Simply complete (local only) READs. */ | ||
| 699 | if (!(req->rq_state & RQ_WRITE) && !req->w.cb) { | ||
| 700 | _req_may_be_done(req, m); | ||
| 701 | break; | ||
| 702 | } | ||
| 703 | |||
| 698 | /* If RQ_NET_OK is already set, we got a P_WRITE_ACK or P_RECV_ACK | 704 | /* If RQ_NET_OK is already set, we got a P_WRITE_ACK or P_RECV_ACK |
| 699 | before the connection loss (B&C only); only P_BARRIER_ACK was missing. | 705 | before the connection loss (B&C only); only P_BARRIER_ACK was missing. |
| 700 | Trowing them out of the TL here by pretending we got a BARRIER_ACK | 706 | Trowing them out of the TL here by pretending we got a BARRIER_ACK |
| @@ -834,7 +840,15 @@ static int drbd_make_request_common(struct drbd_conf *mdev, struct bio *bio, uns | |||
| 834 | req->private_bio = NULL; | 840 | req->private_bio = NULL; |
| 835 | } | 841 | } |
| 836 | if (rw == WRITE) { | 842 | if (rw == WRITE) { |
| 837 | remote = 1; | 843 | /* Need to replicate writes. Unless it is an empty flush, |
| 844 | * which is better mapped to a DRBD P_BARRIER packet, | ||
| 845 | * also for drbd wire protocol compatibility reasons. */ | ||
| 846 | if (unlikely(size == 0)) { | ||
| 847 | /* The only size==0 bios we expect are empty flushes. */ | ||
| 848 | D_ASSERT(bio->bi_rw & REQ_FLUSH); | ||
| 849 | remote = 0; | ||
| 850 | } else | ||
| 851 | remote = 1; | ||
| 838 | } else { | 852 | } else { |
| 839 | /* READ || READA */ | 853 | /* READ || READA */ |
| 840 | if (local) { | 854 | if (local) { |
| @@ -870,8 +884,11 @@ static int drbd_make_request_common(struct drbd_conf *mdev, struct bio *bio, uns | |||
| 870 | * extent. This waits for any resync activity in the corresponding | 884 | * extent. This waits for any resync activity in the corresponding |
| 871 | * resync extent to finish, and, if necessary, pulls in the target | 885 | * resync extent to finish, and, if necessary, pulls in the target |
| 872 | * extent into the activity log, which involves further disk io because | 886 | * extent into the activity log, which involves further disk io because |
| 873 | * of transactional on-disk meta data updates. */ | 887 | * of transactional on-disk meta data updates. |
| 874 | if (rw == WRITE && local && !test_bit(AL_SUSPENDED, &mdev->flags)) { | 888 | * Empty flushes don't need to go into the activity log, they can only |
| 889 | * flush data for pending writes which are already in there. */ | ||
| 890 | if (rw == WRITE && local && size | ||
| 891 | && !test_bit(AL_SUSPENDED, &mdev->flags)) { | ||
| 875 | req->rq_state |= RQ_IN_ACT_LOG; | 892 | req->rq_state |= RQ_IN_ACT_LOG; |
| 876 | drbd_al_begin_io(mdev, sector); | 893 | drbd_al_begin_io(mdev, sector); |
| 877 | } | 894 | } |
| @@ -994,7 +1011,10 @@ allocate_barrier: | |||
| 994 | if (rw == WRITE && _req_conflicts(req)) | 1011 | if (rw == WRITE && _req_conflicts(req)) |
| 995 | goto fail_conflicting; | 1012 | goto fail_conflicting; |
| 996 | 1013 | ||
| 997 | list_add_tail(&req->tl_requests, &mdev->newest_tle->requests); | 1014 | /* no point in adding empty flushes to the transfer log, |
| 1015 | * they are mapped to drbd barriers already. */ | ||
| 1016 | if (likely(size!=0)) | ||
| 1017 | list_add_tail(&req->tl_requests, &mdev->newest_tle->requests); | ||
| 998 | 1018 | ||
| 999 | /* NOTE remote first: to get the concurrent write detection right, | 1019 | /* NOTE remote first: to get the concurrent write detection right, |
| 1000 | * we must register the request before start of local IO. */ | 1020 | * we must register the request before start of local IO. */ |
| @@ -1014,6 +1034,14 @@ allocate_barrier: | |||
| 1014 | mdev->net_conf->on_congestion != OC_BLOCK && mdev->agreed_pro_version >= 96) | 1034 | mdev->net_conf->on_congestion != OC_BLOCK && mdev->agreed_pro_version >= 96) |
| 1015 | maybe_pull_ahead(mdev); | 1035 | maybe_pull_ahead(mdev); |
| 1016 | 1036 | ||
| 1037 | /* If this was a flush, queue a drbd barrier/start a new epoch. | ||
| 1038 | * Unless the current epoch was empty anyways, or we are not currently | ||
| 1039 | * replicating, in which case there is no point. */ | ||
| 1040 | if (unlikely(bio->bi_rw & REQ_FLUSH) | ||
| 1041 | && mdev->newest_tle->n_writes | ||
| 1042 | && drbd_should_do_remote(mdev->state)) | ||
| 1043 | queue_barrier(mdev); | ||
| 1044 | |||
| 1017 | spin_unlock_irq(&mdev->req_lock); | 1045 | spin_unlock_irq(&mdev->req_lock); |
| 1018 | kfree(b); /* if someone else has beaten us to it... */ | 1046 | kfree(b); /* if someone else has beaten us to it... */ |
| 1019 | 1047 | ||
diff --git a/drivers/cpufreq/omap-cpufreq.c b/drivers/cpufreq/omap-cpufreq.c index 17fa04d08be9..b47034e650a5 100644 --- a/drivers/cpufreq/omap-cpufreq.c +++ b/drivers/cpufreq/omap-cpufreq.c | |||
| @@ -218,7 +218,7 @@ static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy) | |||
| 218 | 218 | ||
| 219 | policy->cur = policy->min = policy->max = omap_getspeed(policy->cpu); | 219 | policy->cur = policy->min = policy->max = omap_getspeed(policy->cpu); |
| 220 | 220 | ||
| 221 | if (atomic_inc_return(&freq_table_users) == 1) | 221 | if (!freq_table) |
| 222 | result = opp_init_cpufreq_table(mpu_dev, &freq_table); | 222 | result = opp_init_cpufreq_table(mpu_dev, &freq_table); |
| 223 | 223 | ||
| 224 | if (result) { | 224 | if (result) { |
| @@ -227,6 +227,8 @@ static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy) | |||
| 227 | goto fail_ck; | 227 | goto fail_ck; |
| 228 | } | 228 | } |
| 229 | 229 | ||
| 230 | atomic_inc_return(&freq_table_users); | ||
| 231 | |||
| 230 | result = cpufreq_frequency_table_cpuinfo(policy, freq_table); | 232 | result = cpufreq_frequency_table_cpuinfo(policy, freq_table); |
| 231 | if (result) | 233 | if (result) |
| 232 | goto fail_table; | 234 | goto fail_table; |
diff --git a/drivers/crypto/caam/jr.c b/drivers/crypto/caam/jr.c index 53c8c51d5881..93d14070141a 100644 --- a/drivers/crypto/caam/jr.c +++ b/drivers/crypto/caam/jr.c | |||
| @@ -63,7 +63,7 @@ static void caam_jr_dequeue(unsigned long devarg) | |||
| 63 | 63 | ||
| 64 | head = ACCESS_ONCE(jrp->head); | 64 | head = ACCESS_ONCE(jrp->head); |
| 65 | 65 | ||
| 66 | spin_lock_bh(&jrp->outlock); | 66 | spin_lock(&jrp->outlock); |
| 67 | 67 | ||
| 68 | sw_idx = tail = jrp->tail; | 68 | sw_idx = tail = jrp->tail; |
| 69 | hw_idx = jrp->out_ring_read_index; | 69 | hw_idx = jrp->out_ring_read_index; |
| @@ -115,7 +115,7 @@ static void caam_jr_dequeue(unsigned long devarg) | |||
| 115 | jrp->tail = tail; | 115 | jrp->tail = tail; |
| 116 | } | 116 | } |
| 117 | 117 | ||
| 118 | spin_unlock_bh(&jrp->outlock); | 118 | spin_unlock(&jrp->outlock); |
| 119 | 119 | ||
| 120 | /* Finally, execute user's callback */ | 120 | /* Finally, execute user's callback */ |
| 121 | usercall(dev, userdesc, userstatus, userarg); | 121 | usercall(dev, userdesc, userstatus, userarg); |
| @@ -236,14 +236,14 @@ int caam_jr_enqueue(struct device *dev, u32 *desc, | |||
| 236 | return -EIO; | 236 | return -EIO; |
| 237 | } | 237 | } |
| 238 | 238 | ||
| 239 | spin_lock(&jrp->inplock); | 239 | spin_lock_bh(&jrp->inplock); |
| 240 | 240 | ||
| 241 | head = jrp->head; | 241 | head = jrp->head; |
| 242 | tail = ACCESS_ONCE(jrp->tail); | 242 | tail = ACCESS_ONCE(jrp->tail); |
| 243 | 243 | ||
| 244 | if (!rd_reg32(&jrp->rregs->inpring_avail) || | 244 | if (!rd_reg32(&jrp->rregs->inpring_avail) || |
| 245 | CIRC_SPACE(head, tail, JOBR_DEPTH) <= 0) { | 245 | CIRC_SPACE(head, tail, JOBR_DEPTH) <= 0) { |
| 246 | spin_unlock(&jrp->inplock); | 246 | spin_unlock_bh(&jrp->inplock); |
| 247 | dma_unmap_single(dev, desc_dma, desc_size, DMA_TO_DEVICE); | 247 | dma_unmap_single(dev, desc_dma, desc_size, DMA_TO_DEVICE); |
| 248 | return -EBUSY; | 248 | return -EBUSY; |
| 249 | } | 249 | } |
| @@ -265,7 +265,7 @@ int caam_jr_enqueue(struct device *dev, u32 *desc, | |||
| 265 | 265 | ||
| 266 | wr_reg32(&jrp->rregs->inpring_jobadd, 1); | 266 | wr_reg32(&jrp->rregs->inpring_jobadd, 1); |
| 267 | 267 | ||
| 268 | spin_unlock(&jrp->inplock); | 268 | spin_unlock_bh(&jrp->inplock); |
| 269 | 269 | ||
| 270 | return 0; | 270 | return 0; |
| 271 | } | 271 | } |
diff --git a/drivers/crypto/hifn_795x.c b/drivers/crypto/hifn_795x.c index c9c4befb5a8d..df14358d7fa1 100644 --- a/drivers/crypto/hifn_795x.c +++ b/drivers/crypto/hifn_795x.c | |||
| @@ -821,8 +821,8 @@ static int hifn_register_rng(struct hifn_device *dev) | |||
| 821 | /* | 821 | /* |
| 822 | * We must wait at least 256 Pk_clk cycles between two reads of the rng. | 822 | * We must wait at least 256 Pk_clk cycles between two reads of the rng. |
| 823 | */ | 823 | */ |
| 824 | dev->rng_wait_time = DIV_ROUND_UP(NSEC_PER_SEC, dev->pk_clk_freq) * | 824 | dev->rng_wait_time = DIV_ROUND_UP_ULL(NSEC_PER_SEC, |
| 825 | 256; | 825 | dev->pk_clk_freq) * 256; |
| 826 | 826 | ||
| 827 | dev->rng.name = dev->name; | 827 | dev->rng.name = dev->name; |
| 828 | dev->rng.data_present = hifn_rng_data_present, | 828 | dev->rng.data_present = hifn_rng_data_present, |
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index 60ea284407ce..8bf8a64e5115 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c | |||
| @@ -1624,7 +1624,6 @@ static const struct hid_device_id hid_have_special_driver[] = { | |||
| 1624 | { HID_USB_DEVICE(USB_VENDOR_ID_ORTEK, USB_DEVICE_ID_ORTEK_WKB2000) }, | 1624 | { HID_USB_DEVICE(USB_VENDOR_ID_ORTEK, USB_DEVICE_ID_ORTEK_WKB2000) }, |
| 1625 | { HID_USB_DEVICE(USB_VENDOR_ID_PETALYNX, USB_DEVICE_ID_PETALYNX_MAXTER_REMOTE) }, | 1625 | { HID_USB_DEVICE(USB_VENDOR_ID_PETALYNX, USB_DEVICE_ID_PETALYNX_MAXTER_REMOTE) }, |
| 1626 | { HID_USB_DEVICE(USB_VENDOR_ID_PRIMAX, USB_DEVICE_ID_PRIMAX_KEYBOARD) }, | 1626 | { HID_USB_DEVICE(USB_VENDOR_ID_PRIMAX, USB_DEVICE_ID_PRIMAX_KEYBOARD) }, |
| 1627 | { HID_USB_DEVICE(USB_VENDOR_ID_QUANTA, USB_DEVICE_ID_PIXART_IMAGING_INC_OPTICAL_TOUCH_SCREEN) }, | ||
| 1628 | { HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_KONE) }, | 1627 | { HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_KONE) }, |
| 1629 | { HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_ARVO) }, | 1628 | { HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_ARVO) }, |
| 1630 | { HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_ISKU) }, | 1629 | { HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_ISKU) }, |
diff --git a/drivers/ide/ide-pm.c b/drivers/ide/ide-pm.c index 92406097efeb..8d1e32d7cd97 100644 --- a/drivers/ide/ide-pm.c +++ b/drivers/ide/ide-pm.c | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | 4 | ||
| 5 | int generic_ide_suspend(struct device *dev, pm_message_t mesg) | 5 | int generic_ide_suspend(struct device *dev, pm_message_t mesg) |
| 6 | { | 6 | { |
| 7 | ide_drive_t *drive = dev_get_drvdata(dev); | 7 | ide_drive_t *drive = to_ide_device(dev); |
| 8 | ide_drive_t *pair = ide_get_pair_dev(drive); | 8 | ide_drive_t *pair = ide_get_pair_dev(drive); |
| 9 | ide_hwif_t *hwif = drive->hwif; | 9 | ide_hwif_t *hwif = drive->hwif; |
| 10 | struct request *rq; | 10 | struct request *rq; |
| @@ -40,7 +40,7 @@ int generic_ide_suspend(struct device *dev, pm_message_t mesg) | |||
| 40 | 40 | ||
| 41 | int generic_ide_resume(struct device *dev) | 41 | int generic_ide_resume(struct device *dev) |
| 42 | { | 42 | { |
| 43 | ide_drive_t *drive = dev_get_drvdata(dev); | 43 | ide_drive_t *drive = to_ide_device(dev); |
| 44 | ide_drive_t *pair = ide_get_pair_dev(drive); | 44 | ide_drive_t *pair = ide_get_pair_dev(drive); |
| 45 | ide_hwif_t *hwif = drive->hwif; | 45 | ide_hwif_t *hwif = drive->hwif; |
| 46 | struct request *rq; | 46 | struct request *rq; |
diff --git a/drivers/rtc/rtc-at91sam9.c b/drivers/rtc/rtc-at91sam9.c index 831868904e02..1dd61f402b04 100644 --- a/drivers/rtc/rtc-at91sam9.c +++ b/drivers/rtc/rtc-at91sam9.c | |||
| @@ -58,6 +58,7 @@ struct sam9_rtc { | |||
| 58 | struct rtc_device *rtcdev; | 58 | struct rtc_device *rtcdev; |
| 59 | u32 imr; | 59 | u32 imr; |
| 60 | void __iomem *gpbr; | 60 | void __iomem *gpbr; |
| 61 | int irq; | ||
| 61 | }; | 62 | }; |
| 62 | 63 | ||
| 63 | #define rtt_readl(rtc, field) \ | 64 | #define rtt_readl(rtc, field) \ |
| @@ -292,7 +293,7 @@ static int __devinit at91_rtc_probe(struct platform_device *pdev) | |||
| 292 | { | 293 | { |
| 293 | struct resource *r, *r_gpbr; | 294 | struct resource *r, *r_gpbr; |
| 294 | struct sam9_rtc *rtc; | 295 | struct sam9_rtc *rtc; |
| 295 | int ret; | 296 | int ret, irq; |
| 296 | u32 mr; | 297 | u32 mr; |
| 297 | 298 | ||
| 298 | r = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 299 | r = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
| @@ -302,10 +303,18 @@ static int __devinit at91_rtc_probe(struct platform_device *pdev) | |||
| 302 | return -ENODEV; | 303 | return -ENODEV; |
| 303 | } | 304 | } |
| 304 | 305 | ||
| 306 | irq = platform_get_irq(pdev, 0); | ||
| 307 | if (irq < 0) { | ||
| 308 | dev_err(&pdev->dev, "failed to get interrupt resource\n"); | ||
| 309 | return irq; | ||
| 310 | } | ||
| 311 | |||
| 305 | rtc = kzalloc(sizeof *rtc, GFP_KERNEL); | 312 | rtc = kzalloc(sizeof *rtc, GFP_KERNEL); |
| 306 | if (!rtc) | 313 | if (!rtc) |
| 307 | return -ENOMEM; | 314 | return -ENOMEM; |
| 308 | 315 | ||
| 316 | rtc->irq = irq; | ||
| 317 | |||
| 309 | /* platform setup code should have handled this; sigh */ | 318 | /* platform setup code should have handled this; sigh */ |
| 310 | if (!device_can_wakeup(&pdev->dev)) | 319 | if (!device_can_wakeup(&pdev->dev)) |
| 311 | device_init_wakeup(&pdev->dev, 1); | 320 | device_init_wakeup(&pdev->dev, 1); |
| @@ -345,11 +354,10 @@ static int __devinit at91_rtc_probe(struct platform_device *pdev) | |||
| 345 | } | 354 | } |
| 346 | 355 | ||
| 347 | /* register irq handler after we know what name we'll use */ | 356 | /* register irq handler after we know what name we'll use */ |
| 348 | ret = request_irq(AT91_ID_SYS, at91_rtc_interrupt, | 357 | ret = request_irq(rtc->irq, at91_rtc_interrupt, IRQF_SHARED, |
| 349 | IRQF_SHARED, | ||
| 350 | dev_name(&rtc->rtcdev->dev), rtc); | 358 | dev_name(&rtc->rtcdev->dev), rtc); |
| 351 | if (ret) { | 359 | if (ret) { |
| 352 | dev_dbg(&pdev->dev, "can't share IRQ %d?\n", AT91_ID_SYS); | 360 | dev_dbg(&pdev->dev, "can't share IRQ %d?\n", rtc->irq); |
| 353 | rtc_device_unregister(rtc->rtcdev); | 361 | rtc_device_unregister(rtc->rtcdev); |
| 354 | goto fail_register; | 362 | goto fail_register; |
| 355 | } | 363 | } |
| @@ -386,7 +394,7 @@ static int __devexit at91_rtc_remove(struct platform_device *pdev) | |||
| 386 | 394 | ||
| 387 | /* disable all interrupts */ | 395 | /* disable all interrupts */ |
| 388 | rtt_writel(rtc, MR, mr & ~(AT91_RTT_ALMIEN | AT91_RTT_RTTINCIEN)); | 396 | rtt_writel(rtc, MR, mr & ~(AT91_RTT_ALMIEN | AT91_RTT_RTTINCIEN)); |
| 389 | free_irq(AT91_ID_SYS, rtc); | 397 | free_irq(rtc->irq, rtc); |
| 390 | 398 | ||
| 391 | rtc_device_unregister(rtc->rtcdev); | 399 | rtc_device_unregister(rtc->rtcdev); |
| 392 | 400 | ||
| @@ -423,7 +431,7 @@ static int at91_rtc_suspend(struct platform_device *pdev, | |||
| 423 | rtc->imr = mr & (AT91_RTT_ALMIEN | AT91_RTT_RTTINCIEN); | 431 | rtc->imr = mr & (AT91_RTT_ALMIEN | AT91_RTT_RTTINCIEN); |
| 424 | if (rtc->imr) { | 432 | if (rtc->imr) { |
| 425 | if (device_may_wakeup(&pdev->dev) && (mr & AT91_RTT_ALMIEN)) { | 433 | if (device_may_wakeup(&pdev->dev) && (mr & AT91_RTT_ALMIEN)) { |
| 426 | enable_irq_wake(AT91_ID_SYS); | 434 | enable_irq_wake(rtc->irq); |
| 427 | /* don't let RTTINC cause wakeups */ | 435 | /* don't let RTTINC cause wakeups */ |
| 428 | if (mr & AT91_RTT_RTTINCIEN) | 436 | if (mr & AT91_RTT_RTTINCIEN) |
| 429 | rtt_writel(rtc, MR, mr & ~AT91_RTT_RTTINCIEN); | 437 | rtt_writel(rtc, MR, mr & ~AT91_RTT_RTTINCIEN); |
| @@ -441,7 +449,7 @@ static int at91_rtc_resume(struct platform_device *pdev) | |||
| 441 | 449 | ||
| 442 | if (rtc->imr) { | 450 | if (rtc->imr) { |
| 443 | if (device_may_wakeup(&pdev->dev)) | 451 | if (device_may_wakeup(&pdev->dev)) |
| 444 | disable_irq_wake(AT91_ID_SYS); | 452 | disable_irq_wake(rtc->irq); |
| 445 | mr = rtt_readl(rtc, MR); | 453 | mr = rtt_readl(rtc, MR); |
| 446 | rtt_writel(rtc, MR, mr | rtc->imr); | 454 | rtt_writel(rtc, MR, mr | rtc->imr); |
| 447 | } | 455 | } |
diff --git a/drivers/spi/spi-bcm63xx.c b/drivers/spi/spi-bcm63xx.c index ea0aaa3f13d0..a9f4049c6769 100644 --- a/drivers/spi/spi-bcm63xx.c +++ b/drivers/spi/spi-bcm63xx.c | |||
| @@ -47,6 +47,8 @@ struct bcm63xx_spi { | |||
| 47 | /* Platform data */ | 47 | /* Platform data */ |
| 48 | u32 speed_hz; | 48 | u32 speed_hz; |
| 49 | unsigned fifo_size; | 49 | unsigned fifo_size; |
| 50 | unsigned int msg_type_shift; | ||
| 51 | unsigned int msg_ctl_width; | ||
| 50 | 52 | ||
| 51 | /* Data buffers */ | 53 | /* Data buffers */ |
| 52 | const unsigned char *tx_ptr; | 54 | const unsigned char *tx_ptr; |
| @@ -221,13 +223,20 @@ static unsigned int bcm63xx_txrx_bufs(struct spi_device *spi, | |||
| 221 | msg_ctl = (t->len << SPI_BYTE_CNT_SHIFT); | 223 | msg_ctl = (t->len << SPI_BYTE_CNT_SHIFT); |
| 222 | 224 | ||
| 223 | if (t->rx_buf && t->tx_buf) | 225 | if (t->rx_buf && t->tx_buf) |
| 224 | msg_ctl |= (SPI_FD_RW << SPI_MSG_TYPE_SHIFT); | 226 | msg_ctl |= (SPI_FD_RW << bs->msg_type_shift); |
| 225 | else if (t->rx_buf) | 227 | else if (t->rx_buf) |
| 226 | msg_ctl |= (SPI_HD_R << SPI_MSG_TYPE_SHIFT); | 228 | msg_ctl |= (SPI_HD_R << bs->msg_type_shift); |
| 227 | else if (t->tx_buf) | 229 | else if (t->tx_buf) |
| 228 | msg_ctl |= (SPI_HD_W << SPI_MSG_TYPE_SHIFT); | 230 | msg_ctl |= (SPI_HD_W << bs->msg_type_shift); |
| 229 | 231 | ||
| 230 | bcm_spi_writew(bs, msg_ctl, SPI_MSG_CTL); | 232 | switch (bs->msg_ctl_width) { |
| 233 | case 8: | ||
| 234 | bcm_spi_writeb(bs, msg_ctl, SPI_MSG_CTL); | ||
| 235 | break; | ||
| 236 | case 16: | ||
| 237 | bcm_spi_writew(bs, msg_ctl, SPI_MSG_CTL); | ||
| 238 | break; | ||
| 239 | } | ||
| 231 | 240 | ||
| 232 | /* Issue the transfer */ | 241 | /* Issue the transfer */ |
| 233 | cmd = SPI_CMD_START_IMMEDIATE; | 242 | cmd = SPI_CMD_START_IMMEDIATE; |
| @@ -406,9 +415,21 @@ static int __devinit bcm63xx_spi_probe(struct platform_device *pdev) | |||
| 406 | master->transfer_one_message = bcm63xx_spi_transfer_one; | 415 | master->transfer_one_message = bcm63xx_spi_transfer_one; |
| 407 | master->mode_bits = MODEBITS; | 416 | master->mode_bits = MODEBITS; |
| 408 | bs->speed_hz = pdata->speed_hz; | 417 | bs->speed_hz = pdata->speed_hz; |
| 418 | bs->msg_type_shift = pdata->msg_type_shift; | ||
| 419 | bs->msg_ctl_width = pdata->msg_ctl_width; | ||
| 409 | bs->tx_io = (u8 *)(bs->regs + bcm63xx_spireg(SPI_MSG_DATA)); | 420 | bs->tx_io = (u8 *)(bs->regs + bcm63xx_spireg(SPI_MSG_DATA)); |
| 410 | bs->rx_io = (const u8 *)(bs->regs + bcm63xx_spireg(SPI_RX_DATA)); | 421 | bs->rx_io = (const u8 *)(bs->regs + bcm63xx_spireg(SPI_RX_DATA)); |
| 411 | 422 | ||
| 423 | switch (bs->msg_ctl_width) { | ||
| 424 | case 8: | ||
| 425 | case 16: | ||
| 426 | break; | ||
| 427 | default: | ||
| 428 | dev_err(dev, "unsupported MSG_CTL width: %d\n", | ||
| 429 | bs->msg_ctl_width); | ||
| 430 | goto out_clk_disable; | ||
| 431 | } | ||
| 432 | |||
| 412 | /* Initialize hardware */ | 433 | /* Initialize hardware */ |
| 413 | clk_enable(bs->clk); | 434 | clk_enable(bs->clk); |
| 414 | bcm_spi_writeb(bs, SPI_INTR_CLEAR_ALL, SPI_INT_STATUS); | 435 | bcm_spi_writeb(bs, SPI_INTR_CLEAR_ALL, SPI_INT_STATUS); |
diff --git a/drivers/watchdog/booke_wdt.c b/drivers/watchdog/booke_wdt.c index 3fe82d0e8caa..5b06d31ab6a9 100644 --- a/drivers/watchdog/booke_wdt.c +++ b/drivers/watchdog/booke_wdt.c | |||
| @@ -166,18 +166,17 @@ static long booke_wdt_ioctl(struct file *file, | |||
| 166 | 166 | ||
| 167 | switch (cmd) { | 167 | switch (cmd) { |
| 168 | case WDIOC_GETSUPPORT: | 168 | case WDIOC_GETSUPPORT: |
| 169 | if (copy_to_user((void *)arg, &ident, sizeof(ident))) | 169 | return copy_to_user(p, &ident, sizeof(ident)) ? -EFAULT : 0; |
| 170 | return -EFAULT; | ||
| 171 | case WDIOC_GETSTATUS: | 170 | case WDIOC_GETSTATUS: |
| 172 | return put_user(0, p); | 171 | return put_user(0, p); |
| 173 | case WDIOC_GETBOOTSTATUS: | 172 | case WDIOC_GETBOOTSTATUS: |
| 174 | /* XXX: something is clearing TSR */ | 173 | /* XXX: something is clearing TSR */ |
| 175 | tmp = mfspr(SPRN_TSR) & TSR_WRS(3); | 174 | tmp = mfspr(SPRN_TSR) & TSR_WRS(3); |
| 176 | /* returns CARDRESET if last reset was caused by the WDT */ | 175 | /* returns CARDRESET if last reset was caused by the WDT */ |
| 177 | return (tmp ? WDIOF_CARDRESET : 0); | 176 | return put_user((tmp ? WDIOF_CARDRESET : 0), p); |
| 178 | case WDIOC_SETOPTIONS: | 177 | case WDIOC_SETOPTIONS: |
| 179 | if (get_user(tmp, p)) | 178 | if (get_user(tmp, p)) |
| 180 | return -EINVAL; | 179 | return -EFAULT; |
| 181 | if (tmp == WDIOS_ENABLECARD) { | 180 | if (tmp == WDIOS_ENABLECARD) { |
| 182 | booke_wdt_ping(); | 181 | booke_wdt_ping(); |
| 183 | break; | 182 | break; |
diff --git a/drivers/xen/platform-pci.c b/drivers/xen/platform-pci.c index d4c50d63acbc..97ca359ae2bd 100644 --- a/drivers/xen/platform-pci.c +++ b/drivers/xen/platform-pci.c | |||
| @@ -101,19 +101,6 @@ static int platform_pci_resume(struct pci_dev *pdev) | |||
| 101 | return 0; | 101 | return 0; |
| 102 | } | 102 | } |
| 103 | 103 | ||
| 104 | static void __devinit prepare_shared_info(void) | ||
| 105 | { | ||
| 106 | #ifdef CONFIG_KEXEC | ||
| 107 | unsigned long addr; | ||
| 108 | struct shared_info *hvm_shared_info; | ||
| 109 | |||
| 110 | addr = alloc_xen_mmio(PAGE_SIZE); | ||
| 111 | hvm_shared_info = ioremap(addr, PAGE_SIZE); | ||
| 112 | memset(hvm_shared_info, 0, PAGE_SIZE); | ||
| 113 | xen_hvm_prepare_kexec(hvm_shared_info, addr >> PAGE_SHIFT); | ||
| 114 | #endif | ||
| 115 | } | ||
| 116 | |||
| 117 | static int __devinit platform_pci_init(struct pci_dev *pdev, | 104 | static int __devinit platform_pci_init(struct pci_dev *pdev, |
| 118 | const struct pci_device_id *ent) | 105 | const struct pci_device_id *ent) |
| 119 | { | 106 | { |
| @@ -151,8 +138,6 @@ static int __devinit platform_pci_init(struct pci_dev *pdev, | |||
| 151 | platform_mmio = mmio_addr; | 138 | platform_mmio = mmio_addr; |
| 152 | platform_mmiolen = mmio_len; | 139 | platform_mmiolen = mmio_len; |
| 153 | 140 | ||
| 154 | prepare_shared_info(); | ||
| 155 | |||
| 156 | if (!xen_have_vector_callback) { | 141 | if (!xen_have_vector_callback) { |
| 157 | ret = xen_allocate_irq(pdev); | 142 | ret = xen_allocate_irq(pdev); |
| 158 | if (ret) { | 143 | if (ret) { |
