Diff for /src/sys/dev/disk/ata/ata-disk.c between versions 1.10 and 1.11

version 1.10, 2004/02/18 00:37:08 version 1.11, 2004/02/18 00:50:00
Line 180  ad_attach(struct ata_device *atadev, int Line 180  ad_attach(struct ata_device *atadev, int
   
     /* use DMA if allowed and if drive/controller supports it */      /* use DMA if allowed and if drive/controller supports it */
     if (ata_dma)      if (ata_dma)
        ata_dmainit(atadev->channel, atadev->unit, ata_pmode(atadev->param),         ata_dmainit(atadev, ata_pmode(atadev->param), 
                     ata_wmode(atadev->param), ata_umode(atadev->param));                      ata_wmode(atadev->param), ata_umode(atadev->param));
     else      else
        ata_dmainit(atadev->channel, atadev->unit,        ata_dmainit(atadev, ata_pmode(atadev->param), -1, -1);
                    ata_pmode(atadev->param), -1, -1); 
   
     /* use tagged queueing if allowed and supported */      /* use tagged queueing if allowed and supported */
     if (ata_tags && ad_tagsupported(adp)) {      if (ata_tags && ad_tagsupported(adp)) {
Line 613  ad_interrupt(struct ad_request *request) Line 612  ad_interrupt(struct ad_request *request)
   
     /* finish DMA transfer */      /* finish DMA transfer */
     if (request->flags & ADR_F_DMA_USED)      if (request->flags & ADR_F_DMA_USED)
        dma_stat = ata_dmadone(adp->device->channel);        dma_stat = ata_dmadone(adp->device);
   
     /* do we have a corrected soft error ? */      /* do we have a corrected soft error ? */
     if (adp->device->channel->status & ATA_S_CORR)      if (adp->device->channel->status & ATA_S_CORR)
Line 640  ad_interrupt(struct ad_request *request) Line 639  ad_interrupt(struct ad_request *request)
             if (request->retries++ < AD_MAX_RETRIES)              if (request->retries++ < AD_MAX_RETRIES)
                 printf(" retrying\n");                  printf(" retrying\n");
             else {              else {
                ata_dmainit(adp->device->channel, adp->device->unit,                 ata_dmainit(adp->device, ata_pmode(adp->device->param), -1, -1);
                            ata_pmode(adp->device->param), -1, -1); 
                 printf(" falling back to PIO mode\n");                  printf(" falling back to PIO mode\n");
             }              }
             TAILQ_INSERT_HEAD(&adp->device->channel->ata_queue, request, chain);              TAILQ_INSERT_HEAD(&adp->device->channel->ata_queue, request, chain);
Line 652  ad_interrupt(struct ad_request *request) Line 650  ad_interrupt(struct ad_request *request)
         if (request->flags & ADR_F_DMA_USED) {          if (request->flags & ADR_F_DMA_USED) {
             untimeout((timeout_t *)ad_timeout, request,request->timeout_handle);              untimeout((timeout_t *)ad_timeout, request,request->timeout_handle);
             ad_invalidatequeue(adp, request);              ad_invalidatequeue(adp, request);
            ata_dmainit(adp->device->channel, adp->device->unit,            ata_dmainit(adp->device, ata_pmode(adp->device->param), -1, -1);
                        ata_pmode(adp->device->param), -1, -1); 
             request->flags |= ADR_F_FORCE_PIO;              request->flags |= ADR_F_FORCE_PIO;
             printf(" trying PIO mode\n");              printf(" trying PIO mode\n");
             TAILQ_INSERT_HEAD(&adp->device->channel->ata_queue, request, chain);              TAILQ_INSERT_HEAD(&adp->device->channel->ata_queue, request, chain);
Line 896  ad_timeout(struct ad_request *request) Line 893  ad_timeout(struct ad_request *request)
                request->tag, request->serv);                 request->tag, request->serv);
   
     if (request->flags & ADR_F_DMA_USED) {      if (request->flags & ADR_F_DMA_USED) {
        ata_dmadone(adp->device->channel);        ata_dmadone(adp->device);
         ad_invalidatequeue(adp, request);          ad_invalidatequeue(adp, request);
         if (request->retries == AD_MAX_RETRIES) {          if (request->retries == AD_MAX_RETRIES) {
            ata_dmainit(adp->device->channel, adp->device->unit,            ata_dmainit(adp->device, ata_pmode(adp->device->param), -1, -1);
                        ata_pmode(adp->device->param), -1, -1); 
             ata_prtdev(adp->device, "trying fallback to PIO mode\n");              ata_prtdev(adp->device, "trying fallback to PIO mode\n");
             request->retries = 0;              request->retries = 0;
         }          }
Line 931  ad_reinit(struct ata_device *atadev) Line 927  ad_reinit(struct ata_device *atadev)
     ata_command(atadev, ATA_C_SET_MULTI, 0,      ata_command(atadev, ATA_C_SET_MULTI, 0,
                 adp->transfersize / DEV_BSIZE, 0, ATA_WAIT_READY);                  adp->transfersize / DEV_BSIZE, 0, ATA_WAIT_READY);
     if (adp->device->mode >= ATA_DMA)      if (adp->device->mode >= ATA_DMA)
        ata_dmainit(atadev->channel, atadev->unit,        ata_dmainit(atadev, ata_pmode(adp->device->param),
                    ata_pmode(adp->device->param), 
                     ata_wmode(adp->device->param),                      ata_wmode(adp->device->param),
                     ata_umode(adp->device->param));                      ata_umode(adp->device->param));
     else      else
        ata_dmainit(atadev->channel, atadev->unit,        ata_dmainit(atadev, ata_pmode(adp->device->param), -1, -1);
                    ata_pmode(adp->device->param), -1, -1); 
 }  }
   
 void  void

Removed from v.1.10  
changed lines
  Added in v.1.11