diff options
Diffstat (limited to 'drivers/scsi/ipr.c')
-rw-r--r-- | drivers/scsi/ipr.c | 40 |
1 files changed, 17 insertions, 23 deletions
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c index 072f57715658..f142eafb6fc7 100644 --- a/drivers/scsi/ipr.c +++ b/drivers/scsi/ipr.c | |||
@@ -2439,6 +2439,7 @@ restart: | |||
2439 | /** | 2439 | /** |
2440 | * ipr_read_trace - Dump the adapter trace | 2440 | * ipr_read_trace - Dump the adapter trace |
2441 | * @kobj: kobject struct | 2441 | * @kobj: kobject struct |
2442 | * @bin_attr: bin_attribute struct | ||
2442 | * @buf: buffer | 2443 | * @buf: buffer |
2443 | * @off: offset | 2444 | * @off: offset |
2444 | * @count: buffer size | 2445 | * @count: buffer size |
@@ -2446,8 +2447,9 @@ restart: | |||
2446 | * Return value: | 2447 | * Return value: |
2447 | * number of bytes printed to buffer | 2448 | * number of bytes printed to buffer |
2448 | **/ | 2449 | **/ |
2449 | static ssize_t ipr_read_trace(struct kobject *kobj, char *buf, | 2450 | static ssize_t ipr_read_trace(struct kobject *kobj, |
2450 | loff_t off, size_t count) | 2451 | struct bin_attribute *bin_attr, |
2452 | char *buf, loff_t off, size_t count) | ||
2451 | { | 2453 | { |
2452 | struct class_device *cdev = container_of(kobj,struct class_device,kobj); | 2454 | struct class_device *cdev = container_of(kobj,struct class_device,kobj); |
2453 | struct Scsi_Host *shost = class_to_shost(cdev); | 2455 | struct Scsi_Host *shost = class_to_shost(cdev); |
@@ -3140,6 +3142,7 @@ static struct class_device_attribute *ipr_ioa_attrs[] = { | |||
3140 | /** | 3142 | /** |
3141 | * ipr_read_dump - Dump the adapter | 3143 | * ipr_read_dump - Dump the adapter |
3142 | * @kobj: kobject struct | 3144 | * @kobj: kobject struct |
3145 | * @bin_attr: bin_attribute struct | ||
3143 | * @buf: buffer | 3146 | * @buf: buffer |
3144 | * @off: offset | 3147 | * @off: offset |
3145 | * @count: buffer size | 3148 | * @count: buffer size |
@@ -3147,8 +3150,9 @@ static struct class_device_attribute *ipr_ioa_attrs[] = { | |||
3147 | * Return value: | 3150 | * Return value: |
3148 | * number of bytes printed to buffer | 3151 | * number of bytes printed to buffer |
3149 | **/ | 3152 | **/ |
3150 | static ssize_t ipr_read_dump(struct kobject *kobj, char *buf, | 3153 | static ssize_t ipr_read_dump(struct kobject *kobj, |
3151 | loff_t off, size_t count) | 3154 | struct bin_attribute *bin_attr, |
3155 | char *buf, loff_t off, size_t count) | ||
3152 | { | 3156 | { |
3153 | struct class_device *cdev = container_of(kobj,struct class_device,kobj); | 3157 | struct class_device *cdev = container_of(kobj,struct class_device,kobj); |
3154 | struct Scsi_Host *shost = class_to_shost(cdev); | 3158 | struct Scsi_Host *shost = class_to_shost(cdev); |
@@ -3301,6 +3305,7 @@ static int ipr_free_dump(struct ipr_ioa_cfg *ioa_cfg) | |||
3301 | /** | 3305 | /** |
3302 | * ipr_write_dump - Setup dump state of adapter | 3306 | * ipr_write_dump - Setup dump state of adapter |
3303 | * @kobj: kobject struct | 3307 | * @kobj: kobject struct |
3308 | * @bin_attr: bin_attribute struct | ||
3304 | * @buf: buffer | 3309 | * @buf: buffer |
3305 | * @off: offset | 3310 | * @off: offset |
3306 | * @count: buffer size | 3311 | * @count: buffer size |
@@ -3308,8 +3313,9 @@ static int ipr_free_dump(struct ipr_ioa_cfg *ioa_cfg) | |||
3308 | * Return value: | 3313 | * Return value: |
3309 | * number of bytes printed to buffer | 3314 | * number of bytes printed to buffer |
3310 | **/ | 3315 | **/ |
3311 | static ssize_t ipr_write_dump(struct kobject *kobj, char *buf, | 3316 | static ssize_t ipr_write_dump(struct kobject *kobj, |
3312 | loff_t off, size_t count) | 3317 | struct bin_attribute *bin_attr, |
3318 | char *buf, loff_t off, size_t count) | ||
3313 | { | 3319 | { |
3314 | struct class_device *cdev = container_of(kobj,struct class_device,kobj); | 3320 | struct class_device *cdev = container_of(kobj,struct class_device,kobj); |
3315 | struct Scsi_Host *shost = class_to_shost(cdev); | 3321 | struct Scsi_Host *shost = class_to_shost(cdev); |
@@ -5303,18 +5309,12 @@ static const u16 ipr_blocked_processors[] = { | |||
5303 | **/ | 5309 | **/ |
5304 | static int ipr_invalid_adapter(struct ipr_ioa_cfg *ioa_cfg) | 5310 | static int ipr_invalid_adapter(struct ipr_ioa_cfg *ioa_cfg) |
5305 | { | 5311 | { |
5306 | u8 rev_id; | ||
5307 | int i; | 5312 | int i; |
5308 | 5313 | ||
5309 | if (ioa_cfg->type == 0x5702) { | 5314 | if ((ioa_cfg->type == 0x5702) && (ioa_cfg->pdev->revision < 4)) { |
5310 | if (pci_read_config_byte(ioa_cfg->pdev, PCI_REVISION_ID, | 5315 | for (i = 0; i < ARRAY_SIZE(ipr_blocked_processors); i++){ |
5311 | &rev_id) == PCIBIOS_SUCCESSFUL) { | 5316 | if (__is_processor(ipr_blocked_processors[i])) |
5312 | if (rev_id < 4) { | 5317 | return 1; |
5313 | for (i = 0; i < ARRAY_SIZE(ipr_blocked_processors); i++){ | ||
5314 | if (__is_processor(ipr_blocked_processors[i])) | ||
5315 | return 1; | ||
5316 | } | ||
5317 | } | ||
5318 | } | 5318 | } |
5319 | } | 5319 | } |
5320 | return 0; | 5320 | return 0; |
@@ -7471,13 +7471,7 @@ static int __devinit ipr_probe_ioa(struct pci_dev *pdev, | |||
7471 | else | 7471 | else |
7472 | ioa_cfg->transop_timeout = IPR_OPERATIONAL_TIMEOUT; | 7472 | ioa_cfg->transop_timeout = IPR_OPERATIONAL_TIMEOUT; |
7473 | 7473 | ||
7474 | rc = pci_read_config_byte(pdev, PCI_REVISION_ID, &ioa_cfg->revid); | 7474 | ioa_cfg->revid = pdev->revision; |
7475 | |||
7476 | if (rc != PCIBIOS_SUCCESSFUL) { | ||
7477 | dev_err(&pdev->dev, "Failed to read PCI revision ID\n"); | ||
7478 | rc = -EIO; | ||
7479 | goto out_scsi_host_put; | ||
7480 | } | ||
7481 | 7475 | ||
7482 | ipr_regs_pci = pci_resource_start(pdev, 0); | 7476 | ipr_regs_pci = pci_resource_start(pdev, 0); |
7483 | 7477 | ||