aboutsummaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2007-04-30ieee1394: csr1212: log if devices have CRC errors in their ROMStefan Richter
This will point out firmware bugs. I tested with 11 SBP-2 devices and one OS X PC and got these errors from two old CD-RWs only. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30ieee1394: csr1212: more sensible names for jump targetsStefan Richter
Code beneath two labels called "fail" is actually also reached in case of success. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30ieee1394: csr1212: warn on unreachable codeStefan Richter
We want bugs to show themselves. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30ieee1394: shrink csr1212_new_string_descriptor_leafStefan Richter
Make unnecessarily generic code specific and thus simpler. Shrink a lookup table from 128 to 16 bytes. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30ieee1394: csr1212: coding styleStefan Richter
Whitespace, line breaks, braces... Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30ieee1394: replace vmalloc by kmalloc in csr1212Stefan Richter
The biggest chunk ever allocated by CSR1212_MALLOC is 1024 Bytes + sizeof(struct csr1212_csr_rom_cache) big. Most of the time much smaller data structures are allocated. Therefore vmalloc is a waste. The one exception is csr1212_append_new_cache() which is called to append a chunk of CSR1212_EXTENDED_ROM_SIZE + sizeof(struct csr1212_csr_rom_cache) if the currently allocated ROM cache is too small. CSR1212_EXTENDED_ROM_SIZE is generously defined as 256 kBytes. In SVN commit 1220, Steve Kinneberg lowered this to 2 kBytes in the config_rom_2.4 branch. This same commit also switched CSR1212_MALLOC from kmalloc to vmalloc in the SVN trunk branch: > r1220 | kberg | 2004-05-31 01:51:44 +0200 (Mon, 31 May 2004) | 13 lines > > CSR1212 Extended ROM bug fixes: > trunk line changes: > - Use vmalloc instead of kmalloc > - Change delayed_reset_bus() to operate in a work_queue instead of a > timer interrupt. > - Fix hpsb_allocate_and_register_addrspace() to not allocate space > on top of already allocated space. > - Fix problems in csr1212.c filling ConfigROM images when extend > ROMs are present. > config-rom-2.4 changes: > - Changed extended rom allocation from 256K to 8K. (It was actually 2 kB, not 8 kB.) > - Fix hpsb_allocate_and_register_addrspace() to not allocate space > on top of already allocated space. > - Fix problems in csr1212.c filling ConfigROM images when extend > ROMs are present. I am now setting CSR1212_EXTENDED_ROM_SIZE to 2 kB minus the overhead of struct csr1212_csr_rom_cache. Note, this code path is not used by the in-kernel drivers though. raw1394 could trigger it, but the respective libraw1394 functions don't exist yet. Furthermore, userspace programs can replace the entire local ROM via raw1394. If kmalloc does not fulfill their needs --- well, tough luck. I decree that nobody needs such huge extended ROMs. (Extended ROMs are defined by IEEE 1212 clause 7.7.18. The spec does not impose practically relevant restrictions on the size of extended ROM chunks.) Another potentially demanding use of CSR1212_MALLOC is if external FireWire devices come with Extended ROM entries. If they are too big for kmalloc (or have been too big for vmalloc) we just fail to read their ROM. This is quite unlikely though, to my knowledge. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30ieee1394: de-inline some functionsStefan Richter
This small reorganization of public csr1212 functions saves one exported symbol and a few bytes in the driver modules. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30ieee1394: stricter error checks in csr1212Stefan Richter
return -EINVAL becomes BUG_ON in checks of function call parameters. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30ieee1394: csr1212: rename some typesStefan Richter
Use u8, u32 etc. instead of u_int8_t, csr1212_quad_t etc. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30ieee1394: drop csr1212's support for external compilationStefan Richter
csr1212 was written to be compiled either as part of the ieee1394 kernel driver or of an anticipated IEEE 1212 userspace library. We now drop support for the latter. The costs in terms of code footprint and depth of abstraction are not countered by any actual benefit. Also remove some obsolete #includes. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30ieee1394: remove unused csr1212 codeStefan Richter
Delete unused code. Make some extern functions static. Remove superfluous inline keywords. Move private definitions from csr1212.h to csr1212.c. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30ieee1394: small header cleanupStefan Richter
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30ieee1394: move some comments from declaration to definitionStefan Richter
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30ieee1394: remove declarations of nonexisting functionsStefan Richter
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30ieee1394: sbp2: include fixesAndrew Morton
drivers/ieee1394/sbp2.c: In function 'sbp2util_access_timeout': drivers/ieee1394/sbp2.c:399: error: 'TASK_INTERRUPTIBLE' undeclared (first use in this function) drivers/ieee1394/sbp2.c:399: error: (Each undeclared identifier is reported only once drivers/ieee1394/sbp2.c:399: error: for each function it appears in.) drivers/ieee1394/sbp2.c:399: warning: implicit declaration of function 'signal_pending' drivers/ieee1394/sbp2.c:399: warning: implicit declaration of function 'schedule_timeout' drivers/ieee1394/sbp2.c: In function 'sbp2_prep_command_orb_sg': drivers/ieee1394/sbp2.c:1438: warning: implicit declaration of function 'page_address' drivers/ieee1394/sbp2.c:1438: warning: passing argument 2 of 'dma_map_single' makes pointer from integer without a cast drivers/ieee1394/sbp2.c: In function 'sbp2_handle_status_write': drivers/ieee1394/sbp2.c:1842: error: 'TASK_INTERRUPTIBLE' undeclared (first use in this function) Possibly due to changes in -mm, but this file should explicitly include the headers for the stuff it uses. Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (brought into alphabetic order)
2007-04-30ieee1394: sbp2: move some memory allocations into non-atomic contextStefan Richter
When the command ORB pool is created, the ORB list won't be accessed concurrently. Therefore we don't have to take the spinlock there. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30ieee1394: sbp2: optimize DMA direction of s/g tablesStefan Richter
Unlike the name suggests, "cmd->scatter_gather_element" holds only the s/g table, not the actual s/g elements. Since the table is only read but never written by the device, DMA_BIDIRECTIONAL can be replaced by DMA_TO_DEVICE which may be cheaper on some architectures. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30ieee1394: sbp2: enforce 32bit DMA mappingStefan Richter
In order to use OHCI-1394 physical DMA, all s/g elements, s/g tables, ORBs, and response buffers have to reside within the first 4 GB of the FireWire controller's physical address space. Set the correct mask for DMA mappings. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-30ieee1394: sbp2: remove unnecessary alignments of struct membersStefan Richter
The members "dma_addr_t command_orb_dma" and "dma_addr_t sge_dma" of sbp2.h::sbp2_command_info do not have to be aligned themselves --- only the memory which they point to has to be. The member "struct sbp2_command_orb command_orb" has to be aligned on 4 bytes boundary which is guaranteed because it contains u32 members. The member "struct sbp2_unrestricted_page_table scatter_gather_element", i.e. the SBP-2 s/g table, has to be aligned on 8 bytes boundary according to the SBP-2 spec. This is not a requirement for FireWire controllers but could be expected by SBP-2 targets. I see no need to align the members command_orb and scatter_gather_element on CPU cacheline boundaries. It could have performance benefits, but on the other hand sbp2 has a somewhat wasteful allocation scheme which should be optimized first before further tweaks like cacheline alignments. (E.g. don't always allocate SG_ALL s/g table elements.) Note, before as well as after the patch, the code relies on the assumption that memory alignment in the virtual address space is preserved in the physical address space after DMA mapping. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2007-04-29Merge branch 'field-zeroing' into for-linusJiri Kosina
2007-04-29Merge branch 'upstream-linus' of ↵Linus Torvalds
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: (107 commits) smc911x: fix compilation breakage wjen debug is on [netdrvr] eexpress: minor corrections add NAPI support to sb1250-mac.c ixgb: ROUND_UP macro cleanup in drivers/net/ixgb e1000: ROUND_UP macro cleanup in drivers/net/e1000 Generic HDLC sparse annotations e100: Optionally use I/O mode only to access register space e100: allow bad MAC address when running with invalid eeprom csum ehea: fix for dlpar support ehea: fix for sysfs entries 3C509: Remove unnecessary include of <linux/pm_legacy.h> NetXen: Fix for vmalloc issues NetXen: Fixes for Power PC architecture NetXen: Port swap feature for multi port cards NetXen: Removal of redundant macros NetXen: Multi PCI support for Quad cards NetXen: Removal of redundant argument passing NetXen: Use multiple PCI functions [netdrvr e100] experiment with doing RX in a similar manner to eepro100 [PATCH] ieee80211: add missing global needed by IEEE80211_DEBUG_XXXX ...
2007-04-29Merge branch 'upstream-linus' of ↵Linus Torvalds
master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev * 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev: (86 commits) SPIN_LOCK_UNLOCKED cleanup in drivers/ata/pata_winbond.c drivers/ata/pata_cmd640.c: fix build with CONFIG_PM=n pata_hpt37x: Further small fixes pata_hpt3x2n: Add HPT371N support and other bits ata: printk warning fixes libata: separate ATA_EHI_DID_RESET into DID_SOFTRESET and DID_HARDRESET ahci: consolidate common port flags ata_timing: ensure t->cycle is always correct libata: add missing call to ->cable_detect() in new EH path pata_amd: remove contamination added during cable_detect conversion libata: Handle drives that require a spin-up command before first access libata: HPA support libata: kill probe_ent and related helpers libata: convert the remaining PATA drivers to new init model libata: convert the remaining SATA drivers to new init model libata: convert ata_pci_init_native_mode() users to new init model libata: convert drivers with combined SATA/PATA ports to new init model libata: add init helpers including ata_pci_prepare_native_host() libata: convert native PCI host handling to new init model libata: convert legacy PCI host handling to new init model ...
2007-04-29Merge branch 'release' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6 * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (105 commits) sonypi: use mutex instead of semaphore sony-laptop: remove user visible camera controls as platform attributes meye: make meye use sony-laptop instead of sonypi sony-laptop: add a meye-usable include file for camera ops sony-laptop: complete the motion eye camera support in sony-laptop sonypi: try to detect if sony-laptop has already taken one of the known ioports sonypi: suggest sonypi users to try sony-laptop instead sony-laptop: add edge modem support (also called WWAN) sony-laptop: add locking on accesses to the ioport and global vars sony-laptop: add camera enable/disable parameter, better handle possible infinite loop thinkpad-acpi: make drivers/misc/thinkpad_acpi:fan_mutex static ACPI: thinkpad-acpi: add sysfs support to wan and bluetooth subdrivers ACPI: thinkpad-acpi: add sysfs support to hotkey subdriver ACPI: thinkpad-acpi: improve dock subdriver initialization ACPI: thinkpad-acpi: improve debugging for acpi helpers ACPI: thinkpad-acpi: improve fan control documentation ACPI: thinkpad-acpi: map ENXIO to EINVAL for fan sysfs ACPI: thinkpad-acpi: fix a fan watchdog invocation ACPI: thinkpad-acpi: do not arm fan watchdog if it would not work ACPI: thinkpad-acpi: add a fan-control feature master toggle ...
2007-04-29USB HID: don't warn on idVendor == 0Jiri Kosina
It turns out that there are broken devices out there that incorrectly report VID/PID as 0x000, see http://lkml.org/lkml/2007/4/27/496 Therefore we should not confuse users by dumping warnings and stacktraces in such situation. It is not possible to add quirks for such horribly broken devices, but currently that's not needed. Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2007-04-28[NET]: Remove NETIF_F_INTERNAL_STATS, default to internal stats.Rusty Russell
Herbert Xu conviced me that a new flag was overkill; every driver currently overrides get_stats, so we might as well make the internal one the default. If someone did fail to set get_stats, they would now get all 0 stats instead of "No statistics available". Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Acked-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-04-28[NETPOLL]: Remove CONFIG_NETPOLL_RXSergei Shtylyov
Get rid of the CONFIG_NETPOLL_RX option completely since all the dependencies have been removed long ago... Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Acked-by: Jeff Garzik <jgarzik@pobox.com> Acked-by: Matt Mackall <mpm@selenic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-04-28Pull bugzilla-8346 into release branchLen Brown
2007-04-28Pull sbs into release branchLen Brown
2007-04-28Pull dock into release branchLen Brown
2007-04-28Pull ec into release branchLen Brown
2007-04-28Pull misc-for-upstream into release branchLen Brown
2007-04-28Pull thinkpad into release branchLen Brown
Conflicts: drivers/misc/Kconfig Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-28Pull sony into release branchLen Brown
2007-04-28Pull asus into release branchLen Brown
2007-04-28sonypi: use mutex instead of semaphoreMatthias Kaehlcke
the Sony Programmable I/O Control driver uses a semaphore as mutex. use the mutex API instead of the (binary) semaphore Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com> Acked-by: Mattia Dongili <malattia@linux.it> Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-28sony-laptop: remove user visible camera controls as platform attributesmalattia@linux.it
Avoid giving the user the possibility to shoot his own foot and let the meye driver enable/disable the camera wisely (PCI_ID based). Signed-off-by: Mattia Dongili <malattia@linux.it> Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-28meye: make meye use sony-laptop instead of sonypimalattia@linux.it
Change sonypi_camera_command() calls to sony_pic_camera_command() and use the renamed macros. Signed-off-by: Mattia Dongili <malattia@linux.it> Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-28sony-laptop: add a meye-usable include file for camera opsmalattia@linux.it
Copy and rename (for easier co-existence) the MEYE-wise exported interface. Signed-off-by: Mattia Dongili <malattia@linux.it> Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-28sony-laptop: complete the motion eye camera support in sony-laptopmalattia@linux.it
Add the exported sony_pic_camera_command() function to make the MEYE driver happy. Signed-off-by: Mattia Dongili <malattia@linux.it> Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-28sonypi: try to detect if sony-laptop has already taken one of the known ioportsmalattia@linux.it
Get the IO resources list in sony-laptop in the same order as listed in sonypi and make sonypi check if one of those is already busy. The sonypi check can be disabled by a module parameter in case the user thinks we are plainly wrong (check_ioport=0). Signed-off-by: Mattia Dongili <malattia@linux.it> Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-28sonypi: suggest sonypi users to try sony-laptop insteadmalattia@linux.it
Try to migrate sonypi users to sony-laptop gracefully. Signed-off-by: Mattia Dongili <malattia@linux.it> Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-28sony-laptop: add edge modem support (also called WWAN)malattia@linux.it
Some SZ Vaios have a gsm built-in modem. Allow powering on/off this device. Thanks to Joshua Wise for the base code. Signed-off-by: Mattia Dongili <malattia@linux.it> Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-28sony-laptop: add locking on accesses to the ioport and global varsmalattia@linux.it
Better avoid having ioport commands mixing and global variables reading/writing. Signed-off-by: Mattia Dongili <malattia@linux.it> Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-28sony-laptop: add camera enable/disable parameter, better handle possible ↵malattia@linux.it
infinite loop Use a parameter to enable/disable motion eye camera (for C1VE/C1VN models) controls and avoid entering an infinite loop if the camera is not present and the HW doesn't answer as we expect on io commands. Signed-off-by: Mattia Dongili <malattia@linux.it> Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-28thinkpad-acpi: make drivers/misc/thinkpad_acpi:fan_mutex staticAdrian Bunk
This patch makes the needlessly global fan_mutex static. Signed-off-by: Adrian Bunk <bunk@stusta.de> Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-28ACPI: thinkpad-acpi: add sysfs support to wan and bluetooth subdriversHenrique de Moraes Holschuh
Add support to sysfs to the wan and bluetooth subdrivers. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-28ACPI: thinkpad-acpi: add sysfs support to hotkey subdriverHenrique de Moraes Holschuh
Add the hotkey sysfs support. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-28ACPI: thinkpad-acpi: improve dock subdriver initializationHenrique de Moraes Holschuh
The dock sub-driver has split-personality (two subdrivers), and it was doing some unoptimal things on init because of that. Fix it so that the second half of it will only init when necessary, and only if the first half initialized sucessfully in the first place. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-28ACPI: thinkpad-acpi: improve debugging for acpi helpersHenrique de Moraes Holschuh
Some issues with the dock subdriver proved that a slightly improved debugging setup for ACPI notifiers and handler helpers would be useful. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-28ACPI: thinkpad-acpi: map ENXIO to EINVAL for fan sysfsHenrique de Moraes Holschuh
Currently, all fan control operations return ENXIO if unsupported operations are requested, but return EINVAL if invalid fan modes are requested on a given ThinkPad. This is not strictly correct for sysfs, so map ENXIO to EINVAL in the sysfs attribute store handlers, as we do benefit from the ENXIO in other parts of the driver code. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com>