From 18cc6757532e3b0e7a569b1631869c812b777196 Mon Sep 17 00:00:00 2001 From: Peter Samuelson Date: Tue, 8 May 2007 23:34:18 -0400 Subject: Input: logips2pp - add type 72 (PS/2 TrackMan Marble) This is purely cosmetic: this is standard 3-button, no wheel or other such features, so it already _worked_ just fine. This patch suppresses a warning about the unknown model, and changes the printk from "Mouse" to "TrackMan". Signed-off-by: Peter Samuelson Signed-off-by: Dmitry Torokhov --- drivers/input/mouse/logips2pp.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers') diff --git a/drivers/input/mouse/logips2pp.c b/drivers/input/mouse/logips2pp.c index 9df74b72e6c4..0c5660d28caa 100644 --- a/drivers/input/mouse/logips2pp.c +++ b/drivers/input/mouse/logips2pp.c @@ -221,6 +221,7 @@ static const struct ps2pp_info *get_model_info(unsigned char model) { 66, PS2PP_KIND_MX, /* MX3100 reciver */ PS2PP_WHEEL | PS2PP_SIDE_BTN | PS2PP_TASK_BTN | PS2PP_EXTRA_BTN | PS2PP_NAV_BTN | PS2PP_HWHEEL }, + { 72, PS2PP_KIND_TRACKMAN, 0 }, /* T-CH11: TrackMan Marble */ { 73, 0, PS2PP_SIDE_BTN }, { 75, PS2PP_KIND_WHEEL, PS2PP_WHEEL }, { 76, PS2PP_KIND_WHEEL, PS2PP_WHEEL }, -- cgit v1.2.3 From 7d7b33d6d558ea43018c3b2a94c6d52e78128cbe Mon Sep 17 00:00:00 2001 From: Dmitry Torokhov Date: Tue, 8 May 2007 23:34:30 -0400 Subject: Input: adbhid - do not access input_dev->private directly Use input_get_drvdata() and input_set_drvdata() helpers to do that. Signed-off-by: Dmitry Torokhov --- drivers/macintosh/adbhid.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'drivers') diff --git a/drivers/macintosh/adbhid.c b/drivers/macintosh/adbhid.c index b77ef5187d6d..b46817f699f1 100644 --- a/drivers/macintosh/adbhid.c +++ b/drivers/macintosh/adbhid.c @@ -628,16 +628,16 @@ static void real_leds(unsigned char leds, int device) */ static int adbhid_kbd_event(struct input_dev *dev, unsigned int type, unsigned int code, int value) { - struct adbhid *adbhid = dev->private; + struct adbhid *adbhid = input_get_drvdata(dev); unsigned char leds; switch (type) { case EV_LED: - leds = (test_bit(LED_SCROLLL, dev->led) ? 4 : 0) - | (test_bit(LED_NUML, dev->led) ? 1 : 0) - | (test_bit(LED_CAPSL, dev->led) ? 2 : 0); - real_leds(leds, adbhid->id); - return 0; + leds = (test_bit(LED_SCROLLL, dev->led) ? 4 : 0) | + (test_bit(LED_NUML, dev->led) ? 1 : 0) | + (test_bit(LED_CAPSL, dev->led) ? 2 : 0); + real_leds(leds, adbhid->id); + return 0; } return -1; @@ -649,7 +649,7 @@ adb_message_handler(struct notifier_block *this, unsigned long code, void *x) switch (code) { case ADB_MSG_PRE_RESET: case ADB_MSG_POWERDOWN: - /* Stop the repeat timer. Autopoll is already off at this point */ + /* Stop the repeat timer. Autopoll is already off at this point */ { int i; for (i = 1; i < 16; i++) { @@ -699,7 +699,7 @@ adbhid_input_register(int id, int default_id, int original_handler_id, hid->current_handler_id = current_handler_id; hid->mouse_kind = mouse_kind; hid->flags = 0; - input_dev->private = hid; + input_set_drvdata(input_dev, hid); input_dev->name = hid->name; input_dev->phys = hid->phys; input_dev->id.bustype = BUS_ADB; -- cgit v1.2.3 From 049fa57ce3b22d9f5acb251070941b630ee71d6e Mon Sep 17 00:00:00 2001 From: Kristoffer Ericson Date: Sat, 12 May 2007 20:28:05 +0900 Subject: input: hp680_ts compile fixes. Trivial fix to follow the DECLARE_WORK changes, this makes the HD64461 touchscreen driver work properly again. As pointed out by David Howells. Signed-off-by: Kristoffer Ericson Signed-off-by: Paul Mundt --- drivers/input/touchscreen/hp680_ts_input.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'drivers') diff --git a/drivers/input/touchscreen/hp680_ts_input.c b/drivers/input/touchscreen/hp680_ts_input.c index 61c15024c2a0..1a15475aedfc 100644 --- a/drivers/input/touchscreen/hp680_ts_input.c +++ b/drivers/input/touchscreen/hp680_ts_input.c @@ -1,7 +1,6 @@ #include #include #include - #include #include #include @@ -18,12 +17,12 @@ #define PHDR 0xa400012e #define SCPDR 0xa4000136 -static void do_softint(void *data); +static void do_softint(struct work_struct *work); static struct input_dev *hp680_ts_dev; -static DECLARE_WORK(work, do_softint); +static DECLARE_DELAYED_WORK(work, do_softint); -static void do_softint(void *data) +static void do_softint(struct work_struct *work) { int absx = 0, absy = 0; u8 scpdr; -- cgit v1.2.3 From c7754d465b1feade85b5f1c4492781a30f6652a2 Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Tue, 15 May 2007 17:03:54 -0700 Subject: [SPARC64]: Add hypervisor API negotiation and fix console bugs. Hypervisor interfaces need to be negotiated in order to use some API calls reliably. So add a small set of interfaces to request API versions and query current settings. This allows us to fix some bugs in the hypervisor console: 1) If we can negotiate API group CORE of at least major 1 minor 1 we can use con_read and con_write which can improve console performance quite a bit. 2) When we do a console write request, we should hold the spinlock around the whole request, not a byte at a time. What would happen is that it's easy for output from different cpus to get mixed with each other. 3) Use consistent udelay() based polling, udelay(1) each loop with a limit of 1000 polls to handle stuck hypervisor console. Signed-off-by: David S. Miller --- drivers/serial/sunhv.c | 276 ++++++++++++++++++++++++++++++++++++------------- 1 file changed, 205 insertions(+), 71 deletions(-) (limited to 'drivers') diff --git a/drivers/serial/sunhv.c b/drivers/serial/sunhv.c index c3a6bd2e7950..96557e6dba60 100644 --- a/drivers/serial/sunhv.c +++ b/drivers/serial/sunhv.c @@ -1,6 +1,6 @@ /* sunhv.c: Serial driver for SUN4V hypervisor console. * - * Copyright (C) 2006 David S. Miller (davem@davemloft.net) + * Copyright (C) 2006, 2007 David S. Miller (davem@davemloft.net) */ #include @@ -35,57 +35,51 @@ #define CON_BREAK ((long)-1) #define CON_HUP ((long)-2) -static inline long hypervisor_con_getchar(long *status) -{ - register unsigned long func asm("%o5"); - register unsigned long arg0 asm("%o0"); - register unsigned long arg1 asm("%o1"); - - func = HV_FAST_CONS_GETCHAR; - arg0 = 0; - arg1 = 0; - __asm__ __volatile__("ta %6" - : "=&r" (func), "=&r" (arg0), "=&r" (arg1) - : "0" (func), "1" (arg0), "2" (arg1), - "i" (HV_FAST_TRAP)); +#define IGNORE_BREAK 0x1 +#define IGNORE_ALL 0x2 - *status = arg0; +static char *con_write_page; +static char *con_read_page; - return (long) arg1; -} +static int hung_up = 0; -static inline long hypervisor_con_putchar(long ch) +static void transmit_chars_putchar(struct uart_port *port, struct circ_buf *xmit) { - register unsigned long func asm("%o5"); - register unsigned long arg0 asm("%o0"); + while (!uart_circ_empty(xmit)) { + long status = sun4v_con_putchar(xmit->buf[xmit->tail]); - func = HV_FAST_CONS_PUTCHAR; - arg0 = ch; - __asm__ __volatile__("ta %4" - : "=&r" (func), "=&r" (arg0) - : "0" (func), "1" (arg0), "i" (HV_FAST_TRAP)); + if (status != HV_EOK) + break; - return (long) arg0; + xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1); + port->icount.tx++; + } } -#define IGNORE_BREAK 0x1 -#define IGNORE_ALL 0x2 +static void transmit_chars_write(struct uart_port *port, struct circ_buf *xmit) +{ + while (!uart_circ_empty(xmit)) { + unsigned long ra = __pa(xmit->buf + xmit->tail); + unsigned long len, status, sent; -static int hung_up = 0; + len = CIRC_CNT_TO_END(xmit->head, xmit->tail, + UART_XMIT_SIZE); + status = sun4v_con_write(ra, len, &sent); + if (status != HV_EOK) + break; + xmit->tail = (xmit->tail + sent) & (UART_XMIT_SIZE - 1); + port->icount.tx += sent; + } +} -static struct tty_struct *receive_chars(struct uart_port *port) +static int receive_chars_getchar(struct uart_port *port, struct tty_struct *tty) { - struct tty_struct *tty = NULL; int saw_console_brk = 0; int limit = 10000; - if (port->info != NULL) /* Unopened serial console */ - tty = port->info->tty; - while (limit-- > 0) { long status; - long c = hypervisor_con_getchar(&status); - unsigned char flag; + long c = sun4v_con_getchar(&status); if (status == HV_EWOULDBLOCK) break; @@ -110,27 +104,90 @@ static struct tty_struct *receive_chars(struct uart_port *port) continue; } - flag = TTY_NORMAL; port->icount.rx++; - if (c == CON_BREAK) { - port->icount.brk++; - if (uart_handle_break(port)) - continue; - flag = TTY_BREAK; - } if (uart_handle_sysrq_char(port, c)) continue; - if ((port->ignore_status_mask & IGNORE_ALL) || - ((port->ignore_status_mask & IGNORE_BREAK) && - (c == CON_BREAK))) + tty_insert_flip_char(tty, c, TTY_NORMAL); + } + + return saw_console_brk; +} + +static int receive_chars_read(struct uart_port *port, struct tty_struct *tty) +{ + int saw_console_brk = 0; + int limit = 10000; + + while (limit-- > 0) { + unsigned long ra = __pa(con_read_page); + unsigned long bytes_read, i; + long stat = sun4v_con_read(ra, PAGE_SIZE, &bytes_read); + + if (stat != HV_EOK) { + bytes_read = 0; + + if (stat == CON_BREAK) { + if (uart_handle_break(port)) + continue; + saw_console_brk = 1; + *con_read_page = 0; + bytes_read = 1; + } else if (stat == CON_HUP) { + hung_up = 1; + uart_handle_dcd_change(port, 0); + continue; + } else { + /* HV_EWOULDBLOCK, etc. */ + break; + } + } + + if (hung_up) { + hung_up = 0; + uart_handle_dcd_change(port, 1); + } + + for (i = 0; i < bytes_read; i++) + uart_handle_sysrq_char(port, con_read_page[i]); + + if (tty == NULL) continue; - tty_insert_flip_char(tty, c, flag); + port->icount.rx += bytes_read; + + tty_insert_flip_string(tty, con_read_page, bytes_read); } - if (saw_console_brk) + return saw_console_brk; +} + +struct sunhv_ops { + void (*transmit_chars)(struct uart_port *port, struct circ_buf *xmit); + int (*receive_chars)(struct uart_port *port, struct tty_struct *tty); +}; + +static struct sunhv_ops bychar_ops = { + .transmit_chars = transmit_chars_putchar, + .receive_chars = receive_chars_getchar, +}; + +static struct sunhv_ops bywrite_ops = { + .transmit_chars = transmit_chars_write, + .receive_chars = receive_chars_read, +}; + +static struct sunhv_ops *sunhv_ops = &bychar_ops; + +static struct tty_struct *receive_chars(struct uart_port *port) +{ + struct tty_struct *tty = NULL; + + if (port->info != NULL) /* Unopened serial console */ + tty = port->info->tty; + + if (sunhv_ops->receive_chars(port, tty)) sun_do_break(); return tty; @@ -147,15 +204,7 @@ static void transmit_chars(struct uart_port *port) if (uart_circ_empty(xmit) || uart_tx_stopped(port)) return; - while (!uart_circ_empty(xmit)) { - long status = hypervisor_con_putchar(xmit->buf[xmit->tail]); - - if (status != HV_EOK) - break; - - xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1); - port->icount.tx++; - } + sunhv_ops->transmit_chars(port, xmit); if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) uart_write_wakeup(port); @@ -212,7 +261,7 @@ static void sunhv_start_tx(struct uart_port *port) struct circ_buf *xmit = &port->info->xmit; while (!uart_circ_empty(xmit)) { - long status = hypervisor_con_putchar(xmit->buf[xmit->tail]); + long status = sun4v_con_putchar(xmit->buf[xmit->tail]); if (status != HV_EOK) break; @@ -231,9 +280,10 @@ static void sunhv_send_xchar(struct uart_port *port, char ch) spin_lock_irqsave(&port->lock, flags); while (limit-- > 0) { - long status = hypervisor_con_putchar(ch); + long status = sun4v_con_putchar(ch); if (status == HV_EOK) break; + udelay(1); } spin_unlock_irqrestore(&port->lock, flags); @@ -254,15 +304,15 @@ static void sunhv_break_ctl(struct uart_port *port, int break_state) { if (break_state) { unsigned long flags; - int limit = 1000000; + int limit = 10000; spin_lock_irqsave(&port->lock, flags); while (limit-- > 0) { - long status = hypervisor_con_putchar(CON_BREAK); + long status = sun4v_con_putchar(CON_BREAK); if (status == HV_EOK) break; - udelay(2); + udelay(1); } spin_unlock_irqrestore(&port->lock, flags); @@ -359,38 +409,99 @@ static struct uart_driver sunhv_reg = { static struct uart_port *sunhv_port; -static inline void sunhv_console_putchar(struct uart_port *port, char c) +/* Copy 's' into the con_write_page, decoding "\n" into + * "\r\n" along the way. We have to return two lengths + * because the caller needs to know how much to advance + * 's' and also how many bytes to output via con_write_page. + */ +static int fill_con_write_page(const char *s, unsigned int n, + unsigned long *page_bytes) +{ + const char *orig_s = s; + char *p = con_write_page; + int left = PAGE_SIZE; + + while (n--) { + if (*s == '\n') { + if (left < 2) + break; + *p++ = '\r'; + left--; + } else if (left < 1) + break; + *p++ = *s++; + left--; + } + *page_bytes = p - con_write_page; + return s - orig_s; +} + +static void sunhv_console_write_paged(struct console *con, const char *s, unsigned n) { + struct uart_port *port = sunhv_port; unsigned long flags; - int limit = 1000000; spin_lock_irqsave(&port->lock, flags); + while (n > 0) { + unsigned long ra = __pa(con_write_page); + unsigned long page_bytes; + unsigned int cpy = fill_con_write_page(s, n, + &page_bytes); + + n -= cpy; + s += cpy; + while (page_bytes > 0) { + unsigned long written; + int limit = 1000000; + + while (limit--) { + unsigned long stat; + + stat = sun4v_con_write(ra, page_bytes, + &written); + if (stat == HV_EOK) + break; + udelay(1); + } + if (limit <= 0) + break; + page_bytes -= written; + ra += written; + } + } + spin_unlock_irqrestore(&port->lock, flags); +} + +static inline void sunhv_console_putchar(struct uart_port *port, char c) +{ + int limit = 1000000; while (limit-- > 0) { - long status = hypervisor_con_putchar(c); + long status = sun4v_con_putchar(c); if (status == HV_EOK) break; - udelay(2); + udelay(1); } - - spin_unlock_irqrestore(&port->lock, flags); } -static void sunhv_console_write(struct console *con, const char *s, unsigned n) +static void sunhv_console_write_bychar(struct console *con, const char *s, unsigned n) { struct uart_port *port = sunhv_port; + unsigned long flags; int i; + spin_lock_irqsave(&port->lock, flags); for (i = 0; i < n; i++) { if (*s == '\n') sunhv_console_putchar(port, '\r'); sunhv_console_putchar(port, *s++); } + spin_unlock_irqrestore(&port->lock, flags); } static struct console sunhv_console = { .name = "ttyHV", - .write = sunhv_console_write, + .write = sunhv_console_write_bychar, .device = uart_console_device, .flags = CON_PRINTBUFFER, .index = -1, @@ -410,6 +521,7 @@ static inline struct console *SUNHV_CONSOLE(void) static int __devinit hv_probe(struct of_device *op, const struct of_device_id *match) { struct uart_port *port; + unsigned long minor; int err; if (op->irqs[0] == 0xffffffff) @@ -419,6 +531,22 @@ static int __devinit hv_probe(struct of_device *op, const struct of_device_id *m if (unlikely(!port)) return -ENOMEM; + minor = 1; + if (sun4v_hvapi_register(HV_GRP_CORE, 1, &minor) == 0 && + minor >= 1) { + err = -ENOMEM; + con_write_page = kzalloc(PAGE_SIZE, GFP_KERNEL); + if (!con_write_page) + goto out_free_port; + + con_read_page = kzalloc(PAGE_SIZE, GFP_KERNEL); + if (!con_read_page) + goto out_free_con_write_page; + + sunhv_console.write = sunhv_console_write_paged; + sunhv_ops = &bywrite_ops; + } + sunhv_port = port; port->line = 0; @@ -437,7 +565,7 @@ static int __devinit hv_probe(struct of_device *op, const struct of_device_id *m err = uart_register_driver(&sunhv_reg); if (err) - goto out_free_port; + goto out_free_con_read_page; sunhv_reg.tty_driver->name_base = sunhv_reg.minor - 64; sunserial_current_minor += 1; @@ -463,6 +591,12 @@ out_unregister_driver: sunserial_current_minor -= 1; uart_unregister_driver(&sunhv_reg); +out_free_con_read_page: + kfree(con_read_page); + +out_free_con_write_page: + kfree(con_write_page); + out_free_port: kfree(port); sunhv_port = NULL; -- cgit v1.2.3 From d1c68fa6ce7e56e300d8561bb3b6492c336df863 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 15 May 2007 08:21:17 +0100 Subject: pata_scc had been missed by ata_std_prereset() switch Signed-off-by: Al Viro Signed-off-by: Jeff Garzik --- drivers/ata/pata_scc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/ata/pata_scc.c b/drivers/ata/pata_scc.c index cca3aa225efe..844e53b280c7 100644 --- a/drivers/ata/pata_scc.c +++ b/drivers/ata/pata_scc.c @@ -864,10 +864,10 @@ static void scc_bmdma_freeze (struct ata_port *ap) * @ap: ATA port to be reset */ -static int scc_pata_prereset (struct ata_port *ap) +static int scc_pata_prereset (struct ata_port *ap, unsigned long deadline) { ap->cbl = ATA_CBL_PATA80; - return ata_std_prereset(ap); + return ata_std_prereset(ap, deadline); } /** -- cgit v1.2.3 From fe30911b34098db58c21d0f936f6c3f17f32deb8 Mon Sep 17 00:00:00 2001 From: Tejun Heo Date: Tue, 15 May 2007 03:28:15 +0900 Subject: libata: separate out ata_dev_reread_id() Separate out ata_dev_reread_id() from ata_dev_revalidate(). ata_dev_reread_id() reads IDENTIFY page and determines whether the same device is still there. ata_dev_revalidate() reconfigures after reread completes. This will be used by ACPI update. Signed-off-by: Tejun Heo Signed-off-by: Jeff Garzik --- drivers/ata/libata-core.c | 47 ++++++++++++++++++++++++++++++++++------------- drivers/ata/libata.h | 3 ++- 2 files changed, 36 insertions(+), 14 deletions(-) (limited to 'drivers') diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 4166407eb47c..6f266c8179ec 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -3675,8 +3675,8 @@ static int ata_dev_same_device(struct ata_device *dev, unsigned int new_class, } /** - * ata_dev_revalidate - Revalidate ATA device - * @dev: device to revalidate + * ata_dev_reread_id - Re-read IDENTIFY data + * @adev: target ATA device * @readid_flags: read ID flags * * Re-read IDENTIFY page and make sure @dev is still attached to @@ -3688,29 +3688,50 @@ static int ata_dev_same_device(struct ata_device *dev, unsigned int new_class, * RETURNS: * 0 on success, negative errno otherwise */ -int ata_dev_revalidate(struct ata_device *dev, unsigned int readid_flags) +int ata_dev_reread_id(struct ata_device *dev, unsigned int readid_flags) { unsigned int class = dev->class; u16 *id = (void *)dev->ap->sector_buf; int rc; - if (!ata_dev_enabled(dev)) { - rc = -ENODEV; - goto fail; - } - /* read ID data */ rc = ata_dev_read_id(dev, &class, readid_flags, id); if (rc) - goto fail; + return rc; /* is the device still there? */ - if (!ata_dev_same_device(dev, class, id)) { - rc = -ENODEV; - goto fail; - } + if (!ata_dev_same_device(dev, class, id)) + return -ENODEV; memcpy(dev->id, id, sizeof(id[0]) * ATA_ID_WORDS); + return 0; +} + +/** + * ata_dev_revalidate - Revalidate ATA device + * @dev: device to revalidate + * @readid_flags: read ID flags + * + * Re-read IDENTIFY page, make sure @dev is still attached to the + * port and reconfigure it according to the new IDENTIFY page. + * + * LOCKING: + * Kernel thread context (may sleep) + * + * RETURNS: + * 0 on success, negative errno otherwise + */ +int ata_dev_revalidate(struct ata_device *dev, unsigned int readid_flags) +{ + int rc; + + if (!ata_dev_enabled(dev)) + return -ENODEV; + + /* re-read ID */ + rc = ata_dev_reread_id(dev, readid_flags); + if (rc) + goto fail; /* configure device according to the new ID */ rc = ata_dev_configure(dev); diff --git a/drivers/ata/libata.h b/drivers/ata/libata.h index 8b71b73a199c..13cb0c9af68d 100644 --- a/drivers/ata/libata.h +++ b/drivers/ata/libata.h @@ -76,7 +76,8 @@ extern unsigned ata_exec_internal_sg(struct ata_device *dev, extern unsigned int ata_do_simple_cmd(struct ata_device *dev, u8 cmd); extern int ata_dev_read_id(struct ata_device *dev, unsigned int *p_class, unsigned int flags, u16 *id); -extern int ata_dev_revalidate(struct ata_device *dev, unsigned int flags); +extern int ata_dev_reread_id(struct ata_device *dev, unsigned int readid_flags); +extern int ata_dev_revalidate(struct ata_device *dev, unsigned int readid_flags); extern int ata_dev_configure(struct ata_device *dev); extern int sata_down_spd_limit(struct ata_port *ap); extern int sata_set_spd_needed(struct ata_port *ap); -- cgit v1.2.3 From 6ddcd3b0201a7ad72294347636d2b4028ddbd95d Mon Sep 17 00:00:00 2001 From: Tejun Heo Date: Tue, 15 May 2007 03:28:15 +0900 Subject: libata: during revalidation, check n_sectors after device is configured Device might be resized during ata_dev_configure() due to HPA or (later) ACPI _GTF. Currently it's worked around by caching n_sectors before turning off HPA. The cached original size is overwritten if the device is reconfigured without being hardreset - which always happens after configuring trasnfer mode. If the device gets hardreset for some reason after that, revalidation fails with -ENODEV. This patch makes size checking more robust by moving n_sectors check from ata_dev_reread_id() to ata_dev_revalidate() after the device is fully configured. No matter what happens during configuration, a device must have the same n_sectors after fully configured to be treated as the same device. Signed-off-by: Tejun Heo Signed-off-by: Jeff Garzik --- drivers/ata/libata-core.c | 33 +++++++++++++++------------------ 1 file changed, 15 insertions(+), 18 deletions(-) (limited to 'drivers') diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 6f266c8179ec..d5939e659cbb 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -1919,7 +1919,6 @@ int ata_dev_configure(struct ata_device *dev) snprintf(revbuf, 7, "ATA-%d", ata_id_major_version(id)); dev->n_sectors = ata_id_n_sectors(id); - dev->n_sectors_boot = dev->n_sectors; /* SCSI only uses 4-char revisions, dump full 8 chars from ATA */ ata_id_c_string(dev->id, fwrevbuf, ATA_ID_FW_REV, @@ -3632,7 +3631,6 @@ static int ata_dev_same_device(struct ata_device *dev, unsigned int new_class, const u16 *old_id = dev->id; unsigned char model[2][ATA_ID_PROD_LEN + 1]; unsigned char serial[2][ATA_ID_SERNO_LEN + 1]; - u64 new_n_sectors; if (dev->class != new_class) { ata_dev_printk(dev, KERN_INFO, "class mismatch %d != %d\n", @@ -3644,7 +3642,6 @@ static int ata_dev_same_device(struct ata_device *dev, unsigned int new_class, ata_id_c_string(new_id, model[1], ATA_ID_PROD, sizeof(model[1])); ata_id_c_string(old_id, serial[0], ATA_ID_SERNO, sizeof(serial[0])); ata_id_c_string(new_id, serial[1], ATA_ID_SERNO, sizeof(serial[1])); - new_n_sectors = ata_id_n_sectors(new_id); if (strcmp(model[0], model[1])) { ata_dev_printk(dev, KERN_INFO, "model number mismatch " @@ -3658,19 +3655,6 @@ static int ata_dev_same_device(struct ata_device *dev, unsigned int new_class, return 0; } - if (dev->class == ATA_DEV_ATA && dev->n_sectors != new_n_sectors) { - ata_dev_printk(dev, KERN_INFO, "n_sectors mismatch " - "%llu != %llu\n", - (unsigned long long)dev->n_sectors, - (unsigned long long)new_n_sectors); - /* Are we the boot time size - if so we appear to be the - same disk at this point and our HPA got reapplied */ - if (ata_ignore_hpa && dev->n_sectors_boot == new_n_sectors - && ata_id_hpa_enabled(new_id)) - return 1; - return 0; - } - return 1; } @@ -3723,6 +3707,7 @@ int ata_dev_reread_id(struct ata_device *dev, unsigned int readid_flags) */ int ata_dev_revalidate(struct ata_device *dev, unsigned int readid_flags) { + u64 n_sectors = dev->n_sectors; int rc; if (!ata_dev_enabled(dev)) @@ -3735,8 +3720,20 @@ int ata_dev_revalidate(struct ata_device *dev, unsigned int readid_flags) /* configure device according to the new ID */ rc = ata_dev_configure(dev); - if (rc == 0) - return 0; + if (rc) + goto fail; + + /* verify n_sectors hasn't changed */ + if (dev->class == ATA_DEV_ATA && dev->n_sectors != n_sectors) { + ata_dev_printk(dev, KERN_INFO, "n_sectors mismatch " + "%llu != %llu\n", + (unsigned long long)n_sectors, + (unsigned long long)dev->n_sectors); + rc = -ENODEV; + goto fail; + } + + return 0; fail: ata_dev_printk(dev, KERN_ERR, "revalidation failed (errno=%d)\n", rc); -- cgit v1.2.3 From 3cadbcc09891b8544203f211dac13f9cc4e6832a Mon Sep 17 00:00:00 2001 From: Tejun Heo Date: Tue, 15 May 2007 03:28:15 +0900 Subject: libata-acpi: add ATA_FLAG_ACPI_SATA port flag Whether a controller needs IDE or SATA ACPI hierarchy is determined by the programming interface of the controller not by whether the controller is SATA or PATA, or it supports slave device or not. This patch adds ATA_FLAG_ACPI_SATA port flags which tells libata-acpi that the port needs SATA ACPI nodes, and sets the flag for ahci and sata_sil24. Signed-off-by: Tejun Heo Signed-off-by: Jeff Garzik --- drivers/ata/ahci.c | 3 ++- drivers/ata/libata-acpi.c | 10 +++++----- drivers/ata/sata_sil24.c | 3 ++- 3 files changed, 9 insertions(+), 7 deletions(-) (limited to 'drivers') diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index 1ae443d7ab92..e00e1b913d28 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c @@ -173,7 +173,8 @@ enum { AHCI_FLAG_COMMON = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY | ATA_FLAG_MMIO | ATA_FLAG_PIO_DMA | - ATA_FLAG_SKIP_D2H_BSY, + ATA_FLAG_SKIP_D2H_BSY | + ATA_FLAG_ACPI_SATA, }; struct ahci_cmd_hdr { diff --git a/drivers/ata/libata-acpi.c b/drivers/ata/libata-acpi.c index ed4138e24b0c..02236739b40f 100644 --- a/drivers/ata/libata-acpi.c +++ b/drivers/ata/libata-acpi.c @@ -321,7 +321,7 @@ static int do_drive_get_GTF(struct ata_device *dev, unsigned int *gtf_length, /* Don't continue if device has no _ADR method. * _GTF is intended for known motherboard devices. */ - if (!(ap->cbl == ATA_CBL_SATA)) { + if (!(ap->flags & ATA_FLAG_ACPI_SATA)) { err = pata_get_dev_handle(gdev, &dev_handle, &pcidevfn); if (err < 0) { if (ata_msg_probe(ap)) @@ -343,7 +343,7 @@ static int do_drive_get_GTF(struct ata_device *dev, unsigned int *gtf_length, /* Get this drive's _ADR info. if not already known. */ if (!dev->obj_handle) { - if (!(ap->cbl == ATA_CBL_SATA)) { + if (!(ap->flags & ATA_FLAG_ACPI_SATA)) { /* get child objects of dev_handle == channel objects, * + _their_ children == drive objects */ /* channel is ap->port_no */ @@ -528,7 +528,7 @@ static int do_drive_set_taskfiles(struct ata_device *dev, ata_dev_printk(dev, KERN_DEBUG, "%s: ENTER: port#: %d\n", __FUNCTION__, ap->port_no); - if (libata_noacpi || !(ap->cbl == ATA_CBL_SATA)) + if (libata_noacpi || !(ap->flags & ATA_FLAG_ACPI_SATA)) return 0; if (!ata_dev_enabled(dev) || (ap->flags & ATA_FLAG_DISABLED)) @@ -578,7 +578,7 @@ int ata_acpi_exec_tfs(struct ata_port *ap) * we should not run GTF on PATA devices since some * PATA require execution of GTM/STM before GTF. */ - if (!(ap->cbl == ATA_CBL_SATA)) + if (!(ap->flags & ATA_FLAG_ACPI_SATA)) return 0; for (ix = 0; ix < ATA_MAX_DEVICES; ix++) { @@ -641,7 +641,7 @@ int ata_acpi_push_id(struct ata_device *dev) __FUNCTION__, dev->devno, ap->port_no); /* Don't continue if not a SATA device. */ - if (!(ap->cbl == ATA_CBL_SATA)) { + if (!(ap->flags & ATA_FLAG_ACPI_SATA)) { if (ata_msg_probe(ap)) ata_dev_printk(dev, KERN_DEBUG, "%s: Not a SATA device\n", __FUNCTION__); diff --git a/drivers/ata/sata_sil24.c b/drivers/ata/sata_sil24.c index a69d78cd8e9b..0cb6618935b1 100644 --- a/drivers/ata/sata_sil24.c +++ b/drivers/ata/sata_sil24.c @@ -237,7 +237,8 @@ enum { /* host flags */ SIL24_COMMON_FLAGS = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY | ATA_FLAG_MMIO | ATA_FLAG_PIO_DMA | - ATA_FLAG_NCQ | ATA_FLAG_SKIP_D2H_BSY, + ATA_FLAG_NCQ | ATA_FLAG_SKIP_D2H_BSY | + ATA_FLAG_ACPI_SATA, SIL24_FLAG_PCIX_IRQ_WOC = (1 << 24), /* IRQ loss errata on PCI-X */ IRQ_STAT_4PORTS = 0xf, -- cgit v1.2.3 From da071b42f73dabbd0daf7ea4c3ff157d53b00648 Mon Sep 17 00:00:00 2001 From: Tejun Heo Date: Mon, 14 May 2007 17:26:18 +0200 Subject: libata: fix shutdown warning message printing Unlocking ap->lock and ssleeping don't work because SCSI commands can be issued from completion path without context. Reimplement delayed completion by allowing translation functions to override qc->scsidone(), storing the original completion function to scmd->scsi_done() and overriding qc->scsidone() with a function which schedules delayed invocation of scmd->scsi_done(). This isn't pretty at all but all the ugly parts are thankfully contained in the stop translation path where the compat feature is implemented. Signed-off-by: Tejun Heo Signed-off-by: Jeff Garzik --- drivers/ata/libata-scsi.c | 35 +++++++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 8 deletions(-) (limited to 'drivers') diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index dd81fa78cdcf..07b5a3d4ed21 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c @@ -893,6 +893,23 @@ int ata_scsi_change_queue_depth(struct scsi_device *sdev, int queue_depth) return queue_depth; } +/* XXX: for ata_spindown_compat */ +static void ata_delayed_done_timerfn(unsigned long arg) +{ + struct scsi_cmnd *scmd = (void *)arg; + + scmd->scsi_done(scmd); +} + +/* XXX: for ata_spindown_compat */ +static void ata_delayed_done(struct scsi_cmnd *scmd) +{ + static struct timer_list timer; + + setup_timer(&timer, ata_delayed_done_timerfn, (unsigned long)scmd); + mod_timer(&timer, jiffies + 5 * HZ); +} + /** * ata_scsi_start_stop_xlat - Translate SCSI START STOP UNIT command * @qc: Storage for translated ATA taskfile @@ -952,19 +969,21 @@ static unsigned int ata_scsi_start_stop_xlat(struct ata_queued_cmd *qc) if (ata_spindown_compat && (system_state == SYSTEM_HALT || system_state == SYSTEM_POWER_OFF)) { - static int warned = 0; + static unsigned long warned = 0; - if (!warned) { - spin_unlock_irq(qc->ap->lock); + if (!test_and_set_bit(0, &warned)) { ata_dev_printk(qc->dev, KERN_WARNING, "DISK MIGHT NOT BE SPUN DOWN PROPERLY. " "UPDATE SHUTDOWN UTILITY\n"); ata_dev_printk(qc->dev, KERN_WARNING, "For more info, visit " "http://linux-ata.org/shutdown.html\n"); - warned = 1; - ssleep(5); - spin_lock_irq(qc->ap->lock); + + /* ->scsi_done is not used, use it for + * delayed completion. + */ + scmd->scsi_done = qc->scsidone; + qc->scsidone = ata_delayed_done; } scmd->result = SAM_STAT_GOOD; return 1; @@ -1488,14 +1507,14 @@ static int ata_scsi_translate(struct ata_device *dev, struct scsi_cmnd *cmd, early_finish: ata_qc_free(qc); - done(cmd); + qc->scsidone(cmd); DPRINTK("EXIT - early finish (good or error)\n"); return 0; err_did: ata_qc_free(qc); cmd->result = (DID_ERROR << 16); - done(cmd); + qc->scsidone(cmd); err_mem: DPRINTK("EXIT - internal\n"); return 0; -- cgit v1.2.3 From 13b8d09f5de0aaa3153bbccc98baf247387823dc Mon Sep 17 00:00:00 2001 From: Tejun Heo Date: Tue, 15 May 2007 12:29:22 +0200 Subject: libata: track spindown status and skip spindown_compat if possible Our assumption that most distros issue STANDBYNOW seems wrong. The upstream sysvinit and thus many distros including gentoo and opensuse don't take any action for libata disks on spindown. We can skip compat handling for these distros so that they don't need to update anything to take advantage of kernel-side shutdown. Signed-off-by: Tejun Heo Signed-off-by: Jeff Garzik --- drivers/ata/libata-scsi.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'drivers') diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index 07b5a3d4ed21..b6a1de8fad5b 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c @@ -967,6 +967,7 @@ static unsigned int ata_scsi_start_stop_xlat(struct ata_queued_cmd *qc) * for more info. */ if (ata_spindown_compat && + (qc->dev->flags & ATA_DFLAG_SPUNDOWN) && (system_state == SYSTEM_HALT || system_state == SYSTEM_POWER_OFF)) { static unsigned long warned = 0; @@ -1394,6 +1395,14 @@ static void ata_scsi_qc_complete(struct ata_queued_cmd *qc) } } + /* XXX: track spindown state for spindown_compat */ + if (unlikely(qc->tf.command == ATA_CMD_STANDBY || + qc->tf.command == ATA_CMD_STANDBYNOW1)) + qc->dev->flags |= ATA_DFLAG_SPUNDOWN; + else if (likely(system_state != SYSTEM_HALT && + system_state != SYSTEM_POWER_OFF)) + qc->dev->flags &= ~ATA_DFLAG_SPUNDOWN; + if (need_sense && !ap->ops->error_handler) ata_dump_status(ap->print_id, &qc->result_tf); -- cgit v1.2.3 From 869b2b444c58302e3233ce0b671fabf28135a37d Mon Sep 17 00:00:00 2001 From: Martin Peschke Date: Wed, 9 May 2007 11:01:20 +0200 Subject: [SCSI] zfcp: avoid clutter in erp_dbf avoid clutter in erp_dbf cleanup zfcp_fsf_req_dismiss functions: - avoid clutter in erp_dbf (reqs_active is always 0) - fold called three-line function into calling function - add meaningful comment - coding style Signed-off-by: Martin Peschke Signed-off-by: Swen Schillig Signed-off-by: James Bottomley --- drivers/s390/scsi/zfcp_fsf.c | 40 +++++++++++++--------------------------- 1 file changed, 13 insertions(+), 27 deletions(-) (limited to 'drivers') diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c index a8b02542ac2d..0eb31e162b15 100644 --- a/drivers/s390/scsi/zfcp_fsf.c +++ b/drivers/s390/scsi/zfcp_fsf.c @@ -156,44 +156,30 @@ zfcp_fsf_req_free(struct zfcp_fsf_req *fsf_req) kfree(fsf_req); } -/** - * zfcp_fsf_req_dismiss - dismiss a single fsf request - */ -static void zfcp_fsf_req_dismiss(struct zfcp_adapter *adapter, - struct zfcp_fsf_req *fsf_req, - unsigned int counter) -{ - u64 dbg_tmp[2]; - - dbg_tmp[0] = (u64) atomic_read(&adapter->reqs_active); - dbg_tmp[1] = (u64) counter; - debug_event(adapter->erp_dbf, 4, (void *) dbg_tmp, 16); - list_del(&fsf_req->list); - fsf_req->status |= ZFCP_STATUS_FSFREQ_DISMISSED; - zfcp_fsf_req_complete(fsf_req); -} - -/** - * zfcp_fsf_req_dismiss_all - dismiss all remaining fsf requests +/* + * Never ever call this without shutting down the adapter first. + * Otherwise the adapter would continue using and corrupting s390 storage. + * Included BUG_ON() call to ensure this is done. + * ERP is supposed to be the only user of this function. */ void zfcp_fsf_req_dismiss_all(struct zfcp_adapter *adapter) { - struct zfcp_fsf_req *request, *tmp; + struct zfcp_fsf_req *fsf_req, *tmp; unsigned long flags; LIST_HEAD(remove_queue); - unsigned int i, counter; + unsigned int i; + BUG_ON(atomic_test_mask(ZFCP_STATUS_ADAPTER_QDIOUP, &adapter->status)); spin_lock_irqsave(&adapter->req_list_lock, flags); atomic_set(&adapter->reqs_active, 0); - for (i=0; ireq_list[i], &remove_queue); - spin_unlock_irqrestore(&adapter->req_list_lock, flags); - counter = 0; - list_for_each_entry_safe(request, tmp, &remove_queue, list) { - zfcp_fsf_req_dismiss(adapter, request, counter); - counter++; + list_for_each_entry_safe(fsf_req, tmp, &remove_queue, list) { + list_del(&fsf_req->list); + fsf_req->status |= ZFCP_STATUS_FSFREQ_DISMISSED; + zfcp_fsf_req_complete(fsf_req); } } -- cgit v1.2.3 From 9f28745a6b554fdd6b0dbc9856077701a55f9569 Mon Sep 17 00:00:00 2001 From: Michael Loehr Date: Wed, 9 May 2007 11:01:24 +0200 Subject: [SCSI] zfcp: IO stall after deleting and path checker changes after reenabling zfcp devices IO stall after deleting and path checker changes after reenabling zfcp device Setting one zfcp device offline using chccwdev in a multipath environment and waiting will lead to IO stall on all paths. After setting the zfcp device back online using chccwdev, the devices with io stall will have a different path checker. Devices corresponding to the deleted units are never freed. This has the effect that 'slave_destroy' is never called and zfcp still thinks that this unit is registered (ZFCP_STATUS_UNIT_REGISTERED is still set). Hence the erp routine is not called correctly and the unit is not enabled properly. Do not delete rport and the sdev. Just set the host to block on 'offline'. Setting host online again will then remove the blocked status and everything is fine again. Signed-off-by: Michael Loehr Signed-off-by: Swen Schillig Signed-off-by: James Bottomley --- drivers/s390/scsi/zfcp_aux.c | 1 + drivers/s390/scsi/zfcp_ccw.c | 5 +---- drivers/s390/scsi/zfcp_scsi.c | 3 +++ 3 files changed, 5 insertions(+), 4 deletions(-) (limited to 'drivers') diff --git a/drivers/s390/scsi/zfcp_aux.c b/drivers/s390/scsi/zfcp_aux.c index ddff40c4212c..821cde65e369 100644 --- a/drivers/s390/scsi/zfcp_aux.c +++ b/drivers/s390/scsi/zfcp_aux.c @@ -1127,6 +1127,7 @@ zfcp_adapter_dequeue(struct zfcp_adapter *adapter) int retval = 0; unsigned long flags; + zfcp_adapter_scsi_unregister(adapter); device_unregister(&adapter->generic_services); zfcp_sysfs_adapter_remove_files(&adapter->ccw_device->dev); dev_set_drvdata(&adapter->ccw_device->dev, NULL); diff --git a/drivers/s390/scsi/zfcp_ccw.c b/drivers/s390/scsi/zfcp_ccw.c index 81680efa1721..1c8f71a59855 100644 --- a/drivers/s390/scsi/zfcp_ccw.c +++ b/drivers/s390/scsi/zfcp_ccw.c @@ -189,9 +189,7 @@ zfcp_ccw_set_online(struct ccw_device *ccw_device) * @ccw_device: pointer to belonging ccw device * * This function gets called by the common i/o layer and sets an adapter - * into state offline. Setting an fcp device offline means that it will be - * unregistered from the SCSI stack and that the adapter will be shut down - * asynchronously. + * into state offline. */ static int zfcp_ccw_set_offline(struct ccw_device *ccw_device) @@ -202,7 +200,6 @@ zfcp_ccw_set_offline(struct ccw_device *ccw_device) adapter = dev_get_drvdata(&ccw_device->dev); zfcp_erp_adapter_shutdown(adapter, 0); zfcp_erp_wait(adapter); - zfcp_adapter_scsi_unregister(adapter); zfcp_erp_thread_kill(adapter); zfcp_adapter_debug_unregister(adapter); up(&zfcp_data.config_sema); diff --git a/drivers/s390/scsi/zfcp_scsi.c b/drivers/s390/scsi/zfcp_scsi.c index 16e2d64658af..0acf6db0a08d 100644 --- a/drivers/s390/scsi/zfcp_scsi.c +++ b/drivers/s390/scsi/zfcp_scsi.c @@ -569,6 +569,9 @@ zfcp_adapter_scsi_register(struct zfcp_adapter *adapter) int retval = 0; static unsigned int unique_id = 0; + if (adapter->scsi_host) + goto out; + /* register adapter as SCSI host with mid layer of SCSI stack */ adapter->scsi_host = scsi_host_alloc(&zfcp_data.scsi_host_template, sizeof (struct zfcp_adapter *)); -- cgit v1.2.3 From e45c7a43825b0feb161ef2ebe5324cd517dd4388 Mon Sep 17 00:00:00 2001 From: Andrew Victor Date: Mon, 14 May 2007 14:32:43 +0100 Subject: [ARM] 4378/1: KS8695: Serial driver fix A fix for a really stupid typo in the KS8695 serial driver. Signed-off-by: Andrew Victor Signed-off-by: Russell King --- drivers/serial/serial_ks8695.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/serial/serial_ks8695.c b/drivers/serial/serial_ks8695.c index c5346d677315..698763b28ddd 100644 --- a/drivers/serial/serial_ks8695.c +++ b/drivers/serial/serial_ks8695.c @@ -301,11 +301,11 @@ static int ks8695uart_startup(struct uart_port *port) retval = request_irq(KS8695_IRQ_UART_LINE_STATUS, ks8695uart_rx_chars, IRQF_DISABLED, "UART LineStatus", port); if (retval) - return err_ls; + goto err_ls; retval = request_irq(KS8695_IRQ_UART_MODEM_STATUS, ks8695uart_modem_status, IRQF_DISABLED, "UART ModemStatus", port); if (retval) - return err_ms; + goto err_ms; return 0; -- cgit v1.2.3 From 5af23d263c33a3f6fc93facfd87d2a091eff2060 Mon Sep 17 00:00:00 2001 From: Brian King Date: Wed, 9 May 2007 15:36:35 -0500 Subject: [SCSI] ipr: Proper return codes for eh_dev_reset for SATA devices Currently ipr always returns success from eh_dev_reset when called for a SATA device. If ata_do_eh is unable to recover for some reason, this can result in commands that are still outstanding when ata_do_eh returns. Change ipr to verify no commands are outstanding before returning success. Signed-off-by: Brian King Signed-off-by: James Bottomley --- drivers/scsi/ipr.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'drivers') diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c index 4baa79e68679..fa6ff295e568 100644 --- a/drivers/scsi/ipr.c +++ b/drivers/scsi/ipr.c @@ -3954,6 +3954,13 @@ static int __ipr_eh_dev_reset(struct scsi_cmnd * scsi_cmd) spin_unlock_irq(scsi_cmd->device->host->host_lock); ata_do_eh(ap, NULL, NULL, ipr_sata_reset, NULL); spin_lock_irq(scsi_cmd->device->host->host_lock); + + list_for_each_entry(ipr_cmd, &ioa_cfg->pending_q, queue) { + if (ipr_cmd->ioarcb.res_handle == res->cfgte.res_handle) { + rc = -EIO; + break; + } + } } else rc = ipr_device_reset(ioa_cfg, res); res->resetting_device = 0; -- cgit v1.2.3 From e0b2e597d5dd8c4f3778545f65c29a9c6aba0e3a Mon Sep 17 00:00:00 2001 From: Ed Lin Date: Wed, 9 May 2007 20:50:33 -0800 Subject: [SCSI] stex: fix id mapping issue The correct internal mapping of stex controllers should be: id:0~15, lun:0~7 (st_shasta) id:0, lun:0~127 (st_yosemite) id:0~127, lun:0 (st_vsc and st_vsc1) This patch reports the internal mapping to scsi mid layer, eliminating the translation between scsi mid layer and firmware. To achieve this goal, we also need to: -- fail the REPORT_LUNS command for st_shasta because the firmware is known to not report all actual luns -- add an entry in scsi_devindo.c to force sequential lun scan (for st_shasta controllers) -- fail the REPORT_LUNS command for console device -- remove special handling of REPORT_LUNS command for st_yosemite, as there is no translation mapping now Signed-off-by: Ed Lin Signed-off-by: James Bottomley --- drivers/scsi/scsi_devinfo.c | 1 + drivers/scsi/stex.c | 60 +++++++++++++++++++++------------------------ 2 files changed, 29 insertions(+), 32 deletions(-) (limited to 'drivers') diff --git a/drivers/scsi/scsi_devinfo.c b/drivers/scsi/scsi_devinfo.c index ce63044b1ec8..18dd5cc4d7c6 100644 --- a/drivers/scsi/scsi_devinfo.c +++ b/drivers/scsi/scsi_devinfo.c @@ -209,6 +209,7 @@ static struct { {"PIONEER", "CD-ROM DRM-602X", NULL, BLIST_FORCELUN | BLIST_SINGLELUN}, {"PIONEER", "CD-ROM DRM-604X", NULL, BLIST_FORCELUN | BLIST_SINGLELUN}, {"PIONEER", "CD-ROM DRM-624X", NULL, BLIST_FORCELUN | BLIST_SINGLELUN}, + {"Promise", "", NULL, BLIST_SPARSELUN}, {"REGAL", "CDC-4X", NULL, BLIST_MAX5LUN | BLIST_SINGLELUN}, {"SanDisk", "ImageMate CF-SD1", NULL, BLIST_FORCELUN}, {"SEAGATE", "ST34555N", "0930", BLIST_NOTQ}, /* Chokes on tagged INQUIRY */ diff --git a/drivers/scsi/stex.c b/drivers/scsi/stex.c index 69be1324b114..96dcbac9545e 100644 --- a/drivers/scsi/stex.c +++ b/drivers/scsi/stex.c @@ -113,10 +113,6 @@ enum { SG_CF_64B = 0x40, /* 64 bit item */ SG_CF_HOST = 0x20, /* sg in host memory */ - ST_MAX_ARRAY_SUPPORTED = 16, - ST_MAX_TARGET_NUM = (ST_MAX_ARRAY_SUPPORTED+1), - ST_MAX_LUN_PER_TARGET = 16, - st_shasta = 0, st_vsc = 1, st_vsc1 = 2, @@ -586,7 +582,7 @@ stex_queuecommand(struct scsi_cmnd *cmd, void (* done)(struct scsi_cmnd *)) u16 tag; host = cmd->device->host; id = cmd->device->id; - lun = cmd->device->channel; /* firmware lun issue work around */ + lun = cmd->device->lun; hba = (struct st_hba *) &host->hostdata[0]; switch (cmd->cmnd[0]) { @@ -605,8 +601,19 @@ stex_queuecommand(struct scsi_cmnd *cmd, void (* done)(struct scsi_cmnd *)) stex_invalid_field(cmd, done); return 0; } + case REPORT_LUNS: + /* + * The shasta firmware does not report actual luns in the + * target, so fail the command to force sequential lun scan. + * Also, the console device does not support this command. + */ + if (hba->cardtype == st_shasta || id == host->max_id - 1) { + stex_invalid_field(cmd, done); + return 0; + } + break; case INQUIRY: - if (id != ST_MAX_ARRAY_SUPPORTED) + if (id != host->max_id - 1) break; if (lun == 0 && (cmd->cmnd[1] & INQUIRY_EVPD) == 0) { stex_direct_copy(cmd, console_inq_page, @@ -624,7 +631,7 @@ stex_queuecommand(struct scsi_cmnd *cmd, void (* done)(struct scsi_cmnd *)) ver.oem = ST_OEM; ver.build = ST_BUILD_VER; ver.signature[0] = PASSTHRU_SIGNATURE; - ver.console_id = ST_MAX_ARRAY_SUPPORTED; + ver.console_id = host->max_id - 1; ver.host_no = hba->host->host_no; cmd->result = stex_direct_copy(cmd, &ver, sizeof(ver)) ? DID_OK << 16 | COMMAND_COMPLETE << 8 : @@ -645,13 +652,8 @@ stex_queuecommand(struct scsi_cmnd *cmd, void (* done)(struct scsi_cmnd *)) req = stex_alloc_req(hba); - if (hba->cardtype == st_yosemite) { - req->lun = lun * (ST_MAX_TARGET_NUM - 1) + id; - req->target = 0; - } else { - req->lun = lun; - req->target = id; - } + req->lun = lun; + req->target = id; /* cdb */ memcpy(req->cdb, cmd->cmnd, STEX_CDB_LENGTH); @@ -767,18 +769,6 @@ static void stex_ys_commands(struct st_hba *hba, ccb->srb_status = SRB_STATUS_SELECTION_TIMEOUT; else ccb->srb_status = SRB_STATUS_SUCCESS; - } else if (ccb->cmd->cmnd[0] == REPORT_LUNS) { - u8 *report_lun_data = (u8 *)hba->copy_buffer; - - count = STEX_EXTRA_SIZE; - stex_internal_copy(ccb->cmd, report_lun_data, - &count, ccb->sg_count, ST_FROM_CMD); - if (report_lun_data[2] || report_lun_data[3]) { - report_lun_data[2] = 0x00; - report_lun_data[3] = 0x08; - stex_internal_copy(ccb->cmd, report_lun_data, - &count, ccb->sg_count, ST_TO_CMD); - } } } @@ -1229,12 +1219,18 @@ stex_probe(struct pci_dev *pdev, const struct pci_device_id *id) hba->copy_buffer = hba->dma_mem + MU_BUFFER_SIZE; hba->mu_status = MU_STATE_STARTING; - /* firmware uses id/lun pair for a logical drive, but lun would be - always 0 if CONFIG_SCSI_MULTI_LUN not configured, so we use - channel to map lun here */ - host->max_channel = ST_MAX_LUN_PER_TARGET - 1; - host->max_id = ST_MAX_TARGET_NUM; - host->max_lun = 1; + if (hba->cardtype == st_shasta) { + host->max_lun = 8; + host->max_id = 16 + 1; + } else if (hba->cardtype == st_yosemite) { + host->max_lun = 128; + host->max_id = 1 + 1; + } else { + /* st_vsc and st_vsc1 */ + host->max_lun = 1; + host->max_id = 128 + 1; + } + host->max_channel = 0; host->unique_id = host->host_no; host->max_cmd_len = STEX_CDB_LENGTH; -- cgit v1.2.3 From 69f4a513911455670d3322fb5252b437c0485707 Mon Sep 17 00:00:00 2001 From: Ed Lin Date: Wed, 9 May 2007 20:50:37 -0800 Subject: [SCSI] stex: extend hard reset wait time During hard bus reset of st_shasta controllers, 1 ms is not enough for 16-port controllers, although it's good for 8-port controllers. Extend the wait time to 100 ms to allow bus resets finish successfully. Signed-off-by: Ed Lin Signed-off-by: James Bottomley --- drivers/scsi/stex.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/scsi/stex.c b/drivers/scsi/stex.c index 96dcbac9545e..81dd3b740daf 100644 --- a/drivers/scsi/stex.c +++ b/drivers/scsi/stex.c @@ -1041,7 +1041,12 @@ static void stex_hard_reset(struct st_hba *hba) pci_read_config_byte(bus->self, PCI_BRIDGE_CONTROL, &pci_bctl); pci_bctl |= PCI_BRIDGE_CTL_BUS_RESET; pci_write_config_byte(bus->self, PCI_BRIDGE_CONTROL, pci_bctl); - msleep(1); + + /* + * 1 ms may be enough for 8-port controllers. But 16-port controllers + * require more time to finish bus reset. Use 100 ms here for safety + */ + msleep(100); pci_bctl &= ~PCI_BRIDGE_CTL_BUS_RESET; pci_write_config_byte(bus->self, PCI_BRIDGE_CONTROL, pci_bctl); -- cgit v1.2.3 From d116a7bc6ab4dcf752078daeaf2276f7d7660595 Mon Sep 17 00:00:00 2001 From: Ed Lin Date: Wed, 9 May 2007 20:50:40 -0800 Subject: [SCSI] stex: fix reset recovery for console device After reset completed, the scsi error handler sends out TEST_UNIT_READY to the device. For 'normal' devices the command will be handled by firmware. However, because the RAID console only interfaces to scsi mid layer, the firmware will not process the command for it. This will make the console to be offlined right after reset. Add the handling in driver to fix this problem. Signed-off-by: Ed Lin Signed-off-by: James Bottomley --- drivers/scsi/stex.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'drivers') diff --git a/drivers/scsi/stex.c b/drivers/scsi/stex.c index 81dd3b740daf..47c2ef917fea 100644 --- a/drivers/scsi/stex.c +++ b/drivers/scsi/stex.c @@ -612,6 +612,13 @@ stex_queuecommand(struct scsi_cmnd *cmd, void (* done)(struct scsi_cmnd *)) return 0; } break; + case TEST_UNIT_READY: + if (id == host->max_id - 1) { + cmd->result = DID_OK << 16 | COMMAND_COMPLETE << 8; + done(cmd); + return 0; + } + break; case INQUIRY: if (id != host->max_id - 1) break; -- cgit v1.2.3 From c25da0afa753c29cd99fb41dc73a33ed69556965 Mon Sep 17 00:00:00 2001 From: Ed Lin Date: Wed, 9 May 2007 20:50:42 -0800 Subject: [SCSI] stex: minor cleanup and version update Add debug information into abort and host_reset routine. Change ioremap to ioremap_nocache. Version updated to 3.6.0000.1. Signed-off-by: Ed Lin Signed-off-by: James Bottomley --- drivers/scsi/stex.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'drivers') diff --git a/drivers/scsi/stex.c b/drivers/scsi/stex.c index 47c2ef917fea..9ac83abc4028 100644 --- a/drivers/scsi/stex.c +++ b/drivers/scsi/stex.c @@ -32,11 +32,12 @@ #include #include #include +#include #define DRV_NAME "stex" -#define ST_DRIVER_VERSION "3.1.0.1" +#define ST_DRIVER_VERSION "3.6.0000.1" #define ST_VER_MAJOR 3 -#define ST_VER_MINOR 1 +#define ST_VER_MINOR 6 #define ST_OEM 0 #define ST_BUILD_VER 1 @@ -992,6 +993,11 @@ static int stex_abort(struct scsi_cmnd *cmd) u32 data; int result = SUCCESS; unsigned long flags; + + printk(KERN_INFO DRV_NAME + "(%s): aborting command\n", pci_name(hba->pdev)); + scsi_print_command(cmd); + base = hba->mmio_base; spin_lock_irqsave(host->host_lock, flags); if (tag < host->can_queue && hba->ccb[tag].cmd == cmd) @@ -1077,6 +1083,10 @@ static int stex_reset(struct scsi_cmnd *cmd) unsigned long before; hba = (struct st_hba *) &cmd->device->host->hostdata[0]; + printk(KERN_INFO DRV_NAME + "(%s): resetting host\n", pci_name(hba->pdev)); + scsi_print_command(cmd); + hba->mu_status = MU_STATE_RESETTING; if (hba->cardtype == st_shasta) @@ -1196,7 +1206,7 @@ stex_probe(struct pci_dev *pdev, const struct pci_device_id *id) goto out_scsi_host_put; } - hba->mmio_base = ioremap(pci_resource_start(pdev, 0), + hba->mmio_base = ioremap_nocache(pci_resource_start(pdev, 0), pci_resource_len(pdev, 0)); if ( !hba->mmio_base) { printk(KERN_ERR DRV_NAME "(%s): memory map failed\n", -- cgit v1.2.3 From bcd4e22540309f2f135f278cffe134c63dbcaee5 Mon Sep 17 00:00:00 2001 From: FUJITA Tomonori Date: Fri, 11 May 2007 19:10:45 +0900 Subject: [SCSI] tgt: fix a rdma indirect transfer error bug This sets sg_dma_len to a proper value. Signed-off-by: FUJITA Tomonori Signed-off-by: James Bottomley --- drivers/scsi/libsrp.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers') diff --git a/drivers/scsi/libsrp.c b/drivers/scsi/libsrp.c index 5631c199a8eb..732446e63963 100644 --- a/drivers/scsi/libsrp.c +++ b/drivers/scsi/libsrp.c @@ -254,6 +254,7 @@ static int srp_indirect_data(struct scsi_cmnd *sc, struct srp_cmd *cmd, sg_init_one(&dummy, md, id->table_desc.len); sg_dma_address(&dummy) = token; + sg_dma_len(&dummy) = id->table_desc.len; err = rdma_io(sc, &dummy, 1, &id->table_desc, 1, DMA_TO_DEVICE, id->table_desc.len); if (err) { -- cgit v1.2.3 From 2ab01efd1d2a24db53b4c5d28a2e20cf2b1206c5 Mon Sep 17 00:00:00 2001 From: "Salyzyn, Mark" Date: Tue, 15 May 2007 09:14:21 -0400 Subject: [SCSI] aacraid: Correct sa platform support. (Was: [Bug 8469] Bad EIP value on pentium3 SMP kernel-2.6.21.1) http://bugzilla.kernel.org/show_bug.cgi?id=8469 As discussed in the bugzilla outlined below, we have an sa based (Mustang) RAID adapter on the system, a Dell PERC2/QC. Affected controllers are HP NetRAID, Adaptec AAC-364, Dell PERC2/QC or Adaptec 5400S. This problem coincides with the introduction of the adapter_comm and adapter_deliver platform functions (Message [PATCH 1/4] aacraid: rework communication support code, January 23 2007, which initially migrated to 2.6.21) The panic occurs with an uninitialized adapter_deliver platform function pointer. The enclosed patch, unmodified as tested by Rainer, solves the problem. Signed-off-by: Mark Salyzyn Signed-off-by: James Bottomley --- drivers/scsi/aacraid/aacraid.h | 1 + drivers/scsi/aacraid/rx.c | 2 +- drivers/scsi/aacraid/sa.c | 9 ++++++++- 3 files changed, 10 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/aacraid.h index 45ca3e801619..42311a7d7337 100644 --- a/drivers/scsi/aacraid/aacraid.h +++ b/drivers/scsi/aacraid/aacraid.h @@ -1823,6 +1823,7 @@ int aac_send_shutdown(struct aac_dev *dev); int aac_probe_container(struct aac_dev *dev, int cid); int _aac_rx_init(struct aac_dev *dev); int aac_rx_select_comm(struct aac_dev *dev, int comm); +int aac_rx_deliver_producer(struct fib * fib); extern int numacb; extern int acbsize; extern char aac_driver_version[]; diff --git a/drivers/scsi/aacraid/rx.c b/drivers/scsi/aacraid/rx.c index 291cd14f4e98..0d25853eb061 100644 --- a/drivers/scsi/aacraid/rx.c +++ b/drivers/scsi/aacraid/rx.c @@ -378,7 +378,7 @@ static int aac_rx_check_health(struct aac_dev *dev) * * Will send a fib, returning 0 if successful. */ -static int aac_rx_deliver_producer(struct fib * fib) +int aac_rx_deliver_producer(struct fib * fib) { struct aac_dev *dev = fib->dev; struct aac_queue *q = &dev->queues->queue[AdapNormCmdQueue]; diff --git a/drivers/scsi/aacraid/sa.c b/drivers/scsi/aacraid/sa.c index f4b5e9742ab0..85b91bc578c9 100644 --- a/drivers/scsi/aacraid/sa.c +++ b/drivers/scsi/aacraid/sa.c @@ -5,7 +5,7 @@ * based on the old aacraid driver that is.. * Adaptec aacraid device driver for Linux. * - * Copyright (c) 2000 Adaptec, Inc. (aacraid@adaptec.com) + * Copyright (c) 2000-2007 Adaptec, Inc. (aacraid@adaptec.com) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -257,6 +257,11 @@ static void aac_sa_start_adapter(struct aac_dev *dev) NULL, NULL, NULL, NULL, NULL); } +static int aac_sa_restart_adapter(struct aac_dev *dev, int bled) +{ + return -EINVAL; +} + /** * aac_sa_check_health * @dev: device to check if healthy @@ -366,7 +371,9 @@ int aac_sa_init(struct aac_dev *dev) dev->a_ops.adapter_notify = aac_sa_notify_adapter; dev->a_ops.adapter_sync_cmd = sa_sync_cmd; dev->a_ops.adapter_check_health = aac_sa_check_health; + dev->a_ops.adapter_restart = aac_sa_restart_adapter; dev->a_ops.adapter_intr = aac_sa_intr; + dev->a_ops.adapter_deliver = aac_rx_deliver_producer; dev->a_ops.adapter_ioremap = aac_sa_ioremap; /* -- cgit v1.2.3 From cab537d609fb718e9fb09d73e3e3e3062db25743 Mon Sep 17 00:00:00 2001 From: James Bottomley <[mailto:James.Bottomley@SteelEye.com]> Date: Wed, 16 May 2007 10:06:39 -0400 Subject: [SCSI] aacraid: fix panic on short Inquiry Unable to handle kernel paging request at ffff8101c0000000 RIP: [] :aacraid:aac_internal_transfer+0xd6/0xe3 PGD 8063 PUD 0 Oops: 0000 [1] SMP last sysfs file: /block/sdb/removable CPU 2 Modules linked in: autofs4(U) hidp(U) nfs(U) lockd(U) fscache(U) nfs_acl(U) rfcomm(U) l2cap(U) bluetooth(U) sunrpc(U) ipv6(U) cpufreq_ondemand(U) dm_mirror(U) dm_mod(U) video(U) sbs(U) i2c_ec(U) button(U) battery(U) asus_acpi(U) acpi_memhotplug(U) ac(U) parport_pc(U) lp(U) parport(U) joydev(U) ide_cd(U) i2c_i801(U) i2c_core(U) shpchp(U) cdrom(U) bnx2(U) sg(U) pcspkr(U) ata_piix(U) libata(U) aacraid(U) sd_mod(U) scsi_mod(U) ext3(U) jbd(U) ehci_hcd(U) ohci_hcd(U) uhci_hcd(U) Pid: 2352, comm: syslogd Not tainted 2.6.18-prep #1 RIP: 0010:[] [] :aacraid:aac_internal_transfer+0xd6/0xe3 RSP: 0000:ffff8101bfd1fe68 EFLAGS: 00010083 RAX: 0000000000000063 RBX: 0000000000000008 RCX: 00000000ffd1fea0 RDX: ffffffff802da628 RSI: ffff8101c0000000 RDI: ffff8101b2a08168 RBP: ffff8101b2728010 R08: ffffffff802da628 R09: 0000000000000046 R10: 0000000000000000 R11: 0000000000000080 R12: 0000000000000010 R13: ffff8101bfd1fea8 R14: ffff8101bc74df58 R15: ffff8101bc74df58 FS: 00002aaaab0146f0(0000) GS:ffff8101bfcd2e40(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b CR2: ffff8101c0000000 CR3: 00000001bdecd000 CR4: 00000000000006e0 Process syslogd (pid: 2352, threadinfo ffff8101bc74c000, task ffff8101bd979040) Stack: 0000000000000012 0000000000000036 0000000000000000 ffff8101bee9a800 ffff8101be9d3a00 ffff8101be9d3a00 ffff8101be8014f8 ffffffff880b26cc 40212227607e3141 2029282a26252423 0000000000000003 ffff810037e3a000 Call Trace: ] :aacraid:get_container_name_callback+0x8b/0xb5 [] :aacraid:aac_intr_normal+0x1b3/0x1f9 [] :aacraid:aac_rkt_intr+0x37/0x115 [] __rcu_process_callbacks+0xf8/0x1a8 [] handle_IRQ_event+0x29/0x58 [] __do_IRQ+0xa4/0x105 [] __do_softirq+0x5e/0xd5 [] do_IRQ+0xe7/0xf5 [] ret_from_intr+0x0/0xa On digging into it, it turned out that the customer was probing an aacraid device with an INQUIRY of 8 bytes. The way aacraid works, it was blindly trying to use aac_internal_transfer to copy the container name to byte 16 of the inquiry data, resulting in a negative transfer length. It then copies over the whole of kernel memory before dropping off the end. Fix updated and corrected by Mark Salyzyn Signed-off-by: James Bottomley --- drivers/scsi/aacraid/aachba.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c index 1e82c69b36b0..6c4319c98fee 100644 --- a/drivers/scsi/aacraid/aachba.c +++ b/drivers/scsi/aacraid/aachba.c @@ -340,7 +340,7 @@ int aac_get_containers(struct aac_dev *dev) static void aac_internal_transfer(struct scsi_cmnd *scsicmd, void *data, unsigned int offset, unsigned int len) { void *buf; - unsigned int transfer_len; + int transfer_len; struct scatterlist *sg = scsicmd->request_buffer; if (scsicmd->use_sg) { @@ -351,7 +351,7 @@ static void aac_internal_transfer(struct scsi_cmnd *scsicmd, void *data, unsigne transfer_len = min(scsicmd->request_bufflen, len + offset); } transfer_len -= offset; - if (buf && transfer_len) + if (buf && transfer_len > 0) memcpy(buf + offset, data, transfer_len); if (scsicmd->use_sg) -- cgit v1.2.3 From 0a4dd7783dfc62176a29cb349404180f24f46975 Mon Sep 17 00:00:00 2001 From: Domen Puncer Date: Tue, 15 May 2007 23:57:05 -0700 Subject: spi: fix spidev for >sizeof(long)/32 devices find_first_zero_bit accepts number of bits, not longs. Signed-off-by: Domen Puncer Signed-off-by: David Brownell Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/spi/spidev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c index c0a6dce800a3..225d6b2f82dd 100644 --- a/drivers/spi/spidev.c +++ b/drivers/spi/spidev.c @@ -484,7 +484,7 @@ static int spidev_probe(struct spi_device *spi) * Reusing minors is fine so long as udev or mdev is working. */ mutex_lock(&device_list_lock); - minor = find_first_zero_bit(minors, ARRAY_SIZE(minors)); + minor = find_first_zero_bit(minors, N_SPI_MINORS); if (minor < N_SPI_MINORS) { spidev->dev.parent = &spi->dev; spidev->dev.class = &spidev_class; -- cgit v1.2.3 From 8382d2b9a7205fe1fb262f59237715a40c911880 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Tue, 15 May 2007 23:57:08 -0700 Subject: parport_pc needs dma-mapping.h alpha: drivers/parport/parport_pc.c: In function 'parport_pc_fifo_write_block_dma': drivers/parport/parport_pc.c:636: warning: implicit declaration of function 'dma_map_single' drivers/parport/parport_pc.c:637: error: 'DMA_TO_DEVICE' undeclared (first use in this function) drivers/parport/parport_pc.c:637: error: (Each undeclared identifier is reported only once drivers/parport/parport_pc.c:637: error: for each function it appears in.) Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/parport/parport_pc.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers') diff --git a/drivers/parport/parport_pc.c b/drivers/parport/parport_pc.c index 02c0d52c9f76..7bfbad57879d 100644 --- a/drivers/parport/parport_pc.c +++ b/drivers/parport/parport_pc.c @@ -51,6 +51,7 @@ #include #include #include +#include #include #include #include -- cgit v1.2.3 From 40ebbcbf23d5592f58712fca2ab406ff818e2d65 Mon Sep 17 00:00:00 2001 From: Dave Jiang Date: Thu, 12 Apr 2007 13:34:55 -0700 Subject: [POWERPC] Fix comment in booke_wdt The early kernel parameter is wdt and not wdt_enable. according to arch/powerpc/kernel/setup_32.c. Signed-off-by: Dave Jiang Signed-off-by: Kumar Gala --- drivers/char/watchdog/booke_wdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/char/watchdog/booke_wdt.c b/drivers/char/watchdog/booke_wdt.c index 0e23f29f71ab..0f5c77ddd39d 100644 --- a/drivers/char/watchdog/booke_wdt.c +++ b/drivers/char/watchdog/booke_wdt.c @@ -24,7 +24,7 @@ #include #include -/* If the kernel parameter wdt_enable=1, the watchdog will be enabled at boot. +/* If the kernel parameter wdt=1, the watchdog will be enabled at boot. * Also, the wdt_period sets the watchdog timer period timeout. * For E500 cpus the wdt_period sets which bit changing from 0->1 will * trigger a watchog timeout. This watchdog timeout will occur 3 times, the -- cgit v1.2.3 From ccd308f09a6636d86dbe62bab892b96711feee67 Mon Sep 17 00:00:00 2001 From: Stephen Rothwell Date: Thu, 17 May 2007 11:22:15 +1000 Subject: [POWERPC] Remove build