Changeset b9c38ed in rtems for c/src/libchip/ide/ata.c


Ignore:
Timestamp:
Jul 3, 2008, 1:34:27 AM (11 years ago)
Author:
Chris Johns <chrisj@…>
Branches:
4.10, 4.11, 4.9, master
Children:
72d2ec4d
Parents:
e806f13e
Message:

2008-07-03 Chris Johns <chrisj@…>

  • ata.c: Change to the Chains API.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/libchip/ide/ata.c

    re806f13e rb9c38ed  
    5050typedef struct {
    5151  rtems_irq_number name;
    52   Chain_Control irq_chain;
     52  rtems_chain_control irq_chain;
    5353} ata_irq_chain_t;
    5454
     
    121121#if defined (ATA_USE_OLD_EXCEPTIONS)
    122122/* Mapping of interrupt vectors to devices */
    123 static Chain_Control ata_int_vec[ATA_MAX_RTEMS_INT_VEC_NUMBER + 1];
     123static rtems_chain_control ata_int_vec[ATA_MAX_RTEMS_INT_VEC_NUMBER + 1];
    124124#endif
    125125
     
    427427
    428428    /* if no requests to controller then do nothing */
    429     if (Chain_Is_empty(&ata_ide_ctrls[ctrl_minor].reqs))
     429    if (rtems_chain_is_empty(&ata_ide_ctrls[ctrl_minor].reqs))
    430430        return;
    431431
     
    528528    DISABLE_PREEMPTION(key);
    529529    ATA_EXEC_CALLBACK(areq, status, error);
    530     Chain_Extract(&areq->link);
    531 
    532     if (!Chain_Is_empty(&ata_ide_ctrls[ctrl_minor].reqs))
     530    rtems_chain_extract(&areq->link);
     531
     532    if (!rtems_chain_is_empty(&ata_ide_ctrls[ctrl_minor].reqs))
    533533    {
    534534        ENABLE_PREEMPTION(key);
     
    578578                            ata_req_t                 *areq)
    579579{
    580     Chain_Append(&ata_ide_ctrls[ctrl_minor].reqs, &areq->link);
    581     if (Chain_Has_only_one_node(&ata_ide_ctrls[ctrl_minor].reqs))
     580    rtems_chain_append(&ata_ide_ctrls[ctrl_minor].reqs, &areq->link);
     581    if (rtems_chain_has_only_one_node(&ata_ide_ctrls[ctrl_minor].reqs))
    582582    {
    583583
     
    616616ata_interrupt_handler(rtems_vector_number vec)
    617617{
    618     Chain_Node      *the_node = ((Chain_Control *)(&ata_int_vec[vec]))->first;
     618    rtems_chain_node *the_node = ((rtems_chain_control *)(&ata_int_vec[vec]))->first;
    619619    ata_queue_msg_t  msg;
    620620    uint16_t         byte; /* emphasize that only 8 low bits is meaningful */
    621621
    622     for ( ; !Chain_Is_tail(&ata_int_vec[vec], the_node) ; )
     622    for ( ; !rtems_chain_is_tail(&ata_int_vec[vec], the_node) ; )
    623623    {
    624624        /* if (1) - is temporary hack - currently I don't know how to identify
     
    641641{
    642642  int ata_irq_chain_index = (int) handle;
    643     Chain_Node      *the_node =
     643    rtems_chain_node *the_node =
    644644      ata_irq_chain[ata_irq_chain_index].irq_chain.last;
    645645    ata_queue_msg_t  msg;
     
    647647
    648648
    649     for ( ; !Chain_Is_tail(&ata_irq_chain[ata_irq_chain_index].irq_chain,
     649    for ( ; !rtems_chain_is_tail(&ata_irq_chain[ata_irq_chain_index].irq_chain,
    650650                           the_node) ; )
    651651    {
     
    10931093    /* prepare ATA driver for handling  interrupt driven devices */
    10941094    for (i = 0; i < ATA_MAX_RTEMS_INT_VEC_NUMBER; i++)
    1095         Chain_Initialize_empty(&ata_int_vec[i]);
     1095        rtems_chain_initialize_empty(&ata_int_vec[i]);
    10961096#else
    10971097    for (i = 0; i < ATA_IRQ_CHAIN_MAX_CNT; i++) {
    1098       Chain_Initialize_empty(&(ata_irq_chain[i].irq_chain));
     1098      rtems_chain_initialize_empty(&(ata_irq_chain[i].irq_chain));
    10991099    }
    11001100#endif
     
    11221122    if (IDE_Controller_Table[ctrl_minor].status == IDE_CTRL_INITIALIZED)
    11231123    {
    1124         Chain_Initialize_empty(&ata_ide_ctrls[ctrl_minor].reqs);
     1124        rtems_chain_initialize_empty(&ata_ide_ctrls[ctrl_minor].reqs);
    11251125
    11261126        if (IDE_Controller_Table[ctrl_minor].int_driven == TRUE)
     
    11901190            }
    11911191#if defined(ATA_USE_OLD_EXCEPTIONS)
    1192             Chain_Append(
     1192            rtems_chain_append(
    11931193                &ata_int_vec[IDE_Controller_Table[ctrl_minor].int_vec],
    11941194                &int_st->link);
    11951195#else
    1196             Chain_Append(
     1196            rtems_chain_append(
    11971197                &(ata_irq_chain[ata_irq_chain_use].irq_chain),
    11981198                &int_st->link);
Note: See TracChangeset for help on using the changeset viewer.