08 Dec, 2006

13 commits


08 Oct, 2006

1 commit

  • Revert a thinko in commit d2f119fe319528da8c76a1107459d6f478cbf28c:
    When knodemgrd starts, it needs to sleep until host->generation was
    incremented above its initial value of 0. My wrong logic caused it to
    start sending requests when the bus wasn't completely ready. Seen as
    "AT dma reset ctx=0, aborting transmission" messages in 2.6.19-rc1.

    Signed-off-by: Stefan Richter

    Stefan Richter
     

18 Sep, 2006

3 commits

  • nodemgr_resume_ne was iterating over nodemgr_ud_class.children without
    protection by nodemgr_ud_class.subsys.rwsem.

    FIXME:
    Shouldn't we rather use class->sem there, not class->subsys.rwsem?

    Signed-off-by: Stefan Richter

    Stefan Richter
     
  • nodemgr_update_pdrv grabbed an rw semaphore (as reader) which was
    already taken by its caller's caller, nodemgr_probe_ne (as reader too).
    Reported by Miles Lane, call path pointed out by Arjan van de Ven.

    FIXME:
    Shouldn't we rather use class->sem there, not class->subsys.rwsem?

    Signed-off-by: Stefan Richter

    Stefan Richter
     
  • This patch reduces the size of struct hpsb_host and also removes
    semaphores from ieee1394_transactions.c. On i386, struct hpsb_host
    shrinks from 10656 bytes to 6688 bytes. This is accomplished by
    - using a single wait_queue for hpsb_get_tlabel instead of many
    instances of semaphores,
    - using a single lock to serialize access to all tlabel pools (the
    protected code regions are small, i.e. lock contention very low),
    - omitting the sysfs attribute tlabels_allocations.

    Drawback: In the rare case that a process needs to sleep because all
    transaction labels for the node are temporarily exhausted, it is also
    woken up if a tlabel for a different node became free, checks for an
    available tlabel, and is put to sleep again. The check is not costly
    and the situation occurs extremely rarely. (Tlabels are typically
    only exhausted if there was no context switch to the khpsbpkt thread
    which recycles tlables.) Therefore the benefit of reduced tpool size
    outweighs this drawback.

    The sysfs attributes tlabels_free and tlabels_mask are not compiled
    anymore unless CONFIG_IEEE1394_VERBOSEDEBUG is set.

    The by far biggest member of struct hpsb_host, the struct csr_control
    csr (5272 bytes on i386), is now placed at the end of struct hpsb_host.

    Note, hpsb_get_tlabel calls the macro wait_event_interruptible with a
    condition argument which has a side effect (allocation of a tlabel and
    manipulation of the packet). This side effect happens only if the
    condition is true. The patch relies on wait_event_interruptible not
    evaluating the condition again after it became true.

    Signed-off-by: Stefan Richter

    Stefan Richter
     

04 Jul, 2006

6 commits


03 Jul, 2006

1 commit

  • If ieee1394.h::IEEE1394_SPEED_MAX is bigger than the actual speed of an
    1394b host adapter and the speed to another 1394b node was probed, a
    bigger speed than actually used was kept in host->speed[n]. The only
    resulting problem so far was sbp2 displaying bogus values in the syslog,
    e.g. S3200 for actual S800 connections if IEEE1394_SPEED_MAX was S3200.
    But other high-level drivers which access this field could get into more
    trouble. (Eth1394 is the only other in-tree driver which does so. It
    seems it is not affected.)

    Nodemgr now clips this value according to the host adapter's link speed.

    A pointer expression in nodemgr_check_speed is also changed for clarity.

    Signed-off-by: Stefan Richter
    Signed-off-by: Ben Collins

    Stefan Richter
     

01 Jul, 2006

1 commit


26 Jun, 2006

1 commit


13 Jun, 2006

1 commit

  • Add support for the following types of hardware:
    + nodes that have a link speed < PHY speed
    + 1394b PHYs that are less than S800 capable
    + 1394b/1394a adapter cable between two 1394b PHYs
    Also, S1600 and S3200 are now supported if IEEE1394_SPEED_MAX is raised.

    A probing function is added to nodemgr's config ROM fetching routine
    which adjusts the allowable speed if an access problem was encountered.
    Pros and Cons of the approach:
    + minimum code footprint to support this less widely used hardware
    + nearly no overhead for unaffected hardware
    - ineffective before nodemgr began to read the ROM of affected nodes
    - ineffective if ieee1394 is loaded with disable_nodemgr=1
    The speed map CSRs which are published to the bus are not touched by the
    patch.

    Signed-off-by: Stefan Richter
    Cc: Hakan Ardo
    Cc: Calculex
    Cc: Robert J. Kosinski
    Signed-off-by: Ben Collins

    Ben Collins
     

05 Jan, 2006

2 commits


