diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/acpi/motherboard.c | 2 | ||||
-rw-r--r-- | drivers/block/cfq-iosched.c | 1 | ||||
-rw-r--r-- | drivers/char/watchdog/sa1100_wdt.c | 49 | ||||
-rw-r--r-- | drivers/pci/bus.c | 4 | ||||
-rw-r--r-- | drivers/pcmcia/yenta_socket.c | 3 | ||||
-rw-r--r-- | drivers/scsi/aic7xxx/aicasm/aicasm.c | 4 | ||||
-rw-r--r-- | drivers/scsi/aic7xxx/aicasm/aicasm_insformat.h | 8 |
7 files changed, 25 insertions, 46 deletions
diff --git a/drivers/acpi/motherboard.c b/drivers/acpi/motherboard.c index 61ea70742d49..2934475d67d6 100644 --- a/drivers/acpi/motherboard.c +++ b/drivers/acpi/motherboard.c | |||
@@ -43,7 +43,7 @@ ACPI_MODULE_NAME ("acpi_motherboard") | |||
43 | */ | 43 | */ |
44 | #define IS_RESERVED_ADDR(base, len) \ | 44 | #define IS_RESERVED_ADDR(base, len) \ |
45 | (((len) > 0) && ((base) > 0) && ((base) + (len) < IO_SPACE_LIMIT) \ | 45 | (((len) > 0) && ((base) > 0) && ((base) + (len) < IO_SPACE_LIMIT) \ |
46 | && ((base) + (len) > PCIBIOS_MIN_IO)) | 46 | && ((base) + (len) > 0x1000)) |
47 | 47 | ||
48 | /* | 48 | /* |
49 | * Clearing the flag (IORESOURCE_BUSY) allows drivers to use | 49 | * Clearing the flag (IORESOURCE_BUSY) allows drivers to use |
diff --git a/drivers/block/cfq-iosched.c b/drivers/block/cfq-iosched.c index de5746e38af9..2435a7c99b2b 100644 --- a/drivers/block/cfq-iosched.c +++ b/drivers/block/cfq-iosched.c | |||
@@ -1281,6 +1281,7 @@ dispatch: | |||
1281 | */ | 1281 | */ |
1282 | if (!cfq_crq_in_driver(crq) && | 1282 | if (!cfq_crq_in_driver(crq) && |
1283 | !cfq_cfqq_idle_window(cfqq) && | 1283 | !cfq_cfqq_idle_window(cfqq) && |
1284 | !blk_barrier_rq(rq) && | ||
1284 | cfqd->rq_in_driver >= cfqd->cfq_max_depth) | 1285 | cfqd->rq_in_driver >= cfqd->cfq_max_depth) |
1285 | return NULL; | 1286 | return NULL; |
1286 | 1287 | ||
diff --git a/drivers/char/watchdog/sa1100_wdt.c b/drivers/char/watchdog/sa1100_wdt.c index 1b2132617dc3..fb88b4041dca 100644 --- a/drivers/char/watchdog/sa1100_wdt.c +++ b/drivers/char/watchdog/sa1100_wdt.c | |||
@@ -36,13 +36,10 @@ | |||
36 | #include <asm/uaccess.h> | 36 | #include <asm/uaccess.h> |
37 | 37 | ||
38 | #define OSCR_FREQ CLOCK_TICK_RATE | 38 | #define OSCR_FREQ CLOCK_TICK_RATE |
39 | #define SA1100_CLOSE_MAGIC (0x5afc4453) | ||
40 | 39 | ||
41 | static unsigned long sa1100wdt_users; | 40 | static unsigned long sa1100wdt_users; |
42 | static int expect_close; | ||
43 | static int pre_margin; | 41 | static int pre_margin; |
44 | static int boot_status; | 42 | static int boot_status; |
45 | static int nowayout = WATCHDOG_NOWAYOUT; | ||
46 | 43 | ||
47 | /* | 44 | /* |
48 | * Allow only one person to hold it open | 45 | * Allow only one person to hold it open |
@@ -62,55 +59,33 @@ static int sa1100dog_open(struct inode *inode, struct file *file) | |||
62 | } | 59 | } |
63 | 60 | ||
64 | /* | 61 | /* |
65 | * Shut off the timer. | 62 | * The watchdog cannot be disabled. |
66 | * Lock it in if it's a module and we defined ...NOWAYOUT | 63 | * |
67 | * Oddly, the watchdog can only be enabled, but we can turn off | 64 | * Previous comments suggested that turning off the interrupt by |
68 | * the interrupt, which appears to prevent the watchdog timing out. | 65 | * clearing OIER[E3] would prevent the watchdog timing out but this |
66 | * does not appear to be true (at least on the PXA255). | ||
69 | */ | 67 | */ |
70 | static int sa1100dog_release(struct inode *inode, struct file *file) | 68 | static int sa1100dog_release(struct inode *inode, struct file *file) |
71 | { | 69 | { |
72 | OSMR3 = OSCR + pre_margin; | 70 | printk(KERN_CRIT "WATCHDOG: Device closed - timer will not stop\n"); |
73 | |||
74 | if (expect_close == SA1100_CLOSE_MAGIC) { | ||
75 | OIER &= ~OIER_E3; | ||
76 | } else { | ||
77 | printk(KERN_CRIT "WATCHDOG: WDT device closed unexpectedly. WDT will not stop!\n"); | ||
78 | } | ||
79 | 71 | ||
80 | clear_bit(1, &sa1100wdt_users); | 72 | clear_bit(1, &sa1100wdt_users); |
81 | expect_close = 0; | ||
82 | 73 | ||
83 | return 0; | 74 | return 0; |
84 | } | 75 | } |
85 | 76 | ||
86 | static ssize_t sa1100dog_write(struct file *file, const char *data, size_t len, loff_t *ppos) | 77 | static ssize_t sa1100dog_write(struct file *file, const char *data, size_t len, loff_t *ppos) |
87 | { | 78 | { |
88 | if (len) { | 79 | if (len) |
89 | if (!nowayout) { | ||
90 | size_t i; | ||
91 | |||
92 | expect_close = 0; | ||
93 | |||
94 | for (i = 0; i != len; i++) { | ||
95 | char c; | ||
96 | |||
97 | if (get_user(c, data + i)) | ||
98 | return -EFAULT; | ||
99 | if (c == 'V') | ||
100 | expect_close = SA1100_CLOSE_MAGIC; | ||
101 | } | ||
102 | } | ||
103 | /* Refresh OSMR3 timer. */ | 80 | /* Refresh OSMR3 timer. */ |
104 | OSMR3 = OSCR + pre_margin; | 81 | OSMR3 = OSCR + pre_margin; |
105 | } | ||
106 | 82 | ||
107 | return len; | 83 | return len; |
108 | } | 84 | } |
109 | 85 | ||
110 | static struct watchdog_info ident = { | 86 | static struct watchdog_info ident = { |
111 | .options = WDIOF_CARDRESET | WDIOF_MAGICCLOSE | | 87 | .options = WDIOF_CARDRESET | WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING, |
112 | WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING, | 88 | .identity = "SA1100/PXA255 Watchdog", |
113 | .identity = "SA1100 Watchdog", | ||
114 | }; | 89 | }; |
115 | 90 | ||
116 | static int sa1100dog_ioctl(struct inode *inode, struct file *file, | 91 | static int sa1100dog_ioctl(struct inode *inode, struct file *file, |
@@ -172,7 +147,7 @@ static struct file_operations sa1100dog_fops = | |||
172 | static struct miscdevice sa1100dog_miscdev = | 147 | static struct miscdevice sa1100dog_miscdev = |
173 | { | 148 | { |
174 | .minor = WATCHDOG_MINOR, | 149 | .minor = WATCHDOG_MINOR, |
175 | .name = "SA1100/PXA2xx watchdog", | 150 | .name = "watchdog", |
176 | .fops = &sa1100dog_fops, | 151 | .fops = &sa1100dog_fops, |
177 | }; | 152 | }; |
178 | 153 | ||
@@ -194,7 +169,6 @@ static int __init sa1100dog_init(void) | |||
194 | if (ret == 0) | 169 | if (ret == 0) |
195 | printk("SA1100/PXA2xx Watchdog Timer: timer margin %d sec\n", | 170 | printk("SA1100/PXA2xx Watchdog Timer: timer margin %d sec\n", |
196 | margin); | 171 | margin); |
197 | |||
198 | return ret; | 172 | return ret; |
199 | } | 173 | } |
200 | 174 | ||
@@ -212,8 +186,5 @@ MODULE_DESCRIPTION("SA1100/PXA2xx Watchdog"); | |||
212 | module_param(margin, int, 0); | 186 | module_param(margin, int, 0); |
213 | MODULE_PARM_DESC(margin, "Watchdog margin in seconds (default 60s)"); | 187 | MODULE_PARM_DESC(margin, "Watchdog margin in seconds (default 60s)"); |
214 | 188 | ||
215 | module_param(nowayout, int, 0); | ||
216 | MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started"); | ||
217 | |||
218 | MODULE_LICENSE("GPL"); | 189 | MODULE_LICENSE("GPL"); |
219 | MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); | 190 | MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); |
diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c index fedae89d8f7d..fb9a11243d2a 100644 --- a/drivers/pci/bus.c +++ b/drivers/pci/bus.c | |||
@@ -60,7 +60,9 @@ pci_bus_alloc_resource(struct pci_bus *bus, struct resource *res, | |||
60 | continue; | 60 | continue; |
61 | 61 | ||
62 | /* Ok, try it out.. */ | 62 | /* Ok, try it out.. */ |
63 | ret = allocate_resource(r, res, size, min, -1, align, | 63 | ret = allocate_resource(r, res, size, |
64 | r->start ? : min, | ||
65 | -1, align, | ||
64 | alignf, alignf_data); | 66 | alignf, alignf_data); |
65 | if (ret == 0) | 67 | if (ret == 0) |
66 | break; | 68 | break; |
diff --git a/drivers/pcmcia/yenta_socket.c b/drivers/pcmcia/yenta_socket.c index 6837491f021c..91e7457d5b04 100644 --- a/drivers/pcmcia/yenta_socket.c +++ b/drivers/pcmcia/yenta_socket.c | |||
@@ -642,6 +642,7 @@ static void yenta_allocate_res(struct yenta_socket *socket, int nr, unsigned typ | |||
642 | (yenta_search_res(socket, res, BRIDGE_IO_MIN))) { | 642 | (yenta_search_res(socket, res, BRIDGE_IO_MIN))) { |
643 | config_writel(socket, addr_start, res->start); | 643 | config_writel(socket, addr_start, res->start); |
644 | config_writel(socket, addr_end, res->end); | 644 | config_writel(socket, addr_end, res->end); |
645 | return; | ||
645 | } | 646 | } |
646 | } else { | 647 | } else { |
647 | if (type & IORESOURCE_PREFETCH) { | 648 | if (type & IORESOURCE_PREFETCH) { |
@@ -650,6 +651,7 @@ static void yenta_allocate_res(struct yenta_socket *socket, int nr, unsigned typ | |||
650 | (yenta_search_res(socket, res, BRIDGE_MEM_MIN))) { | 651 | (yenta_search_res(socket, res, BRIDGE_MEM_MIN))) { |
651 | config_writel(socket, addr_start, res->start); | 652 | config_writel(socket, addr_start, res->start); |
652 | config_writel(socket, addr_end, res->end); | 653 | config_writel(socket, addr_end, res->end); |
654 | return; | ||
653 | } | 655 | } |
654 | /* Approximating prefetchable by non-prefetchable */ | 656 | /* Approximating prefetchable by non-prefetchable */ |
655 | res->flags = IORESOURCE_MEM; | 657 | res->flags = IORESOURCE_MEM; |
@@ -659,6 +661,7 @@ static void yenta_allocate_res(struct yenta_socket *socket, int nr, unsigned typ | |||
659 | (yenta_search_res(socket, res, BRIDGE_MEM_MIN))) { | 661 | (yenta_search_res(socket, res, BRIDGE_MEM_MIN))) { |
660 | config_writel(socket, addr_start, res->start); | 662 | config_writel(socket, addr_start, res->start); |
661 | config_writel(socket, addr_end, res->end); | 663 | config_writel(socket, addr_end, res->end); |
664 | return; | ||
662 | } | 665 | } |
663 | } | 666 | } |
664 | 667 | ||
diff --git a/drivers/scsi/aic7xxx/aicasm/aicasm.c b/drivers/scsi/aic7xxx/aicasm/aicasm.c index c34639481904..f936b691232f 100644 --- a/drivers/scsi/aic7xxx/aicasm/aicasm.c +++ b/drivers/scsi/aic7xxx/aicasm/aicasm.c | |||
@@ -369,7 +369,7 @@ output_code() | |||
369 | 369 | ||
370 | fprintf(ofile, "%s\t0x%02x, 0x%02x, 0x%02x, 0x%02x", | 370 | fprintf(ofile, "%s\t0x%02x, 0x%02x, 0x%02x, 0x%02x", |
371 | cur_instr == STAILQ_FIRST(&seq_program) ? "" : ",\n", | 371 | cur_instr == STAILQ_FIRST(&seq_program) ? "" : ",\n", |
372 | #if BYTE_ORDER == LITTLE_ENDIAN | 372 | #ifdef __LITTLE_ENDIAN |
373 | cur_instr->format.bytes[0], | 373 | cur_instr->format.bytes[0], |
374 | cur_instr->format.bytes[1], | 374 | cur_instr->format.bytes[1], |
375 | cur_instr->format.bytes[2], | 375 | cur_instr->format.bytes[2], |
@@ -613,7 +613,7 @@ output_listing(char *ifilename) | |||
613 | line++; | 613 | line++; |
614 | } | 614 | } |
615 | fprintf(listfile, "%03x %02x%02x%02x%02x", instrptr, | 615 | fprintf(listfile, "%03x %02x%02x%02x%02x", instrptr, |
616 | #if BYTE_ORDER == LITTLE_ENDIAN | 616 | #ifdef __LITTLE_ENDIAN |
617 | cur_instr->format.bytes[0], | 617 | cur_instr->format.bytes[0], |
618 | cur_instr->format.bytes[1], | 618 | cur_instr->format.bytes[1], |
619 | cur_instr->format.bytes[2], | 619 | cur_instr->format.bytes[2], |
diff --git a/drivers/scsi/aic7xxx/aicasm/aicasm_insformat.h b/drivers/scsi/aic7xxx/aicasm/aicasm_insformat.h index 3e80f07df49c..e64f802bbaaa 100644 --- a/drivers/scsi/aic7xxx/aicasm/aicasm_insformat.h +++ b/drivers/scsi/aic7xxx/aicasm/aicasm_insformat.h | |||
@@ -42,8 +42,10 @@ | |||
42 | * $FreeBSD$ | 42 | * $FreeBSD$ |
43 | */ | 43 | */ |
44 | 44 | ||
45 | #include <asm/byteorder.h> | ||
46 | |||
45 | struct ins_format1 { | 47 | struct ins_format1 { |
46 | #if BYTE_ORDER == LITTLE_ENDIAN | 48 | #ifdef __LITTLE_ENDIAN |
47 | uint32_t immediate : 8, | 49 | uint32_t immediate : 8, |
48 | source : 9, | 50 | source : 9, |
49 | destination : 9, | 51 | destination : 9, |
@@ -61,7 +63,7 @@ struct ins_format1 { | |||
61 | }; | 63 | }; |
62 | 64 | ||
63 | struct ins_format2 { | 65 | struct ins_format2 { |
64 | #if BYTE_ORDER == LITTLE_ENDIAN | 66 | #ifdef __LITTLE_ENDIAN |
65 | uint32_t shift_control : 8, | 67 | uint32_t shift_control : 8, |
66 | source : 9, | 68 | source : 9, |
67 | destination : 9, | 69 | destination : 9, |
@@ -79,7 +81,7 @@ struct ins_format2 { | |||
79 | }; | 81 | }; |
80 | 82 | ||
81 | struct ins_format3 { | 83 | struct ins_format3 { |
82 | #if BYTE_ORDER == LITTLE_ENDIAN | 84 | #ifdef __LITTLE_ENDIAN |
83 | uint32_t immediate : 8, | 85 | uint32_t immediate : 8, |
84 | source : 9, | 86 | source : 9, |
85 | address : 10, | 87 | address : 10, |