summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [AX25] ax25_timer: use mod_timer instead of add_timerJarek Poplawski2008-02-133-44/+23Star
| | | | | | | | | | | | | According to one of Jann's OOPS reports it looks like BUG_ON(timer_pending(timer)) triggers during add_timer() in ax25_start_t1timer(). This patch changes current use of: init_timer(), add_timer() and del_timer() to setup_timer() with mod_timer(), which should be safer anyway. Reported-by: Jann Traschewski <jann@gmx.de> Signed-off-by: Jarek Poplawski <jarkao2@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [AX25] ax25_route: make ax25_route_lock BH safeJarek Poplawski2008-02-131-14/+14
| | | | | | | | | | | | | | | | | | | | | > ================================= > [ INFO: inconsistent lock state ] > 2.6.24-dg8ngn-p02 #1 > --------------------------------- > inconsistent {softirq-on-W} -> {in-softirq-R} usage. > linuxnet/3046 [HC0[0]:SC1[2]:HE1:SE0] takes: > (ax25_route_lock){--.+}, at: [<f8a0cfb7>] ax25_get_route+0x18/0xb7 [ax25] > {softirq-on-W} state was registered at: ... This lockdep report shows that ax25_route_lock is taken for reading in softirq context, and for writing in process context with BHs enabled. So, to make this safe, all write_locks in ax25_route.c are changed to _bh versions. Reported-by: Jann Traschewski <jann@gmx.de>, Signed-off-by: Jarek Poplawski <jarkao2@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [AX25] af_ax25: remove sock lock in ax25_info_show()Jarek Poplawski2008-02-131-4/+2Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This lockdep warning: > ======================================================= > [ INFO: possible circular locking dependency detected ] > 2.6.24 #3 > ------------------------------------------------------- > swapper/0 is trying to acquire lock: > (ax25_list_lock){-+..}, at: [<f91dd3b1>] ax25_destroy_socket+0x171/0x1f0 [ax25] > > but task is already holding lock: > (slock-AF_AX25){-+..}, at: [<f91dbabc>] ax25_std_heartbeat_expiry+0x1c/0xe0 [ax25] > > which lock already depends on the new lock. ... shows that ax25_list_lock and slock-AF_AX25 are taken in different order: ax25_info_show() takes slock (bh_lock_sock(ax25->sk)) while ax25_list_lock is held, so reversely to other functions. To fix this the sock lock should be moved to ax25_info_start(), and there would be still problem with breaking ax25_list_lock (it seems this "proper" order isn't optimal yet). But, since it's only for reading proc info it seems this is not necessary (e.g. ax25_send_to_raw() does similar reading without this lock too). So, this patch removes sock lock to avoid deadlock possibility; there is also used sock_i_ino() function, which reads sk_socket under proper read lock. Additionally printf format of this i_ino is changed to %lu. Reported-by: Bernard Pidoux F6BVP <f6bvp@free.fr> Signed-off-by: Jarek Poplawski <jarkao2@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* fib_trie: /proc/net/route performance improvementStephen Hemminger2008-02-131-11/+82
| | | | | | | | | Use key/offset caching to change /proc/net/route (use by iputils route) from O(n^2) to O(n). This improves performance from 30sec with 160,000 routes to 1sec. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* fib_trie: handle empty treeStephen Hemminger2008-02-131-4/+2Star
| | | | | | | | This fixes possible problems when trie_firstleaf() returns NULL to trie_leafindex(). Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [IPV4]: Remove IP_TOS setting privilege checks.David S. Miller2008-02-131-5/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Various RFCs have all sorts of things to say about the CS field of the DSCP value. In particular they try to make the distinction between values that should be used by "user applications" and things like routing daemons. This seems to have influenced the CAP_NET_ADMIN check which exists for IP_TOS socket option settings, but in fact it has an off-by-one error so it wasn't allowing CS5 which is meant for "user applications" as well. Further adding to the inconsistency and brokenness here, IPV6 does not validate the DSCP values specified for the IPV6_TCLASS socket option. The real actual uses of these TOS values are system specific in the final analysis, and these RFC recommendations are just that, "a recommendation". In fact the standards very purposefully use "SHOULD" and "SHOULD NOT" when describing how these values can be used. In the final analysis the only clean way to provide consistency here is to remove the CAP_NET_ADMIN check. The alternatives just don't work out: 1) If we add the CAP_NET_ADMIN check to ipv6, this can break existing setups. 2) If we just fix the off-by-one error in the class comparison in IPV4, certain DSCP values can be used in IPV6 but not IPV4 by default. So people will just ask for a sysctl asking to override that. I checked several other freely available kernel trees and they do not make any privilege checks in this area like we do. For the BSD stacks, this goes back all the way to Stevens Volume 2 and beyond. Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'upstream-davem' of ↵David S. Miller2008-02-1323-1792/+5440
|\ | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
| * net/phy/fixed.c: fix a use-after-freeAdrian Bunk2008-02-111-2/+2
| | | | | | | | | | | | | | | | | | This patch fixes a use-after-free introduced by commit a79d8e93d300adb84cccc38ac396cfb118c238ad and spotted by the Coverity checker. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * drivers/net/sis190: fix section mismatch warning in sis190_get_mac_addrSergio Luis2008-02-111-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix following warnings: WARNING: drivers/net/sis190.o(.text+0x103): Section mismatch in reference from the function sis190_get_mac_addr() to the function .devinit.text:sis190_get_mac_addr_from_apc() WARNING: drivers/net/sis190.o(.text+0x10e): Section mismatch in reference from the function sis190_get_mac_addr() to the function .devinit.text:sis190_get_mac_addr_from_eeprom() Annotate sis190_get_mac_addr() with __devinit. Signed-off-by: Sergio Luis <sergio@uece.br> sis190.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * claw/lcs/netiucv: check s390dbf level before sprintsPeter Tiedemann2008-02-113-14/+41
| | | | | | | | | | | | | | | | | | additional check of s390dbf level results in better performance if the default low debugging level is active. Signed-off-by: Peter Tiedemann <ptiedem@de.ibm.com> Signed-off-by: Ursula Braun <braunu@de.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * lcs: avoid/reduce unused s390dbf debug areas.Peter Tiedemann2008-02-111-1/+1
| | | | | | | | | | | | | | | | | | Since lcs makes use of 1 debug area only, the number of debug areas is reduced, while the number of pages per area is increased. Signed-off-by: Peter Tiedemann <ptiedem@de.ibm.com> Signed-off-by: Ursula Braun <braunu@de.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * netiucv: change name of nop functionUrsula Braun2008-02-111-3/+3
| | | | | | | | | | | | | | | | | | | | Dummy NOP actions for fsm-statemachines have to be defined separately for every using module of fsm-statemachines. Thus the generic name fsm_action_nop is replaced by module specific name netiucv_action_nop. Signed-off-by: Ursula Braun <braunu@de.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * netiucv: Remember to set driver->owner.Cornelia Huck2008-02-111-0/+1
| | | | | | | | | | | | Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Ursula Braun <braunu@de.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * claw: removal of volatile variablesUrsula Braun2008-02-111-2/+0Star
| | | | | | | | | | | | | | | | Volatile variables queme_switch and pk_delay are not used anyway. They are just a left over from an unused timer based packing logic. Signed-off-by: Ursula Braun <braunu@de.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * forcedeth: tx pause watermarksAyaz Abdulla2008-02-111-46/+57
| | | | | | | | | | | | | | | | | | | | New chipsets introduced variant Rx FIFO sizes that need to be taken into account when setting up the tx pause watermarks. This patch introduces the new device feature flags based on a version and implements the new watermarks. Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * forcedeth: tx collision fixAyaz Abdulla2008-02-111-19/+36
| | | | | | | | | | | | | | | | | | | | This patch supports a new fix in hardware regarding tx collisions. In the cases where we are in autoneg mode and the link partner is in forced mode, we need to setup the tx deferral register differently in order to reduce collisions on the wire. Signed-off-by: Ayaz Abdulla <aabdulla@nvidia.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * cxgb3: Handle ARP completions that mark neighbors stale.Steve Wise2008-02-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | When ARP completes due to a request rather than a reply the neighbor is marked NUD_STALE instead of reachable (see arp_process()). The handler for the resulting netevent needs to check also for NUD_STALE. Failure to use the arp entry can cause RDMA connection failures. Signed-off-by: Steve Wise <swise@opengridcomputing.com> Acked-by: Divy Le Ray <divy@chelsio.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * Merge branch 'r6040' of ↵Jeff Garzik2008-02-111-98/+135
| |\ | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/romieu/netdev-2.6 into upstream-fixes
| | * r6040: cleanupsFlorian Fainelli2008-02-051-5/+3Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - use netdev_alloc_skb - remove an useless variable in the IRQ handler - remove an unused private structure member - fix a spelling mistake Signed-off-by: Florian Fainelli <florian.fainelli@telecomint.eu> Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
| | * r6040: recover from transmit timeoutFlorian Fainelli2008-02-051-24/+33
| | | | | | | | | | | | | | | Signed-off-by: Florian Fainelli <florian.fainelli@telecomint.eu> Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
| | * r6040: add helpers to allocate and free the Tx/Rx buffersFlorian Fainelli2008-02-051-60/+84
| | | | | | | | | | | | | | | | | | | | | r6040_init_ring_desc moves around but it is kept unchanged. Signed-off-by: Florian Fainelli <florian.fainelli@telecomint.eu> Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
| | * r6040: do not use a private stats structure to store statisticsFlorian Fainelli2008-02-051-14/+20
| | | | | | | | | | | | | | | Signed-off-by: Florian Fainelli <florian.fainelli@telecomint.eu> Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
| * | DM9000: Show the MAC address source after printing MACBen Dooks2008-02-111-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | Show whether the MAC address was read from the EEPROM or the onboard PAR registers. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | DM9000: Update retry count whilst identifying chipBen Dooks2008-02-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reading the ID register does not always return the correct ID from the device, so we retry several times to see if we get a correct value. These failures seem to be excaserbated by the speed of the access to the chip (possibly time between issuing the address and then the data cycle). Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | DM9000: Add support for MII ioctl() callsBen Dooks2008-02-111-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | Add entry to handle the MII ioctl() calls via the generic_mii_ioctl call. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | DM9000: Add platform flag for no attached EEPROMBen Dooks2008-02-112-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow the platform data to specify to the DM9000 driver that there is no posibility of an attached EEPROM on the device, so default all reads to 0xff and ignore any write operations. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | DM9000: Remove redudant use of "& 0xff"Ben Dooks2008-02-111-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | The writing of the data should implicitly truncate the data to 8bits, so do not bother with the ands in the code. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | DM9000: Remove cal_CRC() and use ether_crc_le insteadBen Dooks2008-02-111-26/+9Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the cal_CRC as this is basically wrappering the ether_crc_le function, and is only being used by the multicast hash table functions. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | DM9000: Fix delays used by EEPROM read and writeBen Dooks2008-02-111-3/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | The code was using a delay of 8ms, when it should have been using the EEPROM status flag from the device to indicate the EEPROM transaction had finished. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | DM9000: Use netif_msg to enable debugging optionsBen Dooks2008-02-111-6/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the netif_msg_*() macros to enable the debugging based on the board's msg_enable field. The output still goes via the dev_dbg() macros, so will be tagged and output as appropriate. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | DM9000: Remove unnecessary changelog in header commentBen Dooks2008-02-111-40/+5Star
| | | | | | | | | | | | | | | | | | | | | | | | We have a perfectly good version control system, so we do not need to duplicate change comments in the header for this code. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | DM9000: Ensure spinlock held whilst accessing EEPROM registersBen Dooks2008-02-111-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ensure we hold the spinlock whilst the registers and being modified even though we hold the overall lock. This should protect against an interrupt happening whilst we are using the device. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | DM9000: Remove EEPROM initialisation code.Ben Dooks2008-02-111-29/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the old hack to program an initial EEPROM setting into the DM9000 as we now have ethtool support for reading and writing the EEPROM. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | DM9000: Add ethtool control of msg_enable valueBen Dooks2008-02-111-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | Allow the msg_enable value to be read and written by the ethtool interface. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | DM9000: Add ethtool support for reading and writing EEPROMBen Dooks2008-02-111-6/+60
| | | | | | | | | | | | | | | | | | | | | | | | Add ethtool support to access the configuration EEPROM connected to the DM9000. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | DM9000: Add mutex to protect accessBen Dooks2008-02-111-14/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a mutex to serialise access to the chip functions from entries such as the ethtool and the MII code. This should reduce the amount of time the spinlock is held to protect the address register. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | DM9000: Remove barely used SROM array read.Ben Dooks2008-02-111-13/+11Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The srom array in the board data is only being used in the device probe routines. The probe also only uses the first 6 bytes of an array we spend 512ms reading 128 bytes from. Change to reading the MAC area directly to the MAC address structure. As a side product, we rename the read_srom_word to dm9000_read_eeprom to bring it into line with the rest of the driver. No change is made to the delay in this function, which will be dealt with in a later patch. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | DM9000: Use msleep() instead of udelay()Ben Dooks2008-02-111-2/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can use sleeping functions when reading and writing the PHY registers, so let us sleep instead of busy waiting for the PHY. Note, this also fixes a bug reading the PHY where only 100uS was being used instead of 150uS Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | DM9000: Do not sleep with spinlock and IRQs heldBen Dooks2008-02-111-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The phy read and write routines call udelay() with the board lock held, and with the posibility of IRQs being disabled. Since these delays can be up to 500usec, and are only required as we have to save the chip's address register. To improve the behaviour, hold the lock whilst we are writing and then restore the state before the delay and then repeat the process once the delay has happened. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | DM9000: Add initial ethtool supportBen Dooks2008-02-111-1/+68
| | | | | | | | | | | | | | | | | | | | | Add support for ethtool operations for the DM9000. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | DM9000: Remove old timer based poll routinesBen Dooks2008-02-111-34/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the timer based MII phy polling, as this is currently broken with the new EEPROM code that now uses mutexes to protect the phy access. This will need to be replaced in the future by some form of mutex safe mechanism for reading the MII phy status. The replacement has not been done here as changing this patch, which is early in the sequence has quite a knock-on effect. Once this series is merged, then a new presentation of an patch to poll the MII link status can be added. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | DM9000: Pass IRQ flags via platform resourcesBen Dooks2008-02-111-3/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the flags in the IRQ resource to specify the type of IRQ being requested, so that systems which do not have level-based interrupts, or change the interrupt in some other way can specify this without making an #ifdef mess in the driver. This is specifically designed to undo the change in commit 4e4fc05a2b6e7bd2e0facd96e0c18dceb34d9349 which hardwires the type for everyone but blackfin to IRQT_RISING, which breaks all a number of Simtec boards which use (and setup in the bootloader) active low IRQs. Note, although there where originally objections due to the use of IORESOURCE_IRQ and IRQT_ flags not sharing the same definition, at least <include/linux/interrupt.h> notes these are the same. Signed-off-by: Ben Dooks <ben-linux@fluff.org> CC: Daniel Mack <daniel@caiaq.de> CC: Bryan Wu <bryan.wu@analog.com> CC: Alex Landau <landau.alex@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | DM9000 update debugging macros to use debug levelBen Dooks2008-02-112-35/+27Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | Change the debug macros to use the compiler to elide any unnecessary debug level, and to allow device configurable debug control. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | DM9000 use dev_xxx() instead of printk for output.Ben Dooks2008-02-111-28/+28
| | | | | | | | | | | | | | | | | | | | | | | | Move to using dev_dbg() and friends for the output of information to the user. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | DM9000: Add platform data to specify external phyBen Dooks2008-02-112-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Patch from: Laurent Pinchart <laurentp@cse-semaphore.com> This patch adds a flag to the DM9000 platform data which, when set, configures the device to use an external PHY. Signed-off-by: Laurent Pinchart <laurentp@cse-semaphore.com> Signed-off-by: Ben Dooks <ben-linuy@fluff.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | DM9000: Fix endian-ness of data accesses.Ben Dooks2008-02-111-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Patch from: Laurent Pinchart <laurentp@cse-semaphore.com> This patch splits the receive status in 8bit wide fields and convert the packet length from little endian to CPU byte order. Signed-off-by: Laurent Pinchart <laurentp@cse-semaphore.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | Optimize cxgb3 xmit path (a bit)Krishna Kumar2008-02-111-20/+15Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Add common code for stopping queue. 2. No need to call netif_stop_queue followed by netif_wake_queue (and infact a netif_start_queue could have been used instead), instead call stop_queue if required, and remove code under USE_GTS macro. 3. There is no need to check for netif_queue_stopped, as the network core guarantees that for us (I am sure every driver could remove that check, eg e1000 - I have tested that path a few billion times with about a few hundred thousand qstops but the condition never hit even once). Signed-off-by: Krishna Kumar <krkumar2@in.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | e1000: Fix for 32 bits platforms with 64 bits resourcesBenjamin Herrenschmidt2008-02-111-13/+5Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The e1000 driver stores the content of the PCI resources into unsigned long's before ioremapping. This breaks on 32 bits platforms that support 64 bits MMIO resources such as ppc 44x. This fixes it by removing those temporary variables and passing directly the result of pci_resource_start/len to ioremap. The side effect is that I removed the assignments to the netdev fields mem_start, mem_end and base_addr, which are totally useless for PCI devices. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> -- drivers/net/e1000/e1000_main.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | PS3: gelic: Add wireless support for PS3Masakazu Mokuno2008-02-116-2/+3117
| | | | | | | | | | | | | | | | | | | | | Signed-off-by: Masakazu Mokuno <mokuno@sm.sony.co.jp> Acked-by: Dan Williams <dcbw@redhat.com> Acked-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | PS3: gelic: Add support for dual network interfaceMasakazu Mokuno2008-02-112-309/+564
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for dual network (net_device) interface so that ethernet and wireless can own separate ethX interfaces. V2 - Fix the bug that bringing down and up the interface keeps rx disabled. - Make 'gelic_net_poll_controller()' extern , as David Woodhouse pointed out at the previous submission. - Fix weird usage of member names for the rx descriptor chain V1 - Export functions which are convenient for both interfaces - Move irq allocation/release code to driver probe/remove handlers because interfaces share interrupts. - Allocate skbs by using dev_alloc_skb() instead of netdev_alloc_skb() as the interfaces share the hardware rx queue. - Add gelic_port struct in order to abstract dual interface handling - Change handlers for hardware queues so that they can handle dual {source,destination} interfaces. - Use new NAPI functions This is a prerequisite for the new PS3 wireless support. Signed-off-by: Jeff Garzik <jeff@garzik.org>