]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
Merge branch 'upstream'
authorJeff Garzik <jeff@garzik.org>
Sun, 12 Mar 2006 00:21:17 +0000 (19:21 -0500)
committerJeff Garzik <jeff@garzik.org>
Sun, 12 Mar 2006 00:21:17 +0000 (19:21 -0500)
1  2 
drivers/scsi/libata-core.c
drivers/scsi/sata_promise.c
include/linux/libata.h

index 9132698d29b821a94c127e3a15648a228b35c100,5a0b67a602df237ea5c9d4998d87712178749bbf..5060a1a1ad251dd35001b0f1e277e25b99fac345
@@@ -65,12 -65,8 +65,9 @@@ static unsigned int ata_dev_init_params
                                        struct ata_device *dev);
  static void ata_set_mode(struct ata_port *ap);
  static void ata_dev_set_xfermode(struct ata_port *ap, struct ata_device *dev);
- static unsigned int ata_get_mode_mask(const struct ata_port *ap, int shift);
- static int fgb(u32 bitmap);
- static int ata_choose_xfer_mode(const struct ata_port *ap,
-                               u8 *xfer_mode_out,
-                               unsigned int *xfer_shift_out);
 +static void ata_pio_error(struct ata_port *ap);
+ static unsigned int ata_dev_xfermask(struct ata_port *ap,
+                                    struct ata_device *dev);
  
  static unsigned int ata_unique_id = 1;
  static struct workqueue_struct *ata_wq;
@@@ -1128,21 -1265,17 +1266,22 @@@ static int ata_dev_configure(struct ata
                        }
  
                        /* print device info to dmesg */
-                       printk(KERN_INFO "ata%u: dev %u ATA-%d, max %s, %Lu sectors: CHS %d/%d/%d\n",
-                              ap->id, device,
-                              ata_id_major_version(dev->id),
-                              ata_mode_string(xfer_modes),
-                              (unsigned long long)dev->n_sectors,
-                              (int)dev->cylinders, (int)dev->heads, (int)dev->sectors);
+                       if (print_info)
+                               printk(KERN_INFO "ata%u: dev %u ATA-%d, "
+                                      "max %s, %Lu sectors: CHS %u/%u/%u\n",
+                                      ap->id, dev->devno,
+                                      ata_id_major_version(dev->id),
+                                      ata_mode_string(xfer_mask),
+                                      (unsigned long long)dev->n_sectors,
+                                      dev->cylinders, dev->heads, dev->sectors);
                }
  
 -              dev->cdb_len = 16;
 +              if (dev->id[59] & 0x100) {
 +                      dev->multi_count = dev->id[59] & 0xff;
 +                      DPRINTK("ata%u: dev %u multi count %u\n",
 +                              ap->id, device, dev->multi_count);
 +              }
 +
        }
  
        /* ATAPI-specific feature tests */
                }
                dev->cdb_len = (unsigned int) rc;
  
 +              if (ata_id_cdb_intr(dev->id))
 +                      dev->flags |= ATA_DFLAG_CDB_INTR;
 +
                /* print device info to dmesg */
-               printk(KERN_INFO "ata%u: dev %u ATAPI, max %s\n",
-                      ap->id, device,
-                      ata_mode_string(xfer_modes));
+               if (print_info)
+                       printk(KERN_INFO "ata%u: dev %u ATAPI, max %s\n",
+                              ap->id, dev->devno, ata_mode_string(xfer_mask));
        }
  
        ap->host->max_cmd_len = 0;
@@@ -3998,62 -3995,32 +4210,62 @@@ unsigned int ata_qc_issue_prot(struct a
                ap->ops->tf_load(ap, &qc->tf);   /* load tf registers */
                ap->ops->bmdma_setup(qc);           /* set up bmdma */
                ap->ops->bmdma_start(qc);           /* initiate bmdma */
 +              ap->hsm_task_state = HSM_ST_LAST;
                break;
  
 -      case ATA_PROT_PIO: /* load tf registers, initiate polling pio */
 -              ata_qc_set_polling(qc);
 -              ata_tf_to_host(ap, &qc->tf);
 -              ap->hsm_task_state = HSM_ST;
 -              ata_port_queue_task(ap, ata_pio_task, ap, 0);
 -              break;
 +      case ATA_PROT_PIO:
 +              if (qc->tf.flags & ATA_TFLAG_POLLING)
 +                      ata_qc_set_polling(qc);
  
 -      case ATA_PROT_ATAPI:
 -              ata_qc_set_polling(qc);
                ata_tf_to_host(ap, &qc->tf);
 -              ata_port_queue_task(ap, atapi_packet_task, ap, 0);
 +
 +              if (qc->tf.flags & ATA_TFLAG_WRITE) {
 +                      /* PIO data out protocol */
 +                      ap->hsm_task_state = HSM_ST_FIRST;
-                       ata_queue_pio_task(ap);
++                      ata_port_queue_task(ap, ata_pio_task, ap, 0);
 +
 +                      /* always send first data block using
 +                       * the ata_pio_task() codepath.
 +                       */
 +              } else {
 +                      /* PIO data in protocol */
 +                      ap->hsm_task_state = HSM_ST;
 +
 +                      if (qc->tf.flags & ATA_TFLAG_POLLING)
-                               ata_queue_pio_task(ap);
++                              ata_port_queue_task(ap, ata_pio_task, ap, 0);
 +
 +                      /* if polling, ata_pio_task() handles the rest.
 +                       * otherwise, interrupt handler takes over from here.
 +                       */
 +              }
 +
                break;
  
 +      case ATA_PROT_ATAPI:
        case ATA_PROT_ATAPI_NODATA:
 -              ap->flags |= ATA_FLAG_NOINTR;
 +              if (qc->tf.flags & ATA_TFLAG_POLLING)
 +                      ata_qc_set_polling(qc);
 +
                ata_tf_to_host(ap, &qc->tf);
 -              ata_port_queue_task(ap, atapi_packet_task, ap, 0);
 +
 +              ap->hsm_task_state = HSM_ST_FIRST;
 +
 +              /* send cdb by polling if no cdb interrupt */
 +              if ((!(qc->dev->flags & ATA_DFLAG_CDB_INTR)) ||
 +                  (qc->tf.flags & ATA_TFLAG_POLLING))
-                       ata_queue_pio_task(ap);
++                      ata_port_queue_task(ap, atapi_packet_task, ap, 0);
                break;
  
        case ATA_PROT_ATAPI_DMA:
 -              ap->flags |= ATA_FLAG_NOINTR;
 +              WARN_ON(qc->tf.flags & ATA_TFLAG_POLLING);
 +
                ap->ops->tf_load(ap, &qc->tf);   /* load tf registers */
                ap->ops->bmdma_setup(qc);           /* set up bmdma */
 -              ata_port_queue_task(ap, atapi_packet_task, ap, 0);
 +              ap->hsm_task_state = HSM_ST_FIRST;
 +
 +              /* send cdb by polling if no cdb interrupt */
 +              if (!(qc->dev->flags & ATA_DFLAG_CDB_INTR))
-                       ata_queue_pio_task(ap);
++                      ata_port_queue_task(ap, atapi_packet_task, ap, 0);
                break;
  
        default:
Simple merge
Simple merge