13 Dec, 2005

3 commits

  • Some old 1394-1995 SBP-2 bridges would hang if they received a broadcast write
    request to BROADCAST_CHANNEL before the config ROM was read. Affected devices
    include Datafab MD2-FW2 2.5" HDD and SmartDisk VST FWCDRW-V8 portable CD writer.
    The write request is now directed to specific nodes instead of being broadcast
    to all nodes at once, and it is only performed if a previous read request at
    this register succeeded.

    Fixes an old interoperability problem which was perceived as a 2.6.14-specific
    regression: http://marc.theaimsgroup.com/?t=113190586800003

    Signed-off-by: Stefan Richter
    Signed-off-by: Jody McIntyre
    (cherry picked from 61c7f775ca25ccfc0e51486103a724fb1a3a08f2 commit)

    Stefan Richter
     
  • After initializing an IEEE 1394 host, broadcast a resume packet. This makes
    remote nodes visible which suspended their ports while the host was down.
    Such nodes had to be unplugged and replugged in order to be recognized.

    Motorola DCT6200 cable reciever was affected, probably other devices too.
    http://marc.theaimsgroup.com/?t=113202715800001

    Signed-off-by: Stefan Richter
    Signed-off-by: Jody McIntyre
    (cherry picked from 14c0fa243b358c24040ff5f44b60c47aaf6430c3 commit)

    Stefan Richter
     
  • After a bus reset, let nodemgr call high-level update hooks first for nodes
    which do not need to be probed. The main benefit is for a bus with more
    than one SBP-2 device: SBP-2 reconnects will be performed before SBP-2
    logins, thus have a much higher chance to succeed, and their SCSI devices
    will not be blocked much longer than necessary. This was demonstrated for
    Linux 2.4 by Dave Cinege a while ago.

    A better approach would be to perform time-consuming probes in parallel by a
    subthread. I actually plan to implement this for sbp2 but it may take a
    while to get that done and tested. Until then, this tweak is a huge
    improvement for users with multiple SBP-2 devices.

    Signed-off-by: Stefan Richter
    Signed-off-by: Jody McIntyre

    Stefan Richter
     

06 Dec, 2005

1 commit

  • Some old 1394-1995 SBP-2 bridges would hang if they received a broadcast write
    request to BROADCAST_CHANNEL before the config ROM was read. Affected devices
    include Datafab MD2-FW2 2.5" HDD and SmartDisk VST FWCDRW-V8 portable CD writer.
    The write request is now directed to specific nodes instead of being broadcast
    to all nodes at once, and it is only performed if a previous read request at
    this register succeeded.

    Fixes an old interoperability problem which was perceived as a 2.6.14-specific
    regression: http://marc.theaimsgroup.com/?t=113190586800003

    Signed-off-by: Stefan Richter
    Signed-off-by: Jody McIntyre

    Stefan Richter
     

02 Dec, 2005

2 commits


07 Nov, 2005

1 commit

  • dv1394, eth1394, ieee1394, ohci1394, pcilynx, raw1394, sbp2c, video1394:
    - use kzalloc
    - provide safer size arguments to kmalloc and kzalloc
    - omit some casts

    Signed-off-by: Stefan Richter
    Signed-off-by: Jody McIntyre

    Stefan Richter
     

29 Oct, 2005

1 commit

  • In PM v1, all devices were called at SUSPEND_DISABLE level. Then
    all devices were called at SUSPEND_SAVE_STATE level, and finally
    SUSPEND_POWER_DOWN level. However, with PM v2, to maintain
    compatibility for platform devices, I arranged for the PM v2
    suspend/resume callbacks to call the old PM v1 suspend/resume
    callbacks three times with each level in order so that existing
    drivers continued to work.

    Since this is obsolete infrastructure which is no longer necessary,
    we can remove it. Here's an (untested) patch to do exactly that.

    Signed-off-by: Russell King
    Signed-off-by: Greg Kroah-Hartman

    Russell King
     

01 Oct, 2005

2 commits

  • Skip a superfluous pause that occured when the config ROM of a node was
    scanned unsuccessfully. This also occurs if a node without link wrongly
    enables its "link active" self ID flag. A GWCTech 6-port hub does this.

    Signed-off-by: Stefan Richter
    Signed-off-by: Jody McIntyre
    Cc: Ben Collins
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jody McIntyre
     
  • Units were not detected if the local IRM performed a bus reset. ("The root
    node is not cycle master capable; selecting a new root node and resetting...",
    often seen with iPods and other SBP-2 devices). Rearrange the order of IRM
    duties and node scanning. TODO: Audit the ROM caching and parsing code for
    underlying issues.

    Signed-off-by: Stefan Richter
    Signed-off-by: Jody McIntyre
    Cc: Ben Collins
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jody McIntyre
     

08 Sep, 2005

1 commit