From 1e483969930a82e16767884449f3a121a817ef00 Mon Sep 17 00:00:00 2001 From: David Shaohua Li Date: Thu, 1 Dec 2005 17:00:00 -0500 Subject: [ACPI] correct earlier SMP deep C-states on HT patch http://bugzilla.kernel.org/show_bug.cgi?id=5165 Change polarity of test for PLVL2_UP flag. Skip promotion/demotion code when not needed. Signed-off-by: Shaohua Li Signed-off-by: Venkatesh Pallipadi Signed-off-by: Len Brown --- drivers/acpi/processor_idle.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'drivers') diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index 83fd1b6..800f99c 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c @@ -278,8 +278,6 @@ static void acpi_processor_idle(void) } } - cx->usage++; - #ifdef CONFIG_HOTPLUG_CPU /* * Check for P_LVL2_UP flag before entering C2 and above on @@ -287,9 +285,12 @@ static void acpi_processor_idle(void) * detection phase, to work cleanly with logical CPU hotplug. */ if ((cx->type != ACPI_STATE_C1) && (num_online_cpus() > 1) && - !pr->flags.has_cst && acpi_fadt.plvl2_up) - cx->type = ACPI_STATE_C1; + !pr->flags.has_cst && !acpi_fadt.plvl2_up) + cx = &pr->power.states[ACPI_STATE_C1]; #endif + + cx->usage++; + /* * Sleep: * ------ @@ -378,6 +379,15 @@ static void acpi_processor_idle(void) next_state = pr->power.state; +#ifdef CONFIG_HOTPLUG_CPU + /* Don't do promotion/demotion */ + if ((cx->type == ACPI_STATE_C1) && (num_online_cpus() > 1) && + !pr->flags.has_cst && !acpi_fadt.plvl2_up) { + next_state = cx; + goto end; + } +#endif + /* * Promotion? * ---------- @@ -549,7 +559,7 @@ static int acpi_processor_get_power_info_fadt(struct acpi_processor *pr) * Check for P_LVL2_UP flag before entering C2 and above on * an SMP system. */ - if ((num_online_cpus() > 1) && acpi_fadt.plvl2_up) + if ((num_online_cpus() > 1) && !acpi_fadt.plvl2_up) return_VALUE(-ENODEV); #endif -- cgit v1.1 From 42e33148df38c60b99d984b76b302c64397ebe4c Mon Sep 17 00:00:00 2001 From: "James.Smart@Emulex.Com" Date: Thu, 15 Dec 2005 09:56:22 -0500 Subject: [SCSI] fix for fc transport recursion problem. In the scenario that a link was broken, the devloss timer for each rport was expire at roughly the same time, causing lots of "delete" workqueue items being queued. Depth is dependent upon the number of rports that were on the link. The rport target remove calls were calling flush_scheduled_work(), which would interrupt the stream, and start the next workqueue item, which did the same thing, and so on until recursion depth was large. This fix stops the recursion in the initial delete path, and pushes it off to a host-level work item that reaps the dead rports. Signed-off-by: James Bottomley --- drivers/scsi/scsi_transport_fc.c | 59 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 55 insertions(+), 4 deletions(-) (limited to 'drivers') diff --git a/drivers/scsi/scsi_transport_fc.c b/drivers/scsi/scsi_transport_fc.c index 6cd5931..2a1a99a 100644 --- a/drivers/scsi/scsi_transport_fc.c +++ b/drivers/scsi/scsi_transport_fc.c @@ -105,6 +105,7 @@ static struct { { FC_PORTSTATE_LINKDOWN, "Linkdown" }, { FC_PORTSTATE_ERROR, "Error" }, { FC_PORTSTATE_LOOPBACK, "Loopback" }, + { FC_PORTSTATE_DELETED, "Deleted" }, }; fc_enum_name_search(port_state, fc_port_state, fc_port_state_names) #define FC_PORTSTATE_MAX_NAMELEN 20 @@ -211,6 +212,7 @@ fc_bitfield_name_search(remote_port_roles, fc_remote_port_role_names) #define FC_MGMTSRVR_PORTID 0x00000a +static void fc_shost_remove_rports(void *data); static void fc_timeout_deleted_rport(void *data); static void fc_scsi_scan_rport(void *data); static void fc_rport_terminate(struct fc_rport *rport); @@ -318,6 +320,8 @@ static int fc_host_setup(struct transport_container *tc, struct device *dev, fc_host_next_rport_number(shost) = 0; fc_host_next_target_id(shost) = 0; + fc_host_flags(shost) = 0; + INIT_WORK(&fc_host_rport_del_work(shost), fc_shost_remove_rports, shost); return 0; } @@ -387,6 +391,7 @@ show_fc_rport_##field (struct class_device *cdev, char *buf) \ struct fc_internal *i = to_fc_internal(shost->transportt); \ if ((i->f->get_rport_##field) && \ !((rport->port_state == FC_PORTSTATE_BLOCKED) || \ + (rport->port_state == FC_PORTSTATE_DELETED) || \ (rport->port_state == FC_PORTSTATE_NOTPRESENT))) \ i->f->get_rport_##field(rport); \ return snprintf(buf, sz, format_string, cast rport->field); \ @@ -402,6 +407,7 @@ store_fc_rport_##field(struct class_device *cdev, const char *buf, \ struct Scsi_Host *shost = rport_to_shost(rport); \ struct fc_internal *i = to_fc_internal(shost->transportt); \ if ((rport->port_state == FC_PORTSTATE_BLOCKED) || \ + (rport->port_state == FC_PORTSTATE_DELETED) || \ (rport->port_state == FC_PORTSTATE_NOTPRESENT)) \ return -EBUSY; \ val = simple_strtoul(buf, NULL, 0); \ @@ -519,6 +525,7 @@ store_fc_rport_dev_loss_tmo(struct class_device *cdev, const char *buf, struct Scsi_Host *shost = rport_to_shost(rport); struct fc_internal *i = to_fc_internal(shost->transportt); if ((rport->port_state == FC_PORTSTATE_BLOCKED) || + (rport->port_state == FC_PORTSTATE_DELETED) || (rport->port_state == FC_PORTSTATE_NOTPRESENT)) return -EBUSY; val = simple_strtoul(buf, NULL, 0); @@ -1769,7 +1776,7 @@ fc_timeout_deleted_rport(void *data) rport->maxframe_size = -1; rport->supported_classes = FC_COS_UNSPECIFIED; rport->roles = FC_RPORT_ROLE_UNKNOWN; - rport->port_state = FC_PORTSTATE_NOTPRESENT; + rport->port_state = FC_PORTSTATE_DELETED; /* remove the identifiers that aren't used in the consisting binding */ switch (fc_host_tgtid_bind_type(shost)) { @@ -1789,14 +1796,23 @@ fc_timeout_deleted_rport(void *data) break; } - spin_unlock_irqrestore(shost->host_lock, flags); - /* * As this only occurs if the remote port (scsi target) * went away and didn't come back - we'll remove * all attached scsi devices. + * + * We'll schedule the shost work item to perform the actual removal + * to avoid recursion in the different flush calls if we perform + * the removal in each target - and there are lots of targets + * whose timeouts fire at the same time. */ - fc_rport_tgt_remove(rport); + + if ( !(fc_host_flags(shost) & FC_SHOST_RPORT_DEL_SCHEDULED)) { + fc_host_flags(shost) |= FC_SHOST_RPORT_DEL_SCHEDULED; + scsi_queue_work(shost, &fc_host_rport_del_work(shost)); + } + + spin_unlock_irqrestore(shost->host_lock, flags); } /** @@ -1818,6 +1834,41 @@ fc_scsi_scan_rport(void *data) } +/** + * fc_shost_remove_rports - called to remove all rports that are marked + * as in a deleted (not connected) state. + * + * @data: shost whose rports are to be looked at + **/ +static void +fc_shost_remove_rports(void *data) +{ + struct Scsi_Host *shost = (struct Scsi_Host *)data; + struct fc_rport *rport, *next_rport; + unsigned long flags; + + spin_lock_irqsave(shost->host_lock, flags); + while (fc_host_flags(shost) & FC_SHOST_RPORT_DEL_SCHEDULED) { + + fc_host_flags(shost) &= ~FC_SHOST_RPORT_DEL_SCHEDULED; + +restart_search: + list_for_each_entry_safe(rport, next_rport, + &fc_host_rport_bindings(shost), peers) { + if (rport->port_state == FC_PORTSTATE_DELETED) { + rport->port_state = FC_PORTSTATE_NOTPRESENT; + spin_unlock_irqrestore(shost->host_lock, flags); + fc_rport_tgt_remove(rport); + spin_lock_irqsave(shost->host_lock, flags); + goto restart_search; + } + } + + } + spin_unlock_irqrestore(shost->host_lock, flags); +} + + MODULE_AUTHOR("Martin Hicks"); MODULE_DESCRIPTION("FC Transport Attributes"); MODULE_LICENSE("GPL"); -- cgit v1.1 From 863a930a40eb7f2d18534c2c166b22582f5c6cfd Mon Sep 17 00:00:00 2001 From: James Bottomley Date: Thu, 15 Dec 2005 20:01:43 -0800 Subject: [SCSI] fix scsi_reap_target() device_del from atomic context scsi_reap_target() was desgined to be called from any context. However it must do a device_del() of the target device, which may only be called from user context. Thus we have to reimplement scsi_reap_target() via a workqueue. Signed-off-by: James Bottomley --- drivers/scsi/scsi_scan.c | 48 ++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 38 insertions(+), 10 deletions(-) (limited to 'drivers') diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c index 94e5167..e36c21e 100644 --- a/drivers/scsi/scsi_scan.c +++ b/drivers/scsi/scsi_scan.c @@ -400,6 +400,35 @@ static struct scsi_target *scsi_alloc_target(struct device *parent, return found_target; } +struct work_queue_wrapper { + struct work_struct work; + struct scsi_target *starget; +}; + +static void scsi_target_reap_work(void *data) { + struct work_queue_wrapper *wqw = (struct work_queue_wrapper *)data; + struct scsi_target *starget = wqw->starget; + struct Scsi_Host *shost = dev_to_shost(starget->dev.parent); + unsigned long flags; + + kfree(wqw); + + spin_lock_irqsave(shost->host_lock, flags); + + if (--starget->reap_ref == 0 && list_empty(&starget->devices)) { + list_del_init(&starget->siblings); + spin_unlock_irqrestore(shost->host_lock, flags); + device_del(&starget->dev); + transport_unregister_device(&starget->dev); + put_device(&starget->dev); + return; + + } + spin_unlock_irqrestore(shost->host_lock, flags); + + return; +} + /** * scsi_target_reap - check to see if target is in use and destroy if not * @@ -411,19 +440,18 @@ static struct scsi_target *scsi_alloc_target(struct device *parent, */ void scsi_target_reap(struct scsi_target *starget) { - struct Scsi_Host *shost = dev_to_shost(starget->dev.parent); - unsigned long flags; - spin_lock_irqsave(shost->host_lock, flags); + struct work_queue_wrapper *wqw = + kzalloc(sizeof(struct work_queue_wrapper), GFP_ATOMIC); - if (--starget->reap_ref == 0 && list_empty(&starget->devices)) { - list_del_init(&starget->siblings); - spin_unlock_irqrestore(shost->host_lock, flags); - device_del(&starget->dev); - transport_unregister_device(&starget->dev); - put_device(&starget->dev); + if (!wqw) { + starget_printk(KERN_ERR, starget, + "Failed to allocate memory in scsi_reap_target()\n"); return; } - spin_unlock_irqrestore(shost->host_lock, flags); + + INIT_WORK(&wqw->work, scsi_target_reap_work, wqw); + wqw->starget = starget; + schedule_work(&wqw->work); } /** -- cgit v1.1 From f85c657ff1f712abd5207a95fba8a5fcc282ab04 Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Mon, 19 Dec 2005 08:53:59 -0200 Subject: [PATCH] V4L/DVB (3188): Fix compilation failure with gcc 2.95.3. - Fix compilation failure with gcc 2.95.3. Signed-off-by: Jean Delvare Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/em28xx/em28xx-core.c | 6 +++--- drivers/media/video/em28xx/em28xx-i2c.c | 2 +- drivers/media/video/em28xx/em28xx-video.c | 2 +- drivers/media/video/em28xx/em28xx.h | 8 ++++---- drivers/media/video/saa7134/saa7134-alsa.c | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) (limited to 'drivers') diff --git a/drivers/media/video/em28xx/em28xx-core.c b/drivers/media/video/em28xx/em28xx-core.c index ec11619..0cfe754 100644 --- a/drivers/media/video/em28xx/em28xx-core.c +++ b/drivers/media/video/em28xx/em28xx-core.c @@ -39,7 +39,7 @@ MODULE_PARM_DESC(core_debug,"enable debug messages [core]"); #define em28xx_coredbg(fmt, arg...) do {\ if (core_debug) \ printk(KERN_INFO "%s %s :"fmt, \ - dev->name, __FUNCTION__, ##arg); } while (0) + dev->name, __FUNCTION__ , ##arg); } while (0) static unsigned int reg_debug; module_param(reg_debug,int,0644); @@ -48,7 +48,7 @@ MODULE_PARM_DESC(reg_debug,"enable debug messages [URB reg]"); #define em28xx_regdbg(fmt, arg...) do {\ if (reg_debug) \ printk(KERN_INFO "%s %s :"fmt, \ - dev->name, __FUNCTION__, ##arg); } while (0) + dev->name, __FUNCTION__ , ##arg); } while (0) static unsigned int isoc_debug; module_param(isoc_debug,int,0644); @@ -57,7 +57,7 @@ MODULE_PARM_DESC(isoc_debug,"enable debug messages [isoc transfers]"); #define em28xx_isocdbg(fmt, arg...) do {\ if (isoc_debug) \ printk(KERN_INFO "%s %s :"fmt, \ - dev->name, __FUNCTION__, ##arg); } while (0) + dev->name, __FUNCTION__ , ##arg); } while (0) static int alt = EM28XX_PINOUT; module_param(alt, int, 0644); diff --git a/drivers/media/video/em28xx/em28xx-i2c.c b/drivers/media/video/em28xx/em28xx-i2c.c index 29e21ad..7f56030 100644 --- a/drivers/media/video/em28xx/em28xx-i2c.c +++ b/drivers/media/video/em28xx/em28xx-i2c.c @@ -44,7 +44,7 @@ MODULE_PARM_DESC(i2c_debug, "enable debug messages [i2c]"); printk(fmt, ##args); } while (0) #define dprintk2(lvl,fmt, args...) if (i2c_debug>=lvl) do{ \ printk(KERN_DEBUG "%s at %s: " fmt, \ - dev->name, __FUNCTION__, ##args); } while (0) + dev->name, __FUNCTION__ , ##args); } while (0) /* * em2800_i2c_send_max4() diff --git a/drivers/media/video/em28xx/em28xx-video.c b/drivers/media/video/em28xx/em28xx-video.c index 8ecaa08..06d7687 100644 --- a/drivers/media/video/em28xx/em28xx-video.c +++ b/drivers/media/video/em28xx/em28xx-video.c @@ -45,7 +45,7 @@ #define em28xx_videodbg(fmt, arg...) do {\ if (video_debug) \ printk(KERN_INFO "%s %s :"fmt, \ - dev->name, __FUNCTION__, ##arg); } while (0) + dev->name, __FUNCTION__ , ##arg); } while (0) MODULE_AUTHOR(DRIVER_AUTHOR); MODULE_DESCRIPTION(DRIVER_DESC); diff --git a/drivers/media/video/em28xx/em28xx.h b/drivers/media/video/em28xx/em28xx.h index 1e2ee43..5c7a41c 100644 --- a/drivers/media/video/em28xx/em28xx.h +++ b/drivers/media/video/em28xx/em28xx.h @@ -392,18 +392,18 @@ extern const unsigned int em28xx_bcount; /* printk macros */ #define em28xx_err(fmt, arg...) do {\ - printk(KERN_ERR fmt, ##arg); } while (0) + printk(KERN_ERR fmt , ##arg); } while (0) #define em28xx_errdev(fmt, arg...) do {\ printk(KERN_ERR "%s: "fmt,\ - dev->name, ##arg); } while (0) + dev->name , ##arg); } while (0) #define em28xx_info(fmt, arg...) do {\ printk(KERN_INFO "%s: "fmt,\ - dev->name, ##arg); } while (0) + dev->name , ##arg); } while (0) #define em28xx_warn(fmt, arg...) do {\ printk(KERN_WARNING "%s: "fmt,\ - dev->name, ##arg); } while (0) + dev->name , ##arg); } while (0) inline static int em28xx_audio_source(struct em28xx *dev, int input) { diff --git a/drivers/media/video/saa7134/saa7134-alsa.c b/drivers/media/video/saa7134/saa7134-alsa.c index b24a26b..953d5fe 100644 --- a/drivers/media/video/saa7134/saa7134-alsa.c +++ b/drivers/media/video/saa7134/saa7134-alsa.c @@ -60,7 +60,7 @@ module_param_array(index, int, NULL, 0444); MODULE_PARM_DESC(index, "Index value for SAA7134 capture interface(s)."); #define dprintk(fmt, arg...) if (debug) \ - printk(KERN_DEBUG "%s/alsa: " fmt, dev->name, ## arg) + printk(KERN_DEBUG "%s/alsa: " fmt, dev->name , ##arg) -- cgit v1.1 From 3338761e6c52a8dee631dcc69129c625801ab132 Mon Sep 17 00:00:00 2001 From: Ricardo Cerqueira Date: Mon, 19 Dec 2005 08:54:11 -0200 Subject: [PATCH] V4L/DVB (3180): Fix tuner 100 definition for hauppauge eeprom - Tuner 100 is the TUNER_PHILIPS_FMD1216ME_MK3, not TUNER_ABSENT. This was causing the tuner module to be skipped, and rendered boards with this value in the eeprom (like the HVR1100) unable to tune Signed-off-by: Ricardo Cerqueira Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/tveeprom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/media/video/tveeprom.c b/drivers/media/video/tveeprom.c index cd7cf1b..5ac2353 100644 --- a/drivers/media/video/tveeprom.c +++ b/drivers/media/video/tveeprom.c @@ -206,7 +206,7 @@ hauppauge_tuner[] = { TUNER_ABSENT, "TCL 2002MI_3H"}, { TUNER_TCL_2002N, "TCL 2002N 5H"}, /* 100-109 */ - { TUNER_ABSENT, "Philips FMD1216ME"}, + { TUNER_PHILIPS_FMD1216ME_MK3, "Philips FMD1216ME"}, { TUNER_TEA5767, "Philips TEA5768HL FM Radio"}, { TUNER_ABSENT, "Panasonic ENV57H12D5"}, { TUNER_PHILIPS_FM1236_MK3, "TCL MFNM05-4"}, -- cgit v1.1 From 60edb13759096097b7208843dc9b7582a7d14c61 Mon Sep 17 00:00:00 2001 From: Oliver Endriss Date: Mon, 19 Dec 2005 08:54:11 -0200 Subject: [PATCH] V4L/DVB (3181): Enable SPDIF output for DVB-S rev 2.3 - Enable SPDIF output for DVB-S rev 2.3. Firmware 2623 or higher required. Signed-off-by: Oliver Endriss Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb/ttpci/av7110.c | 3 +++ drivers/media/dvb/ttpci/av7110_hw.h | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/media/dvb/ttpci/av7110.c b/drivers/media/dvb/ttpci/av7110.c index 992be0b..7dae91e 100644 --- a/drivers/media/dvb/ttpci/av7110.c +++ b/drivers/media/dvb/ttpci/av7110.c @@ -176,6 +176,9 @@ static void init_av7110_av(struct av7110 *av7110) } } + if (dev->pci->subsystem_vendor == 0x13c2 && dev->pci->subsystem_device == 0x000e) + av7110_fw_cmd(av7110, COMTYPE_AUDIODAC, SpdifSwitch, 1, 0); // SPDIF on + ret = av7110_set_volume(av7110, av7110->mixer.volume_left, av7110->mixer.volume_right); if (ret < 0) printk("dvb-ttpci:cannot set volume :%d\n",ret); diff --git a/drivers/media/dvb/ttpci/av7110_hw.h b/drivers/media/dvb/ttpci/av7110_hw.h index fedd20f..2a5e87b 100644 --- a/drivers/media/dvb/ttpci/av7110_hw.h +++ b/drivers/media/dvb/ttpci/av7110_hw.h @@ -143,7 +143,8 @@ enum av7110_audio_command { MainSwitch, ADSwitch, SendDiSEqC, - SetRegister + SetRegister, + SpdifSwitch }; enum av7110_request_command { -- cgit v1.1 From 468a0a54aabdac72e9c7bbd4f8372f1df2d9f0ae Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Mon, 19 Dec 2005 08:54:11 -0200 Subject: [PATCH] V4L/DVB (3189): Fix a broken logic that didn't cover all standards. - Fix a broken logic that didn't cover all standards. - Fix compilation failure with gcc 2.95.3. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/cx25840/cx25840-core.c | 42 +++++++++++++++++------------- 1 file changed, 24 insertions(+), 18 deletions(-) (limited to 'drivers') diff --git a/drivers/media/video/cx25840/cx25840-core.c b/drivers/media/video/cx25840/cx25840-core.c index aea3f03..5b93723 100644 --- a/drivers/media/video/cx25840/cx25840-core.c +++ b/drivers/media/video/cx25840/cx25840-core.c @@ -333,24 +333,30 @@ static int set_input(struct i2c_client *client, enum cx25840_input input) static int set_v4lstd(struct i2c_client *client, v4l2_std_id std) { - u8 fmt; - - switch (std) { - /* zero is autodetect */ - case 0: fmt = 0x0; break; - /* default ntsc to ntsc-m */ - case V4L2_STD_NTSC: - case V4L2_STD_NTSC_M: fmt = 0x1; break; - case V4L2_STD_NTSC_M_JP: fmt = 0x2; break; - case V4L2_STD_NTSC_443: fmt = 0x3; break; - case V4L2_STD_PAL: fmt = 0x4; break; - case V4L2_STD_PAL_M: fmt = 0x5; break; - case V4L2_STD_PAL_N: fmt = 0x6; break; - case V4L2_STD_PAL_Nc: fmt = 0x7; break; - case V4L2_STD_PAL_60: fmt = 0x8; break; - case V4L2_STD_SECAM: fmt = 0xc; break; - default: - return -ERANGE; + u8 fmt=0; /* zero is autodetect */ + + /* First tests should be against specific std */ + if (std & V4L2_STD_NTSC_M_JP) { + fmt=0x2; + } else if (std & V4L2_STD_NTSC_443) { + fmt=0x3; + } else if (std & V4L2_STD_PAL_M) { + fmt=0x5; + } else if (std & V4L2_STD_PAL_N) { + fmt=0x6; + } else if (std & V4L2_STD_PAL_Nc) { + fmt=0x7; + } else if (std & V4L2_STD_PAL_60) { + fmt=0x8; + } else { + /* Then, test against generic ones */ + if (std & V4L2_STD_NTSC) { + fmt=0x1; + } else if (std & V4L2_STD_PAL) { + fmt=0x4; + } else if (std & V4L2_STD_SECAM) { + fmt=0xc; + } } cx25840_and_or(client, 0x400, ~0xf, fmt); -- cgit v1.1 From ce37e5f90366cb90320a285edd2113fd807f3ab6 Mon Sep 17 00:00:00 2001 From: Adrian Bunk Date: Mon, 19 Dec 2005 14:52:24 -0800 Subject: [SPARC]: Fix RTC build failure. On sparc and sparc64, the rtc driver doesn't compile with PCI support disabled. Signed-off-by: Adrian Bunk Signed-off-by: David S. Miller --- drivers/char/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig index b46a72d..696f727 100644 --- a/drivers/char/Kconfig +++ b/drivers/char/Kconfig @@ -687,7 +687,7 @@ config NVRAM config RTC tristate "Enhanced Real Time Clock Support" - depends on !PPC32 && !PARISC && !IA64 && !M68K + depends on !PPC32 && !PARISC && !IA64 && !M68K && (!(SPARC32 || SPARC64) || PCI) ---help--- If you say Y here and create a character special file /dev/rtc with major number 10 and minor number 135 using mknod ("man mknod"), you -- cgit v1.1 From 8c2dc7e1e7213c55f1b97eba09de6c0cee9ad12f Mon Sep 17 00:00:00 2001 From: Michael Chan Date: Mon, 19 Dec 2005 16:26:02 -0800 Subject: [TG3]: Fix peer device handling Locate the pdev_peer for dual port 5714 NIC devices in addition to 5704 devices. The name is also changed to tg3_find_peer() from tg3_find_5704_peer(). It is also necessary to call netdev_priv() to get to the peer's private tg3 structure. Signed-off-by: Michael Chan Signed-off-by: David S. Miller --- drivers/net/tg3.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'drivers') diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index a23ed28..d869122 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c @@ -1017,13 +1017,16 @@ static void tg3_frob_aux_power(struct tg3 *tp) if ((tp->tg3_flags & TG3_FLAG_EEPROM_WRITE_PROT) != 0) return; - if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704) { - tp_peer = pci_get_drvdata(tp->pdev_peer); - if (!tp_peer) + if ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704) || + (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5714)) { + struct net_device *dev_peer; + + dev_peer = pci_get_drvdata(tp->pdev_peer); + if (!dev_peer) BUG(); + tp_peer = netdev_priv(dev_peer); } - if ((tp->tg3_flags & TG3_FLAG_WOL_ENABLE) != 0 || (tp->tg3_flags & TG3_FLAG_ENABLE_ASF) != 0 || (tp_peer->tg3_flags & TG3_FLAG_WOL_ENABLE) != 0 || @@ -10466,7 +10469,7 @@ static char * __devinit tg3_bus_string(struct tg3 *tp, char *str) return str; } -static struct pci_dev * __devinit tg3_find_5704_peer(struct tg3 *tp) +static struct pci_dev * __devinit tg3_find_peer(struct tg3 *tp) { struct pci_dev *peer; unsigned int func, devnr = tp->pdev->devfn & ~7; @@ -10719,8 +10722,9 @@ static int __devinit tg3_init_one(struct pci_dev *pdev, tp->rx_pending = 63; } - if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704) - tp->pdev_peer = tg3_find_5704_peer(tp); + if ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704) || + (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5714)) + tp->pdev_peer = tg3_find_peer(tp); err = tg3_get_device_address(tp); if (err) { -- cgit v1.1 From dc56b7d46dd2b303a844166ef931270b882bf08c Mon Sep 17 00:00:00 2001 From: Michael Chan Date: Mon, 19 Dec 2005 16:26:28 -0800 Subject: [TG3]: Some low power fixes Add some missing workarounds in tg3_set_power_state(): 1. Workaround to prevent overdrawing current on 5714. 2. Do not power down 5700's PHY because of hw limitation. Signed-off-by: Michael Chan Signed-off-by: David S. Miller --- drivers/net/tg3.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'drivers') diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index d869122..de898f1 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c @@ -1042,17 +1042,26 @@ static void tg3_frob_aux_power(struct tg3 *tp) udelay(100); } else { u32 no_gpio2; - u32 grc_local_ctrl; + u32 grc_local_ctrl = 0; if (tp_peer != tp && (tp_peer->tg3_flags & TG3_FLAG_INIT_COMPLETE) != 0) return; + /* Workaround to prevent overdrawing Amps. */ + if (GET_ASIC_REV(tp->pci_chip_rev_id) == + ASIC_REV_5714) { + grc_local_ctrl |= GRC_LCLCTRL_GPIO_OE3; + tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | + grc_local_ctrl); + udelay(100); + } + /* On 5753 and variants, GPIO2 cannot be used. */ no_gpio2 = tp->nic_sram_data_cfg & NIC_SRAM_DATA_CFG_NO_GPIO2; - grc_local_ctrl = GRC_LCLCTRL_GPIO_OE0 | + grc_local_ctrl |= GRC_LCLCTRL_GPIO_OE0 | GRC_LCLCTRL_GPIO_OE1 | GRC_LCLCTRL_GPIO_OE2 | GRC_LCLCTRL_GPIO_OUTPUT1 | @@ -1297,7 +1306,8 @@ static int tg3_set_power_state(struct tg3 *tp, int state) tg3_writephy(tp, MII_TG3_EXT_CTRL, MII_TG3_EXT_CTRL_FORCE_LED_OFF); tg3_writephy(tp, MII_TG3_AUX_CTRL, 0x01b2); - tg3_writephy(tp, MII_BMCR, BMCR_PDOWN); + if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5700) + tg3_writephy(tp, MII_BMCR, BMCR_PDOWN); } } -- cgit v1.1 From b401e9e2ec44a5fc1d8053546276bff584b7118e Mon Sep 17 00:00:00 2001 From: Michael Chan Date: Mon, 19 Dec 2005 16:27:04 -0800 Subject: [TG3]: Add tw32_wait_f() for some sensitive registers The tw32_f() function (register write with immediate read flush) can hang when used on some registers to switch clock frequencies and power. A new tw32_wait_f() is added for such registers with the delay before the read and after the read. Signed-off-by: Michael Chan Signed-off-by: David S. Miller --- drivers/net/tg3.c | 151 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 77 insertions(+), 74 deletions(-) (limited to 'drivers') diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index de898f1..b0d963c 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c @@ -341,6 +341,16 @@ static struct { { "interrupt test (offline)" }, }; +static void tg3_write32(struct tg3 *tp, u32 off, u32 val) +{ + writel(val, tp->regs + off); +} + +static u32 tg3_read32(struct tg3 *tp, u32 off) +{ + return (readl(tp->regs + off)); +} + static void tg3_write_indirect_reg32(struct tg3 *tp, u32 off, u32 val) { unsigned long flags; @@ -411,13 +421,29 @@ static u32 tg3_read_indirect_mbox(struct tg3 *tp, u32 off) return val; } -static void _tw32_flush(struct tg3 *tp, u32 off, u32 val) +/* usec_wait specifies the wait time in usec when writing to certain registers + * where it is unsafe to read back the register without some delay. + * GRC_LOCAL_CTRL is one example if the GPIOs are toggled to switch power. + * TG3PCI_CLOCK_CTRL is another example if the clock frequencies are changed. + */ +static void _tw32_flush(struct tg3 *tp, u32 off, u32 val, u32 usec_wait) { - tp->write32(tp, off, val); - if (!(tp->tg3_flags & TG3_FLAG_PCIX_TARGET_HWBUG) && - !(tp->tg3_flags & TG3_FLAG_5701_REG_WRITE_BUG) && - !(tp->tg3_flags2 & TG3_FLG2_ICH_WORKAROUND)) - tp->read32(tp, off); /* flush */ + if ((tp->tg3_flags & TG3_FLAG_PCIX_TARGET_HWBUG) || + (tp->tg3_flags2 & TG3_FLG2_ICH_WORKAROUND)) + /* Non-posted methods */ + tp->write32(tp, off, val); + else { + /* Posted method */ + tg3_write32(tp, off, val); + if (usec_wait) + udelay(usec_wait); + tp->read32(tp, off); + } + /* Wait again after the read for the posted method to guarantee that + * the wait time is met. + */ + if (usec_wait) + udelay(usec_wait); } static inline void tw32_mailbox_flush(struct tg3 *tp, u32 off, u32 val) @@ -438,16 +464,6 @@ static void tg3_write32_tx_mbox(struct tg3 *tp, u32 off, u32 val) readl(mbox); } -static void tg3_write32(struct tg3 *tp, u32 off, u32 val) -{ - writel(val, tp->regs + off); -} - -static u32 tg3_read32(struct tg3 *tp, u32 off) -{ - return (readl(tp->regs + off)); -} - #define tw32_mailbox(reg, val) tp->write32_mbox(tp, reg, val) #define tw32_mailbox_f(reg, val) tw32_mailbox_flush(tp, (reg), (val)) #define tw32_rx_mbox(reg, val) tp->write32_rx_mbox(tp, reg, val) @@ -455,7 +471,8 @@ static u32 tg3_read32(struct tg3 *tp, u32 off) #define tr32_mailbox(reg) tp->read32_mbox(tp, reg) #define tw32(reg,val) tp->write32(tp, reg, val) -#define tw32_f(reg,val) _tw32_flush(tp,(reg),(val)) +#define tw32_f(reg,val) _tw32_flush(tp,(reg),(val), 0) +#define tw32_wait_f(reg,val,us) _tw32_flush(tp,(reg),(val), (us)) #define tr32(reg) tp->read32(tp, reg) static void tg3_write_mem(struct tg3 *tp, u32 off, u32 val) @@ -595,21 +612,19 @@ static void tg3_switch_clocks(struct tg3 *tp) if (tp->tg3_flags2 & TG3_FLG2_5705_PLUS) { if (orig_clock_ctrl & CLOCK_CTRL_625_CORE) { - tw32_f(TG3PCI_CLOCK_CTRL, - clock_ctrl | CLOCK_CTRL_625_CORE); - udelay(40); + tw32_wait_f(TG3PCI_CLOCK_CTRL, + clock_ctrl | CLOCK_CTRL_625_CORE, 40); } } else if ((orig_clock_ctrl & CLOCK_CTRL_44MHZ_CORE) != 0) { - tw32_f(TG3PCI_CLOCK_CTRL, - clock_ctrl | - (CLOCK_CTRL_44MHZ_CORE | CLOCK_CTRL_ALTCLK)); - udelay(40); - tw32_f(TG3PCI_CLOCK_CTRL, - clock_ctrl | (CLOCK_CTRL_ALTCLK)); - udelay(40); + tw32_wait_f(TG3PCI_CLOCK_CTRL, + clock_ctrl | + (CLOCK_CTRL_44MHZ_CORE | CLOCK_CTRL_ALTCLK), + 40); + tw32_wait_f(TG3PCI_CLOCK_CTRL, + clock_ctrl | (CLOCK_CTRL_ALTCLK), + 40); } - tw32_f(TG3PCI_CLOCK_CTRL, clock_ctrl); - udelay(40); + tw32_wait_f(TG3PCI_CLOCK_CTRL, clock_ctrl, 40); } #define PHY_BUSY_LOOPS 5000 @@ -1033,13 +1048,13 @@ static void tg3_frob_aux_power(struct tg3 *tp) (tp_peer->tg3_flags & TG3_FLAG_ENABLE_ASF) != 0) { if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5700 || GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5701) { - tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | - (GRC_LCLCTRL_GPIO_OE0 | - GRC_LCLCTRL_GPIO_OE1 | - GRC_LCLCTRL_GPIO_OE2 | - GRC_LCLCTRL_GPIO_OUTPUT0 | - GRC_LCLCTRL_GPIO_OUTPUT1)); - udelay(100); + tw32_wait_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | + (GRC_LCLCTRL_GPIO_OE0 | + GRC_LCLCTRL_GPIO_OE1 | + GRC_LCLCTRL_GPIO_OE2 | + GRC_LCLCTRL_GPIO_OUTPUT0 | + GRC_LCLCTRL_GPIO_OUTPUT1), + 100); } else { u32 no_gpio2; u32 grc_local_ctrl = 0; @@ -1052,9 +1067,8 @@ static void tg3_frob_aux_power(struct tg3 *tp) if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5714) { grc_local_ctrl |= GRC_LCLCTRL_GPIO_OE3; - tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | - grc_local_ctrl); - udelay(100); + tw32_wait_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | + grc_local_ctrl, 100); } /* On 5753 and variants, GPIO2 cannot be used. */ @@ -1070,21 +1084,18 @@ static void tg3_frob_aux_power(struct tg3 *tp) grc_local_ctrl &= ~(GRC_LCLCTRL_GPIO_OE2 | GRC_LCLCTRL_GPIO_OUTPUT2); } - tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | - grc_local_ctrl); - udelay(100); + tw32_wait_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | + grc_local_ctrl, 100); grc_local_ctrl |= GRC_LCLCTRL_GPIO_OUTPUT0; - tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | - grc_local_ctrl); - udelay(100); + tw32_wait_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | + grc_local_ctrl, 100); if (!no_gpio2) { grc_local_ctrl &= ~GRC_LCLCTRL_GPIO_OUTPUT2; - tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | - grc_local_ctrl); - udelay(100); + tw32_wait_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | + grc_local_ctrl, 100); } } } else { @@ -1094,19 +1105,16 @@ static void tg3_frob_aux_power(struct tg3 *tp) (tp_peer->tg3_flags & TG3_FLAG_INIT_COMPLETE) != 0) return; - tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | - (GRC_LCLCTRL_GPIO_OE1 | - GRC_LCLCTRL_GPIO_OUTPUT1)); - udelay(100); + tw32_wait_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | + (GRC_LCLCTRL_GPIO_OE1 | + GRC_LCLCTRL_GPIO_OUTPUT1), 100); - tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | - (GRC_LCLCTRL_GPIO_OE1)); - udelay(100); + tw32_wait_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | + GRC_LCLCTRL_GPIO_OE1, 100); - tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | - (GRC_LCLCTRL_GPIO_OE1 | - GRC_LCLCTRL_GPIO_OUTPUT1)); - udelay(100); + tw32_wait_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl | + (GRC_LCLCTRL_GPIO_OE1 | + GRC_LCLCTRL_GPIO_OUTPUT1), 100); } } } @@ -1149,10 +1157,8 @@ static int tg3_set_power_state(struct tg3 *tp, int state) udelay(100); /* Delay after power state change */ /* Switch out of Vaux if it is not a LOM */ - if (!(tp->tg3_flags & TG3_FLAG_EEPROM_WRITE_PROT)) { - tw32_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl); - udelay(100); - } + if (!(tp->tg3_flags & TG3_FLAG_EEPROM_WRITE_PROT)) + tw32_wait_f(GRC_LOCAL_CTRL, tp->grc_local_ctrl, 100); return 0; @@ -1251,10 +1257,8 @@ static int tg3_set_power_state(struct tg3 *tp, int state) base_val |= (CLOCK_CTRL_RXCLK_DISABLE | CLOCK_CTRL_TXCLK_DISABLE); - tw32_f(TG3PCI_CLOCK_CTRL, base_val | - CLOCK_CTRL_ALTCLK | - CLOCK_CTRL_PWRDOWN_PLL133); - udelay(40); + tw32_wait_f(TG3PCI_CLOCK_CTRL, base_val | CLOCK_CTRL_ALTCLK | + CLOCK_CTRL_PWRDOWN_PLL133, 40); } else if (tp->tg3_flags2 & TG3_FLG2_5780_CLASS) { /* do nothing */ } else if (!((tp->tg3_flags2 & TG3_FLG2_5750_PLUS) && @@ -1275,11 +1279,11 @@ static int tg3_set_power_state(struct tg3 *tp, int state) newbits2 = newbits1 | CLOCK_CTRL_44MHZ_CORE; } - tw32_f(TG3PCI_CLOCK_CTRL, tp->pci_clock_ctrl | newbits1); - udelay(40); + tw32_wait_f(TG3PCI_CLOCK_CTRL, tp->pci_clock_ctrl | newbits1, + 40); - tw32_f(TG3PCI_CLOCK_CTRL, tp->pci_clock_ctrl | newbits2); - udelay(40); + tw32_wait_f(TG3PCI_CLOCK_CTRL, tp->pci_clock_ctrl | newbits2, + 40); if (!(tp->tg3_flags2 & TG3_FLG2_5705_PLUS)) { u32 newbits3; @@ -1293,9 +1297,8 @@ static int tg3_set_power_state(struct tg3 *tp, int state) newbits3 = CLOCK_CTRL_44MHZ_CORE; } - tw32_f(TG3PCI_CLOCK_CTRL, - tp->pci_clock_ctrl | newbits3); - udelay(40); + tw32_wait_f(TG3PCI_CLOCK_CTRL, + tp->pci_clock_ctrl | newbits3, 40); } } -- cgit v1.1 From 38690194bc897dd60a61a71b15e861e13b5d8bdd Mon Sep 17 00:00:00 2001 From: Michael Chan Date: Mon, 19 Dec 2005 16:27:28 -0800 Subject: [TG3]: Fix ethtool memory test Skip the memory 0xb50 to 0x1000 during "ethtool -t" memory test. Overwriting memory in this region can cause ASF problems. Update version and release date. Signed-off-by: Michael Chan Signed-off-by: David S. Miller --- drivers/net/tg3.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'drivers') diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index b0d963c..cefb0c0 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c @@ -68,8 +68,8 @@ #define DRV_MODULE_NAME "tg3" #define PFX DRV_MODULE_NAME ": " -#define DRV_MODULE_VERSION "3.45" -#define DRV_MODULE_RELDATE "Dec 13, 2005" +#define DRV_MODULE_VERSION "3.46" +#define DRV_MODULE_RELDATE "Dec 19, 2005" #define TG3_DEF_MAC_MODE 0 #define TG3_DEF_RX_MODE 0 @@ -7975,13 +7975,12 @@ static int tg3_test_memory(struct tg3 *tp) u32 offset; u32 len; } mem_tbl_570x[] = { - { 0x00000000, 0x01000}, + { 0x00000000, 0x00b50}, { 0x00002000, 0x1c000}, { 0xffffffff, 0x00000} }, mem_tbl_5705[] = { { 0x00000100, 0x0000c}, { 0x00000200, 0x00008}, - { 0x00000b50, 0x00400}, { 0x00004000, 0x00800}, { 0x00006000, 0x01000}, { 0x00008000, 0x02000}, -- cgit v1.1 From bcb97940f31ded5ac551da8bfc849583203fc6f2 Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Tue, 20 Dec 2005 11:07:00 +1100 Subject: [PATCH] md: Change case of raid level reported in sys/mdX/md/level I had thought that keeping the reported tail level clearly different from the module name was a good idea, but I've changed my mind. 'raid5' is better and probably less confusing than 'RAID-5'. Signed-off-by: Neil Brown Signed-off-by: Linus Torvalds --- drivers/md/md.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/md/md.c b/drivers/md/md.c index cd12fca..8175a2a 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -1729,7 +1729,7 @@ level_show(mddev_t *mddev, char *page) if (p == NULL && mddev->raid_disks == 0) return 0; if (mddev->level >= 0) - return sprintf(page, "RAID-%d\n", mddev->level); + return sprintf(page, "raid%d\n", mddev->level); else return sprintf(page, "%s\n", p->name); } -- cgit v1.1 From 6ee7fb7e363aa8828b3920422416707c79f39007 Mon Sep 17 00:00:00 2001 From: Benjamin Herrenschmidt Date: Mon, 19 Dec 2005 11:24:53 +1100 Subject: [PATCH] powerpc: g5 thermal overtemp bug The g5 thermal control for liquid cooled machines has a small bug, when the temperatures gets too high, it boosts all fans to the max, but incorrectly sets the liquids pump to the min instead of the max speed, thus causing the overtemp condition not to clear and the machine to shut down after a while. This fixes it to set the pumps to max speed instead. This problem might explain some of the reports of random shutdowns that some g5 users have been reporting in the past. Many thanks to Marcus Rothe for spending a lot of time trying various patches & sending log logs before I found out that typo. Note that overtemp handling is still not perfect and the machine might still shutdown, that patch should reduce if not eliminate such occcurences in "normal" conditions with high load. I'll implement a better handling with proper slowing down of the CPUs later. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Linus Torvalds --- drivers/macintosh/therm_pm72.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/macintosh/therm_pm72.c b/drivers/macintosh/therm_pm72.c index 3fc8cdd..5bb3627 100644 --- a/drivers/macintosh/therm_pm72.c +++ b/drivers/macintosh/therm_pm72.c @@ -933,7 +933,7 @@ static void do_monitor_cpu_combined(void) if (state0->overtemp > 0) { state0->rpm = state0->mpu.rmaxn_exhaust_fan; state0->intake_rpm = intake = state0->mpu.rmaxn_intake_fan; - pump = state0->pump_min; + pump = state0->pump_max; goto do_set_fans; } -- cgit v1.1 From 4b3760ce3d448d4af3036cd6c650d651a16ee02d Mon Sep 17 00:00:00 2001 From: "Antonino A. Daplas" Date: Mon, 19 Dec 2005 15:11:40 +0800 Subject: [PATCH] intelfb: Fix freeing of nonexistent resource Fix intelfb trying to free a non-existent resource in its error path. Signed-off-by: Antonino Daplas Signed-off-by: Linus Torvalds --- drivers/video/intelfb/intelfb.h | 5 +++++ drivers/video/intelfb/intelfbdrv.c | 9 +++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/video/intelfb/intelfb.h b/drivers/video/intelfb/intelfb.h index f077ca3..da29d00 100644 --- a/drivers/video/intelfb/intelfb.h +++ b/drivers/video/intelfb/intelfb.h @@ -41,6 +41,10 @@ /*** hw-related values ***/ +/* Resource Allocation */ +#define INTELFB_FB_ACQUIRED 1 +#define INTELFB_MMIO_ACQUIRED 2 + /* PCI ids for supported devices */ #define PCI_DEVICE_ID_INTEL_830M 0x3577 #define PCI_DEVICE_ID_INTEL_845G 0x2562 @@ -257,6 +261,7 @@ struct intelfb_info { int hwcursor; int fixed_mode; int ring_active; + int flag; /* hw cursor */ int cursor_on; diff --git a/drivers/video/intelfb/intelfbdrv.c b/drivers/video/intelfb/intelfbdrv.c index 427689e..ac8d661 100644 --- a/drivers/video/intelfb/intelfbdrv.c +++ b/drivers/video/intelfb/intelfbdrv.c @@ -473,9 +473,9 @@ cleanup(struct intelfb_info *dinfo) if (dinfo->aperture.virtual) iounmap((void __iomem *)dinfo->aperture.virtual); - if (dinfo->mmio_base_phys) + if (dinfo->flag & INTELFB_MMIO_ACQUIRED) release_mem_region(dinfo->mmio_base_phys, INTEL_REG_SIZE); - if (dinfo->aperture.physical) + if (dinfo->flag & INTELFB_FB_ACQUIRED) release_mem_region(dinfo->aperture.physical, dinfo->aperture.size); framebuffer_release(dinfo->info); @@ -572,6 +572,9 @@ intelfb_pci_register(struct pci_dev *pdev, const struct pci_device_id *ent) cleanup(dinfo); return -ENODEV; } + + dinfo->flag |= INTELFB_FB_ACQUIRED; + if (!request_mem_region(dinfo->mmio_base_phys, INTEL_REG_SIZE, INTELFB_MODULE_NAME)) { @@ -580,6 +583,8 @@ intelfb_pci_register(struct pci_dev *pdev, const struct pci_device_id *ent) return -ENODEV; } + dinfo->flag |= INTELFB_MMIO_ACQUIRED; + /* Get the chipset info. */ dinfo->pci_chipset = pdev->device; -- cgit v1.1 From 33c37c06f8066342764bd1568c9f3524efe889a5 Mon Sep 17 00:00:00 2001 From: "Antonino A. Daplas" Date: Mon, 19 Dec 2005 15:11:49 +0800 Subject: [PATCH] intelfb: Fix oops when changing video mode Reported by: janis huang (Bugzilla Bug 5747) Fix on oops in intelfb. Not sure what's happening, looks like dinfo->name pointer is invalidated after initialization. Remove intelfb_get_fix, it's not needed and move the majority of the code to the initialization routine. Signed-off-by: Antonino Daplas Signed-off-by: Linus Torvalds --- drivers/video/intelfb/intelfbdrv.c | 42 ++++++++++++-------------------------- 1 file changed, 13 insertions(+), 29 deletions(-) (limited to 'drivers') diff --git a/drivers/video/intelfb/intelfbdrv.c b/drivers/video/intelfb/intelfbdrv.c index ac8d661..0090544 100644 --- a/drivers/video/intelfb/intelfbdrv.c +++ b/drivers/video/intelfb/intelfbdrv.c @@ -135,9 +135,6 @@ static void __devinit get_initial_mode(struct intelfb_info *dinfo); static void update_dinfo(struct intelfb_info *dinfo, struct fb_var_screeninfo *var); -static int intelfb_get_fix(struct fb_fix_screeninfo *fix, - struct fb_info *info); - static int intelfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info); static int intelfb_set_par(struct fb_info *info); @@ -1096,7 +1093,17 @@ intelfb_set_fbinfo(struct intelfb_info *dinfo) return 1; info->pixmap.scan_align = 1; - + strcpy(info->fix.id, dinfo->name); + info->fix.smem_start = dinfo->fb.physical; + info->fix.smem_len = dinfo->fb.size; + info->fix.type = FB_TYPE_PACKED_PIXELS; + info->fix.type_aux = 0; + info->fix.xpanstep = 8; + info->fix.ypanstep = 1; + info->fix.ywrapstep = 0; + info->fix.mmio_start = dinfo->mmio_base_phys; + info->fix.mmio_len = INTEL_REG_SIZE; + info->fix.accel = FB_ACCEL_I830; update_dinfo(dinfo, &info->var); return 0; @@ -1114,7 +1121,8 @@ update_dinfo(struct intelfb_info *dinfo, struct fb_var_screeninfo *var) dinfo->yres = var->xres; dinfo->pixclock = var->pixclock; - intelfb_get_fix(&dinfo->info->fix, dinfo->info); + dinfo->info->fix.visual = dinfo->visual; + dinfo->info->fix.line_length = dinfo->pitch; switch (dinfo->bpp) { case 8: @@ -1144,30 +1152,6 @@ update_dinfo(struct intelfb_info *dinfo, struct fb_var_screeninfo *var) /* fbops functions */ -static int -intelfb_get_fix(struct fb_fix_screeninfo *fix, struct fb_info *info) -{ - struct intelfb_info *dinfo = GET_DINFO(info); - - DBG_MSG("intelfb_get_fix\n"); - - memset(fix, 0, sizeof(*fix)); - strcpy(fix->id, dinfo->name); - fix->smem_start = dinfo->fb.physical; - fix->smem_len = dinfo->fb.size; - fix->type = FB_TYPE_PACKED_PIXELS; - fix->type_aux = 0; - fix->visual = dinfo->visual; - fix->xpanstep = 8; - fix->ypanstep = 1; - fix->ywrapstep = 0; - fix->line_length = dinfo->pitch; - fix->mmio_start = dinfo->mmio_base_phys; - fix->mmio_len = INTEL_REG_SIZE; - fix->accel = FB_ACCEL_I830; - return 0; -} - /*************************************************************** * fbdev interface * ***************************************************************/ -- cgit v1.1 From 7ca0b3bf695632003a2a0f98b9fc1451b0483346 Mon Sep 17 00:00:00 2001 From: Knut Petersen Date: Tue, 20 Dec 2005 08:18:09 +0100 Subject: [PATCH] Fix framebuffer console upside-down ywrap scrolling Whenever ywrap scrolling is selected together with 180 degree screen rotation, 2.6.15-rc6 and earlier versions are broken. fb_pan_display() expects non-negative yoffsets, but ud_update_start() calls it with yoffsets down to -(yres - font height). This patch transforms yoffset to the correct range 0 ... vyres-1. Some obviously unneeded parentheses are removed, too. Verified with cyblafb, should be applied before 2.6.15-final because it does fix the framebuffer rotation code introduced early in the 2.6.15 release cycle. Signed-off-by: Knut Petersen Acked-by: Antonino Daplas Signed-off-by: Linus Torvalds --- drivers/video/console/fbcon_ud.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'drivers') diff --git a/drivers/video/console/fbcon_ud.c b/drivers/video/console/fbcon_ud.c index c4d7c89..9dd059e 100644 --- a/drivers/video/console/fbcon_ud.c +++ b/drivers/video/console/fbcon_ud.c @@ -420,13 +420,15 @@ static void ud_cursor(struct vc_data *vc, struct fb_info *info, int ud_update_start(struct fb_info *info) { struct fbcon_ops *ops = info->fbcon_par; - u32 xoffset, yoffset; + int xoffset, yoffset; u32 vyres = GETVYRES(ops->p->scrollmode, info); u32 vxres = GETVXRES(ops->p->scrollmode, info); int err; - xoffset = (vxres - info->var.xres) - ops->var.xoffset; - yoffset = (vyres - info->var.yres) - ops->var.yoffset; + xoffset = vxres - info->var.xres - ops->var.xoffset; + yoffset = vyres - info->var.yres - ops->var.yoffset; + if (yoffset < 0) + yoffset += vyres; ops->var.xoffset = xoffset; ops->var.yoffset = yoffset; err = fb_pan_display(info, &ops->var); -- cgit v1.1 From 05465fd5622202d65634b3a9a8bcc9cbb384a82a Mon Sep 17 00:00:00 2001 From: Alex Williamson Date: Thu, 8 Dec 2005 15:37:00 -0500 Subject: [ACPI] increase owner_id limit to 64 from 32 This is an interim patch until changes in an updated ACPICA core increase the limit to 255. Signed-off-by: Alex Williamson Signed-off-by: Len Brown --- drivers/acpi/utilities/utmisc.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'drivers') diff --git a/drivers/acpi/utilities/utmisc.c b/drivers/acpi/utilities/utmisc.c index 0c5abc5..b886780 100644 --- a/drivers/acpi/utilities/utmisc.c +++ b/drivers/acpi/utilities/utmisc.c @@ -84,14 +84,14 @@ acpi_status acpi_ut_allocate_owner_id(acpi_owner_id * owner_id) /* Find a free owner ID */ - for (i = 0; i < 32; i++) { - if (!(acpi_gbl_owner_id_mask & (1 << i))) { + for (i = 0; i < 64; i++) { + if (!(acpi_gbl_owner_id_mask & (1ULL << i))) { ACPI_DEBUG_PRINT((ACPI_DB_VALUES, - "Current owner_id mask: %8.8X New ID: %2.2X\n", + "Current owner_id mask: %16.16lX New ID: %2.2X\n", acpi_gbl_owner_id_mask, (unsigned int)(i + 1))); - acpi_gbl_owner_id_mask |= (1 << i); + acpi_gbl_owner_id_mask |= (1ULL << i); *owner_id = (acpi_owner_id) (i + 1); goto exit; } @@ -106,7 +106,7 @@ acpi_status acpi_ut_allocate_owner_id(acpi_owner_id * owner_id) */ *owner_id = 0; status = AE_OWNER_ID_LIMIT; - ACPI_REPORT_ERROR(("Could not allocate new owner_id (32 max), AE_OWNER_ID_LIMIT\n")); + ACPI_REPORT_ERROR(("Could not allocate new owner_id (64 max), AE_OWNER_ID_LIMIT\n")); exit: (void)acpi_ut_release_mutex(ACPI_MTX_CACHES); @@ -123,7 +123,7 @@ acpi_status acpi_ut_allocate_owner_id(acpi_owner_id * owner_id) * control method or unloading a table. Either way, we would * ignore any error anyway. * - * DESCRIPTION: Release a table or method owner ID. Valid IDs are 1 - 32 + * DESCRIPTION: Release a table or method owner ID. Valid IDs are 1 - 64 * ******************************************************************************/ @@ -140,7 +140,7 @@ void acpi_ut_release_owner_id(acpi_owner_id * owner_id_ptr) /* Zero is not a valid owner_iD */ - if ((owner_id == 0) || (owner_id > 32)) { + if ((owner_id == 0) || (owner_id > 64)) { ACPI_REPORT_ERROR(("Invalid owner_id: %2.2X\n", owner_id)); return_VOID; } @@ -158,8 +158,8 @@ void acpi_ut_release_owner_id(acpi_owner_id * owner_id_ptr) /* Free the owner ID only if it is valid */ - if (acpi_gbl_owner_id_mask & (1 << owner_id)) { - acpi_gbl_owner_id_mask ^= (1 << owner_id); + if (acpi_gbl_owner_id_mask & (1ULL << owner_id)) { + acpi_gbl_owner_id_mask ^= (1ULL << owner_id); } (void)acpi_ut_release_mutex(ACPI_MTX_CACHES); -- cgit v1.1 From 28120be5d6830cd7c7777d8bf570bdb20abef58a Mon Sep 17 00:00:00 2001 From: Paul Walmsley Date: Wed, 21 Dec 2005 14:28:06 -0800 Subject: [PATCH] USB Storage: Force starget->scsi_level in usb-storage scsiglue.c When the usb-storage module forces sdev->scsi_level to SCSI_2, it should also force starget->scsi_level to the same value. Otherwise, the SCSI layer may attempt to issue SCSI-3 commands to the device, such as REPORT LUNS, which it cannot handle. This can prevent the device from working with Linux. The AMS Venus DS3 DS2316SU2S SATA-to-SATA+USB enclosure, based on the Oxford Semiconductor OXU921S chip, requires this patch to function correctly on Linux. The enclosure reports a SCSI-3 SPC-2 command set level, but does not correctly handle the REPORT LUNS SCSI command - probably due to a bug in its firmware. It seems likely that other USB storage enclosures with similar bugs will also benefit from this patch. Tony Lindgren collaborated in the development of this patch. Signed-off-by: Paul Walmsley Signed-off-by: Greg Kroah-Hartman Signed-off-by: Linus Torvalds --- drivers/usb/storage/scsiglue.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/usb/storage/scsiglue.c b/drivers/usb/storage/scsiglue.c index 4837524..4ef5527 100644 --- a/drivers/usb/storage/scsiglue.c +++ b/drivers/usb/storage/scsiglue.c @@ -109,7 +109,7 @@ static int slave_configure(struct scsi_device *sdev) * data comes from. */ if (sdev->scsi_level < SCSI_2) - sdev->scsi_level = SCSI_2; + sdev->scsi_level = sdev->sdev_target->scsi_level = SCSI_2; /* According to the technical support people at Genesys Logic, * devices using their chips have problems transferring more than @@ -162,7 +162,7 @@ static int slave_configure(struct scsi_device *sdev) * a Get-Max-LUN request, we won't lose much by setting the * revision level down to 2. The only devices that would be * affected are those with sparse LUNs. */ - sdev->scsi_level = SCSI_2; + sdev->scsi_level = sdev->sdev_target->scsi_level = SCSI_2; /* USB-IDE bridges tend to report SK = 0x04 (Non-recoverable * Hardware Error) when any low-level error occurs, -- cgit v1.1 From 5a9191ff683ce4ebfd2c6a15e2989f5b1f420321 Mon Sep 17 00:00:00 2001 From: Alan Stern Date: Wed, 21 Dec 2005 14:28:11 -0800 Subject: [PATCH] usbcore: allow suspend/resume even if drivers don't support it This patch (as618) changes usbcore to prevent derailing the suspend/resume sequence when a USB driver doesn't include support for it. This is a workaround rather than a true fix; the core needs to be changed so that URB submissions from suspended drivers can be refused and outstanding URBs cancelled. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman Signed-off-by: Linus Torvalds --- drivers/usb/core/usb.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'drivers') diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c index e197ce9..e80ef94 100644 --- a/drivers/usb/core/usb.c +++ b/drivers/usb/core/usb.c @@ -1432,7 +1432,8 @@ static int usb_generic_suspend(struct device *dev, pm_message_t message) mark_quiesced(intf); } else { // FIXME else if there's no suspend method, disconnect... - dev_warn(dev, "no %s?\n", "suspend"); + dev_warn(dev, "no suspend for driver %s?\n", driver->name); + mark_quiesced(intf); status = 0; } return status; @@ -1460,8 +1461,10 @@ static int usb_generic_resume(struct device *dev) } if ((dev->driver == NULL) || - (dev->driver_data == &usb_generic_driver_data)) + (dev->driver_data == &usb_generic_driver_data)) { + dev->power.power_state.event = PM_EVENT_FREEZE; return 0; + } intf = to_usb_interface(dev); driver = to_usb_driver(dev->driver); @@ -1481,7 +1484,7 @@ static int usb_generic_resume(struct device *dev) mark_quiesced(intf); } } else - dev_warn(dev, "no %s?\n", "resume"); + dev_warn(dev, "no resume for driver %s?\n", driver->name); return 0; } -- cgit v1.1 From c7ac6b42ffba28c350cbcd48268f46689f6eb1cc Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Wed, 21 Dec 2005 14:52:32 -0800 Subject: Initialize drivers/media/video/saa7134 late When compiled-in, make sure the sound system has initialized before these drivers do. Reported by Adrian Bunk (The right fix would be to make the sound core use "subsys_initcall()" and thus initialize before all normal drivers, but this is the quick and limited safe fix for 2.6.15). Signed-off-by: Linus Torvalds --- drivers/media/video/saa7134/saa7134-alsa.c | 3 ++- drivers/media/video/saa7134/saa7134-oss.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/media/video/saa7134/saa7134-alsa.c b/drivers/media/video/saa7134/saa7134-alsa.c index 953d5fe..6752dd1 100644 --- a/drivers/media/video/saa7134/saa7134-alsa.c +++ b/drivers/media/video/saa7134/saa7134-alsa.c @@ -1028,7 +1028,8 @@ static void saa7134_alsa_exit(void) return; } -module_init(saa7134_alsa_init); +/* We initialize this late, to make sure the sound system is up and running */ +late_initcall(saa7134_alsa_init); module_exit(saa7134_alsa_exit); MODULE_LICENSE("GPL"); MODULE_AUTHOR("Ricardo Cerqueira"); diff --git a/drivers/media/video/saa7134/saa7134-oss.c b/drivers/media/video/saa7134/saa7134-oss.c index 513a699..c450d57 100644 --- a/drivers/media/video/saa7134/saa7134-oss.c +++ b/drivers/media/video/saa7134/saa7134-oss.c @@ -1002,7 +1002,8 @@ static void saa7134_oss_exit(void) return; } -module_init(saa7134_oss_init); +/* We initialize this late, to make sure the sound system is up and running */ +late_initcall(saa7134_oss_init); module_exit(saa7134_oss_exit); MODULE_LICENSE("GPL"); MODULE_AUTHOR("Gerd Knorr [SuSE Labs]"); -- cgit v1.1 From 7bb9529602f8bb41a92275825b808a42ed33e5be Mon Sep 17 00:00:00 2001 From: Ricardo Cerqueira Date: Tue, 20 Dec 2005 18:26:26 -0200 Subject: V4L/DVB (3200): Fix saa7134 ALSA/OSS collisions - When ALSA or OSS are loaded, check if the other is present Fixed hotplug notifiers cleanup on module removal - The saa7134 DMA sound modules now have their own Kconfig entries, and if built statically enforce exclusivity - SND_PCM_OSS isn't necessary for the OSS driver Signed-off-by: Ricardo Cerqueira Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/saa7134/Kconfig | 26 ++++++++++++++++++++++++-- drivers/media/video/saa7134/Makefile | 7 +++++-- drivers/media/video/saa7134/saa7134-alsa.c | 13 ++++++++++--- drivers/media/video/saa7134/saa7134-oss.c | 15 ++++++++++++--- 4 files changed, 51 insertions(+), 10 deletions(-) (limited to 'drivers') diff --git a/drivers/media/video/saa7134/Kconfig b/drivers/media/video/saa7134/Kconfig index c512c44..c0f604a 100644 --- a/drivers/media/video/saa7134/Kconfig +++ b/drivers/media/video/saa7134/Kconfig @@ -1,11 +1,10 @@ config VIDEO_SAA7134 tristate "Philips SAA7134 support" - depends on VIDEO_DEV && PCI && I2C && SOUND && SND + depends on VIDEO_DEV && PCI && I2C select VIDEO_BUF select VIDEO_IR select VIDEO_TUNER select CRC32 - select SND_PCM_OSS ---help--- This is a video4linux driver for Philips SAA713x based TV cards. @@ -13,6 +12,29 @@ config VIDEO_SAA7134 To compile this driver as a module, choose M here: the module will be called saa7134. +config VIDEO_SAA7134_ALSA + tristate "Philips SAA7134 DMA audio support" + depends on VIDEO_SAA7134 && SOUND && SND && (!VIDEO_SAA7134_OSS || VIDEO_SAA7134_OSS = m) + select SND_PCM_OSS + ---help--- + This is a video4linux driver for direct (DMA) audio in + Philips SAA713x based TV cards using ALSA + + To compile this driver as a module, choose M here: the + module will be called saa7134-alsa. + +config VIDEO_SAA7134_OSS + tristate "Philips SAA7134 DMA audio support (OSS, DEPRECATED)" + depends on VIDEO_SAA7134 && SOUND_PRIME && (!VIDEO_SAA7134_ALSA || VIDEO_SAA7134_ALSA = m) + ---help--- + This is a video4linux driver for direct (DMA) audio in + Philips SAA713x based TV cards using OSS + + This is deprecated in favor of the ALSA module + + To compile this driver as a module, choose M here: the + module will be called saa7134-oss. + config VIDEO_SAA7134_DVB tristate "DVB/ATSC Support for saa7134 based TV cards" depends on VIDEO_SAA7134 && DVB_CORE diff --git a/drivers/media/video/saa7134/Makefile b/drivers/media/video/saa7134/Makefile index 134f83a..1ba9984 100644 --- a/drivers/media/video/saa7134/Makefile +++ b/drivers/media/video/saa7134/Makefile @@ -4,8 +4,11 @@ saa7134-objs := saa7134-cards.o saa7134-core.o saa7134-i2c.o \ saa7134-video.o saa7134-input.o obj-$(CONFIG_VIDEO_SAA7134) += saa7134.o saa7134-empress.o \ - saa6752hs.o saa7134-alsa.o \ - saa7134-oss.o + saa6752hs.o + +obj-$(CONFIG_VIDEO_SAA7134_ALSA) += saa7134-alsa.o +obj-$(CONFIG_VIDEO_SAA7134_OSS) += saa7134-oss.o + obj-$(CONFIG_VIDEO_SAA7134_DVB) += saa7134-dvb.o EXTRA_CFLAGS += -I$(src)/.. diff --git a/drivers/media/video/saa7134/saa7134-alsa.c b/drivers/media/video/saa7134/saa7134-alsa.c index 6752dd1..ade05f7 100644 --- a/drivers/media/video/saa7134/saa7134-alsa.c +++ b/drivers/media/video/saa7134/saa7134-alsa.c @@ -989,6 +989,14 @@ static int saa7134_alsa_init(void) struct saa7134_dev *dev = NULL; struct list_head *list; + if (!dmasound_init && !dmasound_exit) { + dmasound_init = alsa_device_init; + dmasound_exit = alsa_device_exit; + } else { + printk(KERN_WARNING "saa7134 ALSA: can't load, DMA sound handler already assigned (probably to OSS)\n"); + return -EBUSY; + } + printk(KERN_INFO "saa7134 ALSA driver for DMA sound loaded\n"); list_for_each(list,&saa7134_devlist) { @@ -1001,9 +1009,6 @@ static int saa7134_alsa_init(void) } } - dmasound_init = alsa_device_init; - dmasound_exit = alsa_device_exit; - if (dev == NULL) printk(KERN_INFO "saa7134 ALSA: no saa7134 cards found\n"); @@ -1023,6 +1028,8 @@ static void saa7134_alsa_exit(void) snd_card_free(snd_saa7134_cards[idx]); } + dmasound_init = NULL; + dmasound_exit = NULL; printk(KERN_INFO "saa7134 ALSA driver for DMA sound unloaded\n"); return; diff --git a/drivers/media/video/saa7134/saa7134-oss.c b/drivers/media/video/saa7134/saa7134-oss.c index c450d57..8badd2a 100644 --- a/drivers/media/video/saa7134/saa7134-oss.c +++ b/drivers/media/video/saa7134/saa7134-oss.c @@ -959,8 +959,17 @@ static int saa7134_oss_init(void) struct saa7134_dev *dev = NULL; struct list_head *list; + if (!dmasound_init && !dmasound_exit) { + dmasound_init = oss_device_init; + dmasound_exit = oss_device_exit; + } else { + printk(KERN_WARNING "saa7134 OSS: can't load, DMA sound handler already assigned (probably to ALSA)\n"); + return -EBUSY; + } + printk(KERN_INFO "saa7134 OSS driver for DMA sound loaded\n"); + list_for_each(list,&saa7134_devlist) { dev = list_entry(list, struct saa7134_dev, devlist); if (dev->dmasound.priv_data == NULL) { @@ -974,9 +983,6 @@ static int saa7134_oss_init(void) if (dev == NULL) printk(KERN_INFO "saa7134 OSS: no saa7134 cards found\n"); - dmasound_init = oss_device_init; - dmasound_exit = oss_device_exit; - return 0; } @@ -997,6 +1003,9 @@ static void saa7134_oss_exit(void) } + dmasound_init = NULL; + dmasound_exit = NULL; + printk(KERN_INFO "saa7134 OSS driver for DMA sound unloaded\n"); return; -- cgit v1.1 From 515432aa7ae75ea493099f38adc14a99436fa1ac Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Tue, 20 Dec 2005 09:48:29 -0200 Subject: V4L/DVB (3191): Fix CC output - CC data was swapped the wrong way around. - Enabling CC disabled XDS and vice versa: these two should be independent from one another. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/saa7127.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers') diff --git a/drivers/media/video/saa7127.c b/drivers/media/video/saa7127.c index 3428e1e..c36f014 100644 --- a/drivers/media/video/saa7127.c +++ b/drivers/media/video/saa7127.c @@ -389,7 +389,7 @@ static int saa7127_set_vps(struct i2c_client *client, struct v4l2_sliced_vbi_dat static int saa7127_set_cc(struct i2c_client *client, struct v4l2_sliced_vbi_data *data) { struct saa7127_state *state = i2c_get_clientdata(client); - u16 cc = data->data[0] << 8 | data->data[1]; + u16 cc = data->data[1] << 8 | data->data[0]; int enable = (data->line != 0); if (enable && (data->field != 0 || data->line != 21)) @@ -397,7 +397,7 @@ static int saa7127_set_cc(struct i2c_client *client, struct v4l2_sliced_vbi_data if (state->cc_enable != enable) { saa7127_dbg("Turn CC %s\n", enable ? "on" : "off"); saa7127_write(client, SAA7127_REG_CLOSED_CAPTION, - (enable << 6) | 0x11); + (state->xds_enable << 7) | (enable << 6) | 0x11); state->cc_enable = enable; } if (!enable) @@ -423,7 +423,7 @@ static int saa7127_set_xds(struct i2c_client *client, struct v4l2_sliced_vbi_dat if (state->xds_enable != enable) { saa7127_dbg("Turn XDS %s\n", enable ? "on" : "off"); saa7127_write(client, SAA7127_REG_CLOSED_CAPTION, - (enable << 7) | 0x11); + (enable << 7) | (state->cc_enable << 6) | 0x11); state->xds_enable = enable; } if (!enable) -- cgit v1.1 From d2b18394259ef621fd2a6322aa9934198fd87a6a Mon Sep 17 00:00:00 2001 From: Russell King Date: Thu, 22 Dec 2005 23:21:38 +0000 Subject: [MMC] Set correct capacity for 1024-byte block cards We were passing set_capacity() the capacity we calculated in terms of the number of blocks on the card, which happened to be the right units for 512-byte block cards. However, with 1024-byte block cards, we end up setting the capacity to half the number of blocks. Fix this by shifting by the appropriate amount. Thanks to Todd Blumer for pointing this out. Use get_capacity() to report the card capacity, rather than recalculating it from the CSD information. Finally, use our chosen IO block size for the SET_BLOCKLEN command rather than the CSD read block size. Currently these are equivalent, but will not be in the future. Signed-off-by: Russell King --- drivers/mmc/mmc_block.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'drivers') diff --git a/drivers/mmc/mmc_block.c b/drivers/mmc/mmc_block.c index d91fcf7..abcf191 100644 --- a/drivers/mmc/mmc_block.c +++ b/drivers/mmc/mmc_block.c @@ -359,7 +359,12 @@ static struct mmc_blk_data *mmc_blk_alloc(struct mmc_card *card) md->block_bits = card->csd.read_blkbits; blk_queue_hardsect_size(md->queue.queue, 1 << md->block_bits); - set_capacity(md->disk, card->csd.capacity); + + /* + * The CSD capacity field is in units of read_blkbits. + * set_capacity takes units of 512 bytes. + */ + set_capacity(md->disk, card->csd.capacity << (card->csd.read_blkbits - 9)); } out: return md; @@ -373,7 +378,7 @@ mmc_blk_set_blksize(struct mmc_blk_data *md, struct mmc_card *card) mmc_card_claim_host(card); cmd.opcode = MMC_SET_BLOCKLEN; - cmd.arg = 1 << card->csd.read_blkbits; + cmd.arg = 1 << md->block_bits; cmd.flags = MMC_RSP_R1; err = mmc_wait_for_cmd(card->host, &cmd, 5); mmc_card_release_host(card); @@ -412,10 +417,9 @@ static int mmc_blk_probe(struct mmc_card *card) if (err) goto out; - printk(KERN_INFO "%s: %s %s %dKiB %s\n", + printk(KERN_INFO "%s: %s %s %luKiB %s\n", md->disk->disk_name, mmc_card_id(card), mmc_card_name(card), - (card->csd.capacity << card->csd.read_blkbits) / 1024, - mmc_blk_readonly(card)?"(ro)":""); + get_capacity(md->disk) >> 1, mmc_blk_readonly(card)?"(ro)":""); mmc_set_drvdata(card, md); add_disk(md->disk); -- cgit v1.1 From 75b245b3259133360845bc6de3aecb8a6bd6ab59 Mon Sep 17 00:00:00 2001 From: Thomas Renninger Date: Wed, 21 Dec 2005 01:29:00 -0500 Subject: [ACPI] fix passive cooling regression Return logic was inverted. Going for changing the return value to not return zero as it is makes more sense regarding the naming of the function (cpu_has_cpufreq()). http://bugzilla.kernel.org/show_bug.cgi?id=3410 Signed-off-by: Thomas Renninger Signed-off-by: Len Brown --- drivers/acpi/processor_thermal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/acpi/processor_thermal.c b/drivers/acpi/processor_thermal.c index f375840..dc9817c 100644 --- a/drivers/acpi/processor_thermal.c +++ b/drivers/acpi/processor_thermal.c @@ -102,8 +102,8 @@ static int cpu_has_cpufreq(unsigned int cpu) { struct cpufreq_policy policy; if (!acpi_thermal_cpufreq_is_init || cpufreq_get_policy(&policy, cpu)) - return -ENODEV; - return 0; + return 0; + return 1; } static int acpi_thermal_cpufreq_increase(unsigned int cpu) -- cgit v1.1 From 9d6be4bed65a3bd36ab2de12923bff4f4530bd86 Mon Sep 17 00:00:00 2001 From: Len Brown Date: Thu, 22 Dec 2005 22:23:06 -0500 Subject: [ACPI] fix build warning from owner_id patch Signed-off-by: Len Brown --- drivers/acpi/utilities/utmisc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/acpi/utilities/utmisc.c b/drivers/acpi/utilities/utmisc.c index b886780..2ce872d 100644 --- a/drivers/acpi/utilities/utmisc.c +++ b/drivers/acpi/utilities/utmisc.c @@ -87,7 +87,7 @@ acpi_status acpi_ut_allocate_owner_id(acpi_owner_id * owner_id) for (i = 0; i < 64; i++) { if (!(acpi_gbl_owner_id_mask & (1ULL << i))) { ACPI_DEBUG_PRINT((ACPI_DB_VALUES, - "Current owner_id mask: %16.16lX New ID: %2.2X\n", + "Current owner_id mask: %16.16LX New ID: %2.2X\n", acpi_gbl_owner_id_mask, (unsigned int)(i + 1))); -- cgit v1.1 From 14904398e5b573d13f8c8dbd43a452ff34c0efc2 Mon Sep 17 00:00:00 2001 From: Adrian Bunk Date: Wed, 21 Dec 2005 18:50:12 -0800 Subject: [SUNGEM]: Fix link error with CONFIG_HOTPLUG disabled. gem_remove_one() is called from the __devinit gem_init_one(). Therefore, gem_remove_one() mustn't be __devexit. Signed-off-by: Adrian Bunk Signed-off-by: David S. Miller --- drivers/net/sungem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/net/sungem.c b/drivers/net/sungem.c index 081717d..28ce47a 100644 --- a/drivers/net/sungem.c +++ b/drivers/net/sungem.c @@ -2907,7 +2907,7 @@ static int __devinit gem_get_device_address(struct gem *gp) return 0; } -static void __devexit gem_remove_one(struct pci_dev *pdev) +static void gem_remove_one(struct pci_dev *pdev) { struct net_device *dev = pci_get_drvdata(pdev); @@ -3181,7 +3181,7 @@ static struct pci_driver gem_driver = { .name = GEM_MODULE_NAME, .id_table = gem_pci_tbl, .probe = gem_init_one, - .remove = __devexit_p(gem_remove_one), + .remove = gem_remove_one, #ifdef CONFIG_PM .suspend = gem_suspend, .resume = gem_resume, -- cgit v1.1 From 0b57ee9e55373a27e45549e82b0c43621480a71b Mon Sep 17 00:00:00 2001 From: Adrian Bunk Date: Thu, 22 Dec 2005 21:03:47 -0800 Subject: [SPARC]: introduce a SPARC Kconfig symbol Introduce a Kconfig symbol SPARC that is defined on both the sparc and sparc64 architectures. This symbol makes some dependencies more readable. Signed-off-by: Adrian Bunk Signed-off-by: David S. Miller --- drivers/char/Kconfig | 4 ++-- drivers/char/keyboard.c | 10 +++++----- drivers/fc4/Kconfig | 8 ++++---- drivers/input/misc/Kconfig | 2 +- drivers/input/serio/i8042.h | 2 +- drivers/mtd/maps/Kconfig | 2 +- drivers/serial/Kconfig | 10 +++++----- drivers/video/Kconfig | 10 +++++----- drivers/video/console/Kconfig | 20 ++++++++++---------- drivers/video/logo/Kconfig | 2 +- 10 files changed, 35 insertions(+), 35 deletions(-) (limited to 'drivers') diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig index 696f727..84e68cd 100644 --- a/drivers/char/Kconfig +++ b/drivers/char/Kconfig @@ -687,7 +687,7 @@ config NVRAM config RTC tristate "Enhanced Real Time Clock Support" - depends on !PPC32 && !PARISC && !IA64 && !M68K && (!(SPARC32 || SPARC64) || PCI) + depends on !PPC32 && !PARISC && !IA64 && !M68K && (!SPARC || PCI) ---help--- If you say Y here and create a character special file /dev/rtc with major number 10 and minor number 135 using mknod ("man mknod"), you @@ -735,7 +735,7 @@ config SGI_IP27_RTC config GEN_RTC tristate "Generic /dev/rtc emulation" - depends on RTC!=y && !IA64 && !ARM && !M32R && !SPARC32 && !SPARC64 + depends on RTC!=y && !IA64 && !ARM && !M32R && !SPARC ---help--- If you say Y here and create a character special file /dev/rtc with major number 10 and minor number 135 using mknod ("man mknod"), you diff --git a/drivers/char/keyboard.c b/drivers/char/keyboard.c index 449d029..8b603b2 100644 --- a/drivers/char/keyboard.c +++ b/drivers/char/keyboard.c @@ -930,8 +930,8 @@ static void kbd_refresh_leds(struct input_handle *handle) } #if defined(CONFIG_X86) || defined(CONFIG_IA64) || defined(CONFIG_ALPHA) ||\ - defined(CONFIG_MIPS) || defined(CONFIG_PPC) || defined(CONFIG_SPARC32) ||\ - defined(CONFIG_SPARC64) || defined(CONFIG_PARISC) || defined(CONFIG_SUPERH) ||\ + defined(CONFIG_MIPS) || defined(CONFIG_PPC) || defined(CONFIG_SPARC) ||\ + defined(CONFIG_PARISC) || defined(CONFIG_SUPERH) ||\ (defined(CONFIG_ARM) && defined(CONFIG_KEYBOARD_ATKBD) && !defined(CONFIG_ARCH_RPC)) #define HW_RAW(dev) (test_bit(EV_MSC, dev->evbit) && test_bit(MSC_RAW, dev->mscbit) &&\ @@ -958,7 +958,7 @@ static unsigned short x86_keycodes[256] = extern int mac_hid_mouse_emulate_buttons(int, int, int); #endif /* CONFIG_MAC_EMUMOUSEBTN */ -#if defined(CONFIG_SPARC32) || defined(CONFIG_SPARC64) +#ifdef CONFIG_SPARC static int sparc_l1_a_state = 0; extern void sun_do_break(void); #endif @@ -1045,7 +1045,7 @@ static void kbd_keycode(unsigned int keycode, int down, if (keycode == KEY_LEFTALT || keycode == KEY_RIGHTALT) sysrq_alt = down; -#if defined(CONFIG_SPARC32) || defined(CONFIG_SPARC64) +#ifdef CONFIG_SPARC if (keycode == KEY_STOP) sparc_l1_a_state = down; #endif @@ -1072,7 +1072,7 @@ static void kbd_keycode(unsigned int keycode, int down, return; } #endif -#if defined(CONFIG_SPARC32) || defined(CONFIG_SPARC64) +#ifdef CONFIG_SPARC if (keycode == KEY_A && sparc_l1_a_state) { sparc_l1_a_state = 0; sun_do_break(); diff --git a/drivers/fc4/Kconfig b/drivers/fc4/Kconfig index f00c02a..345dbe6 100644 --- a/drivers/fc4/Kconfig +++ b/drivers/fc4/Kconfig @@ -26,7 +26,7 @@ comment "FC4 drivers" config FC4_SOC tristate "Sun SOC/Sbus" - depends on FC4!=n && (SPARC32 || SPARC64) + depends on FC4!=n && SPARC help Serial Optical Channel is an interface card with one or two Fibre Optic ports, each of which can be connected to a disk array. Note @@ -38,7 +38,7 @@ config FC4_SOC config FC4_SOCAL tristate "Sun SOC+ (aka SOCAL)" - depends on FC4!=n && (SPARC32 || SPARC64) + depends on FC4!=n && SPARC ---help--- Serial Optical Channel Plus is an interface card with up to two Fibre Optic ports. This card supports FC Arbitrated Loop (usually @@ -62,7 +62,7 @@ config SCSI_PLUTO be called pluto. config SCSI_FCAL - tristate "Sun Enterprise Network Array (A5000 and EX500)" if SPARC32 || SPARC64 + tristate "Sun Enterprise Network Array (A5000 and EX500)" if SPARC depends on FC4!=n && SCSI help This driver drives FC-AL disks connected through a Fibre Channel @@ -75,7 +75,7 @@ config SCSI_FCAL config SCSI_FCAL prompt "Generic FC-AL disk driver" - depends on FC4!=n && SCSI && !SPARC32 && !SPARC64 + depends on FC4!=n && SCSI && !SPARC endmenu diff --git a/drivers/input/misc/Kconfig b/drivers/input/misc/Kconfig index 07813fc..e08dbe0 100644 --- a/drivers/input/misc/Kconfig +++ b/drivers/input/misc/Kconfig @@ -26,7 +26,7 @@ config INPUT_PCSPKR config INPUT_SPARCSPKR tristate "SPARC Speaker support" - depends on PCI && (SPARC32 || SPARC64) + depends on PCI && SPARC help Say Y here if you want the standard Speaker on Sparc PCI systems to be used for bells and whistles. diff --git a/drivers/input/serio/i8042.h b/drivers/input/serio/i8042.h index 1383503..cbbf384 100644 --- a/drivers/input/serio/i8042.h +++ b/drivers/input/serio/i8042.h @@ -21,7 +21,7 @@ #include "i8042-ip22io.h" #elif defined(CONFIG_PPC) #include "i8042-ppcio.h" -#elif defined(CONFIG_SPARC32) || defined(CONFIG_SPARC64) +#elif defined(CONFIG_SPARC) #include "i8042-sparcio.h" #elif defined(CONFIG_X86) || defined(CONFIG_IA64) #include "i8042-x86ia64io.h" diff --git a/drivers/mtd/maps/Kconfig b/drivers/mtd/maps/Kconfig index 452ccd5..b9b77cf 100644 --- a/drivers/mtd/maps/Kconfig +++ b/drivers/mtd/maps/Kconfig @@ -62,7 +62,7 @@ config MTD_PHYSMAP_BANKWIDTH config MTD_SUN_UFLASH tristate "Sun Microsystems userflash support" - depends on (SPARC32 || SPARC64) && MTD_CFI + depends on SPARC && MTD_CFI help This provides a 'mapping' driver which supports the way in which user-programmable flash chips are connected on various diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig index ad47c1b..812bae6 100644 --- a/drivers/serial/Kconfig +++ b/drivers/serial/Kconfig @@ -10,7 +10,7 @@ menu "Serial drivers" # The new 8250/16550 serial drivers config SERIAL_8250 tristate "8250/16550 and compatible serial support" - depends on (BROKEN || !(SPARC64 || SPARC32)) + depends on (BROKEN || !SPARC) select SERIAL_CORE ---help--- This selects whether you want to include the driver for the standard @@ -469,14 +469,14 @@ config SERIAL_IMX_CONSOLE config SERIAL_SUNCORE bool - depends on SPARC32 || SPARC64 + depends on SPARC select SERIAL_CORE select SERIAL_CORE_CONSOLE default y config SERIAL_SUNZILOG tristate "Sun Zilog8530 serial support" - depends on SPARC32 || SPARC64 + depends on SPARC help This driver supports the Zilog8530 serial ports found on many Sparc systems. Say Y or M if you want to be able to these serial ports. @@ -491,7 +491,7 @@ config SERIAL_SUNZILOG_CONSOLE config SERIAL_SUNSU tristate "Sun SU serial support" - depends on (SPARC32 || SPARC64) && PCI + depends on SPARC && PCI help This driver supports the 8250 serial ports that run the keyboard and mouse on (PCI) UltraSPARC systems. Say Y or M if you want to be able @@ -547,7 +547,7 @@ config PDC_CONSOLE config SERIAL_SUNSAB tristate "Sun Siemens SAB82532 serial support" - depends on (SPARC32 || SPARC64) && PCI + depends on SPARC && PCI help This driver supports the Siemens SAB82532 DUSCC serial ports on newer (PCI) UltraSPARC systems. Say Y or M if you want to be able to these diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index 3e470c8..cc8e3bf 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig @@ -536,13 +536,13 @@ config FB_SUN3 config FB_SBUS bool "SBUS and UPA framebuffers" - depends on (FB = y) && (SPARC32 || SPARC64) + depends on (FB = y) && SPARC help Say Y if you want support for SBUS or UPA based frame buffer device. config FB_BW2 bool "BWtwo support" - depends on (FB = y) && ((SPARC32 || SPARC64) && FB_SBUS || (SUN3 || SUN3X) && FB_SUN3) + depends on (FB = y) && (SPARC && FB_SBUS || (SUN3 || SUN3X) && FB_SUN3) select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT @@ -551,7 +551,7 @@ config FB_BW2 config FB_CG3 bool "CGthree support" - depends on (FB = y) && ((SPARC32 || SPARC64) && FB_SBUS || (SUN3 || SUN3X) && FB_SUN3) + depends on (FB = y) && (SPARC && FB_SBUS || (SUN3 || SUN3X) && FB_SUN3) select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT @@ -560,7 +560,7 @@ config FB_CG3 config FB_CG6 bool "CGsix (GX,TurboGX) support" - depends on (FB = y) && ((SPARC32 || SPARC64) && FB_SBUS || (SUN3 || SUN3X) && FB_SUN3) + depends on (FB = y) && (SPARC && FB_SBUS || (SUN3 || SUN3X) && FB_SUN3) select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT help @@ -1268,7 +1268,7 @@ config FB_LEO config FB_PCI bool "PCI framebuffers" - depends on (FB = y) && PCI && (SPARC64 || SPARC32) + depends on (FB = y) && PCI && SPARC config FB_IGA bool "IGA 168x display support" diff --git a/drivers/video/console/Kconfig b/drivers/video/console/Kconfig index 5f74df9..a5d09e1 100644 --- a/drivers/video/console/Kconfig +++ b/drivers/video/console/Kconfig @@ -6,7 +6,7 @@ menu "Console display driver support" config VGA_CONSOLE bool "VGA text console" if EMBEDDED || !X86 - depends on !ARCH_ACORN && !ARCH_EBSA110 && !4xx && !8xx && !SPARC32 && !SPARC64 && !M68K && !PARISC && !ARCH_VERSATILE + depends on !ARCH_ACORN && !ARCH_EBSA110 && !4xx && !8xx && !SPARC && !M68K && !PARISC && !ARCH_VERSATILE default y help Saying Y here will allow you to use Linux in text mode through a @@ -68,7 +68,7 @@ config SGI_NEWPORT_CONSOLE config PROM_CONSOLE bool "PROM console" - depends on SPARC32 || SPARC64 + depends on SPARC help Say Y to build a console driver for Sun machines that uses the terminal emulation built into their console PROMS. @@ -136,7 +136,7 @@ config FONTS config FONT_8x8 bool "VGA 8x8 font" if FONTS depends on FRAMEBUFFER_CONSOLE || STI_CONSOLE - default y if !SPARC32 && !SPARC64 && !FONTS + default y if !SPARC && !FONTS help This is the "high resolution" font for the VGA frame buffer (the one provided by the text console 80x50 (and higher) modes). @@ -150,7 +150,7 @@ config FONT_8x8 config FONT_8x16 bool "VGA 8x16 font" if FONTS depends on FRAMEBUFFER_CONSOLE || SGI_NEWPORT_CONSOLE=y || STI_CONSOLE || USB_SISUSBVGA_CON - default y if !SPARC32 && !SPARC64 && !FONTS + default y if !SPARC && !FONTS help This is the "high resolution" font for the VGA frame buffer (the one provided by the VGA text console 80x25 mode. @@ -160,7 +160,7 @@ config FONT_8x16 config FONT_6x11 bool "Mac console 6x11 font (not supported by all drivers)" if FONTS depends on FRAMEBUFFER_CONSOLE || STI_CONSOLE - default y if !SPARC32 && !SPARC64 && !FONTS && MAC + default y if !SPARC && !FONTS && MAC help Small console font with Macintosh-style high-half glyphs. Some Mac framebuffer drivers don't support this one at all. @@ -176,7 +176,7 @@ config FONT_7x14 config FONT_PEARL_8x8 bool "Pearl (old m68k) console 8x8 font" if FONTS depends on FRAMEBUFFER_CONSOLE - default y if !SPARC32 && !SPARC64 && !FONTS && AMIGA + default y if !SPARC && !FONTS && AMIGA help Small console font with PC-style control-character and high-half glyphs. @@ -184,24 +184,24 @@ config FONT_PEARL_8x8 config FONT_ACORN_8x8 bool "Acorn console 8x8 font" if FONTS depends on FRAMEBUFFER_CONSOLE - default y if !SPARC32 && !SPARC64 && !FONTS && ARM && ARCH_ACORN + default y if !SPARC && !FONTS && ARM && ARCH_ACORN help Small console font with PC-style control characters and high-half glyphs. config FONT_MINI_4x6 bool "Mini 4x6 font" - depends on !SPARC32 && !SPARC64 && FONTS + depends on !SPARC && FONTS config FONT_SUN8x16 bool "Sparc console 8x16 font" - depends on FRAMEBUFFER_CONSOLE && (!SPARC32 && !SPARC64 && FONTS || SPARC32 || SPARC64) + depends on FRAMEBUFFER_CONSOLE && (!SPARC && FONTS || SPARC) help This is the high resolution console font for Sun machines. Say Y. config FONT_SUN12x22 bool "Sparc console 12x22 font (not supported by all drivers)" - depends on FRAMEBUFFER_CONSOLE && (!SPARC32 && !SPARC64 && FONTS || SPARC32 || SPARC64) + depends on FRAMEBUFFER_CONSOLE && (!SPARC && FONTS || SPARC) help This is the high resolution console font for Sun machines with very big letters (like the letters used in the SPARC PROM). If the diff --git a/drivers/video/logo/Kconfig b/drivers/video/logo/Kconfig index 8cb7fb4..f0e6512 100644 --- a/drivers/video/logo/Kconfig +++ b/drivers/video/logo/Kconfig @@ -47,7 +47,7 @@ config LOGO_SGI_CLUT224 config LOGO_SUN_CLUT224 bool "224-color Sun Linux logo" - depends on LOGO && (SPARC32 || SPARC64) + depends on LOGO && SPARC default y config LOGO_SUPERH_MONO -- cgit v1.1 From fd71da468dd8897fe3f565dfd3743a87d8678e3a Mon Sep 17 00:00:00 2001 From: Tony Battersby Date: Wed, 21 Dec 2005 16:35:44 -0500 Subject: [PATCH] fix libata inquiry VPD for ATAPI devices The following patch prevents libata from incorrectly modifying inquiry VPD pages and command support data from ATAPI devices. I have tested the patch with a SATA ATAPI tape drive on an AHCI controller. Patch is against kernel 2.4.32 with 2.4.32-libata1.patch applied. Anthony J. Battersby Cybernetics Signed-off-by: Jeff Garzik --- drivers/scsi/libata-scsi.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'drivers') diff --git a/drivers/scsi/libata-scsi.c b/drivers/scsi/libata-scsi.c index 72ddba9..2282c04 100644 --- a/drivers/scsi/libata-scsi.c +++ b/drivers/scsi/libata-scsi.c @@ -2044,7 +2044,7 @@ static int atapi_qc_complete(struct ata_queued_cmd *qc, unsigned int err_mask) else { u8 *scsicmd = cmd->cmnd; - if (scsicmd[0] == INQUIRY) { + if ((scsicmd[0] == INQUIRY) && ((scsicmd[1] & 0x03) == 0)) { u8 *buf = NULL; unsigned int buflen; @@ -2058,9 +2058,6 @@ static int atapi_qc_complete(struct ata_queued_cmd *qc, unsigned int err_mask) * device. 2) Ensure response data format / ATAPI information * are always correct. */ - /* FIXME: do we ever override EVPD pages and the like, with - * this code? - */ if (buf[2] == 0) { buf[2] = 0x5; buf[3] = 0x32; -- cgit v1.1 From c8cb00f6ac9aa13b0575726163b165fd2276ff25 Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Fri, 16 Dec 2005 18:49:53 -0500 Subject: [PATCH] orinoco_nortel: Fix incorrect PCI resource use orinoco_nortel was broken during conversion to iomem API. Wrong PCI BAR is used for chipset registers. Reported by Tomas Novak Signed-off-by: Pavel Roskin Signed-off-by: Jeff Garzik --- drivers/net/wireless/orinoco_nortel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/net/wireless/orinoco_nortel.c b/drivers/net/wireless/orinoco_nortel.c index d8afd51..e39c08b 100644 --- a/drivers/net/wireless/orinoco_nortel.c +++ b/drivers/net/wireless/orinoco_nortel.c @@ -165,7 +165,7 @@ static int nortel_pci_init_one(struct pci_dev *pdev, goto fail_resources; } - iomem = pci_iomap(pdev, 3, 0); + iomem = pci_iomap(pdev, 2, 0); if (!iomem) { err = -ENOMEM; goto fail_map_io; -- cgit v1.1 From d495657200bd3ce10f9cb52401056804bf365811 Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Fri, 16 Dec 2005 18:57:10 -0500 Subject: [PATCH] orinoco_nortel: Add Symbol LA-4123 ID Add ID for Symbol LA-4123. Reported by Tomas Novak Signed-off-by: Pavel Roskin Signed-off-by: Jeff Garzik --- drivers/net/wireless/orinoco_nortel.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'drivers') diff --git a/drivers/net/wireless/orinoco_nortel.c b/drivers/net/wireless/orinoco_nortel.c index e39c08b..d1a670b 100644 --- a/drivers/net/wireless/orinoco_nortel.c +++ b/drivers/net/wireless/orinoco_nortel.c @@ -1,6 +1,8 @@ /* orinoco_nortel.c * * Driver for Prism II devices which would usually be driven by orinoco_cs, + * but are connected to the PCI bus by a PCI-to-PCMCIA adapter used in + * Nortel emobility, Symbol LA-4113 and Symbol LA-4123. * but are connected to the PCI bus by a Nortel PCI-PCMCIA-Adapter. * * Copyright (C) 2002 Tobias Hoffmann @@ -265,6 +267,8 @@ static void __devexit nortel_pci_remove_one(struct pci_dev *pdev) static struct pci_device_id nortel_pci_id_table[] = { /* Nortel emobility PCI */ {0x126c, 0x8030, PCI_ANY_ID, PCI_ANY_ID,}, + /* Symbol LA-4123 PCI */ + {0x1562, 0x0001, PCI_ANY_ID, PCI_ANY_ID,}, {0,}, }; -- cgit v1.1 From afcceaa3c7b7fbf7e2b95c5f0dd43547b03292d2 Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Wed, 14 Dec 2005 00:33:49 +0100 Subject: [PATCH] missing license for libphy.ko Andy, libphy has no license tag. Something like the attached (untested!) patch is needed. Hopefully such a change finds its way into 2.6.15. filename: /lib/modules/2.6.15-rc5-3-ppc64/kernel/drivers/net/phy/libphy.ko vermagic: 2.6.15-rc5-3-ppc64 SMP gcc-4.1 depends: srcversion: ACC921B5E82701BE1E6F603 drivers/net/phy/phy_device.c | 4 ++++ 1 files changed, 4 insertions(+) Signed-off-by: Jeff Garzik --- drivers/net/phy/phy_device.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'drivers') diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c index 16bebe7..7da0e3d 100644 --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c @@ -38,6 +38,10 @@ #include #include +MODULE_DESCRIPTION("PHY library"); +MODULE_AUTHOR("Andy Fleming"); +MODULE_LICENSE("GPL"); + static struct phy_driver genphy_driver; extern int mdio_bus_init(void); extern void mdio_bus_exit(void); -- cgit v1.1 From 6c6b3e7c4f93d330b920e6531b579b1f6bae5ac1 Mon Sep 17 00:00:00 2001 From: Frank Pavlic Date: Tue, 13 Dec 2005 08:21:47 +0100 Subject: [PATCH] s390: some minor qeth driver fixes [patch 1/3] s390: some minor qeth driver fixes From: Frank Pavlic - let's have just one function for both ,input and output queue to check qdio errors - add /proc/s390dbf/qeth_qerr entries for outbound processing - check removed for layer2 device in qeth_add_multicast_ipv6 - NULL pointer dereference with bonding and VLAN device fixed - minimum length check for portname fixed Signed-off-by: Frank Pavlic diffstat: qeth_main.c | 42 +++++++++++++++++++++--------------------- qeth_sys.c | 6 +++--- 2 files changed, 24 insertions(+), 24 deletions(-) Signed-off-by: Jeff Garzik --- drivers/s390/net/qeth_main.c | 42 +++++++++++++++++++++--------------------- drivers/s390/net/qeth_sys.c | 6 +++--- 2 files changed, 24 insertions(+), 24 deletions(-) (limited to 'drivers') diff --git a/drivers/s390/net/qeth_main.c b/drivers/s390/net/qeth_main.c index 99cceb2..5d2d548 100644 --- a/drivers/s390/net/qeth_main.c +++ b/drivers/s390/net/qeth_main.c @@ -1,6 +1,6 @@ /* * - * linux/drivers/s390/net/qeth_main.c ($Revision: 1.242 $) + * linux/drivers/s390/net/qeth_main.c ($Revision: 1.246 $) * * Linux on zSeries OSA Express and HiperSockets support * @@ -72,7 +72,7 @@ #include "qeth_eddp.h" #include "qeth_tso.h" -#define VERSION_QETH_C "$Revision: 1.242 $" +#define VERSION_QETH_C "$Revision: 1.246 $" static const char *version = "qeth S/390 OSA-Express driver"; /** @@ -2203,24 +2203,21 @@ qeth_ulp_setup(struct qeth_card *card) } static inline int -qeth_check_for_inbound_error(struct qeth_qdio_buffer *buf, - unsigned int qdio_error, - unsigned int siga_error) +qeth_check_qdio_errors(struct qdio_buffer *buf, unsigned int qdio_error, + unsigned int siga_error, const char *dbftext) { - int rc = 0; - if (qdio_error || siga_error) { - QETH_DBF_TEXT(trace, 2, "qdinerr"); - QETH_DBF_TEXT(qerr, 2, "qdinerr"); + QETH_DBF_TEXT(trace, 2, dbftext); + QETH_DBF_TEXT(qerr, 2, dbftext); QETH_DBF_TEXT_(qerr, 2, " F15=%02X", - buf->buffer->element[15].flags & 0xff); + buf->element[15].flags & 0xff); QETH_DBF_TEXT_(qerr, 2, " F14=%02X", - buf->buffer->element[14].flags & 0xff); + buf->element[14].flags & 0xff); QETH_DBF_TEXT_(qerr, 2, " qerr=%X", qdio_error); QETH_DBF_TEXT_(qerr, 2, " serr=%X", siga_error); - rc = 1; + return 1; } - return rc; + return 0; } static inline struct sk_buff * @@ -2769,8 +2766,9 @@ qeth_qdio_input_handler(struct ccw_device * ccwdev, unsigned int status, for (i = first_element; i < (first_element + count); ++i) { index = i % QDIO_MAX_BUFFERS_PER_Q; buffer = &card->qdio.in_q->bufs[index]; - if (!((status == QDIO_STATUS_LOOK_FOR_ERROR) && - qeth_check_for_inbound_error(buffer, qdio_err, siga_err))) + if (!((status & QDIO_STATUS_LOOK_FOR_ERROR) && + qeth_check_qdio_errors(buffer->buffer, + qdio_err, siga_err,"qinerr"))) qeth_process_inbound_buffer(card, buffer, index); /* clear buffer and give back to hardware */ qeth_put_buffer_pool_entry(card, buffer->pool_entry); @@ -2785,12 +2783,13 @@ qeth_qdio_input_handler(struct ccw_device * ccwdev, unsigned int status, static inline int qeth_handle_send_error(struct qeth_card *card, struct qeth_qdio_out_buffer *buffer, - int qdio_err, int siga_err) + unsigned int qdio_err, unsigned int siga_err) { int sbalf15 = buffer->buffer->element[15].flags & 0xff; int cc = siga_err & 3; QETH_DBF_TEXT(trace, 6, "hdsnderr"); + qeth_check_qdio_errors(buffer->buffer, qdio_err, siga_err, "qouterr"); switch (cc) { case 0: if (qdio_err){ @@ -3047,7 +3046,8 @@ qeth_qdio_output_handler(struct ccw_device * ccwdev, unsigned int status, for(i = first_element; i < (first_element + count); ++i){ buffer = &queue->bufs[i % QDIO_MAX_BUFFERS_PER_Q]; /*we only handle the KICK_IT error by doing a recovery */ - if (qeth_handle_send_error(card, buffer, qdio_error, siga_error) + if (qeth_handle_send_error(card, buffer, + qdio_error, siga_error) == QETH_SEND_ERROR_KICK_IT){ netif_stop_queue(card->dev); qeth_schedule_recovery(card); @@ -3289,7 +3289,6 @@ qeth_init_qdio_info(struct qeth_card *card) card->qdio.in_buf_pool.buf_count = card->qdio.init_pool.buf_count; INIT_LIST_HEAD(&card->qdio.in_buf_pool.entry_list); INIT_LIST_HEAD(&card->qdio.init_pool.entry_list); - /* outbound */ } static int @@ -3731,6 +3730,9 @@ qeth_verify_vlan_dev(struct net_device *dev, struct qeth_card *card) break; } } + if (rc && !(VLAN_DEV_INFO(dev)->real_dev->priv == (void *)card)) + return 0; + #endif return rc; } @@ -5870,10 +5872,8 @@ qeth_add_multicast_ipv6(struct qeth_card *card) struct inet6_dev *in6_dev; QETH_DBF_TEXT(trace,4,"chkmcv6"); - if ((card->options.layer2 == 0) && - (!qeth_is_supported(card, IPA_IPV6)) ) + if (!qeth_is_supported(card, IPA_IPV6)) return ; - in6_dev = in6_dev_get(card->dev); if (in6_dev == NULL) return; diff --git a/drivers/s390/net/qeth_sys.c b/drivers/s390/net/qeth_sys.c index ddd6019..8092596 100644 --- a/drivers/s390/net/qeth_sys.c +++ b/drivers/s390/net/qeth_sys.c @@ -1,6 +1,6 @@ /* * - * linux/drivers/s390/net/qeth_sys.c ($Revision: 1.58 $) + * linux/drivers/s390/net/qeth_sys.c ($Revision: 1.59 $) * * Linux on zSeries OSA Express and HiperSockets support * This file contains code related to sysfs. @@ -20,7 +20,7 @@ #include "qeth_mpc.h" #include "qeth_fs.h" -const char *VERSION_QETH_SYS_C = "$Revision: 1.58 $"; +const char *VERSION_QETH_SYS_C = "$Revision: 1.59 $"; /*****************************************************************************/ /* */ @@ -160,7 +160,7 @@ qeth_dev_portname_store(struct device *dev, struct device_attribute *attr, const return -EPERM; tmp = strsep((char **) &buf, "\n"); - if ((strlen(tmp) > 8) || (strlen(tmp) < 2)) + if ((strlen(tmp) > 8) || (strlen(tmp) == 0)) return -EINVAL; card->info.portname[0] = strlen(tmp); -- cgit v1.1 From 4965e97fd36041d19483843c66286b9800a57c15 Mon Sep 17 00:00:00 2001 From: Frank Pavlic Date: Tue, 13 Dec 2005 08:22:30 +0100 Subject: [PATCH] s390: minor qeth network driver fixes [patch 2/3] s390: minor qeth network driver fixes From: Frank Pavlic - use netif_carrier_on/off calls to tell network stack link carrier state - fix possible kfree on NULL - PDU_LEN2 is at offset 0x29 otherwise OSN chpid won't initialize Signed-off-by: Frank Pavlic diffstat: qeth_eddp.c | 3 ++- qeth_main.c | 17 +++++++---------- qeth_mpc.h | 2 +- 3 files changed, 10 insertions(+), 12 deletions(-) Signed-off-by: Jeff Garzik --- drivers/s390/net/qeth_eddp.c | 3 ++- drivers/s390/net/qeth_main.c | 17 +++++++---------- drivers/s390/net/qeth_mpc.h | 2 +- 3 files changed, 10 insertions(+), 12 deletions(-) (limited to 'drivers') diff --git a/drivers/s390/net/qeth_eddp.c b/drivers/s390/net/qeth_eddp.c index 011915d..f94f1f25 100644 --- a/drivers/s390/net/qeth_eddp.c +++ b/drivers/s390/net/qeth_eddp.c @@ -62,7 +62,8 @@ qeth_eddp_free_context(struct qeth_eddp_context *ctx) for (i = 0; i < ctx->num_pages; ++i) free_page((unsigned long)ctx->pages[i]); kfree(ctx->pages); - kfree(ctx->elements); + if (ctx->elements != NULL) + kfree(ctx->elements); kfree(ctx); } diff --git a/drivers/s390/net/qeth_main.c b/drivers/s390/net/qeth_main.c index 5d2d548..e693dc4 100644 --- a/drivers/s390/net/qeth_main.c +++ b/drivers/s390/net/qeth_main.c @@ -518,7 +518,8 @@ __qeth_set_offline(struct ccwgroup_device *cgdev, int recovery_mode) QETH_DBF_TEXT(setup, 3, "setoffl"); QETH_DBF_HEX(setup, 3, &card, sizeof(void *)); - + + netif_carrier_off(card->dev); recover_flag = card->state; if (qeth_stop_card(card, recovery_mode) == -ERESTARTSYS){ PRINT_WARN("Stopping card %s interrupted by user!\n", @@ -1020,7 +1021,6 @@ void qeth_schedule_recovery(struct qeth_card *card) { QETH_DBF_TEXT(trace,2,"startrec"); - if (qeth_set_thread_start_bit(card, QETH_RECOVER_THREAD) == 0) schedule_work(&card->kernel_thread_starter); } @@ -1710,7 +1710,6 @@ qeth_check_ipa_data(struct qeth_card *card, struct qeth_cmd_buffer *iob) "IP address reset.\n", QETH_CARD_IFNAME(card), card->info.chpid); - netif_carrier_on(card->dev); qeth_schedule_recovery(card); return NULL; case IPA_CMD_MODCCID: @@ -1959,7 +1958,7 @@ qeth_osn_send_ipa_cmd(struct qeth_card *card, struct qeth_cmd_buffer *iob, { u16 s1, s2; -QETH_DBF_TEXT(trace,4,"osndipa"); + QETH_DBF_TEXT(trace,4,"osndipa"); qeth_prepare_ipa_cmd(card, iob, QETH_PROT_OSN2); s1 = (u16)(IPA_PDU_HEADER_SIZE + data_len); @@ -3809,10 +3808,8 @@ qeth_open(struct net_device *dev) card->data.state = CH_STATE_UP; card->state = CARD_STATE_UP; - if (!card->lan_online){ - if (netif_carrier_ok(dev)) - netif_carrier_off(dev); - } + if (!card->lan_online && netif_carrier_ok(dev)) + netif_carrier_off(dev); return 0; } @@ -7936,8 +7933,8 @@ __qeth_set_online(struct ccwgroup_device *gdev, int recovery_mode) QETH_DBF_TEXT_(setup, 2, "6err%d", rc); goto out_remove; } -/*maybe it was set offline without ifconfig down - * we can also use this state for recovery purposes*/ + netif_carrier_on(card->dev); + qeth_set_allowed_threads(card, 0xffffffff, 0); if (recover_flag == CARD_STATE_RECOVER) qeth_start_again(card, recovery_mode); diff --git a/drivers/s390/net/qeth_mpc.h b/drivers/s390/net/qeth_mpc.h index 5f71486..00c7178 100644 --- a/drivers/s390/net/qeth_mpc.h +++ b/drivers/s390/net/qeth_mpc.h @@ -21,7 +21,7 @@ extern const char *VERSION_QETH_MPC_C; #define IPA_PDU_HEADER_SIZE 0x40 #define QETH_IPA_PDU_LEN_TOTAL(buffer) (buffer+0x0e) #define QETH_IPA_PDU_LEN_PDU1(buffer) (buffer+0x26) -#define QETH_IPA_PDU_LEN_PDU2(buffer) (buffer+0x2a) +#define QETH_IPA_PDU_LEN_PDU2(buffer) (buffer+0x29) #define QETH_IPA_PDU_LEN_PDU3(buffer) (buffer+0x3a) extern unsigned char IPA_PDU_HEADER[]; -- cgit v1.1 From 3df3cc6d18b6dcd38c33c198fb8adf1f1fa5f4a7 Mon Sep 17 00:00:00 2001 From: Frank Pavlic Date: Tue, 13 Dec 2005 08:23:26 +0100 Subject: [PATCH] s390: remove redundant and useless code in qeth [patch 3/3] s390: remove redundant and useless code in qeth From: Frank Pavlic - remove redundant and useless code in qeth for procfs operations. - update Revision numbers Signed-off-by: Frank Pavlic diffstat: qeth_main.c | 6 - qeth_mpc.c | 2 qeth_mpc.h | 2 qeth_proc.c | 250 ++++++------------------------------------------------------ qeth_sys.c | 4 qeth_tso.h | 4 6 files changed, 38 insertions(+), 230 deletions(-) Signed-off-by: Jeff Garzik --- drivers/s390/net/qeth_main.c | 6 +- drivers/s390/net/qeth_mpc.c | 2 +- drivers/s390/net/qeth_mpc.h | 2 +- drivers/s390/net/qeth_proc.c | 250 +++++-------------------------------------- drivers/s390/net/qeth_sys.c | 4 +- drivers/s390/net/qeth_tso.h | 4 +- 6 files changed, 38 insertions(+), 230 deletions(-) (limited to 'drivers') diff --git a/drivers/s390/net/qeth_main.c b/drivers/s390/net/qeth_main.c index e693dc4..f8f55cc 100644 --- a/drivers/s390/net/qeth_main.c +++ b/drivers/s390/net/qeth_main.c @@ -1,6 +1,6 @@ /* * - * linux/drivers/s390/net/qeth_main.c ($Revision: 1.246 $) + * linux/drivers/s390/net/qeth_main.c ($Revision: 1.251 $) * * Linux on zSeries OSA Express and HiperSockets support * @@ -12,7 +12,7 @@ * Frank Pavlic (fpavlic@de.ibm.com) and * Thomas Spatzier * - * $Revision: 1.242 $ $Date: 2005/05/04 20:19:18 $ + * $Revision: 1.251 $ $Date: 2005/05/04 20:19:18 $ * * 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 @@ -72,7 +72,7 @@ #include "qeth_eddp.h" #include "qeth_tso.h" -#define VERSION_QETH_C "$Revision: 1.246 $" +#define VERSION_QETH_C "$Revision: 1.251 $" static const char *version = "qeth S/390 OSA-Express driver"; /** diff --git a/drivers/s390/net/qeth_mpc.c b/drivers/s390/net/qeth_mpc.c index f0a080a..5f8754a 100644 --- a/drivers/s390/net/qeth_mpc.c +++ b/drivers/s390/net/qeth_mpc.c @@ -11,7 +11,7 @@ #include #include "qeth_mpc.h" -const char *VERSION_QETH_MPC_C = "$Revision: 1.12 $"; +const char *VERSION_QETH_MPC_C = "$Revision: 1.13 $"; unsigned char IDX_ACTIVATE_READ[]={ 0x00,0x00,0x80,0x00, 0x00,0x00,0x00,0x00, diff --git a/drivers/s390/net/qeth_mpc.h b/drivers/s390/net/qeth_mpc.h index 00c7178..864cec5 100644 --- a/drivers/s390/net/qeth_mpc.h +++ b/drivers/s390/net/qeth_mpc.h @@ -14,7 +14,7 @@ #include -#define VERSION_QETH_MPC_H "$Revision: 1.44 $" +#define VERSION_QETH_MPC_H "$Revision: 1.46 $" extern const char *VERSION_QETH_MPC_C; diff --git a/drivers/s390/net/qeth_proc.c b/drivers/s390/net/qeth_proc.c index f2ccfea..7bf3509 100644 --- a/drivers/s390/net/qeth_proc.c +++ b/drivers/s390/net/qeth_proc.c @@ -1,6 +1,6 @@ /* * - * linux/drivers/s390/net/qeth_fs.c ($Revision: 1.13 $) + * linux/drivers/s390/net/qeth_fs.c ($Revision: 1.16 $) * * Linux on zSeries OSA Express and HiperSockets support * This file contains code related to procfs. @@ -21,7 +21,7 @@ #include "qeth_mpc.h" #include "qeth_fs.h" -const char *VERSION_QETH_PROC_C = "$Revision: 1.13 $"; +const char *VERSION_QETH_PROC_C = "$Revision: 1.16 $"; /***** /proc/qeth *****/ #define QETH_PROCFILE_NAME "qeth" @@ -30,30 +30,26 @@ static struct proc_dir_entry *qeth_procfile; static int qeth_procfile_seq_match(struct device *dev, void *data) { - return 1; + return(dev ? 1 : 0); } static void * qeth_procfile_seq_start(struct seq_file *s, loff_t *offset) { - struct device *dev; - loff_t nr; - + struct device *dev = NULL; + loff_t nr = 0; + down_read(&qeth_ccwgroup_driver.driver.bus->subsys.rwsem); - - nr = *offset; - if (nr == 0) + if (*offset == 0) return SEQ_START_TOKEN; - - dev = driver_find_device(&qeth_ccwgroup_driver.driver, NULL, - NULL, qeth_procfile_seq_match); - - /* get card at pos *offset */ - nr = *offset; - while (nr-- > 1 && dev) + while (1) { dev = driver_find_device(&qeth_ccwgroup_driver.driver, dev, NULL, qeth_procfile_seq_match); - return (void *) dev; + if (++nr == *offset) + break; + put_device(dev); + } + return dev; } static void @@ -66,19 +62,14 @@ static void * qeth_procfile_seq_next(struct seq_file *s, void *it, loff_t *offset) { struct device *prev, *next; - - if (it == SEQ_START_TOKEN) { - next = driver_find_device(&qeth_ccwgroup_driver.driver, - NULL, NULL, qeth_procfile_seq_match); - if (next) - (*offset)++; - return (void *) next; - } - prev = (struct device *) it; + + if (it == SEQ_START_TOKEN) + prev = NULL; + else + prev = (struct device *) it; next = driver_find_device(&qeth_ccwgroup_driver.driver, prev, NULL, qeth_procfile_seq_match); - if (next) - (*offset)++; + (*offset)++; return (void *) next; } @@ -87,7 +78,7 @@ qeth_get_router_str(struct qeth_card *card, int ipv) { int routing_type = 0; - if (ipv == 4){ + if (ipv == 4) { routing_type = card->options.route4.type; } else { #ifdef CONFIG_QETH_IPV6 @@ -154,6 +145,7 @@ qeth_procfile_seq_show(struct seq_file *s, void *it) card->qdio.in_buf_pool.buf_count); else seq_printf(s, " +++ LAN OFFLINE +++\n"); + put_device(device); } return 0; } @@ -184,51 +176,16 @@ static struct file_operations qeth_procfile_fops = { static struct proc_dir_entry *qeth_perf_procfile; #ifdef CONFIG_QETH_PERF_STATS - -static void * -qeth_perf_procfile_seq_start(struct seq_file *s, loff_t *offset) -{ - struct device *dev = NULL; - int nr; - - down_read(&qeth_ccwgroup_driver.driver.bus->subsys.rwsem); - /* get card at pos *offset */ - dev = driver_find_device(&qeth_ccwgroup_driver.driver, NULL, NULL, - qeth_procfile_seq_match); - - /* get card at pos *offset */ - nr = *offset; - while (nr-- > 1 && dev) - dev = driver_find_device(&qeth_ccwgroup_driver.driver, dev, - NULL, qeth_procfile_seq_match); - return (void *) dev; -} - -static void -qeth_perf_procfile_seq_stop(struct seq_file *s, void* it) -{ - up_read(&qeth_ccwgroup_driver.driver.bus->subsys.rwsem); -} - -static void * -qeth_perf_procfile_seq_next(struct seq_file *s, void *it, loff_t *offset) -{ - struct device *prev, *next; - - prev = (struct device *) it; - next = driver_find_device(&qeth_ccwgroup_driver.driver, prev, - NULL, qeth_procfile_seq_match); - if (next) - (*offset)++; - return (void *) next; -} - static int qeth_perf_procfile_seq_show(struct seq_file *s, void *it) { struct device *device; struct qeth_card *card; + + if (it == SEQ_START_TOKEN) + return 0; + device = (struct device *) it; card = device->driver_data; seq_printf(s, "For card with devnos %s/%s/%s (%s):\n", @@ -295,13 +252,14 @@ qeth_perf_procfile_seq_show(struct seq_file *s, void *it) card->perf_stats.outbound_do_qdio_time, card->perf_stats.outbound_do_qdio_cnt ); + put_device(device); return 0; } static struct seq_operations qeth_perf_procfile_seq_ops = { - .start = qeth_perf_procfile_seq_start, - .stop = qeth_perf_procfile_seq_stop, - .next = qeth_perf_procfile_seq_next, + .start = qeth_procfile_seq_start, + .stop = qeth_procfile_seq_stop, + .next = qeth_procfile_seq_next, .show = qeth_perf_procfile_seq_show, }; @@ -324,93 +282,6 @@ static struct file_operations qeth_perf_procfile_fops = { #define qeth_perf_procfile_created 1 #endif /* CONFIG_QETH_PERF_STATS */ -/***** /proc/qeth_ipa_takeover *****/ -#define QETH_IPATO_PROCFILE_NAME "qeth_ipa_takeover" -static struct proc_dir_entry *qeth_ipato_procfile; - -static void * -qeth_ipato_procfile_seq_start(struct seq_file *s, loff_t *offset) -{ - struct device *dev; - loff_t nr; - - down_read(&qeth_ccwgroup_driver.driver.bus->subsys.rwsem); - /* TODO: finish this */ - /* - * maybe SEQ_SATRT_TOKEN can be returned for offset 0 - * output driver settings then; - * else output setting for respective card - */ - - dev = driver_find_device(&qeth_ccwgroup_driver.driver, NULL, NULL, - qeth_procfile_seq_match); - - /* get card at pos *offset */ - nr = *offset; - while (nr-- > 1 && dev) - dev = driver_find_device(&qeth_ccwgroup_driver.driver, dev, - NULL, qeth_procfile_seq_match); - return (void *) dev; -} - -static void -qeth_ipato_procfile_seq_stop(struct seq_file *s, void* it) -{ - up_read(&qeth_ccwgroup_driver.driver.bus->subsys.rwsem); -} - -static void * -qeth_ipato_procfile_seq_next(struct seq_file *s, void *it, loff_t *offset) -{ - struct device *prev, *next; - - prev = (struct device *) it; - next = driver_find_device(&qeth_ccwgroup_driver.driver, prev, - NULL, qeth_procfile_seq_match); - if (next) - (*offset)++; - return (void *) next; -} - -static int -qeth_ipato_procfile_seq_show(struct seq_file *s, void *it) -{ - struct device *device; - struct qeth_card *card; - - /* TODO: finish this */ - /* - * maybe SEQ_SATRT_TOKEN can be returned for offset 0 - * output driver settings then; - * else output setting for respective card - */ - device = (struct device *) it; - card = device->driver_data; - - return 0; -} - -static struct seq_operations qeth_ipato_procfile_seq_ops = { - .start = qeth_ipato_procfile_seq_start, - .stop = qeth_ipato_procfile_seq_stop, - .next = qeth_ipato_procfile_seq_next, - .show = qeth_ipato_procfile_seq_show, -}; - -static int -qeth_ipato_procfile_open(struct inode *inode, struct file *file) -{ - return seq_open(file, &qeth_ipato_procfile_seq_ops); -} - -static struct file_operations qeth_ipato_procfile_fops = { - .owner = THIS_MODULE, - .open = qeth_ipato_procfile_open, - .read = seq_read, - .llseek = seq_lseek, - .release = seq_release, -}; - int __init qeth_create_procfs_entries(void) { @@ -426,13 +297,7 @@ qeth_create_procfs_entries(void) qeth_perf_procfile->proc_fops = &qeth_perf_procfile_fops; #endif /* CONFIG_QETH_PERF_STATS */ - qeth_ipato_procfile = create_proc_entry(QETH_IPATO_PROCFILE_NAME, - S_IFREG | 0444, NULL); - if (qeth_ipato_procfile) - qeth_ipato_procfile->proc_fops = &qeth_ipato_procfile_fops; - if (qeth_procfile && - qeth_ipato_procfile && qeth_perf_procfile_created) return 0; else @@ -446,62 +311,5 @@ qeth_remove_procfs_entries(void) remove_proc_entry(QETH_PROCFILE_NAME, NULL); if (qeth_perf_procfile) remove_proc_entry(QETH_PERF_PROCFILE_NAME, NULL); - if (qeth_ipato_procfile) - remove_proc_entry(QETH_IPATO_PROCFILE_NAME, NULL); } - -/* ONLY FOR DEVELOPMENT! -> make it as module */ -/* -static void -qeth_create_sysfs_entries(void) -{ - struct device *dev; - - down_read(&qeth_ccwgroup_driver.driver.bus->subsys.rwsem); - - list_for_each_entry(dev, &qeth_ccwgroup_driver.driver.devices, - driver_list) - qeth_create_device_attributes(dev); - - up_read(&qeth_ccwgroup_driver.driver.bus->subsys.rwsem); -} - -static void -qeth_remove_sysfs_entries(void) -{ - struct device *dev; - - down_read(&qeth_ccwgroup_driver.driver.bus->subsys.rwsem); - - list_for_each_entry(dev, &qeth_ccwgroup_driver.driver.devices, - driver_list) - qeth_remove_device_attributes(dev); - - up_read(&qeth_ccwgroup_driver.driver.bus->subsys.rwsem); -} - -static int __init -qeth_fs_init(void) -{ - printk(KERN_INFO "qeth_fs_init\n"); - qeth_create_procfs_entries(); - qeth_create_sysfs_entries(); - - return 0; -} - -static void __exit -qeth_fs_exit(void) -{ - printk(KERN_INFO "qeth_fs_exit\n"); - qeth_remove_procfs_entries(); - qeth_remove_sysfs_entries(); -} - - -module_init(qeth_fs_init); -module_exit(qeth_fs_exit); - -MODULE_LICENSE("GPL"); -*/ diff --git a/drivers/s390/net/qeth_sys.c b/drivers/s390/net/qeth_sys.c index 8092596..0ea185f 100644 --- a/drivers/s390/net/qeth_sys.c +++ b/drivers/s390/net/qeth_sys.c @@ -1,6 +1,6 @@ /* * - * linux/drivers/s390/net/qeth_sys.c ($Revision: 1.59 $) + * linux/drivers/s390/net/qeth_sys.c ($Revision: 1.60 $) * * Linux on zSeries OSA Express and HiperSockets support * This file contains code related to sysfs. @@ -20,7 +20,7 @@ #include "qeth_mpc.h" #include "qeth_fs.h" -const char *VERSION_QETH_SYS_C = "$Revision: 1.59 $"; +const char *VERSION_QETH_SYS_C = "$Revision: 1.60 $"; /*****************************************************************************/ /* */ diff --git a/drivers/s390/net/qeth_tso.h b/drivers/s390/net/qeth_tso.h index e245af3..3c50b6f 100644 --- a/drivers/s390/net/qeth_tso.h +++ b/drivers/s390/net/qeth_tso.h @@ -1,5 +1,5 @@ /* - * linux/drivers/s390/net/qeth_tso.h ($Revision: 1.7 $) + * linux/drivers/s390/net/qeth_tso.h ($Revision: 1.8 $) * * Header file for qeth TCP Segmentation Offload support. * @@ -7,7 +7,7 @@ * * Author(s): Frank Pavlic * - * $Revision: 1.7 $ $Date: 2005/05/04 20:19:18 $ + * $Revision: 1.8 $ $Date: 2005/05/04 20:19:18 $ * */ #ifndef __QETH_TSO_H__ -- cgit v1.1 From 1836098f97d22c81652aeeec64d1819dc2177bdb Mon Sep 17 00:00:00 2001 From: Manfred Spraul Date: Sat, 24 Dec 2005 14:19:24 +0100 Subject: [PATCH] forcedeth: fix random memory scribbling bug Two critical bugs were found in forcedeth 0.47: - TSO doesn't work. - pci_map_single() for the rx buffers is called with size==0. This bug is critical, it causes random memory corruptions on systems with an iommu. Below is a minimal fix for both bugs, for 2.6.15. TSO will be fixed properly in the next version. Tested on x86-64. Signed-Off-By: Manfred Spraul Signed-off-by: Linus Torvalds --- drivers/net/forcedeth.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'drivers') diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c index 525624f..c39344a 100644 --- a/drivers/net/forcedeth.c +++ b/drivers/net/forcedeth.c @@ -10,7 +10,7 @@ * trademarks of NVIDIA Corporation in the United States and other * countries. * - * Copyright (C) 2003,4 Manfred Spraul + * Copyright (C) 2003,4,5 Manfred Spraul * Copyright (C) 2004 Andrew de Quincey (wol support) * Copyright (C) 2004 Carl-Daniel Hailfinger (invalid MAC handling, insane * IRQ rate fixes, bigendian fixes, cleanups, verification) @@ -100,6 +100,7 @@ * 0.45: 18 Sep 2005: Remove nv_stop/start_rx from every link check * 0.46: 20 Oct 2005: Add irq optimization modes. * 0.47: 26 Oct 2005: Add phyaddr 0 in phy scan. + * 0.48: 24 Dec 2005: Disable TSO, bugfix for pci_map_single * * Known bugs: * We suspect that on some hardware no TX done interrupts are generated. @@ -111,7 +112,7 @@ * DEV_NEED_TIMERIRQ will not harm you on sane hardware, only generating a few * superfluous timer interrupts from the nic. */ -#define FORCEDETH_VERSION "0.47" +#define FORCEDETH_VERSION "0.48" #define DRV_NAME "forcedeth" #include @@ -871,8 +872,8 @@ static int nv_alloc_rx(struct net_device *dev) } else { skb = np->rx_skbuff[nr]; } - np->rx_dma[nr] = pci_map_single(np->pci_dev, skb->data, skb->len, - PCI_DMA_FROMDEVICE); + np->rx_dma[nr] = pci_map_single(np->pci_dev, skb->data, + skb->end-skb->data, PCI_DMA_FROMDEVICE); if (np->desc_ver == DESC_VER_1 || np->desc_ver == DESC_VER_2) { np->rx_ring.orig[nr].PacketBuffer = cpu_to_le32(np->rx_dma[nr]); wmb(); @@ -999,7 +1000,7 @@ static void nv_drain_rx(struct net_device *dev) wmb(); if (np->rx_skbuff[i]) { pci_unmap_single(np->pci_dev, np->rx_dma[i], - np->rx_skbuff[i]->len, + np->rx_skbuff[i]->end-np->rx_skbuff[i]->data, PCI_DMA_FROMDEVICE); dev_kfree_skb(np->rx_skbuff[i]); np->rx_skbuff[i] = NULL; @@ -1334,7 +1335,7 @@ static void nv_rx_process(struct net_device *dev) * the performance. */ pci_unmap_single(np->pci_dev, np->rx_dma[i], - np->rx_skbuff[i]->len, + np->rx_skbuff[i]->end-np->rx_skbuff[i]->data, PCI_DMA_FROMDEVICE); { @@ -2455,7 +2456,7 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i np->txrxctl_bits |= NVREG_TXRXCTL_RXCHECK; dev->features |= NETIF_F_HW_CSUM | NETIF_F_SG; #ifdef NETIF_F_TSO - dev->features |= NETIF_F_TSO; + /* disabled dev->features |= NETIF_F_TSO; */ #endif } -- cgit v1.1 From e445ee65cbefaa19131c972ae7fe221c95cf4cc4 Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Sat, 24 Dec 2005 12:06:10 -0800 Subject: [VIDEO] sbuslib: Disallow private mmaps. The COW semantics just do not make any sense especially with the physically discontiguous I/O mappings possible here. Signed-off-by: David S. Miller --- drivers/video/sbuslib.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers') diff --git a/drivers/video/sbuslib.c b/drivers/video/sbuslib.c index 646c43f..3a74a63 100644 --- a/drivers/video/sbuslib.c +++ b/drivers/video/sbuslib.c @@ -46,6 +46,9 @@ int sbusfb_mmap_helper(struct sbus_mmap_map *map, unsigned long off; int i; + if (!(vma->vm_flags & (VM_SHARED | VM_MAYSHARE))) + return -EINVAL; + size = vma->vm_end - vma->vm_start; if (vma->vm_pgoff > (~0UL >> PAGE_SHIFT)) return -EINVAL; -- cgit v1.1 From 04333393b930370db0cc29fdf0dbbd08ecd43337 Mon Sep 17 00:00:00 2001 From: James Bottomley Date: Mon, 26 Dec 2005 09:58:49 -0600 Subject: [PATCH] Fix Fibre Channel boot oops The oops is characteristic of the underlying device being removed from visibility before the class device, and sure enough we do device_del() before transport_unregister() in the scsi_target_reap() routines. I've no idea why this is suddenly showing up, since the code has been in there since that function was first invented. However, I've confirmed this fixes Andrew Vasquez's boot oops. Signed-off-by: James Bottomley Signed-off-by: Linus Torvalds --- drivers/scsi/scsi_scan.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c index e36c21e..4e6709f 100644 --- a/drivers/scsi/scsi_scan.c +++ b/drivers/scsi/scsi_scan.c @@ -418,8 +418,9 @@ static void scsi_target_reap_work(void *data) { if (--starget->reap_ref == 0 && list_empty(&starget->devices)) { list_del_init(&starget->siblings); spin_unlock_irqrestore(shost->host_lock, flags); + transport_remove_device(&starget->dev); device_del(&starget->dev); - transport_unregister_device(&starget->dev); + transport_destroy_device(&starget->dev); put_device(&starget->dev); return; -- cgit v1.1 From a710ce08585e920740ffc84c7f3c82f4081169cf Mon Sep 17 00:00:00 2001 From: Russell King Date: Tue, 27 Dec 2005 11:10:34 +0000 Subject: [SERIAL] Fix AMBA PL011 sysrq character handling We only want the received character without the status bits for sysrq handling. Signed-off-by: Russell King --- drivers/serial/amba-pl011.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/serial/amba-pl011.c b/drivers/serial/amba-pl011.c index 89d7bd3..d84476e 100644 --- a/drivers/serial/amba-pl011.c +++ b/drivers/serial/amba-pl011.c @@ -160,7 +160,7 @@ pl011_rx_chars(struct uart_amba_port *uap) flag = TTY_FRAME; } - if (uart_handle_sysrq_char(&uap->port, ch, regs)) + if (uart_handle_sysrq_char(&uap->port, ch & 255, regs)) goto ignore_char; uart_insert_char(&uap->port, ch, UART011_DR_OE, ch, flag); -- cgit v1.1 From 1b93ae64cabe5e28dd5a1f35f96f938ca4f6ae20 Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Tue, 27 Dec 2005 13:57:59 -0800 Subject: [NET]: Validate socket filters against BPF_MAXINSNS in one spot. Currently the checks are scattered all over and this leads to inconsistencies and even cases where the check is not made. Based upon a patch from Kris Katterjohn. Signed-off-by: David S. Miller --- drivers/net/ppp_generic.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'drivers') diff --git a/drivers/net/ppp_generic.c b/drivers/net/ppp_generic.c index 50430f7..1c6d328 100644 --- a/drivers/net/ppp_generic.c +++ b/drivers/net/ppp_generic.c @@ -524,9 +524,6 @@ static int get_filter(void __user *arg, struct sock_filter **p) if (copy_from_user(&uprog, arg, sizeof(uprog))) return -EFAULT; - if (uprog.len > BPF_MAXINSNS) - return -EINVAL; - if (!uprog.len) { *p = NULL; return 0; -- cgit v1.1 From 67dbb4ea33731415fe09c62149a34f472719ac1d Mon Sep 17 00:00:00 2001 From: Benjamin Herrenschmidt Date: Tue, 27 Dec 2005 12:49:33 +1100 Subject: [PATCH] Fix more radeon GART start calculation cases As reported by Jules Villard and some others, the recent GART aperture start reconfiguration causes problems on some setups. What I _think_ might be happening is that the X server is also trying to muck around with the card memory map and is forcing it back into a wrong setting that also happens to no longer match what the DRM wants to do and blows up. There are bugs all over the place in that code (and still some bugs in the DRM as well anyway). This patch attempts to avoid that by using the largest of the 2 values, which I think will cause it to behave as it used to for you and will still fix the problem with machines that have an aperture size smaller than the video memory. Acked-by: Jules Villard Signed-off-by: Linus Torvalds --- drivers/char/drm/radeon_cp.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/char/drm/radeon_cp.c b/drivers/char/drm/radeon_cp.c index 501e557..b517ae5 100644 --- a/drivers/char/drm/radeon_cp.c +++ b/drivers/char/drm/radeon_cp.c @@ -1312,7 +1312,7 @@ static void radeon_set_pcigart(drm_radeon_private_t * dev_priv, int on) static int radeon_do_init_cp(drm_device_t * dev, drm_radeon_init_t * init) { drm_radeon_private_t *dev_priv = dev->dev_private; - unsigned int mem_size; + unsigned int mem_size, aper_size; DRM_DEBUG("\n"); @@ -1527,7 +1527,9 @@ static int radeon_do_init_cp(drm_device_t * dev, drm_radeon_init_t * init) mem_size = RADEON_READ(RADEON_CONFIG_MEMSIZE); if (mem_size == 0) mem_size = 0x800000; - dev_priv->gart_vm_start = dev_priv->fb_location + mem_size; + aper_size = max(RADEON_READ(RADEON_CONFIG_APER_SIZE), mem_size); + + dev_priv->gart_vm_start = dev_priv->fb_location + aper_size; #if __OS_HAS_AGP if (!dev_priv->is_pci) -- cgit v1.1 From 091465d7514893a55dcf63e420698b21159c39a7 Mon Sep 17 00:00:00 2001 From: Chris Elmquist Date: Tue, 20 Dec 2005 13:25:19 -0800 Subject: [TG3]: ethtool -d hangs PCIe systems Resubmitting after recommendation to use GET_REG32_1() instead of GET_REG32_LOOP(..., 1). Retested. Problem remains fixed. Prevent tg3_get_regs() from reading reserved and undocumented registers at RX_CPU_BASE and TX_CPU_BASE offsets which caused hostile behavior on PCIe platforms. Acked-by: Michael Chan Signed-off-by: David S. Miller --- drivers/net/tg3.c | 9 +++++++-- drivers/net/tg3.h | 7 +++++++ 2 files changed, 14 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index cefb0c0..ce252c5 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c @@ -7151,8 +7151,13 @@ do { p = (u32 *)(orig_p + (reg)); \ GET_REG32_LOOP(BUFMGR_MODE, 0x58); GET_REG32_LOOP(RDMAC_MODE, 0x08); GET_REG32_LOOP(WDMAC_MODE, 0x08); - GET_REG32_LOOP(RX_CPU_BASE, 0x280); - GET_REG32_LOOP(TX_CPU_BASE, 0x280); + GET_REG32_1(RX_CPU_MODE); + GET_REG32_1(RX_CPU_STATE); + GET_REG32_1(RX_CPU_PGMCTR); + GET_REG32_1(RX_CPU_HWBKPT); + GET_REG32_1(TX_CPU_MODE); + GET_REG32_1(TX_CPU_STATE); + GET_REG32_1(TX_CPU_PGMCTR); GET_REG32_LOOP(GRCMBOX_INTERRUPT_0, 0x110); GET_REG32_LOOP(FTQ_RESET, 0x120); GET_REG32_LOOP(MSGINT_MODE, 0x0c); diff --git a/drivers/net/tg3.h b/drivers/net/tg3.h index 94dbcf3..890e163 100644 --- a/drivers/net/tg3.h +++ b/drivers/net/tg3.h @@ -1124,7 +1124,14 @@ /* 0x280 --> 0x400 unused */ #define RX_CPU_BASE 0x00005000 +#define RX_CPU_MODE 0x00005000 +#define RX_CPU_STATE 0x00005004 +#define RX_CPU_PGMCTR 0x0000501c +#define RX_CPU_HWBKPT 0x00005034 #define TX_CPU_BASE 0x00005400 +#define TX_CPU_MODE 0x00005400 +#define TX_CPU_STATE 0x00005404 +#define TX_CPU_PGMCTR 0x0000541c /* Mailboxes */ #define GRCMBOX_INTERRUPT_0 0x00005800 /* 64-bit */ -- cgit v1.1 From a8b554e75b0c14d5e12a11eaea604e536f49da29 Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Wed, 28 Dec 2005 13:05:41 -0800 Subject: [TG3]: Update driver version and reldate. Signed-off-by: David S. Miller --- drivers/net/tg3.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index ce252c5..2fc9893 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c @@ -68,8 +68,8 @@ #define DRV_MODULE_NAME "tg3" #define PFX DRV_MODULE_NAME ": " -#define DRV_MODULE_VERSION "3.46" -#define DRV_MODULE_RELDATE "Dec 19, 2005" +#define DRV_MODULE_VERSION "3.47" +#define DRV_MODULE_RELDATE "Dec 28, 2005" #define TG3_DEF_MAC_MODE 0 #define TG3_DEF_RX_MODE 0 -- cgit v1.1 From 68ca243dd1dc90bd42bae3945e804c1042584920 Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Wed, 28 Dec 2005 13:27:04 -0800 Subject: [SERMOUSE]: Sun mice speak 5-byte protocol too. Noticed by Christophe Zimmerman, this explains the slow mouse movement with 2.6.x kernels. And checking the 2.4.x drivers/sbus/char/sunmouse.c driver shows we always used a 5-byte protocol with Sun mice in the past. I have no idea how the 3-byte thing got into the 2.6.x driver, but it's surely wrong. Signed-off-by: David S. Miller --- drivers/input/mouse/sermouse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/input/mouse/sermouse.c b/drivers/input/mouse/sermouse.c index 4bf5843..2f9a04a 100644 --- a/drivers/input/mouse/sermouse.c +++ b/drivers/input/mouse/sermouse.c @@ -95,7 +95,7 @@ static void sermouse_process_msc(struct sermouse *sermouse, signed char data, st input_sync(dev); - if (++sermouse->count == (5 - ((sermouse->type == SERIO_SUN) << 1))) + if (++sermouse->count == 5) sermouse->count = 0; } -- cgit v1.1 From ee025949586f80effa634ff273c2444795472780 Mon Sep 17 00:00:00 2001 From: Dave Jones Date: Wed, 28 Dec 2005 20:01:04 -0500 Subject: [PATCH] fix ia64 compile failure with gcc4.1 __get_unaligned creates a typeof the var its passed, and writes to it, which on gcc4.1, spits out the following error: drivers/char/vc_screen.c: In function 'vcs_write': drivers/char/vc_screen.c:422: error: assignment of read-only variable 'val' Signed-off-by: Dave Jones [ The "right" fix would be to try to fix but that's hard to do with the tools gcc gives us. So this simpler patch is preferable -- Linus ] Signed-off-by: Linus Torvalds --- drivers/char/vc_screen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/char/vc_screen.c b/drivers/char/vc_screen.c index f66c7ad..3c1dafa 100644 --- a/drivers/char/vc_screen.c +++ b/drivers/char/vc_screen.c @@ -419,7 +419,7 @@ vcs_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos) while (this_round > 1) { unsigned short w; - w = get_unaligned(((const unsigned short *)con_buf0)); + w = get_unaligned(((unsigned short *)con_buf0)); vcs_scr_writew(vc, w, org++); con_buf0 += 2; this_round -= 2; -- cgit v1.1 From f873e3e88d52774633968826c5b7fa7bf9697999 Mon Sep 17 00:00:00 2001 From: Riccardo Magliocchetti Date: Wed, 28 Dec 2005 20:44:48 -0500 Subject: [PATCH] Input: aiptek - fix Y axis setup This patch fixes a typo introduced by conversion to dynamic input_dev allocation. Signed-off-by: Dmitry Torokhov Signed-off-by: Linus Torvalds --- drivers/usb/input/aiptek.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/usb/input/aiptek.c b/drivers/usb/input/aiptek.c index 1c3b472..0e2505c 100644 --- a/drivers/usb/input/aiptek.c +++ b/drivers/usb/input/aiptek.c @@ -2103,7 +2103,7 @@ aiptek_probe(struct usb_interface *intf, const struct usb_device_id *id) * values. */ input_set_abs_params(inputdev, ABS_X, 0, 2999, 0, 0); - input_set_abs_params(inputdev, ABS_X, 0, 2249, 0, 0); + input_set_abs_params(inputdev, ABS_Y, 0, 2249, 0, 0); input_set_abs_params(inputdev, ABS_PRESSURE, 0, 511, 0, 0); input_set_abs_params(inputdev, ABS_TILT_X, AIPTEK_TILT_MIN, AIPTEK_TILT_MAX, 0, 0); input_set_abs_params(inputdev, ABS_TILT_Y, AIPTEK_TILT_MIN, AIPTEK_TILT_MAX, 0, 0); -- cgit v1.1 From 80c72579f74fcfcd63e27c5e317091cb35bb1f12 Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Wed, 28 Dec 2005 21:02:57 +0100 Subject: [PATCH] Fix recursive config dependency for SAA7134 Fix the cyclic dependency issue between CONFIG_SAA7134_ALSA and CONFIG_SAA7134_OSS (credits to Mauro Carvalho Chehab.) Signed-off-by: Jean Delvare Acked-by: Mauro Carvalho Chehab Signed-off-by: Linus Torvalds --- drivers/media/video/saa7134/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/media/video/saa7134/Kconfig b/drivers/media/video/saa7134/Kconfig index c0f604a..86e1bb3 100644 --- a/drivers/media/video/saa7134/Kconfig +++ b/drivers/media/video/saa7134/Kconfig @@ -14,7 +14,7 @@ config VIDEO_SAA7134 config VIDEO_SAA7134_ALSA tristate "Philips SAA7134 DMA audio support" - depends on VIDEO_SAA7134 && SOUND && SND && (!VIDEO_SAA7134_OSS || VIDEO_SAA7134_OSS = m) + depends on VIDEO_SAA7134 && SND select SND_PCM_OSS ---help--- This is a video4linux driver for direct (DMA) audio in @@ -25,7 +25,7 @@ config VIDEO_SAA7134_ALSA config VIDEO_SAA7134_OSS tristate "Philips SAA7134 DMA audio support (OSS, DEPRECATED)" - depends on VIDEO_SAA7134 && SOUND_PRIME && (!VIDEO_SAA7134_ALSA || VIDEO_SAA7134_ALSA = m) + depends on VIDEO_SAA7134 && SOUND_PRIME && (!VIDEO_SAA7134_ALSA || (VIDEO_SAA7134_ALSA=m && m)) ---help--- This is a video4linux driver for direct (DMA) audio in Philips SAA713x based TV cards using OSS -- cgit v1.1 From 392c14beaca2ee85a98d0c6b453501be67423a20 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Thu, 29 Dec 2005 13:01:54 -0800 Subject: Revert radeon AGP aperture offset changes This reverts the series of commits 67dbb4ea33731415fe09c62149a34f472719ac1d 281ab031a8c9e5b593142eb4ec59a87faae8676a 47807ce381acc34a7ffee2b42e35e96c0f322e52 that changed the GART VM start offset. It fixed some machines, but seems to continually interact badly with some X versions. Quoth Ben Herrenschmidt: "So I think at this point, the best is that we keep the old bogus code that at least is consistent with the bug in the server. I'm working on a big patch to X that reworks the memory map stuff completely and fixes those issues on the server side, I'll do a DRM patch matching this X fix as well so that the memory map is only ever set in one place and with what I hope is a correct algorithm..." Signed-off-by: Linus Torvalds --- drivers/char/drm/radeon_cp.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'drivers') diff --git a/drivers/char/drm/radeon_cp.c b/drivers/char/drm/radeon_cp.c index b517ae5..342302d 100644 --- a/drivers/char/drm/radeon_cp.c +++ b/drivers/char/drm/radeon_cp.c @@ -1312,8 +1312,6 @@ static void radeon_set_pcigart(drm_radeon_private_t * dev_priv, int on) static int radeon_do_init_cp(drm_device_t * dev, drm_radeon_init_t * init) { drm_radeon_private_t *dev_priv = dev->dev_private; - unsigned int mem_size, aper_size; - DRM_DEBUG("\n"); dev_priv->is_pci = init->is_pci; @@ -1523,13 +1521,8 @@ static int radeon_do_init_cp(drm_device_t * dev, drm_radeon_init_t * init) + dev_priv->fb_location) >> 10)); dev_priv->gart_size = init->gart_size; - - mem_size = RADEON_READ(RADEON_CONFIG_MEMSIZE); - if (mem_size == 0) - mem_size = 0x800000; - aper_size = max(RADEON_READ(RADEON_CONFIG_APER_SIZE), mem_size); - - dev_priv->gart_vm_start = dev_priv->fb_location + aper_size; + dev_priv->gart_vm_start = dev_priv->fb_location + + RADEON_READ(RADEON_CONFIG_APER_SIZE); #if __OS_HAS_AGP if (!dev_priv->is_pci) -- cgit v1.1 From 9e625ff8a37aefcc177b19614ffcffb5bc6eeea1 Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Thu, 29 Dec 2005 22:07:30 +0100 Subject: [PATCH] Simplify the VIDEO_SAA7134_OSS Kconfig dependency line Thanks to Roman Zippel for the suggestion. Signed-off-by: Jean Delvare [ Short explanation: Kconfig uses ternary math: n/m/y, and !m is m ] Signed-off-by: Linus Torvalds --- drivers/media/video/saa7134/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/media/video/saa7134/Kconfig b/drivers/media/video/saa7134/Kconfig index 86e1bb3..8a5c3e7 100644 --- a/drivers/media/video/saa7134/Kconfig +++ b/drivers/media/video/saa7134/Kconfig @@ -25,7 +25,7 @@ config VIDEO_SAA7134_ALSA config VIDEO_SAA7134_OSS tristate "Philips SAA7134 DMA audio support (OSS, DEPRECATED)" - depends on VIDEO_SAA7134 && SOUND_PRIME && (!VIDEO_SAA7134_ALSA || (VIDEO_SAA7134_ALSA=m && m)) + depends on VIDEO_SAA7134 && SOUND_PRIME && !VIDEO_SAA7134_ALSA ---help--- This is a video4linux driver for direct (DMA) audio in Philips SAA713x based TV cards using OSS -- cgit v1.1 From f02aa3f9a3dea4375759ae1d87bebf2467719b72 Mon Sep 17 00:00:00 2001 From: Erik Hovland Date: Fri, 30 Dec 2005 15:57:35 +0000 Subject: [ARM] 3216/1: indent and typo in drivers/serial/pxa.c Patch from Erik Hovland This patch provides two changes. An indent is supplied for an if/else clause so that it is more readable. An acronym is incorrectly typed as UER when it should be IER. Signed-off-by: Erik Hovland Signed-off-by: Russell King --- drivers/serial/pxa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/serial/pxa.c b/drivers/serial/pxa.c index ff5e630..cc998b9 100644 --- a/drivers/serial/pxa.c +++ b/drivers/serial/pxa.c @@ -361,7 +361,7 @@ static int serial_pxa_startup(struct uart_port *port) if (port->line == 3) /* HWUART */ up->mcr |= UART_MCR_AFE; else - up->mcr = 0; + up->mcr = 0; /* * Allocate the IRQ @@ -641,7 +641,7 @@ serial_pxa_console_write(struct console *co, const char *s, unsigned int count) int i; /* - * First save the UER then disable the interrupts + * First save the IER then disable the interrupts */ ier = serial_in(up, UART_IER); serial_out(up, UART_IER, UART_IER_UUE); -- cgit v1.1 From 1994754412536d4ab902a81530b49bcaf496a59c Mon Sep 17 00:00:00 2001 From: Dmitry Torokhov Date: Thu, 29 Dec 2005 22:19:07 -0500 Subject: [PATCH] Input: kbtab - fix Y axis setup This patch fixes a typo introduced by conversion to dynamic input_dev allocation. Signed-off-by: Dmitry Torokhov Signed-off-by: Linus Torvalds --- drivers/usb/input/kbtab.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/usb/input/kbtab.c b/drivers/usb/input/kbtab.c index a248664..fd48e74e 100644 --- a/drivers/usb/input/kbtab.c +++ b/drivers/usb/input/kbtab.c @@ -159,7 +159,7 @@ static int kbtab_probe(struct usb_interface *intf, const struct usb_device_id *i input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_PEN) | BIT(BTN_TOUCH); input_dev->mscbit[0] |= BIT(MSC_SERIAL); input_set_abs_params(input_dev, ABS_X, 0, 0x2000, 4, 0); - input_set_abs_params(input_dev, ABS_X, 0, 0x1750, 4, 0); + input_set_abs_params(input_dev, ABS_Y, 0, 0x1750, 4, 0); input_set_abs_params(input_dev, ABS_PRESSURE, 0, 0xff, 0, 0); endpoint = &intf->cur_altsetting->endpoint[0].desc; -- cgit v1.1 From ae5536d6f7f9b51f7a0451421eade1988cfd7126 Mon Sep 17 00:00:00 2001 From: Dmitry Torokhov Date: Thu, 29 Dec 2005 22:19:08 -0500 Subject: [PATCH] Input: warrior - fix HAT0Y axis setup This patch fixes a typo introduced by conversion to dynamic input_dev allocation. Signed-off-by: Dmitry Torokhov Signed-off-by: Linus Torvalds --- drivers/input/joystick/warrior.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/input/joystick/warrior.c b/drivers/input/joystick/warrior.c index 99a642d..1849b17 100644 --- a/drivers/input/joystick/warrior.c +++ b/drivers/input/joystick/warrior.c @@ -172,7 +172,7 @@ static int warrior_connect(struct serio *serio, struct serio_driver *drv) input_set_abs_params(input_dev, ABS_Y, -64, 64, 0, 8); input_set_abs_params(input_dev, ABS_THROTTLE, -112, 112, 0, 0); input_set_abs_params(input_dev, ABS_HAT0X, -1, 1, 0, 0); - input_set_abs_params(input_dev, ABS_HAT0X, -1, 1, 0, 0); + input_set_abs_params(input_dev, ABS_HAT0Y, -1, 1, 0, 0); serio_set_drvdata(serio, warrior); -- cgit v1.1 From 40c37213a081990b1d3778f57630f97df75a7ec1 Mon Sep 17 00:00:00 2001 From: Denny Priebe Date: Thu, 29 Dec 2005 22:19:09 -0500 Subject: [PATCH] Input: wacom - fix X axis setup This patch fixes a typo introduced by conversion to dynamic input_dev allocation. Signed-off-by: Dmitry Torokhov Signed-off-by: Linus Torvalds --- drivers/usb/input/wacom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/usb/input/wacom.c b/drivers/usb/input/wacom.c index aea1cfa..dc099bb 100644 --- a/drivers/usb/input/wacom.c +++ b/drivers/usb/input/wacom.c @@ -854,7 +854,7 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i input_dev->evbit[0] |= BIT(EV_KEY) | BIT(EV_ABS); input_dev->keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_PEN) | BIT(BTN_TOUCH) | BIT(BTN_STYLUS); - input_set_abs_params(input_dev, ABS_X, 0, wacom->features->y_max, 4, 0); + input_set_abs_params(input_dev, ABS_X, 0, wacom->features->x_max, 4, 0); input_set_abs_params(input_dev, ABS_Y, 0, wacom->features->y_max, 4, 0); input_set_abs_params(input_dev, ABS_PRESSURE, 0, wacom->features->pressure_max, 0, 0); -- cgit v1.1 From f12f4d90308a22396ac87f6c3a7b2620589614c3 Mon Sep 17 00:00:00 2001 From: Benjamin Herrenschmidt Date: Mon, 2 Jan 2006 13:04:44 +1100 Subject: [PATCH] powerpc: more g5 overtemp problem fix Some G5s still occasionally experience shutdowns due to overtemp conditions despite the recent fix. After analyzing logs from such machines, it appears that the overtemp code is a bit too quick at shutting the machine down when reaching the critical temperature (tmax + 8) and doesn't leave the fan enough time to actually cool it down. This happens if the temperature of a CPU suddenly rises too high in a very short period of time, or occasionally on boot (that is the CPUs are already overtemp by the time the driver loads). This patches makes the code a bit more relaxed, leaving a few seconds to the fans to do their job before kicking the machine shutown. Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Linus Torvalds --- drivers/macintosh/therm_pm72.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers') diff --git a/drivers/macintosh/therm_pm72.c b/drivers/macintosh/therm_pm72.c index 5bb3627..190878e 100644 --- a/drivers/macintosh/therm_pm72.c +++ b/drivers/macintosh/therm_pm72.c @@ -923,7 +923,7 @@ static void do_monitor_cpu_combined(void) if (temp_combi >= ((state0->mpu.tmax + 8) << 16)) { printk(KERN_WARNING "Warning ! Temperature way above maximum (%d) !\n", temp_combi >> 16); - state0->overtemp = CPU_MAX_OVERTEMP; + state0->overtemp += CPU_MAX_OVERTEMP / 4; } else if (temp_combi > (state0->mpu.tmax << 16)) state0->overtemp++; else @@ -998,7 +998,7 @@ static void do_monitor_cpu_split(struct cpu_pid_state *state) printk(KERN_WARNING "Warning ! CPU %d temperature way above maximum" " (%d) !\n", state->index, temp >> 16); - state->overtemp = CPU_MAX_OVERTEMP; + state->overtemp += CPU_MAX_OVERTEMP / 4; } else if (temp > (state->mpu.tmax << 16)) state->overtemp++; else @@ -1060,7 +1060,7 @@ static void do_monitor_cpu_rack(struct cpu_pid_state *state) printk(KERN_WARNING "Warning ! CPU %d temperature way above maximum" " (%d) !\n", state->index, temp >> 16); - state->overtemp = CPU_MAX_OVERTEMP; + state->overtemp = CPU_MAX_OVERTEMP / 4; } else if (temp > (state->mpu.tmax << 16)) state->overtemp++; else -- cgit v1.1