GitHub/mt8127/android_kernel_alcatel_ttab.git
17 years agospidernet: Replace literal with const
Linas Vepstas [Thu, 14 Jun 2007 23:12:23 +0000 (18:12 -0500)]
spidernet: Replace literal with const

Replace literal with const; add bit definitions.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agor8169: perform RX config change after mac filtering
Francois Romieu [Mon, 4 Jun 2007 20:10:15 +0000 (22:10 +0200)]
r8169: perform RX config change after mac filtering

It does not really make sense to update the RX config register
before the mac filtering registers.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
17 years agor8169: mac address change support
Francois Romieu [Wed, 31 Jan 2007 22:47:43 +0000 (23:47 +0100)]
r8169: mac address change support

Merged from Realtek's r8169-6.001 driver.

I have added some locking to protect against the arp monitoring
timer in the bonding driver. Accessing the configuration registers
is otherwise performed under RTNL locking.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
17 years agor8169: display some extra debug information during startup
Francois Romieu [Tue, 29 May 2007 22:32:05 +0000 (00:32 +0200)]
r8169: display some extra debug information during startup

It does not cost much and it will ease the identification of (so far)
unknown devices.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
17 years agor8169: add endianess annotations to [RT]xDesc
Rolf Eike Beer [Mon, 21 May 2007 20:11:04 +0000 (22:11 +0200)]
r8169: add endianess annotations to [RT]xDesc

Signed-off-by: Rolf Eike Beer <eike-kernel@sf-tec.de>
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
17 years agor8169: align the IP header when there is no DMA constraint
Francois Romieu [Wed, 28 Feb 2007 22:16:57 +0000 (23:16 +0100)]
r8169: align the IP header when there is no DMA constraint

Align the IP header when the chipset can DMA at any location (plain 0x8169).
Otherwise (0x8136/0x8168) obey the constraint imposed by the hardware.

This patch complements the previous alignment rework done for copybreak.

Original idea from Philip Craig <philipc@snapgear.com>

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Philip Craig <philipc@snapgear.com>
Cc: Mike Isely <isely@pobox.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
17 years agor8169: add bit description for the TxPoll register
Francois Romieu [Fri, 23 Feb 2007 22:50:28 +0000 (23:50 +0100)]
r8169: add bit description for the TxPoll register

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
17 years agor8169: cleanup
Francois Romieu [Wed, 21 Feb 2007 21:40:46 +0000 (22:40 +0100)]
r8169: cleanup

No functionnal change:
- trim the old history log
- whitespace/indent/case police
- unsigned int where signedness does not matter
- removal of obsolete assert
- needless cast from void * (dev_instance)
- remove dead code once related to power management
- use netdev_alloc_skb.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Stephen Hemminger <shemminger@linux-foundation.org>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
17 years agor8169: remove the media option
Francois Romieu [Tue, 20 Feb 2007 23:10:20 +0000 (00:10 +0100)]
r8169: remove the media option

It has been documented as deprecated:
- in MODULE_PARM_DESC since may 2005 ;
- at the top of the source file and in printk since june 2004.

Good bye.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
17 years agor8169: small 8101 comment
Francois Romieu [Tue, 20 Feb 2007 21:58:51 +0000 (22:58 +0100)]
r8169: small 8101 comment

Extracted from version 1.001.00 of Realtek's r8101.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
17 years agor8169: confusion between hardware and IP header alignment
Francois Romieu [Tue, 20 Feb 2007 21:20:51 +0000 (22:20 +0100)]
r8169: confusion between hardware and IP header alignment

The rx copybreak part is straightforward.

The align field in struct rtl_cfg_info is related to the alignment
requirements of the DMA operation. Its value is set at 2 to limit the
scale of possible regression but my old v1.21 8169 datasheet claims a
8 bytes requirements (which never appeared in the driver, of course)
and the 8101/8168 go with a plain 8 bytes alignment.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
17 years agor8169: merge with version 8.001.00 of Realtek's r8168 driver
Francois Romieu [Mon, 19 Feb 2007 23:00:26 +0000 (00:00 +0100)]
r8169: merge with version 8.001.00 of Realtek's r8168 driver

This one includes:

- more tweaks to rtl_hw_start_8168

- a work around for a Rx FiFO overflow issue on the 8168Bb
  - rtl8169_{intr_mask/napi_event} are replaced with per-device fields,
    namely tp->{intr/napi}_event
  - rtl_cfg_info is converted to C99 for readability but the values are
    not changed for the 8169/8110 and the 8101

Includes ChipCmd fix from Bernhard Walle <bwalle@suse.de> (2007/02/24).

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
17 years agor8169: merge with version 6.001.00 of Realtek's r8169 driver
Francois Romieu [Tue, 13 Feb 2007 22:38:05 +0000 (23:38 +0100)]
r8169: merge with version 6.001.00 of Realtek's r8169 driver

- new identifier for the 8110SCe

- the PCI latency timer is set unconditionally. This part is identical
  in Realtek's r8168 (8.001.00) and r8101 (1.001.00)

- initialization of the cache line size register is for the 8169s only

- more magic in rtl_hw_start_8169

- it is not possible to factor out the setting of the the irq event mask
  with the 8168 and the 8101 any more. Pushed it into the hw_start handler.

- rtl_set_rx_tx_config_registers() and write to the ChipCmd register are
  issued identically for the whole 8169/8110 family: the 8110SCd/8110SCe
  are handled the same way

- work around for AMD platform.

Some registers definitions in Realtek's driver are let aside for later.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
17 years agor8169: prettify mac_version
Francois Romieu [Mon, 11 Jun 2007 21:35:18 +0000 (23:35 +0200)]
r8169: prettify mac_version

...still a bit yucky though.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
17 years agor8169: populate the hw_start handler for the 8110
Francois Romieu [Mon, 11 Jun 2007 21:29:50 +0000 (23:29 +0200)]
r8169: populate the hw_start handler for the 8110

Same thing as the previous change for rtl_hw_start_8168.

