aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAge
* firewire: Add a comment to describe why we split the sg list.Kristian Høgsberg, Stefan Richter2007-05-10
| | | | | Signed-off-by: Kristian Hoegsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Return SCSI_MLQUEUE_HOST_BUSY for out of memory cases in queuecommand.Kristian Høgsberg2007-05-10
| | | | | Signed-off-by: Kristian Hoegsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Handle the last few DMA mapping error cases.Kristian Høgsberg2007-05-10
| | | | | | | This should be the last missing checks. Signed-off-by: Kristian Hoegsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Allocate scsi_host up front and allocate the sbp2_device as hostdata.Kristian Høgsberg2007-05-10
| | | | | | | Avoids an extra allocation and simplifies lifetime rules for the scsi_host. Signed-off-by: Kristian Hoegsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Provide module aliase for backwards compatibility.Olaf Hering2007-05-10
| | | | | | | | | | | | | This patch loads fw-sbp2 if sbp2 is still in the config file. So one can go back and forth between releases without worry about the root filesystem drivers. Signed-off-by: Kristian Hoegsberg <krh@redhat.com> Existing mkinitrd scripts still have to be adapted, unless they grok module aliases. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Add to fw-core-y instead of assigning fw-core-objs in Makefile.Kristian Høgsberg2007-05-10
| | | | | Signed-off-by: Kristian Hoegsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Break out shared IEEE1394 constant to separate header file.Kristian Høgsberg2007-05-10
| | | | | Signed-off-by: Kristian Hoegsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Use linux/*.h instead of asm/*.h header files.Kristian Høgsberg2007-05-10
| | | | | Signed-off-by: Kristian Hoegsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Uppercase most macro names.Kristian Høgsberg2007-05-10
| | | | | Signed-off-by: Kristian Hoegsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Coding style cleanup: no spaces after function names.Kristian Høgsberg2007-05-10
| | | | | Signed-off-by: Kristian Hoegsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Convert card_rwsem to a regular mutex.Kristian Høgsberg2007-05-10
| | | | | Signed-off-by: Kristian Hoegsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Clean up comment style.Kristian Høgsberg2007-05-10
| | | | | | | | Drop filenames from file preamble, drop editor annotations and use standard indent style for block comments. Signed-off-by: Kristian Hoegsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (fixed typo)
* firewire: Use lib/ implementation of CRC ITU-T.Kristian Høgsberg2007-05-10
| | | | | | | | | With the CRC ITU-T implementation available in lib/ we can use that instead. This also fixes a bug in the topology map crc computation. Signed-off-by: Kristian Hoegsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (fixed Kconfig)
* CRC ITU-T V.41Ivo van Doorn2007-05-10
| | | | | | | | | | | | | | | | | This will add the CRC calculation according to the CRC ITU-T V.41 to the kernel lib/ folder. This code has been derived from the rt2x00 driver, currently found only in the wireless-dev tree, but this library is generic and could be used by more drivers who currently use their own implementation. Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Also useful for the new firewire stack. Signed-off-by: Kristian Hoegsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Rename fw-device-cdev.c to fw-cdev.c and move header to include/linux.Kristian Høgsberg2007-04-30
| | | | | Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Future proof the iso ioctls by adding a handle for the iso context.Kristian Høgsberg2007-04-30
| | | | | | | | Currently create context always returns 0 and the other iso ioctls will expect user space to pass that in for subsequent ioctls. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Add read/write and size annotations to IOC numbers.Kristian Høgsberg2007-04-30
| | | | | | | | Also, with this change, refactor ioctl dispatch code to do the copying from and to user space as indicated by the IOC annotations. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: don't use extern on public symbolsRandy Dunlap2007-04-26
| | | | | | | | | | Make firewire entry points not 'extern': drivers/firewire/fw-device.c:160:25: warning: function 'fw_device_get' with external linkage has definition drivers/firewire/fw-device.c:167:13: warning: function 'fw_device_put' with external linkage has definition Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: fw-device printk fixAndrew Morton2007-04-26
| | | | | | | You don't know what type is used to implement u64. Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Don't use subsystem rwsem, it's going away.Kristian Høgsberg2007-04-17
| | | | | Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Do an agent reset on error recovery.Kristian Høgsberg2007-04-11
| | | | | | | | Signed-off-by: Kristian Høgsberg <krh@redhat.com> (Reverted part which moved it from eh_abort_handler to eh_host_reset_handler) Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Only free ORBs that completed the initial transaction.Kristian Høgsberg2007-04-11
| | | | | | | | | | | | | In some situations we can receive the ORB status write before we have received the ORB pointer write response. When this happens, we assume that the fw_transaction is finished and free the ORB struct containing the fw_transaction. This fix make the status write logic only accept status writes for ORBs where the initial ORB pointer write transaction finished. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Forward SAM status codes to the scsi stack.Kristian Høgsberg2007-04-11
| | | | | | | | Or the SAM status codes from the device sense data into the command error code. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Check for CONTEXT_RUN not CONTEXT_ACTIVE when starting AT DMA context.Kristian Høgsberg2007-04-11
| | | | | | | Doh, bad typo... Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Byteswap iso header so all headers are presented as be32.Kristian Høgsberg2007-04-11
| | | | | Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Fix start on cycle 0 for IT, implement start on cycle for IR.Kristian Høgsberg2007-03-28
| | | | | Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Fix the range check for the queue_iso payload pointer.Kristian Høgsberg2007-03-28
| | | | | Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (renamed a variable)
* firewire: Increase the number of config rom retries and the retry delay.Kristian Høgsberg2007-03-28
| | | | | | | | | | | | Some devices have a really long power-on cycle, and we fail to successfully probe these if they're plugged in and then turned on. There's really no down-side to bumping the number of retries and the retry delay, and most devices will get picked up within the first couple of retries anyway. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Don't set card->irm_node before we have a new valid topology.Kristian Høgsberg2007-03-28
| | | | | | | | | | In case the topology build fails, we want to retain the old topology info until another reset finishes and results in a valid new tree. If we clear card->irm_node to NULL and the topology build fails, we end up dereferencing a NULL pointer in a few places. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Generalize resource tracking for cdev implementation.Kristian Høgsberg2007-03-28
| | | | | | | | Generalize the way we keep track of the various resources and assign a unique handle to each resource. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Add ioctls to add and remove config rom descriptors.Kristian Høgsberg2007-03-28
| | | | | Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (fixed whitespace)
* firewire: Streamline userspace interface structs.Kristian Høgsberg2007-03-28
| | | | | | | | | | | Make event struct layout common part include the closure and add a union for all event types; provide a mechanism for setting the bus reset event closure. Shuffle struct fw_cdev_queue_iso fields around to be 64-bit safe. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Remember to set the driver_data pointer when queueing a packet.Kristian Høgsberg2007-03-28
| | | | | Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Use device->groups for adding device attributes.Kristian Høgsberg2007-03-28
| | | | | | | | | We dynamically create an attribute group for the key present on the device in hand and point device->group to it. This way the device core adds the sysfs attributes for us as the device is added. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Add phy register defines.Marc Butler2007-03-24
| | | | | | Signed-off-by: Marc Butler <marc@adaptivecode.com> Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (added whitespace)
* firewire: Export GUID as sysfs attribute.Kristian Høgsberg2007-03-21
| | | | | Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Add sysfs attributes for config rom directory values.Kristian Høgsberg2007-03-21
| | | | | | | | We export the entire config rom, so this is technically redundant, but should make udev rules and HAL integration easier. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Make use of struct device_type.Kristian Høgsberg2007-03-21
| | | | | | | | | The device_type struct is useful for setting attributes for a device and overriding .release and .uevent for a group of devices. This patch uses it this way to clean up the sysfs code a bit. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: ROM cache is CPU-endianStefan Richter2007-03-20
| | | | | | Puts a stray endian annotation down. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: fix compiler warnings on 64bitStefan Richter2007-03-20
| | | | | Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Kristian Høgsberg <krh@redhat.com>
* firewire: add includes for sem and rw_semStefan Richter2007-03-20
| | | | | | as a precaution. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Grab dev->sem when doing the update callback.Kristian Høgsberg2007-03-20
| | | | | | | | | This serializes the update callback with the probe and remove callback from the driver core and prevents remove from being called while update is running for the same device. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: rename CONFIG_FW to CONFIG_FIREWIREStefan Richter2007-03-20
| | | | | | | to avoid confusion with CONFIG_FW_LOADER. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Acked-by: Kristian Høgsberg <krh@redhat.com>
* firewire: Add ref-counting for sbp2_device and hold a ref while we have work ↵Kristian Høgsberg2007-03-15
| | | | | | | scheduled. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Free pending transactions on cdev release.Kristian Høgsberg2007-03-15
| | | | | Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Zero out sd->scsi_host if we fail to register with the SCSI stack.Kristian Høgsberg2007-03-15
| | | | | Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Implement deallocation of address ranges.Kristian Høgsberg2007-03-15
| | | | | Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Move sync and tag parameters to start_iso ioctl.Kristian Høgsberg2007-03-15
| | | | | | | | | Setting these at create_context time or start_iso time doesn't matter much, but raw1394 sets them at start_iso time so that will be easier to emulate this way. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Fix dualbuffer iso receive mode and drop buffer fill mode.Kristian Høgsberg2007-03-15
| | | | | | | | | The dualbuffer DMA setup did not account for the iso trailer word and thus didn't work correctly. With this fixed we can drop the dual buffer fallback mode. Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: Implement CSR cycle time and bus time registers.Kristian Høgsberg2007-03-09
| | | | | Signed-off-by: Kristian Høgsberg <krh@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>