]> err.no Git - linux-2.6/blobdiff - drivers/scsi/qla2xxx/qla_gs.c
Merge branch 'for-linus' of git://git.o-hand.com/linux-mfd
[linux-2.6] / drivers / scsi / qla2xxx / qla_gs.c
index e6578ce34ecd0275a1e366849d06e8c56204e35c..c2a4bfbcb05bc2ecf4ffa7a20d763ea7d86bf4b9 100644 (file)
@@ -1532,7 +1532,7 @@ qla2x00_fdmi_rpa(scsi_qla_host_t *ha)
                eiter->a.sup_speed = __constant_cpu_to_be32(
                    FDMI_PORT_SPEED_1GB|FDMI_PORT_SPEED_2GB|
                    FDMI_PORT_SPEED_4GB|FDMI_PORT_SPEED_8GB);
-       else if (IS_QLA24XX(ha) || IS_QLA54XX(ha))
+       else if (IS_QLA24XX_TYPE(ha))
                eiter->a.sup_speed = __constant_cpu_to_be32(
                    FDMI_PORT_SPEED_1GB|FDMI_PORT_SPEED_2GB|
                    FDMI_PORT_SPEED_4GB);
@@ -1583,8 +1583,8 @@ qla2x00_fdmi_rpa(scsi_qla_host_t *ha)
        eiter->type = __constant_cpu_to_be16(FDMI_PORT_MAX_FRAME_SIZE);
        eiter->len = __constant_cpu_to_be16(4 + 4);
        max_frame_size = IS_FWI2_CAPABLE(ha) ?
-               (uint32_t) icb24->frame_payload_size:
-               (uint32_t) ha->init_cb->frame_payload_size;
+           le16_to_cpu(icb24->frame_payload_size):
+           le16_to_cpu(ha->init_cb->frame_payload_size);
        eiter->a.max_frame_size = cpu_to_be32(max_frame_size);
        size += 4 + 4;
 
@@ -1661,6 +1661,12 @@ qla2x00_fdmi_register(scsi_qla_host_t *ha)
 {
        int rval;
 
+       if (IS_QLA2100(ha) || IS_QLA2200(ha)) {
+               DEBUG2(printk("scsi(%ld): FDMI unsupported on "
+                   "ISP2100/ISP2200.\n", ha->host_no));
+               return QLA_SUCCESS;
+       }
+
        rval = qla2x00_mgmt_svr_login(ha);
        if (rval)
                return rval;
@@ -1841,8 +1847,10 @@ qla2x00_gpsc(scsi_qla_host_t *ha, sw_info_t *list)
                    "GPSC")) != QLA_SUCCESS) {
                        /* FM command unsupported? */
                        if (rval == QLA_INVALID_COMMAND &&
-                           ct_rsp->header.reason_code ==
-                           CT_REASON_INVALID_COMMAND_CODE) {
+                           (ct_rsp->header.reason_code ==
+                               CT_REASON_INVALID_COMMAND_CODE ||
+                            ct_rsp->header.reason_code ==
+                               CT_REASON_COMMAND_UNSUPPORTED)) {
                                DEBUG2(printk("scsi(%ld): GPSC command "
                                    "unsupported, disabling query...\n",
                                    ha->host_no));