The 8101 related code in rtl_hw_start_8169 (see RTL_GIGA_MAC_VER_13)
goes away.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
17 years agor8169: populate the hw_start handler for the 8168
Francois Romieu [Mon, 11 Jun 2007 21:22:52 +0000 (23:22 +0200)]
r8169: populate the hw_start handler for the 8168

rtl_hw_start_8168 inherits the content of rtl_hw_start_8169 minus
the code which depends on RTL_GIGA_MAC_VER_XY (XY != {11/12}).

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
17 years agor8169: add helpers for per-device hw_start handler
Francois Romieu [Mon, 11 Jun 2007 21:04:41 +0000 (23:04 +0200)]
r8169: add helpers for per-device hw_start handler

They aim to limit the amount of moved code when the hw_start
handler gets more specialized.

No functional change.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
17 years agor8169: add hooks for per-device hw_start handler
Francois Romieu [Fri, 23 Feb 2007 22:36:39 +0000 (23:36 +0100)]
r8169: add hooks for per-device hw_start handler

Rationale: rtl8169_hw_start will not help maintaining an unified
driver for different chipsets but people at Realtek are probably
too polite to say it distinctly.

Let's add the hook and keep hw_start handler unchanged.

As can be seen from the content of rtl8169_pci_tbl, the RTL_CFG_1
entry in rtl_cfg_info was unused. I recycled it for the 0x8168.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
17 years agor8169: Rx path update
Stephen Hemminger [Sat, 16 Jun 2007 23:06:49 +0000 (01:06 +0200)]
r8169: Rx path update

- pci_dma_sync_single_for_cpu is not needed for a single large packet
- remove the function pointer to help gcc optimizing the inline
  pci_dma functions.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
17 years agor8169: kill eth_copy_and_sum()
David S. Miller [Mon, 11 Jun 2007 00:55:04 +0000 (17:55 -0700)]
r8169: kill eth_copy_and_sum()

It hasn't "summed" anything in over 7 years, and it's
just a straight mempcy ala skb_copy_to_linear_data()
so just get rid of it.

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
17 years agor8169: de-obfuscate modulo arithmetic
Francois Romieu [Sat, 16 Jun 2007 21:28:45 +0000 (23:28 +0200)]
r8169: de-obfuscate modulo arithmetic

The former style suggests a modulo arithmetic misuse but
the expression should never be < 0. Even if it does, the
driver will simply loop longer than expected (not that
the remaining parts of the system will necessarily
appreciate it...).

Let's warn the user when something goes wrong and try
to go over it.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
17 years agor8169: use netdev_alloc_skb
Stephen Hemminger [Sat, 16 Jun 2007 20:36:41 +0000 (22:36 +0200)]
r8169: use netdev_alloc_skb

Use netdev_alloc_skb and remove the useless sk_buff * argument of
rtl8169_alloc_rx_skb.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Edward Hsu <edward_hsu@realtek.com.tw>
17 years agosky2: version 1.15
Stephen Hemminger [Tue, 5 Jun 2007 00:23:27 +0000 (17:23 -0700)]
sky2: version 1.15

New version because of new chip support.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agosky2: Yukon Extreme (88e8071) support.
Stephen Hemminger [Tue, 5 Jun 2007 00:23:26 +0000 (17:23 -0700)]
sky2: Yukon Extreme (88e8071) support.

Enable support for Yukon EX chipset (88e8071).
Most of changes are related to new commands to chip for transmit,
and change in status and checksumming.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agosky2: GPIO register
Stephen Hemminger [Tue, 5 Jun 2007 00:23:25 +0000 (17:23 -0700)]
sky2: GPIO register

The General Purpose I/O register is yet another hardware workaround
catchall. Enable workaround that vendor driver does to stay
but for bug compatiable.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agosky2: enable clocks before probe
Stephen Hemminger [Tue, 5 Jun 2007 00:23:24 +0000 (17:23 -0700)]
sky2: enable clocks before probe

Catch-22: On Yukon EX (88E8071) need to have internal clocks enabled
before reading chip id. It is harmless on other chips.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agosky2: rename BMU register
Stephen Hemminger [Tue, 5 Jun 2007 00:23:23 +0000 (17:23 -0700)]
sky2: rename BMU register

This register is more of a test and control register on Yukon2.
So rename it to Q_TEST and give some bit definitions.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agosky2: Add PCI device specfic register 4 & 5
Stephen Hemminger [Tue, 5 Jun 2007 00:23:22 +0000 (17:23 -0700)]
sky2: Add PCI device specfic register 4 & 5

Need to setup more PCI control control registers are on Yukon EX.
Some of these also exist on Yukon EC-U as well.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agosky2: avoid reserved regions on ethtool reg dump
Stephen Hemminger [Tue, 5 Jun 2007 00:23:21 +0000 (17:23 -0700)]
sky2: avoid reserved regions on ethtool reg dump

On Yukon EX reading some of the undocumented places in the
memory space will cause a hang. Since they don't provide useful
information, just skip the reserved areas.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agospidernet: driver docmentation
Linas Vepstas [Mon, 11 Jun 2007 19:12:09 +0000 (14:12 -0500)]
spidernet: driver docmentation

Documentation for the spidernet driver.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agospidernet: fix misnamed flag
Linas Vepstas [Mon, 11 Jun 2007 19:09:16 +0000 (14:09 -0500)]
spidernet: fix misnamed flag

The transmit frame tail bit is stranglely misnamed as
"no checksum". Fix the name to what it should be:
"transmit frame tail". No functional change,
just a name change.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agospidernet: move a block of code around
Linas Vepstas [Mon, 11 Jun 2007 19:05:41 +0000 (14:05 -0500)]
spidernet: move a block of code around

Put the enable and disable routines next to one-another,
as this makes verifying thier symmetry that much easier.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agospidernet: service TX later.
Linas Vepstas [Mon, 11 Jun 2007 18:59:21 +0000 (13:59 -0500)]
spidernet: service TX later.

When entering the netdev poll routine, empty out the RX
chain first, before cleaning up the TX chain. This should
help avoid RX buffer overflows.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agospidernet: invalidate unused pointer.
Linas Vepstas [Mon, 11 Jun 2007 18:52:03 +0000 (13:52 -0500)]
spidernet: invalidate unused pointer.

