Commit 09f942bd authored by XinHong Zhu's avatar XinHong Zhu Committed by James Bottomley

[SCSI] pm80xx: no need for tag allocation when issuing the command of unregistering device

In function pm8001_dev_gone_notify we consume a tag from bitmap resource and
later don't free that tag resource, so the tag resource will never be
freed. In the function we don't need to use any tag to issue command for
unregistering the device .
Signed-off-by: default avatarXinHong Zhu <zxh3737@163.com>
Acked-by: default avatarLindar Liu <lindar_liu@usish.com>
Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
parent d6216c47
...@@ -865,13 +865,11 @@ pm8001_exec_internal_task_abort(struct pm8001_hba_info *pm8001_ha, ...@@ -865,13 +865,11 @@ pm8001_exec_internal_task_abort(struct pm8001_hba_info *pm8001_ha,
static void pm8001_dev_gone_notify(struct domain_device *dev) static void pm8001_dev_gone_notify(struct domain_device *dev)
{ {
unsigned long flags = 0; unsigned long flags = 0;
u32 tag;
struct pm8001_hba_info *pm8001_ha; struct pm8001_hba_info *pm8001_ha;
struct pm8001_device *pm8001_dev = dev->lldd_dev; struct pm8001_device *pm8001_dev = dev->lldd_dev;
pm8001_ha = pm8001_find_ha_by_dev(dev); pm8001_ha = pm8001_find_ha_by_dev(dev);
spin_lock_irqsave(&pm8001_ha->lock, flags); spin_lock_irqsave(&pm8001_ha->lock, flags);
pm8001_tag_alloc(pm8001_ha, &tag);
if (pm8001_dev) { if (pm8001_dev) {
u32 device_id = pm8001_dev->device_id; u32 device_id = pm8001_dev->device_id;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment