]> err.no Git - linux-2.6/blobdiff - drivers/scsi/sata_qstor.c
Merge branch 'master'
[linux-2.6] / drivers / scsi / sata_qstor.c
index 2afbeb77f6fea62f9492ce0681b28bd9f59cd42a..259c2dec4e21f6f26ec30654b8d235a52dd01a3c 100644 (file)
@@ -41,7 +41,7 @@
 #include <linux/libata.h>
 
 #define DRV_NAME       "sata_qstor"
-#define DRV_VERSION    "0.05"
+#define DRV_VERSION    "0.06"
 
 enum {
        QS_PORTS                = 4,
@@ -132,11 +132,9 @@ static struct scsi_host_template qs_ata_sht = {
        .name                   = DRV_NAME,
        .ioctl                  = ata_scsi_ioctl,
        .queuecommand           = ata_scsi_queuecmd,
-       .eh_strategy_handler    = ata_scsi_error,
        .can_queue              = ATA_DEF_QUEUE,
        .this_id                = ATA_SHT_THIS_ID,
        .sg_tablesize           = QS_MAX_PRD,
-       .max_sectors            = ATA_MAX_SECTORS,
        .cmd_per_lun            = ATA_SHT_CMD_PER_LUN,
        .emulated               = ATA_SHT_EMULATED,
        //FIXME .use_clustering         = ATA_SHT_USE_CLUSTERING,
@@ -276,8 +274,8 @@ static unsigned int qs_fill_sg(struct ata_queued_cmd *qc)
        unsigned int nelem;
        u8 *prd = pp->pkt + QS_CPB_BYTES;
 
-       assert(qc->__sg != NULL);
-       assert(qc->n_elem > 0);
+       WARN_ON(qc->__sg == NULL);
+       WARN_ON(qc->n_elem == 0 && qc->pad_len == 0);
 
        nelem = 0;
        ata_for_each_sg(sg, qc) {
@@ -397,7 +395,7 @@ static inline unsigned int qs_intr_pkt(struct ata_host_set *host_set)
                                        sff1, sff0, port_no, sHST, sDST);
                        handled = 1;
                        if (ap && !(ap->flags &
-                                   (ATA_FLAG_PORT_DISABLED|ATA_FLAG_NOINTR))) {
+                                   (ATA_FLAG_DISABLED|ATA_FLAG_NOINTR))) {
                                struct ata_queued_cmd *qc;
                                struct qs_port_priv *pp = ap->private_data;
                                if (!pp || pp->state != qs_state_pkt)
@@ -430,7 +428,7 @@ static inline unsigned int qs_intr_mmio(struct ata_host_set *host_set)
                struct ata_port *ap;
                ap = host_set->ports[port_no];
                if (ap &&
-                   !(ap->flags & (ATA_FLAG_PORT_DISABLED | ATA_FLAG_NOINTR))) {
+                   !(ap->flags & (ATA_FLAG_DISABLED | ATA_FLAG_NOINTR))) {
                        struct ata_queued_cmd *qc;
                        struct qs_port_priv *pp = ap->private_data;
                        if (!pp || pp->state != qs_state_mmio)