Invalidate a pointer as its pci_unmap'ed; this is a bit of
paranoia to make sure hardware doesn't continue trying to
DMA to it.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agospidernet: enhance the dump routine
Linas Vepstas [Mon, 11 Jun 2007 18:48:55 +0000 (13:48 -0500)]
spidernet: enhance the dump routine

Crazy device problems are hard to debug, when one does not have
good trace info. This patch makes a major enhancement to the
device dump routine.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agospidernet: beautify error messages
Linas Vepstas [Mon, 11 Jun 2007 18:41:38 +0000 (13:41 -0500)]
spidernet: beautify error messages

Use dev_err() to print device error messages.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoqla3xxx: cleanup checksum offload code
Stephen Hemminger [Wed, 30 May 2007 21:23:18 +0000 (14:23 -0700)]
qla3xxx: cleanup checksum offload code

The code for checksum is more complex than needed when dealing with VLAN's;
the higher layers already pass down the location of the IP header.

Compile tested only, no hardware available.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoadd return value check of request_irq()
Yoichi Yuasa [Tue, 5 Jun 2007 13:55:06 +0000 (22:55 +0900)]
add return value check of request_irq()

This patch has added return value check of request_irq() to pcmcia net drivers.

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoUse menuconfig objects II - netdev (general+100mbit)
Jan Engelhardt [Wed, 13 Jun 2007 19:48:53 +0000 (12:48 -0700)]
Use menuconfig objects II - netdev (general+100mbit)

CONFIG_NETDEVICES, CONFIG_NET_ETHERNET:
Change Kconfig objects from "menu, config" into "menuconfig" so
that the user can disable the whole feature without having to
enter the menu first.

CONFIG_SMC9194:
Move it so that it appears correctly in menuconfig.

Signed-off-by: Jan Engelhardt <jengelh@gmx.de>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoacenic: SET_NETDEV_DEV is always there these days
Geert Uytterhoeven [Wed, 6 Jun 2007 14:04:39 +0000 (16:04 +0200)]
acenic: SET_NETDEV_DEV is always there these days

acenic: SET_NETDEV_DEV is always there these days

Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agob44: use netdev_alloc_skb
Stephen Hemminger [Mon, 4 Jun 2007 20:25:40 +0000 (13:25 -0700)]
b44: use netdev_alloc_skb

Use netdev_alloc_skb rather than dev_alloc_skb when allocating
receive buffers.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agob44: packet offset is constant
Stephen Hemminger [Mon, 4 Jun 2007 20:25:39 +0000 (13:25 -0700)]
b44: packet offset is constant

The receive buffer offset is constant in this driver.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agob44: tx bounce sizing.
Stephen Hemminger [Mon, 4 Jun 2007 20:25:38 +0000 (13:25 -0700)]
b44: tx bounce sizing.

No need to grap full size MTU buffer for possibly small transmit
bounce buffers.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agob44: timer power saving
Stephen Hemminger [Mon, 4 Jun 2007 20:25:37 +0000 (13:25 -0700)]
b44: timer power saving

Make the PHY and statistic timer run on one second boundary
for powersaving.

On resume, the driver should check for link up immediately, to
get online faster (rather than waiting for the next second).

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agotulip: Convert to generic boolean
Richard Knutsson [Sat, 19 May 2007 20:18:10 +0000 (22:18 +0200)]
tulip: Convert to generic boolean

Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agocxgb3 - TP SRAM update
Divy Le Ray [Thu, 31 May 2007 04:10:58 +0000 (21:10 -0700)]
cxgb3 - TP SRAM update

The chip executes microcode present in internal RAM,
whose content is loaded from EEPROM on power cycle.
This patch allows an update of the microcode through PIO
without forcing a power cycle.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agocxgb3 - Firmware update
Divy Le Ray [Thu, 31 May 2007 04:10:52 +0000 (21:10 -0700)]
cxgb3 - Firmware update

Update FW to 4.1.
Proceed to subsequent HW tuning to improve RDMA perfs..

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agocxgb3 - sge page management
Divy Le Ray [Thu, 31 May 2007 04:10:47 +0000 (21:10 -0700)]
cxgb3 - sge page management

Streamline sge page management.
Fix dma mappings when buffers are recycled.

Signed-off-by: Divy Le Ray <divy@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agodrivers/net: fix comparisons of unsigned < 0
Bill Nottingham [Wed, 30 May 2007 07:59:02 +0000 (03:59 -0400)]
drivers/net: fix comparisons of unsigned < 0

Recent gcc versions emit warnings when unsigned variables are compared < 0 or >= 0.

Signed-off-by: Bill Nottingham <notting@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agoPCMCIA-NETDEV : add new ID of lan&modem multifunction card
Komuro [Sat, 26 May 2007 23:57:58 +0000 (08:57 +0900)]
PCMCIA-NETDEV : add new ID of lan&modem multifunction card

fmvj18x_cs:
      NEC PK-UG-J001
      Panasonic CF-VML201
      Panasonic TO-PDL9610

pcnet_cs:
       MICRO-RESEARCH  MC336LAN

Signed-off-by: Komuro <komurojun-mbn@nifty.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agousbnet whitespace fixes
David Brownell [Fri, 25 May 2007 19:31:32 +0000 (12:31 -0700)]
usbnet whitespace fixes

Whitespace updates for usbnet core, mostly switching to tab-only indents.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years ago8139cp: Convert to generic boolean
Richard Knutsson [Sat, 19 May 2007 20:26:40 +0000 (22:26 +0200)]
8139cp: Convert to generic boolean

Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agophylib: m88e1111: enable SGMII mode
Kapil Juneja [Fri, 11 May 2007 23:25:18 +0000 (18:25 -0500)]
phylib: m88e1111: enable SGMII mode

If connected via SGMII, initialize with SGMII mode configured.

Signed-off-by: Kapil Juneja <Kapil.Juneja@freescale.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agogianfar: add support for SGMII
Kapil Juneja [Fri, 11 May 2007 23:25:11 +0000 (18:25 -0500)]
gianfar: add support for SGMII

Add code for initialising and configuring TBI interface and
programming it for connecting to on-chip SERDES (Lynx PHY)
in case of SGMII mode selected through HRCW at reset.

also add defines for TBI register configuration. TBI
interface is programmed towards the SERDES.

refactored mdio read/write functions to differentiate
programming local interface MII regs (e.g., for TBI) from
always programming the mdio master (TSEC1, for programming
the PHYs).

Signed-off-by: Kapil Juneja <Kapil.Juneja@freescale.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agophylib: add the ICPlus IP175C PHY driver
Michael Barkowski [Fri, 11 May 2007 23:24:51 +0000 (18:24 -0500)]
phylib: add the ICPlus IP175C PHY driver

The ICPlus IP175C sports a 100Mbit/s 4-port switch in addition
to a dedicated 100Mbit/s WAN port.

Signed-off-by: Michael Barkowski <michael.barkowski@freescale.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agos2io: add PCI error recovery support
Linas Vepstas [Mon, 14 May 2007 23:41:41 +0000 (18:41 -0500)]
s2io: add PCI error recovery support

s2io cleanup suggestions, per discussion on mailing lists.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years agos2io: add PCI error recovery support
Linas Vepstas [Mon, 14 May 2007 23:37:30 +0000 (18:37 -0500)]
s2io: add PCI error recovery support

This patch adds PCI error recovery support to the
s2io 10-Gigabit ethernet device driver. Third revision,
blocks interrupts and the watchdog.

Tested, seems to work well.

Signed-off-by: Linas Vepstas <linas@austin.ibm.com>
Acked-by: Ramkrishna Vepa <Ramkrishna.Vepa@neterion.com>
Cc: Raghavendra Koushik <raghavendra.koushik@neterion.com>
Cc: Wen Xiong <wenxiong@us.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
17 years ago[PATCH] hostap: Remove driver version number
Jouni Malinen [Mon, 28 May 2007 16:38:49 +0000 (09:38 -0700)]
[PATCH] hostap: Remove driver version number

The driver version number has not been updated since the driver was
included in the main kernel tree and there is no plan on updating this
in the future either. At this point, the only correct way to refer to
the version is to use the kernel version. The 0.4.4 version is
confusing since there are external version with higher version number
even though they are not actually any newer than the in-tree version.

Let's get rid of the version number in the kernel tree in order to
avoid this kind of confusion.

Signed-off-by: Jouni Malinen <j@w1.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years ago[PATCH] hostap: Use list_for_each_entry
Matthias Kaehlcke [Mon, 28 May 2007 16:38:48 +0000 (09:38 -0700)]
[PATCH] hostap: Use list_for_each_entry

Use list_for_each_entry() instead of manual iteration and
substitute some list_for_each() loops with list_for_each_entry().

Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com>
Signed-off-by: Jouni Malinen <j@w1.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years ago[PATCH] hostap: Suppress broadcast if no stations are associated
Pavel Roskin [Mon, 28 May 2007 16:38:47 +0000 (09:38 -0700)]
[PATCH] hostap: Suppress broadcast if no stations are associated

This may be useful in mesh setups when most stations act as repeaters only.

Signed-off-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Jouni Malinen <j@w1.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years ago[PATCH] softmac: use list_for_each_entry
Akinobu Mita [Sun, 27 May 2007 14:27:40 +0000 (23:27 +0900)]
[PATCH] softmac: use list_for_each_entry

Cleanup using list_for_each_entry.

Cc: Johannes Berg <johannes@sipsolutions.net>
Cc: Joe Jezak <josejx@gentoo.org>
Cc: Daniel Drake <dsd@gentoo.org>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years ago[PATCH] bcm43xx: Fix deviation from specifications in set_baseband_attenuation
Larry Finger [Sun, 27 May 2007 03:21:29 +0000 (22:21 -0500)]
[PATCH] bcm43xx: Fix deviation from specifications in set_baseband_attenuation

A disagreement between the specifications and the bcm43xx code has just
been discovered and is hereby fixed.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years ago[PATCH] zd1211rw: Make CCK gain patching conditional on RF type
Daniel Drake [Thu, 24 May 2007 00:07:15 +0000 (01:07 +0100)]
[PATCH] zd1211rw: Make CCK gain patching conditional on RF type

The vendor driver code suggests that CR47 patching happens on every channel
change for every RF (depending on bit 8 in POD).

Due to a bug in their driver (upper bits of RF_Mode get zeroed out, then
are examined for 1s when setting some other flags), this isn't actually
what happens, and their generic CCK patching routine never takes effect.

Some of their RF configurations do include explicit (duplicated) code
for CR47 patching though. This patch makes zd1211rw match that
behaviour.

Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years ago[PATCH] zd1211rw: Add UW2453 RF support
Daniel Drake [Thu, 24 May 2007 00:06:53 +0000 (01:06 +0100)]
[PATCH] zd1211rw: Add UW2453 RF support

This patch adds support for another radio appearing in new devices: the
Ubec UW2453. It's more complicated than the other RF's we support, but
Ubec publish full tech specs so we're able to understand the vendor code
relatively well.

Now that we support UW2453, we also support Atheros' new USB chip: the
AR5007UG. From the little info we have, this appears to be just a
rebranded ZD1211B.

This RF code doesn't work very well -- lots more TX/RX errors than the
other RFs. However, the vendor driver doesn't do any better, so this is
all we can do for now.

[kune@deine-taler.de: bug fixes]
Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years ago[PATCH] zd1211rw: Extend RF layer
Daniel Drake [Thu, 24 May 2007 00:06:41 +0000 (01:06 +0100)]
[PATCH] zd1211rw: Extend RF layer

These changes are needed for UW2453 RF support:

Add pointer which RF drivers can use to store private RF data
Add exit hook so that RF drivers can free private data
Allow RF's to disable the generic TX power integration handling code

Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years ago[PATCH] zd1211rw: Add ID for ZyXEL G-200v2
Daniel Drake [Thu, 24 May 2007 00:06:29 +0000 (01:06 +0100)]
[PATCH] zd1211rw: Add ID for ZyXEL G-200v2

