06 Dec, 2006

1 commit


05 Dec, 2006

1 commit


03 Dec, 2006

3 commits


02 Dec, 2006

6 commits


28 Nov, 2006

2 commits


22 Nov, 2006

1 commit

  • Pass the work_struct pointer to the work function rather than context data.
    The work function can use container_of() to work out the data.

    For the cases where the container of the work_struct may go away the moment the
    pending bit is cleared, it is made possible to defer the release of the
    structure by deferring the clearing of the pending bit.

    To make this work, an extra flag is introduced into the management side of the
    work_struct. This governs auto-release of the structure upon execution.

    Ordinarily, the work queue executor would release the work_struct for further
    scheduling or deallocation by clearing the pending bit prior to jumping to the
    work function. This means that, unless the driver makes some guarantee itself
    that the work_struct won't go away, the work function may not access anything
    else in the work_struct or its container lest they be deallocated.. This is a
    problem if the auxiliary data is taken away (as done by the last patch).

    However, if the pending bit is *not* cleared before jumping to the work
    function, then the work function *may* access the work_struct and its container
    with no problems. But then the work function must itself release the
    work_struct by calling work_release().

    In most cases, automatic release is fine, so this is the default. Special
    initiators exist for the non-auto-release case (ending in _NAR).

    Signed-Off-By: David Howells

    David Howells
     

14 Nov, 2006

1 commit

  • A curious thing happens, however, when ata_qc_new_init fails to get
    an ata_queued_cmd:

    First, ata_qc_new_init handles the failure like this:
    cmd->result = (DID_OK << 16) | (QUEUE_FULL << 1);
    done(cmd);

    Then, we return to ata_scsi_translate and do this:
    err_mem:
    cmd->result = (DID_ERROR << 16);
    done(cmd);

    It appears to me that first we set a status code indicating that we're
    ok but the device queue is full and finish the command, but then
    we blow away that status code and replace it with an error flag and
    finish the command a second time! That does not seem to be desirable
    behavior since we merely want the I/O to wait until a command slot
    frees up, not send errors up the block layer.

    In the err_mem case, we should simply exit out of ata_scsi_translate
    instead.

    Signed-off-by: Darrick J. Wong
    Signed-off-by: Jeff Garzik

    Darrick J. Wong
     

11 Oct, 2006

1 commit

  • Make the HDIO_DRIVE_CMD ioctl in libata (ATA command pass through) return a
    few ATA registers to userspace, following the same convention as the
    drivers/ide implementation of the same ioctl. This is needed to support ATA
    commands like CHECK POWER MODE, which return information in nsectors.

    This fixes "hdparm -C" on SATA drives.

    Forcing the sense data read via the cc flag causes spurious check conditions,
    so we filter these out (following the ATA command pass-through specification
    T10/04-262r7).

    Signed-off-by: Eran Tromer
    Acked-by: Tejun Heo
    Cc: Jeff Garzik
    Signed-off-by: Andrew Morton
    Signed-off-by: Jeff Garzik

    Eran Tromer
     

30 Sep, 2006

1 commit


29 Sep, 2006

1 commit


24 Aug, 2006

1 commit

  • The biggest change is that ata_host_set is renamed to ata_host.

    * ata_host_set => ata_host
    * ata_probe_ent->host_flags => ata_probe_ent->port_flags
    * ata_probe_ent->host_set_flags => ata_probe_ent->_host_flags
    * ata_host_stats => ata_port_stats
    * ata_port->host => ata_port->scsi_host
    * ata_port->host_set => ata_port->host
    * ata_port_info->host_flags => ata_port_info->flags
    * ata_(.*)host_set(.*)\(\) => ata_\1host\2()

    The leading underscore in ata_probe_ent->_host_flags is to avoid
    reusing ->host_flags for different purpose. Currently, the only user
    of the field is libata-bmdma.c and probe_ent itself is scheduled to be
    removed.

    ata_port->host is reused for different purpose but this field is used
    inside libata core proper and of different type.

    Signed-off-by: Tejun Heo
    Signed-off-by: Jeff Garzik

    Jeff Garzik
     

10 Aug, 2006

1 commit