diff options
-rw-r--r-- | arch/arm/common/rtctime.c | 16 | ||||
-rw-r--r-- | arch/arm/kernel/entry-armv.S | 2 | ||||
-rw-r--r-- | arch/arm/kernel/traps.c | 8 | ||||
-rw-r--r-- | arch/arm/mach-at91rm9200/devices.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-at91rm9200/gpio.c | 17 | ||||
-rw-r--r-- | arch/arm/mach-ixp4xx/common.c | 20 | ||||
-rw-r--r-- | arch/arm/mach-ixp4xx/nslu2-power.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-ixp4xx/nslu2-setup.c | 7 | ||||
-rw-r--r-- | arch/arm/mach-versatile/pci.c | 93 | ||||
-rw-r--r-- | arch/arm/mm/abort-ev6.S | 2 | ||||
-rw-r--r-- | arch/arm/tools/mach-types | 35 | ||||
-rw-r--r-- | drivers/ieee1394/sbp2.c | 116 | ||||
-rw-r--r-- | drivers/ieee1394/sbp2.h | 64 | ||||
-rw-r--r-- | drivers/scsi/esp.c | 4 | ||||
-rw-r--r-- | fs/cifs/cifssmb.c | 7 | ||||
-rw-r--r-- | fs/cifs/connect.c | 8 | ||||
-rw-r--r-- | include/asm-arm/arch-at91rm9200/gpio.h | 1 | ||||
-rw-r--r-- | include/asm-arm/arch-ixp4xx/nas100d.h | 4 | ||||
-rw-r--r-- | include/linux/mmc/mmc.h | 2 |
19 files changed, 245 insertions, 168 deletions
diff --git a/arch/arm/common/rtctime.c b/arch/arm/common/rtctime.c index 48b1e19b131f..e851d86c212c 100644 --- a/arch/arm/common/rtctime.c +++ b/arch/arm/common/rtctime.c | |||
@@ -128,19 +128,27 @@ EXPORT_SYMBOL(rtc_tm_to_time); | |||
128 | /* | 128 | /* |
129 | * Calculate the next alarm time given the requested alarm time mask | 129 | * Calculate the next alarm time given the requested alarm time mask |
130 | * and the current time. | 130 | * and the current time. |
131 | * | ||
132 | * FIXME: for now, we just copy the alarm time because we're lazy (and | ||
133 | * is therefore buggy - setting a 10am alarm at 8pm will not result in | ||
134 | * the alarm triggering.) | ||
135 | */ | 131 | */ |
136 | void rtc_next_alarm_time(struct rtc_time *next, struct rtc_time *now, struct rtc_time *alrm) | 132 | void rtc_next_alarm_time(struct rtc_time *next, struct rtc_time *now, struct rtc_time *alrm) |
137 | { | 133 | { |
134 | unsigned long next_time; | ||
135 | unsigned long now_time; | ||
136 | |||
138 | next->tm_year = now->tm_year; | 137 | next->tm_year = now->tm_year; |
139 | next->tm_mon = now->tm_mon; | 138 | next->tm_mon = now->tm_mon; |
140 | next->tm_mday = now->tm_mday; | 139 | next->tm_mday = now->tm_mday; |
141 | next->tm_hour = alrm->tm_hour; | 140 | next->tm_hour = alrm->tm_hour; |
142 | next->tm_min = alrm->tm_min; | 141 | next->tm_min = alrm->tm_min; |
143 | next->tm_sec = alrm->tm_sec; | 142 | next->tm_sec = alrm->tm_sec; |
143 | |||
144 | rtc_tm_to_time(now, &now_time); | ||
145 | rtc_tm_to_time(next, &next_time); | ||
146 | |||
147 | if (next_time < now_time) { | ||
148 | /* Advance one day */ | ||
149 | next_time += 60 * 60 * 24; | ||
150 | rtc_time_to_tm(next_time, next); | ||
151 | } | ||
144 | } | 152 | } |
145 | 153 | ||
146 | static inline int rtc_read_time(struct rtc_ops *ops, struct rtc_time *tm) | 154 | static inline int rtc_read_time(struct rtc_ops *ops, struct rtc_time *tm) |
diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S index 964cd717506b..ec48d70c6d8b 100644 --- a/arch/arm/kernel/entry-armv.S +++ b/arch/arm/kernel/entry-armv.S | |||
@@ -566,7 +566,7 @@ ENTRY(__switch_to) | |||
566 | ldr r6, [r2, #TI_CPU_DOMAIN]! | 566 | ldr r6, [r2, #TI_CPU_DOMAIN]! |
567 | #endif | 567 | #endif |
568 | #if __LINUX_ARM_ARCH__ >= 6 | 568 | #if __LINUX_ARM_ARCH__ >= 6 |
569 | #ifdef CONFIG_CPU_MPCORE | 569 | #ifdef CONFIG_CPU_32v6K |
570 | clrex | 570 | clrex |
571 | #else | 571 | #else |
572 | strex r5, r4, [ip] @ Clear exclusive monitor | 572 | strex r5, r4, [ip] @ Clear exclusive monitor |
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c index 10235b01582e..03924bcc6129 100644 --- a/arch/arm/kernel/traps.c +++ b/arch/arm/kernel/traps.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/personality.h> | 19 | #include <linux/personality.h> |
20 | #include <linux/ptrace.h> | 20 | #include <linux/ptrace.h> |
21 | #include <linux/kallsyms.h> | 21 | #include <linux/kallsyms.h> |
22 | #include <linux/delay.h> | ||
22 | #include <linux/init.h> | 23 | #include <linux/init.h> |
23 | 24 | ||
24 | #include <asm/atomic.h> | 25 | #include <asm/atomic.h> |
@@ -231,6 +232,13 @@ NORET_TYPE void die(const char *str, struct pt_regs *regs, int err) | |||
231 | __die(str, err, thread, regs); | 232 | __die(str, err, thread, regs); |
232 | bust_spinlocks(0); | 233 | bust_spinlocks(0); |
233 | spin_unlock_irq(&die_lock); | 234 | spin_unlock_irq(&die_lock); |
235 | |||
236 | if (panic_on_oops) { | ||
237 | printk(KERN_EMERG "Fatal exception: panic in 5 seconds\n"); | ||
238 | ssleep(5); | ||
239 | panic("Fatal exception"); | ||
240 | } | ||
241 | |||
234 | do_exit(SIGSEGV); | 242 | do_exit(SIGSEGV); |
235 | } | 243 | } |
236 | 244 | ||
diff --git a/arch/arm/mach-at91rm9200/devices.c b/arch/arm/mach-at91rm9200/devices.c index 8df3e5245651..57eedd5beaf6 100644 --- a/arch/arm/mach-at91rm9200/devices.c +++ b/arch/arm/mach-at91rm9200/devices.c | |||
@@ -100,8 +100,10 @@ void __init at91_add_device_udc(struct at91_udc_data *data) | |||
100 | at91_set_gpio_input(data->vbus_pin, 0); | 100 | at91_set_gpio_input(data->vbus_pin, 0); |
101 | at91_set_deglitch(data->vbus_pin, 1); | 101 | at91_set_deglitch(data->vbus_pin, 1); |
102 | } | 102 | } |
103 | if (data->pullup_pin) | 103 | if (data->pullup_pin) { |
104 | at91_set_gpio_output(data->pullup_pin, 0); | 104 | at91_set_gpio_output(data->pullup_pin, 0); |
105 | at91_set_multi_drive(data->pullup_pin, 1); | ||
106 | } | ||
105 | 107 | ||
106 | udc_data = *data; | 108 | udc_data = *data; |
107 | platform_device_register(&at91rm9200_udc_device); | 109 | platform_device_register(&at91rm9200_udc_device); |
diff --git a/arch/arm/mach-at91rm9200/gpio.c b/arch/arm/mach-at91rm9200/gpio.c index 2fd2ef583e4d..a9f718bf8ba8 100644 --- a/arch/arm/mach-at91rm9200/gpio.c +++ b/arch/arm/mach-at91rm9200/gpio.c | |||
@@ -159,6 +159,23 @@ int __init_or_module at91_set_deglitch(unsigned pin, int is_on) | |||
159 | } | 159 | } |
160 | EXPORT_SYMBOL(at91_set_deglitch); | 160 | EXPORT_SYMBOL(at91_set_deglitch); |
161 | 161 | ||
162 | /* | ||
163 | * enable/disable the multi-driver; This is only valid for output and | ||
164 | * allows the output pin to run as an open collector output. | ||
165 | */ | ||
166 | int __init_or_module at91_set_multi_drive(unsigned pin, int is_on) | ||
167 | { | ||
168 | void __iomem *pio = pin_to_controller(pin); | ||
169 | unsigned mask = pin_to_mask(pin); | ||
170 | |||
171 | if (!pio) | ||
172 | return -EINVAL; | ||
173 | |||
174 | __raw_writel(mask, pio + (is_on ? PIO_MDER : PIO_MDDR)); | ||
175 | return 0; | ||
176 | } | ||
177 | EXPORT_SYMBOL(at91_set_multi_drive); | ||
178 | |||
162 | /*--------------------------------------------------------------------------*/ | 179 | /*--------------------------------------------------------------------------*/ |
163 | 180 | ||
164 | 181 | ||
diff --git a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c index 4bdc9d4526cd..fbadf3021b9e 100644 --- a/arch/arm/mach-ixp4xx/common.c +++ b/arch/arm/mach-ixp4xx/common.c | |||
@@ -111,24 +111,30 @@ static int ixp4xx_set_irq_type(unsigned int irq, unsigned int type) | |||
111 | if (line < 0) | 111 | if (line < 0) |
112 | return -EINVAL; | 112 | return -EINVAL; |
113 | 113 | ||
114 | if (type & IRQT_BOTHEDGE) { | 114 | switch (type){ |
115 | case IRQT_BOTHEDGE: | ||
115 | int_style = IXP4XX_GPIO_STYLE_TRANSITIONAL; | 116 | int_style = IXP4XX_GPIO_STYLE_TRANSITIONAL; |
116 | irq_type = IXP4XX_IRQ_EDGE; | 117 | irq_type = IXP4XX_IRQ_EDGE; |
117 | } else if (type & IRQT_RISING) { | 118 | break; |
119 | case IRQT_RISING: | ||
118 | int_style = IXP4XX_GPIO_STYLE_RISING_EDGE; | 120 | int_style = IXP4XX_GPIO_STYLE_RISING_EDGE; |
119 | irq_type = IXP4XX_IRQ_EDGE; | 121 | irq_type = IXP4XX_IRQ_EDGE; |
120 | } else if (type & IRQT_FALLING) { | 122 | break; |
123 | case IRQT_FALLING: | ||
121 | int_style = IXP4XX_GPIO_STYLE_FALLING_EDGE; | 124 | int_style = IXP4XX_GPIO_STYLE_FALLING_EDGE; |
122 | irq_type = IXP4XX_IRQ_EDGE; | 125 | irq_type = IXP4XX_IRQ_EDGE; |
123 | } else if (type & IRQT_HIGH) { | 126 | break; |
127 | case IRQT_HIGH: | ||
124 | int_style = IXP4XX_GPIO_STYLE_ACTIVE_HIGH; | 128 | int_style = IXP4XX_GPIO_STYLE_ACTIVE_HIGH; |
125 | irq_type = IXP4XX_IRQ_LEVEL; | 129 | irq_type = IXP4XX_IRQ_LEVEL; |
126 | } else if (type & IRQT_LOW) { | 130 | break; |
131 | case IRQT_LOW: | ||
127 | int_style = IXP4XX_GPIO_STYLE_ACTIVE_LOW; | 132 | int_style = IXP4XX_GPIO_STYLE_ACTIVE_LOW; |
128 | irq_type = IXP4XX_IRQ_LEVEL; | 133 | irq_type = IXP4XX_IRQ_LEVEL; |
129 | } else | 134 | break; |
135 | default: | ||
130 | return -EINVAL; | 136 | return -EINVAL; |
131 | 137 | } | |
132 | ixp4xx_config_irq(irq, irq_type); | 138 | ixp4xx_config_irq(irq, irq_type); |
133 | 139 | ||
134 | if (line >= 8) { /* pins 8-15 */ | 140 | if (line >= 8) { /* pins 8-15 */ |
diff --git a/arch/arm/mach-ixp4xx/nslu2-power.c b/arch/arm/mach-ixp4xx/nslu2-power.c index b0ad9e901f6e..d80c362bc539 100644 --- a/arch/arm/mach-ixp4xx/nslu2-power.c +++ b/arch/arm/mach-ixp4xx/nslu2-power.c | |||
@@ -77,6 +77,9 @@ static int __init nslu2_power_init(void) | |||
77 | 77 | ||
78 | static void __exit nslu2_power_exit(void) | 78 | static void __exit nslu2_power_exit(void) |
79 | { | 79 | { |
80 | if (!(machine_is_nslu2())) | ||
81 | return; | ||
82 | |||
80 | free_irq(NSLU2_RB_IRQ, NULL); | 83 | free_irq(NSLU2_RB_IRQ, NULL); |
81 | free_irq(NSLU2_PB_IRQ, NULL); | 84 | free_irq(NSLU2_PB_IRQ, NULL); |
82 | } | 85 | } |
diff --git a/arch/arm/mach-ixp4xx/nslu2-setup.c b/arch/arm/mach-ixp4xx/nslu2-setup.c index f260a9d34f70..55411f21d838 100644 --- a/arch/arm/mach-ixp4xx/nslu2-setup.c +++ b/arch/arm/mach-ixp4xx/nslu2-setup.c | |||
@@ -50,6 +50,12 @@ static struct platform_device nslu2_i2c_controller = { | |||
50 | .num_resources = 0, | 50 | .num_resources = 0, |
51 | }; | 51 | }; |
52 | 52 | ||
53 | static struct platform_device nslu2_beeper = { | ||
54 | .name = "ixp4xx-beeper", | ||
55 | .id = NSLU2_GPIO_BUZZ, | ||
56 | .num_resources = 0, | ||
57 | }; | ||
58 | |||
53 | static struct resource nslu2_uart_resources[] = { | 59 | static struct resource nslu2_uart_resources[] = { |
54 | { | 60 | { |
55 | .start = IXP4XX_UART1_BASE_PHYS, | 61 | .start = IXP4XX_UART1_BASE_PHYS, |
@@ -97,6 +103,7 @@ static struct platform_device *nslu2_devices[] __initdata = { | |||
97 | &nslu2_i2c_controller, | 103 | &nslu2_i2c_controller, |
98 | &nslu2_flash, | 104 | &nslu2_flash, |
99 | &nslu2_uart, | 105 | &nslu2_uart, |
106 | &nslu2_beeper, | ||
100 | }; | 107 | }; |
101 | 108 | ||
102 | static void nslu2_power_off(void) | 109 | static void nslu2_power_off(void) |
diff --git a/arch/arm/mach-versatile/pci.c b/arch/arm/mach-versatile/pci.c index b80d57d51699..722fbabc9cfb 100644 --- a/arch/arm/mach-versatile/pci.c +++ b/arch/arm/mach-versatile/pci.c | |||
@@ -240,6 +240,14 @@ int __init pci_versatile_setup(int nr, struct pci_sys_data *sys) | |||
240 | int i; | 240 | int i; |
241 | int myslot = -1; | 241 | int myslot = -1; |
242 | unsigned long val; | 242 | unsigned long val; |
243 | void __iomem *local_pci_cfg_base; | ||
244 | |||
245 | val = __raw_readl(SYS_PCICTL); | ||
246 | if (!(val & 1)) { | ||
247 | printk("Not plugged into PCI backplane!\n"); | ||
248 | ret = -EIO; | ||
249 | goto out; | ||
250 | } | ||
243 | 251 | ||
244 | if (nr == 0) { | 252 | if (nr == 0) { |
245 | sys->mem_offset = 0; | 253 | sys->mem_offset = 0; |
@@ -253,48 +261,45 @@ int __init pci_versatile_setup(int nr, struct pci_sys_data *sys) | |||
253 | goto out; | 261 | goto out; |
254 | } | 262 | } |
255 | 263 | ||
256 | __raw_writel(VERSATILE_PCI_MEM_BASE0 >> 28,PCI_IMAP0); | ||
257 | __raw_writel(VERSATILE_PCI_MEM_BASE1 >> 28,PCI_IMAP1); | ||
258 | __raw_writel(VERSATILE_PCI_MEM_BASE2 >> 28,PCI_IMAP2); | ||
259 | |||
260 | __raw_writel(1, SYS_PCICTL); | ||
261 | |||
262 | val = __raw_readl(SYS_PCICTL); | ||
263 | if (!(val & 1)) { | ||
264 | printk("Not plugged into PCI backplane!\n"); | ||
265 | ret = -EIO; | ||
266 | goto out; | ||
267 | } | ||
268 | |||
269 | /* | 264 | /* |
270 | * We need to discover the PCI core first to configure itself | 265 | * We need to discover the PCI core first to configure itself |
271 | * before the main PCI probing is performed | 266 | * before the main PCI probing is performed |
272 | */ | 267 | */ |
273 | for (i=0; i<32; i++) { | 268 | for (i=0; i<32; i++) |
274 | if ((__raw_readl(VERSATILE_PCI_VIRT_BASE+(i<<11)+DEVICE_ID_OFFSET) == VP_PCI_DEVICE_ID) && | 269 | if ((__raw_readl(VERSATILE_PCI_VIRT_BASE+(i<<11)+DEVICE_ID_OFFSET) == VP_PCI_DEVICE_ID) && |
275 | (__raw_readl(VERSATILE_PCI_VIRT_BASE+(i<<11)+CLASS_ID_OFFSET) == VP_PCI_CLASS_ID)) { | 270 | (__raw_readl(VERSATILE_PCI_VIRT_BASE+(i<<11)+CLASS_ID_OFFSET) == VP_PCI_CLASS_ID)) { |
276 | myslot = i; | 271 | myslot = i; |
277 | |||
278 | __raw_writel(myslot, PCI_SELFID); | ||
279 | val = __raw_readl(VERSATILE_PCI_CFG_VIRT_BASE+(myslot<<11)+CSR_OFFSET); | ||
280 | val |= (1<<2); | ||
281 | __raw_writel(val, VERSATILE_PCI_CFG_VIRT_BASE+(myslot<<11)+CSR_OFFSET); | ||
282 | break; | 272 | break; |
283 | } | 273 | } |
284 | } | ||
285 | 274 | ||
286 | if (myslot == -1) { | 275 | if (myslot == -1) { |
287 | printk("Cannot find PCI core!\n"); | 276 | printk("Cannot find PCI core!\n"); |
288 | ret = -EIO; | 277 | ret = -EIO; |
289 | } else { | 278 | goto out; |
290 | printk("PCI core found (slot %d)\n",myslot); | ||
291 | /* Do not to map Versatile FPGA PCI device | ||
292 | into memory space as we are short of | ||
293 | mappable memory */ | ||
294 | pci_slot_ignore |= (1 << myslot); | ||
295 | ret = 1; | ||
296 | } | 279 | } |
297 | 280 | ||
281 | printk("PCI core found (slot %d)\n",myslot); | ||
282 | |||
283 | __raw_writel(myslot, PCI_SELFID); | ||
284 | local_pci_cfg_base = (void *) VERSATILE_PCI_CFG_VIRT_BASE + (myslot << 11); | ||
285 | |||
286 | val = __raw_readl(local_pci_cfg_base + CSR_OFFSET); | ||
287 | val |= PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER | PCI_COMMAND_INVALIDATE; | ||
288 | __raw_writel(val, local_pci_cfg_base + CSR_OFFSET); | ||
289 | |||
290 | /* | ||
291 | * Configure the PCI inbound memory windows to be 1:1 mapped to SDRAM | ||
292 | */ | ||
293 | __raw_writel(PHYS_OFFSET, local_pci_cfg_base + PCI_BASE_ADDRESS_0); | ||
294 | __raw_writel(PHYS_OFFSET, local_pci_cfg_base + PCI_BASE_ADDRESS_1); | ||
295 | __raw_writel(PHYS_OFFSET, local_pci_cfg_base + PCI_BASE_ADDRESS_2); | ||
296 | |||
297 | /* | ||
298 | * Do not to map Versatile FPGA PCI device into memory space | ||
299 | */ | ||
300 | pci_slot_ignore |= (1 << myslot); | ||
301 | ret = 1; | ||
302 | |||
298 | out: | 303 | out: |
299 | return ret; | 304 | return ret; |
300 | } | 305 | } |
@@ -305,18 +310,18 @@ struct pci_bus *pci_versatile_scan_bus(int nr, struct pci_sys_data *sys) | |||
305 | return pci_scan_bus(sys->busnr, &pci_versatile_ops, sys); | 310 | return pci_scan_bus(sys->busnr, &pci_versatile_ops, sys); |
306 | } | 311 | } |
307 | 312 | ||
308 | /* | ||
309 | * V3_LB_BASE? - local bus address | ||
310 | * V3_LB_MAP? - pci bus address | ||
311 | */ | ||
312 | void __init pci_versatile_preinit(void) | 313 | void __init pci_versatile_preinit(void) |
313 | { | 314 | { |
314 | } | 315 | __raw_writel(VERSATILE_PCI_MEM_BASE0 >> 28, PCI_IMAP0); |
316 | __raw_writel(VERSATILE_PCI_MEM_BASE1 >> 28, PCI_IMAP1); | ||
317 | __raw_writel(VERSATILE_PCI_MEM_BASE2 >> 28, PCI_IMAP2); | ||
315 | 318 | ||
316 | void __init pci_versatile_postinit(void) | 319 | __raw_writel(PHYS_OFFSET >> 28, PCI_SMAP0); |
317 | { | 320 | __raw_writel(PHYS_OFFSET >> 28, PCI_SMAP1); |
318 | } | 321 | __raw_writel(PHYS_OFFSET >> 28, PCI_SMAP2); |
319 | 322 | ||
323 | __raw_writel(1, SYS_PCICTL); | ||
324 | } | ||
320 | 325 | ||
321 | /* | 326 | /* |
322 | * map the specified device/slot/pin to an IRQ. Different backplanes may need to modify this. | 327 | * map the specified device/slot/pin to an IRQ. Different backplanes may need to modify this. |
@@ -326,16 +331,15 @@ static int __init versatile_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | |||
326 | int irq; | 331 | int irq; |
327 | int devslot = PCI_SLOT(dev->devfn); | 332 | int devslot = PCI_SLOT(dev->devfn); |
328 | 333 | ||
329 | /* slot, pin, irq | 334 | /* slot, pin, irq |
330 | 24 1 27 | 335 | * 24 1 27 |
331 | 25 1 28 untested | 336 | * 25 1 28 |
332 | 26 1 29 | 337 | * 26 1 29 |
333 | 27 1 30 untested | 338 | * 27 1 30 |
334 | */ | 339 | */ |
335 | 340 | irq = 27 + ((slot + pin - 1) & 3); | |
336 | irq = 27 + ((slot + pin + 2) % 3); /* Fudged */ | ||
337 | 341 | ||
338 | printk("map irq: slot %d, pin %d, devslot %d, irq: %d\n",slot,pin,devslot,irq); | 342 | printk("PCI map irq: slot %d, pin %d, devslot %d, irq: %d\n",slot,pin,devslot,irq); |
339 | 343 | ||
340 | return irq; | 344 | return irq; |
341 | } | 345 | } |
@@ -347,7 +351,6 @@ static struct hw_pci versatile_pci __initdata = { | |||
347 | .setup = pci_versatile_setup, | 351 | .setup = pci_versatile_setup, |
348 | .scan = pci_versatile_scan_bus, | 352 | .scan = pci_versatile_scan_bus, |
349 | .preinit = pci_versatile_preinit, | 353 | .preinit = pci_versatile_preinit, |
350 | .postinit = pci_versatile_postinit, | ||
351 | }; | 354 | }; |
352 | 355 | ||
353 | static int __init versatile_pci_init(void) | 356 | static int __init versatile_pci_init(void) |
diff --git a/arch/arm/mm/abort-ev6.S b/arch/arm/mm/abort-ev6.S index dbd346033122..8a7f65ba14b7 100644 --- a/arch/arm/mm/abort-ev6.S +++ b/arch/arm/mm/abort-ev6.S | |||
@@ -20,7 +20,7 @@ | |||
20 | */ | 20 | */ |
21 | .align 5 | 21 | .align 5 |
22 | ENTRY(v6_early_abort) | 22 | ENTRY(v6_early_abort) |
23 | #ifdef CONFIG_CPU_MPCORE | 23 | #ifdef CONFIG_CPU_32v6K |
24 | clrex | 24 | clrex |
25 | #else | 25 | #else |
26 | strex r0, r1, [sp] @ Clear the exclusive monitor | 26 | strex r0, r1, [sp] @ Clear the exclusive monitor |
diff --git a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types index d0f9bb5e9023..8ab5300dcb94 100644 --- a/arch/arm/tools/mach-types +++ b/arch/arm/tools/mach-types | |||
@@ -12,7 +12,7 @@ | |||
12 | # | 12 | # |
13 | # http://www.arm.linux.org.uk/developer/machines/?action=new | 13 | # http://www.arm.linux.org.uk/developer/machines/?action=new |
14 | # | 14 | # |
15 | # Last update: Mon Jan 9 12:56:42 2006 | 15 | # Last update: Mon Feb 20 10:18:02 2006 |
16 | # | 16 | # |
17 | # machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number | 17 | # machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number |
18 | # | 18 | # |
@@ -904,7 +904,7 @@ wg302v2 MACH_WG302V2 WG302V2 890 | |||
904 | eb42x MACH_EB42X EB42X 891 | 904 | eb42x MACH_EB42X EB42X 891 |
905 | iq331es MACH_IQ331ES IQ331ES 892 | 905 | iq331es MACH_IQ331ES IQ331ES 892 |
906 | cosydsp MACH_COSYDSP COSYDSP 893 | 906 | cosydsp MACH_COSYDSP COSYDSP 893 |
907 | uplat7d MACH_UPLAT7D UPLAT7D 894 | 907 | uplat7d_proto MACH_UPLAT7D UPLAT7D 894 |
908 | ptdavinci MACH_PTDAVINCI PTDAVINCI 895 | 908 | ptdavinci MACH_PTDAVINCI PTDAVINCI 895 |
909 | mbus MACH_MBUS MBUS 896 | 909 | mbus MACH_MBUS MBUS 896 |
910 | nadia2vb MACH_NADIA2VB NADIA2VB 897 | 910 | nadia2vb MACH_NADIA2VB NADIA2VB 897 |
@@ -938,3 +938,34 @@ auckland MACH_AUCKLAND AUCKLAND 924 | |||
938 | ak3220m MACH_AK3320M AK3320M 925 | 938 | ak3220m MACH_AK3320M AK3320M 925 |
939 | duramax MACH_DURAMAX DURAMAX 926 | 939 | duramax MACH_DURAMAX DURAMAX 926 |
940 | n35 MACH_N35 N35 927 | 940 | n35 MACH_N35 N35 927 |
941 | pronghorn MACH_PRONGHORN PRONGHORN 928 | ||
942 | fundy MACH_FUNDY FUNDY 929 | ||
943 | logicpd_pxa270 MACH_LOGICPD_PXA270 LOGICPD_PXA270 930 | ||
944 | cpu777 MACH_CPU777 CPU777 931 | ||
945 | simicon9201 MACH_SIMICON9201 SIMICON9201 932 | ||
946 | leap2_hpm MACH_LEAP2_HPM LEAP2_HPM 933 | ||
947 | cm922txa10 MACH_CM922TXA10 CM922TXA10 934 | ||
948 | sandgate MACH_PXA PXA 935 | ||
949 | sandgate2 MACH_SANDGATE2 SANDGATE2 936 | ||
950 | sandgate2g MACH_SANDGATE2G SANDGATE2G 937 | ||
951 | sandgate2p MACH_SANDGATE2P SANDGATE2P 938 | ||
952 | fred_jack MACH_FRED_JACK FRED_JACK 939 | ||
953 | ttg_color1 MACH_TTG_COLOR1 TTG_COLOR1 940 | ||
954 | nxeb500hmi MACH_NXEB500HMI NXEB500HMI 941 | ||
955 | netdcu8 MACH_NETDCU8 NETDCU8 942 | ||
956 | ml675050_cpu_boa MACH_ML675050_CPU_BOA ML675050_CPU_BOA 943 | ||
957 | ng_fvx538 MACH_NG_FVX538 NG_FVX538 944 | ||
958 | ng_fvs338 MACH_NG_FVS338 NG_FVS338 945 | ||
959 | pnx4103 MACH_PNX4103 PNX4103 946 | ||
960 | hesdb MACH_HESDB HESDB 947 | ||
961 | xsilo MACH_XSILO XSILO 948 | ||
962 | espresso MACH_ESPRESSO ESPRESSO 949 | ||
963 | emlc MACH_EMLC EMLC 950 | ||
964 | sisteron MACH_SISTERON SISTERON 951 | ||
965 | rx1950 MACH_RX1950 RX1950 952 | ||
966 | tsc_venus MACH_TSC_VENUS TSC_VENUS 953 | ||
967 | ds101j MACH_DS101J DS101J 954 | ||
968 | mxc300_30ads MACH_MXC30030ADS MXC30030ADS 955 | ||
969 | fujitsu_wimaxsoc MACH_FUJITSU_WIMAXSOC FUJITSU_WIMAXSOC 956 | ||
970 | dualpcmodem MACH_DUALPCMODEM DUALPCMODEM 957 | ||
971 | gesbc9312 MACH_GESBC9312 GESBC9312 958 | ||
diff --git a/drivers/ieee1394/sbp2.c b/drivers/ieee1394/sbp2.c index c2c776fbda01..eca92eb475a1 100644 --- a/drivers/ieee1394/sbp2.c +++ b/drivers/ieee1394/sbp2.c | |||
@@ -137,15 +137,15 @@ MODULE_PARM_DESC(exclusive_login, "Exclusive login to sbp2 device (default = 1)" | |||
137 | /* | 137 | /* |
138 | * SCSI inquiry hack for really badly behaved sbp2 devices. Turn this on | 138 | * SCSI inquiry hack for really badly behaved sbp2 devices. Turn this on |
139 | * if your sbp2 device is not properly handling the SCSI inquiry command. | 139 | * if your sbp2 device is not properly handling the SCSI inquiry command. |
140 | * This hack makes the inquiry look more like a typical MS Windows | 140 | * This hack makes the inquiry look more like a typical MS Windows inquiry |
141 | * inquiry. | 141 | * by enforcing 36 byte inquiry and avoiding access to mode_sense page 8. |
142 | * | 142 | * |
143 | * If force_inquiry_hack=1 is required for your device to work, | 143 | * If force_inquiry_hack=1 is required for your device to work, |
144 | * please submit the logged sbp2_firmware_revision value of this device to | 144 | * please submit the logged sbp2_firmware_revision value of this device to |
145 | * the linux1394-devel mailing list. | 145 | * the linux1394-devel mailing list. |
146 | */ | 146 | */ |
147 | static int force_inquiry_hack; | 147 | static int force_inquiry_hack; |
148 | module_param(force_inquiry_hack, int, 0444); | 148 | module_param(force_inquiry_hack, int, 0644); |
149 | MODULE_PARM_DESC(force_inquiry_hack, "Force SCSI inquiry hack (default = 0)"); | 149 | MODULE_PARM_DESC(force_inquiry_hack, "Force SCSI inquiry hack (default = 0)"); |
150 | 150 | ||
151 | /* | 151 | /* |
@@ -264,18 +264,17 @@ static struct hpsb_protocol_driver sbp2_driver = { | |||
264 | }, | 264 | }, |
265 | }; | 265 | }; |
266 | 266 | ||
267 | 267 | /* | |
268 | /* List of device firmware's that require a forced 36 byte inquiry. */ | 268 | * List of device firmwares that require the inquiry hack. |
269 | * Yields a few false positives but did not break other devices so far. | ||
270 | */ | ||
269 | static u32 sbp2_broken_inquiry_list[] = { | 271 | static u32 sbp2_broken_inquiry_list[] = { |
270 | 0x00002800, /* Stefan Richter <richtest@bauwesen.tu-cottbus.de> */ | 272 | 0x00002800, /* Stefan Richter <stefanr@s5r6.in-berlin.de> */ |
271 | /* DViCO Momobay CX-1 */ | 273 | /* DViCO Momobay CX-1 */ |
272 | 0x00000200 /* Andreas Plesch <plesch@fas.harvard.edu> */ | 274 | 0x00000200 /* Andreas Plesch <plesch@fas.harvard.edu> */ |
273 | /* QPS Fire DVDBurner */ | 275 | /* QPS Fire DVDBurner */ |
274 | }; | 276 | }; |
275 | 277 | ||
276 | #define NUM_BROKEN_INQUIRY_DEVS \ | ||
277 | (sizeof(sbp2_broken_inquiry_list)/sizeof(*sbp2_broken_inquiry_list)) | ||
278 | |||
279 | /************************************** | 278 | /************************************** |
280 | * General utility functions | 279 | * General utility functions |
281 | **************************************/ | 280 | **************************************/ |
@@ -643,9 +642,15 @@ static int sbp2_remove(struct device *dev) | |||
643 | if (!scsi_id) | 642 | if (!scsi_id) |
644 | return 0; | 643 | return 0; |
645 | 644 | ||
646 | /* Trigger shutdown functions in scsi's highlevel. */ | 645 | if (scsi_id->scsi_host) { |
647 | if (scsi_id->scsi_host) | 646 | /* Get rid of enqueued commands if there is no chance to |
647 | * send them. */ | ||
648 | if (!sbp2util_node_is_available(scsi_id)) | ||
649 | sbp2scsi_complete_all_commands(scsi_id, DID_NO_CONNECT); | ||
650 | /* scsi_remove_device() will trigger shutdown functions of SCSI | ||
651 | * highlevel drivers which would deadlock if blocked. */ | ||
648 | scsi_unblock_requests(scsi_id->scsi_host); | 652 | scsi_unblock_requests(scsi_id->scsi_host); |
653 | } | ||
649 | sdev = scsi_id->sdev; | 654 | sdev = scsi_id->sdev; |
650 | if (sdev) { | 655 | if (sdev) { |
651 | scsi_id->sdev = NULL; | 656 | scsi_id->sdev = NULL; |
@@ -742,11 +747,6 @@ static struct scsi_id_instance_data *sbp2_alloc_device(struct unit_directory *ud | |||
742 | hi->host = ud->ne->host; | 747 | hi->host = ud->ne->host; |
743 | INIT_LIST_HEAD(&hi->scsi_ids); | 748 | INIT_LIST_HEAD(&hi->scsi_ids); |
744 | 749 | ||
745 | /* Register our sbp2 status address space... */ | ||
746 | hpsb_register_addrspace(&sbp2_highlevel, ud->ne->host, &sbp2_ops, | ||
747 | SBP2_STATUS_FIFO_ADDRESS, | ||
748 | SBP2_STATUS_FIFO_ADDRESS + | ||
749 | SBP2_STATUS_FIFO_ENTRY_TO_OFFSET(SBP2_MAX_UDS_PER_NODE+1)); | ||
750 | #ifdef CONFIG_IEEE1394_SBP2_PHYS_DMA | 750 | #ifdef CONFIG_IEEE1394_SBP2_PHYS_DMA |
751 | /* Handle data movement if physical dma is not | 751 | /* Handle data movement if physical dma is not |
752 | * enabled/supportedon host controller */ | 752 | * enabled/supportedon host controller */ |
@@ -759,6 +759,18 @@ static struct scsi_id_instance_data *sbp2_alloc_device(struct unit_directory *ud | |||
759 | 759 | ||
760 | list_add_tail(&scsi_id->scsi_list, &hi->scsi_ids); | 760 | list_add_tail(&scsi_id->scsi_list, &hi->scsi_ids); |
761 | 761 | ||
762 | /* Register the status FIFO address range. We could use the same FIFO | ||
763 | * for targets at different nodes. However we need different FIFOs per | ||
764 | * target in order to support multi-unit devices. */ | ||
765 | scsi_id->status_fifo_addr = hpsb_allocate_and_register_addrspace( | ||
766 | &sbp2_highlevel, ud->ne->host, &sbp2_ops, | ||
767 | sizeof(struct sbp2_status_block), sizeof(quadlet_t), | ||
768 | ~0ULL, ~0ULL); | ||
769 | if (!scsi_id->status_fifo_addr) { | ||
770 | SBP2_ERR("failed to allocate status FIFO address range"); | ||
771 | goto failed_alloc; | ||
772 | } | ||
773 | |||
762 | /* Register our host with the SCSI stack. */ | 774 | /* Register our host with the SCSI stack. */ |
763 | scsi_host = scsi_host_alloc(&scsi_driver_template, | 775 | scsi_host = scsi_host_alloc(&scsi_driver_template, |
764 | sizeof(unsigned long)); | 776 | sizeof(unsigned long)); |
@@ -997,6 +1009,10 @@ static void sbp2_remove_device(struct scsi_id_instance_data *scsi_id) | |||
997 | SBP2_DMA_FREE("single query logins data"); | 1009 | SBP2_DMA_FREE("single query logins data"); |
998 | } | 1010 | } |
999 | 1011 | ||
1012 | if (scsi_id->status_fifo_addr) | ||
1013 | hpsb_unregister_addrspace(&sbp2_highlevel, hi->host, | ||
1014 | scsi_id->status_fifo_addr); | ||
1015 | |||
1000 | scsi_id->ud->device.driver_data = NULL; | 1016 | scsi_id->ud->device.driver_data = NULL; |
1001 | 1017 | ||
1002 | SBP2_DEBUG("SBP-2 device removed, SCSI ID = %d", scsi_id->ud->id); | 1018 | SBP2_DEBUG("SBP-2 device removed, SCSI ID = %d", scsi_id->ud->id); |
@@ -1075,11 +1091,10 @@ static int sbp2_query_logins(struct scsi_id_instance_data *scsi_id) | |||
1075 | ORB_SET_QUERY_LOGINS_RESP_LENGTH(sizeof(struct sbp2_query_logins_response)); | 1091 | ORB_SET_QUERY_LOGINS_RESP_LENGTH(sizeof(struct sbp2_query_logins_response)); |
1076 | SBP2_DEBUG("sbp2_query_logins: reserved_resp_length initialized"); | 1092 | SBP2_DEBUG("sbp2_query_logins: reserved_resp_length initialized"); |
1077 | 1093 | ||
1078 | scsi_id->query_logins_orb->status_FIFO_lo = SBP2_STATUS_FIFO_ADDRESS_LO + | 1094 | scsi_id->query_logins_orb->status_fifo_hi = |
1079 | SBP2_STATUS_FIFO_ENTRY_TO_OFFSET(scsi_id->ud->id); | 1095 | ORB_SET_STATUS_FIFO_HI(scsi_id->status_fifo_addr, hi->host->node_id); |
1080 | scsi_id->query_logins_orb->status_FIFO_hi = (ORB_SET_NODE_ID(hi->host->node_id) | | 1096 | scsi_id->query_logins_orb->status_fifo_lo = |
1081 | SBP2_STATUS_FIFO_ADDRESS_HI); | 1097 | ORB_SET_STATUS_FIFO_LO(scsi_id->status_fifo_addr); |
1082 | SBP2_DEBUG("sbp2_query_logins: status FIFO initialized"); | ||
1083 | 1098 | ||
1084 | sbp2util_cpu_to_be32_buffer(scsi_id->query_logins_orb, sizeof(struct sbp2_query_logins_orb)); | 1099 | sbp2util_cpu_to_be32_buffer(scsi_id->query_logins_orb, sizeof(struct sbp2_query_logins_orb)); |
1085 | 1100 | ||
@@ -1184,11 +1199,10 @@ static int sbp2_login_device(struct scsi_id_instance_data *scsi_id) | |||
1184 | ORB_SET_LOGIN_RESP_LENGTH(sizeof(struct sbp2_login_response)); | 1199 | ORB_SET_LOGIN_RESP_LENGTH(sizeof(struct sbp2_login_response)); |
1185 | SBP2_DEBUG("sbp2_login_device: passwd_resp_lengths initialized"); | 1200 | SBP2_DEBUG("sbp2_login_device: passwd_resp_lengths initialized"); |
1186 | 1201 | ||
1187 | scsi_id->login_orb->status_FIFO_lo = SBP2_STATUS_FIFO_ADDRESS_LO + | 1202 | scsi_id->login_orb->status_fifo_hi = |
1188 | SBP2_STATUS_FIFO_ENTRY_TO_OFFSET(scsi_id->ud->id); | 1203 | ORB_SET_STATUS_FIFO_HI(scsi_id->status_fifo_addr, hi->host->node_id); |
1189 | scsi_id->login_orb->status_FIFO_hi = (ORB_SET_NODE_ID(hi->host->node_id) | | 1204 | scsi_id->login_orb->status_fifo_lo = |
1190 | SBP2_STATUS_FIFO_ADDRESS_HI); | 1205 | ORB_SET_STATUS_FIFO_LO(scsi_id->status_fifo_addr); |
1191 | SBP2_DEBUG("sbp2_login_device: status FIFO initialized"); | ||
1192 | 1206 | ||
1193 | /* | 1207 | /* |
1194 | * Byte swap ORB if necessary | 1208 | * Byte swap ORB if necessary |
@@ -1301,10 +1315,10 @@ static int sbp2_logout_device(struct scsi_id_instance_data *scsi_id) | |||
1301 | scsi_id->logout_orb->login_ID_misc |= ORB_SET_NOTIFY(1); | 1315 | scsi_id->logout_orb->login_ID_misc |= ORB_SET_NOTIFY(1); |
1302 | 1316 | ||
1303 | scsi_id->logout_orb->reserved5 = 0x0; | 1317 | scsi_id->logout_orb->reserved5 = 0x0; |
1304 | scsi_id->logout_orb->status_FIFO_lo = SBP2_STATUS_FIFO_ADDRESS_LO + | 1318 | scsi_id->logout_orb->status_fifo_hi = |
1305 | SBP2_STATUS_FIFO_ENTRY_TO_OFFSET(scsi_id->ud->id); | 1319 | ORB_SET_STATUS_FIFO_HI(scsi_id->status_fifo_addr, hi->host->node_id); |
1306 | scsi_id->logout_orb->status_FIFO_hi = (ORB_SET_NODE_ID(hi->host->node_id) | | 1320 | scsi_id->logout_orb->status_fifo_lo = |
1307 | SBP2_STATUS_FIFO_ADDRESS_HI); | 1321 | ORB_SET_STATUS_FIFO_LO(scsi_id->status_fifo_addr); |
1308 | 1322 | ||
1309 | /* | 1323 | /* |
1310 | * Byte swap ORB if necessary | 1324 | * Byte swap ORB if necessary |
@@ -1366,10 +1380,10 @@ static int sbp2_reconnect_device(struct scsi_id_instance_data *scsi_id) | |||
1366 | scsi_id->reconnect_orb->login_ID_misc |= ORB_SET_NOTIFY(1); | 1380 | scsi_id->reconnect_orb->login_ID_misc |= ORB_SET_NOTIFY(1); |
1367 | 1381 | ||
1368 | scsi_id->reconnect_orb->reserved5 = 0x0; | 1382 | scsi_id->reconnect_orb->reserved5 = 0x0; |
1369 | scsi_id->reconnect_orb->status_FIFO_lo = SBP2_STATUS_FIFO_ADDRESS_LO + | 1383 | scsi_id->reconnect_orb->status_fifo_hi = |
1370 | SBP2_STATUS_FIFO_ENTRY_TO_OFFSET(scsi_id->ud->id); | 1384 | ORB_SET_STATUS_FIFO_HI(scsi_id->status_fifo_addr, hi->host->node_id); |
1371 | scsi_id->reconnect_orb->status_FIFO_hi = | 1385 | scsi_id->reconnect_orb->status_fifo_lo = |
1372 | (ORB_SET_NODE_ID(hi->host->node_id) | SBP2_STATUS_FIFO_ADDRESS_HI); | 1386 | ORB_SET_STATUS_FIFO_LO(scsi_id->status_fifo_addr); |
1373 | 1387 | ||
1374 | /* | 1388 | /* |
1375 | * Byte swap ORB if necessary | 1389 | * Byte swap ORB if necessary |
@@ -1560,7 +1574,7 @@ static void sbp2_parse_unit_directory(struct scsi_id_instance_data *scsi_id, | |||
1560 | /* Check for a blacklisted set of devices that require us to force | 1574 | /* Check for a blacklisted set of devices that require us to force |
1561 | * a 36 byte host inquiry. This can be overriden as a module param | 1575 | * a 36 byte host inquiry. This can be overriden as a module param |
1562 | * (to force all hosts). */ | 1576 | * (to force all hosts). */ |
1563 | for (i = 0; i < NUM_BROKEN_INQUIRY_DEVS; i++) { | 1577 | for (i = 0; i < ARRAY_SIZE(sbp2_broken_inquiry_list); i++) { |
1564 | if ((firmware_revision & 0xffff00) == | 1578 | if ((firmware_revision & 0xffff00) == |
1565 | sbp2_broken_inquiry_list[i]) { | 1579 | sbp2_broken_inquiry_list[i]) { |
1566 | SBP2_WARN("Node " NODE_BUS_FMT ": Using 36byte inquiry workaround", | 1580 | SBP2_WARN("Node " NODE_BUS_FMT ": Using 36byte inquiry workaround", |
@@ -2007,18 +2021,6 @@ static int sbp2_send_command(struct scsi_id_instance_data *scsi_id, | |||
2007 | } | 2021 | } |
2008 | 2022 | ||
2009 | /* | 2023 | /* |
2010 | * The scsi stack sends down a request_bufflen which does not match the | ||
2011 | * length field in the scsi cdb. This causes some sbp2 devices to | ||
2012 | * reject this inquiry command. Fix the request_bufflen. | ||
2013 | */ | ||
2014 | if (*cmd == INQUIRY) { | ||
2015 | if (force_inquiry_hack || scsi_id->workarounds & SBP2_BREAKAGE_INQUIRY_HACK) | ||
2016 | request_bufflen = cmd[4] = 0x24; | ||
2017 | else | ||
2018 | request_bufflen = cmd[4]; | ||
2019 | } | ||
2020 | |||
2021 | /* | ||
2022 | * Now actually fill in the comamnd orb and sbp2 s/g list | 2024 | * Now actually fill in the comamnd orb and sbp2 s/g list |
2023 | */ | 2025 | */ |
2024 | sbp2_create_command_orb(scsi_id, command, cmd, SCpnt->use_sg, | 2026 | sbp2_create_command_orb(scsi_id, command, cmd, SCpnt->use_sg, |
@@ -2106,7 +2108,6 @@ static int sbp2_handle_status_write(struct hpsb_host *host, int nodeid, int dest | |||
2106 | { | 2108 | { |
2107 | struct sbp2scsi_host_info *hi; | 2109 | struct sbp2scsi_host_info *hi; |
2108 | struct scsi_id_instance_data *scsi_id = NULL, *scsi_id_tmp; | 2110 | struct scsi_id_instance_data *scsi_id = NULL, *scsi_id_tmp; |
2109 | u32 id; | ||
2110 | struct scsi_cmnd *SCpnt = NULL; | 2111 | struct scsi_cmnd *SCpnt = NULL; |
2111 | u32 scsi_status = SBP2_SCSI_STATUS_GOOD; | 2112 | u32 scsi_status = SBP2_SCSI_STATUS_GOOD; |
2112 | struct sbp2_command_info *command; | 2113 | struct sbp2_command_info *command; |
@@ -2129,12 +2130,12 @@ static int sbp2_handle_status_write(struct hpsb_host *host, int nodeid, int dest | |||
2129 | } | 2130 | } |
2130 | 2131 | ||
2131 | /* | 2132 | /* |
2132 | * Find our scsi_id structure by looking at the status fifo address written to by | 2133 | * Find our scsi_id structure by looking at the status fifo address |
2133 | * the sbp2 device. | 2134 | * written to by the sbp2 device. |
2134 | */ | 2135 | */ |
2135 | id = SBP2_STATUS_FIFO_OFFSET_TO_ENTRY((u32)(addr - SBP2_STATUS_FIFO_ADDRESS)); | ||
2136 | list_for_each_entry(scsi_id_tmp, &hi->scsi_ids, scsi_list) { | 2136 | list_for_each_entry(scsi_id_tmp, &hi->scsi_ids, scsi_list) { |
2137 | if (scsi_id_tmp->ne->nodeid == nodeid && scsi_id_tmp->ud->id == id) { | 2137 | if (scsi_id_tmp->ne->nodeid == nodeid && |
2138 | scsi_id_tmp->status_fifo_addr == addr) { | ||
2138 | scsi_id = scsi_id_tmp; | 2139 | scsi_id = scsi_id_tmp; |
2139 | break; | 2140 | break; |
2140 | } | 2141 | } |
@@ -2475,7 +2476,16 @@ static void sbp2scsi_complete_command(struct scsi_id_instance_data *scsi_id, | |||
2475 | 2476 | ||
2476 | static int sbp2scsi_slave_alloc(struct scsi_device *sdev) | 2477 | static int sbp2scsi_slave_alloc(struct scsi_device *sdev) |
2477 | { | 2478 | { |
2478 | ((struct scsi_id_instance_data *)sdev->host->hostdata[0])->sdev = sdev; | 2479 | struct scsi_id_instance_data *scsi_id = |
2480 | (struct scsi_id_instance_data *)sdev->host->hostdata[0]; | ||
2481 | |||
2482 | scsi_id->sdev = sdev; | ||
2483 | |||
2484 | if (force_inquiry_hack || | ||
2485 | scsi_id->workarounds & SBP2_BREAKAGE_INQUIRY_HACK) { | ||
2486 | sdev->inquiry_len = 36; | ||
2487 | sdev->skip_ms_page_8 = 1; | ||
2488 | } | ||
2479 | return 0; | 2489 | return 0; |
2480 | } | 2490 | } |
2481 | 2491 | ||
diff --git a/drivers/ieee1394/sbp2.h b/drivers/ieee1394/sbp2.h index 900ea1d25e71..e2d357a9ea3a 100644 --- a/drivers/ieee1394/sbp2.h +++ b/drivers/ieee1394/sbp2.h | |||
@@ -33,15 +33,17 @@ | |||
33 | #define ORB_DIRECTION_NO_DATA_TRANSFER 0x2 | 33 | #define ORB_DIRECTION_NO_DATA_TRANSFER 0x2 |
34 | 34 | ||
35 | #define ORB_SET_NULL_PTR(value) ((value & 0x1) << 31) | 35 | #define ORB_SET_NULL_PTR(value) ((value & 0x1) << 31) |
36 | #define ORB_SET_NOTIFY(value) ((value & 0x1) << 31) | 36 | #define ORB_SET_NOTIFY(value) ((value & 0x1) << 31) |
37 | #define ORB_SET_RQ_FMT(value) ((value & 0x3) << 29) /* unused ? */ | 37 | #define ORB_SET_RQ_FMT(value) ((value & 0x3) << 29) /* unused ? */ |
38 | #define ORB_SET_NODE_ID(value) ((value & 0xffff) << 16) | 38 | #define ORB_SET_NODE_ID(value) ((value & 0xffff) << 16) |
39 | #define ORB_SET_DATA_SIZE(value) (value & 0xffff) | 39 | #define ORB_SET_STATUS_FIFO_HI(value, id) (value >> 32 | ORB_SET_NODE_ID(id)) |
40 | #define ORB_SET_PAGE_SIZE(value) ((value & 0x7) << 16) | 40 | #define ORB_SET_STATUS_FIFO_LO(value) (value & 0xffffffff) |
41 | #define ORB_SET_PAGE_TABLE_PRESENT(value) ((value & 0x1) << 19) | 41 | #define ORB_SET_DATA_SIZE(value) (value & 0xffff) |
42 | #define ORB_SET_MAX_PAYLOAD(value) ((value & 0xf) << 20) | 42 | #define ORB_SET_PAGE_SIZE(value) ((value & 0x7) << 16) |
43 | #define ORB_SET_SPEED(value) ((value & 0x7) << 24) | 43 | #define ORB_SET_PAGE_TABLE_PRESENT(value) ((value & 0x1) << 19) |
44 | #define ORB_SET_DIRECTION(value) ((value & 0x1) << 27) | 44 | #define ORB_SET_MAX_PAYLOAD(value) ((value & 0xf) << 20) |
45 | #define ORB_SET_SPEED(value) ((value & 0x7) << 24) | ||
46 | #define ORB_SET_DIRECTION(value) ((value & 0x1) << 27) | ||
45 | 47 | ||
46 | struct sbp2_command_orb { | 48 | struct sbp2_command_orb { |
47 | volatile u32 next_ORB_hi; | 49 | volatile u32 next_ORB_hi; |
@@ -76,8 +78,8 @@ struct sbp2_login_orb { | |||
76 | u32 login_response_lo; | 78 | u32 login_response_lo; |
77 | u32 lun_misc; | 79 | u32 lun_misc; |
78 | u32 passwd_resp_lengths; | 80 | u32 passwd_resp_lengths; |
79 | u32 status_FIFO_hi; | 81 | u32 status_fifo_hi; |
80 | u32 status_FIFO_lo; | 82 | u32 status_fifo_lo; |
81 | }; | 83 | }; |
82 | 84 | ||
83 | #define RESPONSE_GET_LOGIN_ID(value) (value & 0xffff) | 85 | #define RESPONSE_GET_LOGIN_ID(value) (value & 0xffff) |
@@ -102,8 +104,8 @@ struct sbp2_query_logins_orb { | |||
102 | u32 query_response_lo; | 104 | u32 query_response_lo; |
103 | u32 lun_misc; | 105 | u32 lun_misc; |
104 | u32 reserved_resp_length; | 106 | u32 reserved_resp_length; |
105 | u32 status_FIFO_hi; | 107 | u32 status_fifo_hi; |
106 | u32 status_FIFO_lo; | 108 | u32 status_fifo_lo; |
107 | }; | 109 | }; |
108 | 110 | ||
109 | #define RESPONSE_GET_MAX_LOGINS(value) (value & 0xffff) | 111 | #define RESPONSE_GET_MAX_LOGINS(value) (value & 0xffff) |
@@ -123,8 +125,8 @@ struct sbp2_reconnect_orb { | |||
123 | u32 reserved4; | 125 | u32 reserved4; |
124 | u32 login_ID_misc; | 126 | u32 login_ID_misc; |
125 | u32 reserved5; | 127 | u32 reserved5; |
126 | u32 status_FIFO_hi; | 128 | u32 status_fifo_hi; |
127 | u32 status_FIFO_lo; | 129 | u32 status_fifo_lo; |
128 | }; | 130 | }; |
129 | 131 | ||
130 | struct sbp2_logout_orb { | 132 | struct sbp2_logout_orb { |
@@ -134,8 +136,8 @@ struct sbp2_logout_orb { | |||
134 | u32 reserved4; | 136 | u32 reserved4; |
135 | u32 login_ID_misc; | 137 | u32 login_ID_misc; |
136 | u32 reserved5; | 138 | u32 reserved5; |
137 | u32 status_FIFO_hi; | 139 | u32 status_fifo_hi; |
138 | u32 status_FIFO_lo; | 140 | u32 status_fifo_lo; |
139 | }; | 141 | }; |
140 | 142 | ||
141 | #define PAGE_TABLE_SET_SEGMENT_BASE_HI(value) (value & 0xffff) | 143 | #define PAGE_TABLE_SET_SEGMENT_BASE_HI(value) (value & 0xffff) |
@@ -195,30 +197,6 @@ struct sbp2_status_block { | |||
195 | * Miscellaneous SBP2 related config rom defines | 197 | * Miscellaneous SBP2 related config rom defines |
196 | */ | 198 | */ |
197 | 199 | ||
198 | /* The status fifo address definition below is used as a base for each | ||
199 | * node, which a chunk seperately assigned to each unit directory in the | ||
200 | * node. For example, 0xfffe00000000ULL is used for the first sbp2 device | ||
201 | * detected on node 0, 0xfffe00000020ULL for the next sbp2 device on node | ||
202 | * 0, and so on. | ||
203 | * | ||
204 | * Note: We could use a single status fifo address for all sbp2 devices, | ||
205 | * and figure out which sbp2 device the status belongs to by looking at | ||
206 | * the source node id of the status write... but, using separate addresses | ||
207 | * for each sbp2 unit directory allows for better code and the ability to | ||
208 | * support multiple luns within a single 1394 node. | ||
209 | * | ||
210 | * Also note that we choose the address range below as it is a region | ||
211 | * specified for write posting, where the ohci controller will | ||
212 | * automatically send an ack_complete when the status is written by the | ||
213 | * sbp2 device... saving a split transaction. =) | ||
214 | */ | ||
215 | #define SBP2_STATUS_FIFO_ADDRESS 0xfffe00000000ULL | ||
216 | #define SBP2_STATUS_FIFO_ADDRESS_HI 0xfffe | ||
217 | #define SBP2_STATUS_FIFO_ADDRESS_LO 0x0 | ||
218 | |||
219 | #define SBP2_STATUS_FIFO_ENTRY_TO_OFFSET(entry) ((entry) << 5) | ||
220 | #define SBP2_STATUS_FIFO_OFFSET_TO_ENTRY(offset) ((offset) >> 5) | ||
221 | |||
222 | #define SBP2_UNIT_DIRECTORY_OFFSET_KEY 0xd1 | 200 | #define SBP2_UNIT_DIRECTORY_OFFSET_KEY 0xd1 |
223 | #define SBP2_CSR_OFFSET_KEY 0x54 | 201 | #define SBP2_CSR_OFFSET_KEY 0x54 |
224 | #define SBP2_UNIT_SPEC_ID_KEY 0x12 | 202 | #define SBP2_UNIT_SPEC_ID_KEY 0x12 |
@@ -258,7 +236,6 @@ struct sbp2_status_block { | |||
258 | */ | 236 | */ |
259 | 237 | ||
260 | #define SBP2_MAX_SG_ELEMENT_LENGTH 0xf000 | 238 | #define SBP2_MAX_SG_ELEMENT_LENGTH 0xf000 |
261 | #define SBP2_MAX_UDS_PER_NODE 16 /* Maximum scsi devices per node */ | ||
262 | #define SBP2_MAX_SECTORS 255 /* Max sectors supported */ | 239 | #define SBP2_MAX_SECTORS 255 /* Max sectors supported */ |
263 | #define SBP2_MAX_CMDS 8 /* This should be safe */ | 240 | #define SBP2_MAX_CMDS 8 /* This should be safe */ |
264 | 241 | ||
@@ -338,6 +315,11 @@ struct scsi_id_instance_data { | |||
338 | u32 sbp2_firmware_revision; | 315 | u32 sbp2_firmware_revision; |
339 | 316 | ||
340 | /* | 317 | /* |
318 | * Address for the device to write status blocks to | ||
319 | */ | ||
320 | u64 status_fifo_addr; | ||
321 | |||
322 | /* | ||
341 | * Variable used for logins, reconnects, logouts, query logins | 323 | * Variable used for logins, reconnects, logouts, query logins |
342 | */ | 324 | */ |
343 | atomic_t sbp2_login_complete; | 325 | atomic_t sbp2_login_complete; |
diff --git a/drivers/scsi/esp.c b/drivers/scsi/esp.c index f6900538be90..87a8c3d2072c 100644 --- a/drivers/scsi/esp.c +++ b/drivers/scsi/esp.c | |||
@@ -2068,14 +2068,12 @@ static int esp_reset(struct scsi_cmnd *SCptr) | |||
2068 | { | 2068 | { |
2069 | struct esp *esp = (struct esp *) SCptr->device->host->hostdata; | 2069 | struct esp *esp = (struct esp *) SCptr->device->host->hostdata; |
2070 | 2070 | ||
2071 | spin_lock_irq(esp->ehost->host_lock); | ||
2071 | (void) esp_do_resetbus(esp); | 2072 | (void) esp_do_resetbus(esp); |
2072 | |||
2073 | spin_unlock_irq(esp->ehost->host_lock); | 2073 | spin_unlock_irq(esp->ehost->host_lock); |
2074 | 2074 | ||
2075 | wait_event(esp->reset_queue, (esp->resetting_bus == 0)); | 2075 | wait_event(esp->reset_queue, (esp->resetting_bus == 0)); |
2076 | 2076 | ||
2077 | spin_lock_irq(esp->ehost->host_lock); | ||
2078 | |||
2079 | return SUCCESS; | 2077 | return SUCCESS; |
2080 | } | 2078 | } |
2081 | 2079 | ||
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c index 217323b0c896..b41e8b379652 100644 --- a/fs/cifs/cifssmb.c +++ b/fs/cifs/cifssmb.c | |||
@@ -1048,13 +1048,14 @@ CIFSSMBRead(const int xid, struct cifsTconInfo *tcon, | |||
1048 | cifs_small_buf_release(iov[0].iov_base); | 1048 | cifs_small_buf_release(iov[0].iov_base); |
1049 | else if(resp_buf_type == CIFS_LARGE_BUFFER) | 1049 | else if(resp_buf_type == CIFS_LARGE_BUFFER) |
1050 | cifs_buf_release(iov[0].iov_base); | 1050 | cifs_buf_release(iov[0].iov_base); |
1051 | } else /* return buffer to caller to free */ /* BB FIXME how do we tell caller if it is not a large buffer */ { | 1051 | } else if(resp_buf_type != CIFS_NO_BUFFER) { |
1052 | *buf = iov[0].iov_base; | 1052 | /* return buffer to caller to free */ |
1053 | *buf = iov[0].iov_base; | ||
1053 | if(resp_buf_type == CIFS_SMALL_BUFFER) | 1054 | if(resp_buf_type == CIFS_SMALL_BUFFER) |
1054 | *pbuf_type = CIFS_SMALL_BUFFER; | 1055 | *pbuf_type = CIFS_SMALL_BUFFER; |
1055 | else if(resp_buf_type == CIFS_LARGE_BUFFER) | 1056 | else if(resp_buf_type == CIFS_LARGE_BUFFER) |
1056 | *pbuf_type = CIFS_LARGE_BUFFER; | 1057 | *pbuf_type = CIFS_LARGE_BUFFER; |
1057 | } | 1058 | } /* else no valid buffer on return - leave as null */ |
1058 | 1059 | ||
1059 | /* Note: On -EAGAIN error only caller can retry on handle based calls | 1060 | /* Note: On -EAGAIN error only caller can retry on handle based calls |
1060 | since file handle passed in no longer valid */ | 1061 | since file handle passed in no longer valid */ |
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index e488603fb1e7..ef5ae6f93c75 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c | |||
@@ -1795,10 +1795,10 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb, | |||
1795 | conjunction with 52K kvec constraint on arch with 4K | 1795 | conjunction with 52K kvec constraint on arch with 4K |
1796 | page size */ | 1796 | page size */ |
1797 | 1797 | ||
1798 | if(cifs_sb->rsize < PAGE_CACHE_SIZE) { | 1798 | if(cifs_sb->rsize < 2048) { |
1799 | cifs_sb->rsize = PAGE_CACHE_SIZE; | 1799 | cifs_sb->rsize = 2048; |
1800 | /* Windows ME does this */ | 1800 | /* Windows ME may prefer this */ |
1801 | cFYI(1,("Attempt to set readsize for mount to less than one page (4096)")); | 1801 | cFYI(1,("readsize set to minimum 2048")); |
1802 | } | 1802 | } |
1803 | cifs_sb->mnt_uid = volume_info.linux_uid; | 1803 | cifs_sb->mnt_uid = volume_info.linux_uid; |
1804 | cifs_sb->mnt_gid = volume_info.linux_gid; | 1804 | cifs_sb->mnt_gid = volume_info.linux_gid; |
diff --git a/include/asm-arm/arch-at91rm9200/gpio.h b/include/asm-arm/arch-at91rm9200/gpio.h index 0f0a61e2f129..6176ab2dc417 100644 --- a/include/asm-arm/arch-at91rm9200/gpio.h +++ b/include/asm-arm/arch-at91rm9200/gpio.h | |||
@@ -183,6 +183,7 @@ extern int at91_set_B_periph(unsigned pin, int use_pullup); | |||
183 | extern int at91_set_gpio_input(unsigned pin, int use_pullup); | 183 | extern int at91_set_gpio_input(unsigned pin, int use_pullup); |
184 | extern int at91_set_gpio_output(unsigned pin, int value); | 184 | extern int at91_set_gpio_output(unsigned pin, int value); |
185 | extern int at91_set_deglitch(unsigned pin, int is_on); | 185 | extern int at91_set_deglitch(unsigned pin, int is_on); |
186 | extern int at91_set_multi_drive(unsigned pin, int is_on); | ||
186 | 187 | ||
187 | /* callable at any time */ | 188 | /* callable at any time */ |
188 | extern int at91_set_gpio_value(unsigned pin, int value); | 189 | extern int at91_set_gpio_value(unsigned pin, int value); |
diff --git a/include/asm-arm/arch-ixp4xx/nas100d.h b/include/asm-arm/arch-ixp4xx/nas100d.h index 51ac0180427c..84467a5190d0 100644 --- a/include/asm-arm/arch-ixp4xx/nas100d.h +++ b/include/asm-arm/arch-ixp4xx/nas100d.h | |||
@@ -19,8 +19,8 @@ | |||
19 | #error "Do not include this directly, instead #include <asm/hardware.h>" | 19 | #error "Do not include this directly, instead #include <asm/hardware.h>" |
20 | #endif | 20 | #endif |
21 | 21 | ||
22 | #define NAS100D_SDA_PIN 6 | 22 | #define NAS100D_SDA_PIN 5 |
23 | #define NAS100D_SCL_PIN 5 | 23 | #define NAS100D_SCL_PIN 6 |
24 | 24 | ||
25 | /* | 25 | /* |
26 | * NAS100D PCI IRQs | 26 | * NAS100D PCI IRQs |
diff --git a/include/linux/mmc/mmc.h b/include/linux/mmc/mmc.h index f38872abc126..bdc556d88498 100644 --- a/include/linux/mmc/mmc.h +++ b/include/linux/mmc/mmc.h | |||
@@ -49,7 +49,7 @@ struct mmc_command { | |||
49 | /* | 49 | /* |
50 | * These are the command types. | 50 | * These are the command types. |
51 | */ | 51 | */ |
52 | #define mmc_cmd_type(cmd) ((cmd)->flags & MMC_CMD_TYPE) | 52 | #define mmc_cmd_type(cmd) ((cmd)->flags & MMC_CMD_MASK) |
53 | 53 | ||
54 | unsigned int retries; /* max number of retries */ | 54 | unsigned int retries; /* max number of retries */ |
55 | unsigned int error; /* command error */ | 55 | unsigned int error; /* command error */ |