Tested by Guy Gallagher
zd1211 chip 0586:3407 v4721 high 00-13-49 AL2230_RF pa0 g---
FCC ID SI5WUB200Z

Signed-off-by: Daniel Drake <dsd@gentoo.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years ago[PATCH] rtl8187: add header blocks and indicate origin of magic values
John W. Linville [Wed, 13 Jun 2007 02:11:42 +0000 (22:11 -0400)]
[PATCH] rtl8187: add header blocks and indicate origin of magic values

Add top-of-file comment blocks to rtl818x headers and attribute origin
of magic values to original r8187 driver.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years ago[PATCH] eeprom_93cx6: shorten pulse timing to match spec
John W. Linville [Tue, 12 Jun 2007 01:37:46 +0000 (21:37 -0400)]
[PATCH] eeprom_93cx6: shorten pulse timing to match spec

93cx6 datasheet available here:

        http://ww1.microchip.com/downloads/en/DeviceDoc/21749F.pdf

Figure 1-1 and Table 1-2 on pages 4-5 indicate that both Clock High
Time and Clock Low Time have largest minimum times of 450ns.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years ago[PATCH] Add rtl8187 wireless driver
Michael Wu [Mon, 14 May 2007 05:41:02 +0000 (01:41 -0400)]
[PATCH] Add rtl8187 wireless driver

This patch adds a mac80211 based wireless driver for the rtl8187 USB
wireless card.

Signed-off-by: Michael Wu <flamingice@sourmilk.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years ago[PATCH] eeprom_93cx6: Add comment for 1us delay after pulse
Ivo van Doorn [Mon, 14 May 2007 21:06:01 +0000 (23:06 +0200)]
[PATCH] eeprom_93cx6: Add comment for 1us delay after pulse

This will add a comment for the 1us delay which is taken
after the pulse has been switched. The 1us delay is based
on the specifications so that should be made clear.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years ago[PATCH] Add 93cx6 eeprom library
Ivo van Doorn [Fri, 11 May 2007 19:59:40 +0000 (15:59 -0400)]
[PATCH] Add 93cx6 eeprom library

This patch adds a library for reading from 93cx6 eeproms.

Signed-off-by: Michael Wu <flamingice@sourmilk.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agoLinux 2.6.22
Linus Torvalds [Sun, 8 Jul 2007 23:32:17 +0000 (16:32 -0700)]
Linux 2.6.22

Woo-hoo. I'm sure somebody will report a "this doesn't compile, and
I have a new root exploit" five minutes after release, but it still
feels good ;)

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6
Linus Torvalds [Sun, 8 Jul 2007 19:14:27 +0000 (12:14 -0700)]
Merge /pub/scm/linux/kernel/git/bart/ide-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6:
  qd65xx: fix PIO mode selection
  sis5513: adding PCI-ID

17 years agoFix permission checking for the new utimensat() system call
Linus Torvalds [Sun, 8 Jul 2007 19:02:55 +0000 (12:02 -0700)]
Fix permission checking for the new utimensat() system call

Commit 1c710c896eb461895d3c399e15bb5f20b39c9073 added the utimensat()
system call, but didn't handle the case of checking for the writability
of the target right, when the target was a file descriptor, not a
filename.

We cannot use vfs_permission(MAY_WRITE) for that case, and need to
simply check whether the file descriptor is writable.  The oops from
using the wrong function was noticed and narrowed down by Markus
Trippelsdorf.

Cc: Ulrich Drepper <drepper@redhat.com>
Cc: Markus Trippelsdorf <markus@trippelsdorf.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Al Viro <viro@ftp.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agomm: double mark_page_accessed() in read_cache_page_async()
Peter Zijlstra [Sun, 8 Jul 2007 08:13:06 +0000 (01:13 -0700)]
mm: double mark_page_accessed() in read_cache_page_async()

Fix a post-2.6.21 regression.

read_cache_page_async() has two invocations of mark_page_accessed() which will
launch pages right onto the active list.

Remove the first one, keeping the latter one.  This avoids marking unwanted
pages active (in the retry loop).

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Nick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoqd65xx: fix PIO mode selection
Bartlomiej Zolnierkiewicz [Sun, 8 Jul 2007 13:21:58 +0000 (15:21 +0200)]
qd65xx: fix PIO mode selection

PIO4 is a maximum PIO mode supported by a driver.  Using "255" as a max_mode
argument to ide_get_best_pio_mode() could result in wrong timings being used
by a driver (for "pio" equal to 5) or OOPS (for "pio" values > 5 && < 255).

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Reviewed-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
17 years agosis5513: adding PCI-ID
Uwe Koziolek [Sun, 8 Jul 2007 13:21:58 +0000 (15:21 +0200)]
sis5513: adding PCI-ID

The SiS966 has one additional PCI-ID 1180.

If the chipset is using this PCI-ID, the primary channel is connected to the
first PATA-port. The secondary channel is connected to SATA-ports in IDE
emulation mode.  The legacy IO-ports are used.

The including of the PCI-ID into pata_sis is not sufficient, because the legacy
driver in drivers/ide is initialized before pata_sis.

Signed-off-by: Uwe Koziolek <uwe.koziolek@gmx.net>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoDLM must depend on SYSFS
Adrian Bunk [Sat, 7 Jul 2007 04:14:02 +0000 (06:14 +0200)]
DLM must depend on SYSFS

The dependency of DLM on SYSFS got lost in
commit 6ed7257b46709e87d79ac2b6b819b7e0c9184998 resulting in the
following compile error with CONFIG_DLM=y, CONFIG_SYSFS=n:

<--  snip  -->

...
  LD      .tmp_vmlinux1
fs/built-in.o: In function `dlm_lockspace_init':
/home/bunk/linux/kernel-2.6/linux-2.6.22-rc6-mm1/fs/dlm/lockspace.c:231: undefined reference to `kernel_subsys'
fs/built-in.o: In function `configfs_init':
/home/bunk/linux/kernel-2.6/linux-2.6.22-rc6-mm1/fs/configfs/mount.c:143: undefined reference to `kernel_subsys'
make[1]: *** [.tmp_vmlinux1] Error 1

