diff options
Diffstat (limited to 'drivers/scsi/qla2xxx')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_def.h | 13 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_init.c | 177 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_mbx.c | 16 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_os.c | 7 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_sup.c | 11 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_version.h | 2 |
6 files changed, 189 insertions, 37 deletions
diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h index 05f4f2a378eb..e8948b679f5b 100644 --- a/drivers/scsi/qla2xxx/qla_def.h +++ b/drivers/scsi/qla2xxx/qla_def.h | |||
@@ -1478,14 +1478,17 @@ typedef union { | |||
1478 | uint32_t b24 : 24; | 1478 | uint32_t b24 : 24; |
1479 | 1479 | ||
1480 | struct { | 1480 | struct { |
1481 | uint8_t d_id[3]; | 1481 | #ifdef __BIG_ENDIAN |
1482 | uint8_t rsvd_1; | 1482 | uint8_t domain; |
1483 | } r; | 1483 | uint8_t area; |
1484 | 1484 | uint8_t al_pa; | |
1485 | struct { | 1485 | #elif __LITTLE_ENDIAN |
1486 | uint8_t al_pa; | 1486 | uint8_t al_pa; |
1487 | uint8_t area; | 1487 | uint8_t area; |
1488 | uint8_t domain; | 1488 | uint8_t domain; |
1489 | #else | ||
1490 | #error "__BIG_ENDIAN or __LITTLE_ENDIAN must be defined!" | ||
1491 | #endif | ||
1489 | uint8_t rsvd_1; | 1492 | uint8_t rsvd_1; |
1490 | } b; | 1493 | } b; |
1491 | } port_id_t; | 1494 | } port_id_t; |
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index 98c01cd5e1a8..3e296ab845b6 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c | |||
@@ -11,6 +11,11 @@ | |||
11 | 11 | ||
12 | #include "qla_devtbl.h" | 12 | #include "qla_devtbl.h" |
13 | 13 | ||
14 | #ifdef CONFIG_SPARC | ||
15 | #include <asm/prom.h> | ||
16 | #include <asm/pbm.h> | ||
17 | #endif | ||
18 | |||
14 | /* XXX(hch): this is ugly, but we don't want to pull in exioctl.h */ | 19 | /* XXX(hch): this is ugly, but we don't want to pull in exioctl.h */ |
15 | #ifndef EXT_IS_LUN_BIT_SET | 20 | #ifndef EXT_IS_LUN_BIT_SET |
16 | #define EXT_IS_LUN_BIT_SET(P,L) \ | 21 | #define EXT_IS_LUN_BIT_SET(P,L) \ |
@@ -88,12 +93,7 @@ qla2x00_initialize_adapter(scsi_qla_host_t *ha) | |||
88 | 93 | ||
89 | qla_printk(KERN_INFO, ha, "Configure NVRAM parameters...\n"); | 94 | qla_printk(KERN_INFO, ha, "Configure NVRAM parameters...\n"); |
90 | 95 | ||
91 | rval = ha->isp_ops.nvram_config(ha); | 96 | ha->isp_ops.nvram_config(ha); |
92 | if (rval) { | ||
93 | DEBUG2(printk("scsi(%ld): Unable to verify NVRAM data.\n", | ||
94 | ha->host_no)); | ||
95 | return rval; | ||
96 | } | ||
97 | 97 | ||
98 | if (ha->flags.disable_serdes) { | 98 | if (ha->flags.disable_serdes) { |
99 | /* Mask HBA via NVRAM settings? */ | 99 | /* Mask HBA via NVRAM settings? */ |
@@ -1393,6 +1393,28 @@ qla2x00_set_model_info(scsi_qla_host_t *ha, uint8_t *model, size_t len, char *de | |||
1393 | } | 1393 | } |
1394 | } | 1394 | } |
1395 | 1395 | ||
1396 | /* On sparc systems, obtain port and node WWN from firmware | ||
1397 | * properties. | ||
1398 | */ | ||
1399 | static void qla2xxx_nvram_wwn_from_ofw(scsi_qla_host_t *ha, nvram_t *nv) | ||
1400 | { | ||
1401 | #ifdef CONFIG_SPARC | ||
1402 | struct pci_dev *pdev = ha->pdev; | ||
1403 | struct pcidev_cookie *pcp = pdev->sysdata; | ||
1404 | struct device_node *dp = pcp->prom_node; | ||
1405 | u8 *val; | ||
1406 | int len; | ||
1407 | |||
1408 | val = of_get_property(dp, "port-wwn", &len); | ||
1409 | if (val && len >= WWN_SIZE) | ||
1410 | memcpy(nv->port_name, val, WWN_SIZE); | ||
1411 | |||
1412 | val = of_get_property(dp, "node-wwn", &len); | ||
1413 | if (val && len >= WWN_SIZE) | ||
1414 | memcpy(nv->node_name, val, WWN_SIZE); | ||
1415 | #endif | ||
1416 | } | ||
1417 | |||
1396 | /* | 1418 | /* |
1397 | * NVRAM configuration for ISP 2xxx | 1419 | * NVRAM configuration for ISP 2xxx |
1398 | * | 1420 | * |
@@ -1409,6 +1431,7 @@ qla2x00_set_model_info(scsi_qla_host_t *ha, uint8_t *model, size_t len, char *de | |||
1409 | int | 1431 | int |
1410 | qla2x00_nvram_config(scsi_qla_host_t *ha) | 1432 | qla2x00_nvram_config(scsi_qla_host_t *ha) |
1411 | { | 1433 | { |
1434 | int rval; | ||
1412 | uint8_t chksum = 0; | 1435 | uint8_t chksum = 0; |
1413 | uint16_t cnt; | 1436 | uint16_t cnt; |
1414 | uint8_t *dptr1, *dptr2; | 1437 | uint8_t *dptr1, *dptr2; |
@@ -1417,6 +1440,8 @@ qla2x00_nvram_config(scsi_qla_host_t *ha) | |||
1417 | uint8_t *ptr = (uint8_t *)ha->request_ring; | 1440 | uint8_t *ptr = (uint8_t *)ha->request_ring; |
1418 | struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; | 1441 | struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; |
1419 | 1442 | ||
1443 | rval = QLA_SUCCESS; | ||
1444 | |||
1420 | /* Determine NVRAM starting address. */ | 1445 | /* Determine NVRAM starting address. */ |
1421 | ha->nvram_size = sizeof(nvram_t); | 1446 | ha->nvram_size = sizeof(nvram_t); |
1422 | ha->nvram_base = 0; | 1447 | ha->nvram_base = 0; |
@@ -1440,7 +1465,57 @@ qla2x00_nvram_config(scsi_qla_host_t *ha) | |||
1440 | qla_printk(KERN_WARNING, ha, "Inconsistent NVRAM detected: " | 1465 | qla_printk(KERN_WARNING, ha, "Inconsistent NVRAM detected: " |
1441 | "checksum=0x%x id=%c version=0x%x.\n", chksum, nv->id[0], | 1466 | "checksum=0x%x id=%c version=0x%x.\n", chksum, nv->id[0], |
1442 | nv->nvram_version); | 1467 | nv->nvram_version); |
1443 | return QLA_FUNCTION_FAILED; | 1468 | qla_printk(KERN_WARNING, ha, "Falling back to functioning (yet " |
1469 | "invalid -- WWPN) defaults.\n"); | ||
1470 | |||
1471 | /* | ||
1472 | * Set default initialization control block. | ||
1473 | */ | ||
1474 | memset(nv, 0, ha->nvram_size); | ||
1475 | nv->parameter_block_version = ICB_VERSION; | ||
1476 | |||
1477 | if (IS_QLA23XX(ha)) { | ||
1478 | nv->firmware_options[0] = BIT_2 | BIT_1; | ||
1479 | nv->firmware_options[1] = BIT_7 | BIT_5; | ||
1480 | nv->add_firmware_options[0] = BIT_5; | ||
1481 | nv->add_firmware_options[1] = BIT_5 | BIT_4; | ||
1482 | nv->frame_payload_size = __constant_cpu_to_le16(2048); | ||
1483 | nv->special_options[1] = BIT_7; | ||
1484 | } else if (IS_QLA2200(ha)) { | ||
1485 | nv->firmware_options[0] = BIT_2 | BIT_1; | ||
1486 | nv->firmware_options[1] = BIT_7 | BIT_5; | ||
1487 | nv->add_firmware_options[0] = BIT_5; | ||
1488 | nv->add_firmware_options[1] = BIT_5 | BIT_4; | ||
1489 | nv->frame_payload_size = __constant_cpu_to_le16(1024); | ||
1490 | } else if (IS_QLA2100(ha)) { | ||
1491 | nv->firmware_options[0] = BIT_3 | BIT_1; | ||
1492 | nv->firmware_options[1] = BIT_5; | ||
1493 | nv->frame_payload_size = __constant_cpu_to_le16(1024); | ||
1494 | } | ||
1495 | |||
1496 | nv->max_iocb_allocation = __constant_cpu_to_le16(256); | ||
1497 | nv->execution_throttle = __constant_cpu_to_le16(16); | ||
1498 | nv->retry_count = 8; | ||
1499 | nv->retry_delay = 1; | ||
1500 | |||
1501 | nv->port_name[0] = 33; | ||
1502 | nv->port_name[3] = 224; | ||
1503 | nv->port_name[4] = 139; | ||
1504 | |||
1505 | qla2xxx_nvram_wwn_from_ofw(ha, nv); | ||
1506 | |||
1507 | nv->login_timeout = 4; | ||
1508 | |||
1509 | /* | ||
1510 | * Set default host adapter parameters | ||
1511 | */ | ||
1512 | nv->host_p[1] = BIT_2; | ||
1513 | nv->reset_delay = 5; | ||
1514 | nv->port_down_retry_count = 8; | ||
1515 | nv->max_luns_per_target = __constant_cpu_to_le16(8); | ||
1516 | nv->link_down_timeout = 60; | ||
1517 | |||
1518 | rval = 1; | ||
1444 | } | 1519 | } |
1445 | 1520 | ||
1446 | #if defined(CONFIG_IA64_GENERIC) || defined(CONFIG_IA64_SGI_SN2) | 1521 | #if defined(CONFIG_IA64_GENERIC) || defined(CONFIG_IA64_SGI_SN2) |
@@ -1653,7 +1728,11 @@ qla2x00_nvram_config(scsi_qla_host_t *ha) | |||
1653 | } | 1728 | } |
1654 | } | 1729 | } |
1655 | 1730 | ||
1656 | return QLA_SUCCESS; | 1731 | if (rval) { |
1732 | DEBUG2_3(printk(KERN_WARNING | ||
1733 | "scsi(%ld): NVRAM configuration failed!\n", ha->host_no)); | ||
1734 | } | ||
1735 | return (rval); | ||
1657 | } | 1736 | } |
1658 | 1737 | ||
1659 | static void | 1738 | static void |
@@ -3071,9 +3150,7 @@ qla2x00_abort_isp(scsi_qla_host_t *ha) | |||
3071 | 3150 | ||
3072 | ha->isp_ops.get_flash_version(ha, ha->request_ring); | 3151 | ha->isp_ops.get_flash_version(ha, ha->request_ring); |
3073 | 3152 | ||
3074 | rval = ha->isp_ops.nvram_config(ha); | 3153 | ha->isp_ops.nvram_config(ha); |
3075 | if (rval) | ||
3076 | goto isp_abort_retry; | ||
3077 | 3154 | ||
3078 | if (!qla2x00_restart_isp(ha)) { | 3155 | if (!qla2x00_restart_isp(ha)) { |
3079 | clear_bit(RESET_MARKER_NEEDED, &ha->dpc_flags); | 3156 | clear_bit(RESET_MARKER_NEEDED, &ha->dpc_flags); |
@@ -3103,7 +3180,6 @@ qla2x00_abort_isp(scsi_qla_host_t *ha) | |||
3103 | } | 3180 | } |
3104 | } | 3181 | } |
3105 | } else { /* failed the ISP abort */ | 3182 | } else { /* failed the ISP abort */ |
3106 | isp_abort_retry: | ||
3107 | ha->flags.online = 1; | 3183 | ha->flags.online = 1; |
3108 | if (test_bit(ISP_ABORT_RETRY, &ha->dpc_flags)) { | 3184 | if (test_bit(ISP_ABORT_RETRY, &ha->dpc_flags)) { |
3109 | if (ha->isp_abort_cnt == 0) { | 3185 | if (ha->isp_abort_cnt == 0) { |
@@ -3290,9 +3366,32 @@ qla24xx_reset_adapter(scsi_qla_host_t *ha) | |||
3290 | spin_unlock_irqrestore(&ha->hardware_lock, flags); | 3366 | spin_unlock_irqrestore(&ha->hardware_lock, flags); |
3291 | } | 3367 | } |
3292 | 3368 | ||
3369 | /* On sparc systems, obtain port and node WWN from firmware | ||
3370 | * properties. | ||
3371 | */ | ||
3372 | static void qla24xx_nvram_wwn_from_ofw(scsi_qla_host_t *ha, struct nvram_24xx *nv) | ||
3373 | { | ||
3374 | #ifdef CONFIG_SPARC | ||
3375 | struct pci_dev *pdev = ha->pdev; | ||
3376 | struct pcidev_cookie *pcp = pdev->sysdata; | ||
3377 | struct device_node *dp = pcp->prom_node; | ||
3378 | u8 *val; | ||
3379 | int len; | ||
3380 | |||
3381 | val = of_get_property(dp, "port-wwn", &len); | ||
3382 | if (val && len >= WWN_SIZE) | ||
3383 | memcpy(nv->port_name, val, WWN_SIZE); | ||
3384 | |||
3385 | val = of_get_property(dp, "node-wwn", &len); | ||
3386 | if (val && len >= WWN_SIZE) | ||
3387 | memcpy(nv->node_name, val, WWN_SIZE); | ||
3388 | #endif | ||
3389 | } | ||
3390 | |||
3293 | int | 3391 | int |
3294 | qla24xx_nvram_config(scsi_qla_host_t *ha) | 3392 | qla24xx_nvram_config(scsi_qla_host_t *ha) |
3295 | { | 3393 | { |
3394 | int rval; | ||
3296 | struct init_cb_24xx *icb; | 3395 | struct init_cb_24xx *icb; |
3297 | struct nvram_24xx *nv; | 3396 | struct nvram_24xx *nv; |
3298 | uint32_t *dptr; | 3397 | uint32_t *dptr; |
@@ -3300,6 +3399,7 @@ qla24xx_nvram_config(scsi_qla_host_t *ha) | |||
3300 | uint32_t chksum; | 3399 | uint32_t chksum; |
3301 | uint16_t cnt; | 3400 | uint16_t cnt; |
3302 | 3401 | ||
3402 | rval = QLA_SUCCESS; | ||
3303 | icb = (struct init_cb_24xx *)ha->init_cb; | 3403 | icb = (struct init_cb_24xx *)ha->init_cb; |
3304 | nv = (struct nvram_24xx *)ha->request_ring; | 3404 | nv = (struct nvram_24xx *)ha->request_ring; |
3305 | 3405 | ||
@@ -3332,7 +3432,52 @@ qla24xx_nvram_config(scsi_qla_host_t *ha) | |||
3332 | qla_printk(KERN_WARNING, ha, "Inconsistent NVRAM detected: " | 3432 | qla_printk(KERN_WARNING, ha, "Inconsistent NVRAM detected: " |
3333 | "checksum=0x%x id=%c version=0x%x.\n", chksum, nv->id[0], | 3433 | "checksum=0x%x id=%c version=0x%x.\n", chksum, nv->id[0], |
3334 | le16_to_cpu(nv->nvram_version)); | 3434 | le16_to_cpu(nv->nvram_version)); |
3335 | return QLA_FUNCTION_FAILED; | 3435 | qla_printk(KERN_WARNING, ha, "Falling back to functioning (yet " |
3436 | "invalid -- WWPN) defaults.\n"); | ||
3437 | |||
3438 | /* | ||
3439 | * Set default initialization control block. | ||
3440 | */ | ||
3441 | memset(nv, 0, ha->nvram_size); | ||
3442 | nv->nvram_version = __constant_cpu_to_le16(ICB_VERSION); | ||
3443 | nv->version = __constant_cpu_to_le16(ICB_VERSION); | ||
3444 | nv->frame_payload_size = __constant_cpu_to_le16(2048); | ||
3445 | nv->execution_throttle = __constant_cpu_to_le16(0xFFFF); | ||
3446 | nv->exchange_count = __constant_cpu_to_le16(0); | ||
3447 | nv->hard_address = __constant_cpu_to_le16(124); | ||
3448 | nv->port_name[0] = 0x21; | ||
3449 | nv->port_name[1] = 0x00 + PCI_FUNC(ha->pdev->devfn); | ||
3450 | nv->port_name[2] = 0x00; | ||
3451 | nv->port_name[3] = 0xe0; | ||
3452 | nv->port_name[4] = 0x8b; | ||
3453 | nv->port_name[5] = 0x1c; | ||
3454 | nv->port_name[6] = 0x55; | ||
3455 | nv->port_name[7] = 0x86; | ||
3456 | nv->node_name[0] = 0x20; | ||
3457 | nv->node_name[1] = 0x00; | ||
3458 | nv->node_name[2] = 0x00; | ||
3459 | nv->node_name[3] = 0xe0; | ||
3460 | nv->node_name[4] = 0x8b; | ||
3461 | nv->node_name[5] = 0x1c; | ||
3462 | nv->node_name[6] = 0x55; | ||
3463 | nv->node_name[7] = 0x86; | ||
3464 | qla24xx_nvram_wwn_from_ofw(ha, nv); | ||
3465 | nv->login_retry_count = __constant_cpu_to_le16(8); | ||
3466 | nv->interrupt_delay_timer = __constant_cpu_to_le16(0); | ||
3467 | nv->login_timeout = __constant_cpu_to_le16(0); | ||
3468 | nv->firmware_options_1 = | ||
3469 | __constant_cpu_to_le32(BIT_14|BIT_13|BIT_2|BIT_1); | ||
3470 | nv->firmware_options_2 = __constant_cpu_to_le32(2 << 4); | ||
3471 | nv->firmware_options_2 |= __constant_cpu_to_le32(BIT_12); | ||
3472 | nv->firmware_options_3 = __constant_cpu_to_le32(2 << 13); | ||
3473 | nv->host_p = __constant_cpu_to_le32(BIT_11|BIT_10); | ||
3474 | nv->efi_parameters = __constant_cpu_to_le32(0); | ||
3475 | nv->reset_delay = 5; | ||
3476 | nv->max_luns_per_target = __constant_cpu_to_le16(128); | ||
3477 | nv->port_down_retry_count = __constant_cpu_to_le16(30); | ||
3478 | nv->link_down_timeout = __constant_cpu_to_le16(30); | ||
3479 | |||
3480 | rval = 1; | ||
3336 | } | 3481 | } |
3337 | 3482 | ||
3338 | /* Reset Initialization control block */ | 3483 | /* Reset Initialization control block */ |
@@ -3479,7 +3624,11 @@ qla24xx_nvram_config(scsi_qla_host_t *ha) | |||
3479 | ha->flags.process_response_queue = 1; | 3624 | ha->flags.process_response_queue = 1; |
3480 | } | 3625 | } |
3481 | 3626 | ||
3482 | return QLA_SUCCESS; | 3627 | if (rval) { |
3628 | DEBUG2_3(printk(KERN_WARNING | ||
3629 | "scsi(%ld): NVRAM configuration failed!\n", ha->host_no)); | ||
3630 | } | ||
3631 | return (rval); | ||
3483 | } | 3632 | } |
3484 | 3633 | ||
3485 | static int | 3634 | static int |
diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c index 83376f6ac3db..71e32a248528 100644 --- a/drivers/scsi/qla2xxx/qla_mbx.c +++ b/drivers/scsi/qla2xxx/qla_mbx.c | |||
@@ -1280,14 +1280,14 @@ qla2x00_get_port_name(scsi_qla_host_t *ha, uint16_t loop_id, uint8_t *name, | |||
1280 | } else { | 1280 | } else { |
1281 | if (name != NULL) { | 1281 | if (name != NULL) { |
1282 | /* This function returns name in big endian. */ | 1282 | /* This function returns name in big endian. */ |
1283 | name[0] = LSB(mcp->mb[2]); | 1283 | name[0] = MSB(mcp->mb[2]); |
1284 | name[1] = MSB(mcp->mb[2]); | 1284 | name[1] = LSB(mcp->mb[2]); |
1285 | name[2] = LSB(mcp->mb[3]); | 1285 | name[2] = MSB(mcp->mb[3]); |
1286 | name[3] = MSB(mcp->mb[3]); | 1286 | name[3] = LSB(mcp->mb[3]); |
1287 | name[4] = LSB(mcp->mb[6]); | 1287 | name[4] = MSB(mcp->mb[6]); |
1288 | name[5] = MSB(mcp->mb[6]); | 1288 | name[5] = LSB(mcp->mb[6]); |
1289 | name[6] = LSB(mcp->mb[7]); | 1289 | name[6] = MSB(mcp->mb[7]); |
1290 | name[7] = MSB(mcp->mb[7]); | 1290 | name[7] = LSB(mcp->mb[7]); |
1291 | } | 1291 | } |
1292 | 1292 | ||
1293 | DEBUG11(printk("qla2x00_get_port_name(%ld): done.\n", | 1293 | DEBUG11(printk("qla2x00_get_port_name(%ld): done.\n", |
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 68f5d24b938b..b78919a318e2 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c | |||
@@ -62,7 +62,7 @@ MODULE_PARM_DESC(ql2xallocfwdump, | |||
62 | "vary by ISP type. Default is 1 - allocate memory."); | 62 | "vary by ISP type. Default is 1 - allocate memory."); |
63 | 63 | ||
64 | int ql2xextended_error_logging; | 64 | int ql2xextended_error_logging; |
65 | module_param(ql2xextended_error_logging, int, S_IRUGO|S_IRUSR); | 65 | module_param(ql2xextended_error_logging, int, S_IRUGO|S_IWUSR); |
66 | MODULE_PARM_DESC(ql2xextended_error_logging, | 66 | MODULE_PARM_DESC(ql2xextended_error_logging, |
67 | "Option to enable extended error logging, " | 67 | "Option to enable extended error logging, " |
68 | "Default is 0 - no logging. 1 - log errors."); | 68 | "Default is 0 - no logging. 1 - log errors."); |
@@ -157,6 +157,8 @@ static struct scsi_host_template qla24xx_driver_template = { | |||
157 | 157 | ||
158 | .slave_alloc = qla2xxx_slave_alloc, | 158 | .slave_alloc = qla2xxx_slave_alloc, |
159 | .slave_destroy = qla2xxx_slave_destroy, | 159 | .slave_destroy = qla2xxx_slave_destroy, |
160 | .scan_finished = qla2xxx_scan_finished, | ||
161 | .scan_start = qla2xxx_scan_start, | ||
160 | .change_queue_depth = qla2x00_change_queue_depth, | 162 | .change_queue_depth = qla2x00_change_queue_depth, |
161 | .change_queue_type = qla2x00_change_queue_type, | 163 | .change_queue_type = qla2x00_change_queue_type, |
162 | .this_id = -1, | 164 | .this_id = -1, |
@@ -1705,6 +1707,7 @@ qla2x00_remove_one(struct pci_dev *pdev) | |||
1705 | 1707 | ||
1706 | scsi_host_put(ha->host); | 1708 | scsi_host_put(ha->host); |
1707 | 1709 | ||
1710 | pci_disable_device(pdev); | ||
1708 | pci_set_drvdata(pdev, NULL); | 1711 | pci_set_drvdata(pdev, NULL); |
1709 | } | 1712 | } |
1710 | 1713 | ||
@@ -1747,8 +1750,6 @@ qla2x00_free_device(scsi_qla_host_t *ha) | |||
1747 | if (ha->iobase) | 1750 | if (ha->iobase) |
1748 | iounmap(ha->iobase); | 1751 | iounmap(ha->iobase); |
1749 | pci_release_regions(ha->pdev); | 1752 | pci_release_regions(ha->pdev); |
1750 | |||
1751 | pci_disable_device(ha->pdev); | ||
1752 | } | 1753 | } |
1753 | 1754 | ||
1754 | static inline void | 1755 | static inline void |
diff --git a/drivers/scsi/qla2xxx/qla_sup.c b/drivers/scsi/qla2xxx/qla_sup.c index ff1dd4175a7f..206bda093da2 100644 --- a/drivers/scsi/qla2xxx/qla_sup.c +++ b/drivers/scsi/qla2xxx/qla_sup.c | |||
@@ -466,6 +466,7 @@ qla24xx_read_flash_dword(scsi_qla_host_t *ha, uint32_t addr) | |||
466 | udelay(10); | 466 | udelay(10); |
467 | else | 467 | else |
468 | rval = QLA_FUNCTION_TIMEOUT; | 468 | rval = QLA_FUNCTION_TIMEOUT; |
469 | cond_resched(); | ||
469 | } | 470 | } |
470 | 471 | ||
471 | /* TODO: What happens if we time out? */ | 472 | /* TODO: What happens if we time out? */ |
@@ -508,6 +509,7 @@ qla24xx_write_flash_dword(scsi_qla_host_t *ha, uint32_t addr, uint32_t data) | |||
508 | udelay(10); | 509 | udelay(10); |
509 | else | 510 | else |
510 | rval = QLA_FUNCTION_TIMEOUT; | 511 | rval = QLA_FUNCTION_TIMEOUT; |
512 | cond_resched(); | ||
511 | } | 513 | } |
512 | return rval; | 514 | return rval; |
513 | } | 515 | } |
@@ -1255,6 +1257,7 @@ qla2x00_poll_flash(scsi_qla_host_t *ha, uint32_t addr, uint8_t poll_data, | |||
1255 | } | 1257 | } |
1256 | udelay(10); | 1258 | udelay(10); |
1257 | barrier(); | 1259 | barrier(); |
1260 | cond_resched(); | ||
1258 | } | 1261 | } |
1259 | return status; | 1262 | return status; |
1260 | } | 1263 | } |
@@ -1403,6 +1406,7 @@ qla2x00_read_flash_data(scsi_qla_host_t *ha, uint8_t *tmp_buf, uint32_t saddr, | |||
1403 | if (saddr % 100) | 1406 | if (saddr % 100) |
1404 | udelay(10); | 1407 | udelay(10); |
1405 | *tmp_buf = data; | 1408 | *tmp_buf = data; |
1409 | cond_resched(); | ||
1406 | } | 1410 | } |
1407 | } | 1411 | } |
1408 | 1412 | ||
@@ -1449,7 +1453,6 @@ uint8_t * | |||
1449 | qla2x00_read_optrom_data(struct scsi_qla_host *ha, uint8_t *buf, | 1453 | qla2x00_read_optrom_data(struct scsi_qla_host *ha, uint8_t *buf, |
1450 | uint32_t offset, uint32_t length) | 1454 | uint32_t offset, uint32_t length) |
1451 | { | 1455 | { |
1452 | unsigned long flags; | ||
1453 | uint32_t addr, midpoint; | 1456 | uint32_t addr, midpoint; |
1454 | uint8_t *data; | 1457 | uint8_t *data; |
1455 | struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; | 1458 | struct device_reg_2xxx __iomem *reg = &ha->iobase->isp; |
@@ -1458,7 +1461,6 @@ qla2x00_read_optrom_data(struct scsi_qla_host *ha, uint8_t *buf, | |||
1458 | qla2x00_suspend_hba(ha); | 1461 | qla2x00_suspend_hba(ha); |
1459 | 1462 | ||
1460 | /* Go with read. */ | 1463 | /* Go with read. */ |
1461 | spin_lock_irqsave(&ha->hardware_lock, flags); | ||
1462 | midpoint = ha->optrom_size / 2; | 1464 | midpoint = ha->optrom_size / 2; |
1463 | 1465 | ||
1464 | qla2x00_flash_enable(ha); | 1466 | qla2x00_flash_enable(ha); |
@@ -1473,7 +1475,6 @@ qla2x00_read_optrom_data(struct scsi_qla_host *ha, uint8_t *buf, | |||
1473 | *data = qla2x00_read_flash_byte(ha, addr); | 1475 | *data = qla2x00_read_flash_byte(ha, addr); |
1474 | } | 1476 | } |
1475 | qla2x00_flash_disable(ha); | 1477 | qla2x00_flash_disable(ha); |
1476 | spin_unlock_irqrestore(&ha->hardware_lock, flags); | ||
1477 | 1478 | ||
1478 | /* Resume HBA. */ | 1479 | /* Resume HBA. */ |
1479 | qla2x00_resume_hba(ha); | 1480 | qla2x00_resume_hba(ha); |
@@ -1487,7 +1488,6 @@ qla2x00_write_optrom_data(struct scsi_qla_host *ha, uint8_t *buf, | |||
1487 | { | 1488 | { |
1488 | 1489 | ||
1489 | int rval; | 1490 | int rval; |
1490 | unsigned long flags; | ||
1491 | uint8_t man_id, flash_id, sec_number, data; | 1491 | uint8_t man_id, flash_id, sec_number, data; |
1492 | uint16_t wd; | 1492 | uint16_t wd; |
1493 | uint32_t addr, liter, sec_mask, rest_addr; | 1493 | uint32_t addr, liter, sec_mask, rest_addr; |
@@ -1500,7 +1500,6 @@ qla2x00_write_optrom_data(struct scsi_qla_host *ha, uint8_t *buf, | |||
1500 | sec_number = 0; | 1500 | sec_number = 0; |
1501 | 1501 | ||
1502 | /* Reset ISP chip. */ | 1502 | /* Reset ISP chip. */ |
1503 | spin_lock_irqsave(&ha->hardware_lock, flags); | ||
1504 | WRT_REG_WORD(®->ctrl_status, CSR_ISP_SOFT_RESET); | 1503 | WRT_REG_WORD(®->ctrl_status, CSR_ISP_SOFT_RESET); |
1505 | pci_read_config_word(ha->pdev, PCI_COMMAND, &wd); | 1504 | pci_read_config_word(ha->pdev, PCI_COMMAND, &wd); |
1506 | 1505 | ||
@@ -1689,10 +1688,10 @@ update_flash: | |||
1689 | rval = QLA_FUNCTION_FAILED; | 1688 | rval = QLA_FUNCTION_FAILED; |
1690 | break; | 1689 | break; |
1691 | } | 1690 | } |
1691 | cond_resched(); | ||
1692 | } | 1692 | } |
1693 | } while (0); | 1693 | } while (0); |
1694 | qla2x00_flash_disable(ha); | 1694 | qla2x00_flash_disable(ha); |
1695 | spin_unlock_irqrestore(&ha->hardware_lock, flags); | ||
1696 | 1695 | ||
1697 | /* Resume HBA. */ | 1696 | /* Resume HBA. */ |
1698 | qla2x00_resume_hba(ha); | 1697 | qla2x00_resume_hba(ha); |
diff --git a/drivers/scsi/qla2xxx/qla_version.h b/drivers/scsi/qla2xxx/qla_version.h index 61347aee55ce..dc85495c337f 100644 --- a/drivers/scsi/qla2xxx/qla_version.h +++ b/drivers/scsi/qla2xxx/qla_version.h | |||
@@ -7,7 +7,7 @@ | |||
7 | /* | 7 | /* |
8 | * Driver version | 8 | * Driver version |
9 | */ | 9 | */ |
10 | #define QLA2XXX_VERSION "8.01.07-k5" | 10 | #define QLA2XXX_VERSION "8.01.07-k6" |
11 | 11 | ||
12 | #define QLA_DRIVER_MAJOR_VER 8 | 12 | #define QLA_DRIVER_MAJOR_VER 8 |
13 | #define QLA_DRIVER_MINOR_VER 1 | 13 | #define QLA_DRIVER_MINOR_VER 1 |