summaryrefslogtreecommitdiffstats
path: root/drivers/net
Commit message (Collapse)AuthorAgeFilesLines
* sh: Board updates for I/O routine rework.Paul Mundt2006-09-271-1/+1
| | | | | | | This updates the various boards for some of the recent I/O routine updates. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
* [SUNLANCE]: Mark sparc_lance_probe_one as __devinit.David S. Miller2006-09-251-5/+5
| | | | | | | | | Fixes section mismatch warnings when built as a module. Also, mark find_ledma and sun4 init function as __devinit too. Signed-off-by: David S. Miller <davem@davemloft.net>
* [PATCH] wrong thing iounmapped (qla3xxx)Al Viro2006-09-241-1/+1
| | | | | | | | | | | | ql3xxx_probe() does ioremap and stores result in ->mem_map_registers. On failure exit it does iounmap() of the same thing. OTOH, ql3xxx_remove() does iounmap() of ->mmap_virt_base which is (a) never assigned and (b) never used other than in that iounmap() call. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] qla3xxx iomem annotationsAl Viro2006-09-242-26/+25
| | | | | | | the driver is still shite, though... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* Merge branch 'upstream-linus' of ↵Linus Torvalds2006-09-24342-28138/+40172
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6 * 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6: (217 commits) net/ieee80211: fix more crypto-related build breakage [PATCH] Spidernet: add ethtool -S (show statistics) [NET] GT96100: Delete bitrotting ethernet driver [PATCH] mv643xx_eth: restrict to 32-bit PPC_MULTIPLATFORM [PATCH] Cirrus Logic ep93xx ethernet driver r8169: the MMIO region of the 8167 stands behin BAR#1 e1000, ixgb: Remove pointless wrappers [PATCH] Remove powerpc specific parts of 3c509 driver [PATCH] s2io: Switch to pci_get_device [PATCH] gt96100: move to pci_get_device API [PATCH] ehea: bugfix for register access functions [PATCH] e1000 disable device on PCI error drivers/net/phy/fixed: #if 0 some incomplete code drivers/net: const-ify ethtool_ops declarations [PATCH] ethtool: allow const ethtool_ops [PATCH] sky2: big endian [PATCH] sky2: fiber support [PATCH] sky2: tx pause bug fix drivers/net: Trim trailing whitespace [PATCH] ehea: IBM eHEA Ethernet Device Driver ... Manually resolved conflicts in drivers/net/ixgb/ixgb_main.c and drivers/net/sky2.c related to CHECKSUM_HW/CHECKSUM_PARTIAL changes by commit 84fa7933a33f806bbbaae6775e87459b1ec584c0 that just happened to be next to unrelated changes in this update.
| * [PATCH] Spidernet: add ethtool -S (show statistics)Jim Lewis2006-09-223-2/+74
| | | | | | | | | | | | | | | | | | | | Add the ethtool -S (show statistics) feature to the Spidernet ethernet driver. I have tested it extensively and believe it is ready to be applied. Signed-off-by: James K Lewis <jklewis@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * Merge tag 'r8169-20060920-00' of ↵Jeff Garzik2006-09-221-1/+1
| |\ | | | | | | | | | git://electric-eye.fr.zoreil.com/home/romieu/linux-2.6 into tmp
| | * r8169: the MMIO region of the 8167 stands behin BAR#1Francois Romieu2006-09-201-1/+1
| | | | | | | | | | | | | | | | | | | | | Reported by Matt Bockol <mbockol@carleton.edu> to make its LOM (MSI 965 Neo) work. Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
| * | [NET] GT96100: Delete bitrotting ethernet driverRalf Baechle2006-09-224-1921/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | Code for the EV96100 evaluation board hasn't compiled since at least November 15, 2003, so it is being deleted as of 2.6.18 due to lack of a user base. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | [PATCH] mv643xx_eth: restrict to 32-bit PPC_MULTIPLATFORMDale Farnsworth2006-09-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | No 64-bit PPC_MULTIPLATFORM platforms use the mv643xx_eth driver, so build it only on PPC32. Signed-off-by: Dale Farnsworth <dale@farnsworth.org> Acked-by: Sven Luther <sl@bplan-gmbh.de> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | [PATCH] Cirrus Logic ep93xx ethernet driverLennert Buytenhek2006-09-223-0/+952
| | | | | | | | | | | | | | | | | | | | | | | | The Cirrus Logic ep93xx is an ARM SoC that includes an ethernet MAC -- this patch adds a driver for that ethernet MAC. Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | Merge branch 'master' into upstreamJeff Garzik2006-09-228-62/+87
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: net/ieee80211/ieee80211_crypt_tkip.c net/ieee80211/ieee80211_crypt_wep.c
| * \ \ Merge branch 'upstream-fixes' into upstreamJeff Garzik2006-09-212-4/+4
| |\ \ \
| * | | | e1000, ixgb: Remove pointless wrappersJeff Garzik2006-09-195-91/+60
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | | | [PATCH] Remove powerpc specific parts of 3c509 driverStephen Rothwell2006-09-191-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On powerpc and ppc, insl_ns and insl are identical as are outsl_ns and outsl, so remove the conditional use of insl_ns and outsl_ns. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | | | [PATCH] s2io: Switch to pci_get_deviceAlan Cox2006-09-191-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We want the pci devices ref counted against hotplug. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | | | [PATCH] gt96100: move to pci_get_device APIAlan Cox2006-09-191-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | | | [PATCH] ehea: bugfix for register access functionsJan-Bernd Themann2006-09-192-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hi Jeff, sorry to bother you again. We figured out that the readq function we included in the eHEA patch we sent yesterday to access eHEA registers is defined as little endian on POWER. This collides with our adapter. We talked to some PPC people who told us there is a discussion going on about new access functions. We were told to use __raw_readq / __raw_writeq for now. This patch fixes this bug found by our internal tests today. Please apply this small patch on the latest patch we sent you yesterday. If it is easier for you I can also give you the entire eHEA patch again. sorry and thanks a lot, Jan-Bernd Signed-off-by: Jan-Bernd Themann <themann@de.ibm.com> drivers/net/ehea/ehea.h | 2 +- drivers/net/ehea/ehea_hw.h | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | | | [PATCH] e1000 disable device on PCI errorLinas Vepstas2006-09-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A recent patch in -mm3 titled "gregkh-pci-pci-don-t-enable-device-if-already-enabled.patch" causes pci_enable_device() to be a no-op if the kernel thinks that the device is already enabled. This change breaks the PCI error recovery mechanism in the e1000 device driver, since, after PCI slot reset, the card is no longer enabled. This is a trivial fix for this problem. Tested. Signed-off-by: Linas Vepstas <linas@austin.ibm.com> Cc: John Ronciak <john.ronciak@intel.com> Cc: Jesse Brandeburg <jesse.brandeburg@intel.com> Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Acked-by: Auke Kok <auke-jan.h.kok@intel.com> Cc: Jeff Garzik <jeff@garzik.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | | | drivers/net/phy/fixed: #if 0 some incomplete codeJeff Garzik2006-09-131-0/+4
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | | | drivers/net: const-ify ethtool_ops declarationsJeff Garzik2006-09-13106-178/+163
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | | | [PATCH] sky2: big endianStephen Hemminger2006-09-132-37/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix support for big endian platforms like PPC. Still not sure about VLAN acceleration (does it need swapping)? Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | | | [PATCH] sky2: fiber supportStephen Hemminger2006-09-132-33/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the support for fiber connected gigabit boards. Allow half duplex gigabit to be configured. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | | | [PATCH] sky2: tx pause bug fixStephen Hemminger2006-09-132-82/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix problems with transmit pause frames. The driver was telling the GMAC to flush (not process) pause frames. Manually disabling pause wasn't working because of problems in the setup. This maybe the cause of the lockup under load. http://bugzilla.kernel.org/show_bug.cgi?id=6839 Patch against netdev-2.6 git tree Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | | | drivers/net: Trim trailing whitespaceJeff Garzik2006-09-13178-22399/+22399
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | | | [PATCH] ehea: IBM eHEA Ethernet Device DriverJan-Bernd Themann2006-09-1312-0/+5849
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hi Jeff, I fixed the __iomem issue and tested the driver with sparse. Looks good so far. Thanks for your effort. Jan-Bernd Themann Signed-off-by: Jan-Bernd Themann <themann@de.ibm.com> drivers/net/Kconfig | 9 drivers/net/Makefile | 1 drivers/net/ehea/Makefile | 6 drivers/net/ehea/ehea.h | 447 ++++++ drivers/net/ehea/ehea_ethtool.c | 294 ++++ drivers/net/ehea/ehea_hcall.h | 51 drivers/net/ehea/ehea_hw.h | 287 ++++ drivers/net/ehea/ehea_main.c | 2654 ++++++++++++++++++++++++++++++++++++++++ drivers/net/ehea/ehea_phyp.c | 705 ++++++++++ drivers/net/ehea/ehea_phyp.h | 455 ++++++ drivers/net/ehea/ehea_qmr.c | 582 ++++++++ drivers/net/ehea/ehea_qmr.h | 358 +++++ 12 files changed, 5849 insertions(+) Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | | | [PATCH] pcnet32: NAPI implementationDon Fry2006-09-132-28/+121
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement NAPI changes to pcnet32 driver. Compile default is off. Listed as experimental. Len and Don both worked on a NAPI implementation and have both tested these changes. An e1000 blasting short packets to the pcnet32 will lockup Don's system until the receive storm stops. Without NAPI Len's system watchdog would expire causing the system to reboot. With NAPI the system will stay operational. Tested ia32 and ppc64. Tested '970A, '971, '972, '973, '975, '976, and '978. The Kconfig changes came from Len. Don is to blame for all the others. Signed-off-by: Len Sorensen <lsorense@csclub.uwaterloo.ca> Signed-off-by: Don Fry <brazilnut@us.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | | | [PATCH] pcnet32: break receive routine into two pieces.Don Fry2006-09-131-161/+141
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Breaking the receive frame processing into two routines for greater clarity. Tested ia32 and ppc64. Signed-off-by: Don Fry <brazilnut@us.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | | | [PATCH] pcnet32: move/create receive and transmit routinesDon Fry2006-09-131-256/+259
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the receive routine and create the transmit routine. Tested ia32 and ppc64. Signed-off-by: Don Fry <brazilnut@us.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | | | [PATCH] pcnet32: magic number cleanupDon Fry2006-09-131-30/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change some magic numbers to clearer names. A few whitespace changes. Tested ia32 and ppc64. Signed-off-by: Don Fry <brazilnut@us.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | | | [PATCH] pcnet32: remove unnecessary save/restore register accesses.Don Fry2006-09-131-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Delete unnecessary save/restore of rap in interrupt handler and statistics. tested ia32 and ppc64. Signed-off-by: Don Fry <brazilnut@us.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | | | Merge branch 'upstream-fixes' into upstreamJeff Garzik2006-09-131-0/+2
| |\ \ \ \
| * | | | | [PATCH] e1000: revert 'e1000: Remove 0x1000 as supported device'Auke-Jan H Kok2006-09-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The commit 'e1000: Remove 0x1000 as supported device' (Jeff Kirsher, 673a052fde79ab5e9dce569b0336358812ddba2d) Removes PIC device ID 8086:1000 from the list of supported devices. A fix was submitted for the original issue (commit 6a9516989f94df10d9a27ba543c6b53b3e69c84a). This commit reverts commit 673a052fde79ab5e9dce569b0336358812ddba2d and re-enables 82542rev3 chips completely. Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * | | | | Merge tag 'r8169-20060912-00' of ↵Jeff Garzik2006-09-121-276/+380
| |\ \ \ \ \ | | | |_|_|/ | | |/| | | | | | | | | git://electric-eye.fr.zoreil.com/home/romieu/linux-2.6 into tmp
| | * | | | r8169: quirk for the 8110sb on arm platformFrancois Romieu2006-09-111-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Inverting the write ordering of the TxDescAddr{High/Low} registers suffices to trigger a sabbat of PCI errors which make the device completely dysfunctional. The issue has not been reported on a different platform. Switching from MMIO accesses to I/O ones as done in Realtek's own driver fixes (papers over ?) the bug as well but I am not thrilled to see everyone pay the I/O price for an obscure bug. This is the minimal change to handle the issue. Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Reported-by: Lennert Buytenhek <buytenh@wantstofly.org>
| | * | | | r8169: the 0x8136 needs a 8 bytes alignmentFrancois Romieu2006-08-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reported by Darren Salt. Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
| | * | | | r8169: add basic MII ioctl supportFrancois Romieu2006-08-311-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
| | * | | | r8169: use standard #defines from mii.h instead of declaring private onesFrancois Romieu2006-08-311-62/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some unused stuff goes away btw. Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
| | * | | | r8169: trim trailing whitespaces and convert whitespaces to tabsFrancois Romieu2006-08-311-33/+32
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
| | * | | | r8169: udelay() removalFrancois Romieu2006-08-311-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | No need to chew CPU cycles as there is no heavy timing requirement and the delays are always requested from a sleepable context. Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
| | * | | | r8169: use NETDEV_TX_{BUSY/OK}Francois Romieu2006-08-311-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
| | * | | | r8169: sync with vendor's driverFrancois Romieu2006-07-261-74/+144
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - add several PCI ID for the PCI-E adapters ; - new identification strings ; - the RTL_GIGA_MAC_VER_ defines have been renamed to closely match the out-of-tree driver. It makes the comparison less hairy ; - various magic ; - the PCI region for the device with PCI ID 0x8136 is guessed. Explanation: the in-kernel Linux driver is written to allow MM register accesses and avoid the IO tax. The relevant BAR register was found at base address 1 for the plain-old PCI 8169. User reported lspci show that it is found at base address 2 for the new Gigabit PCI-E 816{8/9}. Typically: 01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd.: Unknown device 8168 (rev 01) Subsystem: Unknown device 1631:e015 Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- Status: Cap+ 66Mhz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- Latency: 0, cache line size 20 Interrupt: pin A routed to IRQ 16 Region 0: I/O ports at b800 [size=256] Region 2: Memory at ff7ff000 (64-bit, non-prefetchable) [size=4K] ^^^^^^^^ So far I have not received any lspci report for the 0x8136 and Realtek's driver do not help: be it under BSD or Linux, their r1000 driver include a USE_IO_SPACE #define but the bar address is always hardcoded to 1 in the MM case. :o/ - the 8168 has been reported to require an extra alignment for its receive buffers. The status of the 8167 and 8136 is not known in this regard. Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
| | * | | | r8169: remove rtl8169_init_boardFrancois Romieu2006-07-261-105/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rationale: - its signature is not exactly pretty; - it has no knowledge of pci_device_id; - kiss 23 lines good bye. Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
| | * | | | r8169: hardware flow controlFrancois Romieu2006-07-261-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The datasheet suggests that the device handles the hardware flow control almost automagically. User report a different story, so let's try to twiddle the mii registers. Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
| | * | | | r8169: RX fifo overflow recoveryFrancois Romieu2006-07-261-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
| | * | | | r8169: mac address change supportFrancois Romieu2006-07-261-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix for http://bugzilla.kernel.org/show_bug.cgi?id=6032. Cc: Tim Mattox <tmattox@gmail.com> Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
| * | | | | Merge tag '8139cp-20060912-00' of ↵Jeff Garzik2006-09-121-63/+51
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | git://electric-eye.fr.zoreil.com/home/romieu/linux-2.6 into tmp
| | * | | | | 8139cp: ring_info removal for the transmit pathFrancois Romieu2006-09-121-19/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As long as the descriptor fits on a single cacheline, the change should be almost free. Now ring_info is not used at all. Remove it. Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
| | * | | | | 8139cp: use PCI_DEVICE() to shorten the PCI device tableFrancois Romieu2006-08-311-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
| | * | | | | 8139cp: pci_get_drvdata(pdev) can not be NULL in suspend handlerFrançois Romieu2006-08-311-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1) pci_set_drvdata() is used in cp_{init/remove}_one to initialize/reset driver_data to the relevant value (resp. net_device * and NULL). 2) each of the 3 relevant functions is issued under (device *)->sem: 2.1) pci_unregister_driver -> driver_unregister -> bus_remove_driver -> driver_detach (takes (device *)->sem) -> __device_release_driver(dev) -> dev->bus-remove(dev) (== pci_device_remove) -> drv->remove(pdev) (== cp_remove_one) [...] pci_dev->driver = NULL; 2.2) pci_register_driver -> __pci_register_driver -> driver_register -> bus_add_driver -> driver_attach -> __driver_attach (takes (device *)->sem) -> driver_probe_device(drv, dev) -> dev->bus->probe(dev) (== pci_device_probe) -> _pci_device_probe(drv, pci_dev) -> pci_call_probe(drv, pci_dev, id) -> drv->probe(dev, id) (== cp_init_one) [...] pci_dev->driver = drv; 2.3) suspend_device (takes (device *)->sem) -> dev->bus->suspend(dev) (== pci_device_suspend) checking for drv = pci_dev->driver != NULL [...] -> drv->suspend(pci_dev, state) (== cp_suspend) dev->sem and the state of pci_dev->driver provide the expected result. St Mary's day was a bit rainy here. Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
OpenPOWER on IntegriCloud