<--  snip  -->

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoClean up E7520/7320/7525 quirk printk.
Dave Jones [Fri, 6 Jul 2007 18:59:43 +0000 (14:59 -0400)]
Clean up E7520/7320/7525 quirk printk.

The printk level in this printk is bogus, as the previous printk
didn't have a terminating \n resulting in ..

Intel E7520/7320/7525 detected.<6>Disabling irq balancing and affinity

It also never printed a \n at all in the case where we didn't do
the quirk.

Change it to only make noise if it actually does something useful.

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoinclude/linux/kallsyms.h must #include <linux/errno.h>
Adrian Bunk [Fri, 6 Jul 2007 22:54:09 +0000 (00:54 +0200)]
include/linux/kallsyms.h must #include <linux/errno.h>

This patch fixes the following 2.6.22 regression with CONFIG_KALLSYMS=n:

<--  snip  -->

...
  CC      arch/m32r/kernel/traps.o
In file included from /home/bunk/linux/kernel-2.6/linux-2.6.22-rc6-mm1/arch/m32r/kernel/traps.c:14:
/home/bunk/linux/kernel-2.6/linux-2.6.22-rc6-mm1/include/linux/kallsyms.h: In function 'lookup_symbol_name':
/home/bunk/linux/kernel-2.6/linux-2.6.22-rc6-mm1/include/linux/kallsyms.h:66: error: 'ERANGE' undeclared (first use in this function)
/home/bunk/linux/kernel-2.6/linux-2.6.22-rc6-mm1/include/linux/kallsyms.h:66: error: (Each undeclared identifier is reported only once
/home/bunk/linux/kernel-2.6/linux-2.6.22-rc6-mm1/include/linux/kallsyms.h:66: error: for each function it appears in.)
/home/bunk/linux/kernel-2.6/linux-2.6.22-rc6-mm1/include/linux/kallsyms.h: In function 'lookup_symbol_attrs':
/home/bunk/linux/kernel-2.6/linux-2.6.22-rc6-mm1/include/linux/kallsyms.h:71: error: 'ERANGE' undeclared (first use in this function)
make[2]: *** [arch/m32r/kernel/traps.o] Error 1

<--  snip  -->

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoFix use-after-free oops in Bluetooth HID.
David Woodhouse [Sat, 7 Jul 2007 18:58:39 +0000 (14:58 -0400)]
Fix use-after-free oops in Bluetooth HID.

When cleaning up HIDP sessions, we currently close the ACL connection
before deregistering the input device. Closing the ACL connection
schedules a workqueue to remove the associated objects from sysfs, but
the input device still refers to them -- and if the workqueue happens to
run before the input device removal, the kernel will oops when trying to
look up PHYSDEVPATH for the removed input device.

Fix this by deregistering the input device before closing the
connections.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoslub: remove useless EXPORT_SYMBOL
Christoph Lameter [Fri, 6 Jul 2007 18:17:32 +0000 (11:17 -0700)]
slub: remove useless EXPORT_SYMBOL

kmem_cache_open is static. EXPORT_SYMBOL was leftover from some earlier
time period where kmem_cache_open was usable outside of slub.

(Fixes powerpc build error)

Signed-off-by: Chrsitoph Lameter <clameter@sgi.com>
Cc: Johannes Berg <johannes@sipsolutions.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoMAINTAINERS new kernel janitors ml
maximilian attems [Fri, 6 Jul 2007 18:17:32 +0000 (11:17 -0700)]
MAINTAINERS new kernel janitors ml

davem kindly moved the list from osdl to vger.

Signed-of-by: maximilian attems <max@stro.at>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoGEODE: reboot fixup for geode machines with CS5536 boards
Andres Salomon [Fri, 6 Jul 2007 18:17:30 +0000 (11:17 -0700)]
GEODE: reboot fixup for geode machines with CS5536 boards

Writing to MSR 0x51400017 forces a hard reset on CS5536-based machines,
this has the reboot fixup do just that if such a board is detected.

Acked-by: Jordan Crouse <jordan.crouse@amd.com>
Signed-off-by: Andres Salomon <dilinger@debian.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Fri, 6 Jul 2007 17:30:12 +0000 (10:30 -0700)]
Merge branch 'master' of /linux/kernel/git/davem/net-2.6

* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
  [NETPOLL]: Fixups for 'fix soft lockup when removing module'
  [NET]: net/core/netevent.c should #include <net/netevent.h>
  [NETFILTER]: nf_conntrack_h323: add checking of out-of-range on choices' index values
  [NET] skbuff: remove export of static symbol
  SCTP: Add scope_id validation for link-local binds
  SCTP: Check to make sure file is valid before setting timeout
  SCTP: Fix thinko in sctp_copy_laddrs()

17 years agoMerge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
Linus Torvalds [Fri, 6 Jul 2007 17:29:33 +0000 (10:29 -0700)]
Merge branch 'upstream' of git://ftp.linux-mips.org/upstream-linus

* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
  [MIPS] Fix scheduling latency issue on 24K, 34K and 74K cores
  [MIPS] Add macros to encode processor revisions.
  [MIPS] RM7000: Enable ICACHE_REFILLS_WORKAROUND_WAR.
  [MIPS] SMTC: Fix cut'n'paste bug in Kconfig.debug
  [MIPS] Change libgcc-style functions from lib-y to obj-y
  [MIPS] Fix timer/performance interrupt detection
  [MIPS] AP/SP: Avoid triggering the 34K E125 performance issue
  [MIPS] 64-bit TO_PHYS_MASK macro for RM9000 processors

17 years agomm: fixup /proc/vmstat output
Peter Zijlstra [Fri, 6 Jul 2007 11:35:34 +0000 (13:35 +0200)]
mm: fixup /proc/vmstat output

Line up the vmstat_text with zone_stat_item

enum zone_stat_item {
/* First 128 byte cacheline (assuming 64 bit words) */
NR_FREE_PAGES,
NR_INACTIVE,
NR_ACTIVE,

We current have nr_active and nr_inactive reversed.

[ "OK with patch, though using initializers canbe handy to prevent such
   things in future:

static const char * const vmstat_text[] = {
[NR_FREE_PAGES] = "nr_free_pages",
..."
 - Alexey ]

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agopotential compiler error, irqfunc caller sites update
Yoann Padioleau [Fri, 6 Jul 2007 09:39:56 +0000 (02:39 -0700)]
potential compiler error, irqfunc caller sites update

In 7d12e780e003f93433d49ce78cfedf4b4c52adc5 David Howells performed
this evolution:
 "IRQ: Maintain regs pointer globally rather than passing to IRQ handlers"

He correctly updated many of the function definitions that were using this
extra regs pointer parameter but forgot to update some caller sites of
those functions.  The reason the modifications was not properly done on all
drivers is that some drivers were rarely compiled because they are for
AMIGA, or that some code sites were inside #ifdefs where the option is not
set or inside #if 0.

Here is the semantic patch that found the occurences
and fixed the problem.

@ rule1 @
identifier fn;
identifier irq, dev_id;
typedef irqreturn_t;
@@

static irqreturn_t fn(int irq, void *dev_id)
{
   ...
}

@@
identifier rule1.fn;
expression E1, E2, E3;
@@

 fn(E1, E2
-   ,E3
   )

Signed-off-by: Yoann Padioleau <padator@wanadoo.fr>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoi386: es7000 build breakage fix
Vivek Goyal [Fri, 6 Jul 2007 09:39:55 +0000 (02:39 -0700)]
i386: es7000 build breakage fix

o Commit 1833d6bc72893265f22addd79cf52e6987496e0f broke the build if
  compiled with CONFIG_ES7000=y and CONFIG_X86_GENERICARCH=n

arch/i386/kernel/built-in.o(.init.text+0x4fa9): In function `acpi_parse_madt':
: undefined reference to `acpi_madt_oem_check'
arch/i386/kernel/built-in.o(.init.text+0x7406): In function `smp_read_mpc':
: undefined reference to `mps_oem_check'
arch/i386/kernel/built-in.o(.init.text+0x8990): In function
`connect_bsp_APIC':
: undefined reference to `enable_apic_mode'
make: *** [.tmp_vmlinux1] Error 1

o Fix the build issue. Provided the definitions of missing functions.

o Don't have ES7000 machine. Only compile tested.

Cc: Len Brown <lenb@kernel.org>
Cc: Natalie Protasevich <protasnb@gmail.com>
Cc: Roland Dreier <rolandd@cisco.com>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoPNP SMCf010 quirk: work around Toshiba Portege 4000 ACPI issues
Bjorn Helgaas [Fri, 6 Jul 2007 09:39:54 +0000 (02:39 -0700)]
PNP SMCf010 quirk: work around Toshiba Portege 4000 ACPI issues

When we enable the SMCf010 IR device, the Toshiba Portege 4000 BIOS claims
the device is working, but it really isn't configured correctly.  The BIOS
*will* configure it, but only if we call _SRS after (1) reversing the order
of the SIR and FIR I/O port regions and (2) changing the IRQ from
active-high to active-low.

This patch addresses the 2.6.22 regression:
    "no irda0 interface (2.6.21 was OK), smsc does not find chip"

I tested this on a Portege 4000.  The smsc-ircc2 driver correctly detects
the device, and "irattach irda0 -s && irdadump" shows transmitted and
received packets.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Andrey Borzenkov <arvidjaar@mail.ru>
Cc: Samuel Ortiz <samuel@sortiz.org>
Cc: "Linus Walleij (LD/EAB)" <linus.walleij@ericsson.com>
Cc: Michal Piotrowski <michal.k.k.piotrowski@gmail.com>
Cc: Adam Belay <ambx1@neo.rr.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agofix logic error in ipc compat semctl()
Alexander Graf [Fri, 6 Jul 2007 09:39:53 +0000 (02:39 -0700)]
fix logic error in ipc compat semctl()

When calling a semctl(IPC_STAT) without IPC_64 the check if the memory is
unevaluated.  This patch fixes this.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agox86_64: fix headers_install
David Woodhouse [Fri, 6 Jul 2007 09:39:52 +0000 (02:39 -0700)]
x86_64: fix headers_install

A bug in headers_install for ARCH=x86_64 yields an asm/ directory full of
files all of which are using the same #ifdef guard, "__ASM_STUB_" with no
postfix.  So the second and later asm files #included in the same C file
(often through standard headers like ioctl.h) yields no symbols.

Strangeness with the Ubuntu 'tell me if I support something that's not
explcitly mentioned in POSIX, and I'll strip it out' shell, I believe.

We don't need the 'export' but we do need a semicolon at the end of the
FNAME line:

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Rob Landley <rob@landley.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoMTRR: Fix race causing set_mtrr to go into infinite loop
Loic Prylli [Fri, 6 Jul 2007 09:39:52 +0000 (02:39 -0700)]
MTRR: Fix race causing set_mtrr to go into infinite loop

Processors synchronization in set_mtrr requires the .gate field to be set
after .count field is properly initialized.  Without an explicit barrier,
the compiler was reordering those memory stores.  That was sometimes
causing a processor (in ipi_handler) to see the .gate change and decrement
.count before the latter is set by set_mtrr() (which then hangs in a
infinite loop with irqs disabled).

Signed-off-by: Loic Prylli <loic@myri.com>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoi386: fix regression, endless loop in ptrace singlestep over an int80
Jason Wessel [Fri, 6 Jul 2007 09:39:50 +0000 (02:39 -0700)]
i386: fix regression, endless loop in ptrace singlestep over an int80

The commit 635cf99a80f4ebee59d70eb64bb85ce829e4591f introduced a
regression.  Executing a ptrace single step after certain int80
accesses will infinitely loop and never advance the PC.

The TIF_SINGLESTEP check should be done on the return from the syscall
and not before it.

I loops on each single step on the pop right after the int80 which writes out
to the console.  At that point you can issue as many single steps as you want
and it will not advance any further.

The test case is below:

/* Test whether singlestep through an int80 syscall works.
 */
#define _GNU_SOURCE
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/ptrace.h>
#include <sys/wait.h>
#include <sys/mman.h>
#include <asm/user.h>
#include <string.h>

static int child, status;
static struct user_regs_struct regs;

static void do_child()
{
char str[80] = "child: int80 test\n";

ptrace(PTRACE_TRACEME, 0, 0, 0);
kill(getpid(), SIGUSR1);
write(fileno(stdout),str,strlen(str));
asm ("int $0x80" : : "a" (20)); /* getpid */
}

static void do_parent()
{
unsigned long eip, expected = 0;
again:
waitpid(child, &status, 0);
if (WIFEXITED(status) || WIFSIGNALED(status))
return;

if (WIFSTOPPED(status)) {
ptrace(PTRACE_GETREGS, child, 0, &regs);
eip = regs.eip;
if (expected)
fprintf(stderr, "child stop @ %08lx, expected %08lx %s\n",
eip, expected,
eip == expected ? "" : " <== ERROR");

if (*(unsigned short *)eip == 0x80cd) {
fprintf(stderr, "int 0x80 at %08x\n", (unsigned int)eip);
expected = eip + 2;
} else
expected = 0;

ptrace(PTRACE_SINGLESTEP, child, NULL, NULL);
}
goto again;
}

int main(int argc, char * const argv[])
{
child = fork();
if (child)
do_parent();
else
do_child();
return 0;
}

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: <stable@kernel.org>
Cc: Chuck Ebbert <76306.1226@compuserve.com>
Acked-by: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoFix elf_core_dump() when writing arch specific notes (spu coredumps)
Michael Ellerman [Fri, 6 Jul 2007 09:39:49 +0000 (02:39 -0700)]
Fix elf_core_dump() when writing arch specific notes (spu coredumps)

elf_core_dump() supports dumping arch specific ELF notes, via the #define
ELF_CORE_WRITE_EXTRA_NOTES.  Currently the only user of this is the powerpc
spu coredump code.

There is a bug in the handling of foffset WRT the arch notes, which causes
us to erroneously increment foffset by the size of the arch notes, leaving
a block of zeroes in the file, and causing all subsequent data in the file
to be at <supposed position> + <arch note size>.  eg:

  LOAD  0x050000 0x00100000 0x00000000 0x20000 0x20000 R E 0x10000

Tells us we should have a chunk of data at 0x50000.  The truth is the data
is at 0x90dbc = 0x50000 + 0x40dbc (the size of the arch notes).

This bug prevents gdb from reading the core file correctly.

The simplest fix is to simply remember the size of the arch notes, and add
it to foffset after we've written the arch notes.  The only drawback is
that if the arch code doesn't write as many bytes as it said it would, we
end up with a broken core dump again.  For now I think that's a reasonable
requirement.

Tested on a Cell blade, gdb no longer complains about the core file being
bogus.

While I'm here I should point out that the spu coredump code does not work
if we're dumping to a pipe - we'll have to wait for 23 to fix that.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[MIPS] Fix scheduling latency issue on 24K, 34K and 74K cores
Ralf Baechle [Wed, 20 Jun 2007 23:22:34 +0000 (00:22 +0100)]
[MIPS] Fix scheduling latency issue on 24K, 34K and 74K cores

The idle loop goes to sleep using the WAIT instruction if !need_resched().
This has is suffering from from a race condition that if if just after
need_resched has returned 0 an interrupt might set TIF_NEED_RESCHED but
we've just completed the test so go to sleep anyway.  This would be
trivial to fix by just disabling interrupts during that sequence as in:

        local_irq_disable();
        if (!need_resched())
                __asm__("wait");
        local_irq_enable();

but the processor architecture leaves it undefined if a processor calling
WAIT with interrupts disabled will ever restart its pipeline and indeed
some processors have made use of the freedom provided by the architecture
definition.  This has been resolved and the Config7.WII bit indicates that
the use of WAIT is safe on 24K, 24KE and 34K cores.  It also is safe on
74K starting revision 2.1.0 so enable the use of WAIT with interrupts
disabled for 74K based on a c0_prid of at least that.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Add macros to encode processor revisions.
Ralf Baechle [Fri, 6 Jul 2007 13:40:05 +0000 (14:40 +0100)]
[MIPS] Add macros to encode processor revisions.

Older processors used to encode processor version and revision in two
4-bit bitfields, the 4K seems to simply count up and even newer MTI cores
have switched to use the 8-bits as 3:3:2 bitfield with the last field as
the patch number.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] RM7000: Enable ICACHE_REFILLS_WORKAROUND_WAR.
Ralf Baechle [Thu, 5 Jul 2007 07:14:21 +0000 (08:14 +0100)]
[MIPS] RM7000: Enable ICACHE_REFILLS_WORKAROUND_WAR.

The RM7000 processors and the E9000 cores have a bug (though PMC-Sierra
opposes it being called that) where invalid instructions in the same
I-cache line worth of instructions being fetched may case spurious
exceptions.

The workaround for this was only enabled for E9000 cores; enable it also
for all RM7000-based platforms.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] SMTC: Fix cut'n'paste bug in Kconfig.debug
Ralf Baechle [Thu, 5 Jul 2007 16:39:48 +0000 (17:39 +0100)]
[MIPS] SMTC: Fix cut'n'paste bug in Kconfig.debug

This effectivly turned the SMTC_IDLE_HOOK_DEBUG debug option into a no-op.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
17 years ago[MIPS] Change libgcc-style functions from lib-y to obj-y
Ralf Baechle [Tue, 26 Jun 2007 18:19:00 +0000 (20:19 +0200)]
[MIPS] Change libgcc-style functions from lib-y to obj-y

Reported by Eugene Surovegin <ebs@ebshome.net>.

If only modules were users of these functions they did not get linked into
the kernel proper, so later module loads would fail as well.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>