summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* ieee1394: dv1394: schedule for feature removalStefan Richter2006-12-073-9/+19
| | | | Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: raw1394: defer feature removal of old isoch interfaceStefan Richter2006-12-072-5/+23
| | | | | | | | | Known to be affected: - libdc1394: prefers video1394 for now, old-style raw1394 support might be dropped eventually - OpenH323 PWLib, AVC video input module: uses libraw1394's old API Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: ohci1394: call PMac code in shutdown only for proper machinesStefan Richter2006-12-071-1/+1
| | | | | | There has been an if(...) missing, for ages. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: ohci1394: reformat PPC_PMAC platform codeStefan Richter2006-12-071-20/+14
| | | | | | Adjust whitespace and line lengths Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: ohci1394: add PPC_PMAC platform code to driver probeStefan Richter2006-12-071-4/+15
| | | | | | | | Fixes http://bugzilla.kernel.org/show_bug.cgi?id=7431 iBook G3 threw a machine check exception and put the display backlight to full brightness after ohci1394 was unloaded and reloaded. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: sbp2: wrap two functions into oneStefan Richter2006-12-071-23/+7
| | | | | | Move the body of a function into its only caller. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: sbp2: update comment on things to doStefan Richter2006-12-071-7/+19
| | | | | | Some people actually look at those comments. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: sbp2: use list_move_tail()Stefan Richter2006-12-071-2/+1
| | | | | | It's OK to reorder list_del() and sbp2util_free_command_dma() here. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: sbp2: more concise names for types and variablesStefan Richter2006-12-072-598/+575
| | | | | | | | | "struct scsi_id_instance_data" represents a logical unit. Rename it to "struct sbp2_lu", and "scsi_id" to "lu". Rename some other variables too. Wrap almost all lines after at most 80 columns. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: sbp2: remove unused struct membersStefan Richter2006-12-072-25/+4
| | | | Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: sbp2: proper unit in module parameter descriptionStefan Richter2006-12-071-1/+2
| | | | | | It's 2^20 bit/s, not 0.001 bit. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: sbp2: clean up sbp2_ namespaceStefan Richter2006-12-072-133/+132
| | | | | | | Prepend sbp2*_ to anything globally defined in sbp2.c except for some macros. Strip sbp2_ from names of struct members. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: sbp2: some conditions in queue_command are unlikelyStefan Richter2006-12-071-5/+5
| | | | Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: sbp2: remove superfluous commentsStefan Richter2006-12-072-355/+109
| | | | | | And update and reformat remaining comments. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: sbp2: delayed_work -> work_structStefan Richter2006-12-072-16/+12
| | | | | | | | | This work is not delayed. Also bring the code format in a state which reduces my work to merge pending sbp2 patchs. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: sbp2: coding style of some macrosStefan Richter2006-12-071-77/+78
| | | | | | Adjust parentheses, indentation, line lengths. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: sbp2: remove debug macrosStefan Richter2006-12-071-280/+20
| | | | | | No need to keep them in released sources. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: sbp2: consolidate log levelsStefan Richter2006-12-071-19/+12
| | | | | | | | Replace some calls to SBP2_ERR and SBP2_WARN by SBP2_INFO. Remove logging macros SBP2_NOTICE and SBP2_WARN. Remove direct usage of HPSB_ logging macros. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: sbp2: remove duplicate codeStefan Richter2006-12-071-11/+0
| | | | | | | | The same case is handled further below in sbp2scsi_complete_command. Note, the second version behaves slightly different but looks preferable. It's an extremely unlikely case by the way. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: sbp2: remove dead codeStefan Richter2006-12-071-15/+0
| | | | | | This has been within #if 0 for a long time and is wrong anyway. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: sbp2: clean up function declarationsStefan Richter2006-12-072-104/+86
| | | | | | | | | Remove unnecessary function prototypes. Remove variable names from function prototypes. Move declarations from sbp2.h to sbp2.c. Move definitions of driver templates together near the top of sbp2.c. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: sbp2: remove irritating log messageStefan Richter2006-12-071-2/+0
| | | | | | | | | | | The queue depth can be read from /sys/bus/scsi/devices/*/queue_depth, so don't log it. And the hint about speed improvements is misleading, at least under current kernels. If serialization is switched off, read performance is typically increased by less than 10%. (I did not test write performance recently.) On the other hand, serialize_io=0 is not yet safe due to some implementation issues that are not trivial to fix. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ohci1394: shortcut irq printingAlexey Dobriyan2006-12-071-4/+2
| | | | | | | To print irq number no need to transform to string using %d, then print using %s. Just use %d. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
* ieee1394: nodemgr: take it easy if bus_rescan_devices failsStefan Richter2006-12-071-3/+2
| | | | | | This happens. No need to log a BUG trace. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* drivers/ieee1394/*: use kmemdup()Eric Sesterhenn2006-12-072-4/+2
| | | | | | Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: ohci1394: proper log messages in suspend and resumeStefan Richter2006-12-071-11/+15
| | | | | | | | | | - correct thinko in one of my last commits: cannot use PRINT macro with ohci == NULL - add log messages on ohci == NULL and on pci_enable_device != 0 - update log macros from patch "revert fail on error in suspend" to use PRINT and DBGMSG where possible Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: ohci1394: revert fail on error in suspendStefan Richter2006-12-071-2/+11
| | | | | | | | Some errors during preparation for suspended state can be skipped with a warning instead of a failure of the whole suspend transition, notably an error in pci_set_power_state. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: only build OUI database files if config enabledRandy Dunlap2006-12-071-1/+4
| | | | | | | Only build IEEE1394 OUI database files if the config option is enabled. Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: fix printk format warningRandy Dunlap2006-12-071-1/+1
| | | | | | | | Fix printk format warning: drivers/ieee1394/nodemgr.c:364: warning: long long unsigned int format, u64 arg (arg 3) Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: nodemgr: revise semaphore protection of driver core dataStefan Richter2006-12-071-50/+92
| | | | | | | | | | | | | | | | | | | | | | - The list "struct class.children" is supposed to be protected by class.sem, not by class.subsys.rwsem. - nodemgr_remove_uds() iterated over nodemgr_ud_class.children without proper protection. This was never observed as a bug since the code is usually only accessed by knodemgrd. All knodemgrds are currently globally serialized. But userspace can trigger this code too by writing to /sys/bus/ieee1394/destroy_node. - Clean up access to the FireWire bus type's subsys.rwsem: Access it uniformly via ieee1394_bus_type. Shrink rwsem protected regions where possible. Expand them where necessary. The latter wasn't a problem so far because knodemgr is globally serialized. This should harden the interaction of ieee1394 with sysfs and lay ground for deserialized operation of multiple knodemgrds and for implementation of subthreads for parallelized scanning and probing. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: nodemgr: reflect which return values are errorsStefan Richter2006-12-071-34/+30
| | | | | | Give better names to local variables. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: nodemgr: small fix after sysfs errors patchStefan Richter2006-12-071-1/+1
| | | | | | One hunk in "ieee1394: handle sysfs errors" was wrong. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* dv1394: remove BKL contentionStefan Richter2006-12-071-11/+3
| | | | | | Purges the one remaining call to lock_kernel() from the 1394 subsystem. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* video1394: remove BKL contentionDaniel Drake2006-12-071-24/+6
| | | | | | | | | | | | | video1394 does not need to take the BKL. The data structures shared between file_operations and interrupts are already protected through context-specific spinlocks. The only other danger is video1394_release() being called during another operation, however this cannot happen because release is only ever invoked when the last thread has closed the fd. Signed-off-by: Daniel Drake <ddrake@brontes3d.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* video1394: small optimizations to frame retrieval codepathDaniel Drake2006-12-071-8/+10
| | | | | | | | | Add some GCC branch prediction optimizations to unlikely error/safety conditions in the ioctl handling code commonly called during an application's capture loop. Signed-off-by: Daniel Drake <ddrake@brontes3d.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: handle sysfs errorsStefan Richter2006-12-072-49/+118
| | | | | | Handle driver core errors with as much care as appropriate. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: coding style in hosts.cStefan Richter2006-12-071-7/+11
| | | | | | Some 80-columns pedantry, and touch up of a // comment. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: lock smaller region by host_num_alloc mutexStefan Richter2006-12-071-4/+1
| | | | | | We need the mutex only around the iteration over existing hosts. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: usecs_to_jiffies takes unsigned int argumentStefan Richter2006-12-071-5/+3
| | | | Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: ohci1394: suspend/resume cosmeticsStefan Richter2006-12-071-78/+48
| | | | | | | Reorder the definitions of ohci1394_pci_suspend and _resume. Remove redundant comments. Beautify return statements. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ohci1394: steps to implement suspend/resumeBernhard Kaindl2006-12-071-14/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I did a quick shot on what I described and the appended patch does the first thing needed for working suspend/resume in ohci1394 which is HW de- and re-initialisation. It works with suspend2disk on my Ricoh R5C552 IEEE 1394 Controller with the 2.6.17 kernel to the extent that if I call dvgrab --interactive after suspend2disk without unloading ohci1394, it does not lock up dvgrab with 100% CPU but properly connects to the camera, given that I first unplug and plug the camera after coming back from suspend. I guess that could be fixed by forcing a bus reset in the resume function. I cannot test suspend to RAM here at the moment and should follow the guidelines in Documentation/power/pci.txt also, so this is rather a quick report than a finished patch and there are some rough edges: However, with this patch, I have to unload at least some in-kernel users of ohci1394 like dv1394 or video1394 before suspending. Not doing that caused an Oops and a bad tasklet error, probably from not handling ISO tasklets during suspend/resume properly. Maybe these can be temporarily cleared or unregistered and re-registered for suspend/resume with help from the other layers or from the highlevel 1394 core, but I do not really know what these do. But this patch provides a useful base to start from and is already of much help for people which do not need dv1394 and video1394 or can unload them at least during suspend. I cannot test function with sbp2 at the moment, but raw1394 seems to work fine. Signed-off-by: Bernhard Kaindl <bk@fsfe.org> Update 1: merge with previous two ohci1394 suspend/resume patches Update 2: version for application on top of Linux 2.6.19-rc4 Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: raw1394: add comments on lock usageStefan Richter2006-12-071-5/+5
| | | | | | | Add a who-is-who about some locks and list heads in raw1394's struct definitions. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: sbp2: slightly reorder sbp2scsi_abortStefan Richter2006-12-071-8/+2
| | | | | | | | | Put the target's fetch agent into reset state before the underlying ORB DMA is unmapped and the ->done handler is called. It is highly unlikely but the target could access that ORB right before sbp2 sends the reset request. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: remove unused struct member from highlevel APIStefan Richter2006-12-071-1/+0
| | | | | | | | | struct hpsb_highlevel's struct module *owner is neither used by the IEEE 1394 core nor set by any of the in-tree drivers or the two out-of-tree highlevel drivers I know about (dfg1394, mem1394) --- nor is this member documented. An unscheduled removal seems acceptable. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* Add "run_scheduled_work()" workqueue functionLinus Torvalds2006-12-073-2/+75
| | | | | | | | | | | | | | | | | | | | | | This allows workqueue users to run just their own pending work, rather than wait for the whole workqueue to finish running. This solves the deadlock with networking libphy that was due to other workqueue entries possibly needing a lock that was held by the routine that wanted to flush its own work. It's not wonderful: if you absolutely need to synchronize with the work function having been executed, any user strictly speaking should have its own completion tracking logic, since when we run things explicitly by hand, the generic workqueue layer can no longer help us synchronize. Also, this is strictly only usable for work that has been scheduled without any delayed timers. You can not mix the new interface with schedule_delayed_work(). But it's better than what we had currently. Acked-by: Maciej W. Rozycki <macro@linux-mips.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* Merge branch 'upstream-linus' of ↵Linus Torvalds2006-12-072-44/+79
|\ | | | | | | | | | | | | | | | | | | 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: [PATCH] libata: Incorrect timing computation for PIO5/6 [PATCH] sata_promise: new EH conversion, take 2 [PATCH] libata: let ATA_FLAG_PIO_POLLING use polling pio for ATA_PROT_NODATA [PATCH] sata_promise: cleanups, take 2
| * [PATCH] libata: Incorrect timing computation for PIO5/6Alan2006-12-071-1/+1
| | | | | | | | | | | | | | | | The ata timing computation code makes some mistakes in PIO5/6 because a check was not updated correctly when I put this support into the kernel. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * [PATCH] sata_promise: new EH conversion, take 2Mikael Pettersson2006-12-071-12/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch converts sata_promise to use new-style libata error handling on Promise SATA chips, for both SATA and PATA ports. * ATA_FLAG_SRST is no longer set * ->phy_reset is no longer set as it is unused when ->error_handler is present, and pdc_sata_phy_reset() has been removed * pdc_freeze() masks interrupts and halts DMA via PDC_CTLSTAT * pdc_thaw() clears interrupt status in PDC_INT_SEQMASK and then unmasks interrupts in PDC_CTLSTAT * pdc_error_handler() reinitialises the port if it isn't frozen, and then invokes ata_do_eh() with standard {s,}ata reset methods * pdc_post_internal_cmd() resets the port in case of errors * the PATA-only 20619 chip continues to use old-style EH: not by necessity but simply because I don't have documentation for it or any way to test it Since the previous version pdc_error_handler() has been rewritten and it now mostly matches ahci and sata_sil24. In case anyone wonders: the call to pdc_reset_port() isn't a heavy-duty reset, it's a light-weight reset to quickly put a port into a sane state. The discussion about the PCI flushes in pdc_freeze() and pdc_thaw() seemed to end with a consensus that the flushes are OK and not obviously redundant, so I decided to keep them for now. This patch was prepared against 2.6.19-git7, but it also applies to 2.6.19 + libata #upstream, with or without the revised sata_promise cleanup patch I recently submitted. This patch does conflict with the #promise-sata-pata patch: this patch removes pdc_sata_phy_reset() while #promise-sata-pata modifies it. The correct patch resolution is to remove the function. Tested on 2037x and 2057x chips, with PATA patches on top and disks on both SATA and PATA ports. Signed-off-by: Mikael Pettersson <mikpe@it.uu.se> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * [PATCH] libata: let ATA_FLAG_PIO_POLLING use polling pio for ATA_PROT_NODATAAlbert Lee2006-12-071-0/+1
| | | | | | | | | | | | | | | | Even if ATA_FLAG_PIO_POLLING is set, libata uses irq pio for the ATA_PROT_NODATA protocol. This patch let ATA_FLAG_PIO_POLLING use polling pio for the ATA_PROT_NODATA protocol. Signed-off-by: Albert Lee <albertcc@tw.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
| * [PATCH] sata_promise: cleanups, take 2Mikael Pettersson2006-12-071-31/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch performs two simple cleanups of sata_promise. * Remove board_20771 and map device id 0x3577 to board_2057x. After the recent corrections for SATAII chips, board_20771 and board_2057x were equivalent in the driver. * Remove hp->hotplug_offset and use hp->flags & PDC_FLAG_GEN_II to compute hotplug_offset in pdc_host_init(). hp->hotplug_offset was used to distinguish 1st and 2nd generation chips in one particular case, but now we have that information in a more general form in hp->flags, so hp->hotplug_offset is redundant. Changes since previous submission: rebased on libata-dev #upstream, cleaned up hotplug_offset computation based on Tejun's comments, expanded hotplug_offset removal rationale. This patch does not depend on the pending new EH conversion patch. Signed-off-by: Mikael Pettersson <mikpe@it.uu.se> Signed-off-by: Jeff Garzik <jeff@garzik.org>
OpenPOWER on IntegriCloud